- TRIGGER =
%w[
w-full rounded-(--sp-radius-md) border border-(--sp-color-muted-fg)
px-(--sp-space-3) py-(--sp-space-2)
text-(length:--sp-text-sm) text-(--sp-color-fg) bg-(--sp-color-bg)
focus:outline-none focus:ring-2 focus:ring-(--sp-focus-ring-color)
[.sp-form-combobox_&]:border-0 [.sp-form-combobox_&]:rounded-none
[.sp-form-combobox_&]:px-0 [.sp-form-combobox_&]:py-0
[.sp-form-combobox_&]:bg-transparent [.sp-form-combobox_&]:shadow-none
[.sp-form-combobox_&]:focus:ring-0
[.sp-combobox-group_&]:border-0 [.sp-combobox-group_&]:rounded-none
[.sp-combobox-group_&]:px-0 [.sp-combobox-group_&]:py-0
[.sp-combobox-group_&]:bg-transparent [.sp-combobox-group_&]:shadow-none
[.sp-combobox-group_&]:focus:ring-0
].freeze
- TRIGGER_GROUP =
%w[
flex items-center gap-(--sp-space-2) overflow-hidden
rounded-(--sp-radius-md) border border-(--sp-color-muted-fg) bg-(--sp-color-bg)
px-(--sp-space-3) py-(--sp-space-2)
focus-within:outline-none focus-within:ring-2 focus-within:ring-(--sp-focus-ring-color)
sp-combobox-group
[.sp-form-combobox_&]:border-0 [.sp-form-combobox_&]:rounded-none
[.sp-form-combobox_&]:focus-within:ring-0
].freeze
- LISTBOX =
%w[
py-(--sp-space-1) overflow-y-auto max-h-60
].freeze
- OPTION_BASE =
%w[
flex items-center gap-(--sp-space-2) w-full
px-(--sp-space-2) py-(--sp-space-1)
rounded-(--sp-radius-sm) text-(length:--sp-text-sm)
cursor-pointer select-none outline-none
hover:bg-(--sp-color-muted) focus:bg-(--sp-color-muted)
].freeze
- OPTION_SELECTED =
%w[
bg-(--sp-color-primary)/10 text-(--sp-color-primary)
].freeze
- OPTION_DISABLED =
%w[
opacity-50 cursor-not-allowed pointer-events-none
].freeze
- OPTION_GROUP =
%w[py-(--sp-space-1)].freeze
- TYPEAHEAD_LOADING =
%w[
flex items-center justify-center
py-(--sp-space-2) text-(length:--sp-text-sm) text-(--sp-color-muted-fg)
].freeze
- TYPEAHEAD_EMPTY =
%w[
flex items-center justify-center
py-(--sp-space-2) text-(length:--sp-text-sm) text-(--sp-color-muted-fg)
].freeze
- TIME =
%w[flex gap-(--sp-space-2) overflow-hidden].freeze