@algolia/satellite 1.10.2 → 2.0.0-rc.1
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/dist/cjs/Actions/Accordion/Accordion.d.ts +29 -20
- package/dist/cjs/Actions/Button/Button.tailwind.js +27 -42
- package/dist/cjs/Actions/Button/PolymorphicIconButton.d.ts +34 -5
- package/dist/cjs/Actions/Button/types.d.ts +32 -11
- package/dist/cjs/Actions/Button/types.js +2 -0
- package/dist/cjs/Actions/ButtonGroup/ButtonGroup.d.ts +8 -3
- package/dist/cjs/Actions/Switch/Switch.d.ts +23 -3
- package/dist/cjs/Actions/Switch/SwitchOption.d.ts +11 -2
- package/dist/cjs/Actions/Switch/types.d.ts +2 -1
- package/dist/cjs/Actions/Switch/types.js +3 -1
- package/dist/cjs/Actions/ToggleButton/ToggleButton.d.ts +12 -3
- package/dist/cjs/Actions/ToggleButton/ToggleButton.js +3 -1
- package/dist/cjs/Actions/ToggleButton/ToggleButtonBase.d.ts +35 -2
- package/dist/cjs/Actions/ToggleButton/ToggleButtonBase.js +12 -11
- package/dist/cjs/Actions/ToggleGroup/ToggleGroup.d.ts +22 -12
- package/dist/cjs/Avatars/ApplicationAvatar/ApplicationAvatar.d.ts +12 -5
- package/dist/cjs/Avatars/UserAvatar/UserAvatar.d.ts +15 -7
- package/dist/cjs/Avatars/types.d.ts +23 -1
- package/dist/cjs/Avatars/types.js +3 -1
- package/dist/cjs/Fields/AutoComplete/components/AutoCompleteContext.d.ts +2 -2
- package/dist/cjs/Fields/AutoComplete/components/AutoCompleteEmptyState.d.ts +8 -4
- package/dist/cjs/Fields/AutoComplete/components/DefaultOptionItem.d.ts +2 -2
- package/dist/cjs/Fields/AutoComplete/types.d.ts +146 -7
- package/dist/cjs/Fields/Checkbox/Checkbox.d.ts +5 -2
- package/dist/cjs/Fields/DateInput/DateInput.d.ts +47 -0
- package/dist/cjs/Fields/DateInput/DateInput.js +169 -0
- package/dist/cjs/Fields/DateInput/index.d.ts +1 -0
- package/dist/cjs/Fields/DateInput/index.js +16 -0
- package/dist/cjs/Fields/DatePicker/DatePicker/DatePicker.d.ts +42 -0
- package/dist/cjs/Fields/DatePicker/DatePicker/DatePicker.js +1 -0
- package/dist/cjs/Fields/DatePicker/DateRangePicker/DateRangePicker.d.ts +38 -2
- package/dist/cjs/Fields/DatePicker/DateRangePicker/DateRangePicker.js +1 -0
- package/dist/cjs/Fields/DatePicker/components/Calendar.d.ts +2 -2
- package/dist/cjs/Fields/DatePicker/components/Footer.d.ts +2 -2
- package/dist/cjs/Fields/DatePicker/components/Modal.d.ts +0 -0
- package/dist/cjs/Fields/DatePicker/components/Modal.js +1 -0
- package/dist/cjs/Fields/DatePicker/components/NavBar.d.ts +2 -2
- package/dist/cjs/Fields/DatePicker/components/Popover.d.ts +1 -0
- package/dist/cjs/Fields/DatePicker/components/Popover.js +5 -1
- package/dist/cjs/Fields/DatePicker/components/SidePanel.d.ts +2 -2
- package/dist/cjs/Fields/DatePicker/types.d.ts +21 -0
- package/dist/cjs/Fields/Dropzone/Dropzone.d.ts +85 -6
- package/dist/cjs/Fields/Field/Field.d.ts +34 -11
- package/dist/cjs/Fields/Form/Form.d.ts +5 -5
- package/dist/cjs/Fields/Form/stories/Complex.js +22 -12
- package/dist/cjs/Fields/Input/Input.d.ts +18 -1
- package/dist/cjs/Fields/Input/Input.js +5 -3
- package/dist/cjs/Fields/RadioGroup/RadioButton.d.ts +68 -2
- package/dist/cjs/Fields/RadioGroup/RadioGroup.d.ts +27 -10
- package/dist/cjs/Fields/RadioGroup/RadioGroup.js +20 -77
- package/dist/cjs/Fields/RadioGroup/RadioGroupItem.d.ts +16 -0
- package/dist/cjs/Fields/RadioGroup/RadioGroupItem.js +71 -0
- package/dist/cjs/Fields/RadioGroup/index.d.ts +1 -0
- package/dist/cjs/Fields/RadioGroup/index.js +11 -0
- package/dist/cjs/Fields/RangeSlider/RangeSlider.d.ts +48 -3
- package/dist/cjs/Fields/Select/Select.d.ts +3 -0
- package/dist/cjs/Fields/TextArea/TextArea.d.ts +16 -0
- package/dist/cjs/Fields/Toggle/Toggle.d.ts +51 -3
- package/dist/cjs/Fields/index.d.ts +1 -0
- package/dist/cjs/Fields/index.js +11 -0
- package/dist/cjs/Helpers/ClickAwayContainer/ClickAwayContainer.d.ts +10 -9
- package/dist/cjs/Helpers/HelpUnderline/HelpUnderline.d.ts +11 -3
- package/dist/cjs/Helpers/Medallion/Medallion.d.ts +16 -3
- package/dist/cjs/Helpers/Medallion/Medallion.js +11 -10
- package/dist/cjs/Helpers/Medallion/Medallion.tailwind.js +1 -1
- package/dist/cjs/Helpers/Medallion/types.d.ts +1 -1
- package/dist/cjs/Helpers/Separator/Separator.d.ts +12 -2
- package/dist/cjs/Helpers/TextWrap/TextWrap.d.ts +9 -3
- package/dist/cjs/Helpers/TextWrap/TextWrap.js +1 -1
- package/dist/cjs/Helpers/UserContent/UserContent.d.ts +12 -3
- package/dist/cjs/Icons/index.d.ts +1 -1
- package/dist/cjs/Icons/index.js +6 -0
- package/dist/cjs/Indicators/Badge/Badge.d.ts +6 -2
- package/dist/cjs/Indicators/Banners/Alert/Alert.d.ts +2 -2
- package/dist/cjs/Indicators/Banners/Promote/Promote.d.ts +2 -2
- package/dist/cjs/Indicators/Banners/SystemNotification/SystemNotification.d.ts +2 -2
- package/dist/cjs/Indicators/EmptyState/EmptyState.d.ts +2 -2
- package/dist/cjs/Indicators/KeyboardKey/KeyboardKey.d.ts +2 -2
- package/dist/cjs/Indicators/ProgressSpinner/ProgressSpinner.d.ts +2 -2
- package/dist/cjs/Indicators/ScrollIndicator/ScrollIndicator.d.ts +2 -2
- package/dist/cjs/Indicators/Skeleton/Skeleton.d.ts +2 -2
- package/dist/cjs/Indicators/Tag/Tag.tailwind.js +13 -4
- package/dist/cjs/Indicators/Toast/Toast.d.ts +2 -2
- package/dist/cjs/Indicators/Toast/Toasts.d.ts +2 -2
- package/dist/cjs/Layout/Card/components/CardHeader.d.ts +2 -2
- package/dist/cjs/Layout/Card/components/CardTitle.d.ts +2 -2
- package/dist/cjs/Layout/FlexGrid/FlexGrid.d.ts +2 -2
- package/dist/cjs/Layout/Insert/Insert.d.ts +2 -2
- package/dist/cjs/Layout/Sidebar/Sidebar.d.ts +4 -5
- package/dist/cjs/Layout/Sidebar/SidebarButtonLink.d.ts +2 -2
- package/dist/cjs/Layout/Sidebar/SidebarHeader.d.ts +4 -5
- package/dist/cjs/Layout/Sidebar/SidebarHeading.d.ts +2 -2
- package/dist/cjs/Layout/Sidebar/SidebarLink.d.ts +2 -2
- package/dist/cjs/Layout/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.d.ts +2 -2
- package/dist/cjs/Layout/Sidebar/SidebarLinksGroup/SidebarGroupLink.d.ts +2 -2
- package/dist/cjs/Layout/Sidebar/SidebarLinksGroup/SidebarLinksGroup.d.ts +2 -2
- package/dist/cjs/Layout/Sidebar/SidebarNav.d.ts +2 -2
- package/dist/cjs/Layout/Tables/DataTable/components/Footer.d.ts +2 -2
- package/dist/cjs/Layout/Tables/DataTable/components/Loader.d.ts +2 -2
- package/dist/cjs/Layout/Tables/DataTable/types.d.ts +3 -3
- package/dist/cjs/Layout/Tables/Table/Table.d.ts +2 -2
- package/dist/cjs/Layout/Tables/Table/components/TableFooter.d.ts +4 -5
- package/dist/cjs/Navigation/Pagination/CompactPagination/CompactPagination.d.ts +2 -2
- package/dist/cjs/Navigation/Pagination/Pagination/Pagination.d.ts +2 -2
- package/dist/cjs/Navigation/Stepper/Step.d.ts +2 -2
- package/dist/cjs/Navigation/Stepper/Step.js +28 -25
- package/dist/cjs/Navigation/Stepper/Stepper.d.ts +2 -2
- package/dist/cjs/Navigation/Tabs/ContentTabs/ContentTabs.d.ts +2 -2
- package/dist/cjs/Navigation/Tabs/LinkTabs/LinkTabs.d.ts +2 -2
- package/dist/cjs/Navigation/Tabs/components/LinkTab.d.ts +2 -2
- package/dist/cjs/Overlay/Dropdown/Dropdown.d.ts +4 -5
- package/dist/cjs/Overlay/Dropdown/components/DropdownButtonItem.d.ts +2 -2
- package/dist/cjs/Overlay/Dropdown/components/DropdownButtonItem.js +10 -9
- package/dist/cjs/Overlay/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItem.d.ts +2 -2
- package/dist/cjs/Overlay/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroup.d.ts +2 -2
- package/dist/cjs/Overlay/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsMultiGroup.d.ts +2 -2
- package/dist/cjs/Overlay/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsSingleGroup.d.ts +2 -2
- package/dist/cjs/Overlay/Dropdown/components/DropdownFooterItem.d.ts +2 -2
- package/dist/cjs/Overlay/Dropdown/components/DropdownLinkItem.d.ts +2 -2
- package/dist/cjs/Overlay/Dropdown/components/DropdownLinkItem.js +11 -9
- package/dist/cjs/Overlay/Dropdown/components/DropdownRadioItem.d.ts +3 -5
- package/dist/cjs/Overlay/Dropdown/components/DropdownRadioItem.js +0 -3
- package/dist/cjs/Overlay/Dropdown/components/DropdownTitle.d.ts +2 -2
- package/dist/cjs/Overlay/Dropdown/components/DropdownToggleItem.d.ts +4 -5
- package/dist/cjs/Overlay/Dropdown/components/DropdownToggleItem.js +0 -3
- package/dist/cjs/Overlay/MenuButton/MenuButton.d.ts +9 -9
- package/dist/cjs/Overlay/MenuButton/components/CustomTrigger.d.ts +2 -2
- package/dist/cjs/Overlay/MenuButton/components/CustomTrigger.js +12 -4
- package/dist/cjs/Overlay/MenuButton/components/Label.d.ts +2 -2
- package/dist/cjs/Overlay/MenuButton/components/collapsible/CollapsibleItem.d.ts +2 -2
- package/dist/cjs/Overlay/MenuButton/components/collapsible/CollapsibleItemsGroup.d.ts +2 -2
- package/dist/cjs/Overlay/MenuButton/components/collapsible/CollapsibleItemsMultipleGroup.d.ts +2 -2
- package/dist/cjs/Overlay/MenuButton/components/collapsible/CollapsibleItemsSingleGroup.d.ts +2 -2
- package/dist/cjs/Overlay/MenuButton/components/items/Item.d.ts +2 -2
- package/dist/cjs/Overlay/MenuButton/components/items/LinkItem.d.ts +2 -2
- package/dist/cjs/Overlay/MenuButton/components/items/RadioItem.d.ts +2 -2
- package/dist/cjs/Overlay/MenuButton/components/items/ToggleItem.d.ts +2 -2
- package/dist/cjs/Overlay/Modal/Modal.d.ts +2 -2
- package/dist/cjs/Overlay/Modal/components/ModalFooter.d.ts +2 -2
- package/dist/cjs/Overlay/Modal/components/ModalSection.d.ts +2 -2
- package/dist/cjs/Overlay/Popover/Popover.d.ts +2 -2
- package/dist/cjs/Overlay/Tooltip/OverflowTooltipWrapper.d.ts +2 -2
- package/dist/cjs/Overlay/Tooltip/TooltipWrapper.d.ts +2 -2
- package/dist/cjs/Overlay/Tooltip/types.d.ts +5 -2
- package/dist/cjs/Satellite/Satellite.d.ts +2 -2
- package/dist/cjs/Satellite/locale.d.ts +2 -1
- package/dist/cjs/utils/isCssPropertySupported.d.ts +1 -1
- package/dist/esm/Actions/Accordion/Accordion.d.ts +29 -20
- package/dist/esm/Actions/Button/Button.tailwind.js +27 -44
- package/dist/esm/Actions/Button/PolymorphicIconButton.d.ts +34 -5
- package/dist/esm/Actions/Button/types.d.ts +32 -11
- package/dist/esm/Actions/Button/types.js +1 -0
- package/dist/esm/Actions/ButtonGroup/ButtonGroup.d.ts +8 -3
- package/dist/esm/Actions/Switch/Switch.d.ts +23 -3
- package/dist/esm/Actions/Switch/SwitchOption.d.ts +11 -2
- package/dist/esm/Actions/Switch/types.d.ts +2 -1
- package/dist/esm/Actions/Switch/types.js +1 -1
- package/dist/esm/Actions/ToggleButton/ToggleButton.d.ts +12 -3
- package/dist/esm/Actions/ToggleButton/ToggleButton.js +3 -1
- package/dist/esm/Actions/ToggleButton/ToggleButtonBase.d.ts +35 -2
- package/dist/esm/Actions/ToggleButton/ToggleButtonBase.js +12 -11
- package/dist/esm/Actions/ToggleGroup/ToggleGroup.d.ts +22 -12
- package/dist/esm/Avatars/ApplicationAvatar/ApplicationAvatar.d.ts +12 -5
- package/dist/esm/Avatars/UserAvatar/UserAvatar.d.ts +15 -7
- package/dist/esm/Avatars/types.d.ts +23 -1
- package/dist/esm/Avatars/types.js +1 -1
- package/dist/esm/Fields/AutoComplete/components/AutoCompleteContext.d.ts +2 -2
- package/dist/esm/Fields/AutoComplete/components/AutoCompleteEmptyState.d.ts +8 -4
- package/dist/esm/Fields/AutoComplete/components/DefaultOptionItem.d.ts +2 -2
- package/dist/esm/Fields/AutoComplete/types.d.ts +146 -7
- package/dist/esm/Fields/Checkbox/Checkbox.d.ts +5 -2
- package/dist/esm/Fields/DateInput/DateInput.d.ts +47 -0
- package/dist/esm/Fields/DateInput/DateInput.js +162 -0
- package/dist/esm/Fields/DateInput/index.d.ts +1 -0
- package/dist/esm/Fields/DateInput/index.js +1 -0
- package/dist/esm/Fields/DatePicker/DatePicker/DatePicker.d.ts +42 -0
- package/dist/esm/Fields/DatePicker/DatePicker/DatePicker.js +1 -0
- package/dist/esm/Fields/DatePicker/DateRangePicker/DateRangePicker.d.ts +38 -2
- package/dist/esm/Fields/DatePicker/DateRangePicker/DateRangePicker.js +1 -0
- package/dist/esm/Fields/DatePicker/components/Calendar.d.ts +2 -2
- package/dist/esm/Fields/DatePicker/components/Footer.d.ts +2 -2
- package/dist/esm/Fields/DatePicker/components/Modal.d.ts +0 -0
- package/dist/esm/Fields/DatePicker/components/Modal.js +0 -0
- package/dist/esm/Fields/DatePicker/components/NavBar.d.ts +2 -2
- package/dist/esm/Fields/DatePicker/components/Popover.d.ts +1 -0
- package/dist/esm/Fields/DatePicker/components/Popover.js +5 -1
- package/dist/esm/Fields/DatePicker/components/SidePanel.d.ts +2 -2
- package/dist/esm/Fields/DatePicker/types.d.ts +21 -0
- package/dist/esm/Fields/Dropzone/Dropzone.d.ts +85 -6
- package/dist/esm/Fields/Field/Field.d.ts +34 -11
- package/dist/esm/Fields/Form/Form.d.ts +5 -5
- package/dist/esm/Fields/Form/stories/Complex.js +23 -13
- package/dist/esm/Fields/Input/Input.d.ts +18 -1
- package/dist/esm/Fields/Input/Input.js +5 -3
- package/dist/esm/Fields/RadioGroup/RadioButton.d.ts +68 -2
- package/dist/esm/Fields/RadioGroup/RadioGroup.d.ts +27 -10
- package/dist/esm/Fields/RadioGroup/RadioGroup.js +20 -77
- package/dist/esm/Fields/RadioGroup/RadioGroupItem.d.ts +16 -0
- package/dist/esm/Fields/RadioGroup/RadioGroupItem.js +64 -0
- package/dist/esm/Fields/RadioGroup/index.d.ts +1 -0
- package/dist/esm/Fields/RadioGroup/index.js +2 -1
- package/dist/esm/Fields/RangeSlider/RangeSlider.d.ts +48 -3
- package/dist/esm/Fields/Select/Select.d.ts +3 -0
- package/dist/esm/Fields/TextArea/TextArea.d.ts +16 -0
- package/dist/esm/Fields/Toggle/Toggle.d.ts +51 -3
- package/dist/esm/Fields/index.d.ts +1 -0
- package/dist/esm/Fields/index.js +1 -0
- package/dist/esm/Helpers/ClickAwayContainer/ClickAwayContainer.d.ts +10 -9
- package/dist/esm/Helpers/HelpUnderline/HelpUnderline.d.ts +11 -3
- package/dist/esm/Helpers/Medallion/Medallion.d.ts +16 -3
- package/dist/esm/Helpers/Medallion/Medallion.js +11 -10
- package/dist/esm/Helpers/Medallion/Medallion.tailwind.js +1 -1
- package/dist/esm/Helpers/Medallion/types.d.ts +1 -1
- package/dist/esm/Helpers/Separator/Separator.d.ts +12 -2
- package/dist/esm/Helpers/TextWrap/TextWrap.d.ts +9 -3
- package/dist/esm/Helpers/TextWrap/TextWrap.js +1 -1
- package/dist/esm/Helpers/UserContent/UserContent.d.ts +12 -3
- package/dist/esm/Icons/index.d.ts +1 -1
- package/dist/esm/Icons/index.js +1 -1
- package/dist/esm/Indicators/Badge/Badge.d.ts +6 -2
- package/dist/esm/Indicators/Banners/Alert/Alert.d.ts +2 -2
- package/dist/esm/Indicators/Banners/Promote/Promote.d.ts +2 -2
- package/dist/esm/Indicators/Banners/SystemNotification/SystemNotification.d.ts +2 -2
- package/dist/esm/Indicators/EmptyState/EmptyState.d.ts +2 -2
- package/dist/esm/Indicators/KeyboardKey/KeyboardKey.d.ts +2 -2
- package/dist/esm/Indicators/ProgressSpinner/ProgressSpinner.d.ts +2 -2
- package/dist/esm/Indicators/ScrollIndicator/ScrollIndicator.d.ts +2 -2
- package/dist/esm/Indicators/Skeleton/Skeleton.d.ts +2 -2
- package/dist/esm/Indicators/Tag/Tag.tailwind.js +13 -4
- package/dist/esm/Indicators/Toast/Toast.d.ts +2 -2
- package/dist/esm/Indicators/Toast/Toasts.d.ts +2 -2
- package/dist/esm/Layout/Card/components/CardHeader.d.ts +2 -2
- package/dist/esm/Layout/Card/components/CardTitle.d.ts +2 -2
- package/dist/esm/Layout/FlexGrid/FlexGrid.d.ts +2 -2
- package/dist/esm/Layout/Insert/Insert.d.ts +2 -2
- package/dist/esm/Layout/Sidebar/Sidebar.d.ts +4 -5
- package/dist/esm/Layout/Sidebar/SidebarButtonLink.d.ts +2 -2
- package/dist/esm/Layout/Sidebar/SidebarHeader.d.ts +4 -5
- package/dist/esm/Layout/Sidebar/SidebarHeading.d.ts +2 -2
- package/dist/esm/Layout/Sidebar/SidebarLink.d.ts +2 -2
- package/dist/esm/Layout/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.d.ts +2 -2
- package/dist/esm/Layout/Sidebar/SidebarLinksGroup/SidebarGroupLink.d.ts +2 -2
- package/dist/esm/Layout/Sidebar/SidebarLinksGroup/SidebarLinksGroup.d.ts +2 -2
- package/dist/esm/Layout/Sidebar/SidebarNav.d.ts +2 -2
- package/dist/esm/Layout/Tables/DataTable/components/Footer.d.ts +2 -2
- package/dist/esm/Layout/Tables/DataTable/components/Loader.d.ts +2 -2
- package/dist/esm/Layout/Tables/DataTable/types.d.ts +3 -3
- package/dist/esm/Layout/Tables/Table/Table.d.ts +2 -2
- package/dist/esm/Layout/Tables/Table/components/TableFooter.d.ts +4 -5
- package/dist/esm/Navigation/Pagination/CompactPagination/CompactPagination.d.ts +2 -2
- package/dist/esm/Navigation/Pagination/Pagination/Pagination.d.ts +2 -2
- package/dist/esm/Navigation/Stepper/Step.d.ts +2 -2
- package/dist/esm/Navigation/Stepper/Step.js +28 -25
- package/dist/esm/Navigation/Stepper/Stepper.d.ts +2 -2
- package/dist/esm/Navigation/Tabs/ContentTabs/ContentTabs.d.ts +2 -2
- package/dist/esm/Navigation/Tabs/LinkTabs/LinkTabs.d.ts +2 -2
- package/dist/esm/Navigation/Tabs/components/LinkTab.d.ts +2 -2
- package/dist/esm/Overlay/Dropdown/Dropdown.d.ts +4 -5
- package/dist/esm/Overlay/Dropdown/components/DropdownButtonItem.d.ts +2 -2
- package/dist/esm/Overlay/Dropdown/components/DropdownButtonItem.js +10 -9
- package/dist/esm/Overlay/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItem.d.ts +2 -2
- package/dist/esm/Overlay/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroup.d.ts +2 -2
- package/dist/esm/Overlay/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsMultiGroup.d.ts +2 -2
- package/dist/esm/Overlay/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsSingleGroup.d.ts +2 -2
- package/dist/esm/Overlay/Dropdown/components/DropdownFooterItem.d.ts +2 -2
- package/dist/esm/Overlay/Dropdown/components/DropdownLinkItem.d.ts +2 -2
- package/dist/esm/Overlay/Dropdown/components/DropdownLinkItem.js +11 -9
- package/dist/esm/Overlay/Dropdown/components/DropdownRadioItem.d.ts +3 -5
- package/dist/esm/Overlay/Dropdown/components/DropdownRadioItem.js +0 -3
- package/dist/esm/Overlay/Dropdown/components/DropdownTitle.d.ts +2 -2
- package/dist/esm/Overlay/Dropdown/components/DropdownToggleItem.d.ts +4 -5
- package/dist/esm/Overlay/Dropdown/components/DropdownToggleItem.js +0 -3
- package/dist/esm/Overlay/MenuButton/MenuButton.d.ts +9 -9
- package/dist/esm/Overlay/MenuButton/components/CustomTrigger.d.ts +2 -2
- package/dist/esm/Overlay/MenuButton/components/CustomTrigger.js +12 -4
- package/dist/esm/Overlay/MenuButton/components/Label.d.ts +2 -2
- package/dist/esm/Overlay/MenuButton/components/collapsible/CollapsibleItem.d.ts +2 -2
- package/dist/esm/Overlay/MenuButton/components/collapsible/CollapsibleItemsGroup.d.ts +2 -2
- package/dist/esm/Overlay/MenuButton/components/collapsible/CollapsibleItemsMultipleGroup.d.ts +2 -2
- package/dist/esm/Overlay/MenuButton/components/collapsible/CollapsibleItemsSingleGroup.d.ts +2 -2
- package/dist/esm/Overlay/MenuButton/components/items/Item.d.ts +2 -2
- package/dist/esm/Overlay/MenuButton/components/items/LinkItem.d.ts +2 -2
- package/dist/esm/Overlay/MenuButton/components/items/RadioItem.d.ts +2 -2
- package/dist/esm/Overlay/MenuButton/components/items/ToggleItem.d.ts +2 -2
- package/dist/esm/Overlay/Modal/Modal.d.ts +2 -2
- package/dist/esm/Overlay/Modal/components/ModalFooter.d.ts +2 -2
- package/dist/esm/Overlay/Modal/components/ModalSection.d.ts +2 -2
- package/dist/esm/Overlay/Popover/Popover.d.ts +2 -2
- package/dist/esm/Overlay/Tooltip/OverflowTooltipWrapper.d.ts +2 -2
- package/dist/esm/Overlay/Tooltip/TooltipWrapper.d.ts +2 -2
- package/dist/esm/Overlay/Tooltip/types.d.ts +5 -2
- package/dist/esm/Satellite/Satellite.d.ts +2 -2
- package/dist/esm/Satellite/locale.d.ts +2 -1
- package/dist/esm/utils/isCssPropertySupported.d.ts +1 -1
- package/dist/satellite.min.css +1 -1
- package/package.json +24 -23
@@ -108,6 +108,10 @@ var zodSchema = _zod2.z.object({
|
|
108
108
|
message: "You must specify a birthday"
|
109
109
|
};
|
110
110
|
}
|
111
|
+
}).refine(function (val) {
|
112
|
+
return val < now;
|
113
|
+
}, {
|
114
|
+
message: "You must specify a birthday in the past"
|
111
115
|
}),
|
112
116
|
age: _zod2.z.coerce.number().min(1, {
|
113
117
|
message: "You must specify an age"
|
@@ -377,14 +381,16 @@ var RHFComplexComponent = exports.RHFComplexComponent = function RHFComplexCompo
|
|
377
381
|
description: "Please specify your birthday",
|
378
382
|
state: getFieldState("birthday"),
|
379
383
|
className: (0, _satellitePrefixer["default"])(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2["default"])(["w-full"]))),
|
380
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.
|
384
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.DateInput, _objectSpread({
|
381
385
|
id: "birthday",
|
382
|
-
|
383
|
-
|
384
|
-
|
386
|
+
required: true,
|
387
|
+
datePickerProps: {
|
388
|
+
calendarProps: {
|
389
|
+
disabled: {
|
390
|
+
after: now
|
391
|
+
}
|
385
392
|
}
|
386
|
-
}
|
387
|
-
required: true
|
393
|
+
}
|
388
394
|
}, field))
|
389
395
|
});
|
390
396
|
}
|
@@ -583,7 +589,9 @@ var yupSchema = yup.object({
|
|
583
589
|
value: yup.string()
|
584
590
|
})).min(1, "You must specify at least one job position"),
|
585
591
|
employmentStatus: yup.string().oneOf(employmentStatuses).required("You must specify an employment status"),
|
586
|
-
birthday: yup.date().required("You must specify a birthday"),
|
592
|
+
birthday: yup.date().required("You must specify a birthday").test("birthday", "You must specify a birthday in the past", function (value) {
|
593
|
+
return value < now;
|
594
|
+
}),
|
587
595
|
age: yup.number().min(18, "You must be at least 18 years old").max(100, "You must be at most 100 years old").required("You must specify an age"),
|
588
596
|
interest: yup.number().min(5, "Your level of interest must be at least 5").required(),
|
589
597
|
idealLocation: yup.array(yup.number().min(10, "Your minimum ideal location must be 10 km").max(40, "Your maximum ideal location must be 40 km").required()).required(),
|
@@ -774,14 +782,16 @@ var FormikComplexComponent = exports.FormikComplexComponent = function FormikCom
|
|
774
782
|
description: "Please specify your birthday",
|
775
783
|
state: getFieldState("birthday"),
|
776
784
|
className: (0, _satellitePrefixer["default"])(_templateObject38 || (_templateObject38 = (0, _taggedTemplateLiteral2["default"])(["w-full"]))),
|
777
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.
|
785
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.DateInput, {
|
778
786
|
id: "birthday",
|
779
|
-
|
780
|
-
|
781
|
-
|
787
|
+
required: true,
|
788
|
+
datePickerProps: {
|
789
|
+
calendarProps: {
|
790
|
+
disabled: {
|
791
|
+
after: now
|
792
|
+
}
|
782
793
|
}
|
783
794
|
},
|
784
|
-
required: true,
|
785
795
|
onChange: function onChange(value) {
|
786
796
|
return formik.setFieldValue("birthday", value);
|
787
797
|
},
|
@@ -8,15 +8,32 @@ export declare type InputPropsLocale = {
|
|
8
8
|
decrement?: string;
|
9
9
|
};
|
10
10
|
export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "checked" | "defaultChecked"> {
|
11
|
+
/**
|
12
|
+
* Define the type of the `Input`.
|
13
|
+
* @default "text"
|
14
|
+
*/
|
11
15
|
type?: "text" | "number" | "search" | "email" | "password";
|
16
|
+
/**
|
17
|
+
* Define the variant of the `Input`.
|
18
|
+
* @default "medium"
|
19
|
+
*/
|
12
20
|
variant?: InputVariant;
|
21
|
+
/**
|
22
|
+
* Define the start icon of the `Input`.
|
23
|
+
*/
|
13
24
|
startIcon?: IconComponentType;
|
25
|
+
/**
|
26
|
+
* Define the end item of the `Input`.
|
27
|
+
*/
|
14
28
|
endItem?: ReactNode;
|
15
29
|
/**
|
16
|
-
* Define whether or not a "clear input" x button should show on hover
|
30
|
+
* Define whether or not a "clear input" x button should show on hover.
|
17
31
|
* @default false
|
18
32
|
*/
|
19
33
|
clearable?: boolean;
|
34
|
+
/**
|
35
|
+
* Define the locale of the `Input`.
|
36
|
+
*/
|
20
37
|
locale?: InputPropsLocale;
|
21
38
|
}
|
22
39
|
/**
|
@@ -116,9 +116,11 @@ var Input = exports.Input = /*#__PURE__*/(0, _react.forwardRef)(function (_ref,
|
|
116
116
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
117
117
|
className: (0, _clsx["default"])((0, _satellitePrefixer["default"])(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n input group\n ", "\n ", "\n "])), focused && "focusable-show", disabled && "input-disabled"), VARIANT_CLASSNAMES[variant], STATUS_CLASSNAMES[status], className),
|
118
118
|
style: style,
|
119
|
-
onClick: function onClick() {
|
120
|
-
|
121
|
-
|
119
|
+
onClick: function onClick(e) {
|
120
|
+
if (e.currentTarget.contains(e.target)) {
|
121
|
+
var _inputRef$current;
|
122
|
+
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.focus();
|
123
|
+
}
|
122
124
|
},
|
123
125
|
children: [Icon && /*#__PURE__*/(0, _jsxRuntime.jsx)(Icon, {
|
124
126
|
className: (0, _satellitePrefixer["default"])(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["ml-4 shrink-0 ", ""])), disabled ? "text-grey-200" : focused ? "text-accent-600" : "text-grey-500"),
|
@@ -1,3 +1,69 @@
|
|
1
1
|
import type { HTMLAttributes, InputHTMLAttributes } from "react";
|
2
|
-
export declare type RadioButtonProps = HTMLAttributes<HTMLInputElement> &
|
3
|
-
|
2
|
+
export declare type RadioButtonProps = HTMLAttributes<HTMLInputElement> & {
|
3
|
+
/**
|
4
|
+
* The value of the `RadioButton`.
|
5
|
+
*/
|
6
|
+
value?: InputHTMLAttributes<HTMLInputElement>["value"];
|
7
|
+
/**
|
8
|
+
* The name of the `RadioButton`.
|
9
|
+
*/
|
10
|
+
name?: InputHTMLAttributes<HTMLInputElement>["name"];
|
11
|
+
/**
|
12
|
+
* Whether the `RadioButton` is checked.
|
13
|
+
*/
|
14
|
+
checked?: InputHTMLAttributes<HTMLInputElement>["checked"];
|
15
|
+
/**
|
16
|
+
* The default checked state of the `RadioButton`.
|
17
|
+
*/
|
18
|
+
defaultChecked?: InputHTMLAttributes<HTMLInputElement>["defaultChecked"];
|
19
|
+
/**
|
20
|
+
* Event handler for when the `RadioButton`'s value changes.
|
21
|
+
*/
|
22
|
+
onChange?: InputHTMLAttributes<HTMLInputElement>["onChange"];
|
23
|
+
/**
|
24
|
+
* Whether the `RadioButton` is required.
|
25
|
+
*/
|
26
|
+
required?: InputHTMLAttributes<HTMLInputElement>["required"];
|
27
|
+
/**
|
28
|
+
* Whether the `RadioButton` should automatically receive focus when the page loads.
|
29
|
+
*/
|
30
|
+
autoFocus?: InputHTMLAttributes<HTMLInputElement>["autoFocus"];
|
31
|
+
/**
|
32
|
+
* Whether the `RadioButton` is disabled.
|
33
|
+
*/
|
34
|
+
disabled?: InputHTMLAttributes<HTMLInputElement>["disabled"];
|
35
|
+
};
|
36
|
+
export declare const RadioButton: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLInputElement> & {
|
37
|
+
/**
|
38
|
+
* The value of the `RadioButton`.
|
39
|
+
*/
|
40
|
+
value?: InputHTMLAttributes<HTMLInputElement>["value"];
|
41
|
+
/**
|
42
|
+
* The name of the `RadioButton`.
|
43
|
+
*/
|
44
|
+
name?: InputHTMLAttributes<HTMLInputElement>["name"];
|
45
|
+
/**
|
46
|
+
* Whether the `RadioButton` is checked.
|
47
|
+
*/
|
48
|
+
checked?: InputHTMLAttributes<HTMLInputElement>["checked"];
|
49
|
+
/**
|
50
|
+
* The default checked state of the `RadioButton`.
|
51
|
+
*/
|
52
|
+
defaultChecked?: InputHTMLAttributes<HTMLInputElement>["defaultChecked"];
|
53
|
+
/**
|
54
|
+
* Event handler for when the `RadioButton`'s value changes.
|
55
|
+
*/
|
56
|
+
onChange?: InputHTMLAttributes<HTMLInputElement>["onChange"];
|
57
|
+
/**
|
58
|
+
* Whether the `RadioButton` is required.
|
59
|
+
*/
|
60
|
+
required?: InputHTMLAttributes<HTMLInputElement>["required"];
|
61
|
+
/**
|
62
|
+
* Whether the `RadioButton` should automatically receive focus when the page loads.
|
63
|
+
*/
|
64
|
+
autoFocus?: InputHTMLAttributes<HTMLInputElement>["autoFocus"];
|
65
|
+
/**
|
66
|
+
* Whether the `RadioButton` is disabled.
|
67
|
+
*/
|
68
|
+
disabled?: InputHTMLAttributes<HTMLInputElement>["disabled"];
|
69
|
+
} & import("react").RefAttributes<HTMLInputElement>>;
|
@@ -1,30 +1,47 @@
|
|
1
|
-
import type { ForwardRefExoticComponent, ReactNode, RefAttributes
|
1
|
+
import type { ForwardRefExoticComponent, ReactNode, RefAttributes } from "react";
|
2
|
+
import { RadioGroupItem } from "./RadioGroupItem";
|
2
3
|
export interface RadioGroupProps {
|
4
|
+
/**
|
5
|
+
* The id of the `RadioGroup`.
|
6
|
+
*/
|
3
7
|
id?: string;
|
4
|
-
/**
|
8
|
+
/**
|
9
|
+
* The class name of the `RadioGroup`.
|
10
|
+
*/
|
5
11
|
className?: string;
|
12
|
+
/**
|
13
|
+
* The name of the `RadioGroup`.
|
14
|
+
*/
|
6
15
|
name?: string;
|
16
|
+
/**
|
17
|
+
* The value of the `RadioGroup`.
|
18
|
+
*/
|
7
19
|
value: string;
|
20
|
+
/**
|
21
|
+
* Whether the `RadioGroup` is disabled.
|
22
|
+
*/
|
8
23
|
disabled?: boolean;
|
24
|
+
/**
|
25
|
+
* Whether the `RadioGroup` is required.
|
26
|
+
*/
|
9
27
|
required?: boolean;
|
10
28
|
/**
|
11
|
-
*
|
29
|
+
* The text position of the `RadioGroupItem`.
|
12
30
|
* @default left
|
13
31
|
*/
|
14
32
|
textPosition?: "left" | "right";
|
33
|
+
/**
|
34
|
+
* Event handler for when the `RadioGroup`'s value changes.
|
35
|
+
*/
|
15
36
|
onChange: (newValue: string) => void;
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
value: string;
|
20
|
-
disabled?: boolean;
|
21
|
-
required?: boolean;
|
37
|
+
/**
|
38
|
+
* The children of the `RadioGroup`.
|
39
|
+
*/
|
22
40
|
children?: ReactNode;
|
23
41
|
}
|
24
42
|
export declare type RadioGroupComponent = ForwardRefExoticComponent<RadioGroupProps & RefAttributes<HTMLFieldSetElement>> & {
|
25
43
|
Item: typeof RadioGroupItem;
|
26
44
|
};
|
27
|
-
export declare const RadioGroupItem: VFC<RadioGroupItemProps>;
|
28
45
|
/**
|
29
46
|
* The `RadioGroup` component presents mutually exclusive options, allowing users to make a single selection from a list.
|
30
47
|
*
|
@@ -4,83 +4,26 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
5
5
|
value: true
|
6
6
|
});
|
7
|
-
exports.
|
8
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
7
|
+
exports.RadioGroup = void 0;
|
9
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
10
|
-
var
|
9
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
11
10
|
var _clsx = _interopRequireDefault(require("clsx"));
|
12
11
|
var _react = require("react");
|
13
12
|
var _Layout = require("../../Layout");
|
14
13
|
var _satellitePrefixer = _interopRequireDefault(require("../../styles/helpers/satellitePrefixer"));
|
15
14
|
var _uniqueId = require("../../utils/uniqueId");
|
16
15
|
var _Field = require("../Field");
|
17
|
-
var _RadioButton = require("./RadioButton");
|
18
16
|
var _RadioGroupContext = require("./RadioGroupContext");
|
17
|
+
var _RadioGroupItem = require("./RadioGroupItem");
|
19
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
20
|
-
var _templateObject, _templateObject2, _templateObject3
|
21
|
-
var _excluded = ["value", "disabled", "required", "children"];
|
22
|
-
var RadioGroupItem = exports.RadioGroupItem = function RadioGroupItem(_ref) {
|
23
|
-
var value = _ref.value,
|
24
|
-
disabled = _ref.disabled,
|
25
|
-
required = _ref.required,
|
26
|
-
children = _ref.children,
|
27
|
-
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
28
|
-
var _useRadioGroupContext = (0, _RadioGroupContext.useRadioGroupContext)(),
|
29
|
-
id = _useRadioGroupContext.id,
|
30
|
-
name = _useRadioGroupContext.name,
|
31
|
-
contextDisabled = _useRadioGroupContext.disabled,
|
32
|
-
contextRequired = _useRadioGroupContext.required,
|
33
|
-
_onChange = _useRadioGroupContext.onChange,
|
34
|
-
contextValue = _useRadioGroupContext.value,
|
35
|
-
_useRadioGroupContext2 = _useRadioGroupContext.textPosition,
|
36
|
-
textPosition = _useRadioGroupContext2 === void 0 ? "left" : _useRadioGroupContext2,
|
37
|
-
descriptionId = _useRadioGroupContext.descriptionId,
|
38
|
-
state = _useRadioGroupContext.state,
|
39
|
-
ref = _useRadioGroupContext.ref;
|
40
|
-
var isFirstChild = props.childIndex === 0;
|
41
|
-
var isInvalid = (state === null || state === void 0 ? void 0 : state.status) === "invalid";
|
42
|
-
var checked = value === contextValue;
|
43
|
-
disabled = contextDisabled || disabled;
|
44
|
-
required = contextRequired || required;
|
45
|
-
var labelId = (0, _react.useMemo)(
|
46
|
-
// eslint-disable-next-line @algolia/stl/prefer-stl-helper
|
47
|
-
function () {
|
48
|
-
return (0, _uniqueId.uniqueId)("stl-radio-group-label-");
|
49
|
-
}, []);
|
50
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("label", {
|
51
|
-
className: (0, _satellitePrefixer["default"])(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n flex items-center justify-between\n min-h-10 px-4 py-2\n ", "\n ", "\n ", "\n ", ""])), disabled ? "text-grey-300" : "hover:bg-grey-100", disabled ? "cursor-not-allowed" : "cursor-pointer", textPosition === "right" && "flex-row-reverse", isInvalid && "hover:bg-red-50"),
|
52
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
53
|
-
id: labelId,
|
54
|
-
className: (0, _satellitePrefixer["default"])(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["flex-1 truncate ", ""])), textPosition === "right" ? "ml-2" : "mr-2"),
|
55
|
-
children: children
|
56
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_RadioButton.RadioButton, {
|
57
|
-
id: checked || isFirstChild && !contextValue ? id : undefined,
|
58
|
-
className: (0, _satellitePrefixer["default"])(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["shrink-0 self-start mt-1"]))),
|
59
|
-
value: value,
|
60
|
-
checked: checked,
|
61
|
-
name: name,
|
62
|
-
onChange: function onChange() {
|
63
|
-
if (!disabled && !checked) {
|
64
|
-
_onChange(value);
|
65
|
-
}
|
66
|
-
},
|
67
|
-
disabled: disabled,
|
68
|
-
required: required,
|
69
|
-
"aria-invalid": isInvalid,
|
70
|
-
"aria-labelledby": labelId,
|
71
|
-
"aria-describedby": descriptionId,
|
72
|
-
ref: isFirstChild ? ref : undefined
|
73
|
-
})]
|
74
|
-
});
|
75
|
-
};
|
76
|
-
|
19
|
+
var _templateObject, _templateObject2, _templateObject3;
|
77
20
|
// This function is used to clone the children of the `RadioGroup` component
|
78
21
|
// and pass the `childIndex` prop to the `RadioGroupItem` children.
|
79
22
|
function applyChildIndexRecursively(children) {
|
80
23
|
return _react.Children.map(children, function (child, index) {
|
81
24
|
var _child$props;
|
82
25
|
if (! /*#__PURE__*/(0, _react.isValidElement)(child)) return child;
|
83
|
-
if (child.type === RadioGroupItem) {
|
26
|
+
if (child.type === _RadioGroupItem.RadioGroupItem) {
|
84
27
|
return /*#__PURE__*/(0, _react.cloneElement)(child, {
|
85
28
|
childIndex: index
|
86
29
|
});
|
@@ -99,17 +42,17 @@ function applyChildIndexRecursively(children) {
|
|
99
42
|
*
|
100
43
|
* See the [Radio Group documentation page](https://satellite.algolia.com/components/controls/radio-group) for more information.
|
101
44
|
*/
|
102
|
-
var RadioGroup = exports.RadioGroup = /*#__PURE__*/(0, _react.forwardRef)(function (
|
103
|
-
var id =
|
104
|
-
className =
|
105
|
-
name =
|
106
|
-
value =
|
107
|
-
disabled =
|
108
|
-
|
109
|
-
required =
|
110
|
-
textPosition =
|
111
|
-
children =
|
112
|
-
onChange =
|
45
|
+
var RadioGroup = exports.RadioGroup = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
46
|
+
var id = _ref.id,
|
47
|
+
className = _ref.className,
|
48
|
+
name = _ref.name,
|
49
|
+
value = _ref.value,
|
50
|
+
disabled = _ref.disabled,
|
51
|
+
_ref$required = _ref.required,
|
52
|
+
required = _ref$required === void 0 ? false : _ref$required,
|
53
|
+
textPosition = _ref.textPosition,
|
54
|
+
children = _ref.children,
|
55
|
+
onChange = _ref.onChange;
|
113
56
|
var _useState = (0, _react.useState)(function () {
|
114
57
|
return (0, _uniqueId.uniqueId)("RadioGroupName-");
|
115
58
|
}),
|
@@ -138,13 +81,13 @@ var RadioGroup = exports.RadioGroup = /*#__PURE__*/(0, _react.forwardRef)(functi
|
|
138
81
|
};
|
139
82
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Layout.Card, {
|
140
83
|
fullBleed: true,
|
141
|
-
className: (0, _clsx["default"])(className, (0, _satellitePrefixer["default"])(
|
84
|
+
className: (0, _clsx["default"])(className, (0, _satellitePrefixer["default"])(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["border ", ""])), state.status === "invalid" ? "bg-red-100 border-red-700" : "border-transparent")),
|
142
85
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_RadioGroupContext.RadioGroupContext.Provider, {
|
143
86
|
value: contextValue,
|
144
87
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("fieldset", {
|
145
|
-
className: (0, _satellitePrefixer["default"])(
|
88
|
+
className: (0, _satellitePrefixer["default"])(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["min-w-0"]))),
|
146
89
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
147
|
-
className: (0, _satellitePrefixer["default"])(
|
90
|
+
className: (0, _satellitePrefixer["default"])(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["flex flex-col py-1"]))),
|
148
91
|
children: applyChildIndexRecursively(children)
|
149
92
|
})
|
150
93
|
})
|
@@ -152,4 +95,4 @@ var RadioGroup = exports.RadioGroup = /*#__PURE__*/(0, _react.forwardRef)(functi
|
|
152
95
|
});
|
153
96
|
});
|
154
97
|
RadioGroup.displayName = "RadioGroup";
|
155
|
-
RadioGroup.Item = RadioGroupItem;
|
98
|
+
RadioGroup.Item = _RadioGroupItem.RadioGroupItem;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import type { FC, PropsWithChildren } from "react";
|
2
|
+
export declare type RadioGroupItemProps = PropsWithChildren<{
|
3
|
+
/**
|
4
|
+
* The value of the `RadioGroupItem`.
|
5
|
+
*/
|
6
|
+
value: string;
|
7
|
+
/**
|
8
|
+
* Whether the `RadioGroupItem` is disabled.
|
9
|
+
*/
|
10
|
+
disabled?: boolean;
|
11
|
+
/**
|
12
|
+
* Whether the `RadioGroupItem` is required.
|
13
|
+
*/
|
14
|
+
required?: boolean;
|
15
|
+
}>;
|
16
|
+
export declare const RadioGroupItem: FC<RadioGroupItemProps>;
|
@@ -0,0 +1,71 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
5
|
+
value: true
|
6
|
+
});
|
7
|
+
exports.RadioGroupItem = void 0;
|
8
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
9
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
10
|
+
var _react = require("react");
|
11
|
+
var _satellitePrefixer = _interopRequireDefault(require("../../styles/helpers/satellitePrefixer"));
|
12
|
+
var _uniqueId = require("../../utils/uniqueId");
|
13
|
+
var _RadioButton = require("./RadioButton");
|
14
|
+
var _RadioGroupContext = require("./RadioGroupContext");
|
15
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
16
|
+
var _templateObject, _templateObject2, _templateObject3;
|
17
|
+
var _excluded = ["value", "disabled", "required", "children"];
|
18
|
+
var RadioGroupItem = exports.RadioGroupItem = function RadioGroupItem(_ref) {
|
19
|
+
var value = _ref.value,
|
20
|
+
disabled = _ref.disabled,
|
21
|
+
required = _ref.required,
|
22
|
+
children = _ref.children,
|
23
|
+
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
24
|
+
var _useRadioGroupContext = (0, _RadioGroupContext.useRadioGroupContext)(),
|
25
|
+
id = _useRadioGroupContext.id,
|
26
|
+
name = _useRadioGroupContext.name,
|
27
|
+
contextDisabled = _useRadioGroupContext.disabled,
|
28
|
+
contextRequired = _useRadioGroupContext.required,
|
29
|
+
_onChange = _useRadioGroupContext.onChange,
|
30
|
+
contextValue = _useRadioGroupContext.value,
|
31
|
+
_useRadioGroupContext2 = _useRadioGroupContext.textPosition,
|
32
|
+
textPosition = _useRadioGroupContext2 === void 0 ? "left" : _useRadioGroupContext2,
|
33
|
+
descriptionId = _useRadioGroupContext.descriptionId,
|
34
|
+
state = _useRadioGroupContext.state,
|
35
|
+
ref = _useRadioGroupContext.ref;
|
36
|
+
var isFirstChild = props.childIndex === 0;
|
37
|
+
var isInvalid = (state === null || state === void 0 ? void 0 : state.status) === "invalid";
|
38
|
+
var checked = value === contextValue;
|
39
|
+
disabled = contextDisabled || disabled;
|
40
|
+
required = contextRequired || required;
|
41
|
+
var labelId = (0, _react.useMemo)(
|
42
|
+
// eslint-disable-next-line @algolia/stl/prefer-stl-helper
|
43
|
+
function () {
|
44
|
+
return (0, _uniqueId.uniqueId)("stl-radio-group-label-");
|
45
|
+
}, []);
|
46
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("label", {
|
47
|
+
className: (0, _satellitePrefixer["default"])(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n flex items-center justify-between\n min-h-10 px-4 py-2\n ", "\n ", "\n ", "\n ", ""])), disabled ? "text-grey-300" : "hover:bg-grey-100", disabled ? "cursor-not-allowed" : "cursor-pointer", textPosition === "right" && "flex-row-reverse", isInvalid && "hover:bg-red-50"),
|
48
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
49
|
+
id: labelId,
|
50
|
+
className: (0, _satellitePrefixer["default"])(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["flex-1 truncate ", ""])), textPosition === "right" ? "ml-2" : "mr-2"),
|
51
|
+
children: children
|
52
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_RadioButton.RadioButton, {
|
53
|
+
id: checked || isFirstChild && !contextValue ? id : undefined,
|
54
|
+
className: (0, _satellitePrefixer["default"])(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["shrink-0 self-start mt-1"]))),
|
55
|
+
value: value,
|
56
|
+
checked: checked,
|
57
|
+
name: name,
|
58
|
+
onChange: function onChange() {
|
59
|
+
if (!disabled && !checked) {
|
60
|
+
_onChange(value);
|
61
|
+
}
|
62
|
+
},
|
63
|
+
disabled: disabled,
|
64
|
+
required: required,
|
65
|
+
"aria-invalid": isInvalid,
|
66
|
+
"aria-labelledby": labelId,
|
67
|
+
"aria-describedby": descriptionId,
|
68
|
+
ref: isFirstChild ? ref : undefined
|
69
|
+
})]
|
70
|
+
});
|
71
|
+
};
|
@@ -24,4 +24,15 @@ Object.keys(_RadioButton).forEach(function (key) {
|
|
24
24
|
return _RadioButton[key];
|
25
25
|
}
|
26
26
|
});
|
27
|
+
});
|
28
|
+
var _RadioGroupItem = require("./RadioGroupItem");
|
29
|
+
Object.keys(_RadioGroupItem).forEach(function (key) {
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
31
|
+
if (key in exports && exports[key] === _RadioGroupItem[key]) return;
|
32
|
+
Object.defineProperty(exports, key, {
|
33
|
+
enumerable: true,
|
34
|
+
get: function get() {
|
35
|
+
return _RadioGroupItem[key];
|
36
|
+
}
|
37
|
+
});
|
27
38
|
});
|
@@ -2,23 +2,65 @@ import type { ForwardedRef } from "react";
|
|
2
2
|
declare type RangeSliderValue = number | [number, number];
|
3
3
|
declare type WidenNumber<T> = T extends number ? number : T;
|
4
4
|
export interface RangeSliderProps<Value extends RangeSliderValue = number> {
|
5
|
+
/**
|
6
|
+
* The value of the `RangeSlider`.
|
7
|
+
*/
|
5
8
|
value?: WidenNumber<Value>;
|
9
|
+
/**
|
10
|
+
* The default value of the `RangeSlider`.
|
11
|
+
*/
|
6
12
|
defaultValue?: WidenNumber<Value>;
|
7
|
-
/**
|
13
|
+
/**
|
14
|
+
* Event handler called when the value changes.
|
15
|
+
*/
|
8
16
|
onChange?: (value: WidenNumber<Value>) => void;
|
9
|
-
/**
|
17
|
+
/**
|
18
|
+
* Event handler called when the value changes at the end of an interaction.
|
19
|
+
*/
|
10
20
|
onCommit?: (value: WidenNumber<Value>) => void;
|
21
|
+
/**
|
22
|
+
* The id of the `RangeSlider`.
|
23
|
+
*/
|
11
24
|
id?: string;
|
25
|
+
/**
|
26
|
+
* The name of the `RangeSlider`.
|
27
|
+
*/
|
12
28
|
name?: string;
|
13
|
-
/**
|
29
|
+
/**
|
30
|
+
* The class name of the `RangeSlider`.
|
31
|
+
*/
|
14
32
|
className?: string;
|
33
|
+
/**
|
34
|
+
* Whether the `RangeSlider` is disabled.
|
35
|
+
*/
|
15
36
|
disabled?: boolean;
|
37
|
+
/**
|
38
|
+
* Whether the `RangeSlider` is required.
|
39
|
+
*/
|
16
40
|
required?: boolean;
|
41
|
+
/**
|
42
|
+
* The minimum value for the range.
|
43
|
+
*/
|
17
44
|
min?: number;
|
45
|
+
/**
|
46
|
+
* The maximum value for the range.
|
47
|
+
*/
|
18
48
|
max?: number;
|
49
|
+
/**
|
50
|
+
* The stepping interval for the range.
|
51
|
+
*/
|
19
52
|
step?: number;
|
53
|
+
/**
|
54
|
+
* The minimum permitted steps between multiple thumbs.
|
55
|
+
*/
|
20
56
|
minStepsBetweenThumbs?: number;
|
57
|
+
/**
|
58
|
+
* The color of the first track of the `RangeSlider`.
|
59
|
+
*/
|
21
60
|
track1Color?: string;
|
61
|
+
/**
|
62
|
+
* The color of the second track of the `RangeSlider`.
|
63
|
+
*/
|
22
64
|
track2Color?: string;
|
23
65
|
}
|
24
66
|
declare const RangeSliderInternal: <Value extends RangeSliderValue = number>({ id, className, value, defaultValue, onChange, onCommit, disabled, required, min, max, track1Color, track2Color, ...otherProps }: RangeSliderProps<Value>, ref: ForwardedRef<HTMLSpanElement>) => import("react/jsx-runtime").JSX.Element;
|
@@ -28,6 +70,9 @@ declare const RangeSliderInternal: <Value extends RangeSliderValue = number>({ i
|
|
28
70
|
* See the [Range Slider documentation page](https://satellite.algolia.com/components/controls/range-slider) for more information.
|
29
71
|
*/
|
30
72
|
export declare const RangeSlider: (<Value extends RangeSliderValue>(props: RangeSliderProps<Value> & {
|
73
|
+
/**
|
74
|
+
* The ref of the `RangeSlider`.
|
75
|
+
*/
|
31
76
|
ref?: ForwardedRef<HTMLSpanElement> | undefined;
|
32
77
|
}) => ReturnType<typeof RangeSliderInternal>) & {
|
33
78
|
displayName?: string | undefined;
|
@@ -1,6 +1,9 @@
|
|
1
1
|
import type { SelectHTMLAttributes } from "react";
|
2
2
|
export declare type SelectVariants = "small" | "medium" | "large";
|
3
3
|
export interface SelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
|
4
|
+
/**
|
5
|
+
* The variant of the `Select`.
|
6
|
+
*/
|
4
7
|
variant?: SelectVariants;
|
5
8
|
}
|
6
9
|
/**
|
@@ -1,5 +1,21 @@
|
|
1
1
|
import type { TextareaHTMLAttributes } from "react";
|
2
2
|
export interface TextAreaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
3
|
+
/**
|
4
|
+
* Whether the `TextArea` is required.
|
5
|
+
*/
|
6
|
+
required?: boolean;
|
7
|
+
/**
|
8
|
+
* The value of the `TextArea`.
|
9
|
+
*/
|
10
|
+
value?: string;
|
11
|
+
/**
|
12
|
+
* The placeholder of the `TextArea`.
|
13
|
+
*/
|
14
|
+
placeholder?: string;
|
15
|
+
/**
|
16
|
+
* Whether the `TextArea` is disabled.
|
17
|
+
*/
|
18
|
+
disabled?: boolean;
|
3
19
|
}
|
4
20
|
export declare type TextareaStatus = "default" | "validated" | "invalid";
|
5
21
|
/**
|