@taiv/ui 1.14.1 → 2.0.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 +54 -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/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/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.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 +2 -2
- 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.map +1 -1
- package/dist/components/Info/Modals/Modal/Modal.js +9 -1
- package/dist/components/Info/Modals/StepperModal/StepperModal.d.ts +21 -0
- package/dist/components/Info/Modals/StepperModal/StepperModal.d.ts.map +1 -0
- package/dist/components/Info/Modals/StepperModal/StepperModal.js +50 -0
- package/dist/components/Info/Modals/StepperModal/StepperModal.stories.d.ts +10 -0
- package/dist/components/Info/Modals/StepperModal/StepperModal.stories.d.ts.map +1 -0
- package/dist/components/Info/Modals/StepperModal/StepperModal.stories.js +169 -0
- 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/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 +25 -19
- 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/InfoTooltip/InfoTooltip.d.ts +1 -1
- 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/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 +40 -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/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/SegmentedControl/SegmentedControl.d.ts +11 -8
- 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.map +1 -1
- package/dist/components/Inputs/Dates/DatePicker/DatePicker.js +23 -7
- package/dist/components/Inputs/Dates/DateTimePicker/DateTimePicker.d.ts +12 -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 +19 -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/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 +2 -2
- 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.map +1 -1
- package/dist/components/Inputs/Dropdowns/Select/Select.js +5 -3
- package/dist/components/Inputs/Dropzone/Dropzone.d.ts +23 -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/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/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/Card/Card.d.ts +1 -1
- package/dist/components/Layout/Card/Card.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.map +1 -1
- package/dist/components/Layout/Divider/Divider.js +4 -2
- package/dist/components/Layout/Group/Group.d.ts +1 -1
- package/dist/components/Layout/Group/Group.d.ts.map +1 -1
- package/dist/components/Layout/Loader/Loader.d.ts +1 -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 +23 -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/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.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 +6 -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/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/Stepper/Step.stories.d.ts +118 -118
- 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/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/index.d.ts +149 -66
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +110 -67
- 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/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 +26 -2
|
@@ -1,40 +1,87 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Switch as MantineToggle } from '@mantine/core';
|
|
3
|
-
import { neutral, primary } from '../../../../constants/colors';
|
|
2
|
+
import { Switch as MantineToggle, } from '@mantine/core';
|
|
3
|
+
import { error, neutral, primary } from '../../../../constants/colors';
|
|
4
4
|
import { fontBase, fontSize } from '../../../../constants/font';
|
|
5
5
|
// Size Presets
|
|
6
6
|
const componentSizes = {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
md: {
|
|
8
|
+
height: 28,
|
|
9
|
+
iconSize: 12,
|
|
10
|
+
mantineSize: 'xl',
|
|
11
|
+
thumbScale: 1.3,
|
|
12
|
+
thumbTranslate: 10,
|
|
13
|
+
width: 48,
|
|
14
|
+
...fontSize['md'],
|
|
15
|
+
},
|
|
16
|
+
sm: {
|
|
17
|
+
height: 18,
|
|
18
|
+
iconSize: 8,
|
|
19
|
+
mantineSize: 'md',
|
|
20
|
+
thumbScale: 1.3,
|
|
21
|
+
thumbTranslate: 2,
|
|
22
|
+
width: 24,
|
|
23
|
+
...fontSize['sm'],
|
|
24
|
+
},
|
|
9
25
|
};
|
|
10
|
-
|
|
26
|
+
// Variant Presets — shape mirrors Button.variant: each variant owns its
|
|
27
|
+
// active color and (optionally) the icon rendered inside the thumb when checked.
|
|
28
|
+
const componentVariants = {
|
|
29
|
+
error: {
|
|
30
|
+
activeColor: error[100],
|
|
31
|
+
getThumbIcon: (_iconSize) => null,
|
|
32
|
+
},
|
|
33
|
+
primary: {
|
|
34
|
+
activeColor: primary[200],
|
|
35
|
+
getThumbIcon: (_iconSize) => null,
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
const Toggle = ({ checked, onChange, styles, size = 'md', variant = 'primary', label, ...props }) => {
|
|
11
39
|
const selectedSize = componentSizes[size];
|
|
40
|
+
const selectedVariant = componentVariants[variant];
|
|
41
|
+
const { activeColor, getThumbIcon } = selectedVariant;
|
|
42
|
+
const thumbIcon = getThumbIcon(selectedSize.iconSize);
|
|
12
43
|
const style = {
|
|
13
44
|
container: {
|
|
14
|
-
display: 'flex',
|
|
15
45
|
alignItems: 'center',
|
|
46
|
+
display: 'flex',
|
|
16
47
|
gap: '10px',
|
|
17
48
|
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
cursor: 'pointer',
|
|
23
|
-
backgroundColor: checked ? primary[200] : neutral[50],
|
|
49
|
+
label: {
|
|
50
|
+
...fontBase,
|
|
51
|
+
color: neutral[200],
|
|
52
|
+
fontSize: selectedSize.fontSize,
|
|
24
53
|
},
|
|
25
54
|
thumb: {
|
|
26
|
-
|
|
27
|
-
|
|
55
|
+
alignItems: 'center',
|
|
56
|
+
border: `1px solid ${neutral[50]}`,
|
|
57
|
+
boxShadow: 'none',
|
|
58
|
+
display: 'flex',
|
|
59
|
+
// When the hidden input is checked, the track is its sibling and the thumb is inside —
|
|
60
|
+
// use `input:checked + * &` to target the thumb; this matches Mantine's own selector specificity.
|
|
61
|
+
'input:checked + * &': {
|
|
62
|
+
border: `1px solid ${activeColor}`,
|
|
63
|
+
boxShadow: '0 2px 2px rgba(0,0,0,0.2)',
|
|
64
|
+
transform: `scale(${selectedSize.thumbScale}) translateX(-${selectedSize.thumbTranslate + selectedSize.thumbTranslate / 2}%)`,
|
|
65
|
+
},
|
|
66
|
+
justifyContent: 'center',
|
|
67
|
+
transform: `scale(${selectedSize.thumbScale}) translateX(${selectedSize.thumbTranslate}%)`,
|
|
28
68
|
transition: 'all 300ms ease-in-out',
|
|
29
|
-
border: checked ? `1px solid ${primary[200]}` : `1px solid ${neutral[50]}`,
|
|
30
69
|
},
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
70
|
+
track: {
|
|
71
|
+
backgroundColor: neutral[50],
|
|
72
|
+
borderColor: neutral[50],
|
|
73
|
+
cursor: 'pointer',
|
|
74
|
+
height: `${selectedSize.height}px`,
|
|
75
|
+
// Override Mantine's `input:checked + .mantine-…` rule by matching its specificity.
|
|
76
|
+
'input:checked + &': {
|
|
77
|
+
backgroundColor: activeColor,
|
|
78
|
+
borderColor: activeColor,
|
|
79
|
+
},
|
|
80
|
+
transition: 'background-color 300ms ease-in-out, border-color 300ms ease-in-out',
|
|
81
|
+
width: `${selectedSize.width}px`,
|
|
35
82
|
},
|
|
36
83
|
...styles,
|
|
37
84
|
};
|
|
38
|
-
return (_jsxs("div", { style: style.container, children: [_jsx(MantineToggle, { checked: checked, onChange: onChange,
|
|
85
|
+
return (_jsxs("div", { style: style.container, children: [_jsx(MantineToggle, { checked: checked, onChange: onChange, size: selectedSize.mantineSize, styles: style, thumbIcon: checked ? thumbIcon : null, ...props }), label && _jsx("span", { style: style.label, children: label })] }));
|
|
39
86
|
};
|
|
40
87
|
export { Toggle };
|
|
@@ -6,6 +6,7 @@ type Story = StoryObj<typeof meta>;
|
|
|
6
6
|
export declare const Default: Story;
|
|
7
7
|
export declare const Sizes: Story;
|
|
8
8
|
export declare const States: Story;
|
|
9
|
+
export declare const Variants: Story;
|
|
9
10
|
export declare const WithoutLabel: Story;
|
|
10
11
|
export declare const CustomStyles: Story;
|
|
11
12
|
//# sourceMappingURL=Toggle.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toggle.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Controls/Toggle/Toggle.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"Toggle.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Controls/Toggle/Toggle.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAoG7B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAcrB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAcnB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAwBpB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAmBtB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAc1B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KA8C1B,CAAC"}
|
|
@@ -1,22 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Toggle } from './Toggle';
|
|
3
2
|
import { Group } from '../../../Layout/Group/Group';
|
|
3
|
+
import { Toggle } from './Toggle';
|
|
4
4
|
const meta = {
|
|
5
|
-
title: 'Components/Inputs/Controls/Toggle',
|
|
6
|
-
component: Toggle,
|
|
7
|
-
parameters: {
|
|
8
|
-
layout: 'centered',
|
|
9
|
-
},
|
|
10
5
|
argTypes: {
|
|
11
|
-
size: {
|
|
12
|
-
control: { type: 'select' },
|
|
13
|
-
options: ['sm', 'md'],
|
|
14
|
-
description: 'Controls the toggle size and label font size',
|
|
15
|
-
table: {
|
|
16
|
-
type: { summary: "'sm' | 'md'" },
|
|
17
|
-
defaultValue: { summary: "'md'" },
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
6
|
checked: {
|
|
21
7
|
control: { type: 'boolean' },
|
|
22
8
|
description: 'Controlled checked state',
|
|
@@ -24,11 +10,13 @@ const meta = {
|
|
|
24
10
|
type: { summary: 'boolean' },
|
|
25
11
|
},
|
|
26
12
|
},
|
|
27
|
-
|
|
28
|
-
control: { type: '
|
|
29
|
-
description: '
|
|
13
|
+
variant: {
|
|
14
|
+
control: { type: 'select' },
|
|
15
|
+
description: 'Visual variant. "error" swaps the active track to red and renders an X icon inside the thumb — use for destructive semantics (e.g. "on = blocked").',
|
|
16
|
+
options: ['primary', 'error'],
|
|
30
17
|
table: {
|
|
31
|
-
|
|
18
|
+
defaultValue: { summary: "'primary'" },
|
|
19
|
+
type: { summary: "'primary' | 'error'" },
|
|
32
20
|
},
|
|
33
21
|
},
|
|
34
22
|
description: {
|
|
@@ -38,6 +26,14 @@ const meta = {
|
|
|
38
26
|
type: { summary: 'ReactNode' },
|
|
39
27
|
},
|
|
40
28
|
},
|
|
29
|
+
disabled: {
|
|
30
|
+
control: { type: 'boolean' },
|
|
31
|
+
description: 'Disabled state',
|
|
32
|
+
table: {
|
|
33
|
+
defaultValue: { summary: 'false' },
|
|
34
|
+
type: { summary: 'boolean' },
|
|
35
|
+
},
|
|
36
|
+
},
|
|
41
37
|
error: {
|
|
42
38
|
control: { type: 'text' },
|
|
43
39
|
description: 'Displays error message after input',
|
|
@@ -45,37 +41,52 @@ const meta = {
|
|
|
45
41
|
type: { summary: 'ReactNode' },
|
|
46
42
|
},
|
|
47
43
|
},
|
|
48
|
-
|
|
49
|
-
control: { type: '
|
|
50
|
-
description: '
|
|
44
|
+
label: {
|
|
45
|
+
control: { type: 'text' },
|
|
46
|
+
description: 'Toggle label displayed next to the switch',
|
|
51
47
|
table: {
|
|
52
|
-
type: { summary: '
|
|
53
|
-
defaultValue: { summary: 'false' },
|
|
48
|
+
type: { summary: 'string' },
|
|
54
49
|
},
|
|
55
50
|
},
|
|
56
51
|
labelPosition: {
|
|
57
52
|
control: { type: 'select' },
|
|
58
|
-
options: ['left', 'right'],
|
|
59
53
|
description: 'Position of label',
|
|
54
|
+
options: ['left', 'right'],
|
|
60
55
|
table: {
|
|
61
|
-
type: { summary: '"left" | "right"' },
|
|
62
56
|
defaultValue: { summary: '"left"' },
|
|
57
|
+
type: { summary: '"left" | "right"' },
|
|
63
58
|
},
|
|
64
59
|
},
|
|
65
|
-
|
|
60
|
+
offLabel: {
|
|
66
61
|
control: { type: 'text' },
|
|
67
|
-
description: 'Inner label when Switch is in
|
|
62
|
+
description: 'Inner label when Switch is in unchecked state',
|
|
68
63
|
table: {
|
|
69
64
|
type: { summary: 'ReactNode' },
|
|
70
65
|
},
|
|
71
66
|
},
|
|
72
|
-
|
|
67
|
+
onChange: {
|
|
68
|
+
action: 'changed',
|
|
69
|
+
description: 'Change handler function',
|
|
70
|
+
table: {
|
|
71
|
+
type: { summary: '(event: ChangeEvent<HTMLInputElement>) => void' },
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
onLabel: {
|
|
73
75
|
control: { type: 'text' },
|
|
74
|
-
description: 'Inner label when Switch is in
|
|
76
|
+
description: 'Inner label when Switch is in checked state',
|
|
75
77
|
table: {
|
|
76
78
|
type: { summary: 'ReactNode' },
|
|
77
79
|
},
|
|
78
80
|
},
|
|
81
|
+
size: {
|
|
82
|
+
control: { type: 'select' },
|
|
83
|
+
description: 'Controls the toggle size and label font size',
|
|
84
|
+
options: ['sm', 'md'],
|
|
85
|
+
table: {
|
|
86
|
+
defaultValue: { summary: "'md'" },
|
|
87
|
+
type: { summary: "'sm' | 'md'" },
|
|
88
|
+
},
|
|
89
|
+
},
|
|
79
90
|
styles: {
|
|
80
91
|
control: { type: 'object' },
|
|
81
92
|
description: 'Custom styles object',
|
|
@@ -83,38 +94,40 @@ const meta = {
|
|
|
83
94
|
type: { summary: 'Record<string, CSSObject>' },
|
|
84
95
|
},
|
|
85
96
|
},
|
|
86
|
-
onChange: {
|
|
87
|
-
action: 'changed',
|
|
88
|
-
description: 'Change handler function',
|
|
89
|
-
table: {
|
|
90
|
-
type: { summary: '(event: ChangeEvent<HTMLInputElement>) => void' },
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
97
|
},
|
|
98
|
+
component: Toggle,
|
|
99
|
+
parameters: {
|
|
100
|
+
layout: 'centered',
|
|
101
|
+
},
|
|
102
|
+
title: 'Components/Inputs/Controls/Toggle',
|
|
94
103
|
};
|
|
95
104
|
export default meta;
|
|
96
105
|
export const Default = {
|
|
97
106
|
args: {
|
|
98
|
-
label: 'Enable notifications',
|
|
99
107
|
checked: false,
|
|
100
|
-
size: 'md',
|
|
101
108
|
disabled: false,
|
|
109
|
+
label: 'Enable notifications',
|
|
102
110
|
labelPosition: 'left',
|
|
111
|
+
onChange: () => { },
|
|
112
|
+
size: 'md',
|
|
113
|
+
styles: undefined,
|
|
114
|
+
variant: 'primary',
|
|
115
|
+
},
|
|
116
|
+
render: function Render(args) {
|
|
117
|
+
return _jsx(Toggle, { ...args });
|
|
103
118
|
},
|
|
119
|
+
};
|
|
120
|
+
export const Sizes = {
|
|
104
121
|
parameters: {
|
|
105
122
|
docs: {
|
|
106
123
|
source: {
|
|
107
|
-
code:
|
|
108
|
-
label="Enable notifications"
|
|
109
|
-
checked={isEnabled}
|
|
110
|
-
onChange={(event) => setIsEnabled(event.currentTarget.checked)}
|
|
111
|
-
/>`,
|
|
124
|
+
code: false,
|
|
112
125
|
},
|
|
113
126
|
},
|
|
114
127
|
},
|
|
128
|
+
render: () => (_jsxs(Group, { gap: '20px', children: [_jsx(Toggle, { checked: true, label: 'Small Toggle', size: 'sm' }), _jsx(Toggle, { checked: false, label: 'Medium Toggle (Default)', size: 'md' })] })),
|
|
115
129
|
};
|
|
116
|
-
export const
|
|
117
|
-
render: () => (_jsxs(Group, { gap: "20px", children: [_jsx(Toggle, { size: "sm", label: "Small Toggle", checked: true }), _jsx(Toggle, { size: "md", label: "Medium Toggle (Default)", checked: false })] })),
|
|
130
|
+
export const States = {
|
|
118
131
|
parameters: {
|
|
119
132
|
docs: {
|
|
120
133
|
source: {
|
|
@@ -122,19 +135,22 @@ export const Sizes = {
|
|
|
122
135
|
},
|
|
123
136
|
},
|
|
124
137
|
},
|
|
138
|
+
render: () => (_jsxs(Group, { gap: '20px', children: [_jsx(Toggle, { checked: true, label: 'Normal Toggle' }), _jsx(Toggle, { checked: false, disabled: true, label: 'Disabled Toggle' }), _jsx(Toggle, { checked: true, description: 'This is a description that provides additional context', label: 'Toggle with Description' }), _jsx(Toggle, { checked: false, error: 'This field is required', label: 'Toggle with Error' })] })),
|
|
125
139
|
};
|
|
126
|
-
export const
|
|
127
|
-
render: () => (_jsxs(Group, { gap: "20px", children: [_jsx(Toggle, { label: "Normal Toggle", checked: true }), _jsx(Toggle, { label: "Disabled Toggle", checked: false, disabled: true }), _jsx(Toggle, { label: "Toggle with Description", description: "This is a description that provides additional context", checked: true }), _jsx(Toggle, { label: "Toggle with Error", error: "This field is required", checked: false })] })),
|
|
140
|
+
export const Variants = {
|
|
128
141
|
parameters: {
|
|
129
142
|
docs: {
|
|
143
|
+
description: {
|
|
144
|
+
story: 'Use `variant="error"` when the toggled-on state has destructive semantics (e.g. a category is blocked). The active track turns red and a tabler X icon renders inside the thumb while checked.',
|
|
145
|
+
},
|
|
130
146
|
source: {
|
|
131
|
-
code:
|
|
147
|
+
code: `<Toggle label="Block this category" checked={isBlocked} variant="error" onChange={...} />`,
|
|
132
148
|
},
|
|
133
149
|
},
|
|
134
150
|
},
|
|
151
|
+
render: () => (_jsxs(Group, { gap: '32px', children: [_jsx(Toggle, { checked: true, label: 'Primary (default)', variant: 'primary' }), _jsx(Toggle, { checked: true, label: 'Error \u2014 on means blocked', variant: 'error' }), _jsx(Toggle, { checked: false, label: 'Error \u2014 off state', variant: 'error' })] })),
|
|
135
152
|
};
|
|
136
153
|
export const WithoutLabel = {
|
|
137
|
-
render: () => (_jsxs(Group, { gap: "20px", children: [_jsx(Toggle, { checked: true }), _jsx(Toggle, { checked: false })] })),
|
|
138
154
|
parameters: {
|
|
139
155
|
docs: {
|
|
140
156
|
source: {
|
|
@@ -142,38 +158,39 @@ export const WithoutLabel = {
|
|
|
142
158
|
},
|
|
143
159
|
},
|
|
144
160
|
},
|
|
161
|
+
render: () => (_jsxs(Group, { gap: '20px', children: [_jsx(Toggle, { checked: true }), _jsx(Toggle, { checked: false })] })),
|
|
145
162
|
};
|
|
146
163
|
export const CustomStyles = {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
164
|
+
parameters: {
|
|
165
|
+
docs: {
|
|
166
|
+
source: {
|
|
167
|
+
code: false,
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
render: () => (_jsxs(Group, { gap: '20px', children: [_jsx(Toggle, { checked: true, label: 'Custom Styled Toggle', styles: {
|
|
172
|
+
label: {
|
|
173
|
+
color: '#495057',
|
|
174
|
+
fontWeight: 600,
|
|
150
175
|
},
|
|
151
176
|
thumb: {
|
|
152
177
|
backgroundColor: '#ffffff',
|
|
153
178
|
border: '2px solid #dee2e6',
|
|
154
179
|
},
|
|
155
|
-
label: {
|
|
156
|
-
fontWeight: 600,
|
|
157
|
-
color: '#495057',
|
|
158
|
-
},
|
|
159
|
-
} }), _jsx(Toggle, { label: "Another Custom Style", checked: false, styles: {
|
|
160
180
|
track: {
|
|
161
|
-
backgroundColor: '#
|
|
181
|
+
backgroundColor: '#ff6b6b',
|
|
182
|
+
},
|
|
183
|
+
} }), _jsx(Toggle, { checked: false, label: 'Another Custom Style', styles: {
|
|
184
|
+
label: {
|
|
185
|
+
color: '#4CAF50',
|
|
186
|
+
fontSize: '16px',
|
|
162
187
|
},
|
|
163
188
|
thumb: {
|
|
164
189
|
backgroundColor: '#ffffff',
|
|
165
190
|
border: '2px solid #2E7D32',
|
|
166
191
|
},
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
fontSize: '16px',
|
|
192
|
+
track: {
|
|
193
|
+
backgroundColor: '#4CAF50',
|
|
170
194
|
},
|
|
171
195
|
} })] })),
|
|
172
|
-
parameters: {
|
|
173
|
-
docs: {
|
|
174
|
-
source: {
|
|
175
|
-
code: false,
|
|
176
|
-
},
|
|
177
|
-
},
|
|
178
|
-
},
|
|
179
196
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Dates/DatePicker/DatePicker.tsx"],"names":[],"mappings":"AACA,OAAO,EAA6C,oBAAoB,IAAI,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAEhI,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,SAAS,GAAG,UAAU,GAAG,OAAO,GAAG,SAAS,CAAE,SAAQ,IAAI,CAAC,2BAA2B,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC;IAC7I,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;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,SAAS,GAAG,UAAU,GAAG,OAAO,GAAG,SAAS,EAAE,qEAQhF,eAAe,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Dates/DatePicker/DatePicker.tsx"],"names":[],"mappings":"AACA,OAAO,EAA6C,oBAAoB,IAAI,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAEhI,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,SAAS,GAAG,UAAU,GAAG,OAAO,GAAG,SAAS,CAAE,SAAQ,IAAI,CAAC,2BAA2B,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC;IAC7I,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;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,SAAS,GAAG,UAAU,GAAG,OAAO,GAAG,SAAS,EAAE,qEAQhF,eAAe,CAAC,CAAC,CAAC,4CAgGpB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { DatePickerInput as MantineDatePickerInput } from '@mantine/dates';
|
|
3
3
|
import { createStyles } from '@mantine/core';
|
|
4
|
-
import { neutral } from '../../../../constants/colors';
|
|
4
|
+
import { neutral, primary, white } from '../../../../constants/colors';
|
|
5
5
|
import { fontBase } from '../../../../constants/font';
|
|
6
6
|
import { spacing } from '../../../../constants/spacing';
|
|
7
7
|
import { componentSizes } from '../../Dropdowns/shared/sizes';
|
|
@@ -45,18 +45,34 @@ export const DatePicker = ({ size = 'md', width, fullWidth = false, placeholder
|
|
|
45
45
|
'& .mantine-Day-day[data-selected="true"]': {
|
|
46
46
|
fontFamily: 'Poppins, sans-serif',
|
|
47
47
|
borderRadius: '50%',
|
|
48
|
+
backgroundColor: primary[200],
|
|
49
|
+
color: white,
|
|
50
|
+
boxShadow: 'none',
|
|
51
|
+
'&:hover': {
|
|
52
|
+
backgroundColor: primary[300],
|
|
53
|
+
color: white,
|
|
54
|
+
},
|
|
55
|
+
'&:focus-visible': {
|
|
56
|
+
outline: `2px solid ${primary[200]}`,
|
|
57
|
+
outlineOffset: 2,
|
|
58
|
+
},
|
|
48
59
|
},
|
|
49
60
|
'& .mantine-Day-day[data-in-range="true"]': {
|
|
50
61
|
fontFamily: 'Poppins, sans-serif',
|
|
51
62
|
borderRadius: '50%',
|
|
63
|
+
backgroundColor: primary[25],
|
|
64
|
+
'&:hover': {
|
|
65
|
+
backgroundColor: primary[50],
|
|
66
|
+
},
|
|
52
67
|
},
|
|
53
|
-
'& .mantine-Day-day[data-first-in-range="true"]': {
|
|
54
|
-
fontFamily: 'Poppins, sans-serif',
|
|
55
|
-
borderRadius: '50%',
|
|
56
|
-
},
|
|
57
|
-
'& .mantine-Day-day[data-last-in-range="true"]': {
|
|
68
|
+
'& .mantine-Day-day[data-first-in-range="true"], & .mantine-Day-day[data-last-in-range="true"]': {
|
|
58
69
|
fontFamily: 'Poppins, sans-serif',
|
|
59
70
|
borderRadius: '50%',
|
|
71
|
+
backgroundColor: primary[200],
|
|
72
|
+
color: white,
|
|
73
|
+
'&:hover': {
|
|
74
|
+
backgroundColor: primary[300],
|
|
75
|
+
},
|
|
60
76
|
},
|
|
61
77
|
'& .mantine-WeekdaysRow-weekday': {
|
|
62
78
|
textAlign: 'center',
|
|
@@ -71,5 +87,5 @@ export const DatePicker = ({ size = 'md', width, fullWidth = false, placeholder
|
|
|
71
87
|
placeholder: classes.placeholder,
|
|
72
88
|
label: classes.label,
|
|
73
89
|
calendar: classes.calendar,
|
|
74
|
-
}, placeholder: placeholder, popoverProps: { radius: 'lg' }, ...props }));
|
|
90
|
+
}, placeholder: placeholder, popoverProps: { radius: 'lg' }, firstDayOfWeek: 0, ...props }));
|
|
75
91
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DateTimePickerProps as MantineDateTimePickerProps } from '@mantine/dates';
|
|
2
|
+
import { CSSObject } from '@mantine/styles';
|
|
3
|
+
import { componentSizes } from '../../Dropdowns/shared/sizes';
|
|
4
|
+
export interface DateTimePickerProps extends Omit<MantineDateTimePickerProps, 'styles'> {
|
|
5
|
+
size?: keyof typeof componentSizes;
|
|
6
|
+
width?: string | number;
|
|
7
|
+
fullWidth?: boolean;
|
|
8
|
+
styles?: Record<string, CSSObject>;
|
|
9
|
+
showIcon?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const DateTimePicker: ({ size, width, fullWidth, placeholder, showIcon, styles, ...props }: DateTimePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=DateTimePicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateTimePicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Dates/DateTimePicker/DateTimePicker.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,mBAAmB,IAAI,0BAA0B,EAClD,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,0BAA0B,EAAE,QAAQ,CAAC;IACrF,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;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,cAAc,GAAI,qEAQ5B,mBAAmB,4CA4FrB,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { DateTimePicker as MantineDateTimePicker, } from '@mantine/dates';
|
|
3
|
+
import { createStyles } from '@mantine/core';
|
|
4
|
+
import { neutral, primary, white } from '../../../../constants/colors';
|
|
5
|
+
import { fontBase } from '../../../../constants/font';
|
|
6
|
+
import { spacing } from '../../../../constants/spacing';
|
|
7
|
+
import { componentSizes } from '../../Dropdowns/shared/sizes';
|
|
8
|
+
export const DateTimePicker = ({ size = 'md', width, fullWidth = false, placeholder = 'Pick date and time', showIcon = true, styles, ...props }) => {
|
|
9
|
+
const selectedSize = componentSizes[size];
|
|
10
|
+
const { classes } = createStyles(() => ({
|
|
11
|
+
root: {
|
|
12
|
+
width: fullWidth ? '100%' : width || `${selectedSize.minWidth * 1.2}px`,
|
|
13
|
+
},
|
|
14
|
+
input: {
|
|
15
|
+
height: `${selectedSize.height}px`,
|
|
16
|
+
paddingRight: selectedSize.inputPadding,
|
|
17
|
+
...fontBase,
|
|
18
|
+
fontSize: selectedSize.fontSize,
|
|
19
|
+
color: neutral[300],
|
|
20
|
+
borderRadius: '8px',
|
|
21
|
+
border: `1px solid ${neutral[100]}`,
|
|
22
|
+
transition: 'all 200ms ease-in-out',
|
|
23
|
+
whiteSpace: 'nowrap',
|
|
24
|
+
overflow: 'hidden',
|
|
25
|
+
textOverflow: 'ellipsis',
|
|
26
|
+
},
|
|
27
|
+
placeholder: {
|
|
28
|
+
...fontBase,
|
|
29
|
+
fontSize: selectedSize.fontSize,
|
|
30
|
+
color: neutral[200],
|
|
31
|
+
},
|
|
32
|
+
label: {
|
|
33
|
+
...fontBase,
|
|
34
|
+
fontSize: `calc(${selectedSize.fontSize} - 1px)`,
|
|
35
|
+
color: neutral[200],
|
|
36
|
+
},
|
|
37
|
+
calendar: {
|
|
38
|
+
'& .mantine-UnstyledButton-root': {
|
|
39
|
+
borderRadius: '8px',
|
|
40
|
+
fontFamily: 'Poppins, sans-serif',
|
|
41
|
+
},
|
|
42
|
+
'& .mantine-Day-day': {
|
|
43
|
+
borderRadius: '50%',
|
|
44
|
+
},
|
|
45
|
+
'& .mantine-Day-day[data-selected="true"]': {
|
|
46
|
+
fontFamily: 'Poppins, sans-serif',
|
|
47
|
+
borderRadius: '50%',
|
|
48
|
+
backgroundColor: primary[200],
|
|
49
|
+
color: white,
|
|
50
|
+
boxShadow: 'none',
|
|
51
|
+
'&:hover': {
|
|
52
|
+
backgroundColor: primary[300],
|
|
53
|
+
color: white,
|
|
54
|
+
},
|
|
55
|
+
'&:focus-visible': {
|
|
56
|
+
outline: `2px solid ${primary[200]}`,
|
|
57
|
+
outlineOffset: 2,
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
'& .mantine-WeekdaysRow-weekday': {
|
|
61
|
+
textAlign: 'center',
|
|
62
|
+
fontFamily: 'Poppins, sans-serif',
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
timeWrapper: {
|
|
66
|
+
'& input': {
|
|
67
|
+
...fontBase,
|
|
68
|
+
fontSize: selectedSize.fontSize,
|
|
69
|
+
color: neutral[300],
|
|
70
|
+
borderRadius: '8px',
|
|
71
|
+
border: `1px solid ${neutral[100]}`,
|
|
72
|
+
},
|
|
73
|
+
'& .mantine-ActionIcon-root': {
|
|
74
|
+
borderRadius: '8px',
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
...styles,
|
|
78
|
+
}))();
|
|
79
|
+
return (_jsx(MantineDateTimePicker, { icon: showIcon ? _jsx("i", { className: "far fa-calendar", style: { fontSize: 14, marginLeft: spacing.xxs } }) : undefined, radius: "lg", size: "xl", classNames: {
|
|
80
|
+
root: classes.root,
|
|
81
|
+
input: classes.input,
|
|
82
|
+
placeholder: classes.placeholder,
|
|
83
|
+
label: classes.label,
|
|
84
|
+
calendar: classes.calendar,
|
|
85
|
+
timeWrapper: classes.timeWrapper,
|
|
86
|
+
}, placeholder: placeholder, popoverProps: { radius: 'lg' }, firstDayOfWeek: 0, ...props }));
|
|
87
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { DateTimePicker } from './DateTimePicker';
|
|
3
|
+
declare const meta: Meta<typeof DateTimePicker>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Sizes: Story;
|
|
8
|
+
export declare const States: Story;
|
|
9
|
+
export declare const WithAndWithoutIcon: Story;
|
|
10
|
+
export declare const WithSeconds: Story;
|
|
11
|
+
export declare const FullWidth: Story;
|
|
12
|
+
export declare const CustomStyles: Story;
|
|
13
|
+
//# sourceMappingURL=DateTimePicker.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateTimePicker.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Dates/DateTimePicker/DateTimePicker.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,CA2HrC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KA6BrB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAenB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAiBpB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAchC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAWzB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAavB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KA+C1B,CAAC"}
|