@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,44 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Dropzone as MantineDropzone, } from '@mantine/dropzone';
|
|
3
|
+
import { colors } from '../../../constants/colors';
|
|
4
|
+
import { fontBase } from '../../../constants/font';
|
|
5
|
+
import { spacing } from '../../../constants/spacing';
|
|
6
|
+
const DropzoneComponent = ({ styles, children, ...props }) => {
|
|
7
|
+
const style = {
|
|
8
|
+
root: {
|
|
9
|
+
...fontBase,
|
|
10
|
+
backgroundColor: 'white',
|
|
11
|
+
border: `1px dashed ${colors.neutral[100]}`,
|
|
12
|
+
borderRadius: '8px',
|
|
13
|
+
color: colors.neutral[300],
|
|
14
|
+
cursor: 'pointer',
|
|
15
|
+
padding: spacing.xl,
|
|
16
|
+
transition: 'background-color 200ms ease, border-color 200ms ease',
|
|
17
|
+
'&:hover': {
|
|
18
|
+
backgroundColor: colors.neutral[25],
|
|
19
|
+
borderColor: colors.neutral[200],
|
|
20
|
+
},
|
|
21
|
+
'&[data-accept]': {
|
|
22
|
+
backgroundColor: colors.primary[25],
|
|
23
|
+
borderColor: colors.primary[200],
|
|
24
|
+
borderStyle: 'solid',
|
|
25
|
+
},
|
|
26
|
+
'&[data-reject]': {
|
|
27
|
+
backgroundColor: colors.error[25],
|
|
28
|
+
borderColor: colors.error[200],
|
|
29
|
+
borderStyle: 'solid',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
...styles,
|
|
33
|
+
};
|
|
34
|
+
return (_jsx(MantineDropzone, { styles: style, ...props, children: children }));
|
|
35
|
+
};
|
|
36
|
+
export const Dropzone = Object.assign(DropzoneComponent, {
|
|
37
|
+
Accept: MantineDropzone.Accept,
|
|
38
|
+
Reject: MantineDropzone.Reject,
|
|
39
|
+
Idle: MantineDropzone.Idle,
|
|
40
|
+
FullScreen: MantineDropzone.FullScreen,
|
|
41
|
+
});
|
|
42
|
+
// Re-export the MIME-type presets so consumers can do:
|
|
43
|
+
// import { Dropzone, IMAGE_MIME_TYPE } from '@taiv/ui';
|
|
44
|
+
export { IMAGE_MIME_TYPE, PDF_MIME_TYPE, MS_WORD_MIME_TYPE, MS_EXCEL_MIME_TYPE, MS_POWERPOINT_MIME_TYPE, MIME_TYPES, } from '@mantine/dropzone';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Dropzone } from './Dropzone';
|
|
3
|
+
declare const meta: Meta<typeof Dropzone>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const ImagesOnly: Story;
|
|
8
|
+
export declare const PdfsOnly: Story;
|
|
9
|
+
export declare const Loading: Story;
|
|
10
|
+
export declare const Disabled: Story;
|
|
11
|
+
export declare const WithFileList: Story;
|
|
12
|
+
//# sourceMappingURL=Dropzone.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dropzone.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Inputs/Dropzone/Dropzone.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,QAAQ,EAAkC,MAAM,YAAY,CAAC;AAQtE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CA6D/B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAsBnC,eAAO,MAAM,OAAO,EAAE,KAWrB,CAAC;AAIF,eAAO,MAAM,UAAU,EAAE,KAyBxB,CAAC;AAIF,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAC;AAIF,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAC;AAIF,eAAO,MAAM,QAAQ,EAAE,KAOtB,CAAC;AAIF,eAAO,MAAM,YAAY,EAAE,KA2B1B,CAAC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { IconCloudUpload, IconPhoto, IconUpload, IconX } from '@tabler/icons-react';
|
|
4
|
+
import { Dropzone, IMAGE_MIME_TYPE, PDF_MIME_TYPE } from './Dropzone';
|
|
5
|
+
import { Group } from '../../Layout/Group/Group';
|
|
6
|
+
import { Stack } from '../../Layout/Stack/Stack';
|
|
7
|
+
import { Text } from '../../Typography/Text/Text';
|
|
8
|
+
import { Title } from '../../Typography/Title/Title';
|
|
9
|
+
import { error, neutral, primary } from '../../../constants/colors';
|
|
10
|
+
import { spacing } from '../../../constants/spacing';
|
|
11
|
+
const meta = {
|
|
12
|
+
title: 'Components/Inputs/Dropzone',
|
|
13
|
+
component: Dropzone,
|
|
14
|
+
parameters: {
|
|
15
|
+
layout: 'centered',
|
|
16
|
+
docs: {
|
|
17
|
+
description: {
|
|
18
|
+
component: '[View Mantine Docs](https://v6.mantine.dev/others/dropzone/)\n\nDropzone captures files via click or drag-and-drop. It extends Mantine v6\'s `Dropzone` with Taiv styling: Poppins font, dashed neutral border, `primary[25]` fill on accept, `error[25]` fill on reject.\n\nUse `Dropzone.Accept`, `Dropzone.Reject`, and `Dropzone.Idle` inside children to show different content per state.',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
decorators: [
|
|
23
|
+
(Story) => (_jsx("div", { style: { width: '520px' }, children: _jsx(Story, {}) })),
|
|
24
|
+
],
|
|
25
|
+
argTypes: {
|
|
26
|
+
onDrop: {
|
|
27
|
+
action: 'files dropped',
|
|
28
|
+
description: 'Called with valid files',
|
|
29
|
+
table: { type: { summary: '(files: FileWithPath[]) => void' } },
|
|
30
|
+
},
|
|
31
|
+
onReject: {
|
|
32
|
+
action: 'files rejected',
|
|
33
|
+
description: 'Called with rejected files (wrong type, too large, etc.)',
|
|
34
|
+
table: { type: { summary: '(rejections: FileRejection[]) => void' } },
|
|
35
|
+
},
|
|
36
|
+
accept: {
|
|
37
|
+
control: false,
|
|
38
|
+
description: 'File MIME types to accept. Use the exported `IMAGE_MIME_TYPE`, `PDF_MIME_TYPE`, etc.',
|
|
39
|
+
table: { type: { summary: 'Accept | string[]' } },
|
|
40
|
+
},
|
|
41
|
+
maxSize: {
|
|
42
|
+
control: { type: 'number' },
|
|
43
|
+
description: 'Maximum file size in bytes',
|
|
44
|
+
table: { type: { summary: 'number' } },
|
|
45
|
+
},
|
|
46
|
+
maxFiles: {
|
|
47
|
+
control: { type: 'number' },
|
|
48
|
+
description: 'Max number of files',
|
|
49
|
+
table: { type: { summary: 'number' } },
|
|
50
|
+
},
|
|
51
|
+
multiple: {
|
|
52
|
+
control: { type: 'boolean' },
|
|
53
|
+
description: 'Allow selecting multiple files',
|
|
54
|
+
table: { type: { summary: 'boolean' }, defaultValue: { summary: 'true' } },
|
|
55
|
+
},
|
|
56
|
+
loading: {
|
|
57
|
+
control: { type: 'boolean' },
|
|
58
|
+
description: 'Display a loading overlay',
|
|
59
|
+
table: { type: { summary: 'boolean' }, defaultValue: { summary: 'false' } },
|
|
60
|
+
},
|
|
61
|
+
disabled: {
|
|
62
|
+
control: { type: 'boolean' },
|
|
63
|
+
description: 'Disable the dropzone',
|
|
64
|
+
table: { type: { summary: 'boolean' }, defaultValue: { summary: 'false' } },
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
export default meta;
|
|
69
|
+
const StateContent = () => (_jsxs(Group, { position: 'center', spacing: spacing.xl, style: { minHeight: 120, pointerEvents: 'none' }, children: [_jsx(Dropzone.Accept, { children: _jsx(IconUpload, { size: 48, color: primary[200] }) }), _jsx(Dropzone.Reject, { children: _jsx(IconX, { size: 48, color: error[200] }) }), _jsx(Dropzone.Idle, { children: _jsx(IconCloudUpload, { size: 48, color: neutral[200] }) }), _jsxs(Stack, { spacing: spacing.xxs, children: [_jsx(Title, { variant: 'cardHeader', children: "Drop files here or click to browse" }), _jsx(Text, { variant: 'subtle', children: "Attach as many files as you like, each up to 5 MB" })] })] }));
|
|
70
|
+
// ─── Default ─────────────────────────────────────────────────────────────────
|
|
71
|
+
export const Default = {
|
|
72
|
+
args: {
|
|
73
|
+
maxSize: 5 * 1024 ** 2,
|
|
74
|
+
onDrop: (files) => console.log('dropped', files),
|
|
75
|
+
onReject: (rejections) => console.log('rejected', rejections),
|
|
76
|
+
},
|
|
77
|
+
render: (args) => (_jsx(Dropzone, { ...args, children: _jsx(StateContent, {}) })),
|
|
78
|
+
};
|
|
79
|
+
// ─── Image uploads only ──────────────────────────────────────────────────────
|
|
80
|
+
export const ImagesOnly = {
|
|
81
|
+
render: () => (_jsx(Dropzone, { accept: IMAGE_MIME_TYPE, maxSize: 5 * 1024 ** 2, onDrop: () => { }, children: _jsxs(Group, { position: 'center', spacing: spacing.xl, style: { minHeight: 120, pointerEvents: 'none' }, children: [_jsx(Dropzone.Accept, { children: _jsx(IconUpload, { size: 48, color: primary[200] }) }), _jsx(Dropzone.Reject, { children: _jsx(IconX, { size: 48, color: error[200] }) }), _jsx(Dropzone.Idle, { children: _jsx(IconPhoto, { size: 48, color: neutral[200] }) }), _jsxs(Stack, { spacing: spacing.xxs, children: [_jsx(Title, { variant: 'cardHeader', children: "Upload images" }), _jsx(Text, { variant: 'subtle', children: "PNG, JPG, GIF, WEBP \u2014 up to 5 MB each" })] })] }) })),
|
|
82
|
+
parameters: {
|
|
83
|
+
docs: {
|
|
84
|
+
description: { story: 'Restrict accepted files with `accept={IMAGE_MIME_TYPE}`. MIME-type presets are re-exported from `@taiv/ui`.' },
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
// ─── PDFs only ───────────────────────────────────────────────────────────────
|
|
89
|
+
export const PdfsOnly = {
|
|
90
|
+
render: () => (_jsx(Dropzone, { accept: PDF_MIME_TYPE, maxFiles: 1, onDrop: () => { }, children: _jsx(StateContent, {}) })),
|
|
91
|
+
};
|
|
92
|
+
// ─── Loading state ───────────────────────────────────────────────────────────
|
|
93
|
+
export const Loading = {
|
|
94
|
+
args: { loading: true, onDrop: () => { } },
|
|
95
|
+
render: (args) => (_jsx(Dropzone, { ...args, children: _jsx(StateContent, {}) })),
|
|
96
|
+
};
|
|
97
|
+
// ─── Disabled state ──────────────────────────────────────────────────────────
|
|
98
|
+
export const Disabled = {
|
|
99
|
+
args: { disabled: true, onDrop: () => { } },
|
|
100
|
+
render: (args) => (_jsx(Dropzone, { ...args, children: _jsx(StateContent, {}) })),
|
|
101
|
+
};
|
|
102
|
+
// ─── With captured file list ─────────────────────────────────────────────────
|
|
103
|
+
export const WithFileList = {
|
|
104
|
+
render: () => {
|
|
105
|
+
const [files, setFiles] = useState([]);
|
|
106
|
+
return (_jsxs(Stack, { spacing: spacing.md, children: [_jsx(Dropzone, { onDrop: setFiles, maxSize: 5 * 1024 ** 2, children: _jsx(StateContent, {}) }), files.length > 0 && (_jsxs(Stack, { spacing: spacing.xxs, children: [_jsxs(Text, { variant: 'label', children: [files.length, " file(s) selected"] }), files.map((f, i) => (_jsxs(Text, { variant: 'subtle', children: [f.name, " \u2014 ", (f.size / 1024).toFixed(1), " KB"] }, i)))] }))] }));
|
|
107
|
+
},
|
|
108
|
+
parameters: {
|
|
109
|
+
docs: {
|
|
110
|
+
description: { story: 'Typical usage pattern — hold dropped files in local state and render them below.' },
|
|
111
|
+
source: { code: false },
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
};
|
|
@@ -11,6 +11,6 @@ export interface SliderProps extends MantineSliderProps {
|
|
|
11
11
|
compact?: boolean;
|
|
12
12
|
styles?: Record<string, CSSProperties>;
|
|
13
13
|
}
|
|
14
|
-
declare const Slider: ({ width, size, value, setValue, disabled, styles, animate, label, fullWidth, compact, ...props }: SliderProps) =>
|
|
14
|
+
declare const Slider: ({ width, size, value, setValue, disabled, styles, animate, label, fullWidth, compact, ...props }: SliderProps) => React.JSX.Element;
|
|
15
15
|
export { Slider };
|
|
16
16
|
//# sourceMappingURL=Slider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Sliders/Slider/Slider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAA2B,WAAW,IAAI,kBAAkB,EAAa,MAAM,eAAe,CAAC;AAKtG,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,MAAM,WAAW,WAAY,SAAQ,kBAAkB;IACrD,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,OAAO,cAAc,CAAC;IACnC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;CACxC;AAED,QAAA,MAAM,MAAM,GAAI,kGAAyI,WAAW,
|
|
1
|
+
{"version":3,"file":"Slider.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Sliders/Slider/Slider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAA2B,WAAW,IAAI,kBAAkB,EAAa,MAAM,eAAe,CAAC;AAKtG,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,MAAM,WAAW,WAAY,SAAQ,kBAAkB;IACrD,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,OAAO,cAAc,CAAC;IACnC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;CACxC;AAED,QAAA,MAAM,MAAM,GAAI,kGAAyI,WAAW,sBA8FnK,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { SliderProps } from '../Slider/Slider';
|
|
2
3
|
interface VolumeSliderProps extends Omit<SliderProps, 'label'> {
|
|
3
4
|
}
|
|
4
|
-
declare const VolumeSlider: ({ compact, size, fullWidth, ...props }: VolumeSliderProps) =>
|
|
5
|
+
declare const VolumeSlider: ({ compact, size, fullWidth, ...props }: VolumeSliderProps) => React.JSX.Element;
|
|
5
6
|
export { VolumeSlider };
|
|
6
7
|
//# sourceMappingURL=VolumeSlider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VolumeSlider.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Sliders/VolumeSlider/VolumeSlider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VolumeSlider.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Sliders/VolumeSlider/VolumeSlider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAI7C,OAAO,EAAU,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAGvD,UAAU,iBAAkB,SAAQ,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC;CAAG;AAEjE,QAAA,MAAM,YAAY,GAAI,wCAA+D,iBAAiB,sBAmCrG,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { AutocompleteProps as MantineAutocompleteProps } from '@mantine/core';
|
|
2
3
|
import { CSSObject } from '@mantine/styles';
|
|
3
4
|
import { componentSizes } from '../../Dropdowns/shared/sizes';
|
|
@@ -7,5 +8,5 @@ export interface AutoCompleteProps extends MantineAutocompleteProps {
|
|
|
7
8
|
fullWidth?: boolean;
|
|
8
9
|
styles?: Record<string, CSSObject>;
|
|
9
10
|
}
|
|
10
|
-
export declare const AutoComplete: ({ size, width, fullWidth, placeholder, styles, ...props }: AutoCompleteProps) =>
|
|
11
|
+
export declare const AutoComplete: ({ size, width, fullWidth, placeholder, styles, ...props }: AutoCompleteProps) => React.JSX.Element;
|
|
11
12
|
//# sourceMappingURL=AutoComplete.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoComplete.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/TextInputs/AutoComplete/AutoComplete.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AutoComplete.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/TextInputs/AutoComplete/AutoComplete.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAuC,iBAAiB,IAAI,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACnH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,MAAM,WAAW,iBAAkB,SAAQ,wBAAwB;IACjE,IAAI,CAAC,EAAE,MAAM,OAAO,cAAc,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACpC;AAED,eAAO,MAAM,YAAY,GAAI,2DAA+F,iBAAiB,sBA4D5I,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { NumberInputProps as MantineNumberInputProps } from '@mantine/core';
|
|
2
3
|
import { CSSObject } from '@mantine/styles';
|
|
3
4
|
import { componentSizes } from '../shared/sizes';
|
|
@@ -7,6 +8,6 @@ interface NumberInputProps extends MantineNumberInputProps {
|
|
|
7
8
|
fullWidth?: boolean;
|
|
8
9
|
styles?: Record<string, CSSObject>;
|
|
9
10
|
}
|
|
10
|
-
declare const NumberInput: ({ size, width, fullWidth, styles, step, ...props }: NumberInputProps) =>
|
|
11
|
+
declare const NumberInput: ({ size, width, fullWidth, styles, step, ...props }: NumberInputProps) => React.JSX.Element;
|
|
11
12
|
export { NumberInput };
|
|
12
13
|
//# sourceMappingURL=NumberInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberInput.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/TextInputs/NumberInput/NumberInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NumberInput.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/TextInputs/NumberInput/NumberInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,gBAAgB,IAAI,uBAAuB,EAC5C,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,UAAU,gBAAiB,SAAQ,uBAAuB;IACxD,IAAI,CAAC,EAAE,MAAM,OAAO,cAAc,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACpC;AAED,QAAA,MAAM,WAAW,GAAI,oDAOlB,gBAAgB,sBAsElB,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -8,6 +8,9 @@ const NumberInput = ({ size = 'md', width, fullWidth = false, styles, step = 1,
|
|
|
8
8
|
const computedWidth = fullWidth ? '100%' : width || `${selectedSize.width}px`;
|
|
9
9
|
const hasError = !!props.error;
|
|
10
10
|
const style = {
|
|
11
|
+
root: {
|
|
12
|
+
width: computedWidth,
|
|
13
|
+
},
|
|
11
14
|
input: {
|
|
12
15
|
height: `${selectedSize.height}px`,
|
|
13
16
|
fontSize: selectedSize.fontSize,
|
|
@@ -58,6 +61,6 @@ const NumberInput = ({ size = 'md', width, fullWidth = false, styles, step = 1,
|
|
|
58
61
|
},
|
|
59
62
|
...styles,
|
|
60
63
|
};
|
|
61
|
-
return (_jsx(MantineNumberInput, {
|
|
64
|
+
return (_jsx(MantineNumberInput, { size: size, step: step, hideControls: false, styles: style, type: "number", ...props }));
|
|
62
65
|
};
|
|
63
66
|
export { NumberInput };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { componentSizes } from '../shared/sizes';
|
|
2
|
+
export interface ResponsiveNumberInputProps {
|
|
3
|
+
value: number;
|
|
4
|
+
onChange: (value: number) => void;
|
|
5
|
+
min?: number;
|
|
6
|
+
max?: number;
|
|
7
|
+
step?: number;
|
|
8
|
+
/** Suffix rendered after the value in the mobile stepper (e.g. `s`, `px`).
|
|
9
|
+
* Desktop ignores this — the NumberInput shows the bare number. */
|
|
10
|
+
unit?: string;
|
|
11
|
+
/** Forwarded to the desktop `NumberInput` label. On mobile the stepper is
|
|
12
|
+
* control-only; render your own label in the surrounding layout. */
|
|
13
|
+
label?: string;
|
|
14
|
+
error?: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
fullWidth?: boolean;
|
|
17
|
+
size?: keyof typeof componentSizes;
|
|
18
|
+
/** Accessible name for the mobile value readout / stepper buttons. */
|
|
19
|
+
'aria-label'?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Override the internal `useMobile()` (<640px) viewport check. Pass this
|
|
22
|
+
* when the host surface uses a different breakpoint than the component's
|
|
23
|
+
* default — e.g. an editor that already switches to a touch layout at
|
|
24
|
+
* `useTablet()` (<768px) wants the stepper across that whole range, not
|
|
25
|
+
* just below 640px. Omit to let the component decide by viewport.
|
|
26
|
+
*/
|
|
27
|
+
isMobile?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Numeric input that swaps presentation by viewport:
|
|
31
|
+
*
|
|
32
|
+
* - **Desktop / laptop** → the standard `NumberInput` (typed entry plus the
|
|
33
|
+
* stacked spinner controls on the right edge).
|
|
34
|
+
* - **Mobile** → a touch stepper: a read-only value pill on the left with
|
|
35
|
+
* `[−]` / `[+]` buttons grouped to its right. The value is *display-only*
|
|
36
|
+
* (not a native `<input type=number>`) on purpose — focusing one on iOS
|
|
37
|
+
* pops the on-screen numeric keyboard, which on canvas-style editors
|
|
38
|
+
* covers content and can steal focus. The buttons are full-size tap
|
|
39
|
+
* targets, unlike the desktop spinner chevrons.
|
|
40
|
+
*
|
|
41
|
+
* Same `value` / `onChange` / `min` / `max` / `step` contract on both, so a
|
|
42
|
+
* caller can drop it in wherever a `NumberInput` lived and get the
|
|
43
|
+
* responsive treatment for free.
|
|
44
|
+
*/
|
|
45
|
+
export declare const ResponsiveNumberInput: React.FC<ResponsiveNumberInputProps>;
|
|
46
|
+
//# sourceMappingURL=ResponsiveNumberInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponsiveNumberInput.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/TextInputs/NumberInput/ResponsiveNumberInput.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;wEACoE;IACpE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;yEACqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,OAAO,cAAc,CAAC;IACnC,sEAAsE;IACtE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAKD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CAgGtE,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { IconMinus, IconPlus } from '@tabler/icons-react';
|
|
3
|
+
import { neutral, red } from '../../../../constants/colors';
|
|
4
|
+
import { fontBase } from '../../../../constants/font';
|
|
5
|
+
import { spacing } from '../../../../constants/spacing';
|
|
6
|
+
import { useMobile } from '../../../../hooks/useMediaQuery';
|
|
7
|
+
import { IconButton } from '../../Buttons/IconButton/IconButton';
|
|
8
|
+
import { Group } from '../../../Layout/Group/Group';
|
|
9
|
+
import { Text } from '../../../Typography/Text/Text';
|
|
10
|
+
import { NumberInput } from './NumberInput';
|
|
11
|
+
const clamp = (n, min, max) => Math.min(Math.max(n, min), max);
|
|
12
|
+
/**
|
|
13
|
+
* Numeric input that swaps presentation by viewport:
|
|
14
|
+
*
|
|
15
|
+
* - **Desktop / laptop** → the standard `NumberInput` (typed entry plus the
|
|
16
|
+
* stacked spinner controls on the right edge).
|
|
17
|
+
* - **Mobile** → a touch stepper: a read-only value pill on the left with
|
|
18
|
+
* `[−]` / `[+]` buttons grouped to its right. The value is *display-only*
|
|
19
|
+
* (not a native `<input type=number>`) on purpose — focusing one on iOS
|
|
20
|
+
* pops the on-screen numeric keyboard, which on canvas-style editors
|
|
21
|
+
* covers content and can steal focus. The buttons are full-size tap
|
|
22
|
+
* targets, unlike the desktop spinner chevrons.
|
|
23
|
+
*
|
|
24
|
+
* Same `value` / `onChange` / `min` / `max` / `step` contract on both, so a
|
|
25
|
+
* caller can drop it in wherever a `NumberInput` lived and get the
|
|
26
|
+
* responsive treatment for free.
|
|
27
|
+
*/
|
|
28
|
+
export const ResponsiveNumberInput = ({ value, onChange, min = 0, max = 100, step = 1, unit, label, error, disabled = false, fullWidth = false, size = 'md', 'aria-label': ariaLabel, isMobile: isMobileProp, }) => {
|
|
29
|
+
// Always call the hook (rules-of-hooks), but let an explicit prop win so
|
|
30
|
+
// callers can align the switch with their own breakpoint.
|
|
31
|
+
const detectedMobile = useMobile();
|
|
32
|
+
const isMobile = isMobileProp !== null && isMobileProp !== void 0 ? isMobileProp : detectedMobile;
|
|
33
|
+
if (!isMobile) {
|
|
34
|
+
return (_jsx(NumberInput, { label: label, error: error, min: min, max: max, step: step, value: value, disabled: disabled, fullWidth: fullWidth, size: size, "aria-label": ariaLabel, onChange: (v) => {
|
|
35
|
+
const n = Number(v);
|
|
36
|
+
if (!Number.isFinite(n))
|
|
37
|
+
return;
|
|
38
|
+
onChange(n);
|
|
39
|
+
} }));
|
|
40
|
+
}
|
|
41
|
+
const handleStep = (dir) => onChange(clamp(value + dir * step, min, max));
|
|
42
|
+
const display = `${value}${unit ? ` ${unit}` : ''}`;
|
|
43
|
+
// Flanking layout: `[−] value [+]`, matching the app's other steppers
|
|
44
|
+
// (font size, canvas zoom). When `fullWidth`, the group spans its row and
|
|
45
|
+
// the value pill flexes to fill the space between the buttons; otherwise
|
|
46
|
+
// it's a compact, content-width stepper.
|
|
47
|
+
return (_jsxs(Group, { spacing: spacing.xs, noWrap: true, style: fullWidth ? { width: '100%' } : undefined, children: [_jsx(IconButton, { variant: 'secondary', subtle: true, "aria-label": `Decrease${ariaLabel ? ` ${ariaLabel}` : ''}`, onClick: () => handleStep(-1), disabled: disabled || value <= min, children: _jsx(IconMinus, { size: 14 }) }), _jsx("div", { role: 'status', "aria-label": ariaLabel, style: {
|
|
48
|
+
alignItems: 'center',
|
|
49
|
+
border: `1px solid ${error ? red[200] : neutral[50]}`,
|
|
50
|
+
borderRadius: 8,
|
|
51
|
+
display: 'flex',
|
|
52
|
+
flex: fullWidth ? 1 : undefined,
|
|
53
|
+
height: 40,
|
|
54
|
+
justifyContent: 'center',
|
|
55
|
+
minWidth: 64,
|
|
56
|
+
padding: `0 ${spacing.sm}`,
|
|
57
|
+
...fontBase,
|
|
58
|
+
color: neutral[200],
|
|
59
|
+
}, children: _jsx(Text, { variant: 'body', children: display }) }), _jsx(IconButton, { variant: 'secondary', subtle: true, "aria-label": `Increase${ariaLabel ? ` ${ariaLabel}` : ''}`, onClick: () => handleStep(1), disabled: disabled || value >= max, children: _jsx(IconPlus, { size: 14 }) })] }));
|
|
60
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { PasswordInputProps as MantinePasswordInputProps } from '@mantine/core';
|
|
2
3
|
import { CSSObject } from '@mantine/styles';
|
|
3
4
|
import { componentSizes } from '../shared/sizes';
|
|
@@ -7,6 +8,6 @@ type PasswordInputProps = MantinePasswordInputProps & {
|
|
|
7
8
|
fullWidth?: boolean;
|
|
8
9
|
styles?: Record<string, CSSObject>;
|
|
9
10
|
};
|
|
10
|
-
declare const PasswordInput: ({ size, width, fullWidth, styles, placeholder, ...props }: PasswordInputProps) =>
|
|
11
|
+
declare const PasswordInput: ({ size, width, fullWidth, styles, placeholder, ...props }: PasswordInputProps) => React.JSX.Element;
|
|
11
12
|
export { PasswordInput };
|
|
12
13
|
//# sourceMappingURL=PasswordInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordInput.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/TextInputs/PasswordInput/PasswordInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PasswordInput.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/TextInputs/PasswordInput/PasswordInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAyC,kBAAkB,IAAI,yBAAyB,EAAE,MAAM,eAAe,CAAC;AACvH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AASjD,KAAK,kBAAkB,GAAG,yBAAyB,GAAG;IACpD,IAAI,CAAC,EAAE,MAAM,OAAO,cAAc,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACpC,CAAC;AAEF,QAAA,MAAM,aAAa,GAAI,2DAA6F,kBAAkB,sBAsDrI,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { TextInputProps } from '@mantine/core';
|
|
2
3
|
interface SearchBarProps extends TextInputProps {
|
|
3
4
|
fullWidth?: boolean;
|
|
4
5
|
}
|
|
5
|
-
declare const SearchBar: ({ width, fullWidth, size, styles, ...props }: SearchBarProps) =>
|
|
6
|
+
declare const SearchBar: ({ width, fullWidth, size, styles, ...props }: SearchBarProps) => React.JSX.Element;
|
|
6
7
|
export { SearchBar };
|
|
7
8
|
//# sourceMappingURL=SearchBar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchBar.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/TextInputs/SearchBar/SearchBar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SearchBar.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/TextInputs/SearchBar/SearchBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAO/C,UAAU,cAAe,SAAQ,cAAc;IAC7C,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,QAAA,MAAM,SAAS,GAAI,8CAA6D,cAAc,sBAmC7F,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { TextareaProps as MantineTextareaProps } from '@mantine/core';
|
|
2
3
|
import { CSSObject } from '@mantine/styles';
|
|
3
4
|
import { componentSizes } from '../shared/sizes';
|
|
@@ -7,6 +8,6 @@ type TextAreaProps = MantineTextareaProps & {
|
|
|
7
8
|
fullWidth?: boolean;
|
|
8
9
|
styles?: Record<string, CSSObject>;
|
|
9
10
|
};
|
|
10
|
-
declare const TextArea: ({ size, width, fullWidth, styles, ...props }: TextAreaProps) =>
|
|
11
|
+
declare const TextArea: ({ size, width, fullWidth, styles, ...props }: TextAreaProps) => React.JSX.Element;
|
|
11
12
|
export { TextArea };
|
|
12
13
|
//# sourceMappingURL=TextArea.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/TextInputs/TextArea/TextArea.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/TextInputs/TextArea/TextArea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAA+B,aAAa,IAAI,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACnG,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,KAAK,aAAa,GAAG,oBAAoB,GAAG;IAC1C,IAAI,CAAC,EAAE,MAAM,OAAO,cAAc,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACpC,CAAC;AAEF,QAAA,MAAM,QAAQ,GAAI,8CAA6D,aAAa,sBAoC3F,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { TextInputProps as MantineTextInputProps } from '@mantine/core';
|
|
2
3
|
import { CSSObject } from '@mantine/styles';
|
|
3
4
|
import { componentSizes } from '../shared/sizes';
|
|
@@ -7,6 +8,6 @@ type TextInputProps = MantineTextInputProps & {
|
|
|
7
8
|
fullWidth?: boolean;
|
|
8
9
|
styles?: Record<string, CSSObject>;
|
|
9
10
|
};
|
|
10
|
-
declare const TextInput: ({ size, width, fullWidth, styles, ...props }: TextInputProps) =>
|
|
11
|
+
declare const TextInput: ({ size, width, fullWidth, styles, ...props }: TextInputProps) => React.JSX.Element;
|
|
11
12
|
export { TextInput };
|
|
12
13
|
//# sourceMappingURL=TextInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/TextInputs/TextInput/TextInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/TextInputs/TextInput/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAiC,cAAc,IAAI,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,KAAK,cAAc,GAAG,qBAAqB,GAAG;IAC5C,IAAI,CAAC,EAAE,MAAM,OAAO,cAAc,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACpC,CAAC;AAEF,QAAA,MAAM,SAAS,GAAI,8CAA6D,cAAc,sBAmC7F,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AccordionProps as MantineAccordionProps, CSSObject } from '@mantine/core';
|
|
3
|
+
export interface AccordionProps extends Omit<MantineAccordionProps, 'chevron' | 'styles' | 'multiple' | 'value' | 'defaultValue' | 'onChange'> {
|
|
4
|
+
chevron?: React.ReactNode;
|
|
5
|
+
styles?: Record<string, CSSObject>;
|
|
6
|
+
multiple?: boolean;
|
|
7
|
+
value?: string | string[] | null;
|
|
8
|
+
defaultValue?: string | string[];
|
|
9
|
+
onChange?: (value: string | string[] | null) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const Accordion: (({ chevron, styles, ...props }: AccordionProps) => React.JSX.Element) & {
|
|
12
|
+
Item: React.ForwardRefExoticComponent<import("@mantine/core").AccordionItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
Control: React.ForwardRefExoticComponent<import("@mantine/core").AccordionControlProps & React.RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
Panel: typeof import("@mantine/core/lib/Accordion/AccordionPanel/AccordionPanel").AccordionPanel;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=Accordion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Accordion/Accordion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,cAAc,IAAI,qBAAqB,EACvC,SAAS,EACV,MAAM,eAAe,CAAC;AAMvB,MAAM,WAAW,cACf,SAAQ,IAAI,CAAC,qBAAqB,EAAE,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,cAAc,GAAG,UAAU,CAAC;IAC9G,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CAAC;IACjC,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACjC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,KAAK,IAAI,CAAC;CACtD;AA+DD,eAAO,MAAM,SAAS,mCA7DqC,cAAc;;;;CAiEvE,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Accordion as MantineAccordion, } from '@mantine/core';
|
|
3
|
+
import { IconChevronRight } from '@tabler/icons-react';
|
|
4
|
+
import { colors } from '../../../constants/colors';
|
|
5
|
+
import { fontBase, fontSize } from '../../../constants/font';
|
|
6
|
+
import { spacing } from '../../../constants/spacing';
|
|
7
|
+
const AccordionComponent = ({ chevron, styles, ...props }) => {
|
|
8
|
+
const style = {
|
|
9
|
+
root: {
|
|
10
|
+
width: '100%',
|
|
11
|
+
},
|
|
12
|
+
item: {
|
|
13
|
+
border: 'none',
|
|
14
|
+
borderBottom: `1px solid ${colors.neutral[100]}`,
|
|
15
|
+
backgroundColor: 'transparent',
|
|
16
|
+
transition: 'background-color 150ms ease',
|
|
17
|
+
'&:first-of-type': {
|
|
18
|
+
borderTop: `1px solid ${colors.neutral[100]}`,
|
|
19
|
+
},
|
|
20
|
+
'&[data-active]': {
|
|
21
|
+
backgroundColor: 'transparent',
|
|
22
|
+
},
|
|
23
|
+
// Lift Control's hover/focus to the whole row so action buttons rendered
|
|
24
|
+
// as siblings of Accordion.Control feel part of one cohesive surface.
|
|
25
|
+
'&:has([data-accordion-control]:hover)': {
|
|
26
|
+
backgroundColor: colors.neutral[25],
|
|
27
|
+
},
|
|
28
|
+
'&:has([data-accordion-control]:focus-visible)': {
|
|
29
|
+
outline: `2px solid ${colors.primary[200]}`,
|
|
30
|
+
outlineOffset: '-2px',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
control: {
|
|
34
|
+
padding: `${spacing.md} ${spacing.lg}`,
|
|
35
|
+
backgroundColor: 'transparent',
|
|
36
|
+
'&:focus-visible': {
|
|
37
|
+
outline: 'none',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
chevron: {
|
|
41
|
+
color: colors.neutral[200],
|
|
42
|
+
transition: 'transform 200ms ease',
|
|
43
|
+
'&[data-rotate]': {
|
|
44
|
+
transform: 'rotate(90deg)',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
label: {
|
|
48
|
+
...fontBase,
|
|
49
|
+
...fontSize['md'],
|
|
50
|
+
color: colors.neutral[300],
|
|
51
|
+
},
|
|
52
|
+
panel: {
|
|
53
|
+
padding: `0 ${spacing.lg} ${spacing.md}`,
|
|
54
|
+
},
|
|
55
|
+
...styles,
|
|
56
|
+
};
|
|
57
|
+
return (_jsx(MantineAccordion, { chevron: chevron !== null && chevron !== void 0 ? chevron : _jsx(IconChevronRight, { size: 16 }), chevronPosition: 'right', styles: style, ...props }));
|
|
58
|
+
};
|
|
59
|
+
export const Accordion = Object.assign(AccordionComponent, {
|
|
60
|
+
Item: MantineAccordion.Item,
|
|
61
|
+
Control: MantineAccordion.Control,
|
|
62
|
+
Panel: MantineAccordion.Panel,
|
|
63
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Accordion } from './Accordion';
|
|
3
|
+
declare const meta: Meta<typeof Accordion>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const MultiExpand: Story;
|
|
8
|
+
export declare const CustomHeader: Story;
|
|
9
|
+
export declare const DisabledItem: Story;
|
|
10
|
+
export declare const Controlled: Story;
|
|
11
|
+
//# sourceMappingURL=Accordion.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Accordion.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Accordion/Accordion.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AASxC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,SAAS,CAsDhC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAInC,eAAO,MAAM,OAAO,EAAE,KAwCrB,CAAC;AAIF,eAAO,MAAM,WAAW,EAAE,KA6BzB,CAAC;AAWF,eAAO,MAAM,YAAY,EAAE,KA4D1B,CAAC;AAIF,eAAO,MAAM,YAAY,EAAE,KA6B1B,CAAC;AAIF,eAAO,MAAM,UAAU,EAAE,KA6BxB,CAAC"}
|