@quen-ui/components 0.0.14 → 1.0.1
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 +5 -1
- 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 +31 -2
- 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 +15 -5
- 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 +8 -15
- 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 +548 -0
- package/dist/RichTextEditor/plugins.d.ts +2 -0
- package/dist/RichTextEditor/plugins.es.js +548 -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/assets/box.svg.cjs.js +21 -0
- package/dist/assets/box.svg.es.js +5 -0
- package/dist/index.cjs.js +30 -0
- package/dist/index.d.ts +17 -2
- package/dist/index.es.js +30 -0
- 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/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 +17 -13
package/dist/Avatar/styles.es.js
CHANGED
|
@@ -1,28 +1,33 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
|
-
import { math } from "polished";
|
|
3
2
|
const AvatarWrapper = styled.div`
|
|
4
3
|
display: flex;
|
|
5
4
|
gap: ${({ theme, size }) => theme.space[size ?? "m"]};
|
|
6
5
|
align-items: center;
|
|
6
|
+
|
|
7
|
+
.quen-ui__title,
|
|
8
|
+
.quen-ui__text {
|
|
9
|
+
color: ${({ theme }) => theme.components.Avatar.color};
|
|
10
|
+
}
|
|
7
11
|
`;
|
|
8
|
-
const AvatarStyled = styled.div
|
|
12
|
+
const AvatarStyled = styled.div.withConfig({
|
|
13
|
+
shouldForwardProp: (prop) => !["size", "color", "status"].includes(prop)
|
|
14
|
+
})`
|
|
9
15
|
width: ${({ size, theme }) => theme.control.height[size ?? "m"]};
|
|
10
16
|
height: ${({ size, theme }) => theme.control.height[size ?? "m"]};
|
|
11
|
-
border-radius: ${({ theme }) =>
|
|
17
|
+
border-radius: ${({ theme }) => theme.components.Avatar.radius};
|
|
12
18
|
background: ${({ theme, color }) => color in theme.colors ? theme.colors[color]["3"] : color};
|
|
13
19
|
display: flex;
|
|
14
20
|
align-items: center;
|
|
15
21
|
justify-content: center;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
.quen-ui__avatar__icon {
|
|
22
|
+
color: ${({ theme }) => theme.components.Avatar.color};
|
|
23
|
+
${({ theme, status }) => status && css`
|
|
24
|
+
border: ${theme.components.Avatar.borderWidth} solid
|
|
25
|
+
${status === "online" ? theme.components.Avatar.borderColorOnline : theme.components.Avatar.borderColorDefault};
|
|
26
|
+
`}
|
|
27
|
+
.quen-ui__avatar__icon {
|
|
23
28
|
width: 100%;
|
|
24
29
|
height: 100%;
|
|
25
|
-
border-radius: ${({ theme }) =>
|
|
30
|
+
border-radius: ${({ theme }) => theme.components.Avatar.radius};
|
|
26
31
|
}
|
|
27
32
|
`;
|
|
28
33
|
export {
|
package/dist/Badge/styles.cjs.js
CHANGED
|
@@ -13,26 +13,26 @@ const getBackgroundColor = (theme, color) => {
|
|
|
13
13
|
if (types.BADGE_COLOR.includes(color)) {
|
|
14
14
|
switch (color) {
|
|
15
15
|
case "success":
|
|
16
|
-
return theme.
|
|
16
|
+
return theme.components.Badge.successBackground;
|
|
17
17
|
case "warning":
|
|
18
|
-
return theme.
|
|
18
|
+
return theme.components.Badge.warningBackground;
|
|
19
19
|
case "danger":
|
|
20
|
-
return theme.
|
|
20
|
+
return theme.components.Badge.dangerBackground;
|
|
21
21
|
case "secondary":
|
|
22
|
-
return theme.
|
|
22
|
+
return theme.components.Badge.disabledBackground;
|
|
23
23
|
case "disabled":
|
|
24
24
|
return theme.colors.gray[2];
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
return color;
|
|
28
28
|
}
|
|
29
|
-
return theme.
|
|
29
|
+
return theme.components.Badge.primaryBackground;
|
|
30
30
|
};
|
|
31
31
|
const getColor = (theme, color) => {
|
|
32
32
|
if (color === "secondary") {
|
|
33
33
|
return "dark";
|
|
34
34
|
} else if (color === "disabled") {
|
|
35
|
-
return theme.
|
|
35
|
+
return theme.components.Badge.disabledColor;
|
|
36
36
|
}
|
|
37
37
|
return "white";
|
|
38
38
|
};
|
|
@@ -45,7 +45,7 @@ const BadgeStyled = styled.div.withConfig({
|
|
|
45
45
|
justify-content: space-between;
|
|
46
46
|
width: max-content;
|
|
47
47
|
height: ${({ size }) => height[size]};
|
|
48
|
-
border-radius: ${({ theme }) => theme.
|
|
48
|
+
border-radius: ${({ theme }) => theme.components.Badge.radius};
|
|
49
49
|
padding-left: ${({ theme }) => theme.space.xs};
|
|
50
50
|
padding-right: ${({ theme }) => theme.space.xs};
|
|
51
51
|
background-color: ${({ theme, color }) => getBackgroundColor(theme, color)};
|
package/dist/Badge/styles.es.js
CHANGED
|
@@ -11,26 +11,26 @@ const getBackgroundColor = (theme, color) => {
|
|
|
11
11
|
if (BADGE_COLOR.includes(color)) {
|
|
12
12
|
switch (color) {
|
|
13
13
|
case "success":
|
|
14
|
-
return theme.
|
|
14
|
+
return theme.components.Badge.successBackground;
|
|
15
15
|
case "warning":
|
|
16
|
-
return theme.
|
|
16
|
+
return theme.components.Badge.warningBackground;
|
|
17
17
|
case "danger":
|
|
18
|
-
return theme.
|
|
18
|
+
return theme.components.Badge.dangerBackground;
|
|
19
19
|
case "secondary":
|
|
20
|
-
return theme.
|
|
20
|
+
return theme.components.Badge.disabledBackground;
|
|
21
21
|
case "disabled":
|
|
22
22
|
return theme.colors.gray[2];
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
return color;
|
|
26
26
|
}
|
|
27
|
-
return theme.
|
|
27
|
+
return theme.components.Badge.primaryBackground;
|
|
28
28
|
};
|
|
29
29
|
const getColor = (theme, color) => {
|
|
30
30
|
if (color === "secondary") {
|
|
31
31
|
return "dark";
|
|
32
32
|
} else if (color === "disabled") {
|
|
33
|
-
return theme.
|
|
33
|
+
return theme.components.Badge.disabledColor;
|
|
34
34
|
}
|
|
35
35
|
return "white";
|
|
36
36
|
};
|
|
@@ -43,7 +43,7 @@ const BadgeStyled = styled.div.withConfig({
|
|
|
43
43
|
justify-content: space-between;
|
|
44
44
|
width: max-content;
|
|
45
45
|
height: ${({ size }) => height[size]};
|
|
46
|
-
border-radius: ${({ theme }) => theme.
|
|
46
|
+
border-radius: ${({ theme }) => theme.components.Badge.radius};
|
|
47
47
|
padding-left: ${({ theme }) => theme.space.xs};
|
|
48
48
|
padding-right: ${({ theme }) => theme.space.xs};
|
|
49
49
|
background-color: ${({ theme, color }) => getBackgroundColor(theme, color)};
|
|
@@ -16,13 +16,13 @@ const BreadcrumbItem = ({
|
|
|
16
16
|
className,
|
|
17
17
|
lastItem
|
|
18
18
|
}) => {
|
|
19
|
-
const Icon = item &&
|
|
19
|
+
const Icon = item && getItemIcon?.(item);
|
|
20
20
|
const onlyIcon = Icon && onlyIconProps;
|
|
21
|
-
const label = item &&
|
|
22
|
-
const href = item &&
|
|
23
|
-
const _className = item &&
|
|
21
|
+
const label = item && getItemLabel?.(item);
|
|
22
|
+
const href = item && getItemHref?.(item);
|
|
23
|
+
const _className = item && getItemClassName?.(item);
|
|
24
24
|
const handleClick = (e) => {
|
|
25
|
-
onItemClick
|
|
25
|
+
onItemClick?.(item, e);
|
|
26
26
|
};
|
|
27
27
|
const linkProps = href ? { as: "a", href } : { as: "span" };
|
|
28
28
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -32,7 +32,7 @@ const BreadcrumbItem = ({
|
|
|
32
32
|
lastItem,
|
|
33
33
|
...linkProps,
|
|
34
34
|
onClick: handleClick,
|
|
35
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Text, { size, children: onlyIcon ? /* @__PURE__ */ jsxRuntime.jsx(Button, { view: "icon", size, className: "quen-ui__breadcrumb--icon", children: Icon }) : /* @__PURE__ */ jsxRuntime.jsxs(Flex, { align: "center", gap: 4, children: [
|
|
35
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Text, { size, children: onlyIcon ? /* @__PURE__ */ jsxRuntime.jsx(Button, { view: "icon", size, className: "quen-ui__breadcrumb--icon", "aria-label": label, children: Icon }) : /* @__PURE__ */ jsxRuntime.jsxs(Flex, { align: "center", gap: 4, children: [
|
|
36
36
|
Icon,
|
|
37
37
|
label
|
|
38
38
|
] }) })
|
|
@@ -15,13 +15,13 @@ const BreadcrumbItem = ({
|
|
|
15
15
|
className,
|
|
16
16
|
lastItem
|
|
17
17
|
}) => {
|
|
18
|
-
const Icon = item &&
|
|
18
|
+
const Icon = item && getItemIcon?.(item);
|
|
19
19
|
const onlyIcon = Icon && onlyIconProps;
|
|
20
|
-
const label = item &&
|
|
21
|
-
const href = item &&
|
|
22
|
-
const _className = item &&
|
|
20
|
+
const label = item && getItemLabel?.(item);
|
|
21
|
+
const href = item && getItemHref?.(item);
|
|
22
|
+
const _className = item && getItemClassName?.(item);
|
|
23
23
|
const handleClick = (e) => {
|
|
24
|
-
onItemClick
|
|
24
|
+
onItemClick?.(item, e);
|
|
25
25
|
};
|
|
26
26
|
const linkProps = href ? { as: "a", href } : { as: "span" };
|
|
27
27
|
return /* @__PURE__ */ jsx(
|
|
@@ -31,7 +31,7 @@ const BreadcrumbItem = ({
|
|
|
31
31
|
lastItem,
|
|
32
32
|
...linkProps,
|
|
33
33
|
onClick: handleClick,
|
|
34
|
-
children: /* @__PURE__ */ jsx(Text, { size, children: onlyIcon ? /* @__PURE__ */ jsx(Button, { view: "icon", size, className: "quen-ui__breadcrumb--icon", children: Icon }) : /* @__PURE__ */ jsxs(Flex, { align: "center", gap: 4, children: [
|
|
34
|
+
children: /* @__PURE__ */ jsx(Text, { size, children: onlyIcon ? /* @__PURE__ */ jsx(Button, { view: "icon", size, className: "quen-ui__breadcrumb--icon", "aria-label": label, children: Icon }) : /* @__PURE__ */ jsxs(Flex, { align: "center", gap: 4, children: [
|
|
35
35
|
Icon,
|
|
36
36
|
label
|
|
37
37
|
] }) })
|
|
@@ -21,9 +21,8 @@ const Breadcrumbs = (props) => {
|
|
|
21
21
|
...otherProps
|
|
22
22
|
} = helpers.widthDefaultGetters(props);
|
|
23
23
|
const handleClick = (item, e) => {
|
|
24
|
-
|
|
25
|
-
(
|
|
26
|
-
onItemClick == null ? void 0 : onItemClick(item, e);
|
|
24
|
+
getItemOnClick(item)?.(e);
|
|
25
|
+
onItemClick?.(item, e);
|
|
27
26
|
};
|
|
28
27
|
return /* @__PURE__ */ jsxRuntime.jsx(styles.BreadcrumbsStyled, { className, ...otherProps, children: items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(React.Fragment, { children: [
|
|
29
28
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -20,9 +20,8 @@ const Breadcrumbs = (props) => {
|
|
|
20
20
|
...otherProps
|
|
21
21
|
} = widthDefaultGetters(props);
|
|
22
22
|
const handleClick = (item, e) => {
|
|
23
|
-
|
|
24
|
-
(
|
|
25
|
-
onItemClick == null ? void 0 : onItemClick(item, e);
|
|
23
|
+
getItemOnClick(item)?.(e);
|
|
24
|
+
onItemClick?.(item, e);
|
|
26
25
|
};
|
|
27
26
|
return /* @__PURE__ */ jsx(BreadcrumbsStyled, { className, ...otherProps, children: items.map((item, index) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
28
27
|
/* @__PURE__ */ jsx(
|
|
@@ -6,34 +6,34 @@ const BreadcrumbItemStyled = styled.div.withConfig({
|
|
|
6
6
|
})`
|
|
7
7
|
cursor: pointer;
|
|
8
8
|
user-select: none;
|
|
9
|
-
|
|
9
|
+
|
|
10
10
|
text-decoration: none;
|
|
11
|
-
|
|
11
|
+
|
|
12
12
|
span {
|
|
13
13
|
display: flex;
|
|
14
14
|
align-items: center;
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
|
|
17
17
|
${({ lastItem }) => lastItem && styled.css`
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
color: ${({ theme }) => theme.components.Breadcrumbs.primaryColor};
|
|
19
|
+
span {
|
|
20
|
+
color: ${({ theme }) => theme.components.Breadcrumbs.primaryColor};
|
|
21
|
+
}
|
|
22
|
+
`};
|
|
23
|
+
|
|
24
24
|
&:hover {
|
|
25
|
-
color: ${({ theme }) => theme.
|
|
25
|
+
color: ${({ theme }) => theme.components.Breadcrumbs.hoverColor};
|
|
26
26
|
span {
|
|
27
|
-
color: ${({ theme }) => theme.
|
|
27
|
+
color: ${({ theme }) => theme.components.Breadcrumbs.hoverColor};
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
.quen-ui__breadcrumb--icon {
|
|
32
32
|
svg {
|
|
33
|
-
color: ${({ theme }) => theme.
|
|
33
|
+
color: ${({ theme }) => theme.components.Breadcrumbs.color};
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
|
|
36
|
+
|
|
37
37
|
svg {
|
|
38
38
|
color: currentColor;
|
|
39
39
|
}
|
|
@@ -43,8 +43,8 @@ const BreadcrumbsStyled = styled.nav`
|
|
|
43
43
|
gap: 0.5rem;
|
|
44
44
|
flex-wrap: wrap;
|
|
45
45
|
align-items: center;
|
|
46
|
-
|
|
47
|
-
color: ${({ theme }) => theme.
|
|
46
|
+
|
|
47
|
+
color: ${({ theme }) => theme.components.Breadcrumbs.color};
|
|
48
48
|
`;
|
|
49
49
|
exports.BreadcrumbItemStyled = BreadcrumbItemStyled;
|
|
50
50
|
exports.BreadcrumbsStyled = BreadcrumbsStyled;
|
|
@@ -4,34 +4,34 @@ const BreadcrumbItemStyled = styled.div.withConfig({
|
|
|
4
4
|
})`
|
|
5
5
|
cursor: pointer;
|
|
6
6
|
user-select: none;
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
text-decoration: none;
|
|
9
|
-
|
|
9
|
+
|
|
10
10
|
span {
|
|
11
11
|
display: flex;
|
|
12
12
|
align-items: center;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
|
|
15
15
|
${({ lastItem }) => lastItem && css`
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
color: ${({ theme }) => theme.components.Breadcrumbs.primaryColor};
|
|
17
|
+
span {
|
|
18
|
+
color: ${({ theme }) => theme.components.Breadcrumbs.primaryColor};
|
|
19
|
+
}
|
|
20
|
+
`};
|
|
21
|
+
|
|
22
22
|
&:hover {
|
|
23
|
-
color: ${({ theme }) => theme.
|
|
23
|
+
color: ${({ theme }) => theme.components.Breadcrumbs.hoverColor};
|
|
24
24
|
span {
|
|
25
|
-
color: ${({ theme }) => theme.
|
|
25
|
+
color: ${({ theme }) => theme.components.Breadcrumbs.hoverColor};
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.quen-ui__breadcrumb--icon {
|
|
30
30
|
svg {
|
|
31
|
-
color: ${({ theme }) => theme.
|
|
31
|
+
color: ${({ theme }) => theme.components.Breadcrumbs.color};
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
|
|
34
|
+
|
|
35
35
|
svg {
|
|
36
36
|
color: currentColor;
|
|
37
37
|
}
|
|
@@ -41,8 +41,8 @@ const BreadcrumbsStyled = styled.nav`
|
|
|
41
41
|
gap: 0.5rem;
|
|
42
42
|
flex-wrap: wrap;
|
|
43
43
|
align-items: center;
|
|
44
|
-
|
|
45
|
-
color: ${({ theme }) => theme.
|
|
44
|
+
|
|
45
|
+
color: ${({ theme }) => theme.components.Breadcrumbs.color};
|
|
46
46
|
`;
|
|
47
47
|
export {
|
|
48
48
|
BreadcrumbItemStyled,
|
|
@@ -21,19 +21,19 @@ const Button = ({
|
|
|
21
21
|
}, ref) => {
|
|
22
22
|
const handleClick = (event) => {
|
|
23
23
|
if (!loading && !disabled) {
|
|
24
|
-
onClick
|
|
24
|
+
onClick?.(event);
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
const handleKeyPress = (event) => {
|
|
28
28
|
if (!disabled && !loading) {
|
|
29
|
-
onKeyPress
|
|
29
|
+
onKeyPress?.(event);
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
const handleKeyUp = (event) => {
|
|
33
33
|
if (loading) {
|
|
34
34
|
event.preventDefault();
|
|
35
35
|
} else {
|
|
36
|
-
onKeyUp
|
|
36
|
+
onKeyUp?.(event);
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
39
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
package/dist/Button/Button.es.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { ButtonStyled } from "./styles.es.js";
|
|
4
4
|
import Loader from "../Loader/Loader.es.js";
|
|
5
|
-
const Button = ({
|
|
5
|
+
const Button$1 = ({
|
|
6
6
|
size = "m",
|
|
7
7
|
children,
|
|
8
8
|
disabled,
|
|
@@ -20,19 +20,19 @@ const Button = ({
|
|
|
20
20
|
}, ref) => {
|
|
21
21
|
const handleClick = (event) => {
|
|
22
22
|
if (!loading && !disabled) {
|
|
23
|
-
onClick
|
|
23
|
+
onClick?.(event);
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
const handleKeyPress = (event) => {
|
|
27
27
|
if (!disabled && !loading) {
|
|
28
|
-
onKeyPress
|
|
28
|
+
onKeyPress?.(event);
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
const handleKeyUp = (event) => {
|
|
32
32
|
if (loading) {
|
|
33
33
|
event.preventDefault();
|
|
34
34
|
} else {
|
|
35
|
-
onKeyUp
|
|
35
|
+
onKeyUp?.(event);
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
return /* @__PURE__ */ jsxs(
|
|
@@ -61,7 +61,7 @@ const Button = ({
|
|
|
61
61
|
}
|
|
62
62
|
);
|
|
63
63
|
};
|
|
64
|
-
const Button
|
|
64
|
+
const Button = forwardRef(Button$1);
|
|
65
65
|
export {
|
|
66
|
-
Button
|
|
66
|
+
Button as default
|
|
67
67
|
};
|
package/dist/Button/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as Button } from './Button';
|
|
2
|
-
export type { IButtonProps,
|
|
2
|
+
export type { IButtonProps, TButtonView } from './types';
|
|
@@ -2,117 +2,107 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const styled = require("styled-components");
|
|
4
4
|
const polished = require("polished");
|
|
5
|
-
const getSizing = (view, size) => {
|
|
6
|
-
switch (size) {
|
|
7
|
-
case "l":
|
|
8
|
-
return styled.css`
|
|
9
|
-
height: 3rem; // 48px
|
|
10
|
-
${view === "icon" && "width: 3rem"};
|
|
11
|
-
`;
|
|
12
|
-
case "s":
|
|
13
|
-
return styled.css`
|
|
14
|
-
height: 2rem; // 32px
|
|
15
|
-
${view === "icon" && "width: 2rem"};
|
|
16
|
-
`;
|
|
17
|
-
case "xs":
|
|
18
|
-
return styled.css`
|
|
19
|
-
height: 1.5rem; // 24px
|
|
20
|
-
${view === "icon" && "width: 1.5rem"};
|
|
21
|
-
`;
|
|
22
|
-
case "m":
|
|
23
|
-
default:
|
|
24
|
-
return styled.css`
|
|
25
|
-
height: 2.5rem; // 40px
|
|
26
|
-
${view === "icon" && "width: 2.5rem"};
|
|
27
|
-
`;
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
5
|
const getBackground = (theme, view = "primary", isDisabled) => {
|
|
31
6
|
switch (view) {
|
|
32
7
|
case "secondary":
|
|
33
8
|
return styled.css`
|
|
34
|
-
background: ${theme.
|
|
35
|
-
color:
|
|
9
|
+
background: ${theme.components.Button.secondaryBackground};
|
|
10
|
+
color: ${theme.components.Button.color};
|
|
36
11
|
|
|
37
12
|
&:hover {
|
|
38
|
-
background: ${
|
|
13
|
+
background: ${polished.darken(
|
|
14
|
+
0.1,
|
|
15
|
+
theme.components.Button.secondaryBackground
|
|
16
|
+
)};
|
|
39
17
|
}
|
|
40
18
|
|
|
41
19
|
&:active {
|
|
42
|
-
background: ${
|
|
20
|
+
background: ${polished.darken(
|
|
21
|
+
0.2,
|
|
22
|
+
theme.components.Button.secondaryBackground
|
|
23
|
+
)};
|
|
43
24
|
}
|
|
44
25
|
`;
|
|
45
26
|
case "danger":
|
|
46
27
|
return styled.css`
|
|
47
|
-
background: ${theme.
|
|
48
|
-
color:
|
|
28
|
+
background: ${theme.components.Button.dangerBackground};
|
|
29
|
+
color: ${theme.components.Button.color};
|
|
49
30
|
|
|
50
31
|
&:hover {
|
|
51
|
-
background: ${
|
|
32
|
+
background: ${polished.desaturate(
|
|
33
|
+
0.2,
|
|
34
|
+
theme.components.Button.dangerBackground
|
|
35
|
+
)};
|
|
52
36
|
}
|
|
53
37
|
|
|
54
38
|
&:active {
|
|
55
|
-
background: ${theme.
|
|
39
|
+
background: ${polished.darken(0.2, theme.components.Button.dangerBackground)};
|
|
56
40
|
}
|
|
57
41
|
`;
|
|
58
42
|
case "ghost":
|
|
59
43
|
return styled.css`
|
|
60
44
|
background: transparent;
|
|
61
|
-
color: ${theme.
|
|
45
|
+
color: ${theme.components.Button.ghostColor};
|
|
62
46
|
|
|
63
47
|
&:hover {
|
|
64
|
-
color: ${theme.
|
|
48
|
+
color: ${polished.rgba(theme.components.Button.ghostColor, 0.5)};
|
|
65
49
|
}
|
|
66
50
|
|
|
67
51
|
&:active {
|
|
68
|
-
color: ${theme.
|
|
52
|
+
color: ${polished.rgba(theme.components.Button.ghostColor, 0.5)};
|
|
69
53
|
}
|
|
70
54
|
`;
|
|
71
55
|
case "success":
|
|
72
56
|
return styled.css`
|
|
73
|
-
background: ${theme.
|
|
74
|
-
color:
|
|
57
|
+
background: ${theme.components.Button.successBackground};
|
|
58
|
+
color: ${theme.components.Button.color};
|
|
75
59
|
|
|
76
60
|
&:hover {
|
|
77
|
-
background: ${
|
|
61
|
+
background: ${polished.desaturate(
|
|
62
|
+
0.2,
|
|
63
|
+
theme.components.Button.successBackground
|
|
64
|
+
)};
|
|
78
65
|
}
|
|
79
66
|
|
|
80
67
|
&:active {
|
|
81
|
-
background: ${theme.
|
|
68
|
+
background: ${polished.darken(0.2, theme.components.Button.successBackground)};
|
|
82
69
|
}
|
|
83
70
|
`;
|
|
84
71
|
case "warning":
|
|
85
72
|
return styled.css`
|
|
86
|
-
background: ${theme.
|
|
87
|
-
color:
|
|
73
|
+
background: ${theme.components.Button.warningBackground};
|
|
74
|
+
color: ${theme.components.Button.color};
|
|
88
75
|
|
|
89
76
|
&:hover {
|
|
90
|
-
background: ${
|
|
77
|
+
background: ${polished.desaturate(
|
|
78
|
+
0.2,
|
|
79
|
+
theme.components.Button.warningBackground
|
|
80
|
+
)};
|
|
91
81
|
}
|
|
92
82
|
|
|
93
83
|
&:active {
|
|
94
|
-
background: ${theme.
|
|
84
|
+
background: ${polished.darken(0.2, theme.components.Button.warningBackground)};
|
|
95
85
|
}
|
|
96
86
|
`;
|
|
97
87
|
case "link":
|
|
98
88
|
return styled.css`
|
|
99
89
|
background: transparent;
|
|
100
|
-
color: ${theme.colors.
|
|
90
|
+
color: ${theme.colors[theme.primaryColor][8]};
|
|
101
91
|
|
|
102
92
|
.quen-ui__text {
|
|
103
93
|
color: unset;
|
|
104
94
|
}
|
|
105
95
|
|
|
106
96
|
&:hover {
|
|
107
|
-
color: ${theme.colors.
|
|
97
|
+
color: ${polished.darken(0.1, theme.colors[theme.primaryColor][8])};
|
|
108
98
|
}
|
|
109
99
|
|
|
110
100
|
&:active {
|
|
111
|
-
color: ${theme.colors.
|
|
101
|
+
color: ${polished.darken(0.2, theme.colors[theme.primaryColor][8])};
|
|
112
102
|
}
|
|
113
103
|
|
|
114
104
|
&:disabled {
|
|
115
|
-
color: ${theme.
|
|
105
|
+
color: ${theme.components.Button.disabledColor};
|
|
116
106
|
}
|
|
117
107
|
`;
|
|
118
108
|
case "icon":
|
|
@@ -134,9 +124,10 @@ const getBackground = (theme, view = "primary", isDisabled) => {
|
|
|
134
124
|
default:
|
|
135
125
|
return styled.css`
|
|
136
126
|
background: ${theme.colors[theme.primaryColor][9]};
|
|
137
|
-
color:
|
|
127
|
+
color: ${theme.components.Button.color};
|
|
128
|
+
|
|
138
129
|
.quen-ui__text {
|
|
139
|
-
color:
|
|
130
|
+
color: ${theme.components.Button.color};
|
|
140
131
|
}
|
|
141
132
|
|
|
142
133
|
&:hover {
|
|
@@ -155,11 +146,15 @@ const ButtonStyled = styled.button.withConfig({
|
|
|
155
146
|
border: none;
|
|
156
147
|
background: none;
|
|
157
148
|
outline: none;
|
|
158
|
-
${({ size, viewButton }) =>
|
|
149
|
+
${({ theme, size = "m", viewButton }) => styled.css`
|
|
150
|
+
height: ${theme.control.height[size]};
|
|
151
|
+
${viewButton === "icon" && `width: ${theme.control.height[size]}`}
|
|
152
|
+
`};
|
|
153
|
+
|
|
159
154
|
cursor: pointer;
|
|
160
155
|
padding-left: ${({ viewButton }) => viewButton === "icon" ? "0.25" : "0.75"}rem;
|
|
161
156
|
padding-right: ${({ viewButton }) => viewButton === "icon" ? "0.25" : "0.75"}rem;
|
|
162
|
-
border-radius:
|
|
157
|
+
border-radius: ${({ theme }) => theme.components.Button.radius};
|
|
163
158
|
display: flex;
|
|
164
159
|
align-items: center;
|
|
165
160
|
justify-content: space-around;
|
|
@@ -169,8 +164,8 @@ const ButtonStyled = styled.button.withConfig({
|
|
|
169
164
|
${({ theme, viewButton, isDisabled }) => getBackground(theme, viewButton, isDisabled)};
|
|
170
165
|
|
|
171
166
|
&:disabled {
|
|
172
|
-
background: ${({ theme }) => theme.
|
|
173
|
-
color: ${({ theme }) => theme.
|
|
167
|
+
background: ${({ theme }) => theme.components.Button.disabledBackground};
|
|
168
|
+
color: ${({ theme }) => theme.components.Button.disabledColor};
|
|
174
169
|
cursor: not-allowed;
|
|
175
170
|
}
|
|
176
171
|
`;
|