gpui-component/crates/ui
stayhydated 0aceb02302
dropdown: Replace specialized impl From Vec<SharedString> to Vec<T: DropdownItem + Clone> (#935)
Needed for a proc macro i plan to publish when ready
```rs
#[derive(Clone, DropdownItemFtl, EsFluent, EnumIter, EnumString)]
#[fluent(enumerable)]
pub enum PreferedLanguage {
    English,
    French,
    Chinese,
}

#[derive(Clone, DropdownItemFtl, EsFluent, EnumIter, EnumString)]
#[fluent(enumerable)]
pub enum Country {
    UnitedStates,
    France,
    China,
}

#[derive(GpuiForm)]
pub struct User {
    #[gpui_form(component(input))]
    pub username: Option<String>,

    #[gpui_form(component(input))]
    pub email: String,

    #[gpui_form(component(number_input))]
    pub age: Option<u32>,

    #[gpui_form(component(number_input))]
    pub balance: Decimal,

    #[gpui_form(component(check_box))]
    pub subscribe_newsletter: bool,

    #[gpui_form(component(switch))]
    pub enable_notifications: bool,

    #[gpui_form(component(dropdown(searchable)))]
    pub country: Option<Country>,

    #[gpui_form(component(dropdown()))]
    pub preferred_language: PreferedLanguage,

    #[gpui_form(component(calendar))]
    pub birth_date: chrono::NaiveDate,

    #[gpui_form(component(date_picker))]
    pub appointment_date: chrono::NaiveDate,

    #[gpui_form(component(progress))]
    pub completion_percentage: f32,

    #[gpui_form(skip)]
    pub skip_me: bool,
}
```
2025-06-10 10:08:42 +08:00
..
locales input: Improve clear button position in Input. (#782) 2025-04-11 19:13:17 +08:00
src dropdown: Replace specialized impl From Vec<SharedString> to Vec<T: DropdownItem + Clone> (#935) 2025-06-10 10:08:42 +08:00
tests/fixtures dock: Revert dock to use absolute size. (#840) 2025-05-08 16:29:55 +08:00
Cargo.toml chart: Draw dashed lines using gpui PathBuilder (#927) 2025-06-09 11:55:32 +08:00
default-colors.json Add Skeleton (#128) 2024-08-09 15:55:48 +08:00
LICENSE-APACHE Add Dock & Panel (#10) 2024-07-01 14:20:56 +08:00