@taiv/ui 1.15.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/assets.d.ts +12 -1
- package/dist/assets/assets.d.ts.map +1 -1
- package/dist/assets/assets.js +22 -16
- package/dist/assets/brand/taiv-favicon-dark.png +0 -0
- package/dist/assets/brand/taiv-favicon-light.png +0 -0
- package/dist/assets/brand/taiv-icon-black.svg +10 -0
- package/dist/assets/brand/taiv-icon-dark.svg +17 -0
- package/dist/assets/brand/taiv-icon-white.svg +17 -0
- package/dist/assets/brand/taiv-logo-black.svg +16 -0
- package/dist/assets/brand/taiv-logo-dark.svg +23 -0
- package/dist/assets/brand/taiv-logo-old.svg +1 -0
- package/dist/assets/brand/taiv-logo-purple.svg +16 -0
- package/dist/assets/brand/taiv-logo-white.svg +23 -0
- package/dist/assets/icons.d.ts +1 -1
- package/dist/assets/icons.d.ts.map +1 -1
- package/dist/assets/icons.js +57 -53
- package/dist/assets/index.d.ts +3 -0
- package/dist/assets/index.d.ts.map +1 -0
- package/dist/assets/index.js +2 -0
- package/dist/components/Data/BigCalendar/BigCalendar.d.ts +26 -0
- package/dist/components/Data/BigCalendar/BigCalendar.d.ts.map +1 -0
- package/dist/components/Data/BigCalendar/BigCalendar.js +92 -0
- package/dist/components/Data/BigCalendar/BigCalendar.stories.d.ts +8 -0
- package/dist/components/Data/BigCalendar/BigCalendar.stories.d.ts.map +1 -0
- package/dist/components/Data/BigCalendar/BigCalendar.stories.js +77 -0
- package/dist/components/Data/Calendar/Calendar.d.ts +102 -0
- package/dist/components/Data/Calendar/Calendar.d.ts.map +1 -0
- package/dist/components/Data/Calendar/Calendar.js +671 -0
- package/dist/components/Data/Calendar/Calendar.stories.d.ts +10 -0
- package/dist/components/Data/Calendar/Calendar.stories.d.ts.map +1 -0
- package/dist/components/Data/Calendar/Calendar.stories.js +87 -0
- package/dist/components/Data/Cards/StatsCard/StatsCard.d.ts +1 -1
- package/dist/components/Data/Cards/StatsCard/StatsCard.d.ts.map +1 -1
- package/dist/components/Data/CheckboxTable/CheckboxTable.d.ts +1 -1
- package/dist/components/Data/CheckboxTable/CheckboxTable.d.ts.map +1 -1
- package/dist/components/Data/MediaPill/MediaPill.d.ts +27 -0
- package/dist/components/Data/MediaPill/MediaPill.d.ts.map +1 -0
- package/dist/components/Data/MediaPill/MediaPill.js +53 -0
- package/dist/components/Data/MediaPill/MediaPill.stories.d.ts +10 -0
- package/dist/components/Data/MediaPill/MediaPill.stories.d.ts.map +1 -0
- package/dist/components/Data/MediaPill/MediaPill.stories.js +51 -0
- package/dist/components/Data/Progress/Progress.d.ts +1 -1
- package/dist/components/Data/Progress/Progress.d.ts.map +1 -1
- package/dist/components/Data/RemovableItemList/RemovableItemList.d.ts +1 -1
- package/dist/components/Data/RemovableItemList/RemovableItemList.d.ts.map +1 -1
- package/dist/components/Data/StatsBadge/StatsBadge.d.ts +2 -1
- package/dist/components/Data/StatsBadge/StatsBadge.d.ts.map +1 -1
- package/dist/components/Info/Avatar/Avatar.d.ts +9 -0
- package/dist/components/Info/Avatar/Avatar.d.ts.map +1 -0
- package/dist/components/Info/Avatar/Avatar.js +36 -0
- package/dist/components/Info/Avatar/Avatar.stories.d.ts +9 -0
- package/dist/components/Info/Avatar/Avatar.stories.d.ts.map +1 -0
- package/dist/components/Info/Avatar/Avatar.stories.js +78 -0
- package/dist/components/Info/Badge/Badge.d.ts +1 -1
- package/dist/components/Info/Badge/Badge.d.ts.map +1 -1
- package/dist/components/Info/Badge/Badge.stories.d.ts.map +1 -1
- package/dist/components/Info/Badge/Badge.stories.js +21 -6
- package/dist/components/Info/Badge/sizes.d.ts +10 -10
- package/dist/components/Info/Badge/sizes.js +16 -16
- package/dist/components/Info/Badge/variants.d.ts +4 -4
- package/dist/components/Info/Badge/variants.d.ts.map +1 -1
- package/dist/components/Info/Badge/variants.js +26 -13
- package/dist/components/Info/Drawer/Drawer.d.ts +24 -0
- package/dist/components/Info/Drawer/Drawer.d.ts.map +1 -0
- package/dist/components/Info/Drawer/Drawer.js +44 -0
- package/dist/components/Info/Drawer/Drawer.stories.d.ts +10 -0
- package/dist/components/Info/Drawer/Drawer.stories.d.ts.map +1 -0
- package/dist/components/Info/Drawer/Drawer.stories.js +47 -0
- package/dist/components/Info/HoverCard/HoverCard.d.ts +16 -0
- package/dist/components/Info/HoverCard/HoverCard.d.ts.map +1 -0
- package/dist/components/Info/HoverCard/HoverCard.js +26 -0
- package/dist/components/Info/HoverCard/HoverCard.stories.d.ts +11 -0
- package/dist/components/Info/HoverCard/HoverCard.stories.d.ts.map +1 -0
- package/dist/components/Info/HoverCard/HoverCard.stories.js +86 -0
- package/dist/components/Info/HoverCard/HoverCardMenuItem.d.ts +12 -0
- package/dist/components/Info/HoverCard/HoverCardMenuItem.d.ts.map +1 -0
- package/dist/components/Info/HoverCard/HoverCardMenuItem.js +22 -0
- package/dist/components/Info/Indicator/Indicator.d.ts +3 -0
- package/dist/components/Info/Indicator/Indicator.d.ts.map +1 -0
- package/dist/components/Info/Indicator/Indicator.js +1 -0
- package/dist/components/Info/Indicator/Indicator.stories.d.ts +11 -0
- package/dist/components/Info/Indicator/Indicator.stories.d.ts.map +1 -0
- package/dist/components/Info/Indicator/Indicator.stories.js +123 -0
- package/dist/components/Info/InfoCard/InfoCard.d.ts +3 -3
- package/dist/components/Info/InfoCard/InfoCard.d.ts.map +1 -1
- package/dist/components/Info/InfoCard/InfoCard.js +5 -5
- package/dist/components/Info/MobileDrawer/MobileDrawer.d.ts +30 -0
- package/dist/components/Info/MobileDrawer/MobileDrawer.d.ts.map +1 -0
- package/dist/components/Info/MobileDrawer/MobileDrawer.js +52 -0
- package/dist/components/Info/MobileDrawer/MobileDrawer.stories.d.ts +9 -0
- package/dist/components/Info/MobileDrawer/MobileDrawer.stories.d.ts.map +1 -0
- package/dist/components/Info/MobileDrawer/MobileDrawer.stories.js +38 -0
- package/dist/components/Info/Modals/FormModal/FormModal.d.ts +17 -1
- package/dist/components/Info/Modals/FormModal/FormModal.d.ts.map +1 -1
- package/dist/components/Info/Modals/FormModal/FormModal.js +30 -12
- package/dist/components/Info/Modals/FormModalV2/FormModalV2.d.ts +60 -0
- package/dist/components/Info/Modals/FormModalV2/FormModalV2.d.ts.map +1 -0
- package/dist/components/Info/Modals/FormModalV2/FormModalV2.js +96 -0
- package/dist/components/Info/Modals/Modal/Modal.d.ts +1 -1
- package/dist/components/Info/Modals/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Info/Modals/Modal/Modal.js +9 -1
- package/dist/components/Info/Modals/ModalProvider/ModalProvider.d.ts +1 -1
- package/dist/components/Info/Modals/ModalProvider/ModalProvider.d.ts.map +1 -1
- package/dist/components/Info/Modals/StepperModal/StepperModal.d.ts +1 -1
- package/dist/components/Info/Modals/StepperModal/StepperModal.d.ts.map +1 -1
- package/dist/components/Info/Modals/variants.d.ts +61 -41
- package/dist/components/Info/Modals/variants.d.ts.map +1 -1
- package/dist/components/Info/Modals/variants.js +58 -38
- package/dist/components/Info/Notifications/NotificationProvider/NotificationProvider.d.ts +2 -1
- package/dist/components/Info/Notifications/NotificationProvider/NotificationProvider.d.ts.map +1 -1
- package/dist/components/Info/Notifications/Notifications.stories.d.ts +1 -0
- package/dist/components/Info/Notifications/Notifications.stories.d.ts.map +1 -1
- package/dist/components/Info/Notifications/Notifications.stories.js +31 -0
- package/dist/components/Info/Notifications/variants.d.ts +30 -23
- package/dist/components/Info/Notifications/variants.d.ts.map +1 -1
- package/dist/components/Info/Notifications/variants.js +30 -24
- package/dist/components/Info/ResponsiveDrawer/ResponsiveDrawer.d.ts +37 -0
- package/dist/components/Info/ResponsiveDrawer/ResponsiveDrawer.d.ts.map +1 -0
- package/dist/components/Info/ResponsiveDrawer/ResponsiveDrawer.js +17 -0
- package/dist/components/Info/ResponsiveDrawer/ResponsiveDrawer.stories.d.ts +7 -0
- package/dist/components/Info/ResponsiveDrawer/ResponsiveDrawer.stories.d.ts.map +1 -0
- package/dist/components/Info/ResponsiveDrawer/ResponsiveDrawer.stories.js +26 -0
- package/dist/components/Info/Tooltips/FormulaTooltip/FormulaTooltip.d.ts +2 -1
- package/dist/components/Info/Tooltips/FormulaTooltip/FormulaTooltip.d.ts.map +1 -1
- package/dist/components/Info/Tooltips/InfoTooltip/InfoTooltip.d.ts +2 -2
- package/dist/components/Info/Tooltips/InfoTooltip/InfoTooltip.d.ts.map +1 -1
- package/dist/components/Info/Tooltips/InfoTooltip/InfoTooltip.js +9 -3
- package/dist/components/Info/Tooltips/Popover/Popover.d.ts +16 -0
- package/dist/components/Info/Tooltips/Popover/Popover.d.ts.map +1 -0
- package/dist/components/Info/Tooltips/Popover/Popover.js +32 -0
- package/dist/components/Info/Tooltips/Tooltip/Tooltip.d.ts +5 -1
- package/dist/components/Info/Tooltips/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/Info/Tooltips/Tooltip/Tooltip.js +10 -8
- package/dist/components/Inputs/Buttons/Button/Button.d.ts +3 -1
- package/dist/components/Inputs/Buttons/Button/Button.d.ts.map +1 -1
- package/dist/components/Inputs/Buttons/Button/Button.js +38 -5
- package/dist/components/Inputs/Buttons/Button/Button.stories.d.ts +1 -0
- package/dist/components/Inputs/Buttons/Button/Button.stories.d.ts.map +1 -1
- package/dist/components/Inputs/Buttons/Button/Button.stories.js +105 -79
- package/dist/components/Inputs/Buttons/IconButton/IconButton.d.ts +7 -2
- package/dist/components/Inputs/Buttons/IconButton/IconButton.d.ts.map +1 -1
- package/dist/components/Inputs/Buttons/IconButton/IconButton.js +35 -11
- package/dist/components/Inputs/Buttons/IconButton/IconButton.stories.d.ts +1 -0
- package/dist/components/Inputs/Buttons/IconButton/IconButton.stories.d.ts.map +1 -1
- package/dist/components/Inputs/Buttons/IconButton/IconButton.stories.js +100 -74
- package/dist/components/Inputs/Buttons/IconButton/sizes.d.ts +15 -0
- package/dist/components/Inputs/Buttons/IconButton/sizes.d.ts.map +1 -1
- package/dist/components/Inputs/Buttons/IconButton/sizes.js +3 -0
- package/dist/components/Inputs/Buttons/SSOButton/SSOButton.d.ts +2 -2
- package/dist/components/Inputs/Buttons/SSOButton/SSOButton.d.ts.map +1 -1
- package/dist/components/Inputs/Buttons/UnstyledButton/UnstyledButton.d.ts +1 -1
- package/dist/components/Inputs/Buttons/UnstyledButton/UnstyledButton.d.ts.map +1 -1
- package/dist/components/Inputs/Buttons/shared/variants.d.ts +399 -164
- package/dist/components/Inputs/Buttons/shared/variants.d.ts.map +1 -1
- package/dist/components/Inputs/Buttons/shared/variants.js +353 -143
- package/dist/components/Inputs/ColorPickerTrigger/ColorPickerTrigger.d.ts +41 -0
- package/dist/components/Inputs/ColorPickerTrigger/ColorPickerTrigger.d.ts.map +1 -0
- package/dist/components/Inputs/ColorPickerTrigger/ColorPickerTrigger.js +139 -0
- package/dist/components/Inputs/ColorPickerTrigger/ColorPickerTrigger.stories.d.ts +13 -0
- package/dist/components/Inputs/ColorPickerTrigger/ColorPickerTrigger.stories.d.ts.map +1 -0
- package/dist/components/Inputs/ColorPickerTrigger/ColorPickerTrigger.stories.js +75 -0
- package/dist/components/Inputs/ColorSwatch/ColorSwatch.d.ts +27 -0
- package/dist/components/Inputs/ColorSwatch/ColorSwatch.d.ts.map +1 -0
- package/dist/components/Inputs/ColorSwatch/ColorSwatch.js +46 -0
- package/dist/components/Inputs/Controls/Checkbox/Checkbox.d.ts +2 -1
- package/dist/components/Inputs/Controls/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/Inputs/Controls/DaysOfWeek/DaysOfWeek.d.ts +32 -0
- package/dist/components/Inputs/Controls/DaysOfWeek/DaysOfWeek.d.ts.map +1 -0
- package/dist/components/Inputs/Controls/DaysOfWeek/DaysOfWeek.js +92 -0
- package/dist/components/Inputs/Controls/Radio/Radio.d.ts +2 -1
- package/dist/components/Inputs/Controls/Radio/Radio.d.ts.map +1 -1
- package/dist/components/Inputs/Controls/RadioList/RadioList.d.ts +1 -1
- package/dist/components/Inputs/Controls/RadioList/RadioList.d.ts.map +1 -1
- package/dist/components/Inputs/Controls/SegmentedControl/SegmentedControl.d.ts +13 -9
- package/dist/components/Inputs/Controls/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/components/Inputs/Controls/SegmentedControl/SegmentedControl.js +20 -12
- package/dist/components/Inputs/Controls/Toggle/Toggle.d.ts +25 -11
- package/dist/components/Inputs/Controls/Toggle/Toggle.d.ts.map +1 -1
- package/dist/components/Inputs/Controls/Toggle/Toggle.js +67 -20
- package/dist/components/Inputs/Controls/Toggle/Toggle.stories.d.ts +1 -0
- package/dist/components/Inputs/Controls/Toggle/Toggle.stories.d.ts.map +1 -1
- package/dist/components/Inputs/Controls/Toggle/Toggle.stories.js +86 -69
- package/dist/components/Inputs/Dates/DatePicker/DatePicker.d.ts +2 -1
- package/dist/components/Inputs/Dates/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/Inputs/Dates/DatePicker/DatePicker.js +23 -7
- package/dist/components/Inputs/Dates/DateTimePicker/DateTimePicker.d.ts +13 -0
- package/dist/components/Inputs/Dates/DateTimePicker/DateTimePicker.d.ts.map +1 -0
- package/dist/components/Inputs/Dates/DateTimePicker/DateTimePicker.js +87 -0
- package/dist/components/Inputs/Dates/DateTimePicker/DateTimePicker.stories.d.ts +13 -0
- package/dist/components/Inputs/Dates/DateTimePicker/DateTimePicker.stories.d.ts.map +1 -0
- package/dist/components/Inputs/Dates/DateTimePicker/DateTimePicker.stories.js +239 -0
- package/dist/components/Inputs/Dates/TimeInput/TimeInput.d.ts +20 -0
- package/dist/components/Inputs/Dates/TimeInput/TimeInput.d.ts.map +1 -0
- package/dist/components/Inputs/Dates/TimeInput/TimeInput.js +51 -0
- package/dist/components/Inputs/Dropdowns/CascadingSelect/CascadingSelect.d.ts +1 -1
- package/dist/components/Inputs/Dropdowns/CascadingSelect/CascadingSelect.d.ts.map +1 -1
- package/dist/components/Inputs/Dropdowns/FontSelect/FontSelect.d.ts +2 -1
- package/dist/components/Inputs/Dropdowns/FontSelect/FontSelect.d.ts.map +1 -1
- package/dist/components/Inputs/Dropdowns/FontSelect/FontSelect.js +8 -1
- package/dist/components/Inputs/Dropdowns/MultiSelect/MultiSelect.d.ts +4 -3
- package/dist/components/Inputs/Dropdowns/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/components/Inputs/Dropdowns/MultiSelect/MultiSelect.js +76 -57
- package/dist/components/Inputs/Dropdowns/Select/Select.d.ts +2 -1
- package/dist/components/Inputs/Dropdowns/Select/Select.d.ts.map +1 -1
- package/dist/components/Inputs/Dropdowns/Select/Select.js +5 -3
- package/dist/components/Inputs/Dropzone/Dropzone.d.ts +24 -0
- package/dist/components/Inputs/Dropzone/Dropzone.d.ts.map +1 -0
- package/dist/components/Inputs/Dropzone/Dropzone.js +44 -0
- package/dist/components/Inputs/Dropzone/Dropzone.stories.d.ts +12 -0
- package/dist/components/Inputs/Dropzone/Dropzone.stories.d.ts.map +1 -0
- package/dist/components/Inputs/Dropzone/Dropzone.stories.js +114 -0
- package/dist/components/Inputs/Sliders/Slider/Slider.d.ts +1 -1
- package/dist/components/Inputs/Sliders/Slider/Slider.d.ts.map +1 -1
- package/dist/components/Inputs/Sliders/VolumeSlider/VolumeSlider.d.ts +2 -1
- package/dist/components/Inputs/Sliders/VolumeSlider/VolumeSlider.d.ts.map +1 -1
- package/dist/components/Inputs/TextInputs/AutoComplete/AutoComplete.d.ts +2 -1
- package/dist/components/Inputs/TextInputs/AutoComplete/AutoComplete.d.ts.map +1 -1
- package/dist/components/Inputs/TextInputs/NumberInput/NumberInput.d.ts +2 -1
- package/dist/components/Inputs/TextInputs/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/components/Inputs/TextInputs/NumberInput/NumberInput.js +4 -1
- package/dist/components/Inputs/TextInputs/NumberInput/ResponsiveNumberInput.d.ts +46 -0
- package/dist/components/Inputs/TextInputs/NumberInput/ResponsiveNumberInput.d.ts.map +1 -0
- package/dist/components/Inputs/TextInputs/NumberInput/ResponsiveNumberInput.js +60 -0
- package/dist/components/Inputs/TextInputs/PasswordInput/PasswordInput.d.ts +2 -1
- package/dist/components/Inputs/TextInputs/PasswordInput/PasswordInput.d.ts.map +1 -1
- package/dist/components/Inputs/TextInputs/SearchBar/SearchBar.d.ts +2 -1
- package/dist/components/Inputs/TextInputs/SearchBar/SearchBar.d.ts.map +1 -1
- package/dist/components/Inputs/TextInputs/TextArea/TextArea.d.ts +2 -1
- package/dist/components/Inputs/TextInputs/TextArea/TextArea.d.ts.map +1 -1
- package/dist/components/Inputs/TextInputs/TextInput/TextInput.d.ts +2 -1
- package/dist/components/Inputs/TextInputs/TextInput/TextInput.d.ts.map +1 -1
- package/dist/components/Layout/Accordion/Accordion.d.ts +16 -0
- package/dist/components/Layout/Accordion/Accordion.d.ts.map +1 -0
- package/dist/components/Layout/Accordion/Accordion.js +63 -0
- package/dist/components/Layout/Accordion/Accordion.stories.d.ts +11 -0
- package/dist/components/Layout/Accordion/Accordion.stories.d.ts.map +1 -0
- package/dist/components/Layout/Accordion/Accordion.stories.js +148 -0
- package/dist/components/Layout/AutoGrid/AutoGrid.d.ts +20 -5
- package/dist/components/Layout/AutoGrid/AutoGrid.d.ts.map +1 -1
- package/dist/components/Layout/AutoGrid/AutoGrid.js +51 -3
- package/dist/components/Layout/AutoGrid/AutoGrid.stories.d.ts +1 -0
- package/dist/components/Layout/AutoGrid/AutoGrid.stories.d.ts.map +1 -1
- package/dist/components/Layout/AutoGrid/AutoGrid.stories.js +39 -29
- package/dist/components/Layout/BottomActionBar/BottomActionBar.d.ts +40 -0
- package/dist/components/Layout/BottomActionBar/BottomActionBar.d.ts.map +1 -0
- package/dist/components/Layout/BottomActionBar/BottomActionBar.js +79 -0
- package/dist/components/Layout/BottomActionBar/BottomActionBar.stories.d.ts +10 -0
- package/dist/components/Layout/BottomActionBar/BottomActionBar.stories.d.ts.map +1 -0
- package/dist/components/Layout/BottomActionBar/BottomActionBar.stories.js +102 -0
- package/dist/components/Layout/Box/Box.d.ts +2 -1
- package/dist/components/Layout/Box/Box.d.ts.map +1 -1
- package/dist/components/Layout/Card/Card.d.ts +2 -2
- package/dist/components/Layout/Card/Card.d.ts.map +1 -1
- package/dist/components/Layout/Center/Center.d.ts +2 -1
- package/dist/components/Layout/Center/Center.d.ts.map +1 -1
- package/dist/components/Layout/Container/Container.d.ts +3 -0
- package/dist/components/Layout/Container/Container.d.ts.map +1 -0
- package/dist/components/Layout/Container/Container.js +1 -0
- package/dist/components/Layout/Container/Container.stories.d.ts +8 -0
- package/dist/components/Layout/Container/Container.stories.d.ts.map +1 -0
- package/dist/components/Layout/Container/Container.stories.js +52 -0
- package/dist/components/Layout/DataState/DataState.d.ts +34 -0
- package/dist/components/Layout/DataState/DataState.d.ts.map +1 -0
- package/dist/components/Layout/DataState/DataState.js +22 -0
- package/dist/components/Layout/DataState/DataState.stories.d.ts +11 -0
- package/dist/components/Layout/DataState/DataState.stories.d.ts.map +1 -0
- package/dist/components/Layout/DataState/DataState.stories.js +38 -0
- package/dist/components/Layout/Divider/Divider.d.ts +2 -1
- package/dist/components/Layout/Divider/Divider.d.ts.map +1 -1
- package/dist/components/Layout/Divider/Divider.js +4 -2
- package/dist/components/Layout/Frame/Frame.d.ts +2 -1
- package/dist/components/Layout/Frame/Frame.d.ts.map +1 -1
- package/dist/components/Layout/Grid/Grid.d.ts +1 -1
- package/dist/components/Layout/Group/Group.d.ts +3 -2
- package/dist/components/Layout/Group/Group.d.ts.map +1 -1
- package/dist/components/Layout/Loader/Loader.d.ts +2 -1
- package/dist/components/Layout/Loader/Loader.d.ts.map +1 -1
- package/dist/components/Layout/Loader/Loader.js +3 -2
- package/dist/components/Layout/Navbar/Navbar.d.ts +15 -0
- package/dist/components/Layout/Navbar/Navbar.d.ts.map +1 -0
- package/dist/components/Layout/Navbar/Navbar.js +20 -0
- package/dist/components/Layout/Navbar/Navbar.stories.d.ts +9 -0
- package/dist/components/Layout/Navbar/Navbar.stories.d.ts.map +1 -0
- package/dist/components/Layout/Navbar/Navbar.stories.js +98 -0
- package/dist/components/Layout/Page/Page.d.ts +13 -0
- package/dist/components/Layout/Page/Page.d.ts.map +1 -0
- package/dist/components/Layout/Page/Page.js +13 -0
- package/dist/components/Layout/Pagination/Pagination.d.ts +24 -0
- package/dist/components/Layout/Pagination/Pagination.d.ts.map +1 -0
- package/dist/components/Layout/Pagination/Pagination.js +53 -0
- package/dist/components/Layout/Pagination/Pagination.stories.d.ts +10 -0
- package/dist/components/Layout/Pagination/Pagination.stories.d.ts.map +1 -0
- package/dist/components/Layout/Pagination/Pagination.stories.js +76 -0
- package/dist/components/Layout/ScrollArea/ScrollArea.d.ts +3 -0
- package/dist/components/Layout/ScrollArea/ScrollArea.d.ts.map +1 -0
- package/dist/components/Layout/ScrollArea/ScrollArea.js +1 -0
- package/dist/components/Layout/ScrollArea/ScrollArea.stories.d.ts +8 -0
- package/dist/components/Layout/ScrollArea/ScrollArea.stories.d.ts.map +1 -0
- package/dist/components/Layout/ScrollArea/ScrollArea.stories.js +62 -0
- package/dist/components/Layout/SectionCard/SectionCard.d.ts +1 -1
- package/dist/components/Layout/SectionCard/SectionCard.d.ts.map +1 -1
- package/dist/components/Layout/Stack/Stack.d.ts +2 -1
- package/dist/components/Layout/Stack/Stack.d.ts.map +1 -1
- package/dist/components/Layout/Table/Table.d.ts +1 -1
- package/dist/components/Layout/Table/Table.d.ts.map +1 -1
- package/dist/components/Layout/Tabs/Tabs.d.ts +16 -5
- package/dist/components/Layout/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Layout/Tabs/Tabs.js +53 -18
- package/dist/components/Layout/Tabs/Tabs.stories.d.ts.map +1 -1
- package/dist/components/Layout/Tabs/Tabs.stories.js +39 -39
- package/dist/components/Layout/VirtualGrid/VirtualGrid.d.ts +63 -0
- package/dist/components/Layout/VirtualGrid/VirtualGrid.d.ts.map +1 -0
- package/dist/components/Layout/VirtualGrid/VirtualGrid.js +159 -0
- package/dist/components/Misc/Burger/Burger.d.ts +6 -0
- package/dist/components/Misc/Burger/Burger.d.ts.map +1 -0
- package/dist/components/Misc/Burger/Burger.js +7 -0
- package/dist/components/Misc/Burger/Burger.stories.d.ts +10 -0
- package/dist/components/Misc/Burger/Burger.stories.d.ts.map +1 -0
- package/dist/components/Misc/Burger/Burger.stories.js +86 -0
- package/dist/components/Misc/Carousel/Carousel.d.ts +32 -0
- package/dist/components/Misc/Carousel/Carousel.d.ts.map +1 -0
- package/dist/components/Misc/Carousel/Carousel.js +16 -0
- package/dist/components/Misc/DragHandle/DragHandle.d.ts +19 -0
- package/dist/components/Misc/DragHandle/DragHandle.d.ts.map +1 -0
- package/dist/components/Misc/DragHandle/DragHandle.js +39 -0
- package/dist/components/Misc/DragHandle/DragHandle.stories.d.ts +9 -0
- package/dist/components/Misc/DragHandle/DragHandle.stories.d.ts.map +1 -0
- package/dist/components/Misc/DragHandle/DragHandle.stories.js +54 -0
- package/dist/components/Misc/FAB/FAB.d.ts +54 -0
- package/dist/components/Misc/FAB/FAB.d.ts.map +1 -0
- package/dist/components/Misc/FAB/FAB.js +53 -0
- package/dist/components/Misc/FAB/FAB.stories.d.ts +10 -0
- package/dist/components/Misc/FAB/FAB.stories.d.ts.map +1 -0
- package/dist/components/Misc/FAB/FAB.stories.js +100 -0
- package/dist/components/Misc/FloatingToolbar/FloatingToolbar.d.ts +50 -0
- package/dist/components/Misc/FloatingToolbar/FloatingToolbar.d.ts.map +1 -0
- package/dist/components/Misc/FloatingToolbar/FloatingToolbar.js +40 -0
- package/dist/components/Misc/FloatingToolbar/FloatingToolbar.stories.d.ts +9 -0
- package/dist/components/Misc/FloatingToolbar/FloatingToolbar.stories.d.ts.map +1 -0
- package/dist/components/Misc/FloatingToolbar/FloatingToolbar.stories.js +53 -0
- package/dist/components/Misc/HoverAction/HoverAction.d.ts +50 -0
- package/dist/components/Misc/HoverAction/HoverAction.d.ts.map +1 -0
- package/dist/components/Misc/HoverAction/HoverAction.js +61 -0
- package/dist/components/Misc/HoverAction/HoverAction.stories.d.ts +12 -0
- package/dist/components/Misc/HoverAction/HoverAction.stories.d.ts.map +1 -0
- package/dist/components/Misc/HoverAction/HoverAction.stories.js +96 -0
- package/dist/components/Misc/IconBadge/IconBadge.d.ts +1 -1
- package/dist/components/Misc/IconBadge/IconBadge.d.ts.map +1 -1
- package/dist/components/Misc/IconBadge/IconBadge.js +8 -6
- package/dist/components/Misc/Image/Image.d.ts +3 -0
- package/dist/components/Misc/Image/Image.d.ts.map +1 -0
- package/dist/components/Misc/Image/Image.js +1 -0
- package/dist/components/Misc/Image/Image.stories.d.ts +11 -0
- package/dist/components/Misc/Image/Image.stories.d.ts.map +1 -0
- package/dist/components/Misc/Image/Image.stories.js +63 -0
- package/dist/components/Misc/Kbd/Kbd.d.ts +7 -0
- package/dist/components/Misc/Kbd/Kbd.d.ts.map +1 -0
- package/dist/components/Misc/Kbd/Kbd.js +16 -0
- package/dist/components/Misc/Kbd/Kbd.stories.d.ts +9 -0
- package/dist/components/Misc/Kbd/Kbd.stories.d.ts.map +1 -0
- package/dist/components/Misc/Kbd/Kbd.stories.js +52 -0
- package/dist/components/Misc/LoadingOverlay/LoadingOverlay.d.ts +2 -1
- package/dist/components/Misc/LoadingOverlay/LoadingOverlay.d.ts.map +1 -1
- package/dist/components/Misc/Menu/Menu.d.ts +17 -0
- package/dist/components/Misc/Menu/Menu.d.ts.map +1 -0
- package/dist/components/Misc/Menu/Menu.js +52 -0
- package/dist/components/Misc/OverflowFade/OverflowFade.d.ts +42 -0
- package/dist/components/Misc/OverflowFade/OverflowFade.d.ts.map +1 -0
- package/dist/components/Misc/OverflowFade/OverflowFade.js +110 -0
- package/dist/components/Misc/OverflowFade/OverflowFade.stories.d.ts +11 -0
- package/dist/components/Misc/OverflowFade/OverflowFade.stories.d.ts.map +1 -0
- package/dist/components/Misc/OverflowFade/OverflowFade.stories.js +112 -0
- package/dist/components/Misc/Picker/Picker.d.ts +62 -0
- package/dist/components/Misc/Picker/Picker.d.ts.map +1 -0
- package/dist/components/Misc/Picker/Picker.js +111 -0
- package/dist/components/Misc/Picker/Picker.stories.d.ts +14 -0
- package/dist/components/Misc/Picker/Picker.stories.d.ts.map +1 -0
- package/dist/components/Misc/Picker/Picker.stories.js +154 -0
- package/dist/components/Misc/SelectableObject/SelectableObject.d.ts +38 -0
- package/dist/components/Misc/SelectableObject/SelectableObject.d.ts.map +1 -0
- package/dist/components/Misc/SelectableObject/SelectableObject.js +70 -0
- package/dist/components/Misc/SelectableObject/SelectableObject.stories.d.ts +11 -0
- package/dist/components/Misc/SelectableObject/SelectableObject.stories.d.ts.map +1 -0
- package/dist/components/Misc/SelectableObject/SelectableObject.stories.js +84 -0
- package/dist/components/Misc/SelectionToolbar/SelectionToolbar.d.ts +26 -0
- package/dist/components/Misc/SelectionToolbar/SelectionToolbar.d.ts.map +1 -0
- package/dist/components/Misc/SelectionToolbar/SelectionToolbar.js +41 -0
- package/dist/components/Misc/SelectionToolbar/SelectionToolbar.stories.d.ts +10 -0
- package/dist/components/Misc/SelectionToolbar/SelectionToolbar.stories.d.ts.map +1 -0
- package/dist/components/Misc/SelectionToolbar/SelectionToolbar.stories.js +48 -0
- package/dist/components/Misc/Skeleton/Skeleton.d.ts +1 -1
- package/dist/components/Misc/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/components/Misc/Stepper/Step.d.ts +1 -1
- package/dist/components/Misc/Stepper/Step.d.ts.map +1 -1
- package/dist/components/Misc/Stepper/Step.stories.d.ts +120 -120
- package/dist/components/Misc/Stepper/Stepper.d.ts +1 -1
- package/dist/components/Misc/Stepper/Stepper.d.ts.map +1 -1
- package/dist/components/Misc/Stepper/variants.d.ts +1 -1
- package/dist/components/Misc/Timeline/Timeline.d.ts +18 -0
- package/dist/components/Misc/Timeline/Timeline.d.ts.map +1 -0
- package/dist/components/Misc/Timeline/Timeline.js +38 -0
- package/dist/components/Misc/Timeline/Timeline.stories.d.ts +8 -0
- package/dist/components/Misc/Timeline/Timeline.stories.d.ts.map +1 -0
- package/dist/components/Misc/Timeline/Timeline.stories.js +54 -0
- package/dist/components/Misc/Transition/Transition.d.ts +2 -1
- package/dist/components/Misc/Transition/Transition.d.ts.map +1 -1
- package/dist/components/Typography/CollapsibleText/CollapsibleText.d.ts +1 -1
- package/dist/components/Typography/CollapsibleText/CollapsibleText.d.ts.map +1 -1
- package/dist/components/Typography/CollapsibleTitle/CollapsibleTitle.d.ts +1 -1
- package/dist/components/Typography/CollapsibleTitle/CollapsibleTitle.d.ts.map +1 -1
- package/dist/components/Typography/Formula/Formula.d.ts +2 -1
- package/dist/components/Typography/Formula/Formula.d.ts.map +1 -1
- package/dist/components/Typography/Fraction/Fraction.d.ts +1 -1
- package/dist/components/Typography/Fraction/Fraction.d.ts.map +1 -1
- package/dist/components/Typography/InlineEditableText/InlineEditableText.d.ts +35 -0
- package/dist/components/Typography/InlineEditableText/InlineEditableText.d.ts.map +1 -0
- package/dist/components/Typography/InlineEditableText/InlineEditableText.js +112 -0
- package/dist/components/Typography/InlineEditableText/InlineEditableText.stories.d.ts +11 -0
- package/dist/components/Typography/InlineEditableText/InlineEditableText.stories.d.ts.map +1 -0
- package/dist/components/Typography/InlineEditableText/InlineEditableText.stories.js +48 -0
- package/dist/components/Typography/Text/Text.d.ts +1 -1
- package/dist/components/Typography/Text/Text.d.ts.map +1 -1
- package/dist/components/Typography/Title/Title.d.ts +1 -1
- package/dist/components/Typography/Title/Title.d.ts.map +1 -1
- package/dist/components/index.d.ts +148 -66
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +110 -68
- package/dist/constants/colors.d.ts +117 -91
- package/dist/constants/colors.d.ts.map +1 -1
- package/dist/constants/colors.js +56 -43
- package/dist/constants/font.d.ts +4 -4
- package/dist/constants/font.js +2 -2
- package/dist/docs/AIGeneratedBanner.d.ts +1 -1
- package/dist/docs/AIGeneratedBanner.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +9 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +7 -1
- package/dist/hooks/useConfirmationModal.d.ts.map +1 -1
- package/dist/hooks/useConfirmationModal.js +20 -1
- package/dist/hooks/useDisclosure.d.ts +11 -0
- package/dist/hooks/useDisclosure.d.ts.map +1 -0
- package/dist/hooks/useDisclosure.js +10 -0
- package/dist/hooks/useHeadroom.d.ts +18 -0
- package/dist/hooks/useHeadroom.d.ts.map +1 -0
- package/dist/hooks/useHeadroom.js +17 -0
- package/dist/hooks/useInfoModal.d.ts.map +1 -1
- package/dist/hooks/useInfoModal.js +13 -1
- package/dist/hooks/useMediaQuery.d.ts +1 -0
- package/dist/hooks/useMediaQuery.d.ts.map +1 -1
- package/dist/hooks/useMediaQuery.js +1 -0
- package/dist/hooks/useNotifications.d.ts +39 -7
- package/dist/hooks/useNotifications.d.ts.map +1 -1
- package/dist/hooks/useNotifications.js +108 -5
- package/dist/hooks/usePagination.d.ts +11 -0
- package/dist/hooks/usePagination.d.ts.map +1 -0
- package/dist/hooks/usePagination.js +2 -0
- package/dist/hooks/useScrollLock.d.ts +21 -0
- package/dist/hooks/useScrollLock.d.ts.map +1 -0
- package/dist/hooks/useScrollLock.js +20 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.js +5 -5
- package/dist/styles/iosInputZoomFix.d.ts +31 -0
- package/dist/styles/iosInputZoomFix.d.ts.map +1 -0
- package/dist/styles/iosInputZoomFix.js +135 -0
- package/dist/utils/bytes.d.ts +10 -0
- package/dist/utils/bytes.d.ts.map +1 -0
- package/dist/utils/bytes.js +17 -0
- package/dist/utils/datetime.d.ts +18 -0
- package/dist/utils/datetime.d.ts.map +1 -0
- package/dist/utils/datetime.js +42 -0
- package/dist/utils/duration.d.ts +17 -0
- package/dist/utils/duration.d.ts.map +1 -0
- package/dist/utils/duration.js +30 -0
- package/dist/utils/index.d.ts +8 -2
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +7 -2
- package/dist/utils/sort.d.ts +44 -0
- package/dist/utils/sort.d.ts.map +1 -0
- package/dist/utils/sort.js +53 -0
- package/dist/utils/string.d.ts +22 -0
- package/dist/utils/string.d.ts.map +1 -0
- package/dist/utils/string.js +25 -0
- package/package.json +28 -4
package/dist/constants/font.js
CHANGED
|
@@ -68,14 +68,14 @@ const titleStyle = {
|
|
|
68
68
|
...fontBase,
|
|
69
69
|
...fontSize['3xl'],
|
|
70
70
|
fontWeight: fontWeight['bold'],
|
|
71
|
-
color:
|
|
71
|
+
color: neutral[500],
|
|
72
72
|
},
|
|
73
73
|
sectionHeader: {
|
|
74
74
|
// h2
|
|
75
75
|
...fontBase,
|
|
76
76
|
...fontSize['xl'],
|
|
77
77
|
fontWeight: fontWeight['semibold'],
|
|
78
|
-
color:
|
|
78
|
+
color: neutral[500],
|
|
79
79
|
},
|
|
80
80
|
subheader: {
|
|
81
81
|
// h3
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function AIGeneratedBanner(): import("react
|
|
1
|
+
export declare function AIGeneratedBanner(): import("react").JSX.Element;
|
|
2
2
|
//# sourceMappingURL=AIGeneratedBanner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AIGeneratedBanner.d.ts","sourceRoot":"","sources":["../../src/docs/AIGeneratedBanner.tsx"],"names":[],"mappings":"AAEA,wBAAgB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"AIGeneratedBanner.d.ts","sourceRoot":"","sources":["../../src/docs/AIGeneratedBanner.tsx"],"names":[],"mappings":"AAEA,wBAAgB,iBAAiB,gCAMhC"}
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
export { useCopy } from './useCopy';
|
|
2
|
-
export {
|
|
2
|
+
export { useDisclosure } from './useDisclosure';
|
|
3
|
+
export { useHeadroom } from './useHeadroom';
|
|
4
|
+
export { useScrollLock } from './useScrollLock';
|
|
5
|
+
export { useElementSize, useListState, useResizeObserver, useTimeout, useDebouncedValue } from '@mantine/hooks';
|
|
6
|
+
export { useForm } from '@mantine/form';
|
|
7
|
+
export type { UseFormReturnType } from '@mantine/form';
|
|
8
|
+
export { useMediaQuery, useScreenSize, useMobile, useTablet, useLaptop, useDesktop, useWide, useTouchDevice } from './useMediaQuery';
|
|
3
9
|
export { useNotifications } from './useNotifications';
|
|
4
10
|
export { useConfirmationModal } from './useConfirmationModal';
|
|
5
11
|
export { useInfoModal } from './useInfoModal';
|
|
12
|
+
export { usePagination } from './usePagination';
|
|
13
|
+
export type { PaginationParams } from './usePagination';
|
|
6
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAChH,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,YAAY,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACrI,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
export { useCopy } from './useCopy';
|
|
2
|
-
export {
|
|
2
|
+
export { useDisclosure } from './useDisclosure';
|
|
3
|
+
export { useHeadroom } from './useHeadroom';
|
|
4
|
+
export { useScrollLock } from './useScrollLock';
|
|
5
|
+
export { useElementSize, useListState, useResizeObserver, useTimeout, useDebouncedValue } from '@mantine/hooks';
|
|
6
|
+
export { useForm } from '@mantine/form';
|
|
7
|
+
export { useMediaQuery, useScreenSize, useMobile, useTablet, useLaptop, useDesktop, useWide, useTouchDevice } from './useMediaQuery';
|
|
3
8
|
export { useNotifications } from './useNotifications';
|
|
4
9
|
export { useConfirmationModal } from './useConfirmationModal';
|
|
5
10
|
export { useInfoModal } from './useInfoModal';
|
|
11
|
+
export { usePagination } from './usePagination';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConfirmationModal.d.ts","sourceRoot":"","sources":["../../src/hooks/useConfirmationModal.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"useConfirmationModal.d.ts","sourceRoot":"","sources":["../../src/hooks/useConfirmationModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAOzC,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAInE,eAAO,MAAM,oBAAoB;oBACR;QACrB,OAAO,CAAC,EAAE,OAAO,CAAC,MAAM,OAAO,aAAa,EAAE,OAAO,CAAC,CAAC;QACvD,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;QAC1B,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;QACvB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;QACtB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;KACxB;qBA2GuB,MAAM;;CAa/B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import React, { useEffect } from 'react';
|
|
3
3
|
import { modals } from '@mantine/modals';
|
|
4
4
|
import { neutral } from '../constants/colors';
|
|
5
5
|
import { spacing } from '../constants/spacing';
|
|
@@ -33,11 +33,30 @@ export const useConfirmationModal = () => {
|
|
|
33
33
|
const coloredIcon = icon && React.cloneElement(icon, { color: icon.props.color || selectedVariant.iconColor });
|
|
34
34
|
const modalIcon = coloredIcon || _jsx("i", { className: selectedVariant.icon, style: { color: selectedVariant.iconColor, fontSize: '20px' } });
|
|
35
35
|
const ConfirmModalContent = () => {
|
|
36
|
+
// Enter confirms, Escape cancels. We own Escape (closeOnEscape is
|
|
37
|
+
// disabled at the modal level below) so the user's onCancel fires
|
|
38
|
+
// on Escape instead of the modal silently closing.
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
const onKeyDown = (e) => {
|
|
41
|
+
if (e.key === 'Enter') {
|
|
42
|
+
e.preventDefault();
|
|
43
|
+
handleConfirm();
|
|
44
|
+
}
|
|
45
|
+
else if (e.key === 'Escape') {
|
|
46
|
+
e.preventDefault();
|
|
47
|
+
handleCancel();
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
window.addEventListener('keydown', onKeyDown);
|
|
51
|
+
return () => window.removeEventListener('keydown', onKeyDown);
|
|
52
|
+
}, []);
|
|
36
53
|
return (_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: [_jsx(Center, { style: iconContainer, children: modalIcon }), _jsxs(Stack, { gap: spacing.xxs, align: "center", children: [_jsx(Title, { variant: "cardHeader", align: "center", children: title || selectedVariant.title }), _jsx(Title, { variant: "cardSubheader", align: "center", children: message || selectedVariant.message })] })] }), _jsx(Center, { h: "100%", w: "100%", children: _jsxs(Group, { gap: "10px", align: "center", children: [_jsx(Button, { onClick: handleCancel, variant: "secondary", children: cancelLabel || selectedVariant.cancelLabel }), _jsx(Button, { onClick: handleConfirm, variant: selectedVariant.buttonVariant, children: confirmLabel || selectedVariant.confirmLabel })] }) })] }) }));
|
|
37
54
|
};
|
|
38
55
|
modals.open({
|
|
39
56
|
children: _jsx(ConfirmModalContent, {}),
|
|
40
57
|
size,
|
|
58
|
+
// Escape is handled inside ConfirmModalContent so it can fire onCancel.
|
|
59
|
+
closeOnEscape: false,
|
|
41
60
|
styles: {
|
|
42
61
|
content: {
|
|
43
62
|
borderRadius: '8px',
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useDisclosure as useMantineDisclosure } from '@mantine/hooks';
|
|
2
|
+
/**
|
|
3
|
+
* Re-export of Mantine v6's `useDisclosure` hook for managing boolean open/closed state.
|
|
4
|
+
*
|
|
5
|
+
* Returns a tuple: `[opened, { open, close, toggle }]`.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* const [opened, { open, close, toggle }] = useDisclosure(false);
|
|
9
|
+
*/
|
|
10
|
+
export declare const useDisclosure: typeof useMantineDisclosure;
|
|
11
|
+
//# sourceMappingURL=useDisclosure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDisclosure.d.ts","sourceRoot":"","sources":["../../src/hooks/useDisclosure.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,IAAI,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEvE;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,6BAAuB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useDisclosure as useMantineDisclosure } from '@mantine/hooks';
|
|
2
|
+
/**
|
|
3
|
+
* Re-export of Mantine v6's `useDisclosure` hook for managing boolean open/closed state.
|
|
4
|
+
*
|
|
5
|
+
* Returns a tuple: `[opened, { open, close, toggle }]`.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* const [opened, { open, close, toggle }] = useDisclosure(false);
|
|
9
|
+
*/
|
|
10
|
+
export const useDisclosure = useMantineDisclosure;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useHeadroom as useMantineHeadroom } from '@mantine/hooks';
|
|
2
|
+
/**
|
|
3
|
+
* Re-export of Mantine v6's `useHeadroom` hook for show-on-scroll-up / hide-on-scroll-down
|
|
4
|
+
* headers.
|
|
5
|
+
*
|
|
6
|
+
* Returns a boolean — `true` when the element should be pinned (visible), `false` when it
|
|
7
|
+
* should be released (hidden). Use it to conditionally translate a fixed header offscreen.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* const pinned = useHeadroom({ fixedAt: 120 });
|
|
11
|
+
* return (
|
|
12
|
+
* <header style={{ transform: pinned ? 'translateY(0)' : 'translateY(-100%)' }}>
|
|
13
|
+
* ...
|
|
14
|
+
* </header>
|
|
15
|
+
* );
|
|
16
|
+
*/
|
|
17
|
+
export declare const useHeadroom: typeof useMantineHeadroom;
|
|
18
|
+
//# sourceMappingURL=useHeadroom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useHeadroom.d.ts","sourceRoot":"","sources":["../../src/hooks/useHeadroom.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,IAAI,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEnE;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,WAAW,2BAAqB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useHeadroom as useMantineHeadroom } from '@mantine/hooks';
|
|
2
|
+
/**
|
|
3
|
+
* Re-export of Mantine v6's `useHeadroom` hook for show-on-scroll-up / hide-on-scroll-down
|
|
4
|
+
* headers.
|
|
5
|
+
*
|
|
6
|
+
* Returns a boolean — `true` when the element should be pinned (visible), `false` when it
|
|
7
|
+
* should be released (hidden). Use it to conditionally translate a fixed header offscreen.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* const pinned = useHeadroom({ fixedAt: 120 });
|
|
11
|
+
* return (
|
|
12
|
+
* <header style={{ transform: pinned ? 'translateY(0)' : 'translateY(-100%)' }}>
|
|
13
|
+
* ...
|
|
14
|
+
* </header>
|
|
15
|
+
* );
|
|
16
|
+
*/
|
|
17
|
+
export const useHeadroom = useMantineHeadroom;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInfoModal.d.ts","sourceRoot":"","sources":["../../src/hooks/useInfoModal.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"useInfoModal.d.ts","sourceRoot":"","sources":["../../src/hooks/useInfoModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAOzC,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAGnE,eAAO,MAAM,YAAY;oBACA;QAAE,OAAO,CAAC,EAAE,MAAM,OAAO,aAAa,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE;qBA2FpJ,MAAM;;CAa/B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import React, { useEffect } from 'react';
|
|
3
3
|
import { modals } from '@mantine/modals';
|
|
4
4
|
import { neutral } from '../constants/colors';
|
|
5
5
|
import { spacing } from '../constants/spacing';
|
|
@@ -27,6 +27,18 @@ export const useInfoModal = () => {
|
|
|
27
27
|
const coloredIcon = icon && React.cloneElement(icon, { color: icon.props.color || selectedVariant.iconColor });
|
|
28
28
|
const modalIcon = coloredIcon || _jsx("i", { className: selectedVariant.icon, style: { color: selectedVariant.iconColor, fontSize: '20px' } });
|
|
29
29
|
const InfoModalContent = () => {
|
|
30
|
+
// Enter triggers the primary action; Escape is handled by Mantine's
|
|
31
|
+
// built-in closeOnEscape (no cancel callback for info modals).
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
const onKeyDown = (e) => {
|
|
34
|
+
if (e.key === 'Enter') {
|
|
35
|
+
e.preventDefault();
|
|
36
|
+
handleConfirm();
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
window.addEventListener('keydown', onKeyDown);
|
|
40
|
+
return () => window.removeEventListener('keydown', onKeyDown);
|
|
41
|
+
}, []);
|
|
30
42
|
return (_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: [_jsx(Center, { style: iconContainer, children: modalIcon }), _jsxs(Stack, { gap: spacing.xxs, align: "center", children: [_jsx(Title, { variant: "cardHeader", align: "center", children: title || selectedVariant.title }), _jsx(Title, { variant: "cardSubheader", align: "center", children: message || selectedVariant.message })] })] }), _jsx(Center, { h: "100%", w: "100%", children: _jsx(Button, { onClick: handleConfirm, variant: selectedVariant.buttonVariant, children: "OK" }) })] }) }));
|
|
31
43
|
};
|
|
32
44
|
modals.open({
|
|
@@ -7,4 +7,5 @@ export declare const useTablet: () => boolean;
|
|
|
7
7
|
export declare const useLaptop: () => boolean;
|
|
8
8
|
export declare const useDesktop: () => boolean;
|
|
9
9
|
export declare const useWide: () => boolean;
|
|
10
|
+
export declare const useTouchDevice: () => boolean;
|
|
10
11
|
//# sourceMappingURL=useMediaQuery.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMediaQuery.d.ts","sourceRoot":"","sources":["../../src/hooks/useMediaQuery.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,IAAI,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,eAAO,MAAM,aAAa,6BAAuB,CAAC;AAElD,eAAO,MAAM,aAAa,QAAO,MAAM,OAAO,WAW7C,CAAC;AAEF,eAAO,MAAM,SAAS,eAA8D,CAAC;AACrF,eAAO,MAAM,SAAS,eAA8D,CAAC;AACrF,eAAO,MAAM,SAAS,eAA8D,CAAC;AACrF,eAAO,MAAM,UAAU,eAA+D,CAAC;AACvF,eAAO,MAAM,OAAO,eAA4D,CAAC"}
|
|
1
|
+
{"version":3,"file":"useMediaQuery.d.ts","sourceRoot":"","sources":["../../src/hooks/useMediaQuery.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,IAAI,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,eAAO,MAAM,aAAa,6BAAuB,CAAC;AAElD,eAAO,MAAM,aAAa,QAAO,MAAM,OAAO,WAW7C,CAAC;AAEF,eAAO,MAAM,SAAS,eAA8D,CAAC;AACrF,eAAO,MAAM,SAAS,eAA8D,CAAC;AACrF,eAAO,MAAM,SAAS,eAA8D,CAAC;AACrF,eAAO,MAAM,UAAU,eAA+D,CAAC;AACvF,eAAO,MAAM,OAAO,eAA4D,CAAC;AACjF,eAAO,MAAM,cAAc,eAA2C,CAAC"}
|
|
@@ -21,3 +21,4 @@ export const useTablet = () => useMediaQuery(`(max-width: ${breakpoints.TABLET}p
|
|
|
21
21
|
export const useLaptop = () => useMediaQuery(`(max-width: ${breakpoints.LAPTOP}px)`);
|
|
22
22
|
export const useDesktop = () => useMediaQuery(`(max-width: ${breakpoints.DESKTOP}px)`);
|
|
23
23
|
export const useWide = () => useMediaQuery(`(max-width: ${breakpoints.WIDE}px)`);
|
|
24
|
+
export const useTouchDevice = () => useMediaQuery('(pointer: coarse)');
|
|
@@ -1,16 +1,48 @@
|
|
|
1
1
|
import { componentVariants } from '../components/Info/Notifications/variants';
|
|
2
|
+
type Variant = keyof typeof componentVariants;
|
|
3
|
+
type BaseOptions = {
|
|
4
|
+
variant?: Variant;
|
|
5
|
+
message: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
id?: string;
|
|
8
|
+
autoClose?: number | false;
|
|
9
|
+
};
|
|
10
|
+
type ActionOptions = BaseOptions & {
|
|
11
|
+
label: string;
|
|
12
|
+
onClick: () => void;
|
|
13
|
+
/** Dismiss the notification when the action is clicked. Defaults to `true`. */
|
|
14
|
+
dismissOnClick?: boolean;
|
|
15
|
+
};
|
|
16
|
+
type ConfirmationOptions = BaseOptions & {
|
|
17
|
+
confirmLabel: string;
|
|
18
|
+
cancelLabel: string;
|
|
19
|
+
onConfirm: () => void;
|
|
20
|
+
/** Optional — defaults to no-op (the notification still dismisses). */
|
|
21
|
+
onCancel?: () => void;
|
|
22
|
+
/** Dismiss the notification when either button is clicked. Defaults to `true`. */
|
|
23
|
+
dismissOnClick?: boolean;
|
|
24
|
+
};
|
|
2
25
|
export declare const useNotifications: () => {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
message: string;
|
|
6
|
-
title?: string;
|
|
7
|
-
id?: string;
|
|
8
|
-
}) => void;
|
|
26
|
+
hide: (id: string) => Promise<void>;
|
|
27
|
+
show: (options: BaseOptions) => void;
|
|
9
28
|
showError: () => void;
|
|
10
29
|
showLoading: (options: {
|
|
11
30
|
message: string;
|
|
12
31
|
title?: string;
|
|
13
32
|
}) => string;
|
|
14
|
-
|
|
33
|
+
showWithAction: (options: ActionOptions) => void;
|
|
34
|
+
showWithConfirmation: (options: ConfirmationOptions) => void;
|
|
35
|
+
showWithProgress: (options: {
|
|
36
|
+
message: string;
|
|
37
|
+
title?: string;
|
|
38
|
+
id?: string;
|
|
39
|
+
initialValue?: number;
|
|
40
|
+
}) => {
|
|
41
|
+
id: string;
|
|
42
|
+
update: (value: number, message?: string) => void;
|
|
43
|
+
done: (message?: string, terminalTitle?: string) => void;
|
|
44
|
+
fail: (message?: string, terminalTitle?: string) => void;
|
|
45
|
+
};
|
|
15
46
|
};
|
|
47
|
+
export {};
|
|
16
48
|
//# sourceMappingURL=useNotifications.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useNotifications.d.ts","sourceRoot":"","sources":["../../src/hooks/useNotifications.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useNotifications.d.ts","sourceRoot":"","sources":["../../src/hooks/useNotifications.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAI9E,KAAK,OAAO,GAAG,MAAM,OAAO,iBAAiB,CAAC;AAE9C,KAAK,WAAW,GAAG;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CAC5B,CAAC;AAEF,KAAK,aAAa,GAAG,WAAW,GAAG;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,+EAA+E;IAC/E,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,KAAK,mBAAmB,GAAG,WAAW,GAAG;IACvC,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,uEAAuE;IACvE,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,kFAAkF;IAClF,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,gBAAgB;eACH,MAAM;oBAyCP,WAAW;;2BAsJJ;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE;8BA/IhC,aAAa;oCA8BP,mBAAmB;gCAuCvB;QACjC,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB;;wBA8CmB,MAAM,YAAY,MAAM;yBAKvB,MAAM,kBAAkB,MAAM;yBAK9B,MAAM,kBAAkB,MAAM;;CAyCpD,CAAC"}
|
|
@@ -1,18 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
1
2
|
import { notifications as mantineNotifications } from '@mantine/notifications';
|
|
3
|
+
import { Button } from '../components/Inputs/Buttons/Button/Button';
|
|
4
|
+
import { Progress } from '../components/Data/Progress/Progress';
|
|
5
|
+
import { Group } from '../components/Layout/Group/Group';
|
|
6
|
+
import { Stack } from '../components/Layout/Stack/Stack';
|
|
7
|
+
import { Text } from '../components/Typography/Text/Text';
|
|
2
8
|
import { componentVariants } from '../components/Info/Notifications/variants';
|
|
9
|
+
const ACTIONABLE_AUTO_CLOSE = 8000;
|
|
3
10
|
export const useNotifications = () => {
|
|
4
11
|
const hide = async (id) => {
|
|
5
12
|
mantineNotifications.hide(id);
|
|
6
13
|
await new Promise((resolve) => setTimeout(resolve, 200));
|
|
7
14
|
};
|
|
8
|
-
const
|
|
9
|
-
const { variant = 'info', message, title, id } =
|
|
15
|
+
const _show = (base, footer) => {
|
|
16
|
+
const { variant = 'info', message, title, id, autoClose } = base;
|
|
10
17
|
const selectedVariant = componentVariants[variant];
|
|
18
|
+
const resolvedAutoClose = autoClose !== undefined
|
|
19
|
+
? autoClose
|
|
20
|
+
: footer
|
|
21
|
+
? ACTIONABLE_AUTO_CLOSE
|
|
22
|
+
: selectedVariant.autoClose;
|
|
23
|
+
const renderedMessage = footer ? (_jsxs(Stack, { spacing: 'sm', children: [_jsx(Text, { children: message }), _jsx(Group, { position: 'right', spacing: 'xs', mr: 'lg', children: footer })] })) : (message);
|
|
11
24
|
mantineNotifications.show({
|
|
12
25
|
title: title || selectedVariant.defaultTitle,
|
|
13
|
-
message,
|
|
26
|
+
message: renderedMessage,
|
|
14
27
|
icon: selectedVariant.icon,
|
|
15
|
-
autoClose:
|
|
28
|
+
autoClose: resolvedAutoClose,
|
|
16
29
|
id,
|
|
17
30
|
styles: {
|
|
18
31
|
root: {
|
|
@@ -21,6 +34,88 @@ export const useNotifications = () => {
|
|
|
21
34
|
},
|
|
22
35
|
});
|
|
23
36
|
};
|
|
37
|
+
const show = (options) => {
|
|
38
|
+
_show(options);
|
|
39
|
+
};
|
|
40
|
+
/** Notification with a single offered next-step button. Use for follow-ups
|
|
41
|
+
* where dismissing is fine ("Removed. [Undo]", "5 uploaded. [View]"). For
|
|
42
|
+
* yes/no questions use `showWithConfirmation` instead. */
|
|
43
|
+
const showWithAction = (options) => {
|
|
44
|
+
const { label, onClick, dismissOnClick = true, id: providedId, ...rest } = options;
|
|
45
|
+
const id = providedId !== null && providedId !== void 0 ? providedId : `actionable-${Math.random()}-${Math.random()}`;
|
|
46
|
+
_show({ ...rest, id }, _jsx(Button, { size: 'sm', variant: 'tertiary', onClick: () => {
|
|
47
|
+
if (dismissOnClick)
|
|
48
|
+
mantineNotifications.hide(id);
|
|
49
|
+
onClick();
|
|
50
|
+
}, children: label }));
|
|
51
|
+
};
|
|
52
|
+
/** Non-blocking yes/no question. Both buttons are real answers. For
|
|
53
|
+
* high-stakes / destructive prompts that must block the user use
|
|
54
|
+
* `useConfirmationModal` instead. Inherits the actionable-toast
|
|
55
|
+
* auto-close (8s) by default — pass `autoClose: false` to pin the
|
|
56
|
+
* question until the user answers. */
|
|
57
|
+
const showWithConfirmation = (options) => {
|
|
58
|
+
const { confirmLabel, cancelLabel, onConfirm, onCancel, dismissOnClick = true, id: providedId, autoClose, ...rest } = options;
|
|
59
|
+
const id = providedId !== null && providedId !== void 0 ? providedId : `confirmation-${Math.random()}-${Math.random()}`;
|
|
60
|
+
const handleConfirm = () => {
|
|
61
|
+
if (dismissOnClick)
|
|
62
|
+
mantineNotifications.hide(id);
|
|
63
|
+
onConfirm();
|
|
64
|
+
};
|
|
65
|
+
const handleCancel = () => {
|
|
66
|
+
if (dismissOnClick)
|
|
67
|
+
mantineNotifications.hide(id);
|
|
68
|
+
onCancel === null || onCancel === void 0 ? void 0 : onCancel();
|
|
69
|
+
};
|
|
70
|
+
_show({ ...rest, id, autoClose }, _jsxs(_Fragment, { children: [_jsx(Button, { size: 'sm', variant: 'cancel', onClick: handleCancel, children: cancelLabel }), _jsx(Button, { size: 'sm', variant: 'primary', onClick: handleConfirm, children: confirmLabel })] }));
|
|
71
|
+
};
|
|
72
|
+
/** Long-running task notification with a live progress bar. Pin until
|
|
73
|
+
* caller signals completion via `done` / `fail`. Use for uploads,
|
|
74
|
+
* exports, bulk operations — anything where the user benefits from
|
|
75
|
+
* seeing percentage advance in place. */
|
|
76
|
+
const showWithProgress = (options) => {
|
|
77
|
+
const { message: initialMessage, title, id: providedId, initialValue = 0, } = options;
|
|
78
|
+
const id = providedId !== null && providedId !== void 0 ? providedId : `progress-${Math.random()}-${Math.random()}`;
|
|
79
|
+
const loadingVariant = componentVariants.loading;
|
|
80
|
+
const renderLoading = (value, message) => ({
|
|
81
|
+
id,
|
|
82
|
+
title: title !== null && title !== void 0 ? title : loadingVariant.defaultTitle,
|
|
83
|
+
message: (_jsxs(Stack, { spacing: 'xs', children: [_jsx(Text, { children: message }), _jsx(Progress, { value: value, scale: 'sm' })] })),
|
|
84
|
+
icon: loadingVariant.icon,
|
|
85
|
+
autoClose: false,
|
|
86
|
+
withCloseButton: false,
|
|
87
|
+
styles: {
|
|
88
|
+
root: { borderLeft: `4px solid ${loadingVariant.color}` },
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
const renderTerminal = (variant, message, terminalTitle) => {
|
|
92
|
+
const v = componentVariants[variant];
|
|
93
|
+
return {
|
|
94
|
+
id,
|
|
95
|
+
title: terminalTitle !== null && terminalTitle !== void 0 ? terminalTitle : v.defaultTitle,
|
|
96
|
+
message,
|
|
97
|
+
icon: v.icon,
|
|
98
|
+
autoClose: v.autoClose,
|
|
99
|
+
withCloseButton: true,
|
|
100
|
+
styles: {
|
|
101
|
+
root: { borderLeft: `4px solid ${v.color}` },
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
mantineNotifications.show(renderLoading(initialValue, initialMessage));
|
|
106
|
+
return {
|
|
107
|
+
id,
|
|
108
|
+
update: (value, message) => {
|
|
109
|
+
mantineNotifications.update(renderLoading(value, message !== null && message !== void 0 ? message : initialMessage));
|
|
110
|
+
},
|
|
111
|
+
done: (message, terminalTitle) => {
|
|
112
|
+
mantineNotifications.update(renderTerminal('success', message !== null && message !== void 0 ? message : initialMessage, terminalTitle));
|
|
113
|
+
},
|
|
114
|
+
fail: (message, terminalTitle) => {
|
|
115
|
+
mantineNotifications.update(renderTerminal('error', message !== null && message !== void 0 ? message : 'An error has occurred. Please try again. If the issue persists, please contact us at support@taiv.tv', terminalTitle));
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
};
|
|
24
119
|
const showLoading = (options) => {
|
|
25
120
|
const notificationId = `${Math.random()}-${Math.random()}`;
|
|
26
121
|
show({
|
|
@@ -37,5 +132,13 @@ export const useNotifications = () => {
|
|
|
37
132
|
message: 'An error has occurred. Please try again. If the issue persists, please contact us at support@taiv.tv',
|
|
38
133
|
});
|
|
39
134
|
};
|
|
40
|
-
return {
|
|
135
|
+
return {
|
|
136
|
+
hide,
|
|
137
|
+
show,
|
|
138
|
+
showError,
|
|
139
|
+
showLoading,
|
|
140
|
+
showWithAction,
|
|
141
|
+
showWithConfirmation,
|
|
142
|
+
showWithProgress,
|
|
143
|
+
};
|
|
41
144
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { usePagination } from '@mantine/hooks';
|
|
2
|
+
export declare const DOTS: "dots";
|
|
3
|
+
export interface PaginationParams {
|
|
4
|
+
initialPage?: number;
|
|
5
|
+
page?: number;
|
|
6
|
+
total: number;
|
|
7
|
+
siblings?: number;
|
|
8
|
+
boundaries?: number;
|
|
9
|
+
onChange?: (page: number) => void;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=usePagination.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePagination.d.ts","sourceRoot":"","sources":["../../src/hooks/usePagination.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,eAAO,MAAM,IAAI,EAAG,MAAe,CAAC;AAEpC,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useScrollLock as useMantineScrollLock } from '@mantine/hooks';
|
|
2
|
+
/**
|
|
3
|
+
* Re-export of Mantine v6's `useScrollLock` hook for locking body scroll while
|
|
4
|
+
* a custom overlay/modal is open. Prevents the page behind a `position: fixed`
|
|
5
|
+
* overlay from scrolling ("scroll bleed") — the same mechanism the toolkit's
|
|
6
|
+
* `Modal` / `Drawer` use internally. Reach for this when building a bespoke
|
|
7
|
+
* overlay that isn't a Mantine `Modal`/`Drawer`.
|
|
8
|
+
*
|
|
9
|
+
* Pass `true` to lock and `false` to release. Compensates for scrollbar width
|
|
10
|
+
* (no layout shift) and restores the scroll position when released.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* // Mount-gated overlay (parent renders it only while open):
|
|
14
|
+
* useScrollLock(true);
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* // Always-mounted overlay toggled by state:
|
|
18
|
+
* useScrollLock(opened);
|
|
19
|
+
*/
|
|
20
|
+
export declare const useScrollLock: typeof useMantineScrollLock;
|
|
21
|
+
//# sourceMappingURL=useScrollLock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useScrollLock.d.ts","sourceRoot":"","sources":["../../src/hooks/useScrollLock.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,IAAI,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEvE;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,aAAa,6BAAuB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useScrollLock as useMantineScrollLock } from '@mantine/hooks';
|
|
2
|
+
/**
|
|
3
|
+
* Re-export of Mantine v6's `useScrollLock` hook for locking body scroll while
|
|
4
|
+
* a custom overlay/modal is open. Prevents the page behind a `position: fixed`
|
|
5
|
+
* overlay from scrolling ("scroll bleed") — the same mechanism the toolkit's
|
|
6
|
+
* `Modal` / `Drawer` use internally. Reach for this when building a bespoke
|
|
7
|
+
* overlay that isn't a Mantine `Modal`/`Drawer`.
|
|
8
|
+
*
|
|
9
|
+
* Pass `true` to lock and `false` to release. Compensates for scrollbar width
|
|
10
|
+
* (no layout shift) and restores the scroll position when released.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* // Mount-gated overlay (parent renders it only while open):
|
|
14
|
+
* useScrollLock(true);
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* // Always-mounted overlay toggled by state:
|
|
18
|
+
* useScrollLock(opened);
|
|
19
|
+
*/
|
|
20
|
+
export const useScrollLock = useMantineScrollLock;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
1
|
+
export * from "./components/index";
|
|
2
|
+
export * from "./constants/index";
|
|
3
|
+
export * from "./hooks/index";
|
|
4
|
+
export * from "./types/index";
|
|
5
|
+
export * from "./utils/index";
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
1
|
+
export * from "./components/index";
|
|
2
|
+
export * from "./constants/index";
|
|
3
|
+
export * from "./hooks/index";
|
|
4
|
+
export * from "./types/index";
|
|
5
|
+
export * from "./utils/index";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* iOS Safari auto-zooms when a focused form input has font-size < 16px AND
|
|
3
|
+
* the page's viewport allows zoom (`maximum-scale > 1`). Both conditions
|
|
4
|
+
* must hold; iOS evaluates them at focus time. We sidestep the zoom by
|
|
5
|
+
* temporarily setting `maximum-scale=1` on the viewport meta while the
|
|
6
|
+
* user is interacting with a text input, then restoring whatever was
|
|
7
|
+
* there before. The page's normal pinch-to-zoom remains available
|
|
8
|
+
* everywhere else.
|
|
9
|
+
*
|
|
10
|
+
* Why the viewport-swap approach over a CSS bump to 16px on mobile inputs:
|
|
11
|
+
* this preserves the toolkit's input typography exactly. No visual change
|
|
12
|
+
* at any breakpoint.
|
|
13
|
+
*
|
|
14
|
+
* **Why `pointerdown` and not `focusin`:** iOS commits the auto-zoom
|
|
15
|
+
* decision when focus is committed to the element, which happens BEFORE
|
|
16
|
+
* the DOM `focusin` event fires in our listener. Setting the viewport
|
|
17
|
+
* inside `focusin` is too late — iOS has already evaluated and queued
|
|
18
|
+
* the zoom animation. Listening on `pointerdown` (capture phase) lets
|
|
19
|
+
* us write the new viewport meta before the browser commits focus.
|
|
20
|
+
* `pointerdown` covers both touch and mouse uniformly.
|
|
21
|
+
*
|
|
22
|
+
* Composability with other viewport tweaks (e.g. `useEditorViewport` on
|
|
23
|
+
* the slide editor route): we capture the viewport content at lock time,
|
|
24
|
+
* not at module load. So whatever state the page is in when the user
|
|
25
|
+
* taps an input — default, slide-editor-locked, future overrides — is
|
|
26
|
+
* what we restore on blur. Setup-time capture would have stale state and
|
|
27
|
+
* clobber other modules that lock the viewport for their own reasons.
|
|
28
|
+
*/
|
|
29
|
+
declare const VIEWPORT_FOCUSED = "width=device-width, initial-scale=1, maximum-scale=1";
|
|
30
|
+
declare const setupIosInputZoomFix: () => void;
|
|
31
|
+
//# sourceMappingURL=iosInputZoomFix.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iosInputZoomFix.d.ts","sourceRoot":"","sources":["../../src/styles/iosInputZoomFix.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,QAAA,MAAM,gBAAgB,yDACkC,CAAC;AAEzD,QAAA,MAAM,oBAAoB,QAAO,IA4GhC,CAAC"}
|