@taiv/ui 1.15.0 → 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/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 +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/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
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useDisclosure } from '../../../hooks/useDisclosure';
|
|
3
|
+
import { Button } from '../../Inputs/Buttons/Button/Button';
|
|
4
|
+
import { Group } from '../../Layout/Group/Group';
|
|
5
|
+
import { Stack } from '../../Layout/Stack/Stack';
|
|
6
|
+
import { Text } from '../../Typography/Text/Text';
|
|
7
|
+
import { MobileDrawer } from './MobileDrawer';
|
|
8
|
+
const meta = {
|
|
9
|
+
component: MobileDrawer,
|
|
10
|
+
parameters: {
|
|
11
|
+
docs: {
|
|
12
|
+
description: {
|
|
13
|
+
component: 'Bottom-anchored mobile sheet with a grab-handle, rounded top corners, and pinned header/footer. Use on touch viewports; pair with the right-anchored `Drawer` on desktop or use `ResponsiveDrawer` to branch automatically.',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
layout: 'fullscreen',
|
|
17
|
+
},
|
|
18
|
+
title: 'Components/Info/MobileDrawer',
|
|
19
|
+
};
|
|
20
|
+
export default meta;
|
|
21
|
+
export const Default = {
|
|
22
|
+
render: () => {
|
|
23
|
+
const [opened, { open, close }] = useDisclosure(false);
|
|
24
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { onClick: open, children: "Open mobile drawer" }), _jsx(MobileDrawer, { onClose: close, opened: opened, title: 'Slide details', children: _jsxs(Stack, { children: [_jsx(Text, { children: "Grab handle at the top. Body scrolls when needed." }), _jsx(Text, { variant: 'subtle', children: "Anchored to the bottom at up to 75% viewport height." })] }) })] }));
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
export const WithFooter = {
|
|
28
|
+
render: () => {
|
|
29
|
+
const [opened, { open, close }] = useDisclosure(false);
|
|
30
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { onClick: open, children: "Open with pinned footer" }), _jsx(MobileDrawer, { footer: _jsxs(Group, { grow: true, children: [_jsx(Button, { onClick: close, variant: 'cancel', children: "Cancel" }), _jsx(Button, { onClick: close, children: "Confirm" })] }), onClose: close, opened: opened, title: 'Discard changes?', children: _jsx(Text, { children: "Pinned footer keeps primary actions visible while body scrolls." }) })] }));
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
export const ShorterSheet = {
|
|
34
|
+
render: () => {
|
|
35
|
+
const [opened, { open, close }] = useDisclosure(false);
|
|
36
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { onClick: open, children: "Open 60% sheet" }), _jsx(MobileDrawer, { maxHeightVh: 60, onClose: close, opened: opened, title: 'Filter', children: _jsx(Text, { children: "Custom viewport cap via `maxHeightVh`." }) })] }));
|
|
37
|
+
},
|
|
38
|
+
};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import type { CSSObject } from "@mantine/core";
|
|
2
3
|
import { modalVariants } from "../variants";
|
|
4
|
+
import { ButtonProps } from "../../../Inputs/Buttons/Button/Button";
|
|
5
|
+
/** Style overrides merged into Mantine `Modal` `styles` (object form only). */
|
|
6
|
+
export type FormModalStylesOverride = Partial<Record<"body" | "close" | "content" | "header" | "inner" | "overlay" | "root" | "title", CSSObject>>;
|
|
3
7
|
export interface FormModalProps {
|
|
4
8
|
opened: boolean;
|
|
5
9
|
onClose: () => void;
|
|
@@ -13,6 +17,18 @@ export interface FormModalProps {
|
|
|
13
17
|
onConfirm?: () => void;
|
|
14
18
|
cancelLabel?: string;
|
|
15
19
|
confirmLabel?: string;
|
|
20
|
+
confirmRightIcon?: React.ReactNode;
|
|
21
|
+
cancelLeftIcon?: React.ReactNode;
|
|
22
|
+
confirmVariant?: ButtonProps['variant'];
|
|
23
|
+
/** Optional destructive footer action (e.g. Delete on edit modals). Rendered before Cancel. */
|
|
24
|
+
onDelete?: () => void;
|
|
25
|
+
deleteLabel?: string;
|
|
26
|
+
deleteButtonDisabled?: boolean;
|
|
27
|
+
deleteButtonLoading?: boolean;
|
|
28
|
+
deleteLeftIcon?: React.ReactNode;
|
|
29
|
+
fullScreen?: boolean;
|
|
30
|
+
/** Merged into Mantine `Modal` `styles` (e.g. lock body scroll when children use an inner `ScrollArea`). */
|
|
31
|
+
modalStyles?: FormModalStylesOverride;
|
|
16
32
|
}
|
|
17
|
-
export declare const FormModal: ({ opened, onClose, icon, children, size, modalVariant, confirmButtonDisabled, confirmButtonLoading, onCancel, onConfirm, cancelLabel, confirmLabel, }: FormModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export declare const FormModal: ({ opened, onClose, icon, children, size, modalVariant, confirmButtonDisabled, confirmButtonLoading, onCancel, onConfirm, cancelLabel, confirmLabel, confirmRightIcon, cancelLeftIcon, confirmVariant, onDelete, deleteLabel, deleteButtonDisabled, deleteButtonLoading, deleteLeftIcon, modalStyles, fullScreen, }: FormModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
34
|
//# sourceMappingURL=FormModal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/Info/Modals/FormModal/FormModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"FormModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/Info/Modals/FormModal/FormModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAK/C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAU,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAE5E,+EAA+E;AAC/E,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAC3C,MAAM,CACF,MAAM,GACN,OAAO,GACP,SAAS,GACT,QAAQ,GACR,OAAO,GACP,SAAS,GACT,MAAM,GACN,OAAO,EACT,SAAS,CACV,CACF,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,OAAO,aAAa,CAAC;IAC1C,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACnC,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,cAAc,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IACxC,+FAA+F;IAC/F,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4GAA4G;IAC5G,WAAW,CAAC,EAAE,uBAAuB,CAAC;CACvC;AAED,eAAO,MAAM,SAAS,GAAI,oTAuBvB,cAAc,4CAwIhB,CAAC"}
|
|
@@ -8,7 +8,7 @@ import { Center } from "../../../Layout/Center/Center";
|
|
|
8
8
|
import { modalVariants } from "../variants";
|
|
9
9
|
import { Group } from "../../../Layout/Group/Group";
|
|
10
10
|
import { Button } from "../../../Inputs/Buttons/Button/Button";
|
|
11
|
-
export const FormModal = ({ opened, onClose, icon, children, size = "400px", modalVariant = "info", confirmButtonDisabled = false, confirmButtonLoading = false, onCancel, onConfirm, cancelLabel, confirmLabel, }) => {
|
|
11
|
+
export const FormModal = ({ opened, onClose, icon, children, size = "400px", modalVariant = "info", confirmButtonDisabled = false, confirmButtonLoading = false, onCancel, onConfirm, cancelLabel, confirmLabel, confirmRightIcon, cancelLeftIcon, confirmVariant, onDelete, deleteLabel = "Delete", deleteButtonDisabled = false, deleteButtonLoading = false, deleteLeftIcon, modalStyles, fullScreen = false, }) => {
|
|
12
12
|
const selectedVariant = modalVariants[modalVariant];
|
|
13
13
|
const iconContainer = {
|
|
14
14
|
width: "42px",
|
|
@@ -19,7 +19,7 @@ export const FormModal = ({ opened, onClose, icon, children, size = "400px", mod
|
|
|
19
19
|
};
|
|
20
20
|
const coloredIcon = icon && React.cloneElement(icon, { color: icon.props.color || selectedVariant.iconColor });
|
|
21
21
|
const modalIcon = coloredIcon || (_jsx("i", { className: selectedVariant.icon, style: { color: selectedVariant.iconColor, fontSize: "20px" } }));
|
|
22
|
-
return (_jsx(MantineModal, { opened: opened, onClose: onClose, centered: true, radius: "16px", overlayProps: {
|
|
22
|
+
return (_jsx(MantineModal, { opened: opened, onClose: onClose, centered: true, fullScreen: fullScreen, radius: "16px", overlayProps: {
|
|
23
23
|
opacity: 0,
|
|
24
24
|
blur: 4,
|
|
25
25
|
}, size: size, transitionProps: {
|
|
@@ -33,13 +33,15 @@ export const FormModal = ({ opened, onClose, icon, children, size = "400px", mod
|
|
|
33
33
|
height: "18px",
|
|
34
34
|
},
|
|
35
35
|
}, styles: {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
...modalStyles,
|
|
37
|
+
body: {
|
|
38
|
+
padding: `0 ${spacing.xxl} ${spacing.lg} ${spacing.xxl}`,
|
|
39
|
+
display: "flex",
|
|
40
|
+
flexDirection: "column",
|
|
41
|
+
flex: 1,
|
|
42
|
+
minHeight: 0,
|
|
43
|
+
overflow: "hidden",
|
|
44
|
+
...modalStyles === null || modalStyles === void 0 ? void 0 : modalStyles.body,
|
|
43
45
|
},
|
|
44
46
|
close: {
|
|
45
47
|
borderRadius: "16px",
|
|
@@ -52,9 +54,25 @@ export const FormModal = ({ opened, onClose, icon, children, size = "400px", mod
|
|
|
52
54
|
"&:active": {
|
|
53
55
|
transform: "none",
|
|
54
56
|
},
|
|
57
|
+
...modalStyles === null || modalStyles === void 0 ? void 0 : modalStyles.close,
|
|
55
58
|
},
|
|
56
|
-
|
|
57
|
-
|
|
59
|
+
content: {
|
|
60
|
+
borderRadius: "8px",
|
|
61
|
+
border: `1px solid ${neutral[50]}`,
|
|
62
|
+
boxShadow: "0px 0px 19px 0px #00000040",
|
|
63
|
+
display: "flex",
|
|
64
|
+
flexDirection: "column",
|
|
65
|
+
...modalStyles === null || modalStyles === void 0 ? void 0 : modalStyles.content,
|
|
66
|
+
},
|
|
67
|
+
header: {
|
|
68
|
+
padding: spacing.sm,
|
|
69
|
+
...modalStyles === null || modalStyles === void 0 ? void 0 : modalStyles.header,
|
|
58
70
|
},
|
|
59
|
-
}, children:
|
|
71
|
+
}, children: _jsxs(Stack, { gap: "20px", w: "100%", align: "stretch", style: { minWidth: 0, flex: 1, minHeight: 0 }, children: [_jsx(Center, { mx: "auto", style: { ...iconContainer, flexShrink: 0 }, children: modalIcon }), children && (_jsx(Stack, { gap: spacing.xxs, align: "stretch", w: "100%", style: {
|
|
72
|
+
minWidth: 0,
|
|
73
|
+
maxWidth: "100%",
|
|
74
|
+
flex: 1,
|
|
75
|
+
minHeight: 0,
|
|
76
|
+
overflow: "hidden",
|
|
77
|
+
}, children: children })), _jsx(Center, { w: "100%", style: { flexShrink: 0 }, children: _jsxs(Group, { gap: "10px", align: "center", children: [_jsx(Button, { onClick: onCancel, variant: "secondary", leftIcon: cancelLeftIcon, children: cancelLabel || selectedVariant.cancelLabel }), onDelete && (_jsx(Button, { onClick: onDelete, variant: "cancel", disabled: deleteButtonDisabled, loading: deleteButtonLoading, leftIcon: deleteLeftIcon, children: deleteLabel })), _jsx(Button, { onClick: onConfirm, variant: confirmVariant || selectedVariant.buttonVariant, disabled: confirmButtonDisabled, loading: confirmButtonLoading, rightIcon: confirmRightIcon, children: confirmLabel || selectedVariant.confirmLabel })] }) })] }) }));
|
|
60
78
|
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { CSSObject } from "@mantine/core";
|
|
3
|
+
import { modalVariants } from "../variants";
|
|
4
|
+
import { ButtonProps } from "../../../Inputs/Buttons/Button/Button";
|
|
5
|
+
/** Style overrides merged into Mantine `Modal` `styles` (object form only). */
|
|
6
|
+
export type FormModalV2StylesOverride = Partial<Record<"body" | "close" | "content" | "header" | "inner" | "overlay" | "root" | "title", CSSObject>>;
|
|
7
|
+
export interface FormModalV2Props {
|
|
8
|
+
opened: boolean;
|
|
9
|
+
onClose: () => void;
|
|
10
|
+
icon?: React.ReactElement;
|
|
11
|
+
/** Pinned title rendered in the header zone — stays visible while body scrolls. */
|
|
12
|
+
title?: string;
|
|
13
|
+
/** Pinned subtitle rendered below the title in the header zone. */
|
|
14
|
+
subtitle?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Form content. Rendered inside a scrollable body zone — the body grows
|
|
17
|
+
* up to the available modal height, then scrolls. Consumers do NOT need to
|
|
18
|
+
* wrap children in a ScrollArea; the body owns scroll behavior.
|
|
19
|
+
*/
|
|
20
|
+
children?: React.ReactNode;
|
|
21
|
+
size?: string | number;
|
|
22
|
+
modalVariant?: keyof typeof modalVariants;
|
|
23
|
+
confirmButtonDisabled?: boolean;
|
|
24
|
+
confirmButtonLoading?: boolean;
|
|
25
|
+
onCancel?: () => void;
|
|
26
|
+
onConfirm?: () => void;
|
|
27
|
+
cancelLabel?: string;
|
|
28
|
+
confirmLabel?: string;
|
|
29
|
+
confirmRightIcon?: React.ReactNode;
|
|
30
|
+
cancelLeftIcon?: React.ReactNode;
|
|
31
|
+
confirmVariant?: ButtonProps['variant'];
|
|
32
|
+
/** Optional destructive footer action (e.g. Delete on edit modals). Rendered before Cancel. */
|
|
33
|
+
onDelete?: () => void;
|
|
34
|
+
deleteLabel?: string;
|
|
35
|
+
deleteButtonDisabled?: boolean;
|
|
36
|
+
deleteButtonLoading?: boolean;
|
|
37
|
+
deleteLeftIcon?: React.ReactNode;
|
|
38
|
+
fullScreen?: boolean;
|
|
39
|
+
/** Merged into Mantine `Modal` `styles`. Consumer overrides win. */
|
|
40
|
+
modalStyles?: FormModalV2StylesOverride;
|
|
41
|
+
/**
|
|
42
|
+
* Override for the pinned footer zone. When provided, replaces the
|
|
43
|
+
* default Cancel/Delete/Confirm button cluster entirely — useful for
|
|
44
|
+
* content pickers, multi-step wizards, or any flow whose footer doesn't
|
|
45
|
+
* map cleanly onto the three-button preset. The override is rendered in
|
|
46
|
+
* the same `flexShrink: 0` slot so layout invariants (scrollable body,
|
|
47
|
+
* pinned footer) hold either way.
|
|
48
|
+
*/
|
|
49
|
+
footer?: React.ReactNode;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Three-zone modal: pinned header (icon + title + subtitle), scrollable body,
|
|
53
|
+
* pinned footer (buttons). The body is the only scroll surface — consumers
|
|
54
|
+
* pass form fields as children without any wrapper.
|
|
55
|
+
*
|
|
56
|
+
* Scroll height is enforced by flex layout, so content can never render behind
|
|
57
|
+
* the footer regardless of viewport size.
|
|
58
|
+
*/
|
|
59
|
+
export declare const FormModalV2: ({ opened, onClose, icon, title, subtitle, children, size, modalVariant, confirmButtonDisabled, confirmButtonLoading, onCancel, onConfirm, cancelLabel, confirmLabel, confirmRightIcon, cancelLeftIcon, confirmVariant, onDelete, deleteLabel, deleteButtonDisabled, deleteButtonLoading, deleteLeftIcon, modalStyles, fullScreen, footer, }: FormModalV2Props) => import("react/jsx-runtime").JSX.Element;
|
|
60
|
+
//# sourceMappingURL=FormModalV2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormModalV2.d.ts","sourceRoot":"","sources":["../../../../../src/components/Info/Modals/FormModalV2/FormModalV2.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAM/C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAU,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAE5E,+EAA+E;AAC/E,MAAM,MAAM,yBAAyB,GAAG,OAAO,CAC7C,MAAM,CACF,MAAM,GACN,OAAO,GACP,SAAS,GACT,QAAQ,GACR,OAAO,GACP,SAAS,GACT,MAAM,GACN,OAAO,EACT,SAAS,CACV,CACF,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC1B,mFAAmF;IACnF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mEAAmE;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,OAAO,aAAa,CAAC;IAC1C,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACnC,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,cAAc,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IACxC,+FAA+F;IAC/F,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oEAAoE;IACpE,WAAW,CAAC,EAAE,yBAAyB,CAAC;IACxC;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,GAAI,6UA0BzB,gBAAgB,4CAuLlB,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Modal as MantineModal } from "@mantine/core";
|
|
4
|
+
import { neutral } from "../../../../constants/colors";
|
|
5
|
+
import { spacing } from "../../../../constants/spacing";
|
|
6
|
+
import { Stack } from "../../../Layout/Stack/Stack";
|
|
7
|
+
import { Center } from "../../../Layout/Center/Center";
|
|
8
|
+
import { Title } from "../../../Typography/Title/Title";
|
|
9
|
+
import { modalVariants } from "../variants";
|
|
10
|
+
import { Group } from "../../../Layout/Group/Group";
|
|
11
|
+
import { Button } from "../../../Inputs/Buttons/Button/Button";
|
|
12
|
+
/**
|
|
13
|
+
* Three-zone modal: pinned header (icon + title + subtitle), scrollable body,
|
|
14
|
+
* pinned footer (buttons). The body is the only scroll surface — consumers
|
|
15
|
+
* pass form fields as children without any wrapper.
|
|
16
|
+
*
|
|
17
|
+
* Scroll height is enforced by flex layout, so content can never render behind
|
|
18
|
+
* the footer regardless of viewport size.
|
|
19
|
+
*/
|
|
20
|
+
export const FormModalV2 = ({ opened, onClose, icon, title, subtitle, children, size = "400px", modalVariant = "info", confirmButtonDisabled = false, confirmButtonLoading = false, onCancel, onConfirm, cancelLabel, confirmLabel, confirmRightIcon, cancelLeftIcon, confirmVariant, onDelete, deleteLabel = "Delete", deleteButtonDisabled = false, deleteButtonLoading = false, deleteLeftIcon, modalStyles, fullScreen = false, footer, }) => {
|
|
21
|
+
const selectedVariant = modalVariants[modalVariant];
|
|
22
|
+
const iconContainer = {
|
|
23
|
+
width: "42px",
|
|
24
|
+
height: "42px",
|
|
25
|
+
borderRadius: "50%",
|
|
26
|
+
backgroundColor: selectedVariant.iconBackgroundColor,
|
|
27
|
+
border: `2px solid ${selectedVariant.iconColor}`,
|
|
28
|
+
};
|
|
29
|
+
const coloredIcon = icon &&
|
|
30
|
+
React.cloneElement(icon, {
|
|
31
|
+
color: icon.props.color || selectedVariant.iconColor,
|
|
32
|
+
});
|
|
33
|
+
const modalIcon = coloredIcon || (_jsx("i", { className: selectedVariant.icon, style: { color: selectedVariant.iconColor, fontSize: "20px" } }));
|
|
34
|
+
return (_jsx(MantineModal, { opened: opened, onClose: onClose, centered: true, fullScreen: fullScreen, radius: "16px", overlayProps: {
|
|
35
|
+
opacity: 0,
|
|
36
|
+
blur: 4,
|
|
37
|
+
}, size: size, transitionProps: {
|
|
38
|
+
transition: "pop",
|
|
39
|
+
duration: 200,
|
|
40
|
+
}, closeButtonProps: {
|
|
41
|
+
style: {
|
|
42
|
+
borderRadius: "16px",
|
|
43
|
+
backgroundColor: neutral[50],
|
|
44
|
+
width: "18px",
|
|
45
|
+
height: "18px",
|
|
46
|
+
},
|
|
47
|
+
}, styles: {
|
|
48
|
+
...modalStyles,
|
|
49
|
+
body: {
|
|
50
|
+
// Tighter side padding on fullScreen (mobile) — `xxl` (32px)
|
|
51
|
+
// eats ~17% of a 375px viewport and forces the form's 2-col
|
|
52
|
+
// grids to overflow the right edge.
|
|
53
|
+
padding: fullScreen
|
|
54
|
+
? `0 ${spacing.md} ${spacing.lg} ${spacing.md}`
|
|
55
|
+
: `0 ${spacing.xxl} ${spacing.lg} ${spacing.xxl}`,
|
|
56
|
+
display: "flex",
|
|
57
|
+
flexDirection: "column",
|
|
58
|
+
flex: 1,
|
|
59
|
+
minHeight: 0,
|
|
60
|
+
overflow: "hidden",
|
|
61
|
+
...modalStyles === null || modalStyles === void 0 ? void 0 : modalStyles.body,
|
|
62
|
+
},
|
|
63
|
+
close: {
|
|
64
|
+
borderRadius: "16px",
|
|
65
|
+
backgroundColor: neutral[50],
|
|
66
|
+
width: "18px",
|
|
67
|
+
height: "18px",
|
|
68
|
+
"&:hover": {
|
|
69
|
+
backgroundColor: neutral[50],
|
|
70
|
+
},
|
|
71
|
+
"&:active": {
|
|
72
|
+
transform: "none",
|
|
73
|
+
},
|
|
74
|
+
...modalStyles === null || modalStyles === void 0 ? void 0 : modalStyles.close,
|
|
75
|
+
},
|
|
76
|
+
content: {
|
|
77
|
+
borderRadius: "8px",
|
|
78
|
+
border: `1px solid ${neutral[50]}`,
|
|
79
|
+
boxShadow: "0px 0px 19px 0px #00000040",
|
|
80
|
+
display: "flex",
|
|
81
|
+
flexDirection: "column",
|
|
82
|
+
...modalStyles === null || modalStyles === void 0 ? void 0 : modalStyles.content,
|
|
83
|
+
},
|
|
84
|
+
header: {
|
|
85
|
+
padding: spacing.sm,
|
|
86
|
+
...modalStyles === null || modalStyles === void 0 ? void 0 : modalStyles.header,
|
|
87
|
+
},
|
|
88
|
+
}, children: _jsxs(Stack, { gap: "20px", w: "100%", align: "stretch", style: { minWidth: 0, flex: 1, minHeight: 0 }, children: [_jsxs(Stack, { gap: spacing.sm, align: "center", w: "100%", style: { minWidth: 0, flexShrink: 0 }, children: [_jsx(Center, { mx: "auto", style: iconContainer, children: modalIcon }), title && (_jsx(Title, { variant: "cardHeader", align: "center", children: title })), subtitle && (_jsx(Title, { variant: "cardSubheader", align: "center", children: subtitle }))] }), children && (_jsx(Stack, { gap: spacing.lg, align: "stretch", w: "100%", style: {
|
|
89
|
+
minWidth: 0,
|
|
90
|
+
maxWidth: "100%",
|
|
91
|
+
flex: 1,
|
|
92
|
+
minHeight: 0,
|
|
93
|
+
overflowY: "auto",
|
|
94
|
+
overflowX: "hidden",
|
|
95
|
+
}, children: children })), footer !== undefined ? (_jsx("div", { style: { flexShrink: 0, width: '100%' }, children: footer })) : (_jsx(Center, { w: "100%", style: { flexShrink: 0 }, children: _jsxs(Group, { gap: "10px", align: "center", children: [_jsx(Button, { onClick: onCancel, variant: "secondary", leftIcon: cancelLeftIcon, children: cancelLabel || selectedVariant.cancelLabel }), onDelete && (_jsx(Button, { onClick: onDelete, variant: "cancel", disabled: deleteButtonDisabled, loading: deleteButtonLoading, leftIcon: deleteLeftIcon, children: deleteLabel })), _jsx(Button, { onClick: onConfirm, variant: confirmVariant || selectedVariant.buttonVariant, disabled: confirmButtonDisabled, loading: confirmButtonLoading, rightIcon: confirmRightIcon, children: confirmLabel || selectedVariant.confirmLabel })] }) }))] }) }));
|
|
96
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../../src/components/Info/Modals/Modal/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../../src/components/Info/Modals/Modal/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,UAAU,UAAU;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAGD,eAAO,MAAM,KAAK,GAAI,6DAAuE,UAAU,4CA2EtG,CAAC"}
|
|
@@ -2,11 +2,19 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Modal as MantineModal } from '@mantine/core';
|
|
3
3
|
import { neutral } from '../../../../constants/colors';
|
|
4
4
|
import { spacing } from '../../../../constants/spacing';
|
|
5
|
+
import { useMobile } from '../../../../hooks/useMediaQuery';
|
|
5
6
|
import { Title } from '../../../Typography/Title/Title';
|
|
6
7
|
import { Stack } from '../../../Layout/Stack/Stack';
|
|
7
8
|
import { Center } from '../../../Layout/Center/Center';
|
|
8
9
|
// Base modal is intended to be extended and customized - use InfoModal or ConfirmationModal for common use cases
|
|
9
10
|
export const Modal = ({ opened, onClose, icon, title, subtitle, children, width = '400px' }) => {
|
|
11
|
+
// On mobile the modal usually fills the viewport (consumers pass
|
|
12
|
+
// `width='100%'`), so the desktop body's 32px side padding eats real
|
|
13
|
+
// estate that grid pickers and 4-segment SegmentedControls need. Tighten
|
|
14
|
+
// to `spacing.md` (12px) on mobile so children get an extra ~40px of
|
|
15
|
+
// usable width without making desktop look cramped.
|
|
16
|
+
const isMobile = useMobile();
|
|
17
|
+
const bodyPaddingX = isMobile ? spacing.md : spacing.xxl;
|
|
10
18
|
return (_jsx(MantineModal, { opened: opened, onClose: onClose, centered: true, radius: '16px', overlayProps: {
|
|
11
19
|
opacity: 0,
|
|
12
20
|
blur: 4,
|
|
@@ -38,7 +46,7 @@ export const Modal = ({ opened, onClose, icon, title, subtitle, children, width
|
|
|
38
46
|
},
|
|
39
47
|
},
|
|
40
48
|
body: {
|
|
41
|
-
padding: `0 ${
|
|
49
|
+
padding: `0 ${bodyPaddingX} ${spacing.lg} ${bodyPaddingX}`,
|
|
42
50
|
},
|
|
43
51
|
}, children: _jsx(Center, { h: "100%", w: "100%", children: _jsxs(Stack, { gap: "20px", h: "100%", w: "100%", align: "center", children: [_jsxs(Stack, { gap: spacing.lg, align: "center", children: [icon, _jsxs(Stack, { gap: spacing.xxs, align: "center", children: [_jsx(Title, { variant: "cardHeader", align: "center", children: title }), subtitle && (_jsx(Title, { variant: "cardSubheader", align: "center", children: subtitle }))] })] }), _jsx(Center, { h: "100%", w: "100%", children: children })] }) }) }));
|
|
44
52
|
};
|
|
@@ -1,63 +1,83 @@
|
|
|
1
1
|
export declare const modalVariants: {
|
|
2
|
-
readonly
|
|
3
|
-
readonly
|
|
4
|
-
readonly message: "This action cannot be undone.";
|
|
5
|
-
readonly confirmLabel: "OK";
|
|
2
|
+
readonly cancel: {
|
|
3
|
+
readonly buttonVariant: "cancel";
|
|
6
4
|
readonly cancelLabel: "Cancel";
|
|
5
|
+
readonly confirmLabel: "Delete";
|
|
6
|
+
readonly icon: "fas fa-trash-can";
|
|
7
|
+
readonly iconBackgroundColor: "#FFEBEA";
|
|
8
|
+
readonly iconColor: "#C10007";
|
|
9
|
+
readonly message: "Are you sure you want to delete this item? This action cannot be undone.";
|
|
10
|
+
readonly title: "Delete Item";
|
|
11
|
+
};
|
|
12
|
+
readonly confirm: {
|
|
7
13
|
readonly buttonVariant: "primary";
|
|
14
|
+
readonly cancelLabel: "Cancel";
|
|
15
|
+
readonly confirmLabel: "OK";
|
|
8
16
|
readonly icon: "fas fa-circle-question";
|
|
9
|
-
readonly
|
|
10
|
-
readonly
|
|
11
|
-
};
|
|
12
|
-
readonly info: {
|
|
13
|
-
readonly title: "Info";
|
|
17
|
+
readonly iconBackgroundColor: "#F3EEFF";
|
|
18
|
+
readonly iconColor: "#6F3FEE";
|
|
14
19
|
readonly message: "This action cannot be undone.";
|
|
15
|
-
readonly
|
|
20
|
+
readonly title: "Are you sure?";
|
|
21
|
+
};
|
|
22
|
+
readonly delete: {
|
|
23
|
+
readonly buttonVariant: "cancel";
|
|
16
24
|
readonly cancelLabel: "Cancel";
|
|
25
|
+
readonly confirmLabel: "Delete";
|
|
26
|
+
readonly icon: "fas fa-trash-can";
|
|
27
|
+
readonly iconBackgroundColor: "#FFEBEA";
|
|
28
|
+
readonly iconColor: "#FF3B30";
|
|
29
|
+
readonly message: "Are you sure you want to delete this item? This action cannot be undone.";
|
|
30
|
+
readonly title: "Delete Item";
|
|
31
|
+
};
|
|
32
|
+
readonly error: {
|
|
33
|
+
readonly buttonVariant: "cancel";
|
|
34
|
+
readonly cancelLabel: "Cancel";
|
|
35
|
+
readonly confirmLabel: "OK";
|
|
36
|
+
readonly icon: "fas fa-circle-exclamation";
|
|
37
|
+
readonly iconBackgroundColor: "#FFEBEA";
|
|
38
|
+
readonly iconColor: "#FF3B30";
|
|
39
|
+
readonly message: "An error occurred and your changes were not saved. Please try again.";
|
|
40
|
+
readonly title: "Oops!";
|
|
41
|
+
};
|
|
42
|
+
readonly info: {
|
|
17
43
|
readonly buttonVariant: "primary";
|
|
44
|
+
readonly cancelLabel: "Cancel";
|
|
45
|
+
readonly confirmLabel: "OK";
|
|
18
46
|
readonly icon: "fas fa-circle-info";
|
|
19
|
-
readonly
|
|
20
|
-
readonly
|
|
47
|
+
readonly iconBackgroundColor: "#F3EEFF";
|
|
48
|
+
readonly iconColor: "#6F3FEE";
|
|
49
|
+
readonly message: "This action cannot be undone.";
|
|
50
|
+
readonly title: "Info";
|
|
21
51
|
};
|
|
22
52
|
readonly success: {
|
|
23
|
-
readonly title: "Success";
|
|
24
|
-
readonly message: "Operation completed successfully!";
|
|
25
|
-
readonly confirmLabel: "OK";
|
|
26
|
-
readonly cancelLabel: "Cancel";
|
|
27
53
|
readonly buttonVariant: "success";
|
|
54
|
+
readonly cancelLabel: "Cancel";
|
|
55
|
+
readonly confirmLabel: "OK";
|
|
28
56
|
readonly icon: "fas fa-circle-check";
|
|
29
|
-
readonly
|
|
30
|
-
readonly
|
|
57
|
+
readonly iconBackgroundColor: "#E6FFF3";
|
|
58
|
+
readonly iconColor: "#00DE6F";
|
|
59
|
+
readonly message: "Operation completed successfully!";
|
|
60
|
+
readonly title: "Success";
|
|
31
61
|
};
|
|
32
|
-
readonly
|
|
33
|
-
readonly title: "Oops!";
|
|
34
|
-
readonly message: "An error occurred and your changes were not saved. Please try again.";
|
|
35
|
-
readonly confirmLabel: "OK";
|
|
36
|
-
readonly cancelLabel: "Cancel";
|
|
62
|
+
readonly remove: {
|
|
37
63
|
readonly buttonVariant: "cancel";
|
|
38
|
-
readonly
|
|
39
|
-
readonly
|
|
40
|
-
readonly
|
|
64
|
+
readonly cancelLabel: "Cancel";
|
|
65
|
+
readonly confirmLabel: "Remove";
|
|
66
|
+
readonly icon: "fas fa-circle-minus";
|
|
67
|
+
readonly iconBackgroundColor: "#FFEBEA";
|
|
68
|
+
readonly iconColor: "#FF3B30";
|
|
69
|
+
readonly message: "This item will be removed.";
|
|
70
|
+
readonly title: "Remove item?";
|
|
41
71
|
};
|
|
42
72
|
readonly warning: {
|
|
43
|
-
readonly title: "Warning";
|
|
44
|
-
readonly message: "This action cannot be undone. Are you sure?";
|
|
45
|
-
readonly confirmLabel: "Yes, proceed";
|
|
46
|
-
readonly cancelLabel: "Cancel";
|
|
47
73
|
readonly buttonVariant: "warning";
|
|
74
|
+
readonly cancelLabel: "Cancel";
|
|
75
|
+
readonly confirmLabel: "Yes, proceed";
|
|
48
76
|
readonly icon: "fas fa-triangle-exclamation";
|
|
77
|
+
readonly iconBackgroundColor: "#FFF4E6";
|
|
49
78
|
readonly iconColor: "#FE9A00";
|
|
50
|
-
readonly
|
|
51
|
-
|
|
52
|
-
readonly cancel: {
|
|
53
|
-
readonly title: "Delete Item";
|
|
54
|
-
readonly message: "Are you sure you want to delete this item? This action cannot be undone.";
|
|
55
|
-
readonly confirmLabel: "Delete";
|
|
56
|
-
readonly cancelLabel: "Cancel";
|
|
57
|
-
readonly buttonVariant: "cancel";
|
|
58
|
-
readonly icon: "fas fa-trash-can";
|
|
59
|
-
readonly iconColor: "#FB2C36";
|
|
60
|
-
readonly iconBackgroundColor: "#FFD7D9";
|
|
79
|
+
readonly message: "This action cannot be undone. Are you sure?";
|
|
80
|
+
readonly title: "Warning";
|
|
61
81
|
};
|
|
62
82
|
};
|
|
63
83
|
//# sourceMappingURL=variants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../../../src/components/Info/Modals/variants.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../../../src/components/Info/Modals/variants.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoFhB,CAAC"}
|
|
@@ -1,63 +1,83 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { error, primary, success, warning } from '../../../constants/colors';
|
|
2
2
|
export const modalVariants = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
message: 'This action cannot be undone.',
|
|
6
|
-
confirmLabel: 'OK',
|
|
3
|
+
cancel: {
|
|
4
|
+
buttonVariant: 'cancel',
|
|
7
5
|
cancelLabel: 'Cancel',
|
|
6
|
+
confirmLabel: 'Delete',
|
|
7
|
+
icon: 'fas fa-trash-can',
|
|
8
|
+
iconBackgroundColor: error[25],
|
|
9
|
+
iconColor: error[200],
|
|
10
|
+
message: 'Are you sure you want to delete this item? This action cannot be undone.',
|
|
11
|
+
title: 'Delete Item',
|
|
12
|
+
},
|
|
13
|
+
confirm: {
|
|
8
14
|
buttonVariant: 'primary',
|
|
15
|
+
cancelLabel: 'Cancel',
|
|
16
|
+
confirmLabel: 'OK',
|
|
9
17
|
icon: 'fas fa-circle-question',
|
|
18
|
+
iconBackgroundColor: primary[25],
|
|
10
19
|
iconColor: primary[200],
|
|
11
|
-
iconBackgroundColor: primary[50],
|
|
12
|
-
},
|
|
13
|
-
info: {
|
|
14
|
-
title: 'Info',
|
|
15
20
|
message: 'This action cannot be undone.',
|
|
16
|
-
|
|
21
|
+
title: 'Are you sure?',
|
|
22
|
+
},
|
|
23
|
+
delete: {
|
|
24
|
+
buttonVariant: 'cancel',
|
|
25
|
+
cancelLabel: 'Cancel',
|
|
26
|
+
confirmLabel: 'Delete',
|
|
27
|
+
icon: 'fas fa-trash-can',
|
|
28
|
+
iconBackgroundColor: error[25],
|
|
29
|
+
iconColor: error[100],
|
|
30
|
+
message: 'Are you sure you want to delete this item? This action cannot be undone.',
|
|
31
|
+
title: 'Delete Item',
|
|
32
|
+
},
|
|
33
|
+
error: {
|
|
34
|
+
buttonVariant: 'cancel',
|
|
17
35
|
cancelLabel: 'Cancel',
|
|
36
|
+
confirmLabel: 'OK',
|
|
37
|
+
icon: 'fas fa-circle-exclamation',
|
|
38
|
+
iconBackgroundColor: error[25],
|
|
39
|
+
iconColor: error[100],
|
|
40
|
+
message: 'An error occurred and your changes were not saved. Please try again.',
|
|
41
|
+
title: 'Oops!',
|
|
42
|
+
},
|
|
43
|
+
info: {
|
|
18
44
|
buttonVariant: 'primary',
|
|
45
|
+
cancelLabel: 'Cancel',
|
|
46
|
+
confirmLabel: 'OK',
|
|
19
47
|
icon: 'fas fa-circle-info',
|
|
48
|
+
iconBackgroundColor: primary[25],
|
|
20
49
|
iconColor: primary[200],
|
|
21
|
-
|
|
50
|
+
message: 'This action cannot be undone.',
|
|
51
|
+
title: 'Info',
|
|
22
52
|
},
|
|
23
53
|
success: {
|
|
24
|
-
title: 'Success',
|
|
25
|
-
message: 'Operation completed successfully!',
|
|
26
|
-
confirmLabel: 'OK',
|
|
27
|
-
cancelLabel: 'Cancel',
|
|
28
54
|
buttonVariant: 'success',
|
|
55
|
+
cancelLabel: 'Cancel',
|
|
56
|
+
confirmLabel: 'OK',
|
|
29
57
|
icon: 'fas fa-circle-check',
|
|
58
|
+
iconBackgroundColor: success[25],
|
|
30
59
|
iconColor: success[200],
|
|
31
|
-
|
|
60
|
+
message: 'Operation completed successfully!',
|
|
61
|
+
title: 'Success',
|
|
32
62
|
},
|
|
33
|
-
|
|
34
|
-
title: 'Oops!',
|
|
35
|
-
message: 'An error occurred and your changes were not saved. Please try again.',
|
|
36
|
-
confirmLabel: 'OK',
|
|
37
|
-
cancelLabel: 'Cancel',
|
|
63
|
+
remove: {
|
|
38
64
|
buttonVariant: 'cancel',
|
|
39
|
-
|
|
65
|
+
cancelLabel: 'Cancel',
|
|
66
|
+
confirmLabel: 'Remove',
|
|
67
|
+
icon: 'fas fa-circle-minus',
|
|
68
|
+
iconBackgroundColor: error[25],
|
|
40
69
|
iconColor: error[100],
|
|
41
|
-
|
|
70
|
+
message: 'This item will be removed.',
|
|
71
|
+
title: 'Remove item?',
|
|
42
72
|
},
|
|
43
73
|
warning: {
|
|
44
|
-
title: 'Warning',
|
|
45
|
-
message: 'This action cannot be undone. Are you sure?',
|
|
46
|
-
confirmLabel: 'Yes, proceed',
|
|
47
|
-
cancelLabel: 'Cancel',
|
|
48
74
|
buttonVariant: 'warning',
|
|
75
|
+
cancelLabel: 'Cancel',
|
|
76
|
+
confirmLabel: 'Yes, proceed',
|
|
49
77
|
icon: 'fas fa-triangle-exclamation',
|
|
78
|
+
iconBackgroundColor: warning[25],
|
|
50
79
|
iconColor: warning[100],
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
cancel: {
|
|
54
|
-
title: 'Delete Item',
|
|
55
|
-
message: 'Are you sure you want to delete this item? This action cannot be undone.',
|
|
56
|
-
confirmLabel: 'Delete',
|
|
57
|
-
cancelLabel: 'Cancel',
|
|
58
|
-
buttonVariant: 'cancel',
|
|
59
|
-
icon: 'fas fa-trash-can',
|
|
60
|
-
iconColor: error[100],
|
|
61
|
-
iconBackgroundColor: error[50],
|
|
80
|
+
message: 'This action cannot be undone. Are you sure?',
|
|
81
|
+
title: 'Warning',
|
|
62
82
|
},
|
|
63
83
|
};
|
|
@@ -7,4 +7,5 @@ export declare const Default: Story;
|
|
|
7
7
|
export declare const Variants: Story;
|
|
8
8
|
export declare const GenericError: Story;
|
|
9
9
|
export declare const AsyncNotifications: Story;
|
|
10
|
+
export declare const ProgressNotifications: Story;
|
|
10
11
|
//# sourceMappingURL=Notifications.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Notifications.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Info/Notifications/Notifications.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AAMnF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,oBAAoB,CAuC3C,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAqBnC,eAAO,MAAM,OAAO,EAAE,KAQrB,CAAC;AAgBF,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC;AAQF,eAAO,MAAM,YAAY,EAAE,KAE1B,CAAC;AAyCF,eAAO,MAAM,kBAAkB,EAAE,KAEhC,CAAC"}
|
|
1
|
+
{"version":3,"file":"Notifications.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Info/Notifications/Notifications.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AAMnF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,oBAAoB,CAuC3C,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAqBnC,eAAO,MAAM,OAAO,EAAE,KAQrB,CAAC;AAgBF,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC;AAQF,eAAO,MAAM,YAAY,EAAE,KAE1B,CAAC;AAyCF,eAAO,MAAM,kBAAkB,EAAE,KAEhC,CAAC;AAiDF,eAAO,MAAM,qBAAqB,EAAE,KAEnC,CAAC"}
|