@taiv/ui 1.15.0 → 2.1.0
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/assets/assets.d.ts +12 -1
- package/dist/assets/assets.d.ts.map +1 -1
- package/dist/assets/assets.js +22 -16
- package/dist/assets/brand/taiv-favicon-dark.png +0 -0
- package/dist/assets/brand/taiv-favicon-light.png +0 -0
- package/dist/assets/brand/taiv-icon-black.svg +10 -0
- package/dist/assets/brand/taiv-icon-dark.svg +17 -0
- package/dist/assets/brand/taiv-icon-white.svg +17 -0
- package/dist/assets/brand/taiv-logo-black.svg +16 -0
- package/dist/assets/brand/taiv-logo-dark.svg +23 -0
- package/dist/assets/brand/taiv-logo-old.svg +1 -0
- package/dist/assets/brand/taiv-logo-purple.svg +16 -0
- package/dist/assets/brand/taiv-logo-white.svg +23 -0
- package/dist/assets/icons.d.ts +1 -1
- package/dist/assets/icons.d.ts.map +1 -1
- package/dist/assets/icons.js +57 -53
- package/dist/assets/index.d.ts +3 -0
- package/dist/assets/index.d.ts.map +1 -0
- package/dist/assets/index.js +2 -0
- package/dist/components/Data/BigCalendar/BigCalendar.d.ts +26 -0
- package/dist/components/Data/BigCalendar/BigCalendar.d.ts.map +1 -0
- package/dist/components/Data/BigCalendar/BigCalendar.js +92 -0
- package/dist/components/Data/BigCalendar/BigCalendar.stories.d.ts +8 -0
- package/dist/components/Data/BigCalendar/BigCalendar.stories.d.ts.map +1 -0
- package/dist/components/Data/BigCalendar/BigCalendar.stories.js +77 -0
- package/dist/components/Data/Calendar/Calendar.d.ts +102 -0
- package/dist/components/Data/Calendar/Calendar.d.ts.map +1 -0
- package/dist/components/Data/Calendar/Calendar.js +671 -0
- package/dist/components/Data/Calendar/Calendar.stories.d.ts +10 -0
- package/dist/components/Data/Calendar/Calendar.stories.d.ts.map +1 -0
- package/dist/components/Data/Calendar/Calendar.stories.js +87 -0
- package/dist/components/Data/Cards/StatsCard/StatsCard.d.ts +1 -1
- package/dist/components/Data/Cards/StatsCard/StatsCard.d.ts.map +1 -1
- package/dist/components/Data/CheckboxTable/CheckboxTable.d.ts +1 -1
- package/dist/components/Data/CheckboxTable/CheckboxTable.d.ts.map +1 -1
- package/dist/components/Data/MediaPill/MediaPill.d.ts +27 -0
- package/dist/components/Data/MediaPill/MediaPill.d.ts.map +1 -0
- package/dist/components/Data/MediaPill/MediaPill.js +53 -0
- package/dist/components/Data/MediaPill/MediaPill.stories.d.ts +10 -0
- package/dist/components/Data/MediaPill/MediaPill.stories.d.ts.map +1 -0
- package/dist/components/Data/MediaPill/MediaPill.stories.js +51 -0
- package/dist/components/Data/Progress/Progress.d.ts +1 -1
- package/dist/components/Data/Progress/Progress.d.ts.map +1 -1
- package/dist/components/Data/RemovableItemList/RemovableItemList.d.ts +1 -1
- package/dist/components/Data/RemovableItemList/RemovableItemList.d.ts.map +1 -1
- package/dist/components/Data/StatsBadge/StatsBadge.d.ts +2 -1
- package/dist/components/Data/StatsBadge/StatsBadge.d.ts.map +1 -1
- package/dist/components/Info/Avatar/Avatar.d.ts +9 -0
- package/dist/components/Info/Avatar/Avatar.d.ts.map +1 -0
- package/dist/components/Info/Avatar/Avatar.js +36 -0
- package/dist/components/Info/Avatar/Avatar.stories.d.ts +9 -0
- package/dist/components/Info/Avatar/Avatar.stories.d.ts.map +1 -0
- package/dist/components/Info/Avatar/Avatar.stories.js +78 -0
- package/dist/components/Info/Badge/Badge.d.ts +1 -1
- package/dist/components/Info/Badge/Badge.d.ts.map +1 -1
- package/dist/components/Info/Badge/Badge.stories.d.ts.map +1 -1
- package/dist/components/Info/Badge/Badge.stories.js +21 -6
- package/dist/components/Info/Badge/sizes.d.ts +10 -10
- package/dist/components/Info/Badge/sizes.js +16 -16
- package/dist/components/Info/Badge/variants.d.ts +4 -4
- package/dist/components/Info/Badge/variants.d.ts.map +1 -1
- package/dist/components/Info/Badge/variants.js +26 -13
- package/dist/components/Info/Drawer/Drawer.d.ts +24 -0
- package/dist/components/Info/Drawer/Drawer.d.ts.map +1 -0
- package/dist/components/Info/Drawer/Drawer.js +44 -0
- package/dist/components/Info/Drawer/Drawer.stories.d.ts +10 -0
- package/dist/components/Info/Drawer/Drawer.stories.d.ts.map +1 -0
- package/dist/components/Info/Drawer/Drawer.stories.js +47 -0
- package/dist/components/Info/HoverCard/HoverCard.d.ts +16 -0
- package/dist/components/Info/HoverCard/HoverCard.d.ts.map +1 -0
- package/dist/components/Info/HoverCard/HoverCard.js +26 -0
- package/dist/components/Info/HoverCard/HoverCard.stories.d.ts +11 -0
- package/dist/components/Info/HoverCard/HoverCard.stories.d.ts.map +1 -0
- package/dist/components/Info/HoverCard/HoverCard.stories.js +86 -0
- package/dist/components/Info/HoverCard/HoverCardMenuItem.d.ts +12 -0
- package/dist/components/Info/HoverCard/HoverCardMenuItem.d.ts.map +1 -0
- package/dist/components/Info/HoverCard/HoverCardMenuItem.js +22 -0
- package/dist/components/Info/Indicator/Indicator.d.ts +3 -0
- package/dist/components/Info/Indicator/Indicator.d.ts.map +1 -0
- package/dist/components/Info/Indicator/Indicator.js +1 -0
- package/dist/components/Info/Indicator/Indicator.stories.d.ts +11 -0
- package/dist/components/Info/Indicator/Indicator.stories.d.ts.map +1 -0
- package/dist/components/Info/Indicator/Indicator.stories.js +123 -0
- package/dist/components/Info/InfoCard/InfoCard.d.ts +3 -3
- package/dist/components/Info/InfoCard/InfoCard.d.ts.map +1 -1
- package/dist/components/Info/InfoCard/InfoCard.js +5 -5
- package/dist/components/Info/MobileDrawer/MobileDrawer.d.ts +30 -0
- package/dist/components/Info/MobileDrawer/MobileDrawer.d.ts.map +1 -0
- package/dist/components/Info/MobileDrawer/MobileDrawer.js +52 -0
- package/dist/components/Info/MobileDrawer/MobileDrawer.stories.d.ts +9 -0
- package/dist/components/Info/MobileDrawer/MobileDrawer.stories.d.ts.map +1 -0
- package/dist/components/Info/MobileDrawer/MobileDrawer.stories.js +38 -0
- package/dist/components/Info/Modals/FormModal/FormModal.d.ts +17 -1
- package/dist/components/Info/Modals/FormModal/FormModal.d.ts.map +1 -1
- package/dist/components/Info/Modals/FormModal/FormModal.js +30 -12
- package/dist/components/Info/Modals/FormModalV2/FormModalV2.d.ts +60 -0
- package/dist/components/Info/Modals/FormModalV2/FormModalV2.d.ts.map +1 -0
- package/dist/components/Info/Modals/FormModalV2/FormModalV2.js +96 -0
- package/dist/components/Info/Modals/Modal/Modal.d.ts +1 -1
- package/dist/components/Info/Modals/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Info/Modals/Modal/Modal.js +9 -1
- package/dist/components/Info/Modals/ModalProvider/ModalProvider.d.ts +1 -1
- package/dist/components/Info/Modals/ModalProvider/ModalProvider.d.ts.map +1 -1
- package/dist/components/Info/Modals/StepperModal/StepperModal.d.ts +1 -1
- package/dist/components/Info/Modals/StepperModal/StepperModal.d.ts.map +1 -1
- package/dist/components/Info/Modals/variants.d.ts +61 -41
- package/dist/components/Info/Modals/variants.d.ts.map +1 -1
- package/dist/components/Info/Modals/variants.js +58 -38
- package/dist/components/Info/Notifications/NotificationProvider/NotificationProvider.d.ts +2 -1
- package/dist/components/Info/Notifications/NotificationProvider/NotificationProvider.d.ts.map +1 -1
- package/dist/components/Info/Notifications/Notifications.stories.d.ts +1 -0
- package/dist/components/Info/Notifications/Notifications.stories.d.ts.map +1 -1
- package/dist/components/Info/Notifications/Notifications.stories.js +31 -0
- package/dist/components/Info/Notifications/variants.d.ts +30 -23
- package/dist/components/Info/Notifications/variants.d.ts.map +1 -1
- package/dist/components/Info/Notifications/variants.js +30 -24
- package/dist/components/Info/ResponsiveDrawer/ResponsiveDrawer.d.ts +37 -0
- package/dist/components/Info/ResponsiveDrawer/ResponsiveDrawer.d.ts.map +1 -0
- package/dist/components/Info/ResponsiveDrawer/ResponsiveDrawer.js +17 -0
- package/dist/components/Info/ResponsiveDrawer/ResponsiveDrawer.stories.d.ts +7 -0
- package/dist/components/Info/ResponsiveDrawer/ResponsiveDrawer.stories.d.ts.map +1 -0
- package/dist/components/Info/ResponsiveDrawer/ResponsiveDrawer.stories.js +26 -0
- package/dist/components/Info/Tooltips/FormulaTooltip/FormulaTooltip.d.ts +2 -1
- package/dist/components/Info/Tooltips/FormulaTooltip/FormulaTooltip.d.ts.map +1 -1
- package/dist/components/Info/Tooltips/InfoTooltip/InfoTooltip.d.ts +2 -2
- package/dist/components/Info/Tooltips/InfoTooltip/InfoTooltip.d.ts.map +1 -1
- package/dist/components/Info/Tooltips/InfoTooltip/InfoTooltip.js +9 -3
- package/dist/components/Info/Tooltips/Popover/Popover.d.ts +16 -0
- package/dist/components/Info/Tooltips/Popover/Popover.d.ts.map +1 -0
- package/dist/components/Info/Tooltips/Popover/Popover.js +32 -0
- package/dist/components/Info/Tooltips/Tooltip/Tooltip.d.ts +5 -1
- package/dist/components/Info/Tooltips/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/Info/Tooltips/Tooltip/Tooltip.js +10 -8
- package/dist/components/Inputs/Buttons/Button/Button.d.ts +3 -1
- package/dist/components/Inputs/Buttons/Button/Button.d.ts.map +1 -1
- package/dist/components/Inputs/Buttons/Button/Button.js +38 -5
- package/dist/components/Inputs/Buttons/Button/Button.stories.d.ts +1 -0
- package/dist/components/Inputs/Buttons/Button/Button.stories.d.ts.map +1 -1
- package/dist/components/Inputs/Buttons/Button/Button.stories.js +105 -79
- package/dist/components/Inputs/Buttons/IconButton/IconButton.d.ts +7 -2
- package/dist/components/Inputs/Buttons/IconButton/IconButton.d.ts.map +1 -1
- package/dist/components/Inputs/Buttons/IconButton/IconButton.js +35 -11
- package/dist/components/Inputs/Buttons/IconButton/IconButton.stories.d.ts +1 -0
- package/dist/components/Inputs/Buttons/IconButton/IconButton.stories.d.ts.map +1 -1
- package/dist/components/Inputs/Buttons/IconButton/IconButton.stories.js +100 -74
- package/dist/components/Inputs/Buttons/IconButton/sizes.d.ts +15 -0
- package/dist/components/Inputs/Buttons/IconButton/sizes.d.ts.map +1 -1
- package/dist/components/Inputs/Buttons/IconButton/sizes.js +3 -0
- package/dist/components/Inputs/Buttons/SSOButton/SSOButton.d.ts +2 -2
- package/dist/components/Inputs/Buttons/SSOButton/SSOButton.d.ts.map +1 -1
- package/dist/components/Inputs/Buttons/UnstyledButton/UnstyledButton.d.ts +1 -1
- package/dist/components/Inputs/Buttons/UnstyledButton/UnstyledButton.d.ts.map +1 -1
- package/dist/components/Inputs/Buttons/shared/variants.d.ts +399 -164
- package/dist/components/Inputs/Buttons/shared/variants.d.ts.map +1 -1
- package/dist/components/Inputs/Buttons/shared/variants.js +353 -143
- package/dist/components/Inputs/ColorPickerTrigger/ColorPickerTrigger.d.ts +41 -0
- package/dist/components/Inputs/ColorPickerTrigger/ColorPickerTrigger.d.ts.map +1 -0
- package/dist/components/Inputs/ColorPickerTrigger/ColorPickerTrigger.js +139 -0
- package/dist/components/Inputs/ColorPickerTrigger/ColorPickerTrigger.stories.d.ts +13 -0
- package/dist/components/Inputs/ColorPickerTrigger/ColorPickerTrigger.stories.d.ts.map +1 -0
- package/dist/components/Inputs/ColorPickerTrigger/ColorPickerTrigger.stories.js +75 -0
- package/dist/components/Inputs/ColorSwatch/ColorSwatch.d.ts +27 -0
- package/dist/components/Inputs/ColorSwatch/ColorSwatch.d.ts.map +1 -0
- package/dist/components/Inputs/ColorSwatch/ColorSwatch.js +46 -0
- package/dist/components/Inputs/Controls/Checkbox/Checkbox.d.ts +2 -1
- package/dist/components/Inputs/Controls/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/Inputs/Controls/DaysOfWeek/DaysOfWeek.d.ts +32 -0
- package/dist/components/Inputs/Controls/DaysOfWeek/DaysOfWeek.d.ts.map +1 -0
- package/dist/components/Inputs/Controls/DaysOfWeek/DaysOfWeek.js +92 -0
- package/dist/components/Inputs/Controls/Radio/Radio.d.ts +2 -1
- package/dist/components/Inputs/Controls/Radio/Radio.d.ts.map +1 -1
- package/dist/components/Inputs/Controls/RadioList/RadioList.d.ts +1 -1
- package/dist/components/Inputs/Controls/RadioList/RadioList.d.ts.map +1 -1
- package/dist/components/Inputs/Controls/SegmentedControl/SegmentedControl.d.ts +13 -9
- package/dist/components/Inputs/Controls/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/components/Inputs/Controls/SegmentedControl/SegmentedControl.js +20 -12
- package/dist/components/Inputs/Controls/Toggle/Toggle.d.ts +25 -11
- package/dist/components/Inputs/Controls/Toggle/Toggle.d.ts.map +1 -1
- package/dist/components/Inputs/Controls/Toggle/Toggle.js +67 -20
- package/dist/components/Inputs/Controls/Toggle/Toggle.stories.d.ts +1 -0
- package/dist/components/Inputs/Controls/Toggle/Toggle.stories.d.ts.map +1 -1
- package/dist/components/Inputs/Controls/Toggle/Toggle.stories.js +86 -69
- package/dist/components/Inputs/Dates/DatePicker/DatePicker.d.ts +2 -1
- package/dist/components/Inputs/Dates/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/Inputs/Dates/DatePicker/DatePicker.js +23 -7
- package/dist/components/Inputs/Dates/DateTimePicker/DateTimePicker.d.ts +13 -0
- package/dist/components/Inputs/Dates/DateTimePicker/DateTimePicker.d.ts.map +1 -0
- package/dist/components/Inputs/Dates/DateTimePicker/DateTimePicker.js +87 -0
- package/dist/components/Inputs/Dates/DateTimePicker/DateTimePicker.stories.d.ts +13 -0
- package/dist/components/Inputs/Dates/DateTimePicker/DateTimePicker.stories.d.ts.map +1 -0
- package/dist/components/Inputs/Dates/DateTimePicker/DateTimePicker.stories.js +239 -0
- package/dist/components/Inputs/Dates/TimeInput/TimeInput.d.ts +20 -0
- package/dist/components/Inputs/Dates/TimeInput/TimeInput.d.ts.map +1 -0
- package/dist/components/Inputs/Dates/TimeInput/TimeInput.js +51 -0
- package/dist/components/Inputs/Dropdowns/CascadingSelect/CascadingSelect.d.ts +1 -1
- package/dist/components/Inputs/Dropdowns/CascadingSelect/CascadingSelect.d.ts.map +1 -1
- package/dist/components/Inputs/Dropdowns/FontSelect/FontSelect.d.ts +2 -1
- package/dist/components/Inputs/Dropdowns/FontSelect/FontSelect.d.ts.map +1 -1
- package/dist/components/Inputs/Dropdowns/FontSelect/FontSelect.js +8 -1
- package/dist/components/Inputs/Dropdowns/MultiSelect/MultiSelect.d.ts +4 -3
- package/dist/components/Inputs/Dropdowns/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/components/Inputs/Dropdowns/MultiSelect/MultiSelect.js +76 -57
- package/dist/components/Inputs/Dropdowns/Select/Select.d.ts +2 -1
- package/dist/components/Inputs/Dropdowns/Select/Select.d.ts.map +1 -1
- package/dist/components/Inputs/Dropdowns/Select/Select.js +5 -3
- package/dist/components/Inputs/Dropzone/Dropzone.d.ts +24 -0
- package/dist/components/Inputs/Dropzone/Dropzone.d.ts.map +1 -0
- package/dist/components/Inputs/Dropzone/Dropzone.js +44 -0
- package/dist/components/Inputs/Dropzone/Dropzone.stories.d.ts +12 -0
- package/dist/components/Inputs/Dropzone/Dropzone.stories.d.ts.map +1 -0
- package/dist/components/Inputs/Dropzone/Dropzone.stories.js +114 -0
- package/dist/components/Inputs/Sliders/Slider/Slider.d.ts +1 -1
- package/dist/components/Inputs/Sliders/Slider/Slider.d.ts.map +1 -1
- package/dist/components/Inputs/Sliders/VolumeSlider/VolumeSlider.d.ts +2 -1
- package/dist/components/Inputs/Sliders/VolumeSlider/VolumeSlider.d.ts.map +1 -1
- package/dist/components/Inputs/TextInputs/AutoComplete/AutoComplete.d.ts +2 -1
- package/dist/components/Inputs/TextInputs/AutoComplete/AutoComplete.d.ts.map +1 -1
- package/dist/components/Inputs/TextInputs/NumberInput/NumberInput.d.ts +2 -1
- package/dist/components/Inputs/TextInputs/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/components/Inputs/TextInputs/NumberInput/NumberInput.js +4 -1
- package/dist/components/Inputs/TextInputs/NumberInput/ResponsiveNumberInput.d.ts +46 -0
- package/dist/components/Inputs/TextInputs/NumberInput/ResponsiveNumberInput.d.ts.map +1 -0
- package/dist/components/Inputs/TextInputs/NumberInput/ResponsiveNumberInput.js +60 -0
- package/dist/components/Inputs/TextInputs/PasswordInput/PasswordInput.d.ts +2 -1
- package/dist/components/Inputs/TextInputs/PasswordInput/PasswordInput.d.ts.map +1 -1
- package/dist/components/Inputs/TextInputs/SearchBar/SearchBar.d.ts +2 -1
- package/dist/components/Inputs/TextInputs/SearchBar/SearchBar.d.ts.map +1 -1
- package/dist/components/Inputs/TextInputs/TextArea/TextArea.d.ts +2 -1
- package/dist/components/Inputs/TextInputs/TextArea/TextArea.d.ts.map +1 -1
- package/dist/components/Inputs/TextInputs/TextInput/TextInput.d.ts +2 -1
- package/dist/components/Inputs/TextInputs/TextInput/TextInput.d.ts.map +1 -1
- package/dist/components/Layout/Accordion/Accordion.d.ts +16 -0
- package/dist/components/Layout/Accordion/Accordion.d.ts.map +1 -0
- package/dist/components/Layout/Accordion/Accordion.js +63 -0
- package/dist/components/Layout/Accordion/Accordion.stories.d.ts +11 -0
- package/dist/components/Layout/Accordion/Accordion.stories.d.ts.map +1 -0
- package/dist/components/Layout/Accordion/Accordion.stories.js +148 -0
- package/dist/components/Layout/AutoGrid/AutoGrid.d.ts +20 -5
- package/dist/components/Layout/AutoGrid/AutoGrid.d.ts.map +1 -1
- package/dist/components/Layout/AutoGrid/AutoGrid.js +51 -3
- package/dist/components/Layout/AutoGrid/AutoGrid.stories.d.ts +1 -0
- package/dist/components/Layout/AutoGrid/AutoGrid.stories.d.ts.map +1 -1
- package/dist/components/Layout/AutoGrid/AutoGrid.stories.js +39 -29
- package/dist/components/Layout/BottomActionBar/BottomActionBar.d.ts +40 -0
- package/dist/components/Layout/BottomActionBar/BottomActionBar.d.ts.map +1 -0
- package/dist/components/Layout/BottomActionBar/BottomActionBar.js +79 -0
- package/dist/components/Layout/BottomActionBar/BottomActionBar.stories.d.ts +10 -0
- package/dist/components/Layout/BottomActionBar/BottomActionBar.stories.d.ts.map +1 -0
- package/dist/components/Layout/BottomActionBar/BottomActionBar.stories.js +102 -0
- package/dist/components/Layout/Box/Box.d.ts +2 -1
- package/dist/components/Layout/Box/Box.d.ts.map +1 -1
- package/dist/components/Layout/Card/Card.d.ts +2 -2
- package/dist/components/Layout/Card/Card.d.ts.map +1 -1
- package/dist/components/Layout/Center/Center.d.ts +2 -1
- package/dist/components/Layout/Center/Center.d.ts.map +1 -1
- package/dist/components/Layout/Container/Container.d.ts +3 -0
- package/dist/components/Layout/Container/Container.d.ts.map +1 -0
- package/dist/components/Layout/Container/Container.js +1 -0
- package/dist/components/Layout/Container/Container.stories.d.ts +8 -0
- package/dist/components/Layout/Container/Container.stories.d.ts.map +1 -0
- package/dist/components/Layout/Container/Container.stories.js +52 -0
- package/dist/components/Layout/DataState/DataState.d.ts +34 -0
- package/dist/components/Layout/DataState/DataState.d.ts.map +1 -0
- package/dist/components/Layout/DataState/DataState.js +22 -0
- package/dist/components/Layout/DataState/DataState.stories.d.ts +11 -0
- package/dist/components/Layout/DataState/DataState.stories.d.ts.map +1 -0
- package/dist/components/Layout/DataState/DataState.stories.js +38 -0
- package/dist/components/Layout/Divider/Divider.d.ts +2 -1
- package/dist/components/Layout/Divider/Divider.d.ts.map +1 -1
- package/dist/components/Layout/Divider/Divider.js +4 -2
- package/dist/components/Layout/Frame/Frame.d.ts +2 -1
- package/dist/components/Layout/Frame/Frame.d.ts.map +1 -1
- package/dist/components/Layout/Grid/Grid.d.ts +1 -1
- package/dist/components/Layout/Group/Group.d.ts +3 -2
- package/dist/components/Layout/Group/Group.d.ts.map +1 -1
- package/dist/components/Layout/Loader/Loader.d.ts +2 -1
- package/dist/components/Layout/Loader/Loader.d.ts.map +1 -1
- package/dist/components/Layout/Loader/Loader.js +3 -2
- package/dist/components/Layout/Navbar/Navbar.d.ts +15 -0
- package/dist/components/Layout/Navbar/Navbar.d.ts.map +1 -0
- package/dist/components/Layout/Navbar/Navbar.js +20 -0
- package/dist/components/Layout/Navbar/Navbar.stories.d.ts +9 -0
- package/dist/components/Layout/Navbar/Navbar.stories.d.ts.map +1 -0
- package/dist/components/Layout/Navbar/Navbar.stories.js +98 -0
- package/dist/components/Layout/Page/Page.d.ts +13 -0
- package/dist/components/Layout/Page/Page.d.ts.map +1 -0
- package/dist/components/Layout/Page/Page.js +13 -0
- package/dist/components/Layout/Pagination/Pagination.d.ts +24 -0
- package/dist/components/Layout/Pagination/Pagination.d.ts.map +1 -0
- package/dist/components/Layout/Pagination/Pagination.js +53 -0
- package/dist/components/Layout/Pagination/Pagination.stories.d.ts +10 -0
- package/dist/components/Layout/Pagination/Pagination.stories.d.ts.map +1 -0
- package/dist/components/Layout/Pagination/Pagination.stories.js +76 -0
- package/dist/components/Layout/ScrollArea/ScrollArea.d.ts +3 -0
- package/dist/components/Layout/ScrollArea/ScrollArea.d.ts.map +1 -0
- package/dist/components/Layout/ScrollArea/ScrollArea.js +1 -0
- package/dist/components/Layout/ScrollArea/ScrollArea.stories.d.ts +8 -0
- package/dist/components/Layout/ScrollArea/ScrollArea.stories.d.ts.map +1 -0
- package/dist/components/Layout/ScrollArea/ScrollArea.stories.js +62 -0
- package/dist/components/Layout/SectionCard/SectionCard.d.ts +1 -1
- package/dist/components/Layout/SectionCard/SectionCard.d.ts.map +1 -1
- package/dist/components/Layout/Stack/Stack.d.ts +2 -1
- package/dist/components/Layout/Stack/Stack.d.ts.map +1 -1
- package/dist/components/Layout/Table/Table.d.ts +1 -1
- package/dist/components/Layout/Table/Table.d.ts.map +1 -1
- package/dist/components/Layout/Tabs/Tabs.d.ts +16 -5
- package/dist/components/Layout/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Layout/Tabs/Tabs.js +53 -18
- package/dist/components/Layout/Tabs/Tabs.stories.d.ts.map +1 -1
- package/dist/components/Layout/Tabs/Tabs.stories.js +39 -39
- package/dist/components/Layout/VirtualGrid/VirtualGrid.d.ts +63 -0
- package/dist/components/Layout/VirtualGrid/VirtualGrid.d.ts.map +1 -0
- package/dist/components/Layout/VirtualGrid/VirtualGrid.js +159 -0
- package/dist/components/Misc/Burger/Burger.d.ts +6 -0
- package/dist/components/Misc/Burger/Burger.d.ts.map +1 -0
- package/dist/components/Misc/Burger/Burger.js +7 -0
- package/dist/components/Misc/Burger/Burger.stories.d.ts +10 -0
- package/dist/components/Misc/Burger/Burger.stories.d.ts.map +1 -0
- package/dist/components/Misc/Burger/Burger.stories.js +86 -0
- package/dist/components/Misc/Carousel/Carousel.d.ts +32 -0
- package/dist/components/Misc/Carousel/Carousel.d.ts.map +1 -0
- package/dist/components/Misc/Carousel/Carousel.js +16 -0
- package/dist/components/Misc/DragHandle/DragHandle.d.ts +19 -0
- package/dist/components/Misc/DragHandle/DragHandle.d.ts.map +1 -0
- package/dist/components/Misc/DragHandle/DragHandle.js +39 -0
- package/dist/components/Misc/DragHandle/DragHandle.stories.d.ts +9 -0
- package/dist/components/Misc/DragHandle/DragHandle.stories.d.ts.map +1 -0
- package/dist/components/Misc/DragHandle/DragHandle.stories.js +54 -0
- package/dist/components/Misc/FAB/FAB.d.ts +54 -0
- package/dist/components/Misc/FAB/FAB.d.ts.map +1 -0
- package/dist/components/Misc/FAB/FAB.js +53 -0
- package/dist/components/Misc/FAB/FAB.stories.d.ts +10 -0
- package/dist/components/Misc/FAB/FAB.stories.d.ts.map +1 -0
- package/dist/components/Misc/FAB/FAB.stories.js +100 -0
- package/dist/components/Misc/FloatingToolbar/FloatingToolbar.d.ts +50 -0
- package/dist/components/Misc/FloatingToolbar/FloatingToolbar.d.ts.map +1 -0
- package/dist/components/Misc/FloatingToolbar/FloatingToolbar.js +40 -0
- package/dist/components/Misc/FloatingToolbar/FloatingToolbar.stories.d.ts +9 -0
- package/dist/components/Misc/FloatingToolbar/FloatingToolbar.stories.d.ts.map +1 -0
- package/dist/components/Misc/FloatingToolbar/FloatingToolbar.stories.js +53 -0
- package/dist/components/Misc/HoverAction/HoverAction.d.ts +50 -0
- package/dist/components/Misc/HoverAction/HoverAction.d.ts.map +1 -0
- package/dist/components/Misc/HoverAction/HoverAction.js +61 -0
- package/dist/components/Misc/HoverAction/HoverAction.stories.d.ts +12 -0
- package/dist/components/Misc/HoverAction/HoverAction.stories.d.ts.map +1 -0
- package/dist/components/Misc/HoverAction/HoverAction.stories.js +96 -0
- package/dist/components/Misc/IconBadge/IconBadge.d.ts +1 -1
- package/dist/components/Misc/IconBadge/IconBadge.d.ts.map +1 -1
- package/dist/components/Misc/IconBadge/IconBadge.js +8 -6
- package/dist/components/Misc/Image/Image.d.ts +3 -0
- package/dist/components/Misc/Image/Image.d.ts.map +1 -0
- package/dist/components/Misc/Image/Image.js +1 -0
- package/dist/components/Misc/Image/Image.stories.d.ts +11 -0
- package/dist/components/Misc/Image/Image.stories.d.ts.map +1 -0
- package/dist/components/Misc/Image/Image.stories.js +63 -0
- package/dist/components/Misc/Kbd/Kbd.d.ts +7 -0
- package/dist/components/Misc/Kbd/Kbd.d.ts.map +1 -0
- package/dist/components/Misc/Kbd/Kbd.js +16 -0
- package/dist/components/Misc/Kbd/Kbd.stories.d.ts +9 -0
- package/dist/components/Misc/Kbd/Kbd.stories.d.ts.map +1 -0
- package/dist/components/Misc/Kbd/Kbd.stories.js +52 -0
- package/dist/components/Misc/LoadingOverlay/LoadingOverlay.d.ts +2 -1
- package/dist/components/Misc/LoadingOverlay/LoadingOverlay.d.ts.map +1 -1
- package/dist/components/Misc/Menu/Menu.d.ts +17 -0
- package/dist/components/Misc/Menu/Menu.d.ts.map +1 -0
- package/dist/components/Misc/Menu/Menu.js +52 -0
- package/dist/components/Misc/OverflowFade/OverflowFade.d.ts +42 -0
- package/dist/components/Misc/OverflowFade/OverflowFade.d.ts.map +1 -0
- package/dist/components/Misc/OverflowFade/OverflowFade.js +110 -0
- package/dist/components/Misc/OverflowFade/OverflowFade.stories.d.ts +11 -0
- package/dist/components/Misc/OverflowFade/OverflowFade.stories.d.ts.map +1 -0
- package/dist/components/Misc/OverflowFade/OverflowFade.stories.js +112 -0
- package/dist/components/Misc/Picker/Picker.d.ts +62 -0
- package/dist/components/Misc/Picker/Picker.d.ts.map +1 -0
- package/dist/components/Misc/Picker/Picker.js +111 -0
- package/dist/components/Misc/Picker/Picker.stories.d.ts +14 -0
- package/dist/components/Misc/Picker/Picker.stories.d.ts.map +1 -0
- package/dist/components/Misc/Picker/Picker.stories.js +154 -0
- package/dist/components/Misc/SelectableObject/SelectableObject.d.ts +38 -0
- package/dist/components/Misc/SelectableObject/SelectableObject.d.ts.map +1 -0
- package/dist/components/Misc/SelectableObject/SelectableObject.js +70 -0
- package/dist/components/Misc/SelectableObject/SelectableObject.stories.d.ts +11 -0
- package/dist/components/Misc/SelectableObject/SelectableObject.stories.d.ts.map +1 -0
- package/dist/components/Misc/SelectableObject/SelectableObject.stories.js +84 -0
- package/dist/components/Misc/SelectionToolbar/SelectionToolbar.d.ts +26 -0
- package/dist/components/Misc/SelectionToolbar/SelectionToolbar.d.ts.map +1 -0
- package/dist/components/Misc/SelectionToolbar/SelectionToolbar.js +41 -0
- package/dist/components/Misc/SelectionToolbar/SelectionToolbar.stories.d.ts +10 -0
- package/dist/components/Misc/SelectionToolbar/SelectionToolbar.stories.d.ts.map +1 -0
- package/dist/components/Misc/SelectionToolbar/SelectionToolbar.stories.js +48 -0
- package/dist/components/Misc/Skeleton/Skeleton.d.ts +1 -1
- package/dist/components/Misc/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/components/Misc/Stepper/Step.d.ts +1 -1
- package/dist/components/Misc/Stepper/Step.d.ts.map +1 -1
- package/dist/components/Misc/Stepper/Step.stories.d.ts +120 -120
- package/dist/components/Misc/Stepper/Stepper.d.ts +1 -1
- package/dist/components/Misc/Stepper/Stepper.d.ts.map +1 -1
- package/dist/components/Misc/Stepper/variants.d.ts +1 -1
- package/dist/components/Misc/Timeline/Timeline.d.ts +18 -0
- package/dist/components/Misc/Timeline/Timeline.d.ts.map +1 -0
- package/dist/components/Misc/Timeline/Timeline.js +38 -0
- package/dist/components/Misc/Timeline/Timeline.stories.d.ts +8 -0
- package/dist/components/Misc/Timeline/Timeline.stories.d.ts.map +1 -0
- package/dist/components/Misc/Timeline/Timeline.stories.js +54 -0
- package/dist/components/Misc/Transition/Transition.d.ts +2 -1
- package/dist/components/Misc/Transition/Transition.d.ts.map +1 -1
- package/dist/components/Typography/CollapsibleText/CollapsibleText.d.ts +1 -1
- package/dist/components/Typography/CollapsibleText/CollapsibleText.d.ts.map +1 -1
- package/dist/components/Typography/CollapsibleTitle/CollapsibleTitle.d.ts +1 -1
- package/dist/components/Typography/CollapsibleTitle/CollapsibleTitle.d.ts.map +1 -1
- package/dist/components/Typography/Formula/Formula.d.ts +2 -1
- package/dist/components/Typography/Formula/Formula.d.ts.map +1 -1
- package/dist/components/Typography/Fraction/Fraction.d.ts +1 -1
- package/dist/components/Typography/Fraction/Fraction.d.ts.map +1 -1
- package/dist/components/Typography/InlineEditableText/InlineEditableText.d.ts +35 -0
- package/dist/components/Typography/InlineEditableText/InlineEditableText.d.ts.map +1 -0
- package/dist/components/Typography/InlineEditableText/InlineEditableText.js +112 -0
- package/dist/components/Typography/InlineEditableText/InlineEditableText.stories.d.ts +11 -0
- package/dist/components/Typography/InlineEditableText/InlineEditableText.stories.d.ts.map +1 -0
- package/dist/components/Typography/InlineEditableText/InlineEditableText.stories.js +48 -0
- package/dist/components/Typography/Text/Text.d.ts +1 -1
- package/dist/components/Typography/Text/Text.d.ts.map +1 -1
- package/dist/components/Typography/Title/Title.d.ts +1 -1
- package/dist/components/Typography/Title/Title.d.ts.map +1 -1
- package/dist/components/index.d.ts +148 -66
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +110 -68
- package/dist/constants/colors.d.ts +117 -91
- package/dist/constants/colors.d.ts.map +1 -1
- package/dist/constants/colors.js +56 -43
- package/dist/constants/font.d.ts +4 -4
- package/dist/constants/font.js +2 -2
- package/dist/docs/AIGeneratedBanner.d.ts +1 -1
- package/dist/docs/AIGeneratedBanner.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +9 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +7 -1
- package/dist/hooks/useConfirmationModal.d.ts.map +1 -1
- package/dist/hooks/useConfirmationModal.js +20 -1
- package/dist/hooks/useDisclosure.d.ts +11 -0
- package/dist/hooks/useDisclosure.d.ts.map +1 -0
- package/dist/hooks/useDisclosure.js +10 -0
- package/dist/hooks/useHeadroom.d.ts +18 -0
- package/dist/hooks/useHeadroom.d.ts.map +1 -0
- package/dist/hooks/useHeadroom.js +17 -0
- package/dist/hooks/useInfoModal.d.ts.map +1 -1
- package/dist/hooks/useInfoModal.js +13 -1
- package/dist/hooks/useMediaQuery.d.ts +1 -0
- package/dist/hooks/useMediaQuery.d.ts.map +1 -1
- package/dist/hooks/useMediaQuery.js +1 -0
- package/dist/hooks/useNotifications.d.ts +39 -7
- package/dist/hooks/useNotifications.d.ts.map +1 -1
- package/dist/hooks/useNotifications.js +108 -5
- package/dist/hooks/usePagination.d.ts +11 -0
- package/dist/hooks/usePagination.d.ts.map +1 -0
- package/dist/hooks/usePagination.js +2 -0
- package/dist/hooks/useScrollLock.d.ts +21 -0
- package/dist/hooks/useScrollLock.d.ts.map +1 -0
- package/dist/hooks/useScrollLock.js +20 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.js +5 -5
- package/dist/styles/iosInputZoomFix.d.ts +31 -0
- package/dist/styles/iosInputZoomFix.d.ts.map +1 -0
- package/dist/styles/iosInputZoomFix.js +135 -0
- package/dist/utils/bytes.d.ts +10 -0
- package/dist/utils/bytes.d.ts.map +1 -0
- package/dist/utils/bytes.js +17 -0
- package/dist/utils/datetime.d.ts +18 -0
- package/dist/utils/datetime.d.ts.map +1 -0
- package/dist/utils/datetime.js +42 -0
- package/dist/utils/duration.d.ts +17 -0
- package/dist/utils/duration.d.ts.map +1 -0
- package/dist/utils/duration.js +30 -0
- package/dist/utils/index.d.ts +8 -2
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +7 -2
- package/dist/utils/sort.d.ts +44 -0
- package/dist/utils/sort.d.ts.map +1 -0
- package/dist/utils/sort.js +53 -0
- package/dist/utils/string.d.ts +22 -0
- package/dist/utils/string.d.ts.map +1 -0
- package/dist/utils/string.js +25 -0
- package/package.json +28 -4
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { KbdProps as MantineKbdProps } from '@mantine/core';
|
|
3
|
+
export interface KbdProps extends MantineKbdProps {
|
|
4
|
+
}
|
|
5
|
+
declare const Kbd: ({ ...props }: KbdProps) => React.JSX.Element;
|
|
6
|
+
export { Kbd };
|
|
7
|
+
//# sourceMappingURL=Kbd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Kbd.d.ts","sourceRoot":"","sources":["../../../../src/components/Misc/Kbd/Kbd.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAqB,QAAQ,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AAI/E,MAAM,WAAW,QAAS,SAAQ,eAAe;CAAG;AAEpD,QAAA,MAAM,GAAG,GAAI,cAAc,QAAQ,sBAelC,CAAC;AAEF,OAAO,EAAE,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Kbd as MantineKbd } from '@mantine/core';
|
|
3
|
+
import { colors } from '../../../constants/colors';
|
|
4
|
+
import { fontBase, fontSize } from '../../../constants/font';
|
|
5
|
+
const Kbd = ({ ...props }) => {
|
|
6
|
+
return (_jsx(MantineKbd, { sx: {
|
|
7
|
+
...fontBase,
|
|
8
|
+
...fontSize['sm'],
|
|
9
|
+
backgroundColor: colors.neutral[25],
|
|
10
|
+
borderColor: colors.neutral[100],
|
|
11
|
+
color: colors.neutral[300],
|
|
12
|
+
padding: '1px 6px',
|
|
13
|
+
borderRadius: '4px',
|
|
14
|
+
}, ...props }));
|
|
15
|
+
};
|
|
16
|
+
export { Kbd };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Kbd } from './Kbd';
|
|
3
|
+
declare const meta: Meta<typeof Kbd>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const InContext: Story;
|
|
8
|
+
export declare const CommonShortcuts: Story;
|
|
9
|
+
//# sourceMappingURL=Kbd.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Kbd.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Misc/Kbd/Kbd.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAK5B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,GAAG,CAmB1B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAgBvB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAe7B,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Kbd } from './Kbd';
|
|
3
|
+
import { Group } from '../../Layout/Group/Group';
|
|
4
|
+
import { Text } from '../../Typography/Text/Text';
|
|
5
|
+
import { spacing } from '../../../constants/spacing';
|
|
6
|
+
const meta = {
|
|
7
|
+
title: 'Components/Misc/Kbd',
|
|
8
|
+
component: Kbd,
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: 'centered',
|
|
11
|
+
docs: {
|
|
12
|
+
description: {
|
|
13
|
+
component: 'Thin wrapper around Mantine v6\'s `Kbd` component with Taiv typography and color tokens. Use inline within help text to render keyboard shortcuts.',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
argTypes: {
|
|
18
|
+
children: {
|
|
19
|
+
control: { type: 'text' },
|
|
20
|
+
description: 'Key label to display',
|
|
21
|
+
table: { type: { summary: 'ReactNode' } },
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
export default meta;
|
|
26
|
+
export const Default = {
|
|
27
|
+
args: { children: '⌘K' },
|
|
28
|
+
parameters: {
|
|
29
|
+
docs: {
|
|
30
|
+
source: { code: `<Kbd>⌘K</Kbd>` },
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
export const InContext = {
|
|
35
|
+
render: () => (_jsxs(Text, { variant: 'subtle', children: ["Press ", _jsx(Kbd, { children: "\u2318K" }), " to open search, or ", _jsx(Kbd, { children: "Esc" }), " to dismiss."] })),
|
|
36
|
+
parameters: {
|
|
37
|
+
docs: {
|
|
38
|
+
description: { story: 'Typical usage — inline within a sentence of help text.' },
|
|
39
|
+
source: {
|
|
40
|
+
code: `<Text variant="subtle">
|
|
41
|
+
Press <Kbd>⌘K</Kbd> to open search, or <Kbd>Esc</Kbd> to dismiss.
|
|
42
|
+
</Text>`,
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
export const CommonShortcuts = {
|
|
48
|
+
render: () => (_jsxs(Group, { spacing: spacing.sm, children: [_jsx(Kbd, { children: "\u2318K" }), _jsx(Kbd, { children: "\u2318Z" }), _jsx(Kbd, { children: "\u2318\u21E7Z" }), _jsx(Kbd, { children: "Ctrl" }), _jsx(Kbd, { children: "Enter" }), _jsx(Kbd, { children: "Esc" }), _jsx(Kbd, { children: "Tab" })] })),
|
|
49
|
+
parameters: {
|
|
50
|
+
docs: { source: { code: false } },
|
|
51
|
+
},
|
|
52
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { LoadingOverlayProps as MantineLoadingOverlayProps } from '@mantine/core';
|
|
2
3
|
export interface LoadingOverlayProps extends MantineLoadingOverlayProps {
|
|
3
4
|
}
|
|
4
|
-
export declare const LoadingOverlay: ({ ...props }: LoadingOverlayProps) =>
|
|
5
|
+
export declare const LoadingOverlay: ({ ...props }: LoadingOverlayProps) => React.JSX.Element;
|
|
5
6
|
//# sourceMappingURL=LoadingOverlay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingOverlay.d.ts","sourceRoot":"","sources":["../../../../src/components/Misc/LoadingOverlay/LoadingOverlay.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LoadingOverlay.d.ts","sourceRoot":"","sources":["../../../../src/components/Misc/LoadingOverlay/LoadingOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAA2C,mBAAmB,IAAI,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAE3H,MAAM,WAAW,mBAAoB,SAAQ,0BAA0B;CACtE;AAGD,eAAO,MAAM,cAAc,GAAI,cAAe,mBAAmB,sBAWhE,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { MenuProps as MantineMenuProps } from '@mantine/core';
|
|
2
|
+
export interface MenuProps extends MantineMenuProps {
|
|
3
|
+
}
|
|
4
|
+
export declare const Menu: (({ styles, children, ...props }: MenuProps) => import("react").JSX.Element) & {
|
|
5
|
+
Target: import("react").ForwardRefExoticComponent<import("@mantine/core").MenuTargetProps & import("react").RefAttributes<HTMLElement>>;
|
|
6
|
+
Dropdown: typeof import("@mantine/core/lib/Menu/MenuDropdown/MenuDropdown").MenuDropdown;
|
|
7
|
+
Item: (<C = "button">(props: import("@mantine/utils").PolymorphicComponentProps<C, import("@mantine/core").MenuItemProps>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) & Omit<import("react").FunctionComponent<(import("@mantine/core").MenuItemProps & {
|
|
8
|
+
component?: any;
|
|
9
|
+
} & Omit<Pick<any, string | number | symbol>, "component" | keyof import("@mantine/core").MenuItemProps> & {
|
|
10
|
+
ref?: any;
|
|
11
|
+
}) | (import("@mantine/core").MenuItemProps & {
|
|
12
|
+
component: React.ElementType<any>;
|
|
13
|
+
})>, never> & Record<string, never>;
|
|
14
|
+
Label: import("react").ForwardRefExoticComponent<import("@mantine/core").MenuLabelProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
|
+
Divider: import("react").ForwardRefExoticComponent<import("@mantine/core").MenuDividerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=Menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../src/components/Misc/Menu/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,SAAS,IAAI,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAKnF,MAAM,WAAW,SAAU,SAAQ,gBAAgB;CAAG;AAwDtD,eAAO,MAAM,IAAI,oCAtDiC,SAAS;;;;;;;;;;;;CA4DzD,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Menu as MantineMenu } from '@mantine/core';
|
|
3
|
+
import { neutral } from '../../../constants/colors';
|
|
4
|
+
import { fontBase, fontSize, fontWeight } from '../../../constants/font';
|
|
5
|
+
import { spacing } from '../../../constants/spacing';
|
|
6
|
+
const MenuRoot = ({ styles, children, ...props }) => {
|
|
7
|
+
const baseStyles = {
|
|
8
|
+
dropdown: {
|
|
9
|
+
borderRadius: '8px',
|
|
10
|
+
border: `1px solid ${neutral[50]}`,
|
|
11
|
+
boxShadow: '0px 4px 16px rgba(0, 0, 0, 0.08)',
|
|
12
|
+
padding: spacing.xs,
|
|
13
|
+
},
|
|
14
|
+
item: {
|
|
15
|
+
...fontBase,
|
|
16
|
+
...fontSize['sm'],
|
|
17
|
+
fontWeight: fontWeight.medium,
|
|
18
|
+
color: neutral[300],
|
|
19
|
+
borderRadius: '6px',
|
|
20
|
+
padding: `${spacing.sm} ${spacing.md}`,
|
|
21
|
+
'&[data-hovered]': {
|
|
22
|
+
backgroundColor: neutral[25],
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
itemLabel: {
|
|
26
|
+
...fontBase,
|
|
27
|
+
...fontSize['sm'],
|
|
28
|
+
fontWeight: fontWeight.medium,
|
|
29
|
+
},
|
|
30
|
+
label: {
|
|
31
|
+
...fontBase,
|
|
32
|
+
...fontSize['xs'],
|
|
33
|
+
fontWeight: fontWeight.medium,
|
|
34
|
+
color: neutral[200],
|
|
35
|
+
padding: `${spacing.xs} ${spacing.md}`,
|
|
36
|
+
},
|
|
37
|
+
divider: {
|
|
38
|
+
margin: `${spacing.xs} 0`,
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
return (_jsx(MantineMenu, { radius: 8, shadow: "md", transitionProps: { duration: 150 }, withinPortal: true, ...props, styles: (theme, params, context) => {
|
|
42
|
+
const userStyles = typeof styles === 'function' ? styles(theme, params, context) : (styles !== null && styles !== void 0 ? styles : {});
|
|
43
|
+
return { ...baseStyles, ...userStyles };
|
|
44
|
+
}, children: children }));
|
|
45
|
+
};
|
|
46
|
+
export const Menu = Object.assign(MenuRoot, {
|
|
47
|
+
Target: MantineMenu.Target,
|
|
48
|
+
Dropdown: MantineMenu.Dropdown,
|
|
49
|
+
Item: MantineMenu.Item,
|
|
50
|
+
Label: MantineMenu.Label,
|
|
51
|
+
Divider: MantineMenu.Divider,
|
|
52
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { CSSProperties, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface OverflowFadeProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/**
|
|
4
|
+
* Color the gradient fades into. Match the surrounding surface so the
|
|
5
|
+
* fade reads as "the strip dissolves into the page". Default: 'white'.
|
|
6
|
+
*/
|
|
7
|
+
background?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Size of each fade band from the edge in px — width for horizontal
|
|
10
|
+
* (`orientation="horizontal"`), height for vertical (`orientation="vertical"`).
|
|
11
|
+
* Default: 64.
|
|
12
|
+
*/
|
|
13
|
+
fadeWidth?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Scroll axis. Horizontal: left/right fades (default). Vertical: top/bottom
|
|
16
|
+
* fades — pass `maxHeight` on the scroll viewport so content can clip.
|
|
17
|
+
*/
|
|
18
|
+
orientation?: 'horizontal' | 'vertical';
|
|
19
|
+
/**
|
|
20
|
+
* When `orientation` is `vertical`, caps the scroll viewport (e.g. `'65vh'`).
|
|
21
|
+
* Without this, the block grows with content and no vertical scroll (or fades)
|
|
22
|
+
* occurs.
|
|
23
|
+
*/
|
|
24
|
+
maxHeight?: CSSProperties['maxHeight'];
|
|
25
|
+
children: ReactNode;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Wraps scrollable content with bidirectional gradient fades that auto-detect
|
|
29
|
+
* overflow state.
|
|
30
|
+
*
|
|
31
|
+
* **Horizontal** (`orientation="horizontal"`, default): `overflow-x` scroll,
|
|
32
|
+
* left fade once scrolled away from the start, right fade when more content
|
|
33
|
+
* exists past the right edge. Both hidden when content fits.
|
|
34
|
+
*
|
|
35
|
+
* **Vertical** (`orientation="vertical"`): `overflow-y` scroll; set `maxHeight`
|
|
36
|
+
* so the viewport clips. Top fade once scrolled down; bottom fade when more
|
|
37
|
+
* content exists below. Hidden when content fits.
|
|
38
|
+
*
|
|
39
|
+
* The scrollbar is hidden by design — the fade is the affordance.
|
|
40
|
+
*/
|
|
41
|
+
export declare const OverflowFade: import("react").ForwardRefExoticComponent<OverflowFadeProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
42
|
+
//# sourceMappingURL=OverflowFade.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverflowFade.d.ts","sourceRoot":"","sources":["../../../../src/components/Misc/OverflowFade/OverflowFade.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGtE,MAAM,WAAW,iBAAkB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACvE;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC;;;;OAIG;IACH,SAAS,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IACvC,QAAQ,EAAE,SAAS,CAAC;CACrB;AASD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,YAAY,8GA2IxB,CAAC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box } from '@mantine/core';
|
|
3
|
+
import { forwardRef, useEffect, useRef, useState } from 'react';
|
|
4
|
+
const scrollbarHiddenSx = {
|
|
5
|
+
'&::-webkit-scrollbar': { display: 'none' },
|
|
6
|
+
msOverflowStyle: 'none',
|
|
7
|
+
scrollbarWidth: 'none',
|
|
8
|
+
WebkitOverflowScrolling: 'touch',
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Wraps scrollable content with bidirectional gradient fades that auto-detect
|
|
12
|
+
* overflow state.
|
|
13
|
+
*
|
|
14
|
+
* **Horizontal** (`orientation="horizontal"`, default): `overflow-x` scroll,
|
|
15
|
+
* left fade once scrolled away from the start, right fade when more content
|
|
16
|
+
* exists past the right edge. Both hidden when content fits.
|
|
17
|
+
*
|
|
18
|
+
* **Vertical** (`orientation="vertical"`): `overflow-y` scroll; set `maxHeight`
|
|
19
|
+
* so the viewport clips. Top fade once scrolled down; bottom fade when more
|
|
20
|
+
* content exists below. Hidden when content fits.
|
|
21
|
+
*
|
|
22
|
+
* The scrollbar is hidden by design — the fade is the affordance.
|
|
23
|
+
*/
|
|
24
|
+
export const OverflowFade = forwardRef(({ background = 'white', fadeWidth = 64, orientation = 'horizontal', maxHeight, children, style, ...props }, ref) => {
|
|
25
|
+
const scrollRef = useRef(null);
|
|
26
|
+
const [showLeft, setShowLeft] = useState(false);
|
|
27
|
+
const [showRight, setShowRight] = useState(false);
|
|
28
|
+
const [showTop, setShowTop] = useState(false);
|
|
29
|
+
const [showBottom, setShowBottom] = useState(false);
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
const el = scrollRef.current;
|
|
32
|
+
if (!el)
|
|
33
|
+
return;
|
|
34
|
+
const update = () => {
|
|
35
|
+
if (orientation === 'vertical') {
|
|
36
|
+
const overflowing = el.scrollHeight > el.clientHeight;
|
|
37
|
+
setShowTop(overflowing && el.scrollTop > 0);
|
|
38
|
+
setShowBottom(overflowing && el.scrollTop + el.clientHeight < el.scrollHeight - 1);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
const overflowing = el.scrollWidth > el.clientWidth;
|
|
42
|
+
setShowLeft(overflowing && el.scrollLeft > 0);
|
|
43
|
+
setShowRight(overflowing && el.scrollLeft + el.clientWidth < el.scrollWidth - 1);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
update();
|
|
47
|
+
el.addEventListener('scroll', update, { passive: true });
|
|
48
|
+
const ro = new ResizeObserver(update);
|
|
49
|
+
ro.observe(el);
|
|
50
|
+
const mo = new MutationObserver(update);
|
|
51
|
+
mo.observe(el, { characterData: true, childList: true, subtree: true });
|
|
52
|
+
return () => {
|
|
53
|
+
el.removeEventListener('scroll', update);
|
|
54
|
+
ro.disconnect();
|
|
55
|
+
mo.disconnect();
|
|
56
|
+
};
|
|
57
|
+
}, [orientation]);
|
|
58
|
+
const horizontalFadeBand = {
|
|
59
|
+
bottom: 0,
|
|
60
|
+
pointerEvents: 'none',
|
|
61
|
+
position: 'absolute',
|
|
62
|
+
top: 0,
|
|
63
|
+
transition: 'opacity 150ms ease',
|
|
64
|
+
width: `${fadeWidth}px`,
|
|
65
|
+
};
|
|
66
|
+
const verticalFadeBand = {
|
|
67
|
+
height: `${fadeWidth}px`,
|
|
68
|
+
left: 0,
|
|
69
|
+
pointerEvents: 'none',
|
|
70
|
+
position: 'absolute',
|
|
71
|
+
right: 0,
|
|
72
|
+
transition: 'opacity 150ms ease',
|
|
73
|
+
};
|
|
74
|
+
const scrollSx = orientation === 'vertical'
|
|
75
|
+
? {
|
|
76
|
+
...scrollbarHiddenSx,
|
|
77
|
+
maxHeight,
|
|
78
|
+
overflowX: 'hidden',
|
|
79
|
+
overflowY: 'auto',
|
|
80
|
+
width: '100%',
|
|
81
|
+
}
|
|
82
|
+
: {
|
|
83
|
+
...scrollbarHiddenSx,
|
|
84
|
+
overflowX: 'auto',
|
|
85
|
+
overflowY: 'hidden',
|
|
86
|
+
width: '100%',
|
|
87
|
+
};
|
|
88
|
+
return (_jsxs("div", { ref: ref, style: { position: 'relative', width: '100%', ...style }, ...props, children: [_jsx(Box, { ref: scrollRef, sx: scrollSx, children: children }), orientation === 'horizontal' ? (_jsxs(_Fragment, { children: [_jsx("div", { "aria-hidden": true, style: {
|
|
89
|
+
...horizontalFadeBand,
|
|
90
|
+
background: `linear-gradient(to right, ${background} 0%, ${background} 20%, transparent 100%)`,
|
|
91
|
+
left: 0,
|
|
92
|
+
opacity: showLeft ? 1 : 0,
|
|
93
|
+
} }), _jsx("div", { "aria-hidden": true, style: {
|
|
94
|
+
...horizontalFadeBand,
|
|
95
|
+
background: `linear-gradient(to left, ${background} 0%, ${background} 20%, transparent 100%)`,
|
|
96
|
+
opacity: showRight ? 1 : 0,
|
|
97
|
+
right: 0,
|
|
98
|
+
} })] })) : (_jsxs(_Fragment, { children: [_jsx("div", { "aria-hidden": true, style: {
|
|
99
|
+
...verticalFadeBand,
|
|
100
|
+
background: `linear-gradient(to bottom, ${background} 0%, ${background} 20%, transparent 100%)`,
|
|
101
|
+
opacity: showTop ? 1 : 0,
|
|
102
|
+
top: 0,
|
|
103
|
+
} }), _jsx("div", { "aria-hidden": true, style: {
|
|
104
|
+
...verticalFadeBand,
|
|
105
|
+
background: `linear-gradient(to top, ${background} 0%, ${background} 20%, transparent 100%)`,
|
|
106
|
+
bottom: 0,
|
|
107
|
+
opacity: showBottom ? 1 : 0,
|
|
108
|
+
} })] }))] }));
|
|
109
|
+
});
|
|
110
|
+
OverflowFade.displayName = 'OverflowFade';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { OverflowFade } from './OverflowFade';
|
|
3
|
+
declare const meta: Meta<typeof OverflowFade>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof OverflowFade>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const NoOverflow: Story;
|
|
8
|
+
export declare const OnNonWhiteSurface: Story;
|
|
9
|
+
export declare const Vertical: Story;
|
|
10
|
+
export declare const WithBadges: Story;
|
|
11
|
+
//# sourceMappingURL=OverflowFade.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverflowFade.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Misc/OverflowFade/OverflowFade.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAO5D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CA2BnC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,YAAY,CAAC,CAAC;AAiC3C,eAAO,MAAM,OAAO,EAAE,KAqBrB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAoBxB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAyB/B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAsBtB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KA0CxB,CAAC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { neutral, primary } from '../../../constants/colors';
|
|
3
|
+
import { spacing } from '../../../constants/spacing';
|
|
4
|
+
import { Badge } from '../../Info/Badge/Badge';
|
|
5
|
+
import { Group } from '../../Layout/Group/Group';
|
|
6
|
+
import { Stack } from '../../Layout/Stack/Stack';
|
|
7
|
+
import { Text } from '../../Typography/Text/Text';
|
|
8
|
+
import { OverflowFade } from './OverflowFade';
|
|
9
|
+
const meta = {
|
|
10
|
+
argTypes: {
|
|
11
|
+
background: {
|
|
12
|
+
control: { type: 'color' },
|
|
13
|
+
description: 'Color the gradient fades into. Match the surrounding surface.',
|
|
14
|
+
table: { defaultValue: { summary: "'white'" } },
|
|
15
|
+
},
|
|
16
|
+
fadeWidth: {
|
|
17
|
+
control: { type: 'number' },
|
|
18
|
+
table: { defaultValue: { summary: '40' } },
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
component: OverflowFade,
|
|
22
|
+
parameters: {
|
|
23
|
+
docs: {
|
|
24
|
+
description: {
|
|
25
|
+
component: 'Bidirectional gradient fades for horizontal or vertical overflow. Horizontal (default): left/right fades ' +
|
|
26
|
+
'on `overflow-x` scroll. Vertical (`orientation="vertical"`): top/bottom fades — pass `maxHeight` so ' +
|
|
27
|
+
'the viewport clips. Fades auto-hide when content fits.\n\n' +
|
|
28
|
+
'The scrollbar is hidden by design — the gradient is the affordance.',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
layout: 'padded',
|
|
32
|
+
},
|
|
33
|
+
title: 'Components/Misc/OverflowFade',
|
|
34
|
+
};
|
|
35
|
+
export default meta;
|
|
36
|
+
const chips = [
|
|
37
|
+
'All',
|
|
38
|
+
'Trending',
|
|
39
|
+
'Recently Added',
|
|
40
|
+
'Most Played',
|
|
41
|
+
'Editor Picks',
|
|
42
|
+
'Sports',
|
|
43
|
+
'News',
|
|
44
|
+
'Holiday',
|
|
45
|
+
'Promotions',
|
|
46
|
+
'Announcements',
|
|
47
|
+
'Weather',
|
|
48
|
+
];
|
|
49
|
+
const Chip = ({ label, active }) => (_jsx("div", { style: {
|
|
50
|
+
background: active ? primary[200] : 'white',
|
|
51
|
+
border: `1px solid ${active ? primary[200] : neutral[100]}`,
|
|
52
|
+
borderRadius: 999,
|
|
53
|
+
color: active ? 'white' : neutral[300],
|
|
54
|
+
flexShrink: 0,
|
|
55
|
+
fontSize: 14,
|
|
56
|
+
padding: `${spacing.xs} ${spacing.md}`,
|
|
57
|
+
whiteSpace: 'nowrap',
|
|
58
|
+
}, children: label }));
|
|
59
|
+
export const Default = {
|
|
60
|
+
args: {
|
|
61
|
+
background: 'white',
|
|
62
|
+
fadeWidth: 40,
|
|
63
|
+
},
|
|
64
|
+
render: (args) => (_jsx("div", { style: { background: 'white', maxWidth: 480, padding: spacing.md }, children: _jsxs(Stack, { gap: spacing.sm, children: [_jsx(Text, { variant: 'label', children: "Resize the panel narrower to see the right-edge fade appear." }), _jsx(OverflowFade, { ...args, children: _jsx(Group, { gap: spacing.xs, noWrap: true, children: chips.map((label) => (_jsx(Chip, { label: label }, label))) }) })] }) })),
|
|
65
|
+
};
|
|
66
|
+
export const NoOverflow = {
|
|
67
|
+
parameters: {
|
|
68
|
+
docs: {
|
|
69
|
+
description: {
|
|
70
|
+
story: 'When content fits the container, neither fade renders — auto-detection via scrollWidth/clientWidth.',
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
render: () => (_jsx("div", { style: { background: 'white', maxWidth: 480, padding: spacing.md }, children: _jsx(OverflowFade, { children: _jsxs(Group, { gap: spacing.xs, noWrap: true, children: [_jsx(Chip, { active: true, label: 'All' }), _jsx(Chip, { label: 'Sports' }), _jsx(Chip, { label: 'News' })] }) }) })),
|
|
75
|
+
};
|
|
76
|
+
export const OnNonWhiteSurface = {
|
|
77
|
+
parameters: {
|
|
78
|
+
docs: {
|
|
79
|
+
description: {
|
|
80
|
+
story: 'Pass `background` to match a non-white surface so the gradient ends in the parent color, not white.',
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
render: () => (_jsx("div", { style: { background: neutral[25], maxWidth: 480, padding: spacing.md }, children: _jsxs(Stack, { gap: spacing.sm, children: [_jsx(Text, { variant: 'label', children: "On neutral[25] \u2014 fade matches surface." }), _jsx(OverflowFade, { background: neutral[25], children: _jsx(Group, { gap: spacing.xs, noWrap: true, children: chips.map((label, i) => (_jsx(Chip, { active: i === 0, label: label }, label))) }) })] }) })),
|
|
85
|
+
};
|
|
86
|
+
export const Vertical = {
|
|
87
|
+
parameters: {
|
|
88
|
+
docs: {
|
|
89
|
+
description: {
|
|
90
|
+
story: 'Vertical scroll with top/bottom fades. Requires `maxHeight` on the viewport so content can overflow.',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
render: () => (_jsx("div", { style: { background: 'white', maxWidth: 360, padding: spacing.md }, children: _jsx(OverflowFade, { fadeWidth: 48, maxHeight: 220, orientation: 'vertical', children: _jsx(Stack, { gap: spacing.sm, children: Array.from({ length: 14 }, (_, i) => (_jsxs(Text, { variant: 'body', children: ["Row ", i + 1, " \u2014 scroll to see top and bottom edge fades."] }, i))) }) }) })),
|
|
95
|
+
};
|
|
96
|
+
export const WithBadges = {
|
|
97
|
+
parameters: {
|
|
98
|
+
docs: {
|
|
99
|
+
description: {
|
|
100
|
+
story: 'Demonstrates use with richer children — a tab-strip-like row with counts.',
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
render: () => (_jsx("div", { style: { background: 'white', maxWidth: 520, padding: spacing.md }, children: _jsx(OverflowFade, { children: _jsx(Group, { gap: spacing.lg, noWrap: true, children: [
|
|
105
|
+
'Your Slides',
|
|
106
|
+
'Smart Content',
|
|
107
|
+
'Premades',
|
|
108
|
+
'Playlists',
|
|
109
|
+
'Drafts',
|
|
110
|
+
'Archived',
|
|
111
|
+
].map((label, i) => (_jsxs(Group, { gap: spacing.xs, noWrap: true, style: { flexShrink: 0 }, children: [_jsx(Text, { style: { color: i === 0 ? primary[200] : neutral[300] }, variant: 'body', children: label }), _jsx(Badge, { color: 'neutral', size: 'sm', variant: 'filled', children: [12, 4, 8, 31, 2, 17][i] })] }, label))) }) }) })),
|
|
112
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export interface PickerItem {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
/** Right-aligned secondary info (e.g. "5 slides"). */
|
|
6
|
+
meta?: ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Optional sortable timestamp for automatic recency. Larger = more recent.
|
|
9
|
+
* Items without `recencyKey` sort to the end of the recent view.
|
|
10
|
+
*/
|
|
11
|
+
recencyKey?: number;
|
|
12
|
+
/** When true, item renders disabled (greyed-out) and is not clickable. */
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
/** Tooltip text shown on hover when disabled. */
|
|
15
|
+
disabledReason?: string;
|
|
16
|
+
}
|
|
17
|
+
export type PickerPosition = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
|
|
18
|
+
export interface PickerProps {
|
|
19
|
+
items: PickerItem[];
|
|
20
|
+
/**
|
|
21
|
+
* How many recent items to show in the compact (idle) view. If `items`
|
|
22
|
+
* has ≤ this many entries, all are shown and the "Show all" toggle is
|
|
23
|
+
* hidden. Default: 3.
|
|
24
|
+
*/
|
|
25
|
+
recentCount?: number;
|
|
26
|
+
onSelect: (item: PickerItem) => void;
|
|
27
|
+
searchPlaceholder?: string;
|
|
28
|
+
/** Shown when items is empty or search has no matches. */
|
|
29
|
+
emptyMessage?: string;
|
|
30
|
+
/** Slot rendered below the list — typically a "+ Create new" button. */
|
|
31
|
+
footer?: ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* Controlled-open mode. When provided, parent owns open state — useful for
|
|
34
|
+
* triggering programmatically from outside the Target (e.g. from a kebab
|
|
35
|
+
* Menu.Item that closes its own Menu before opening the Picker).
|
|
36
|
+
*/
|
|
37
|
+
opened?: boolean;
|
|
38
|
+
onOpenChange?: (opened: boolean) => void;
|
|
39
|
+
position?: PickerPosition;
|
|
40
|
+
width?: number;
|
|
41
|
+
/** Wrap dropdown in a portal to escape stacking contexts. Default true. */
|
|
42
|
+
withinPortal?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* When true, the SearchBar is hidden on mobile viewports (≤640px). Useful
|
|
45
|
+
* for kebab-anchored Pickers where search adds noise on small screens but
|
|
46
|
+
* stays valuable on desktop. Default: false.
|
|
47
|
+
*/
|
|
48
|
+
searchOnDesktopOnly?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* When true, never render the "Recent" header or "Show all N" toggle —
|
|
51
|
+
* always show exactly `recentCount` items in the idle view. Search across
|
|
52
|
+
* the full list still works when the user types. Default: false.
|
|
53
|
+
*/
|
|
54
|
+
disableShowAll?: boolean;
|
|
55
|
+
children: ReactNode;
|
|
56
|
+
}
|
|
57
|
+
export declare const Picker: (({ items, recentCount, onSelect, searchPlaceholder, emptyMessage, footer, opened, onOpenChange, position, width, withinPortal, searchOnDesktopOnly, disableShowAll, children, }: PickerProps) => import("react").JSX.Element) & {
|
|
58
|
+
Target: import("react").ForwardRefExoticComponent<{
|
|
59
|
+
children: ReactNode;
|
|
60
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=Picker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Picker.d.ts","sourceRoot":"","sources":["../../../../src/components/Misc/Picker/Picker.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,SAAS,EAIf,MAAM,OAAO,CAAC;AAwBf,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iDAAiD;IACjD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,MAAM,cAAc,GACtB,KAAK,GACL,WAAW,GACX,SAAS,GACT,QAAQ,GACR,cAAc,GACd,YAAY,GACZ,MAAM,GACN,YAAY,GACZ,UAAU,GACV,OAAO,GACP,aAAa,GACb,WAAW,CAAC;AAEhB,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,0DAA0D;IAC1D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wEAAwE;IACxE,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2EAA2E;IAC3E,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAmQD,eAAO,MAAM,MAAM,oLAxLhB,WAAW;;kBAtB8C,SAAS;;CA8MS,CAAC"}
|