@quen-ui/components 0.0.14 → 1.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/README.md +2 -2
- package/dist/Accordion/Accordion.cjs.js +88 -0
- package/dist/Accordion/Accordion.d.ts +3 -0
- package/dist/Accordion/Accordion.es.js +89 -0
- package/dist/Accordion/AccordionGroup.cjs.js +82 -0
- package/dist/Accordion/AccordionGroup.d.ts +12 -0
- package/dist/Accordion/AccordionGroup.es.js +82 -0
- package/dist/Accordion/AccordionItem.cjs.js +71 -0
- package/dist/Accordion/AccordionItem.d.ts +3 -0
- package/dist/Accordion/AccordionItem.es.js +72 -0
- package/dist/Accordion/helpers.cjs.js +24 -0
- package/dist/Accordion/helpers.d.ts +25 -0
- package/dist/Accordion/helpers.es.js +24 -0
- package/dist/Accordion/index.cjs.js +7 -0
- package/dist/Accordion/index.d.ts +8 -0
- package/dist/Accordion/index.es.js +7 -0
- package/dist/Accordion/styles.cjs.js +97 -0
- package/dist/Accordion/styles.d.ts +23 -0
- package/dist/Accordion/styles.es.js +97 -0
- package/dist/Accordion/types.d.ts +142 -0
- package/dist/Accordion/useAccordionState.cjs.js +34 -0
- package/dist/Accordion/useAccordionState.d.ts +12 -0
- package/dist/Accordion/useAccordionState.es.js +34 -0
- package/dist/Alert/Alert.cjs.js +1 -1
- package/dist/Alert/Alert.es.js +1 -1
- package/dist/Alert/styles.cjs.js +14 -10
- package/dist/Alert/styles.es.js +14 -10
- package/dist/Avatar/styles.cjs.js +16 -11
- package/dist/Avatar/styles.es.js +16 -11
- package/dist/Badge/styles.cjs.js +7 -7
- package/dist/Badge/styles.es.js +7 -7
- package/dist/Breadcrumbs/BreadcrumbItem.cjs.js +6 -6
- package/dist/Breadcrumbs/BreadcrumbItem.es.js +6 -6
- package/dist/Breadcrumbs/Breadcrumbs.cjs.js +2 -3
- package/dist/Breadcrumbs/Breadcrumbs.es.js +2 -3
- package/dist/Breadcrumbs/styles.cjs.js +15 -15
- package/dist/Breadcrumbs/styles.es.js +15 -15
- package/dist/Button/Button.cjs.js +3 -3
- package/dist/Button/Button.es.js +6 -6
- package/dist/Button/index.d.ts +1 -1
- package/dist/Button/styles.cjs.js +49 -54
- package/dist/Button/styles.es.js +50 -55
- package/dist/Button/types.d.ts +2 -3
- package/dist/Calendar/Calendar.cjs.js +200 -0
- package/dist/Calendar/Calendar.d.ts +4 -0
- package/dist/Calendar/Calendar.es.js +201 -0
- package/dist/Calendar/DaysLevel.cjs.js +93 -0
- package/dist/Calendar/DaysLevel.d.ts +3 -0
- package/dist/Calendar/DaysLevel.es.js +94 -0
- package/dist/Calendar/MonthLevel.cjs.js +23 -0
- package/dist/Calendar/MonthLevel.d.ts +3 -0
- package/dist/Calendar/MonthLevel.es.js +24 -0
- package/dist/Calendar/YearsLevel.cjs.js +24 -0
- package/dist/Calendar/YearsLevel.d.ts +3 -0
- package/dist/Calendar/YearsLevel.es.js +25 -0
- package/dist/Calendar/helpers.cjs.js +60 -0
- package/dist/Calendar/helpers.d.ts +9 -0
- package/dist/Calendar/helpers.es.js +60 -0
- package/dist/Calendar/index.d.ts +2 -0
- package/dist/Calendar/styles.cjs.js +116 -0
- package/dist/Calendar/styles.d.ts +16 -0
- package/dist/Calendar/styles.es.js +116 -0
- package/dist/Calendar/types.d.ts +115 -0
- package/dist/Card/Card.cjs.js +4 -2
- package/dist/Card/Card.d.ts +1 -1
- package/dist/Card/Card.es.js +4 -2
- package/dist/Card/styles.cjs.js +2 -2
- package/dist/Card/styles.es.js +2 -2
- package/dist/Card/types.d.ts +2 -0
- package/dist/Checkbox/Checkbox.cjs.js +1 -1
- package/dist/Checkbox/Checkbox.es.js +1 -1
- package/dist/Checkbox/CheckboxGroup.cjs.js +22 -25
- package/dist/Checkbox/CheckboxGroup.es.js +22 -25
- package/dist/Checkbox/styles.cjs.js +24 -23
- package/dist/Checkbox/styles.es.js +24 -23
- package/dist/ColorPicker/ColorPicker.cjs.js +404 -0
- package/dist/ColorPicker/ColorPicker.d.ts +3 -0
- package/dist/ColorPicker/ColorPicker.es.js +405 -0
- package/dist/ColorPicker/InputColor.cjs.js +94 -0
- package/dist/ColorPicker/InputColor.d.ts +3 -0
- package/dist/ColorPicker/InputColor.es.js +95 -0
- package/dist/ColorPicker/InputsColor.cjs.js +177 -0
- package/dist/ColorPicker/InputsColor.d.ts +3 -0
- package/dist/ColorPicker/InputsColor.es.js +178 -0
- package/dist/ColorPicker/helpers.cjs.js +32 -0
- package/dist/ColorPicker/helpers.d.ts +4 -0
- package/dist/ColorPicker/helpers.es.js +32 -0
- package/dist/ColorPicker/index.cjs.js +7 -0
- package/dist/ColorPicker/index.d.ts +8 -0
- package/dist/ColorPicker/index.es.js +7 -0
- package/dist/ColorPicker/styles.cjs.js +234 -0
- package/dist/ColorPicker/styles.d.ts +43 -0
- package/dist/ColorPicker/styles.es.js +234 -0
- package/dist/ColorPicker/types.d.ts +56 -0
- package/dist/Divider/styles.cjs.js +12 -10
- package/dist/Divider/styles.es.js +12 -10
- package/dist/Drawer/Drawer.cjs.js +7 -3
- package/dist/Drawer/Drawer.es.js +5 -1
- package/dist/Drawer/styles.cjs.js +4 -5
- package/dist/Drawer/styles.es.js +4 -5
- package/dist/Dropdown/Dropdown.cjs.js +33 -4
- package/dist/Dropdown/Dropdown.d.ts +2 -2
- package/dist/Dropdown/Dropdown.es.js +32 -3
- package/dist/Dropdown/DropdownItem.cjs.js +4 -5
- package/dist/Dropdown/DropdownItem.es.js +4 -5
- package/dist/Dropdown/DropdownList.cjs.js +3 -2
- package/dist/Dropdown/DropdownList.es.js +6 -5
- package/dist/Dropdown/DropdownPortal.cjs.js +8 -5
- package/dist/Dropdown/DropdownPortal.d.ts +5 -3
- package/dist/Dropdown/DropdownPortal.es.js +9 -6
- package/dist/Dropdown/helpers.cjs.js +1 -1
- package/dist/Dropdown/helpers.es.js +1 -1
- package/dist/Dropdown/styles.cjs.js +28 -27
- package/dist/Dropdown/styles.d.ts +2 -0
- package/dist/Dropdown/styles.es.js +28 -27
- package/dist/EmptyState/EmptyState.cjs.js +51 -0
- package/dist/EmptyState/EmptyState.d.ts +3 -0
- package/dist/EmptyState/EmptyState.es.js +52 -0
- package/dist/EmptyState/index.d.ts +2 -0
- package/dist/EmptyState/types.d.ts +10 -0
- package/dist/Flex/Flex.d.ts +1 -1
- package/dist/Flex/types.d.ts +1 -0
- package/dist/Form/Field.cjs.js +175 -0
- package/dist/Form/Field.d.ts +3 -0
- package/dist/Form/Field.es.js +176 -0
- package/dist/Form/FieldArray.cjs.js +24 -0
- package/dist/Form/FieldArray.d.ts +3 -0
- package/dist/Form/FieldArray.es.js +25 -0
- package/dist/Form/Form.cjs.js +69 -0
- package/dist/Form/Form.d.ts +3 -0
- package/dist/Form/Form.es.js +69 -0
- package/dist/Form/defaultValidateMessages.cjs.js +51 -0
- package/dist/Form/defaultValidateMessages.d.ts +47 -0
- package/dist/Form/defaultValidateMessages.es.js +51 -0
- package/dist/Form/helpers.cjs.js +8 -0
- package/dist/Form/helpers.d.ts +1 -0
- package/dist/Form/helpers.es.js +8 -0
- package/dist/Form/index.cjs.js +13 -0
- package/dist/Form/index.d.ts +14 -0
- package/dist/Form/index.es.js +13 -0
- package/dist/Form/types.d.ts +147 -0
- package/dist/Form/useForm.cjs.js +230 -0
- package/dist/Form/useForm.d.ts +2 -0
- package/dist/Form/useForm.es.js +230 -0
- package/dist/Form/useWatch.cjs.js +14 -0
- package/dist/Form/useWatch.d.ts +3 -0
- package/dist/Form/useWatch.es.js +14 -0
- package/dist/Highlight/Highlight.cjs.js +113 -0
- package/dist/Highlight/Highlight.d.ts +3 -0
- package/dist/Highlight/Highlight.es.js +114 -0
- package/dist/Highlight/helpers.cjs.js +147 -0
- package/dist/Highlight/helpers.d.ts +27 -0
- package/dist/Highlight/helpers.es.js +147 -0
- package/dist/Highlight/index.d.ts +2 -0
- package/dist/Highlight/styles.cjs.js +11 -0
- package/dist/Highlight/styles.d.ts +4 -0
- package/dist/Highlight/styles.es.js +11 -0
- package/dist/Highlight/types.d.ts +53 -0
- package/dist/Image/styles.cjs.js +4 -5
- package/dist/Image/styles.es.js +4 -5
- package/dist/InputBase/InputBase.cjs.js +32 -0
- package/dist/InputBase/InputBase.d.ts +4 -0
- package/dist/InputBase/InputBase.es.js +33 -0
- package/dist/InputBase/index.d.ts +2 -0
- package/dist/InputBase/styles.cjs.js +61 -0
- package/dist/InputBase/styles.d.ts +7 -0
- package/dist/InputBase/styles.es.js +61 -0
- package/dist/InputBase/types.d.ts +25 -0
- package/dist/InputDate/InputDate.cjs.js +344 -0
- package/dist/InputDate/InputDate.d.ts +4 -0
- package/dist/InputDate/InputDate.es.js +345 -0
- package/dist/InputDate/helpers.cjs.js +78 -0
- package/dist/InputDate/helpers.d.ts +5 -0
- package/dist/InputDate/helpers.es.js +78 -0
- package/dist/InputDate/index.d.ts +2 -0
- package/dist/InputDate/styles.cjs.js +35 -0
- package/dist/InputDate/styles.d.ts +5 -0
- package/dist/InputDate/styles.es.js +35 -0
- package/dist/InputDate/types.d.ts +23 -0
- package/dist/InputNumber/InputNumber.cjs.js +70 -73
- package/dist/InputNumber/InputNumber.d.ts +1 -1
- package/dist/InputNumber/InputNumber.es.js +72 -75
- package/dist/InputNumber/styles.cjs.js +20 -60
- package/dist/InputNumber/styles.d.ts +4 -8
- package/dist/InputNumber/styles.es.js +21 -61
- package/dist/InputNumber/types.d.ts +2 -18
- package/dist/Layout/Header.cjs.js +27 -23
- package/dist/Layout/Header.d.ts +1 -1
- package/dist/Layout/Header.es.js +28 -24
- package/dist/Layout/Sidebar.cjs.js +24 -25
- package/dist/Layout/Sidebar.d.ts +1 -1
- package/dist/Layout/Sidebar.es.js +25 -26
- package/dist/Layout/index.d.ts +2 -2
- package/dist/Layout/styles.cjs.js +16 -52
- package/dist/Layout/styles.d.ts +2 -15
- package/dist/Layout/styles.es.js +16 -52
- package/dist/Layout/types.d.ts +7 -22
- package/dist/Loader/styles.cjs.js +5 -4
- package/dist/Loader/styles.es.js +5 -4
- package/dist/LoadingOverlay/LoadingOverlay.cjs.js +22 -0
- package/dist/LoadingOverlay/LoadingOverlay.d.ts +3 -0
- package/dist/LoadingOverlay/LoadingOverlay.es.js +23 -0
- package/dist/LoadingOverlay/index.d.ts +2 -0
- package/dist/LoadingOverlay/styles.cjs.js +28 -0
- package/dist/LoadingOverlay/styles.d.ts +5 -0
- package/dist/LoadingOverlay/styles.es.js +28 -0
- package/dist/LoadingOverlay/types.d.ts +16 -0
- package/dist/Menu/Menu.cjs.js +42 -0
- package/dist/Menu/Menu.d.ts +3 -0
- package/dist/Menu/Menu.es.js +43 -0
- package/dist/Menu/MenuItem.cjs.js +112 -0
- package/dist/Menu/MenuItem.d.ts +3 -0
- package/dist/Menu/MenuItem.es.js +113 -0
- package/dist/Menu/helpers.cjs.js +20 -0
- package/dist/Menu/helpers.d.ts +17 -0
- package/dist/Menu/helpers.es.js +20 -0
- package/dist/Menu/index.d.ts +2 -0
- package/dist/Menu/styles.cjs.js +98 -0
- package/dist/Menu/styles.d.ts +16 -0
- package/dist/Menu/styles.es.js +98 -0
- package/dist/Menu/types.d.ts +85 -0
- package/dist/Modal/Modal.cjs.js +17 -7
- package/dist/Modal/Modal.d.ts +1 -1
- package/dist/Modal/Modal.es.js +16 -6
- package/dist/Modal/styles.cjs.js +39 -9
- package/dist/Modal/styles.d.ts +4 -0
- package/dist/Modal/styles.es.js +40 -10
- package/dist/Modal/types.d.ts +2 -0
- package/dist/Notification/Notification.cjs.js +3 -3
- package/dist/Notification/Notification.es.js +3 -3
- package/dist/Notification/NotificationInstance.cjs.js +10 -17
- package/dist/Notification/NotificationInstance.es.js +8 -15
- package/dist/Notification/NotificationsStore.cjs.js +2 -7
- package/dist/Notification/NotificationsStore.es.js +2 -7
- package/dist/Notification/styles.cjs.js +6 -6
- package/dist/Notification/styles.es.js +6 -6
- package/dist/Pagination/Pagination.cjs.js +114 -0
- package/dist/Pagination/Pagination.d.ts +3 -0
- package/dist/Pagination/Pagination.es.js +115 -0
- package/dist/Pagination/index.d.ts +2 -0
- package/dist/Pagination/styles.cjs.js +54 -0
- package/dist/Pagination/styles.d.ts +2 -0
- package/dist/Pagination/styles.es.js +54 -0
- package/dist/Pagination/types.d.ts +49 -0
- package/dist/Progress/Progress.cjs.js +1 -1
- package/dist/Progress/Progress.es.js +1 -1
- package/dist/Progress/styles.cjs.js +5 -50
- package/dist/Progress/styles.es.js +5 -50
- package/dist/Progress/types.d.ts +1 -0
- package/dist/RadioButton/RadioButton.cjs.js +1 -1
- package/dist/RadioButton/RadioButton.es.js +1 -1
- package/dist/RadioButton/RadioButtonGroup.cjs.js +19 -22
- package/dist/RadioButton/RadioButtonGroup.es.js +19 -22
- package/dist/RadioButton/styles.cjs.js +11 -13
- package/dist/RadioButton/styles.es.js +11 -13
- package/dist/RichTextEditor/RichTextEditor.cjs.js +289 -0
- package/dist/RichTextEditor/RichTextEditor.d.ts +4 -0
- package/dist/RichTextEditor/RichTextEditor.es.js +290 -0
- package/dist/RichTextEditor/RichTextEditorColorControl.cjs.js +38 -0
- package/dist/RichTextEditor/RichTextEditorColorControl.d.ts +3 -0
- package/dist/RichTextEditor/RichTextEditorColorControl.es.js +39 -0
- package/dist/RichTextEditor/RichTextEditorTableControl.cjs.js +62 -0
- package/dist/RichTextEditor/RichTextEditorTableControl.d.ts +3 -0
- package/dist/RichTextEditor/RichTextEditorTableControl.es.js +63 -0
- package/dist/RichTextEditor/helpers.cjs.js +151 -0
- package/dist/RichTextEditor/helpers.d.ts +10 -0
- package/dist/RichTextEditor/helpers.es.js +151 -0
- package/dist/RichTextEditor/index.d.ts +2 -0
- package/dist/RichTextEditor/plugins.cjs.js +571 -0
- package/dist/RichTextEditor/plugins.d.ts +2 -0
- package/dist/RichTextEditor/plugins.es.js +571 -0
- package/dist/RichTextEditor/styles.cjs.js +60 -0
- package/dist/RichTextEditor/styles.d.ts +7 -0
- package/dist/RichTextEditor/styles.es.js +60 -0
- package/dist/RichTextEditor/types.d.ts +79 -0
- package/dist/Select/Select.cjs.js +30 -18
- package/dist/Select/Select.es.js +30 -18
- package/dist/Select/helpers.cjs.js +1 -1
- package/dist/Select/helpers.d.ts +24 -24
- package/dist/Select/helpers.es.js +1 -1
- package/dist/Select/styles.cjs.js +91 -118
- package/dist/Select/styles.d.ts +4 -5
- package/dist/Select/styles.es.js +91 -118
- package/dist/Select/types.d.ts +3 -23
- package/dist/Select/useSelect.cjs.js +8 -14
- package/dist/Select/useSelect.d.ts +20 -20
- package/dist/Select/useSelect.es.js +8 -14
- package/dist/Skeleton/Skeleton.cjs.js +35 -0
- package/dist/Skeleton/Skeleton.d.ts +3 -0
- package/dist/Skeleton/Skeleton.es.js +36 -0
- package/dist/Skeleton/SkeletonAvatar.cjs.js +17 -0
- package/dist/Skeleton/SkeletonAvatar.d.ts +3 -0
- package/dist/Skeleton/SkeletonAvatar.es.js +18 -0
- package/dist/Skeleton/SkeletonButton.cjs.js +21 -0
- package/dist/Skeleton/SkeletonButton.d.ts +3 -0
- package/dist/Skeleton/SkeletonButton.es.js +22 -0
- package/dist/Skeleton/SkeletonCard.cjs.js +15 -0
- package/dist/Skeleton/SkeletonCard.d.ts +3 -0
- package/dist/Skeleton/SkeletonCard.es.js +16 -0
- package/dist/Skeleton/SkeletonLayout.cjs.js +60 -0
- package/dist/Skeleton/SkeletonLayout.d.ts +3 -0
- package/dist/Skeleton/SkeletonLayout.es.js +61 -0
- package/dist/Skeleton/SkeletonList.cjs.js +39 -0
- package/dist/Skeleton/SkeletonList.d.ts +3 -0
- package/dist/Skeleton/SkeletonList.es.js +40 -0
- package/dist/Skeleton/SkeletonTextBlock.cjs.js +7 -0
- package/dist/Skeleton/SkeletonTextBlock.d.ts +5 -0
- package/dist/Skeleton/SkeletonTextBlock.es.js +8 -0
- package/dist/Skeleton/index.cjs.js +17 -0
- package/dist/Skeleton/index.d.ts +18 -0
- package/dist/Skeleton/index.es.js +17 -0
- package/dist/Skeleton/styles.cjs.js +59 -0
- package/dist/Skeleton/styles.d.ts +3 -0
- package/dist/Skeleton/styles.es.js +59 -0
- package/dist/Skeleton/types.d.ts +74 -0
- package/dist/Slider/Slider.cjs.js +282 -0
- package/dist/Slider/Slider.d.ts +3 -0
- package/dist/Slider/Slider.es.js +283 -0
- package/dist/Slider/index.d.ts +2 -0
- package/dist/Slider/styles.cjs.js +156 -0
- package/dist/Slider/styles.d.ts +35 -0
- package/dist/Slider/styles.es.js +156 -0
- package/dist/Slider/types.d.ts +53 -0
- package/dist/Spoiler/Spoiler.cjs.js +62 -0
- package/dist/Spoiler/Spoiler.d.ts +3 -0
- package/dist/Spoiler/Spoiler.es.js +63 -0
- package/dist/Spoiler/index.d.ts +2 -0
- package/dist/Spoiler/styles.cjs.js +15 -0
- package/dist/Spoiler/styles.d.ts +4 -0
- package/dist/Spoiler/styles.es.js +15 -0
- package/dist/Spoiler/types.d.ts +23 -0
- package/dist/Switch/Switch.cjs.js +32 -6
- package/dist/Switch/Switch.d.ts +2 -2
- package/dist/Switch/Switch.es.js +33 -7
- package/dist/Switch/styles.cjs.js +24 -7
- package/dist/Switch/styles.d.ts +4 -0
- package/dist/Switch/styles.es.js +24 -7
- package/dist/Switch/types.d.ts +3 -0
- package/dist/Tabs/Tab.cjs.js +8 -8
- package/dist/Tabs/Tab.es.js +8 -8
- package/dist/Tabs/TabPanel.cjs.js +3 -3
- package/dist/Tabs/TabPanel.es.js +3 -3
- package/dist/Tabs/Tabs.cjs.js +5 -4
- package/dist/Tabs/Tabs.d.ts +1 -1
- package/dist/Tabs/Tabs.es.js +5 -4
- package/dist/Tabs/TabsList.cjs.js +25 -1
- package/dist/Tabs/TabsList.d.ts +2 -2
- package/dist/Tabs/TabsList.es.js +25 -1
- package/dist/Tabs/styles.cjs.js +104 -34
- package/dist/Tabs/styles.d.ts +2 -0
- package/dist/Tabs/styles.es.js +104 -34
- package/dist/Tabs/types.d.ts +7 -3
- package/dist/Tag/Tag.cjs.js +4 -1
- package/dist/Tag/Tag.d.ts +1 -1
- package/dist/Tag/Tag.es.js +4 -1
- package/dist/Tag/styles.cjs.js +14 -9
- package/dist/Tag/styles.d.ts +2 -0
- package/dist/Tag/styles.es.js +14 -9
- package/dist/Tag/types.d.ts +6 -0
- package/dist/TextField/TextField.cjs.js +57 -56
- package/dist/TextField/TextField.d.ts +1 -1
- package/dist/TextField/TextField.es.js +58 -57
- package/dist/TextField/styles.cjs.js +9 -50
- package/dist/TextField/styles.d.ts +3 -8
- package/dist/TextField/styles.es.js +10 -51
- package/dist/TextField/types.d.ts +2 -20
- package/dist/Textarea/Textarea.cjs.js +57 -56
- package/dist/Textarea/Textarea.d.ts +1 -1
- package/dist/Textarea/Textarea.es.js +58 -57
- package/dist/Textarea/styles.cjs.js +10 -62
- package/dist/Textarea/styles.d.ts +3 -8
- package/dist/Textarea/styles.es.js +12 -64
- package/dist/Textarea/types.d.ts +2 -21
- package/dist/Tooltip/Tooltip.cjs.js +3 -1
- package/dist/Tooltip/Tooltip.d.ts +1 -1
- package/dist/Tooltip/Tooltip.es.js +3 -1
- package/dist/Tooltip/types.d.ts +3 -0
- package/dist/_virtual/client.cjs.js +5 -0
- package/dist/_virtual/client.cjs2.js +4 -0
- package/dist/_virtual/client.es.js +5 -0
- package/dist/_virtual/client.es2.js +4 -0
- package/dist/_virtual/index.cjs.js +4 -0
- package/dist/_virtual/index.es.js +4 -0
- package/dist/_virtual/react-dom-client.development.cjs.js +4 -0
- package/dist/_virtual/react-dom-client.development.es.js +4 -0
- package/dist/_virtual/react-dom-client.production.cjs.js +4 -0
- package/dist/_virtual/react-dom-client.production.es.js +4 -0
- package/dist/_virtual/scheduler.development.cjs.js +4 -0
- package/dist/_virtual/scheduler.development.es.js +4 -0
- package/dist/_virtual/scheduler.production.cjs.js +4 -0
- package/dist/_virtual/scheduler.production.es.js +4 -0
- package/dist/assets/box.svg.cjs.js +21 -0
- package/dist/assets/box.svg.es.js +5 -0
- package/dist/index.d.ts +1 -50
- package/dist/message/Message.cjs.js +42 -0
- package/dist/message/Message.d.ts +3 -0
- package/dist/message/Message.es.js +43 -0
- package/dist/message/MessageContext.cjs.js +101 -0
- package/dist/message/MessageContext.d.ts +4 -0
- package/dist/message/MessageContext.es.js +101 -0
- package/dist/message/index.cjs.js +8 -0
- package/dist/message/index.d.ts +6 -0
- package/dist/message/index.es.js +8 -0
- package/dist/message/styles.cjs.js +79 -0
- package/dist/message/styles.d.ts +11 -0
- package/dist/message/styles.es.js +79 -0
- package/dist/message/types.d.ts +42 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/createReactComponent.cjs.js +30 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/createReactComponent.es.js +31 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.cjs.js +23 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.es.js +24 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconAlignCenter.cjs.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconAlignCenter.es.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconAlignJustified.cjs.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconAlignJustified.es.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconAlignLeft.cjs.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconAlignLeft.es.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconAlignRight.cjs.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconAlignRight.es.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowBackUp.cjs.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowBackUp.es.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowForwardUp.cjs.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowForwardUp.es.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBlockquote.cjs.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBlockquote.es.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBold.cjs.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBold.es.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCheckbox.cjs.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCheckbox.es.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconClearFormatting.cjs.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconClearFormatting.es.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconH1.cjs.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconH1.es.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconH2.cjs.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconH2.es.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconHighlight.cjs.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconHighlight.es.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconImageInPicture.cjs.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconImageInPicture.es.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconItalic.cjs.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconItalic.es.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.cjs.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.es.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconList.cjs.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconList.es.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconListNumbers.cjs.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconListNumbers.es.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconStrikethrough.cjs.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconStrikethrough.es.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSubscript.cjs.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSubscript.es.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSuperscript.cjs.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSuperscript.es.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTable.cjs.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTable.es.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTextColor.cjs.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTextColor.es.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUnderline.cjs.js +7 -0
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUnderline.es.js +7 -0
- package/dist/node_modules/react-dom/cjs/react-dom-client.development.cjs.js +19870 -0
- package/dist/node_modules/react-dom/cjs/react-dom-client.development.es.js +19870 -0
- package/dist/node_modules/react-dom/cjs/react-dom-client.production.cjs.js +11524 -0
- package/dist/node_modules/react-dom/cjs/react-dom-client.production.es.js +11524 -0
- package/dist/node_modules/react-dom/client.cjs.js +31 -0
- package/dist/node_modules/react-dom/client.es.js +31 -0
- package/dist/node_modules/scheduler/cjs/scheduler.development.cjs.js +264 -0
- package/dist/node_modules/scheduler/cjs/scheduler.development.es.js +264 -0
- package/dist/node_modules/scheduler/cjs/scheduler.production.cjs.js +259 -0
- package/dist/node_modules/scheduler/cjs/scheduler.production.es.js +259 -0
- package/dist/node_modules/scheduler/index.cjs.js +17 -0
- package/dist/node_modules/scheduler/index.es.js +17 -0
- package/dist/packages/components/index.cjs.js +93 -0
- package/dist/packages/components/index.es.js +93 -0
- package/dist/typography/Text/Text.es.js +3 -3
- package/dist/typography/Title/Title.cjs.js +2 -0
- package/dist/typography/Title/Title.d.ts +1 -1
- package/dist/typography/Title/Title.es.js +2 -0
- package/dist/typography/Title/styles.cjs.js +3 -0
- package/dist/typography/Title/styles.es.js +3 -0
- package/dist/typography/Title/types.d.ts +1 -0
- package/package.json +16 -13
- package/dist/index.cjs.js +0 -63
- package/dist/index.es.js +0 -63
package/dist/Modal/Modal.es.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useEffect, useState } from "react";
|
|
3
3
|
import { createPortal } from "react-dom";
|
|
4
4
|
import { useTransitionState } from "react-transition-state";
|
|
5
|
-
import { ModalContainer, ModalStyled, ModalHeaderStyled, ModalFooterStyled } from "./styles.es.js";
|
|
5
|
+
import { ModalContainer, ModalStyled, ModalHeaderStyled, ModalContentStyled, ModalFooterStyled } from "./styles.es.js";
|
|
6
6
|
import Title from "../typography/Title/Title.es.js";
|
|
7
7
|
import Text from "../typography/Text/Text.es.js";
|
|
8
8
|
import Button from "../Button/Button.es.js";
|
|
@@ -21,8 +21,10 @@ const Modal = ({
|
|
|
21
21
|
fullScreen,
|
|
22
22
|
classNameFooter,
|
|
23
23
|
className,
|
|
24
|
+
width,
|
|
24
25
|
...props
|
|
25
26
|
}) => {
|
|
27
|
+
console.log(open);
|
|
26
28
|
const [state, toggle] = useTransitionState({
|
|
27
29
|
timeout: 500,
|
|
28
30
|
unmountOnExit: true,
|
|
@@ -34,7 +36,7 @@ const Modal = ({
|
|
|
34
36
|
const [container, setContainer] = useState(null);
|
|
35
37
|
const handleEscapeDown = (event) => {
|
|
36
38
|
if (event.key === "Escape") {
|
|
37
|
-
onEsc
|
|
39
|
+
onEsc?.();
|
|
38
40
|
}
|
|
39
41
|
};
|
|
40
42
|
useEffect(() => {
|
|
@@ -44,18 +46,26 @@ const Modal = ({
|
|
|
44
46
|
}
|
|
45
47
|
setContainer(container2);
|
|
46
48
|
return () => {
|
|
47
|
-
container2
|
|
49
|
+
container2?.removeEventListener("keydown", handleEscapeDown);
|
|
48
50
|
};
|
|
49
51
|
}, []);
|
|
52
|
+
useEffect(() => {
|
|
53
|
+
if (state.isEnter) {
|
|
54
|
+
document.body.style.overflow = "hidden";
|
|
55
|
+
}
|
|
56
|
+
return () => {
|
|
57
|
+
document.body.style.overflow = "unset";
|
|
58
|
+
};
|
|
59
|
+
}, [state]);
|
|
50
60
|
if (state.isEnter && container) {
|
|
51
61
|
return createPortal(
|
|
52
|
-
/* @__PURE__ */ jsx(ModalContainer, { status: state.status, zIndex, ...props, children: /* @__PURE__ */ jsxs(ModalStyled, { fullScreen, className, size, children: [
|
|
62
|
+
/* @__PURE__ */ jsx(ModalContainer, { status: state.status, zIndex, ...props, children: /* @__PURE__ */ jsxs(ModalStyled, { fullScreen, className, size, width, children: [
|
|
53
63
|
/* @__PURE__ */ jsxs(ModalHeaderStyled, { children: [
|
|
54
64
|
title && /* @__PURE__ */ jsx(Title, { size, children: title }),
|
|
55
|
-
closeButton && /* @__PURE__ */ jsx(Button, { view: "icon", size, onClick: onClickClose, children: /* @__PURE__ */ jsx(SvgIconClose, { width: 16, height: 16 }) })
|
|
65
|
+
closeButton && /* @__PURE__ */ jsx(Button, { view: "icon", size, onClick: onClickClose, "aria-label": "Close", children: /* @__PURE__ */ jsx(SvgIconClose, { width: 16, height: 16 }) })
|
|
56
66
|
] }),
|
|
57
67
|
description && /* @__PURE__ */ jsx(Text, { size, children: description }),
|
|
58
|
-
children,
|
|
68
|
+
/* @__PURE__ */ jsx(ModalContentStyled, { scrollable: !fullScreen, children }),
|
|
59
69
|
footer && /* @__PURE__ */ jsx(ModalFooterStyled, { className: classNameFooter, children: footer })
|
|
60
70
|
] }) }),
|
|
61
71
|
container
|
package/dist/Modal/styles.cjs.js
CHANGED
|
@@ -9,30 +9,59 @@ const ModalContainer = styled.div.withConfig({
|
|
|
9
9
|
opacity: 0;
|
|
10
10
|
transform: scale(0.9);
|
|
11
11
|
`};
|
|
12
|
-
position:
|
|
12
|
+
position: fixed;
|
|
13
13
|
opacity: 1;
|
|
14
|
-
width:
|
|
15
|
-
height:
|
|
16
|
-
background: ${({ theme }) =>
|
|
14
|
+
width: 100vw;
|
|
15
|
+
height: 100vh;
|
|
16
|
+
background: ${({ theme }) => theme.components.Modal.overlayBackground};
|
|
17
17
|
display: flex;
|
|
18
18
|
align-items: center;
|
|
19
19
|
justify-content: center;
|
|
20
20
|
top: 0;
|
|
21
21
|
left: 0;
|
|
22
22
|
z-index: ${({ zIndex }) => zIndex};
|
|
23
|
+
overflow-y: auto;
|
|
24
|
+
padding: 20px;
|
|
25
|
+
@media (max-width: 480px) {
|
|
26
|
+
padding: 0;
|
|
27
|
+
}
|
|
23
28
|
`;
|
|
24
29
|
const ModalStyled = styled.div.withConfig({
|
|
25
|
-
shouldForwardProp: (props) => !["fullScreen", "size"].includes(props)
|
|
30
|
+
shouldForwardProp: (props) => !["fullScreen", "size", "width"].includes(props)
|
|
26
31
|
})`
|
|
27
32
|
display: flex;
|
|
28
33
|
flex-direction: column;
|
|
29
34
|
gap: 2rem;
|
|
30
35
|
padding: ${({ theme, size }) => polished.math(`${theme.space[size]} * 2`)};
|
|
31
|
-
background-color: ${({ theme }) => theme.
|
|
36
|
+
background-color: ${({ theme }) => theme.components.Modal.backgroundColor};
|
|
32
37
|
border-radius: 0.5rem;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
38
|
+
max-height: calc(100vh - 40px);
|
|
39
|
+
${({ fullScreen, width }) => fullScreen ? styled.css`
|
|
40
|
+
width: 100%;
|
|
41
|
+
height: 100%;
|
|
42
|
+
max-height: 100vh;
|
|
43
|
+
` : styled.css`
|
|
44
|
+
max-width: 90vw;
|
|
45
|
+
width: ${width}px;
|
|
46
|
+
margin: auto;
|
|
47
|
+
|
|
48
|
+
@media (max-width: 768px) {
|
|
49
|
+
width: 90vw;
|
|
50
|
+
max-height: 90vh;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@media (max-width: 480px) {
|
|
54
|
+
width: 100vw;
|
|
55
|
+
max-height: 100vh;
|
|
56
|
+
border-radius: 0;
|
|
57
|
+
margin: 0;
|
|
58
|
+
}
|
|
59
|
+
`};
|
|
60
|
+
`;
|
|
61
|
+
const ModalContentStyled = styled.div`
|
|
62
|
+
${({ scrollable }) => scrollable && styled.css`
|
|
63
|
+
overflow-y: auto;
|
|
64
|
+
max-height: 60vh;
|
|
36
65
|
`};
|
|
37
66
|
`;
|
|
38
67
|
const ModalHeaderStyled = styled.div`
|
|
@@ -47,6 +76,7 @@ const ModalFooterStyled = styled.div`
|
|
|
47
76
|
gap: 1rem;
|
|
48
77
|
`;
|
|
49
78
|
exports.ModalContainer = ModalContainer;
|
|
79
|
+
exports.ModalContentStyled = ModalContentStyled;
|
|
50
80
|
exports.ModalFooterStyled = ModalFooterStyled;
|
|
51
81
|
exports.ModalHeaderStyled = ModalHeaderStyled;
|
|
52
82
|
exports.ModalStyled = ModalStyled;
|
package/dist/Modal/styles.d.ts
CHANGED
|
@@ -8,6 +8,10 @@ export declare const ModalContainer: import('styled-components/dist/types').ISty
|
|
|
8
8
|
export declare const ModalStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
9
9
|
fullScreen?: boolean;
|
|
10
10
|
size: TQuenSize;
|
|
11
|
+
width?: number;
|
|
12
|
+
}>> & string;
|
|
13
|
+
export declare const ModalContentStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
14
|
+
scrollable?: boolean;
|
|
11
15
|
}>> & string;
|
|
12
16
|
export declare const ModalHeaderStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
13
17
|
export declare const ModalFooterStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
package/dist/Modal/styles.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
|
-
import {
|
|
2
|
+
import { math } from "polished";
|
|
3
3
|
const ModalContainer = styled.div.withConfig({
|
|
4
4
|
shouldForwardProp: (prop) => !["status", "zIndex"].includes(prop)
|
|
5
5
|
})`
|
|
@@ -7,30 +7,59 @@ const ModalContainer = styled.div.withConfig({
|
|
|
7
7
|
opacity: 0;
|
|
8
8
|
transform: scale(0.9);
|
|
9
9
|
`};
|
|
10
|
-
position:
|
|
10
|
+
position: fixed;
|
|
11
11
|
opacity: 1;
|
|
12
|
-
width:
|
|
13
|
-
height:
|
|
14
|
-
background: ${({ theme }) =>
|
|
12
|
+
width: 100vw;
|
|
13
|
+
height: 100vh;
|
|
14
|
+
background: ${({ theme }) => theme.components.Modal.overlayBackground};
|
|
15
15
|
display: flex;
|
|
16
16
|
align-items: center;
|
|
17
17
|
justify-content: center;
|
|
18
18
|
top: 0;
|
|
19
19
|
left: 0;
|
|
20
20
|
z-index: ${({ zIndex }) => zIndex};
|
|
21
|
+
overflow-y: auto;
|
|
22
|
+
padding: 20px;
|
|
23
|
+
@media (max-width: 480px) {
|
|
24
|
+
padding: 0;
|
|
25
|
+
}
|
|
21
26
|
`;
|
|
22
27
|
const ModalStyled = styled.div.withConfig({
|
|
23
|
-
shouldForwardProp: (props) => !["fullScreen", "size"].includes(props)
|
|
28
|
+
shouldForwardProp: (props) => !["fullScreen", "size", "width"].includes(props)
|
|
24
29
|
})`
|
|
25
30
|
display: flex;
|
|
26
31
|
flex-direction: column;
|
|
27
32
|
gap: 2rem;
|
|
28
33
|
padding: ${({ theme, size }) => math(`${theme.space[size]} * 2`)};
|
|
29
|
-
background-color: ${({ theme }) => theme.
|
|
34
|
+
background-color: ${({ theme }) => theme.components.Modal.backgroundColor};
|
|
30
35
|
border-radius: 0.5rem;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
36
|
+
max-height: calc(100vh - 40px);
|
|
37
|
+
${({ fullScreen, width }) => fullScreen ? css`
|
|
38
|
+
width: 100%;
|
|
39
|
+
height: 100%;
|
|
40
|
+
max-height: 100vh;
|
|
41
|
+
` : css`
|
|
42
|
+
max-width: 90vw;
|
|
43
|
+
width: ${width}px;
|
|
44
|
+
margin: auto;
|
|
45
|
+
|
|
46
|
+
@media (max-width: 768px) {
|
|
47
|
+
width: 90vw;
|
|
48
|
+
max-height: 90vh;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@media (max-width: 480px) {
|
|
52
|
+
width: 100vw;
|
|
53
|
+
max-height: 100vh;
|
|
54
|
+
border-radius: 0;
|
|
55
|
+
margin: 0;
|
|
56
|
+
}
|
|
57
|
+
`};
|
|
58
|
+
`;
|
|
59
|
+
const ModalContentStyled = styled.div`
|
|
60
|
+
${({ scrollable }) => scrollable && css`
|
|
61
|
+
overflow-y: auto;
|
|
62
|
+
max-height: 60vh;
|
|
34
63
|
`};
|
|
35
64
|
`;
|
|
36
65
|
const ModalHeaderStyled = styled.div`
|
|
@@ -46,6 +75,7 @@ const ModalFooterStyled = styled.div`
|
|
|
46
75
|
`;
|
|
47
76
|
export {
|
|
48
77
|
ModalContainer,
|
|
78
|
+
ModalContentStyled,
|
|
49
79
|
ModalFooterStyled,
|
|
50
80
|
ModalHeaderStyled,
|
|
51
81
|
ModalStyled
|
package/dist/Modal/types.d.ts
CHANGED
|
@@ -47,12 +47,12 @@ const Notification = ({
|
|
|
47
47
|
const handleAutoClose = () => {
|
|
48
48
|
if (typeof autoClose === "number") {
|
|
49
49
|
autoCloseTimeout.current = window.setTimeout(
|
|
50
|
-
() => onClose
|
|
50
|
+
() => onClose?.({}),
|
|
51
51
|
autoClose
|
|
52
52
|
);
|
|
53
53
|
}
|
|
54
54
|
if (autoClose) {
|
|
55
|
-
autoCloseTimeout.current = window.setTimeout(() => onClose
|
|
55
|
+
autoCloseTimeout.current = window.setTimeout(() => onClose?.({}), 5e3);
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
58
|
React.useEffect(() => {
|
|
@@ -65,7 +65,7 @@ const Notification = ({
|
|
|
65
65
|
IconComponent,
|
|
66
66
|
title ? /* @__PURE__ */ jsxRuntime.jsx(Title, { size: "xs", children: title }) : /* @__PURE__ */ jsxRuntime.jsx(Text, { size: "s", children: message })
|
|
67
67
|
] }),
|
|
68
|
-
closeButton && /* @__PURE__ */ jsxRuntime.jsx(Button, { view: "icon", size: "s", onClick: () => onClose
|
|
68
|
+
closeButton && /* @__PURE__ */ jsxRuntime.jsx(Button, { view: "icon", size: "s", onClick: () => onClose?.({}), children: /* @__PURE__ */ jsxRuntime.jsx(iconClose, { width: 16 }) })
|
|
69
69
|
] }),
|
|
70
70
|
title && /* @__PURE__ */ jsxRuntime.jsx(Text, { size: "s", type: "secondary", children: message })
|
|
71
71
|
] });
|
|
@@ -46,12 +46,12 @@ const Notification = ({
|
|
|
46
46
|
const handleAutoClose = () => {
|
|
47
47
|
if (typeof autoClose === "number") {
|
|
48
48
|
autoCloseTimeout.current = window.setTimeout(
|
|
49
|
-
() => onClose
|
|
49
|
+
() => onClose?.({}),
|
|
50
50
|
autoClose
|
|
51
51
|
);
|
|
52
52
|
}
|
|
53
53
|
if (autoClose) {
|
|
54
|
-
autoCloseTimeout.current = window.setTimeout(() => onClose
|
|
54
|
+
autoCloseTimeout.current = window.setTimeout(() => onClose?.({}), 5e3);
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
useEffect(() => {
|
|
@@ -64,7 +64,7 @@ const Notification = ({
|
|
|
64
64
|
IconComponent,
|
|
65
65
|
title ? /* @__PURE__ */ jsx(Title, { size: "xs", children: title }) : /* @__PURE__ */ jsx(Text, { size: "s", children: message })
|
|
66
66
|
] }),
|
|
67
|
-
closeButton && /* @__PURE__ */ jsx(Button, { view: "icon", size: "s", onClick: () => onClose
|
|
67
|
+
closeButton && /* @__PURE__ */ jsx(Button, { view: "icon", size: "s", onClick: () => onClose?.({}), children: /* @__PURE__ */ jsx(SvgIconClose, { width: 16 }) })
|
|
68
68
|
] }),
|
|
69
69
|
title && /* @__PURE__ */ jsx(Text, { size: "s", type: "secondary", children: message })
|
|
70
70
|
] });
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const React = require("react");
|
|
5
|
-
const
|
|
5
|
+
const require$$2 = require("react-dom");
|
|
6
6
|
const helpers = require("@quen-ui/helpers");
|
|
7
7
|
const NotificationsStore = require("./NotificationsStore.cjs.js");
|
|
8
8
|
const styles = require("./styles.cjs.js");
|
|
@@ -65,14 +65,14 @@ const NotificationInstance = () => {
|
|
|
65
65
|
NotificationsStore.subscribe(updateNotifications);
|
|
66
66
|
return () => {
|
|
67
67
|
NotificationsStore.unsubscribe(updateNotifications);
|
|
68
|
-
element
|
|
68
|
+
element?.remove();
|
|
69
69
|
};
|
|
70
70
|
}, []);
|
|
71
71
|
const updateNotifications = () => {
|
|
72
72
|
setNotifications([...NotificationsStore.data]);
|
|
73
73
|
};
|
|
74
74
|
if (element) {
|
|
75
|
-
return
|
|
75
|
+
return require$$2.createPortal(
|
|
76
76
|
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
77
77
|
topNotifications.length ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
78
78
|
styles.NotificationsWrapper,
|
|
@@ -85,9 +85,8 @@ const NotificationInstance = () => {
|
|
|
85
85
|
...notification,
|
|
86
86
|
key: notification.id,
|
|
87
87
|
onClose: () => {
|
|
88
|
-
var _a;
|
|
89
88
|
hideNotification(notification.id);
|
|
90
|
-
|
|
89
|
+
notification.onClose?.(notification);
|
|
91
90
|
}
|
|
92
91
|
}
|
|
93
92
|
)) })
|
|
@@ -104,9 +103,8 @@ const NotificationInstance = () => {
|
|
|
104
103
|
...notification,
|
|
105
104
|
key: notification.id,
|
|
106
105
|
onClose: () => {
|
|
107
|
-
var _a;
|
|
108
106
|
hideNotification(notification.id);
|
|
109
|
-
|
|
107
|
+
notification.onClose?.(notification);
|
|
110
108
|
}
|
|
111
109
|
}
|
|
112
110
|
))
|
|
@@ -123,9 +121,8 @@ const NotificationInstance = () => {
|
|
|
123
121
|
...notification,
|
|
124
122
|
key: notification.id,
|
|
125
123
|
onClose: () => {
|
|
126
|
-
var _a;
|
|
127
124
|
hideNotification(notification.id);
|
|
128
|
-
|
|
125
|
+
notification.onClose?.(notification);
|
|
129
126
|
}
|
|
130
127
|
}
|
|
131
128
|
))
|
|
@@ -142,9 +139,8 @@ const NotificationInstance = () => {
|
|
|
142
139
|
...notification,
|
|
143
140
|
key: notification.id,
|
|
144
141
|
onClose: () => {
|
|
145
|
-
var _a;
|
|
146
142
|
hideNotification(notification.id);
|
|
147
|
-
|
|
143
|
+
notification.onClose?.(notification);
|
|
148
144
|
}
|
|
149
145
|
}
|
|
150
146
|
))
|
|
@@ -161,9 +157,8 @@ const NotificationInstance = () => {
|
|
|
161
157
|
...notification,
|
|
162
158
|
key: notification.id,
|
|
163
159
|
onClose: () => {
|
|
164
|
-
var _a;
|
|
165
160
|
hideNotification(notification.id);
|
|
166
|
-
|
|
161
|
+
notification.onClose?.(notification);
|
|
167
162
|
}
|
|
168
163
|
}
|
|
169
164
|
))
|
|
@@ -180,9 +175,8 @@ const NotificationInstance = () => {
|
|
|
180
175
|
...notification,
|
|
181
176
|
key: notification.id,
|
|
182
177
|
onClose: () => {
|
|
183
|
-
var _a;
|
|
184
178
|
hideNotification(notification.id);
|
|
185
|
-
|
|
179
|
+
notification.onClose?.(notification);
|
|
186
180
|
}
|
|
187
181
|
}
|
|
188
182
|
))
|
|
@@ -207,9 +201,8 @@ const showNotification = (notification) => {
|
|
|
207
201
|
};
|
|
208
202
|
const hideNotification = (id) => {
|
|
209
203
|
const newNotifications = NotificationsStore.data.filter((notification) => {
|
|
210
|
-
var _a;
|
|
211
204
|
if (notification.id === id) {
|
|
212
|
-
|
|
205
|
+
notification.onClose?.(notification);
|
|
213
206
|
return false;
|
|
214
207
|
}
|
|
215
208
|
return true;
|
|
@@ -63,7 +63,7 @@ const NotificationInstance = () => {
|
|
|
63
63
|
notificationsStore.subscribe(updateNotifications);
|
|
64
64
|
return () => {
|
|
65
65
|
notificationsStore.unsubscribe(updateNotifications);
|
|
66
|
-
element
|
|
66
|
+
element?.remove();
|
|
67
67
|
};
|
|
68
68
|
}, []);
|
|
69
69
|
const updateNotifications = () => {
|
|
@@ -83,9 +83,8 @@ const NotificationInstance = () => {
|
|
|
83
83
|
...notification,
|
|
84
84
|
key: notification.id,
|
|
85
85
|
onClose: () => {
|
|
86
|
-
var _a;
|
|
87
86
|
hideNotification(notification.id);
|
|
88
|
-
|
|
87
|
+
notification.onClose?.(notification);
|
|
89
88
|
}
|
|
90
89
|
}
|
|
91
90
|
)) })
|
|
@@ -102,9 +101,8 @@ const NotificationInstance = () => {
|
|
|
102
101
|
...notification,
|
|
103
102
|
key: notification.id,
|
|
104
103
|
onClose: () => {
|
|
105
|
-
var _a;
|
|
106
104
|
hideNotification(notification.id);
|
|
107
|
-
|
|
105
|
+
notification.onClose?.(notification);
|
|
108
106
|
}
|
|
109
107
|
}
|
|
110
108
|
))
|
|
@@ -121,9 +119,8 @@ const NotificationInstance = () => {
|
|
|
121
119
|
...notification,
|
|
122
120
|
key: notification.id,
|
|
123
121
|
onClose: () => {
|
|
124
|
-
var _a;
|
|
125
122
|
hideNotification(notification.id);
|
|
126
|
-
|
|
123
|
+
notification.onClose?.(notification);
|
|
127
124
|
}
|
|
128
125
|
}
|
|
129
126
|
))
|
|
@@ -140,9 +137,8 @@ const NotificationInstance = () => {
|
|
|
140
137
|
...notification,
|
|
141
138
|
key: notification.id,
|
|
142
139
|
onClose: () => {
|
|
143
|
-
var _a;
|
|
144
140
|
hideNotification(notification.id);
|
|
145
|
-
|
|
141
|
+
notification.onClose?.(notification);
|
|
146
142
|
}
|
|
147
143
|
}
|
|
148
144
|
))
|
|
@@ -159,9 +155,8 @@ const NotificationInstance = () => {
|
|
|
159
155
|
...notification,
|
|
160
156
|
key: notification.id,
|
|
161
157
|
onClose: () => {
|
|
162
|
-
var _a;
|
|
163
158
|
hideNotification(notification.id);
|
|
164
|
-
|
|
159
|
+
notification.onClose?.(notification);
|
|
165
160
|
}
|
|
166
161
|
}
|
|
167
162
|
))
|
|
@@ -178,9 +173,8 @@ const NotificationInstance = () => {
|
|
|
178
173
|
...notification,
|
|
179
174
|
key: notification.id,
|
|
180
175
|
onClose: () => {
|
|
181
|
-
var _a;
|
|
182
176
|
hideNotification(notification.id);
|
|
183
|
-
|
|
177
|
+
notification.onClose?.(notification);
|
|
184
178
|
}
|
|
185
179
|
}
|
|
186
180
|
))
|
|
@@ -205,9 +199,8 @@ const showNotification = (notification) => {
|
|
|
205
199
|
};
|
|
206
200
|
const hideNotification = (id) => {
|
|
207
201
|
const newNotifications = notificationsStore.data.filter((notification) => {
|
|
208
|
-
var _a;
|
|
209
202
|
if (notification.id === id) {
|
|
210
|
-
|
|
203
|
+
notification.onClose?.(notification);
|
|
211
204
|
return false;
|
|
212
205
|
}
|
|
213
206
|
return true;
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
2
|
class NotificationsStore {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
__publicField(this, "notifications", []);
|
|
9
|
-
}
|
|
3
|
+
subscribes = [];
|
|
4
|
+
notifications = [];
|
|
10
5
|
subscribe(callback) {
|
|
11
6
|
this.subscribes.push(callback);
|
|
12
7
|
}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
1
|
class NotificationsStore {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
__publicField(this, "notifications", []);
|
|
8
|
-
}
|
|
2
|
+
subscribes = [];
|
|
3
|
+
notifications = [];
|
|
9
4
|
subscribe(callback) {
|
|
10
5
|
this.subscribes.push(callback);
|
|
11
6
|
}
|
|
@@ -4,13 +4,13 @@ const styled = require("styled-components");
|
|
|
4
4
|
const getBackgroundStatus = (theme, status) => {
|
|
5
5
|
switch (status) {
|
|
6
6
|
case "info":
|
|
7
|
-
return theme.
|
|
7
|
+
return theme.components.Notification.infoColor;
|
|
8
8
|
case "warning":
|
|
9
|
-
return theme.
|
|
9
|
+
return theme.components.Notification.warningColor;
|
|
10
10
|
case "error":
|
|
11
|
-
return theme.
|
|
11
|
+
return theme.components.Notification.errorColor;
|
|
12
12
|
case "success":
|
|
13
|
-
return theme.
|
|
13
|
+
return theme.components.Notification.successColor;
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
const getPosition = (theme, position) => {
|
|
@@ -64,9 +64,9 @@ const NotificationStyled = styled.div.withConfig({
|
|
|
64
64
|
})`
|
|
65
65
|
width: 384px;
|
|
66
66
|
position: relative;
|
|
67
|
-
border-radius: ${({ theme }) => theme.
|
|
67
|
+
border-radius: ${({ theme }) => theme.components.Notification.radius};
|
|
68
68
|
padding: ${({ theme }) => theme.space.m};
|
|
69
|
-
background: ${({ theme }) => theme.
|
|
69
|
+
background: ${({ theme }) => theme.components.Notification.background};
|
|
70
70
|
margin-bottom: ${({ theme }) => theme.space.m};
|
|
71
71
|
|
|
72
72
|
.quen-ui__notification-icon {
|
|
@@ -2,13 +2,13 @@ import styled, { css } from "styled-components";
|
|
|
2
2
|
const getBackgroundStatus = (theme, status) => {
|
|
3
3
|
switch (status) {
|
|
4
4
|
case "info":
|
|
5
|
-
return theme.
|
|
5
|
+
return theme.components.Notification.infoColor;
|
|
6
6
|
case "warning":
|
|
7
|
-
return theme.
|
|
7
|
+
return theme.components.Notification.warningColor;
|
|
8
8
|
case "error":
|
|
9
|
-
return theme.
|
|
9
|
+
return theme.components.Notification.errorColor;
|
|
10
10
|
case "success":
|
|
11
|
-
return theme.
|
|
11
|
+
return theme.components.Notification.successColor;
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
14
|
const getPosition = (theme, position) => {
|
|
@@ -62,9 +62,9 @@ const NotificationStyled = styled.div.withConfig({
|
|
|
62
62
|
})`
|
|
63
63
|
width: 384px;
|
|
64
64
|
position: relative;
|
|
65
|
-
border-radius: ${({ theme }) => theme.
|
|
65
|
+
border-radius: ${({ theme }) => theme.components.Notification.radius};
|
|
66
66
|
padding: ${({ theme }) => theme.space.m};
|
|
67
|
-
background: ${({ theme }) => theme.
|
|
67
|
+
background: ${({ theme }) => theme.components.Notification.background};
|
|
68
68
|
margin-bottom: ${({ theme }) => theme.space.m};
|
|
69
69
|
|
|
70
70
|
.quen-ui__notification-icon {
|