burne-ui 2.1.2 → 2.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -4
- package/cli/burne-ui.js +4 -3
- package/cli/init.js +83 -19
- package/cli/skin-live-slots.json +1 -1
- package/cli/skin-slots.json +2 -0
- package/cli/skin-validate.mjs +83 -2
- package/cli/tailwind.css +20 -0
- package/cli/theme-bridge.css +6 -0
- package/dist/authoring.d.ts +2 -0
- package/dist/authoring.js +8 -0
- package/dist/components/composite/Accordion/accordionStyles.js +1 -1
- package/dist/components/composite/Accordion/useAccordionRootState.js +6 -2
- package/dist/components/composite/AlertDialog/AlertDialog.d.ts +1 -1
- package/dist/components/composite/AlertDialog/AlertDialog.js +1 -0
- package/dist/components/composite/AlertDialog/alertDialogAnimations.d.ts +1 -0
- package/dist/components/composite/AlertDialog/alertDialogAnimations.js +1 -0
- package/dist/components/composite/AlertDialog/alertDialogParts.d.ts +5 -7
- package/dist/components/composite/AlertDialog/alertDialogParts.js +92 -37
- package/dist/components/composite/AlertDialog/alertDialogStyles.d.ts +3 -2
- package/dist/components/composite/AlertDialog/alertDialogStyles.js +5 -3
- package/dist/components/composite/AlertDialog/alertDialogTypes.d.ts +8 -8
- package/dist/components/composite/AlertDialog/index.d.ts +4 -6
- package/dist/components/composite/AlertDialog/useAlertDialogRootState.d.ts +1 -1
- package/dist/components/composite/AlertDialog/useAlertDialogRootState.js +13 -1
- package/dist/components/composite/ButtonGroup/ButtonGroup.d.ts +1 -0
- package/dist/components/composite/ButtonGroup/ButtonGroup.js +59 -25
- package/dist/components/composite/ButtonGroup/buttonGroupAPI.d.ts +1 -0
- package/dist/components/composite/ButtonGroup/buttonGroupAPI.js +7 -1
- package/dist/components/composite/ButtonGroup/buttonGroupContext.d.ts +3 -2
- package/dist/components/composite/ButtonGroup/buttonGroupContext.js +4 -3
- package/dist/components/composite/ButtonGroup/buttonGroupStyles.js +1 -1
- package/dist/components/composite/ButtonGroup/buttonGroupTypes.d.ts +3 -1
- package/dist/components/composite/ButtonGroup/index.d.ts +1 -0
- package/dist/components/composite/CheckboxGroup/CheckboxGroup.js +25 -7
- package/dist/components/composite/CheckboxGroup/useCheckboxGroupRootState.d.ts +5 -1
- package/dist/components/composite/CheckboxGroup/useCheckboxGroupRootState.js +74 -23
- package/dist/components/composite/Form/Form.js +6 -0
- package/dist/components/composite/Form/formAPI.d.ts +2 -0
- package/dist/components/composite/Form/formAPI.js +29 -2
- package/dist/components/composite/Form/formContext.js +4 -0
- package/dist/components/composite/Form/formParts.js +20 -6
- package/dist/components/composite/Form/formStyles.js +4 -4
- package/dist/components/composite/Form/useFormControlProps.js +25 -15
- package/dist/components/composite/Form/useFormFieldBinding.js +22 -14
- package/dist/components/composite/Form/useFormRootState.d.ts +2 -1
- package/dist/components/composite/Form/useFormRootState.js +151 -89
- package/dist/components/composite/RadioGroup/RadioGroup.js +30 -10
- package/dist/components/composite/RadioGroup/radioGroupA11y.d.ts +10 -0
- package/dist/components/composite/RadioGroup/radioGroupA11y.js +75 -0
- package/dist/components/composite/RadioGroup/radioGroupTypes.d.ts +2 -2
- package/dist/components/composite/RadioGroup/useRadioGroupRootState.d.ts +7 -1
- package/dist/components/composite/RadioGroup/useRadioGroupRootState.js +105 -34
- package/dist/components/composite/ToggleButtonGroup/ToggleButtonGroup.js +3 -1
- package/dist/components/composite/ToggleButtonGroup/toggleButtonGroupA11y.d.ts +1 -1
- package/dist/components/composite/ToggleButtonGroup/toggleButtonGroupA11y.js +13 -7
- package/dist/components/composite/ToggleButtonGroup/toggleButtonGroupAPI.d.ts +2 -0
- package/dist/components/composite/ToggleButtonGroup/toggleButtonGroupAPI.js +19 -4
- package/dist/components/composite/ToggleButtonGroup/useToggleButtonGroupRootState.js +20 -7
- package/dist/components/composite/utils/optionGroupFieldset.d.ts +1 -1
- package/dist/components/core/Alert/Alert.js +3 -1
- package/dist/components/core/Alert/alertAnimations.js +14 -3
- package/dist/components/core/Alert/alertStyles.d.ts +1 -1
- package/dist/components/core/Alert/alertStyles.js +1 -1
- package/dist/components/core/AppShell/AppShell.js +16 -4
- package/dist/components/core/AppShell/appShellAnimations.js +1 -1
- package/dist/components/core/AppShell/appShellStyles.d.ts +3 -2
- package/dist/components/core/AppShell/appShellStyles.js +8 -2
- package/dist/components/core/AspectRatio/AspectRatio.js +6 -3
- package/dist/components/core/AspectRatio/aspectRatioAnimations.js +1 -1
- package/dist/components/core/AspectRatio/aspectRatioStyles.d.ts +5 -2
- package/dist/components/core/AspectRatio/aspectRatioStyles.js +27 -3
- package/dist/components/core/Avatar/avatarParts.js +26 -6
- package/dist/components/core/Avatar/avatarTypes.d.ts +1 -0
- package/dist/components/core/Avatar/useAvatarRootState.d.ts +1 -0
- package/dist/components/core/Avatar/useAvatarRootState.js +6 -2
- package/dist/components/core/Badge/Badge.js +9 -3
- package/dist/components/core/Badge/badgeA11y.js +6 -0
- package/dist/components/core/Badge/badgeAPI.js +4 -4
- package/dist/components/core/Badge/badgeAnimations.js +18 -3
- package/dist/components/core/Badge/badgeParts.d.ts +1 -1
- package/dist/components/core/Badge/badgeParts.js +6 -3
- package/dist/components/core/Badge/badgeStyles.d.ts +1 -0
- package/dist/components/core/Badge/badgeStyles.js +2 -0
- package/dist/components/core/Badge/badgeTypes.d.ts +2 -0
- package/dist/components/core/Badge/useBadgeRootState.d.ts +1 -0
- package/dist/components/core/Badge/useBadgeRootState.js +2 -1
- package/dist/components/core/Breadcrumbs/breadcrumbsAPI.js +11 -5
- package/dist/components/core/Breadcrumbs/breadcrumbsParts.js +21 -6
- package/dist/components/core/Breadcrumbs/breadcrumbsStyles.js +4 -4
- package/dist/components/core/Button/Button.js +34 -18
- package/dist/components/core/Button/buttonAnimations.d.ts +1 -1
- package/dist/components/core/Button/buttonAnimations.js +18 -7
- package/dist/components/core/Button/buttonParts.js +2 -2
- package/dist/components/core/Button/buttonStyles.d.ts +4 -3
- package/dist/components/core/Button/buttonStyles.js +11 -10
- package/dist/components/core/Button/buttonTypes.d.ts +2 -1
- package/dist/components/core/Button/useButtonRootState.d.ts +2 -1
- package/dist/components/core/Button/useButtonRootState.js +10 -4
- package/dist/components/core/Calendar/Calendar.js +15 -4
- package/dist/components/core/Calendar/calendarAPI.d.ts +10 -6
- package/dist/components/core/Calendar/calendarAPI.js +110 -30
- package/dist/components/core/Calendar/calendarParts.js +173 -72
- package/dist/components/core/Calendar/calendarStyles.d.ts +5 -5
- package/dist/components/core/Calendar/calendarStyles.js +8 -8
- package/dist/components/core/Calendar/calendarTypes.d.ts +8 -0
- package/dist/components/core/Calendar/useCalendarRootState.js +60 -19
- package/dist/components/core/Calendar/useCalendarViewModels.js +6 -6
- package/dist/components/core/Card/Card.d.ts +1 -0
- package/dist/components/core/Card/Card.js +17 -7
- package/dist/components/core/Card/cardAPI.d.ts +1 -0
- package/dist/components/core/Card/cardAPI.js +23 -1
- package/dist/components/core/Card/cardAnimations.d.ts +1 -1
- package/dist/components/core/Card/cardAnimations.js +41 -10
- package/dist/components/core/Card/cardParts.d.ts +1 -1
- package/dist/components/core/Card/cardParts.js +26 -6
- package/dist/components/core/Card/cardStyles.d.ts +5 -4
- package/dist/components/core/Card/cardStyles.js +9 -6
- package/dist/components/core/Card/cardTypes.d.ts +4 -0
- package/dist/components/core/Card/index.d.ts +1 -0
- package/dist/components/core/Checkbox/Checkbox.js +9 -1
- package/dist/components/core/Checkbox/checkboxAPI.d.ts +2 -0
- package/dist/components/core/Checkbox/checkboxAPI.js +36 -0
- package/dist/components/core/Checkbox/checkboxParts.d.ts +5 -4
- package/dist/components/core/Checkbox/checkboxParts.js +74 -48
- package/dist/components/core/Checkbox/checkboxStyles.d.ts +4 -3
- package/dist/components/core/Checkbox/checkboxStyles.js +5 -3
- package/dist/components/core/Checkbox/checkboxTypes.d.ts +2 -0
- package/dist/components/core/Checkbox/index.d.ts +1 -1
- package/dist/components/core/Checkbox/useCheckboxRootState.d.ts +4 -1
- package/dist/components/core/Checkbox/useCheckboxRootState.js +43 -30
- package/dist/components/core/CloseButton/CloseButton.js +2 -1
- package/dist/components/core/CloseButton/closeButtonAnimations.js +38 -9
- package/dist/components/core/CloseButton/closeButtonParts.js +3 -4
- package/dist/components/core/ColorPicker/ColorPicker.js +27 -8
- package/dist/components/core/ColorPicker/ColorSlider.d.ts +2 -0
- package/dist/components/core/ColorPicker/ColorSlider.js +131 -53
- package/dist/components/core/ColorPicker/ColorSwatch.js +22 -4
- package/dist/components/core/ColorPicker/colorPickerAnimations.d.ts +1 -1
- package/dist/components/core/ColorPicker/colorPickerAnimations.js +33 -8
- package/dist/components/core/ColorPicker/colorPickerParts.js +125 -32
- package/dist/components/core/ColorPicker/colorPickerStyles.d.ts +11 -3
- package/dist/components/core/ColorPicker/colorPickerStyles.js +13 -3
- package/dist/components/core/ColorPicker/colorPickerTypes.d.ts +4 -0
- package/dist/components/core/ColorPicker/colorSliderStyles.d.ts +2 -2
- package/dist/components/core/ColorPicker/colorSliderStyles.js +4 -4
- package/dist/components/core/ColorPicker/colorSliderTypes.d.ts +2 -0
- package/dist/components/core/ColorPicker/colorSwatchStyles.d.ts +1 -0
- package/dist/components/core/ColorPicker/colorSwatchStyles.js +4 -0
- package/dist/components/core/ColorPicker/colorUtils.d.ts +2 -1
- package/dist/components/core/ColorPicker/colorUtils.js +33 -10
- package/dist/components/core/ColorPicker/index.d.ts +2 -0
- package/dist/components/core/ColorPicker/useColorPickerRootState.d.ts +3 -1
- package/dist/components/core/ColorPicker/useColorPickerRootState.js +65 -30
- package/dist/components/core/ComboBox/ComboBox.js +13 -1
- package/dist/components/core/ComboBox/comboBoxAnimations.d.ts +3 -2
- package/dist/components/core/ComboBox/comboBoxAnimations.js +5 -2
- package/dist/components/core/ComboBox/comboBoxFieldParts.js +1 -1
- package/dist/components/core/ComboBox/comboBoxParts.d.ts +3 -1
- package/dist/components/core/ComboBox/comboBoxParts.js +114 -28
- package/dist/components/core/ComboBox/comboBoxStyles.d.ts +4 -4
- package/dist/components/core/ComboBox/comboBoxStyles.js +4 -4
- package/dist/components/core/ComboBox/comboBoxTypes.d.ts +5 -0
- package/dist/components/core/ComboBox/useComboBoxInputState.d.ts +3 -2
- package/dist/components/core/ComboBox/useComboBoxInputState.js +130 -62
- package/dist/components/core/ComboBox/useComboBoxRootState.js +44 -18
- package/dist/components/core/Container/Container.js +3 -0
- package/dist/components/core/Container/containerStyles.d.ts +2 -1
- package/dist/components/core/Container/containerStyles.js +2 -1
- package/dist/components/core/ContextMenu/ContextMenu.d.ts +3 -1
- package/dist/components/core/ContextMenu/ContextMenu.js +177 -19
- package/dist/components/core/ContextMenu/contextMenuStyles.d.ts +1 -1
- package/dist/components/core/ContextMenu/contextMenuStyles.js +1 -1
- package/dist/components/core/ContextMenu/index.d.ts +3 -1
- package/dist/components/core/DatePicker/DatePicker.js +8 -3
- package/dist/components/core/DatePicker/datePickerAPI.d.ts +2 -0
- package/dist/components/core/DatePicker/datePickerAPI.js +43 -0
- package/dist/components/core/DatePicker/datePickerAnimations.d.ts +2 -1
- package/dist/components/core/DatePicker/datePickerAnimations.js +9 -5
- package/dist/components/core/DatePicker/datePickerParts.js +29 -5
- package/dist/components/core/DatePicker/datePickerStyles.d.ts +2 -2
- package/dist/components/core/DatePicker/datePickerStyles.js +2 -2
- package/dist/components/core/DatePicker/datePickerTypes.d.ts +2 -0
- package/dist/components/core/DatePicker/useDatePickerRootState.d.ts +2 -0
- package/dist/components/core/DatePicker/useDatePickerRootState.js +63 -24
- package/dist/components/core/Dialog/Dialog.d.ts +1 -1
- package/dist/components/core/Dialog/Dialog.js +2 -0
- package/dist/components/core/Dialog/dialogAnimations.d.ts +1 -0
- package/dist/components/core/Dialog/dialogAnimations.js +1 -0
- package/dist/components/core/Dialog/dialogParts.d.ts +1 -1
- package/dist/components/core/Dialog/dialogParts.js +8 -3
- package/dist/components/core/Dialog/dialogStyles.d.ts +1 -1
- package/dist/components/core/Dialog/dialogStyles.js +2 -2
- package/dist/components/core/Dialog/dialogTypes.d.ts +4 -1
- package/dist/components/core/Dialog/useDialogRootState.d.ts +1 -1
- package/dist/components/core/Dialog/useDialogRootState.js +2 -0
- package/dist/components/core/Disclosure/Disclosure.js +10 -4
- package/dist/components/core/Disclosure/disclosureAnimations.js +7 -5
- package/dist/components/core/Disclosure/disclosureContentPart.js +3 -0
- package/dist/components/core/Disclosure/disclosureParts.js +29 -20
- package/dist/components/core/Disclosure/disclosureStyles.d.ts +1 -1
- package/dist/components/core/Disclosure/disclosureStyles.js +3 -3
- package/dist/components/core/Disclosure/useDisclosureContentDrag.js +3 -1
- package/dist/components/core/Disclosure/useDisclosureGroupRootState.js +17 -7
- package/dist/components/core/Disclosure/useDisclosureRootState.js +12 -12
- package/dist/components/core/Drawer/Drawer.d.ts +1 -1
- package/dist/components/core/Drawer/Drawer.js +2 -0
- package/dist/components/core/Drawer/drawerAnimations.d.ts +1 -0
- package/dist/components/core/Drawer/drawerAnimations.js +1 -0
- package/dist/components/core/Drawer/drawerParts.js +14 -9
- package/dist/components/core/Drawer/drawerStyles.d.ts +1 -1
- package/dist/components/core/Drawer/drawerStyles.js +2 -2
- package/dist/components/core/Drawer/drawerTypes.d.ts +4 -1
- package/dist/components/core/Drawer/useDrawerHandleDrag.d.ts +2 -0
- package/dist/components/core/Drawer/useDrawerHandleDrag.js +117 -35
- package/dist/components/core/Drawer/useDrawerRootState.d.ts +1 -1
- package/dist/components/core/Drawer/useDrawerRootState.js +3 -0
- package/dist/components/core/Dropdown/dropdownA11y.js +4 -1
- package/dist/components/core/Dropdown/dropdownAnimations.d.ts +3 -2
- package/dist/components/core/Dropdown/dropdownAnimations.js +79 -29
- package/dist/components/core/Dropdown/dropdownItemParts.d.ts +3 -1
- package/dist/components/core/Dropdown/dropdownItemParts.js +25 -5
- package/dist/components/core/Dropdown/dropdownParts.js +40 -11
- package/dist/components/core/Dropdown/dropdownStyles.d.ts +3 -3
- package/dist/components/core/Dropdown/dropdownStyles.js +3 -3
- package/dist/components/core/Dropdown/dropdownSubParts.js +47 -16
- package/dist/components/core/Dropdown/dropdownTypes.d.ts +13 -2
- package/dist/components/core/Dropdown/index.d.ts +3 -1
- package/dist/components/core/Dropdown/useDropdownItemState.d.ts +5 -1
- package/dist/components/core/Dropdown/useDropdownItemState.js +3 -1
- package/dist/components/core/Dropdown/useDropdownRootState.js +16 -5
- package/dist/components/core/Expandable/expandableA11y.d.ts +1 -0
- package/dist/components/core/Expandable/expandableA11y.js +5 -0
- package/dist/components/core/Expandable/expandableAPI.d.ts +1 -0
- package/dist/components/core/Expandable/expandableAPI.js +19 -11
- package/dist/components/core/Expandable/expandableAnimations.d.ts +1 -1
- package/dist/components/core/Expandable/expandableAnimations.js +9 -9
- package/dist/components/core/Expandable/expandableParts.js +31 -23
- package/dist/components/core/Expandable/expandableStyles.d.ts +1 -1
- package/dist/components/core/Expandable/expandableStyles.js +1 -1
- package/dist/components/core/Expandable/useExpandableRootState.js +5 -3
- package/dist/components/core/Field/fieldParts.d.ts +2 -2
- package/dist/components/core/Field/fieldParts.js +2 -1
- package/dist/components/core/Field/fieldStyles.js +1 -1
- package/dist/components/core/Grid/Grid.js +3 -0
- package/dist/components/core/Grid/gridStyles.d.ts +2 -1
- package/dist/components/core/Grid/gridStyles.js +2 -1
- package/dist/components/core/Header/Header.js +3 -1
- package/dist/components/core/Header/headerStyles.d.ts +3 -2
- package/dist/components/core/Header/headerStyles.js +9 -2
- package/dist/components/core/HoverCard/hoverCardParts.js +23 -11
- package/dist/components/core/Input/inputAffixParts.js +6 -0
- package/dist/components/core/Input/inputAnimations.js +3 -1
- package/dist/components/core/Input/inputControlParts.js +48 -14
- package/dist/components/core/Input/inputFieldParts.js +1 -1
- package/dist/components/core/Input/inputStyles.d.ts +5 -5
- package/dist/components/core/Input/inputStyles.js +5 -5
- package/dist/components/core/Input/inputTypes.d.ts +1 -0
- package/dist/components/core/Input/useInputRootState.js +2 -1
- package/dist/components/core/Kbd/Kbd.js +3 -1
- package/dist/components/core/Kbd/kbdAnimations.js +16 -4
- package/dist/components/core/Kbd/kbdParts.js +6 -4
- package/dist/components/core/Kbd/kbdStyles.d.ts +1 -1
- package/dist/components/core/Kbd/kbdStyles.js +1 -1
- package/dist/components/core/Kbd/kbdTextPart.js +5 -2
- package/dist/components/core/Kbd/useKbdRootState.js +6 -2
- package/dist/components/core/Label/Label.d.ts +2 -1
- package/dist/components/core/Label/Label.js +8 -1
- package/dist/components/core/Label/labelParts.d.ts +1 -0
- package/dist/components/core/Label/labelTypes.d.ts +3 -1
- package/dist/components/core/Label/useLabelRootState.d.ts +2 -1
- package/dist/components/core/Label/useLabelRootState.js +3 -1
- package/dist/components/core/Link/Link.d.ts +1 -1
- package/dist/components/core/Link/Link.js +38 -25
- package/dist/components/core/Link/linkAPI.d.ts +3 -1
- package/dist/components/core/Link/linkAPI.js +8 -4
- package/dist/components/core/Link/linkAnchorBodyPart.d.ts +2 -2
- package/dist/components/core/Link/linkAnchorBodyPart.js +48 -8
- package/dist/components/core/Link/linkAnimations.d.ts +1 -1
- package/dist/components/core/Link/linkAnimations.js +29 -14
- package/dist/components/core/Link/linkIconSlotPart.d.ts +1 -1
- package/dist/components/core/Link/linkIconSlotPart.js +3 -3
- package/dist/components/core/Link/linkStyles.d.ts +5 -3
- package/dist/components/core/Link/linkStyles.js +6 -3
- package/dist/components/core/Link/linkTypes.d.ts +14 -1
- package/dist/components/core/Link/useLinkRootState.d.ts +2 -0
- package/dist/components/core/ListBox/ListBox.d.ts +1 -0
- package/dist/components/core/ListBox/ListBox.js +2 -0
- package/dist/components/core/ListBox/index.d.ts +1 -0
- package/dist/components/core/ListBox/listBoxAnimations.d.ts +5 -2
- package/dist/components/core/ListBox/listBoxAnimations.js +15 -3
- package/dist/components/core/ListBox/listBoxParts.js +21 -5
- package/dist/components/core/ListBox/listBoxStyles.d.ts +3 -3
- package/dist/components/core/ListBox/listBoxStyles.js +3 -3
- package/dist/components/core/ListBox/listBoxTypes.d.ts +5 -1
- package/dist/components/core/ListBox/useListBoxItemState.d.ts +1 -1
- package/dist/components/core/ListBox/useListBoxRootState.d.ts +1 -1
- package/dist/components/core/ListBox/useListBoxRootState.js +31 -6
- package/dist/components/core/ListBox/useListBoxVirtualWindow.d.ts +1 -0
- package/dist/components/core/ListBox/useListBoxVirtualWindow.js +11 -4
- package/dist/components/core/Loading/Loading.js +1 -1
- package/dist/components/core/Loading/loadingAnimations.d.ts +2 -2
- package/dist/components/core/Loading/loadingAnimations.js +12 -5
- package/dist/components/core/Loading/loadingParts.js +1 -1
- package/dist/components/core/Loading/loadingStyles.js +1 -1
- package/dist/components/core/Meter/Meter.js +21 -3
- package/dist/components/core/Meter/meterAPI.d.ts +4 -0
- package/dist/components/core/Meter/meterAPI.js +13 -2
- package/dist/components/core/Meter/meterParts.js +6 -2
- package/dist/components/core/Meter/meterStyles.d.ts +1 -1
- package/dist/components/core/Meter/meterStyles.js +1 -1
- package/dist/components/core/Meter/meterTypes.d.ts +1 -0
- package/dist/components/core/Meter/useMeterRootState.js +3 -2
- package/dist/components/core/Meter/useMeterTrackState.d.ts +1 -1
- package/dist/components/core/Meter/useMeterTrackState.js +15 -10
- package/dist/components/core/NumberInput/NumberInput.js +13 -2
- package/dist/components/core/NumberInput/numberInputParts.d.ts +4 -1
- package/dist/components/core/NumberInput/numberInputParts.js +30 -4
- package/dist/components/core/NumberInput/numberInputStyles.js +2 -2
- package/dist/components/core/NumberInput/useNumberInputRootState.js +47 -33
- package/dist/components/core/Pagination/paginationAPI.d.ts +4 -1
- package/dist/components/core/Pagination/paginationAPI.js +60 -17
- package/dist/components/core/Pagination/paginationAnimations.js +6 -0
- package/dist/components/core/Pagination/paginationParts.d.ts +1 -1
- package/dist/components/core/Pagination/paginationParts.js +82 -22
- package/dist/components/core/Pagination/paginationStyles.d.ts +7 -6
- package/dist/components/core/Pagination/paginationStyles.js +7 -6
- package/dist/components/core/Pagination/paginationTypes.d.ts +1 -0
- package/dist/components/core/Pagination/usePaginationRootState.js +12 -6
- package/dist/components/core/PinInput/pinInputAnimations.d.ts +6 -1
- package/dist/components/core/PinInput/pinInputAnimations.js +13 -4
- package/dist/components/core/PinInput/pinInputParts.js +84 -20
- package/dist/components/core/PinInput/pinInputStyles.d.ts +1 -1
- package/dist/components/core/PinInput/pinInputStyles.js +2 -2
- package/dist/components/core/PinInput/pinInputTypes.d.ts +4 -0
- package/dist/components/core/PinInput/usePinInputRootState.js +71 -33
- package/dist/components/core/Popover/popoverAnimations.d.ts +1 -0
- package/dist/components/core/Popover/popoverAnimations.js +33 -7
- package/dist/components/core/Popover/popoverParts.js +62 -14
- package/dist/components/core/Popover/popoverStyles.d.ts +1 -1
- package/dist/components/core/Popover/popoverStyles.js +1 -1
- package/dist/components/core/Popover/popoverTypes.d.ts +1 -0
- package/dist/components/core/Popover/usePopoverRootState.js +46 -14
- package/dist/components/core/ProgressBar/ProgressBar.js +21 -3
- package/dist/components/core/ProgressBar/progressBarA11y.d.ts +1 -1
- package/dist/components/core/ProgressBar/progressBarA11y.js +4 -2
- package/dist/components/core/ProgressBar/progressBarAPI.d.ts +4 -0
- package/dist/components/core/ProgressBar/progressBarAPI.js +13 -2
- package/dist/components/core/ProgressBar/progressBarParts.js +6 -2
- package/dist/components/core/ProgressBar/progressBarStyles.d.ts +1 -1
- package/dist/components/core/ProgressBar/progressBarStyles.js +1 -1
- package/dist/components/core/ProgressBar/progressBarTypes.d.ts +3 -0
- package/dist/components/core/ProgressBar/useProgressBarRootState.js +6 -3
- package/dist/components/core/ProgressBar/useProgressBarTrackState.d.ts +1 -1
- package/dist/components/core/ProgressBar/useProgressBarTrackState.js +18 -11
- package/dist/components/core/Radio/Radio.js +6 -1
- package/dist/components/core/Radio/radioParts.js +6 -3
- package/dist/components/core/Radio/radioStyles.d.ts +3 -3
- package/dist/components/core/Radio/radioStyles.js +3 -3
- package/dist/components/core/Radio/radioTypes.d.ts +1 -0
- package/dist/components/core/Radio/useRadioRootState.d.ts +5 -2
- package/dist/components/core/Radio/useRadioRootState.js +80 -36
- package/dist/components/core/Resizable/Resizable.js +185 -20
- package/dist/components/core/Resizable/index.d.ts +1 -0
- package/dist/components/core/Resizable/resizableAnimations.js +1 -1
- package/dist/components/core/Resizable/resizableParts.d.ts +1 -0
- package/dist/components/core/Resizable/resizableParts.js +96 -42
- package/dist/components/core/Resizable/resizableStyles.d.ts +3 -2
- package/dist/components/core/Resizable/resizableStyles.js +3 -2
- package/dist/components/core/Resizable/resizableTypes.d.ts +10 -2
- package/dist/components/core/Ripple/Ripple.js +3 -2
- package/dist/components/core/Ripple/rippleAPI.d.ts +1 -0
- package/dist/components/core/Ripple/rippleAPI.js +7 -0
- package/dist/components/core/Ripple/rippleStyles.d.ts +1 -1
- package/dist/components/core/Ripple/rippleStyles.js +1 -1
- package/dist/components/core/ScrollArea/ScrollArea.js +1 -1
- package/dist/components/core/ScrollArea/scrollAreaAPI.d.ts +11 -2
- package/dist/components/core/ScrollArea/scrollAreaAPI.js +65 -9
- package/dist/components/core/ScrollArea/scrollAreaParts.js +31 -10
- package/dist/components/core/ScrollArea/scrollAreaStyles.d.ts +1 -1
- package/dist/components/core/ScrollArea/scrollAreaStyles.js +1 -1
- package/dist/components/core/ScrollArea/scrollAreaTypes.d.ts +4 -0
- package/dist/components/core/ScrollArea/useScrollAreaRootState.d.ts +1 -1
- package/dist/components/core/ScrollArea/useScrollAreaRootState.js +49 -10
- package/dist/components/core/SearchInput/SearchInput.js +24 -9
- package/dist/components/core/SearchInput/searchInputAnimations.d.ts +7 -6
- package/dist/components/core/SearchInput/searchInputAnimations.js +23 -18
- package/dist/components/core/SearchInput/searchInputParts.d.ts +2 -2
- package/dist/components/core/SearchInput/searchInputParts.js +22 -10
- package/dist/components/core/SearchInput/searchInputStyles.d.ts +5 -3
- package/dist/components/core/SearchInput/searchInputStyles.js +6 -5
- package/dist/components/core/SearchInput/searchInputTypes.d.ts +1 -0
- package/dist/components/core/SearchInput/useSearchInputRootState.d.ts +3 -3
- package/dist/components/core/SearchInput/useSearchInputRootState.js +52 -34
- package/dist/components/core/Select/Select.js +13 -1
- package/dist/components/core/Select/selectAnimations.d.ts +3 -2
- package/dist/components/core/Select/selectAnimations.js +5 -2
- package/dist/components/core/Select/selectParts.d.ts +3 -1
- package/dist/components/core/Select/selectParts.js +2 -1
- package/dist/components/core/Select/selectStyles.d.ts +3 -3
- package/dist/components/core/Select/selectStyles.js +3 -3
- package/dist/components/core/Select/selectTriggerParts.js +79 -28
- package/dist/components/core/Select/selectTypes.d.ts +1 -0
- package/dist/components/core/Select/useSelectRootState.js +33 -16
- package/dist/components/core/SelectionIndicator/selectionIndicatorAnimations.js +23 -3
- package/dist/components/core/SelectionThumb/SelectionThumb.js +1 -1
- package/dist/components/core/Separator/Separator.d.ts +2 -1
- package/dist/components/core/Separator/Separator.js +3 -1
- package/dist/components/core/Separator/index.d.ts +1 -1
- package/dist/components/core/Separator/separatorStyles.d.ts +2 -2
- package/dist/components/core/Separator/separatorStyles.js +2 -2
- package/dist/components/core/Separator/separatorTypes.d.ts +4 -0
- package/dist/components/core/Sidebar/Sidebar.js +15 -2
- package/dist/components/core/Sidebar/sidebarAnimations.d.ts +2 -2
- package/dist/components/core/Sidebar/sidebarAnimations.js +4 -3
- package/dist/components/core/Sidebar/sidebarStyles.d.ts +2 -1
- package/dist/components/core/Sidebar/sidebarStyles.js +2 -1
- package/dist/components/core/Skeleton/skeletonParts.js +8 -5
- package/dist/components/core/Skeleton/skeletonStyles.d.ts +10 -0
- package/dist/components/core/Skeleton/skeletonStyles.js +20 -0
- package/dist/components/core/Slider/Slider.js +9 -3
- package/dist/components/core/Slider/sliderAPI.d.ts +5 -4
- package/dist/components/core/Slider/sliderAPI.js +86 -42
- package/dist/components/core/Slider/sliderAnimations.d.ts +1 -1
- package/dist/components/core/Slider/sliderAnimations.js +2 -2
- package/dist/components/core/Slider/sliderParts.js +11 -2
- package/dist/components/core/Slider/sliderStyles.d.ts +4 -4
- package/dist/components/core/Slider/sliderStyles.js +18 -6
- package/dist/components/core/Slider/sliderThumbParts.d.ts +2 -0
- package/dist/components/core/Slider/sliderThumbParts.js +16 -4
- package/dist/components/core/Slider/sliderTrackParts.js +10 -4
- package/dist/components/core/Slider/sliderTypes.d.ts +9 -1
- package/dist/components/core/Slider/useSliderRootState.d.ts +3 -2
- package/dist/components/core/Slider/useSliderRootState.js +104 -49
- package/dist/components/core/Slider/useSliderTrackState.js +198 -39
- package/dist/components/core/Stack/Stack.js +3 -0
- package/dist/components/core/Stack/stackStyles.d.ts +2 -1
- package/dist/components/core/Stack/stackStyles.js +2 -1
- package/dist/components/core/Stepper/index.d.ts +10 -1
- package/dist/components/core/Stepper/stepperAPI.d.ts +2 -2
- package/dist/components/core/Stepper/stepperAPI.js +4 -3
- package/dist/components/core/Stepper/stepperAnimations.d.ts +1 -0
- package/dist/components/core/Stepper/stepperAnimations.js +28 -2
- package/dist/components/core/Stepper/stepperParts.d.ts +11 -2
- package/dist/components/core/Stepper/stepperParts.js +38 -9
- package/dist/components/core/Stepper/stepperStyles.js +3 -1
- package/dist/components/core/Stepper/stepperTypes.d.ts +3 -2
- package/dist/components/core/Stepper/useStepperRootState.js +10 -3
- package/dist/components/core/Surface/Surface.js +3 -1
- package/dist/components/core/Switch/Switch.js +12 -1
- package/dist/components/core/Switch/switchAPI.d.ts +2 -0
- package/dist/components/core/Switch/switchAPI.js +18 -1
- package/dist/components/core/Switch/switchAnimations.js +29 -9
- package/dist/components/core/Switch/switchControlParts.js +93 -30
- package/dist/components/core/Switch/switchGeometry.js +2 -2
- package/dist/components/core/Switch/switchSimpleParts.d.ts +2 -1
- package/dist/components/core/Switch/switchSimpleParts.js +3 -1
- package/dist/components/core/Switch/switchStyles.d.ts +3 -3
- package/dist/components/core/Switch/switchStyles.js +3 -3
- package/dist/components/core/Switch/switchTypes.d.ts +8 -0
- package/dist/components/core/Switch/useSwitchRootState.js +54 -17
- package/dist/components/core/Table/Table.d.ts +1 -0
- package/dist/components/core/Table/Table.js +2 -0
- package/dist/components/core/Table/index.d.ts +1 -0
- package/dist/components/core/Table/tableAPI.d.ts +6 -1
- package/dist/components/core/Table/tableAPI.js +73 -5
- package/dist/components/core/Table/tableContext.js +6 -1
- package/dist/components/core/Table/tableParts.js +77 -34
- package/dist/components/core/Table/tableStyles.d.ts +13 -2
- package/dist/components/core/Table/tableStyles.js +26 -3
- package/dist/components/core/Table/tableTypes.d.ts +4 -0
- package/dist/components/core/Table/tableVirtualRows.js +140 -27
- package/dist/components/core/Table/useTableContentState.d.ts +2 -1
- package/dist/components/core/Table/useTableContentState.js +32 -6
- package/dist/components/core/Tabs/tabsA11y.d.ts +4 -3
- package/dist/components/core/Tabs/tabsA11y.js +5 -4
- package/dist/components/core/Tabs/tabsContext.d.ts +5 -0
- package/dist/components/core/Tabs/tabsContext.js +12 -0
- package/dist/components/core/Tabs/tabsPanelPart.js +11 -1
- package/dist/components/core/Tabs/tabsParts.js +70 -32
- package/dist/components/core/Tabs/tabsStyles.d.ts +5 -2
- package/dist/components/core/Tabs/tabsStyles.js +13 -4
- package/dist/components/core/Tabs/tabsTabPart.js +55 -50
- package/dist/components/core/Tabs/tabsTypes.d.ts +2 -2
- package/dist/components/core/Tabs/useSlidingTabIndicator.d.ts +1 -1
- package/dist/components/core/Tabs/useSlidingTabIndicator.js +25 -10
- package/dist/components/core/Tabs/useTabsRootState.js +13 -5
- package/dist/components/core/TagsInput/TagsInput.js +13 -2
- package/dist/components/core/TagsInput/index.d.ts +2 -0
- package/dist/components/core/TagsInput/tagsInputParts.d.ts +6 -2
- package/dist/components/core/TagsInput/tagsInputParts.js +81 -14
- package/dist/components/core/TagsInput/tagsInputStyles.js +2 -2
- package/dist/components/core/TagsInput/tagsInputTypes.d.ts +3 -0
- package/dist/components/core/TagsInput/useTagsInputRootState.js +78 -33
- package/dist/components/core/Text/Text.d.ts +2 -1
- package/dist/components/core/Text/Text.js +3 -1
- package/dist/components/core/Text/index.d.ts +1 -1
- package/dist/components/core/Text/textTypes.d.ts +4 -0
- package/dist/components/core/TextArea/textAreaAnimations.js +5 -3
- package/dist/components/core/TextArea/textAreaParts.js +94 -12
- package/dist/components/core/TextArea/textAreaStyles.d.ts +3 -3
- package/dist/components/core/TextArea/textAreaStyles.js +2 -2
- package/dist/components/core/TextArea/textAreaTypes.d.ts +1 -0
- package/dist/components/core/TextArea/useTextAreaRootState.js +2 -1
- package/dist/components/core/TimeField/TimeField.js +6 -1
- package/dist/components/core/TimeField/timeFieldAnimations.d.ts +3 -2
- package/dist/components/core/TimeField/timeFieldAnimations.js +13 -4
- package/dist/components/core/TimeField/timeFieldParts.js +50 -30
- package/dist/components/core/TimeField/timeFieldStyles.d.ts +1 -1
- package/dist/components/core/TimeField/timeFieldStyles.js +1 -1
- package/dist/components/core/TimeField/timeFieldTypes.d.ts +2 -0
- package/dist/components/core/TimeField/useTimeFieldControlState.d.ts +4 -1
- package/dist/components/core/TimeField/useTimeFieldControlState.js +141 -39
- package/dist/components/core/TimeField/useTimeFieldRootState.js +3 -1
- package/dist/components/core/Toast/toastA11y.js +17 -7
- package/dist/components/core/Toast/toastAPI.d.ts +17 -1
- package/dist/components/core/Toast/toastAPI.js +82 -0
- package/dist/components/core/Toast/toastAnimations.d.ts +1 -1
- package/dist/components/core/Toast/toastAnimations.js +106 -98
- package/dist/components/core/Toast/toastProvider.js +25 -3
- package/dist/components/core/Toast/toastStyles.d.ts +5 -3
- package/dist/components/core/Toast/toastStyles.js +5 -3
- package/dist/components/core/Toast/toastTypes.d.ts +9 -0
- package/dist/components/core/Toast/useToastProviderState.js +61 -6
- package/dist/components/core/ToggleButton/ToggleButton.js +23 -7
- package/dist/components/core/ToggleButton/toggleButtonAnimations.d.ts +4 -2
- package/dist/components/core/ToggleButton/toggleButtonAnimations.js +64 -41
- package/dist/components/core/ToggleButton/toggleButtonStyles.d.ts +2 -1
- package/dist/components/core/ToggleButton/toggleButtonStyles.js +21 -2
- package/dist/components/core/ToggleButton/toggleButtonTypes.d.ts +3 -0
- package/dist/components/core/ToggleButton/useToggleButtonRootState.d.ts +1 -1
- package/dist/components/core/ToggleButton/useToggleButtonRootState.js +4 -7
- package/dist/components/core/Tooltip/tooltipAnimations.js +17 -1
- package/dist/components/core/Tooltip/tooltipParts.js +83 -26
- package/dist/components/core/Tooltip/tooltipPosition.js +57 -32
- package/dist/components/core/Tooltip/tooltipStyles.d.ts +2 -2
- package/dist/components/core/Tooltip/tooltipStyles.js +2 -2
- package/dist/components/core/Tooltip/tooltipTypes.d.ts +5 -0
- package/dist/components/core/Tooltip/useTooltipRootState.js +59 -10
- package/dist/components/core/utils/bodyScrollLock.js +12 -3
- package/dist/components/core/utils/clampNumber.d.ts +1 -1
- package/dist/components/core/utils/clampNumber.js +4 -1
- package/dist/components/core/utils/containedEscape.js +12 -0
- package/dist/components/core/utils/fieldFormDom.d.ts +24 -0
- package/dist/components/core/utils/fieldFormDom.js +37 -2
- package/dist/components/core/utils/focusElement.js +2 -2
- package/dist/components/core/utils/hoverInteractiveLift.d.ts +12 -0
- package/dist/components/core/utils/hoverInteractiveLift.js +43 -2
- package/dist/components/core/utils/inputAffixStyles.js +1 -1
- package/dist/components/core/utils/mergeAsChildProps.d.ts +7 -0
- package/dist/components/core/utils/mergeAsChildProps.js +23 -2
- package/dist/components/core/utils/optionListItemStyles.d.ts +2 -2
- package/dist/components/core/utils/optionListItemStyles.js +2 -2
- package/dist/components/core/utils/overlayLayer.d.ts +39 -0
- package/dist/components/core/utils/overlayLayer.js +164 -2
- package/dist/components/core/utils/overlayTriggerSqueeze.js +5 -4
- package/dist/components/core/utils/portalContainer.d.ts +27 -5
- package/dist/components/core/utils/portalContainer.js +38 -4
- package/dist/components/core/utils/pressRipple.js +2 -1
- package/dist/components/core/utils/readingDirection.js +8 -0
- package/dist/components/core/utils/runOpenAfterSqueeze.d.ts +7 -0
- package/dist/components/core/utils/runOpenAfterSqueeze.js +10 -3
- package/dist/components/core/utils/semanticStatusSurface.js +4 -4
- package/dist/components/core/utils/sizeLayout/panel.js +4 -4
- package/dist/components/core/utils/slotMotion/recipes/loadKitRecipe.js +2 -0
- package/dist/components/core/utils/slotMotion/recipes/switchThumb.js +3 -0
- package/dist/components/core/utils/slotMotion/resolveMotionValue.js +1 -1
- package/dist/components/core/utils/slotMotion/slotMount.js +1 -1
- package/dist/components/core/utils/slotMotion/useBarFillMotion.js +8 -3
- package/dist/components/core/utils/useCollapsibleHeight.js +2 -1
- package/dist/components/core/utils/useConvergeRipples.js +4 -1
- package/dist/components/core/utils/useModalMotion.d.ts +2 -0
- package/dist/components/core/utils/useModalMotion.js +19 -3
- package/dist/components/core/utils/usePressableElementTextMotion.js +4 -5
- package/dist/components/core/utils/useShadowMotion.js +28 -7
- package/dist/index.d.ts +3 -3
- package/dist/skins/resolveVariantVisual.d.ts +1 -1
- package/dist/skins/resolveVariantVisual.js +2 -2
- package/dist/skins/skinContext.js +6 -5
- package/dist/skins/skinLiveSlots.generated.d.ts +1 -1
- package/dist/skins/skinLiveSlots.generated.js +1 -1
- package/dist/skins/skinShell.js +9 -4
- package/dist/skins/skinSlots.generated.d.ts +1 -1
- package/dist/skins/skinSlots.generated.js +2 -0
- package/dist/studio/colorPresets.d.ts +1 -1
- package/dist/studio/colorPresets.js +8 -1
- package/dist/studio.d.ts +1 -1
- package/dist/studio.js +13 -1
- package/dist/theme/namedPalettes.d.ts +12 -0
- package/dist/theme/namedPalettes.js +697 -1
- package/dist/theme/themeDefaults.js +6 -3
- package/dist/tokens/config.d.ts +8 -2
- package/dist/tokens/config.js +15 -2
- package/dist/tokens/index.d.ts +1 -1
- package/dist/tokens/index.js +9 -0
- package/dist/ui.css +499 -55
- package/dist/utils/cn.js +89 -2
- package/package.json +1 -1
- package/dist/components/composite/utils/useOptionGroupRequiredAnchor.js +0 -17
- package/dist/components/composite/utils/useOptionGroupSingleValue.js +0 -24
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cn } from "../../../utils/cn.js";
|
|
2
2
|
const SCROLL_AREA_ROOT_CLASS = "relative min-h-0 min-w-0 overflow-hidden";
|
|
3
|
-
const SCROLL_AREA_VIEWPORT_CLASS = "size-full min-h-0 min-w-0 overscroll-contain outline-none [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden";
|
|
3
|
+
const SCROLL_AREA_VIEWPORT_CLASS = "size-full min-h-0 min-w-0 overscroll-contain outline-none focus-ring-inset [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden";
|
|
4
4
|
function scrollAreaViewportOverflow(orientation) {
|
|
5
5
|
if (orientation === "vertical") return "overflow-x-hidden overflow-y-auto";
|
|
6
6
|
if (orientation === "horizontal") return "overflow-x-auto overflow-y-hidden";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ScrollAreaContextValue, ScrollAreaProps } from './scrollAreaTypes.js';
|
|
2
|
-
export declare function useScrollAreaRootState({ children, id, visibility, orientation, scrollHideDelay, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, }: Pick<ScrollAreaProps, "children" | "id" | "visibility" | "orientation" | "scrollHideDelay" | "aria-label" | "aria-labelledby">): {
|
|
2
|
+
export declare function useScrollAreaRootState({ children, id, visibility, orientation: orientationProp, scrollHideDelay, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, }: Pick<ScrollAreaProps, "children" | "id" | "visibility" | "orientation" | "scrollHideDelay" | "aria-label" | "aria-labelledby">): {
|
|
3
3
|
contextValue: ScrollAreaContextValue;
|
|
4
4
|
isCompound: boolean;
|
|
5
5
|
setHovered: (hovered: boolean) => void;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useId, useRef, useState, useCallback, useLayoutEffect,
|
|
3
|
-
import {
|
|
2
|
+
import { useId, useRef, useState, useMemo, useCallback, useLayoutEffect, useEffect } from "react";
|
|
3
|
+
import { isRtlElement } from "../utils/readingDirection.js";
|
|
4
|
+
import { EMPTY_SCROLL_METRICS, scrollAreaIsCompound, detectCompoundScrollAxes, scrollAxisMetrics, readInlineScroll, paintScrollThumb, SCROLL_AREA_HIDE_DELAY, scrollAreaBarActive } from "./scrollAreaAPI.js";
|
|
4
5
|
function useScrollAreaRootState({
|
|
5
6
|
children,
|
|
6
7
|
id,
|
|
7
8
|
visibility = "hover",
|
|
8
|
-
orientation
|
|
9
|
+
orientation: orientationProp,
|
|
9
10
|
scrollHideDelay = SCROLL_AREA_HIDE_DELAY,
|
|
10
11
|
"aria-label": ariaLabel,
|
|
11
12
|
"aria-labelledby": ariaLabelledBy
|
|
@@ -18,6 +19,7 @@ function useScrollAreaRootState({
|
|
|
18
19
|
const hideTimer = useRef(0);
|
|
19
20
|
const draggingRef = useRef({ vertical: false, horizontal: false });
|
|
20
21
|
const [overflow, setOverflow] = useState({ vertical: false, horizontal: false });
|
|
22
|
+
const [hasBars, setHasBars] = useState({ vertical: false, horizontal: false });
|
|
21
23
|
const [hovered, setHovered] = useState(false);
|
|
22
24
|
const [focused, setFocused] = useState(false);
|
|
23
25
|
const [scrolling, setScrolling] = useState(false);
|
|
@@ -26,6 +28,19 @@ function useScrollAreaRootState({
|
|
|
26
28
|
vertical: { now: 0, max: 0 },
|
|
27
29
|
horizontal: { now: 0, max: 0 }
|
|
28
30
|
});
|
|
31
|
+
const isCompound = useMemo(() => scrollAreaIsCompound(children), [children]);
|
|
32
|
+
const compoundAxes = useMemo(
|
|
33
|
+
() => isCompound ? detectCompoundScrollAxes(children) : { vertical: false, horizontal: false },
|
|
34
|
+
[children, isCompound]
|
|
35
|
+
);
|
|
36
|
+
const orientation = useMemo(() => {
|
|
37
|
+
if (!isCompound) return orientationProp ?? "vertical";
|
|
38
|
+
const allowVertical = (orientationProp ? orientationProp !== "horizontal" : false) || compoundAxes.vertical || hasBars.vertical || !compoundAxes.horizontal && !hasBars.horizontal && orientationProp === void 0;
|
|
39
|
+
const allowHorizontal = (orientationProp ? orientationProp !== "vertical" : false) || compoundAxes.horizontal || hasBars.horizontal;
|
|
40
|
+
if (allowVertical && allowHorizontal) return "both";
|
|
41
|
+
if (allowHorizontal) return "horizontal";
|
|
42
|
+
return "vertical";
|
|
43
|
+
}, [compoundAxes.horizontal, compoundAxes.vertical, hasBars.horizontal, hasBars.vertical, isCompound, orientationProp]);
|
|
29
44
|
const paint = useCallback(() => {
|
|
30
45
|
const viewport = viewportRef.current;
|
|
31
46
|
if (!viewport) return;
|
|
@@ -53,8 +68,8 @@ function useScrollAreaRootState({
|
|
|
53
68
|
xTrack
|
|
54
69
|
);
|
|
55
70
|
axesRef.current = { vertical, horizontal };
|
|
56
|
-
if (verticalBar) paintScrollThumb(verticalBar, vertical);
|
|
57
|
-
if (horizontalBar) paintScrollThumb(horizontalBar, horizontal);
|
|
71
|
+
if (verticalBar) paintScrollThumb(verticalBar, vertical, false);
|
|
72
|
+
if (horizontalBar) paintScrollThumb(horizontalBar, horizontal, isRtlElement(viewport));
|
|
58
73
|
setOverflow(
|
|
59
74
|
(prev) => prev.vertical === vertical.overflowing && prev.horizontal === horizontal.overflowing ? prev : { vertical: vertical.overflowing, horizontal: horizontal.overflowing }
|
|
60
75
|
);
|
|
@@ -95,18 +110,41 @@ function useScrollAreaRootState({
|
|
|
95
110
|
useLayoutEffect(() => {
|
|
96
111
|
paint();
|
|
97
112
|
}, [overflow.vertical, overflow.horizontal, paint]);
|
|
113
|
+
useEffect(
|
|
114
|
+
() => () => {
|
|
115
|
+
window.clearTimeout(hideTimer.current);
|
|
116
|
+
hideTimer.current = 0;
|
|
117
|
+
},
|
|
118
|
+
[]
|
|
119
|
+
);
|
|
120
|
+
const syncHasBars = useCallback(() => {
|
|
121
|
+
let v = false;
|
|
122
|
+
let h = false;
|
|
123
|
+
for (const item of barsRef.current) {
|
|
124
|
+
if (item.axis === "vertical") v = true;
|
|
125
|
+
if (item.axis === "horizontal") h = true;
|
|
126
|
+
}
|
|
127
|
+
setHasBars((prev) => prev.vertical === v && prev.horizontal === h ? prev : { vertical: v, horizontal: h });
|
|
128
|
+
}, []);
|
|
98
129
|
const registerBar = useCallback((bar) => {
|
|
99
130
|
barsRef.current.add(bar);
|
|
131
|
+
syncHasBars();
|
|
100
132
|
paint();
|
|
101
133
|
return () => {
|
|
102
134
|
barsRef.current.delete(bar);
|
|
135
|
+
syncHasBars();
|
|
103
136
|
};
|
|
104
|
-
}, [paint]);
|
|
137
|
+
}, [paint, syncHasBars]);
|
|
105
138
|
const setDragging = useCallback((axis, next) => {
|
|
106
139
|
draggingRef.current = { ...draggingRef.current, [axis]: next };
|
|
107
140
|
setDraggingState({ ...draggingRef.current });
|
|
108
|
-
if (next)
|
|
109
|
-
|
|
141
|
+
if (next) {
|
|
142
|
+
window.clearTimeout(hideTimer.current);
|
|
143
|
+
setScrolling(true);
|
|
144
|
+
} else if (!draggingRef.current.vertical && !draggingRef.current.horizontal) {
|
|
145
|
+
markScrolling();
|
|
146
|
+
}
|
|
147
|
+
}, [markScrolling]);
|
|
110
148
|
const setHoveredStable = useCallback((next) => {
|
|
111
149
|
setHovered(next);
|
|
112
150
|
}, []);
|
|
@@ -144,16 +182,17 @@ function useScrollAreaRootState({
|
|
|
144
182
|
viewportRef,
|
|
145
183
|
axesRef,
|
|
146
184
|
overflow,
|
|
185
|
+
hasBars,
|
|
147
186
|
aria,
|
|
148
187
|
barActive,
|
|
149
188
|
registerBar,
|
|
150
189
|
setDragging
|
|
151
190
|
}),
|
|
152
|
-
[aria, ariaLabel, ariaLabelledBy, barActive, orientation, overflow, registerBar, setDragging, viewportId, visibility]
|
|
191
|
+
[aria, ariaLabel, ariaLabelledBy, barActive, hasBars, orientation, overflow, registerBar, setDragging, viewportId, visibility]
|
|
153
192
|
);
|
|
154
193
|
return {
|
|
155
194
|
contextValue,
|
|
156
|
-
isCompound
|
|
195
|
+
isCompound,
|
|
157
196
|
setHovered: setHoveredStable,
|
|
158
197
|
setFocused: setFocusedStable
|
|
159
198
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef, useRef, useMemo } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { dataFlag, dataVariantProps, dataGroupSegment } from "../utils/dataContract.js";
|
|
5
|
+
import { readOnlyData } from "../utils/fieldFormDom.js";
|
|
6
|
+
import { useResolvedFieldInvalid, dataInvalidValue, fieldPaintStatus } from "../utils/fieldInvalid.js";
|
|
5
7
|
import { useSkinRegistryRevision } from "../../../skins/skinContext.js";
|
|
6
8
|
import { SearchInputExpandTrigger, SearchInputRipple, SearchInputIcon, SearchInputControl, SearchInputClear } from "./searchInputParts.js";
|
|
7
9
|
import { resolveSearchInputMotionDefaults, resolveSearchInputMotionParams, useSearchInputAnimations } from "./searchInputAnimations.js";
|
|
@@ -72,10 +74,11 @@ const SearchInput = forwardRef(
|
|
|
72
74
|
return resolveSearchInputMotionDefaults({
|
|
73
75
|
variant: state.variant,
|
|
74
76
|
blocked: state.blocked,
|
|
77
|
+
readOnly: state.readOnly,
|
|
75
78
|
groupSegment: state.groupSegment,
|
|
76
79
|
expanded: state.expanded
|
|
77
80
|
});
|
|
78
|
-
}, [skinRevision, state.blocked, state.expanded, state.groupSegment, state.variant]);
|
|
81
|
+
}, [skinRevision, state.blocked, state.expanded, state.groupSegment, state.readOnly, state.variant]);
|
|
79
82
|
const motionParams = useMemo(
|
|
80
83
|
() => resolveSearchInputMotionParams({
|
|
81
84
|
size: state.size,
|
|
@@ -129,10 +132,18 @@ function SearchInputSurface({
|
|
|
129
132
|
pointerInsideRef,
|
|
130
133
|
forwardedRef
|
|
131
134
|
}) {
|
|
135
|
+
const ariaInvalid = rest["aria-invalid"];
|
|
136
|
+
const isInvalid = useResolvedFieldInvalid({
|
|
137
|
+
invalid,
|
|
138
|
+
errorConnected: ariaInvalid === true || ariaInvalid === "true",
|
|
139
|
+
formInvalid: state.formInvalid
|
|
140
|
+
});
|
|
141
|
+
const status = fieldPaintStatus(isInvalid);
|
|
132
142
|
const animations = useSearchInputAnimations({
|
|
133
143
|
size: state.size,
|
|
134
144
|
expanded: state.expanded,
|
|
135
145
|
blocked: state.blocked,
|
|
146
|
+
readOnly: state.readOnly,
|
|
136
147
|
variant: state.variant,
|
|
137
148
|
groupSegment: state.groupSegment,
|
|
138
149
|
layout: state.layout,
|
|
@@ -146,6 +157,7 @@ function SearchInputSurface({
|
|
|
146
157
|
const rootClass = searchInputRootClass({
|
|
147
158
|
size: state.size,
|
|
148
159
|
variant: state.variant,
|
|
160
|
+
status,
|
|
149
161
|
expanded: state.expanded,
|
|
150
162
|
blocked: state.blocked,
|
|
151
163
|
groupSegment: state.groupSegment,
|
|
@@ -158,14 +170,17 @@ function SearchInputSurface({
|
|
|
158
170
|
{
|
|
159
171
|
ref: animations.bindRootRef,
|
|
160
172
|
role: "search",
|
|
161
|
-
...dataVariantProps({ size: state.size, variant: state.variant }),
|
|
162
|
-
"data-state": state.expanded ? "expanded" : "collapsed",
|
|
163
173
|
"data-group-segment": dataGroupSegment(state.groupSegment != null),
|
|
164
174
|
style: state.expanded ? { width: state.targetW } : void 0,
|
|
165
175
|
className: rootClass,
|
|
166
|
-
onPointerDown: () => animations.beginPressSqueeze(),
|
|
176
|
+
onPointerDown: (e) => animations.beginPressSqueeze(e),
|
|
167
177
|
onPointerEnter: animations.handlePointerEnter,
|
|
168
178
|
onPointerLeave: animations.handlePointerLeave,
|
|
179
|
+
...dataVariantProps({ size: state.size, variant: state.variant }),
|
|
180
|
+
"data-state": state.expanded ? "expanded" : "collapsed",
|
|
181
|
+
"data-invalid": dataInvalidValue(isInvalid),
|
|
182
|
+
"data-disabled": dataFlag(state.disabled),
|
|
183
|
+
"data-readonly": readOnlyData(state.readOnly),
|
|
169
184
|
children: [
|
|
170
185
|
!state.expanded ? /* @__PURE__ */ jsx(
|
|
171
186
|
SearchInputExpandTrigger,
|
|
@@ -175,11 +190,11 @@ function SearchInputSurface({
|
|
|
175
190
|
inputId: state.inputId,
|
|
176
191
|
collapseA11yLabel: state.collapseA11yLabel,
|
|
177
192
|
className: state.classNames?.expandTrigger,
|
|
178
|
-
onClick:
|
|
179
|
-
onKeyDown:
|
|
193
|
+
onClick: state.handleRootClick,
|
|
194
|
+
onKeyDown: state.handleRootKeyDown
|
|
180
195
|
}
|
|
181
196
|
) : null,
|
|
182
|
-
state.ripple ? /* @__PURE__ */ jsx(SearchInputRipple, { disabled: state.blocked }) : null,
|
|
197
|
+
state.ripple ? /* @__PURE__ */ jsx(SearchInputRipple, { disabled: state.blocked || state.readOnly }) : null,
|
|
183
198
|
/* @__PURE__ */ jsx(
|
|
184
199
|
SearchInputIcon,
|
|
185
200
|
{
|
|
@@ -206,7 +221,7 @@ function SearchInputSurface({
|
|
|
206
221
|
layout: state.layout,
|
|
207
222
|
paddingStyle: state.inputPaddingStyle,
|
|
208
223
|
className: state.classNames?.input,
|
|
209
|
-
|
|
224
|
+
isInvalid,
|
|
210
225
|
rest: { ...rest, name: state.name }
|
|
211
226
|
}
|
|
212
227
|
),
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { MutableRefObject } from 'react';
|
|
1
|
+
import { MutableRefObject, PointerEvent as ReactPointerEvent } from 'react';
|
|
2
2
|
import { SearchInputMotion, SearchInputSize, SearchInputVariant, SearchSizeLayout, UseSearchInputAnimationsProps } from './searchInputTypes.js';
|
|
3
|
-
export declare function resolveSearchInputMotionDefaults({ variant, blocked, groupSegment, expanded, }: {
|
|
3
|
+
export declare function resolveSearchInputMotionDefaults({ variant, blocked, readOnly, groupSegment, expanded, }: {
|
|
4
4
|
variant: SearchInputVariant;
|
|
5
5
|
blocked: boolean;
|
|
6
|
+
readOnly?: boolean;
|
|
6
7
|
groupSegment?: unknown;
|
|
7
8
|
expanded: boolean;
|
|
8
9
|
}): SearchInputMotion;
|
|
@@ -25,13 +26,13 @@ export declare function resolveSearchInputMotionParams({ variant, size, layout,
|
|
|
25
26
|
hasHoverShadow: boolean;
|
|
26
27
|
pointerInside: MutableRefObject<boolean>;
|
|
27
28
|
};
|
|
28
|
-
export declare function useSearchInputAnimations({ size, expanded, blocked, variant, groupSegment, layout, targetW, motion, rootRef, iconRef, pointerInsideRef, forwardedRef, }: UseSearchInputAnimationsProps): {
|
|
29
|
+
export declare function useSearchInputAnimations({ size, expanded, blocked, readOnly, variant, groupSegment, layout, targetW, motion, rootRef, iconRef, pointerInsideRef, forwardedRef, }: UseSearchInputAnimationsProps): {
|
|
29
30
|
bindRootRef: (node: HTMLDivElement | null) => void;
|
|
30
31
|
bindIconRef: (node: HTMLSpanElement | null) => void;
|
|
31
|
-
beginPressSqueeze: () => void;
|
|
32
|
+
beginPressSqueeze: (e?: ReactPointerEvent<HTMLDivElement>) => void;
|
|
32
33
|
awaitPressSqueeze: () => Promise<void>;
|
|
33
|
-
handlePointerEnter: (e:
|
|
34
|
-
handlePointerLeave: (e:
|
|
34
|
+
handlePointerEnter: (e: ReactPointerEvent<HTMLDivElement>) => void;
|
|
35
|
+
handlePointerLeave: (e: ReactPointerEvent<HTMLDivElement>) => void;
|
|
35
36
|
shellHoverMotionClass: string;
|
|
36
37
|
expandMetrics: {
|
|
37
38
|
targetW: number;
|
|
@@ -19,11 +19,12 @@ bindSearchRecipes();
|
|
|
19
19
|
function resolveSearchInputMotionDefaults({
|
|
20
20
|
variant,
|
|
21
21
|
blocked,
|
|
22
|
+
readOnly = false,
|
|
22
23
|
groupSegment,
|
|
23
24
|
expanded
|
|
24
25
|
}) {
|
|
25
26
|
const hover = !blocked && groupSegment == null;
|
|
26
|
-
const press = !blocked && !expanded && groupSegment == null;
|
|
27
|
+
const press = !blocked && !readOnly && !expanded && groupSegment == null;
|
|
27
28
|
return overlaySkinMotion(
|
|
28
29
|
{
|
|
29
30
|
root: {
|
|
@@ -70,6 +71,7 @@ function useSearchInputAnimations({
|
|
|
70
71
|
size,
|
|
71
72
|
expanded,
|
|
72
73
|
blocked,
|
|
74
|
+
readOnly = false,
|
|
73
75
|
variant,
|
|
74
76
|
groupSegment,
|
|
75
77
|
layout,
|
|
@@ -191,23 +193,26 @@ function useSearchInputAnimations({
|
|
|
191
193
|
),
|
|
192
194
|
[motionPointer.onPointerOut, motionPointer.onPointerOver]
|
|
193
195
|
);
|
|
194
|
-
const beginPressSqueeze = useCallback(
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
196
|
+
const beginPressSqueeze = useCallback(
|
|
197
|
+
(e) => {
|
|
198
|
+
if (blocked || readOnly || expanded || e?.pointerType === "touch") return;
|
|
199
|
+
const shell = rootRef.current;
|
|
200
|
+
if (!shell || prefersReducedMotion()) {
|
|
201
|
+
squeezePromiseRef.current = Promise.resolve();
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
const pressIn = scope.resolve("root", "pressIn", rootMotionRef.current);
|
|
205
|
+
if (pressIn === false || pressIn === void 0) {
|
|
206
|
+
squeezePromiseRef.current = Promise.resolve();
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
squeezePromiseRef.current = scope.play("root", "pressIn", {
|
|
210
|
+
partMotion: rootMotionRef.current,
|
|
211
|
+
el: shell
|
|
212
|
+
}).finished;
|
|
213
|
+
},
|
|
214
|
+
[blocked, expanded, readOnly, rootRef, scope]
|
|
215
|
+
);
|
|
211
216
|
const awaitPressSqueeze = useCallback(async () => {
|
|
212
217
|
await (squeezePromiseRef.current ?? Promise.resolve());
|
|
213
218
|
squeezePromiseRef.current = null;
|
|
@@ -17,7 +17,7 @@ export declare function SearchInputIcon({ bindIconRef, layout, className, }: {
|
|
|
17
17
|
layout: SearchSizeLayout;
|
|
18
18
|
className?: string;
|
|
19
19
|
}): import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
export declare function SearchInputControl({ inputRef, id, disabled, readOnly, placeholder, value, defaultValue, onChange, onBlur, onKeyDown, expanded, ariaLabel, layout, paddingStyle, className,
|
|
20
|
+
export declare function SearchInputControl({ inputRef, id, disabled, readOnly, placeholder, value, defaultValue, onChange, onBlur, onKeyDown, expanded, ariaLabel, layout, paddingStyle, className, isInvalid, rest, }: {
|
|
21
21
|
inputRef: Ref<HTMLInputElement>;
|
|
22
22
|
id: string;
|
|
23
23
|
disabled?: boolean;
|
|
@@ -33,7 +33,7 @@ export declare function SearchInputControl({ inputRef, id, disabled, readOnly, p
|
|
|
33
33
|
layout: SearchSizeLayout;
|
|
34
34
|
paddingStyle?: CSSProperties;
|
|
35
35
|
className?: string;
|
|
36
|
-
|
|
36
|
+
isInvalid: boolean;
|
|
37
37
|
rest: Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "id" | "disabled" | "readOnly" | "placeholder" | "value" | "defaultValue" | "onChange" | "onBlur" | "onKeyDown" | "className" | "aria-label">;
|
|
38
38
|
}): import("react/jsx-runtime").JSX.Element;
|
|
39
39
|
export declare function SearchInputClear({ layout, onClick, className, }: {
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { KitSearch, KitClose } from "../utils/kitIcons.js";
|
|
4
|
+
import { dataFlag } from "../utils/dataContract.js";
|
|
5
|
+
import { readOnlyData } from "../utils/fieldFormDom.js";
|
|
6
|
+
import { dataInvalidValue, ariaInvalidValue } from "../utils/fieldInvalid.js";
|
|
4
7
|
import { mergeRefs } from "../utils/mergeRefs.js";
|
|
5
8
|
import { useBurneLabel } from "../../../theme/BurneLabelsProvider.js";
|
|
6
|
-
import { resolveFieldInvalid } from "../utils/fieldInvalid.js";
|
|
7
9
|
import { searchInputClearA11yLabel } from "./searchInputA11y.js";
|
|
8
10
|
import { useOptionalSearchInputMotionScope } from "./searchInputContext.js";
|
|
9
11
|
import { SEARCH_INPUT_EXPAND_TRIGGER_CLASS, searchInputIconClass, searchInputIconWrapClass, searchInputControlClass, searchInputClearIconClass, searchInputClearClass } from "./searchInputStyles.js";
|
|
@@ -81,19 +83,26 @@ function SearchInputControl({
|
|
|
81
83
|
layout,
|
|
82
84
|
paddingStyle,
|
|
83
85
|
className,
|
|
84
|
-
|
|
86
|
+
isInvalid,
|
|
85
87
|
rest
|
|
86
88
|
}) {
|
|
89
|
+
const {
|
|
90
|
+
"aria-invalid": _ariaInvalid,
|
|
91
|
+
onPointerOver,
|
|
92
|
+
onPointerOut,
|
|
93
|
+
onPointerDown,
|
|
94
|
+
onPointerUp,
|
|
95
|
+
...inputRest
|
|
96
|
+
} = rest;
|
|
87
97
|
const { setRef, pointerHandlers } = useMotionPart({
|
|
88
98
|
scope: useOptionalSearchInputMotionScope(),
|
|
89
99
|
slot: "input",
|
|
90
100
|
forwardedRef: inputRef,
|
|
91
|
-
pointerPhases: true
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
error: ariaInvalid === true || ariaInvalid === "true" ? true : void 0
|
|
101
|
+
pointerPhases: true,
|
|
102
|
+
onPointerOver,
|
|
103
|
+
onPointerOut,
|
|
104
|
+
onPointerDown,
|
|
105
|
+
onPointerUp
|
|
97
106
|
});
|
|
98
107
|
return /* @__PURE__ */ jsx(
|
|
99
108
|
"input",
|
|
@@ -119,8 +128,10 @@ function SearchInputControl({
|
|
|
119
128
|
style: paddingStyle,
|
|
120
129
|
...inputRest,
|
|
121
130
|
...pointerHandlers,
|
|
122
|
-
"aria-invalid": isInvalid
|
|
123
|
-
"data-invalid": isInvalid
|
|
131
|
+
"aria-invalid": ariaInvalidValue(isInvalid),
|
|
132
|
+
"data-invalid": dataInvalidValue(isInvalid),
|
|
133
|
+
"data-disabled": dataFlag(disabled),
|
|
134
|
+
"data-readonly": readOnlyData(readOnly)
|
|
124
135
|
}
|
|
125
136
|
);
|
|
126
137
|
}
|
|
@@ -142,6 +153,7 @@ function SearchInputClear({
|
|
|
142
153
|
ref: setRef,
|
|
143
154
|
type: "button",
|
|
144
155
|
"aria-label": searchInputClearA11yLabel(clearLabel),
|
|
156
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
145
157
|
onClick,
|
|
146
158
|
className: searchInputClearClass(className),
|
|
147
159
|
style: {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ButtonGroupSegment } from '../../composite/ButtonGroup/buttonGroupTypes.js';
|
|
2
2
|
import { ComponentSize } from '../utils/sizeLayout/index.js';
|
|
3
|
+
import { FieldShellStatus } from '../utils/fieldShellVariant.js';
|
|
3
4
|
import { SearchInputSize, SearchInputVariant, SearchSizeLayout } from './searchInputTypes.js';
|
|
4
5
|
export declare const SEARCH_INPUT_EXPAND_TRIGGER_CLASS = "absolute inset-0 z-[2] m-0 cursor-pointer border-0 bg-transparent p-0 outline-none focus-ring-inset rounded-[inherit]";
|
|
5
|
-
export declare const SEARCH_INPUT_ICON_WRAP_CLASS = "pointer-events-none absolute inset-y-0 z-[1] flex shrink-0 items-center justify-center text-muted";
|
|
6
|
+
export declare const SEARCH_INPUT_ICON_WRAP_CLASS = "pointer-events-none absolute inset-y-0 z-[1] flex shrink-0 items-center justify-center text-muted-foreground";
|
|
6
7
|
export declare const SEARCH_INPUT_ICON_CLASS = "shrink-0";
|
|
7
|
-
export declare const SEARCH_INPUT_CONTROL_BASE_CLASS = "box-border min-h-0 w-full border-0 bg-transparent text-foreground outline-none placeholder:text-muted [&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none disabled:cursor-not-allowed disabled:opacity-100";
|
|
8
|
+
export declare const SEARCH_INPUT_CONTROL_BASE_CLASS = "box-border min-h-0 w-full border-0 bg-transparent text-foreground outline-none placeholder:text-muted-foreground [&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none disabled:cursor-not-allowed disabled:opacity-100";
|
|
8
9
|
export declare const SEARCH_INPUT_CONTROL_EXPANDED_CLASS = "pointer-events-auto absolute inset-0 z-[2] opacity-100";
|
|
9
10
|
export declare const SEARCH_INPUT_CONTROL_COLLAPSED_CLASS = "pointer-events-none absolute inset-0 z-[2] opacity-0";
|
|
10
11
|
export declare const SEARCH_INPUT_CLEAR_BUTTON_CLASS = "absolute top-1/2 z-[3] flex -translate-y-1/2 items-center justify-center rounded-full border-0 bg-transparent p-0 text-foreground outline-none focus-ring-inset cursor-pointer";
|
|
@@ -20,9 +21,10 @@ export declare function resolveSearchLayout(size: ComponentSize): SearchSizeLayo
|
|
|
20
21
|
/** Border radius in px for expanded SearchInput — reads `--radius-*` from `:root`. */
|
|
21
22
|
export declare function readSearchExpandedRadiusPx(size: ComponentSize, rootPx?: number): number;
|
|
22
23
|
export declare function searchInputGroupShellClass(segment: ButtonGroupSegment): string;
|
|
23
|
-
export declare function searchInputRootClass({ size, variant, expanded, blocked, groupSegment, shellHoverMotionClass, className, slotRoot, }: {
|
|
24
|
+
export declare function searchInputRootClass({ size, variant, status, expanded, blocked, groupSegment, shellHoverMotionClass, className, slotRoot, }: {
|
|
24
25
|
size: SearchInputSize;
|
|
25
26
|
variant: SearchInputVariant;
|
|
27
|
+
status?: FieldShellStatus;
|
|
26
28
|
expanded: boolean;
|
|
27
29
|
blocked: boolean;
|
|
28
30
|
groupSegment?: ButtonGroupSegment;
|
|
@@ -2,15 +2,15 @@ import { buttonGroupSegmentSurfaceClasses, buttonGroupRoundingClasses } from "..
|
|
|
2
2
|
import { FIELD_CONTROL_MOBILE_NO_ZOOM_CLASS } from "../utils/fieldControlMobileNoZoom.js";
|
|
3
3
|
import { FIELD_SHELL_VARIANT_BG_CLASS } from "../utils/fieldShellVariant.js";
|
|
4
4
|
import { hoverVariant, TEXT_COLOR_TRANSITION } from "../utils/hoverVariant.js";
|
|
5
|
-
import { fieldShellHoverClass,
|
|
5
|
+
import { fieldShellHoverClass, fieldShellFocusRingClass, FIELD_SHELL_TRANSITION_CLASS } from "../utils/useFieldShellHoverLift.js";
|
|
6
6
|
import { cn } from "../../../utils/cn.js";
|
|
7
7
|
import { resolveVariantVisual, usesKitElevation } from "../../../skins/resolveVariantVisual.js";
|
|
8
8
|
import { KIT_SEARCH_INPUT_VARIANTS } from "./searchInputTypes.js";
|
|
9
9
|
import { CONTROL_SIZE_LAYOUT } from "../utils/sizeLayout/control.js";
|
|
10
10
|
const SEARCH_INPUT_EXPAND_TRIGGER_CLASS = "absolute inset-0 z-[2] m-0 cursor-pointer border-0 bg-transparent p-0 outline-none focus-ring-inset rounded-[inherit]";
|
|
11
|
-
const SEARCH_INPUT_ICON_WRAP_CLASS = "pointer-events-none absolute inset-y-0 z-[1] flex shrink-0 items-center justify-center text-muted";
|
|
11
|
+
const SEARCH_INPUT_ICON_WRAP_CLASS = "pointer-events-none absolute inset-y-0 z-[1] flex shrink-0 items-center justify-center text-muted-foreground";
|
|
12
12
|
const SEARCH_INPUT_ICON_CLASS = "shrink-0";
|
|
13
|
-
const SEARCH_INPUT_CONTROL_BASE_CLASS = "box-border min-h-0 w-full border-0 bg-transparent text-foreground outline-none placeholder:text-muted [&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none disabled:cursor-not-allowed disabled:opacity-100";
|
|
13
|
+
const SEARCH_INPUT_CONTROL_BASE_CLASS = "box-border min-h-0 w-full border-0 bg-transparent text-foreground outline-none placeholder:text-muted-foreground [&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none disabled:cursor-not-allowed disabled:opacity-100";
|
|
14
14
|
const SEARCH_INPUT_CONTROL_EXPANDED_CLASS = "pointer-events-auto absolute inset-0 z-[2] opacity-100";
|
|
15
15
|
const SEARCH_INPUT_CONTROL_COLLAPSED_CLASS = "pointer-events-none absolute inset-0 z-[2] opacity-0";
|
|
16
16
|
const SEARCH_INPUT_CLEAR_BUTTON_CLASS = "absolute top-1/2 z-[3] flex -translate-y-1/2 items-center justify-center rounded-full border-0 bg-transparent p-0 text-foreground outline-none focus-ring-inset cursor-pointer";
|
|
@@ -130,6 +130,7 @@ function searchInputGroupShellClass(segment) {
|
|
|
130
130
|
function searchInputRootClass({
|
|
131
131
|
size,
|
|
132
132
|
variant,
|
|
133
|
+
status = "default",
|
|
133
134
|
expanded,
|
|
134
135
|
blocked,
|
|
135
136
|
groupSegment,
|
|
@@ -150,8 +151,8 @@ function searchInputRootClass({
|
|
|
150
151
|
visual.className,
|
|
151
152
|
kitSurface && cn(SEARCH_INPUT_ROOT_BORDER_CLASS, FIELD_SHELL_VARIANT_BG_CLASS[filledVariant]),
|
|
152
153
|
FIELD_SHELL_TRANSITION_CLASS,
|
|
153
|
-
|
|
154
|
-
kitSurface && fieldShellHoverClass(!blocked,
|
|
154
|
+
fieldShellFocusRingClass(status),
|
|
155
|
+
kitSurface && fieldShellHoverClass(!blocked, status, filledVariant),
|
|
155
156
|
shellHoverMotionClass,
|
|
156
157
|
expanded ? SEARCH_INPUT_CURSOR_TEXT_CLASS : "",
|
|
157
158
|
!expanded && !blocked ? SEARCH_INPUT_CURSOR_POINTER_CLASS : "",
|
|
@@ -16,7 +16,7 @@ export declare function useSearchInputRootState({ size: sizeProp, variant: varia
|
|
|
16
16
|
placeholder: string;
|
|
17
17
|
valueProp: string | number | readonly string[] | undefined;
|
|
18
18
|
defaultValue: string | number | readonly string[] | undefined;
|
|
19
|
-
disabled: boolean
|
|
19
|
+
disabled: boolean;
|
|
20
20
|
readOnly: boolean;
|
|
21
21
|
formInvalid: boolean;
|
|
22
22
|
name: string | undefined;
|
|
@@ -38,9 +38,9 @@ export declare function useSearchInputRootState({ size: sizeProp, variant: varia
|
|
|
38
38
|
setInputRef: (node: HTMLInputElement | null) => void;
|
|
39
39
|
handleInputChange: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
40
40
|
handleClearClick: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
41
|
-
handleRootClick: (e: MouseEvent<HTMLButtonElement
|
|
41
|
+
handleRootClick: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
42
42
|
handleInputBlur: (e: FocusEvent<HTMLInputElement>) => void;
|
|
43
|
-
handleRootKeyDown: (e: KeyboardEvent<HTMLButtonElement
|
|
43
|
+
handleRootKeyDown: (e: KeyboardEvent<HTMLButtonElement>) => void;
|
|
44
44
|
handleInputKeyDown: (e: KeyboardEvent<HTMLInputElement>) => void;
|
|
45
45
|
rootRef: import('react').RefObject<HTMLDivElement | null>;
|
|
46
46
|
iconRef: import('react').RefObject<HTMLSpanElement | null>;
|