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,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useId, useRef,
|
|
2
|
+
import { useId, useRef, useCallback, useMemo } from "react";
|
|
3
3
|
import { useControllableState } from "../utils/useControllableState.js";
|
|
4
4
|
import { useSkinVariant } from "../../../skins/skinContext.js";
|
|
5
5
|
function useTabsRootState({
|
|
@@ -20,7 +20,7 @@ function useTabsRootState({
|
|
|
20
20
|
defaultValue: defaultValue ?? null
|
|
21
21
|
});
|
|
22
22
|
const tabElementsRef = useRef(/* @__PURE__ */ new Map());
|
|
23
|
-
const
|
|
23
|
+
const layoutListenersRef = useRef(/* @__PURE__ */ new Set());
|
|
24
24
|
const setValue = useCallback(
|
|
25
25
|
(next) => {
|
|
26
26
|
setInternalValue(next);
|
|
@@ -28,8 +28,16 @@ function useTabsRootState({
|
|
|
28
28
|
},
|
|
29
29
|
[onValueChange, setInternalValue]
|
|
30
30
|
);
|
|
31
|
+
const subscribeTabLayout = useCallback((listener) => {
|
|
32
|
+
layoutListenersRef.current.add(listener);
|
|
33
|
+
return () => {
|
|
34
|
+
layoutListenersRef.current.delete(listener);
|
|
35
|
+
};
|
|
36
|
+
}, []);
|
|
31
37
|
const notifyTabLayout = useCallback(() => {
|
|
32
|
-
|
|
38
|
+
for (const listener of layoutListenersRef.current) {
|
|
39
|
+
listener();
|
|
40
|
+
}
|
|
33
41
|
}, []);
|
|
34
42
|
const contextValue = useMemo(
|
|
35
43
|
() => ({
|
|
@@ -43,7 +51,7 @@ function useTabsRootState({
|
|
|
43
51
|
activationMode,
|
|
44
52
|
keepMounted,
|
|
45
53
|
tabElementsRef,
|
|
46
|
-
|
|
54
|
+
subscribeTabLayout,
|
|
47
55
|
notifyTabLayout
|
|
48
56
|
}),
|
|
49
57
|
[
|
|
@@ -57,7 +65,7 @@ function useTabsRootState({
|
|
|
57
65
|
activationMode,
|
|
58
66
|
keepMounted,
|
|
59
67
|
tabElementsRef,
|
|
60
|
-
|
|
68
|
+
subscribeTabLayout,
|
|
61
69
|
notifyTabLayout
|
|
62
70
|
]
|
|
63
71
|
);
|
|
@@ -85,6 +85,17 @@ const TagsInputRoot = forwardRef(function TagsInputRoot2({
|
|
|
85
85
|
}),
|
|
86
86
|
[resolvedVariant, state.contextValue.disabled]
|
|
87
87
|
);
|
|
88
|
+
const {
|
|
89
|
+
"aria-label": ariaLabel,
|
|
90
|
+
"aria-labelledby": ariaLabelledBy,
|
|
91
|
+
"aria-describedby": ariaDescribedBy,
|
|
92
|
+
...rootRest
|
|
93
|
+
} = rest;
|
|
94
|
+
const simpleAriaProps = {
|
|
95
|
+
...ariaLabel !== void 0 ? { "aria-label": ariaLabel } : void 0,
|
|
96
|
+
...ariaLabelledBy !== void 0 ? { "aria-labelledby": ariaLabelledBy } : void 0,
|
|
97
|
+
...ariaDescribedBy !== void 0 ? { "aria-describedby": ariaDescribedBy } : void 0
|
|
98
|
+
};
|
|
88
99
|
return /* @__PURE__ */ jsx(TagsInputProvider, { value: state.contextValue, children: /* @__PURE__ */ jsx(TagsInputClassNamesProvider, { classNames, children: /* @__PURE__ */ jsx(
|
|
89
100
|
TagsInputMotionProvider,
|
|
90
101
|
{
|
|
@@ -100,7 +111,7 @@ const TagsInputRoot = forwardRef(function TagsInputRoot2({
|
|
|
100
111
|
{
|
|
101
112
|
size,
|
|
102
113
|
className: cn(TAGS_INPUT_ROOT_CLASS, classNames?.root, className),
|
|
103
|
-
...rest,
|
|
114
|
+
...state.isCompound ? rest : rootRest,
|
|
104
115
|
ref: mergeRefs(ref, focusRef),
|
|
105
116
|
...dataVariantProps({
|
|
106
117
|
size,
|
|
@@ -110,7 +121,7 @@ const TagsInputRoot = forwardRef(function TagsInputRoot2({
|
|
|
110
121
|
"data-disabled": dataFlag(state.contextValue.disabled),
|
|
111
122
|
"data-readonly": dataFlag(state.contextValue.readOnly),
|
|
112
123
|
"data-required": dataFlag(state.contextValue.required),
|
|
113
|
-
children: state.isCompound ? /* @__PURE__ */ jsx(TagsInputCompoundBody, { children }) : /* @__PURE__ */ jsx(TagsInputSimpleBody, {})
|
|
124
|
+
children: state.isCompound ? /* @__PURE__ */ jsx(TagsInputCompoundBody, { children }) : /* @__PURE__ */ jsx(TagsInputSimpleBody, { inputAriaProps: simpleAriaProps })
|
|
114
125
|
}
|
|
115
126
|
) })
|
|
116
127
|
}
|
|
@@ -30,6 +30,8 @@ export declare const TagsInput: import('react').ForwardRefExoticComponent<Omit<i
|
|
|
30
30
|
Shell: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
|
|
31
31
|
inputRef?: import('react').Ref<HTMLInputElement>;
|
|
32
32
|
motion?: import('../../../index.js').Prettify<import('./tagsInputTypes.js').TagsInputPartMotion>;
|
|
33
|
+
} & {
|
|
34
|
+
inputAriaProps?: Pick<import('react').AriaAttributes, "aria-label" | "aria-labelledby" | "aria-describedby">;
|
|
33
35
|
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
34
36
|
Tag: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLSpanElement> & {
|
|
35
37
|
motion?: import('../../../index.js').Prettify<import('./tagsInputTypes.js').TagsInputPartMotion>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { AriaAttributes, ReactNode } from 'react';
|
|
2
2
|
export declare const TagsInputTag: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLSpanElement> & {
|
|
3
3
|
motion?: import('../../../index.js').Prettify<import('./tagsInputTypes.js').TagsInputPartMotion>;
|
|
4
4
|
} & import('react').RefAttributes<HTMLSpanElement>>;
|
|
@@ -9,6 +9,8 @@ export declare const TagsInputRemove: import('react').ForwardRefExoticComponent<
|
|
|
9
9
|
export declare const TagsInputShell: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
|
|
10
10
|
inputRef?: import('react').Ref<HTMLInputElement>;
|
|
11
11
|
motion?: import('../../../index.js').Prettify<import('./tagsInputTypes.js').TagsInputPartMotion>;
|
|
12
|
+
} & {
|
|
13
|
+
inputAriaProps?: Pick<AriaAttributes, "aria-label" | "aria-labelledby" | "aria-describedby">;
|
|
12
14
|
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
13
15
|
export declare const TagsInputLabel: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLElement> & {
|
|
14
16
|
children?: ReactNode;
|
|
@@ -22,7 +24,9 @@ export declare const TagsInputError: import('react').ForwardRefExoticComponent<i
|
|
|
22
24
|
children?: ReactNode;
|
|
23
25
|
motion?: import('../../../index.js').Prettify<import('./tagsInputTypes.js').TagsInputPartMotion>;
|
|
24
26
|
} & import('react').RefAttributes<HTMLElement>>;
|
|
25
|
-
export declare function TagsInputSimpleBody(
|
|
27
|
+
export declare function TagsInputSimpleBody({ inputAriaProps, }?: {
|
|
28
|
+
inputAriaProps?: Pick<AriaAttributes, "aria-label" | "aria-labelledby" | "aria-describedby">;
|
|
29
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
26
30
|
export declare function TagsInputCompoundBody({ children }: {
|
|
27
31
|
children?: ReactNode;
|
|
28
32
|
}): ReactNode;
|
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef, useRef } from "react";
|
|
4
4
|
import { Field } from "../Field/index.js";
|
|
5
|
+
import { joinFieldDescribedBy } from "../Field/fieldA11y.js";
|
|
6
|
+
import { dataFlag } from "../utils/dataContract.js";
|
|
7
|
+
import { isImeComposingEvent, isInteractiveDescendantTarget } from "../utils/fieldFormDom.js";
|
|
5
8
|
import { KitClose } from "../utils/kitIcons.js";
|
|
6
|
-
import { ariaInvalidValue, fieldPaintStatus } from "../utils/fieldInvalid.js";
|
|
9
|
+
import { dataInvalidValue, ariaInvalidValue, fieldPaintStatus } from "../utils/fieldInvalid.js";
|
|
7
10
|
import { cn } from "../../../utils/cn.js";
|
|
8
11
|
import { tagsInputRemoveLabel } from "./tagsInputA11y.js";
|
|
9
12
|
import { tagsInputPieces } from "./tagsInputAPI.js";
|
|
@@ -49,6 +52,8 @@ const TagsInputRemove = forwardRef(
|
|
|
49
52
|
children,
|
|
50
53
|
motion,
|
|
51
54
|
onClick,
|
|
55
|
+
onBlur,
|
|
56
|
+
onMouseDown,
|
|
52
57
|
onPointerOver,
|
|
53
58
|
onPointerOut,
|
|
54
59
|
onPointerDown,
|
|
@@ -74,6 +79,18 @@ const TagsInputRemove = forwardRef(
|
|
|
74
79
|
className: tagsInputRemoveClass(cn(slotClassNames.remove, className)),
|
|
75
80
|
"aria-label": tagsInputRemoveLabel(value),
|
|
76
81
|
disabled: locked,
|
|
82
|
+
onMouseDown: (event) => {
|
|
83
|
+
onMouseDown?.(event);
|
|
84
|
+
if (!event.defaultPrevented) event.preventDefault();
|
|
85
|
+
},
|
|
86
|
+
onBlur: (event) => {
|
|
87
|
+
onBlur?.(event);
|
|
88
|
+
const related = event.relatedTarget;
|
|
89
|
+
const shellEl = event.currentTarget.closest('[data-skin-slot*="tagsInput.shell"]');
|
|
90
|
+
if (!shellEl || !related || !shellEl.contains(related)) {
|
|
91
|
+
field.notifyBlur?.();
|
|
92
|
+
}
|
|
93
|
+
},
|
|
77
94
|
onClick: (event) => {
|
|
78
95
|
onClick?.(event);
|
|
79
96
|
if (event.defaultPrevented) return;
|
|
@@ -97,6 +114,7 @@ function TagsInputChip({ value }) {
|
|
|
97
114
|
const TagsInputShell = forwardRef(function TagsInputShell2({
|
|
98
115
|
className,
|
|
99
116
|
inputRef,
|
|
117
|
+
inputAriaProps,
|
|
100
118
|
motion,
|
|
101
119
|
onPointerOver,
|
|
102
120
|
onPointerOut,
|
|
@@ -106,7 +124,9 @@ const TagsInputShell = forwardRef(function TagsInputShell2({
|
|
|
106
124
|
}, ref) {
|
|
107
125
|
const field = useTagsInputContext();
|
|
108
126
|
const slotClassNames = useTagsInputClassNames();
|
|
127
|
+
const shellLocalRef = useRef(null);
|
|
109
128
|
const draftInputRef = useRef(null);
|
|
129
|
+
const composingRef = useRef(false);
|
|
110
130
|
const inputPart = useTagsInputSlotMotion("control");
|
|
111
131
|
const draft = field.inputValue;
|
|
112
132
|
const setDraft = field.setInputValue;
|
|
@@ -117,14 +137,21 @@ const TagsInputShell = forwardRef(function TagsInputShell2({
|
|
|
117
137
|
onPointerOut,
|
|
118
138
|
onPointerDown: (event) => {
|
|
119
139
|
onPointerDown?.(event);
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
if (
|
|
123
|
-
|
|
140
|
+
if (event.defaultPrevented || field.disabled) return;
|
|
141
|
+
const inputEl = draftInputRef.current;
|
|
142
|
+
if (!inputEl) return;
|
|
143
|
+
if (isInteractiveDescendantTarget(event.target, inputEl)) return;
|
|
144
|
+
if (event.target !== inputEl) {
|
|
145
|
+
event.preventDefault();
|
|
146
|
+
if (!field.atMax && document.activeElement !== inputEl) {
|
|
147
|
+
inputEl.focus();
|
|
148
|
+
}
|
|
149
|
+
}
|
|
124
150
|
},
|
|
125
151
|
onPointerUp
|
|
126
152
|
});
|
|
127
153
|
function commit(raw) {
|
|
154
|
+
if (field.disabled || field.readOnly) return;
|
|
128
155
|
const tag = raw.trim();
|
|
129
156
|
if (!tag) {
|
|
130
157
|
setDraft("");
|
|
@@ -134,6 +161,7 @@ const TagsInputShell = forwardRef(function TagsInputShell2({
|
|
|
134
161
|
setDraft("");
|
|
135
162
|
}
|
|
136
163
|
function onDraftChange(value) {
|
|
164
|
+
if (field.disabled || field.readOnly) return;
|
|
137
165
|
const pieces = tagsInputPieces(value);
|
|
138
166
|
if (pieces.committed.length > 0) field.append(pieces.committed);
|
|
139
167
|
setDraft(pieces.rest);
|
|
@@ -141,7 +169,11 @@ const TagsInputShell = forwardRef(function TagsInputShell2({
|
|
|
141
169
|
return /* @__PURE__ */ jsxs(
|
|
142
170
|
"div",
|
|
143
171
|
{
|
|
144
|
-
ref:
|
|
172
|
+
ref: (node) => {
|
|
173
|
+
shellLocalRef.current = node;
|
|
174
|
+
shell.setRef(node);
|
|
175
|
+
field.registerShellRef?.(node);
|
|
176
|
+
},
|
|
145
177
|
className: tagsInputShellClass({
|
|
146
178
|
size: field.size,
|
|
147
179
|
variant: field.variant,
|
|
@@ -160,6 +192,7 @@ const TagsInputShell = forwardRef(function TagsInputShell2({
|
|
|
160
192
|
ref: (node) => {
|
|
161
193
|
draftInputRef.current = node;
|
|
162
194
|
inputPart.setRef(node);
|
|
195
|
+
field.setInputNodeRef?.(node);
|
|
163
196
|
if (typeof inputRef === "function") inputRef(node);
|
|
164
197
|
else if (inputRef) inputRef.current = node;
|
|
165
198
|
},
|
|
@@ -170,19 +203,51 @@ const TagsInputShell = forwardRef(function TagsInputShell2({
|
|
|
170
203
|
disabled: field.disabled || field.atMax,
|
|
171
204
|
readOnly: field.readOnly,
|
|
172
205
|
required: field.required && field.values.length === 0,
|
|
173
|
-
"aria-
|
|
174
|
-
"aria-
|
|
175
|
-
"aria-describedby":
|
|
176
|
-
|
|
177
|
-
|
|
206
|
+
"aria-label": inputAriaProps?.["aria-label"],
|
|
207
|
+
"aria-labelledby": inputAriaProps?.["aria-labelledby"] ?? (field.labelled ? field.labelId : void 0),
|
|
208
|
+
"aria-describedby": joinFieldDescribedBy(
|
|
209
|
+
field.describedBy,
|
|
210
|
+
inputAriaProps?.["aria-describedby"]
|
|
211
|
+
),
|
|
212
|
+
onCompositionStart: () => {
|
|
213
|
+
composingRef.current = true;
|
|
214
|
+
},
|
|
215
|
+
onCompositionEnd: (event) => {
|
|
216
|
+
composingRef.current = false;
|
|
217
|
+
onDraftChange(event.currentTarget.value);
|
|
218
|
+
},
|
|
219
|
+
onChange: (event) => {
|
|
220
|
+
if (composingRef.current) {
|
|
221
|
+
setDraft(event.target.value);
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
onDraftChange(event.target.value);
|
|
225
|
+
},
|
|
226
|
+
onBlur: (event) => {
|
|
227
|
+
const shellEl = shellLocalRef.current;
|
|
228
|
+
const related = event.relatedTarget;
|
|
229
|
+
if (shellEl && related && shellEl.contains(related)) return;
|
|
230
|
+
if (!composingRef.current) {
|
|
231
|
+
commit(draft);
|
|
232
|
+
}
|
|
233
|
+
field.notifyBlur?.();
|
|
234
|
+
},
|
|
178
235
|
onKeyDown: (event) => {
|
|
236
|
+
if (isImeComposingEvent(event) || composingRef.current || field.disabled || field.readOnly) {
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
179
239
|
if (event.key === "Enter") {
|
|
180
240
|
event.preventDefault();
|
|
181
241
|
commit(draft);
|
|
182
242
|
}
|
|
183
243
|
if (event.key === "Backspace" && draft === "") field.removeLast();
|
|
184
244
|
},
|
|
185
|
-
...inputPart.pointerHandlers
|
|
245
|
+
...inputPart.pointerHandlers,
|
|
246
|
+
"aria-invalid": ariaInvalidValue(field.isInvalid),
|
|
247
|
+
"data-invalid": dataInvalidValue(field.isInvalid),
|
|
248
|
+
"data-disabled": dataFlag(field.disabled),
|
|
249
|
+
"data-readonly": dataFlag(field.readOnly),
|
|
250
|
+
"data-required": dataFlag(field.required && field.values.length === 0)
|
|
186
251
|
}
|
|
187
252
|
),
|
|
188
253
|
field.name ? field.values.map((value) => /* @__PURE__ */ jsx("input", { type: "hidden", name: field.name, value }, `value-${value}`)) : null
|
|
@@ -293,11 +358,13 @@ const TagsInputError = forwardRef(function TagsInputError2({
|
|
|
293
358
|
);
|
|
294
359
|
});
|
|
295
360
|
TagsInputError.displayName = "TagsInputError";
|
|
296
|
-
function TagsInputSimpleBody(
|
|
361
|
+
function TagsInputSimpleBody({
|
|
362
|
+
inputAriaProps
|
|
363
|
+
} = {}) {
|
|
297
364
|
const field = useTagsInputContext();
|
|
298
365
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
299
366
|
field.label != null ? /* @__PURE__ */ jsx(TagsInputLabel, {}) : null,
|
|
300
|
-
/* @__PURE__ */ jsx(TagsInputShell, {}),
|
|
367
|
+
/* @__PURE__ */ jsx(TagsInputShell, { inputAriaProps }),
|
|
301
368
|
field.hint != null ? /* @__PURE__ */ jsx(TagsInputHint, {}) : null,
|
|
302
369
|
field.error != null ? /* @__PURE__ */ jsx(TagsInputError, {}) : null
|
|
303
370
|
] });
|
|
@@ -71,13 +71,13 @@ function tagsInputTagTextClass(slotClass) {
|
|
|
71
71
|
}
|
|
72
72
|
function tagsInputRemoveClass(slotClass) {
|
|
73
73
|
return cn(
|
|
74
|
-
"icon-slot inline-flex size-[1em] shrink-0 items-center justify-center rounded-full p-0 text-muted focus-ring-inset",
|
|
74
|
+
"icon-slot inline-flex size-[1em] shrink-0 items-center justify-center rounded-full p-0 text-muted-foreground focus-ring-inset",
|
|
75
75
|
slotClass
|
|
76
76
|
);
|
|
77
77
|
}
|
|
78
78
|
function tagsInputFieldClass(slotClass) {
|
|
79
79
|
return cn(
|
|
80
|
-
"min-w-[6rem] flex-1 border-0 bg-transparent p-0 text-foreground outline-none placeholder:text-muted",
|
|
80
|
+
"min-w-[6rem] flex-1 border-0 bg-transparent p-0 text-foreground outline-none placeholder:text-muted-foreground",
|
|
81
81
|
FIELD_CONTROL_MOBILE_NO_ZOOM_CLASS,
|
|
82
82
|
slotClass
|
|
83
83
|
);
|
|
@@ -111,4 +111,7 @@ export type TagsInputContextValue = {
|
|
|
111
111
|
required: boolean;
|
|
112
112
|
isInvalid: boolean;
|
|
113
113
|
describedBy?: string;
|
|
114
|
+
setInputNodeRef?: (node: HTMLInputElement | null) => void;
|
|
115
|
+
registerShellRef?: (node: HTMLDivElement | null) => void;
|
|
116
|
+
notifyBlur?: () => void;
|
|
114
117
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useId,
|
|
3
|
-
import {
|
|
2
|
+
import { useId, useMemo, useState, useRef, useCallback } from "react";
|
|
3
|
+
import { useFormFieldBinding } from "../../composite/Form/useFormFieldBinding.js";
|
|
4
|
+
import { useNativeFormReset } from "../utils/fieldFormDom.js";
|
|
4
5
|
import { hasCompoundChild } from "../utils/hasCompoundChild.js";
|
|
5
6
|
import { hasCompoundChildren } from "../utils/hasCompoundChildren.js";
|
|
6
|
-
import { useControllableState } from "../utils/useControllableState.js";
|
|
7
7
|
import { useResolvedFieldInvalid } from "../utils/fieldInvalid.js";
|
|
8
8
|
import { tagsInputDescribedBy, tagsInputFieldIds } from "./tagsInputA11y.js";
|
|
9
9
|
import { tagsFromFormValue, tagsInputAppend, tagsInputRemove, tagsInputRemoveLast } from "./tagsInputAPI.js";
|
|
@@ -29,26 +29,66 @@ function useTagsInputRootState({
|
|
|
29
29
|
variant = "default",
|
|
30
30
|
max
|
|
31
31
|
}) {
|
|
32
|
-
const
|
|
32
|
+
const formBinding = useFormFieldBinding({
|
|
33
|
+
name,
|
|
34
|
+
value: valuesProp,
|
|
35
|
+
disabled,
|
|
36
|
+
readOnly
|
|
37
|
+
});
|
|
33
38
|
const reactId = useId();
|
|
34
39
|
const inputId = id ?? `tags-input-${reactId}`;
|
|
35
40
|
const ids = tagsInputFieldIds(inputId);
|
|
36
41
|
const isCompound = hasCompoundChildren(children);
|
|
37
42
|
const explicit = valuesProp !== void 0;
|
|
38
|
-
const bound =
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
const bound = formBinding.bound;
|
|
44
|
+
const formTags = useMemo(
|
|
45
|
+
() => bound ? tagsFromFormValue(formBinding.value) : void 0,
|
|
46
|
+
[bound, formBinding.value]
|
|
47
|
+
);
|
|
48
|
+
const controlled = explicit ? valuesProp : formTags;
|
|
49
|
+
const isValuesControlled = controlled !== void 0;
|
|
50
|
+
const [internalValues, setInternalValues] = useState(defaultValues);
|
|
51
|
+
const values = isValuesControlled ? controlled : internalValues;
|
|
52
|
+
const onValuesChangeRef = useRef(onValuesChange);
|
|
53
|
+
onValuesChangeRef.current = onValuesChange;
|
|
54
|
+
const setValues = useCallback(
|
|
55
|
+
(next) => {
|
|
56
|
+
if (!isValuesControlled) setInternalValues(next);
|
|
57
|
+
onValuesChangeRef.current?.(next);
|
|
58
|
+
if (bound) {
|
|
59
|
+
formBinding.setValue(next);
|
|
48
60
|
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
61
|
+
},
|
|
62
|
+
[bound, formBinding, isValuesControlled]
|
|
63
|
+
);
|
|
64
|
+
const isInputControlled = inputValueProp !== void 0;
|
|
65
|
+
const [internalInputValue, setInternalInputValue] = useState(defaultInputValue ?? "");
|
|
66
|
+
const inputValue = isInputControlled ? inputValueProp : internalInputValue;
|
|
67
|
+
const onInputValueChangeRef = useRef(onInputValueChange);
|
|
68
|
+
onInputValueChangeRef.current = onInputValueChange;
|
|
69
|
+
const setInputValue = useCallback(
|
|
70
|
+
(next) => {
|
|
71
|
+
if (!isInputControlled) setInternalInputValue(next);
|
|
72
|
+
onInputValueChangeRef.current?.(next);
|
|
73
|
+
},
|
|
74
|
+
[isInputControlled]
|
|
75
|
+
);
|
|
76
|
+
const shellNodeRef = useRef(null);
|
|
77
|
+
const registerShellRef = useCallback((node) => {
|
|
78
|
+
shellNodeRef.current = node;
|
|
79
|
+
}, []);
|
|
80
|
+
useNativeFormReset(
|
|
81
|
+
shellNodeRef,
|
|
82
|
+
() => {
|
|
83
|
+
if (!isValuesControlled) setInternalValues(defaultValues);
|
|
84
|
+
if (!isInputControlled) setInternalInputValue(defaultInputValue ?? "");
|
|
85
|
+
},
|
|
86
|
+
!isValuesControlled || !isInputControlled
|
|
87
|
+
);
|
|
88
|
+
const resolvedDisabled = Boolean(formBinding.disabled);
|
|
89
|
+
const resolvedReadOnly = Boolean(formBinding.readOnly);
|
|
90
|
+
const resolvedError = error ?? formBinding.error;
|
|
91
|
+
const blocked = resolvedDisabled || resolvedReadOnly;
|
|
52
92
|
const append = useCallback(
|
|
53
93
|
(incoming) => {
|
|
54
94
|
if (blocked) return;
|
|
@@ -69,17 +109,15 @@ function useTagsInputRootState({
|
|
|
69
109
|
if (blocked || values.length === 0) return;
|
|
70
110
|
setValues(tagsInputRemoveLast(values));
|
|
71
111
|
}, [blocked, setValues, values]);
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
onChange: onInputValueChange
|
|
76
|
-
});
|
|
77
|
-
const labelConnected = isCompound ? hasCompoundChild(children, "TagsInputLabel") : label != null;
|
|
112
|
+
const setInputNodeRef = formBinding.ref;
|
|
113
|
+
const notifyBlur = formBinding.onBlur;
|
|
114
|
+
const labelConnected = isCompound ? hasCompoundChild(children, "TagsInputLabel") || hasCompoundChild(children, "Label") : label != null;
|
|
78
115
|
const hintConnected = isCompound ? hasCompoundChild(children, "TagsInputHint") : hint != null;
|
|
79
|
-
const errorConnected = isCompound ? hasCompoundChild(children, "TagsInputError") :
|
|
116
|
+
const errorConnected = isCompound ? hasCompoundChild(children, "TagsInputError") : resolvedError != null;
|
|
80
117
|
const isInvalid = useResolvedFieldInvalid({
|
|
81
118
|
invalid,
|
|
82
|
-
errorConnected:
|
|
119
|
+
errorConnected: resolvedError != null || errorConnected,
|
|
120
|
+
formInvalid: formBinding["aria-invalid"] === true
|
|
83
121
|
});
|
|
84
122
|
const contextValue = useMemo(
|
|
85
123
|
() => ({
|
|
@@ -87,8 +125,8 @@ function useTagsInputRootState({
|
|
|
87
125
|
append,
|
|
88
126
|
remove,
|
|
89
127
|
removeLast,
|
|
90
|
-
disabled,
|
|
91
|
-
readOnly,
|
|
128
|
+
disabled: resolvedDisabled,
|
|
129
|
+
readOnly: resolvedReadOnly,
|
|
92
130
|
atMax: max != null && values.length >= max,
|
|
93
131
|
size,
|
|
94
132
|
variant,
|
|
@@ -101,8 +139,8 @@ function useTagsInputRootState({
|
|
|
101
139
|
errorId: ids.errorId,
|
|
102
140
|
label,
|
|
103
141
|
hint,
|
|
104
|
-
error,
|
|
105
|
-
name,
|
|
142
|
+
error: resolvedError,
|
|
143
|
+
name: formBinding.name ?? name,
|
|
106
144
|
labelled: labelConnected,
|
|
107
145
|
required,
|
|
108
146
|
isInvalid,
|
|
@@ -111,13 +149,15 @@ function useTagsInputRootState({
|
|
|
111
149
|
errorConnected,
|
|
112
150
|
hintId: ids.hintId,
|
|
113
151
|
errorId: ids.errorId
|
|
114
|
-
})
|
|
152
|
+
}),
|
|
153
|
+
setInputNodeRef,
|
|
154
|
+
registerShellRef,
|
|
155
|
+
notifyBlur
|
|
115
156
|
}),
|
|
116
157
|
[
|
|
117
158
|
append,
|
|
118
|
-
disabled,
|
|
119
|
-
error,
|
|
120
159
|
errorConnected,
|
|
160
|
+
formBinding.name,
|
|
121
161
|
hint,
|
|
122
162
|
hintConnected,
|
|
123
163
|
ids.errorId,
|
|
@@ -130,11 +170,16 @@ function useTagsInputRootState({
|
|
|
130
170
|
labelConnected,
|
|
131
171
|
max,
|
|
132
172
|
name,
|
|
173
|
+
notifyBlur,
|
|
133
174
|
placeholder,
|
|
134
|
-
|
|
175
|
+
registerShellRef,
|
|
135
176
|
remove,
|
|
136
177
|
removeLast,
|
|
137
178
|
required,
|
|
179
|
+
resolvedDisabled,
|
|
180
|
+
resolvedError,
|
|
181
|
+
resolvedReadOnly,
|
|
182
|
+
setInputNodeRef,
|
|
138
183
|
setInputValue,
|
|
139
184
|
size,
|
|
140
185
|
values,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
export type { TextProps, TextVariant, TextMotion, TextPartMotion } from './textTypes.js';
|
|
2
|
+
export type { TextClassNames, TextProps, TextVariant, TextMotion, TextPartMotion } from './textTypes.js';
|
|
3
3
|
export declare const Text: import('react').ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLElement>, "className"> & {
|
|
4
4
|
textStyle?: import('./textTypes.js').TextVariant;
|
|
5
5
|
as?: import('react').ElementType;
|
|
6
6
|
inheritColor?: boolean;
|
|
7
7
|
className?: string;
|
|
8
|
+
classNames?: import('../../../index.js').Prettify<import('./textTypes.js').TextClassNames>;
|
|
8
9
|
motion?: import('../../../index.js').Prettify<import('../utils/slotMotion/index.js').MotionMapWithEvents<import('./textTypes.js').TextMotion>>;
|
|
9
10
|
motionController?: import('../utils/slotMotion/index.js').MotionController;
|
|
10
11
|
} & import('../utils/slotMotion/index.js').MotionStateHostProps & import('react').RefAttributes<HTMLElement>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef, useMemo, createElement } from "react";
|
|
4
|
+
import { cn } from "../../../utils/cn.js";
|
|
4
5
|
import { resolveTextAs } from "./textA11y.js";
|
|
5
6
|
import { resolveTextMotionDefaults, useTextRootMotion } from "./textAnimations.js";
|
|
6
7
|
import { TextMotionProvider } from "./textContext.js";
|
|
@@ -10,6 +11,7 @@ const Text = forwardRef(function Text2({
|
|
|
10
11
|
as,
|
|
11
12
|
inheritColor,
|
|
12
13
|
className,
|
|
14
|
+
classNames,
|
|
13
15
|
children,
|
|
14
16
|
motion,
|
|
15
17
|
motionController,
|
|
@@ -38,7 +40,7 @@ const Text = forwardRef(function Text2({
|
|
|
38
40
|
textStyle,
|
|
39
41
|
as,
|
|
40
42
|
inheritColor,
|
|
41
|
-
className,
|
|
43
|
+
className: cn(classNames?.root, className),
|
|
42
44
|
forwardedRef: ref,
|
|
43
45
|
rootMotion: motion?.root,
|
|
44
46
|
onPointerOver,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Text, type TextProps, type TextVariant, type TextMotion, type TextPartMotion, } from './Text.js';
|
|
1
|
+
export { Text, type TextClassNames, type TextProps, type TextVariant, type TextMotion, type TextPartMotion, } from './Text.js';
|
|
@@ -10,6 +10,9 @@ export type TextPartMotion = {
|
|
|
10
10
|
enter?: MotionValue;
|
|
11
11
|
leave?: MotionValue;
|
|
12
12
|
};
|
|
13
|
+
export type TextClassNames = {
|
|
14
|
+
root?: string;
|
|
15
|
+
};
|
|
13
16
|
export type TextMotion = {
|
|
14
17
|
root?: TextPartMotion;
|
|
15
18
|
};
|
|
@@ -19,6 +22,7 @@ export type TextProps = Omit<HTMLAttributes<HTMLElement>, "className"> & {
|
|
|
19
22
|
as?: ElementType;
|
|
20
23
|
inheritColor?: boolean;
|
|
21
24
|
className?: string;
|
|
25
|
+
classNames?: Prettify<TextClassNames>;
|
|
22
26
|
/**
|
|
23
27
|
* Per-slot motion (`root`). Defaults are empty — custom factories are opt-in.
|
|
24
28
|
* `enter` runs on mount only when set.
|
|
@@ -99,9 +99,11 @@ function useTextAreaShellAnimations({
|
|
|
99
99
|
const handleShellPointerDown = useCallback(
|
|
100
100
|
(e) => {
|
|
101
101
|
onPointerDown?.(e);
|
|
102
|
-
if (e.defaultPrevented || blocked
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
if (e.defaultPrevented || blocked || e.pointerType === "touch" || e.target instanceof Element && Boolean(
|
|
103
|
+
e.target.closest(
|
|
104
|
+
'[data-textarea-resize-handle], input, textarea, button, a[href], [role="button"]'
|
|
105
|
+
)
|
|
106
|
+
)) {
|
|
105
107
|
return;
|
|
106
108
|
}
|
|
107
109
|
const shell = shellRef.current;
|