@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/Tabs/styles.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { ITabsListProps } from './types';
|
|
2
2
|
export declare const TabStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('styled-components/dist/types').Substitute<import('..').ITextProps, import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>>, never>, {
|
|
3
3
|
selected: boolean;
|
|
4
|
+
outline?: boolean;
|
|
4
5
|
}>> & string;
|
|
5
6
|
export declare const TabsListStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
6
7
|
justify: ITabsListProps["justify"];
|
|
7
8
|
isGrow?: boolean;
|
|
9
|
+
outline?: boolean;
|
|
8
10
|
}>> & string;
|
|
9
11
|
export declare const TabPanelStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
package/dist/Tabs/styles.es.js
CHANGED
|
@@ -1,13 +1,77 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
2
|
import Text from "../typography/Text/Text.es.js";
|
|
3
|
+
const getTabStyled = (theme, selected, outline) => {
|
|
4
|
+
if (outline) {
|
|
5
|
+
return css`
|
|
6
|
+
border-style: solid;
|
|
7
|
+
border-width: 1px;
|
|
8
|
+
border-top-left-radius: ${theme.components.Tabs.radius};
|
|
9
|
+
border-top-right-radius: ${theme.components.Tabs.radius};
|
|
10
|
+
border-color: transparent;
|
|
11
|
+
background: transparent;
|
|
12
|
+
color: ${theme.components.Tabs.color};
|
|
13
|
+
|
|
14
|
+
${selected ? css`
|
|
15
|
+
border-top-color: ${theme.components.Tabs.hoverColor};
|
|
16
|
+
border-left-color: ${theme.components.Tabs.hoverColor};
|
|
17
|
+
border-right-color: ${theme.components.Tabs.hoverColor};
|
|
18
|
+
border-bottom-color: var(--tab-background, white);
|
|
19
|
+
|
|
20
|
+
&::after {
|
|
21
|
+
content: "";
|
|
22
|
+
position: absolute;
|
|
23
|
+
left: -1px;
|
|
24
|
+
right: -1px;
|
|
25
|
+
bottom: calc(-1 * (${theme.components.Tabs.borderWidth}));
|
|
26
|
+
height: ${theme.components.Tabs.borderWidth};
|
|
27
|
+
background: transparent;
|
|
28
|
+
}
|
|
29
|
+
` : css`
|
|
30
|
+
border-top-color: transparent;
|
|
31
|
+
border-left-color: transparent;
|
|
32
|
+
border-right-color: transparent;
|
|
33
|
+
`};
|
|
34
|
+
|
|
35
|
+
&:hover:not(:disabled) {
|
|
36
|
+
color: ${theme.components.Tabs.hoverColor};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&:disabled {
|
|
40
|
+
cursor: not-allowed;
|
|
41
|
+
color: ${theme.components.Tabs.disabledColor};
|
|
42
|
+
}
|
|
43
|
+
`;
|
|
44
|
+
}
|
|
45
|
+
return css`
|
|
46
|
+
border-radius: ${`${theme.components.Tabs.radius} ${theme.components.Tabs.radius} 0 0`};
|
|
47
|
+
border-width: 0 0 0.125rem 0;
|
|
48
|
+
border-style: solid;
|
|
49
|
+
border-color: transparent;
|
|
50
|
+
background: transparent;
|
|
51
|
+
color: ${theme.components.Tabs.color};
|
|
52
|
+
|
|
53
|
+
${selected && css`
|
|
54
|
+
border-color: ${theme.components.Tabs.activeColor};
|
|
55
|
+
`}
|
|
56
|
+
|
|
57
|
+
&:disabled {
|
|
58
|
+
cursor: not-allowed;
|
|
59
|
+
color: ${theme.components.Tabs.disabledColor};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&:hover:not(:disabled) {
|
|
63
|
+
color: ${theme.components.Tabs.hoverColor};
|
|
64
|
+
border-color: ${theme.components.Tabs.hoverBorderColor};
|
|
65
|
+
* {
|
|
66
|
+
color: ${theme.components.Tabs.hoverColor};
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
`;
|
|
70
|
+
};
|
|
3
71
|
const TabStyled = styled(Text).attrs({ as: "button" }).withConfig({
|
|
4
|
-
shouldForwardProp: (prop) =>
|
|
72
|
+
shouldForwardProp: (prop) => !["selected", "outline"].includes(prop)
|
|
5
73
|
})`
|
|
6
|
-
|
|
7
|
-
border-width: 0 0 0.125rem 0;
|
|
8
|
-
border-style: solid;
|
|
9
|
-
border-color: transparent;
|
|
10
|
-
background: transparent;
|
|
74
|
+
|
|
11
75
|
position: relative;
|
|
12
76
|
padding: 0.625rem;
|
|
13
77
|
white-space: nowrap;
|
|
@@ -17,27 +81,43 @@ const TabStyled = styled(Text).attrs({ as: "button" }).withConfig({
|
|
|
17
81
|
justify-content: center;
|
|
18
82
|
cursor: pointer;
|
|
19
83
|
gap: 8px;
|
|
20
|
-
color: ${({ theme }) => theme.textColor};
|
|
21
|
-
|
|
22
|
-
${({ selected, theme }) => selected && css`
|
|
23
|
-
border-color: ${theme.colors[theme.primaryColor][9]};
|
|
24
|
-
`}
|
|
25
84
|
|
|
26
|
-
|
|
27
|
-
cursor: not-allowed;
|
|
28
|
-
color: ${({ theme }) => theme.colors.gray[4]};
|
|
29
|
-
}
|
|
85
|
+
${({ theme, selected, outline }) => getTabStyled(theme, selected, outline)};
|
|
30
86
|
|
|
31
|
-
&:hover:not(:disabled) {
|
|
32
|
-
color: ${({ theme }) => theme.colors.grayViolet[9]};
|
|
33
|
-
border-color: ${({ theme }) => theme.colors[theme.primaryColor][7]};
|
|
34
|
-
* {
|
|
35
|
-
color: ${({ theme }) => theme.colors.grayViolet[9]};
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
87
|
`;
|
|
88
|
+
const getTabsListStyled = (theme, outline) => {
|
|
89
|
+
if (outline) {
|
|
90
|
+
return css`
|
|
91
|
+
position: relative;
|
|
92
|
+
&::before {
|
|
93
|
+
content: "";
|
|
94
|
+
position: absolute;
|
|
95
|
+
left: 0;
|
|
96
|
+
right: 0;
|
|
97
|
+
bottom: 0;
|
|
98
|
+
height: ${theme.components.Tabs.borderWidth};
|
|
99
|
+
background: ${theme.components.Tabs.hoverColor};
|
|
100
|
+
}
|
|
101
|
+
`;
|
|
102
|
+
}
|
|
103
|
+
if (!outline) {
|
|
104
|
+
return css`
|
|
105
|
+
&:before {
|
|
106
|
+
content: "";
|
|
107
|
+
position: absolute;
|
|
108
|
+
border-color: ${theme.components.Tabs.hoverColor};
|
|
109
|
+
border-width: ${theme.components.Tabs.borderWidth};
|
|
110
|
+
border-style: solid;
|
|
111
|
+
bottom: 0;
|
|
112
|
+
inset-inline-start: 0;
|
|
113
|
+
inset-inline-end: 0;
|
|
114
|
+
top: unset;
|
|
115
|
+
}
|
|
116
|
+
`;
|
|
117
|
+
}
|
|
118
|
+
};
|
|
39
119
|
const TabsListStyled = styled.div.withConfig({
|
|
40
|
-
shouldForwardProp: (prop) => !["justify", "isGrow"].includes(prop)
|
|
120
|
+
shouldForwardProp: (prop) => !["justify", "isGrow", "outline"].includes(prop)
|
|
41
121
|
})`
|
|
42
122
|
display: flex;
|
|
43
123
|
flex-wrap: wrap;
|
|
@@ -52,17 +132,7 @@ const TabsListStyled = styled.div.withConfig({
|
|
|
52
132
|
}
|
|
53
133
|
`};
|
|
54
134
|
|
|
55
|
-
|
|
56
|
-
content: "";
|
|
57
|
-
position: absolute;
|
|
58
|
-
border-color: ${({ theme }) => theme.colors.grayViolet[9]};
|
|
59
|
-
border-width: 0.0625rem;
|
|
60
|
-
border-style: solid;
|
|
61
|
-
bottom: 0;
|
|
62
|
-
inset-inline-start: 0;
|
|
63
|
-
inset-inline-end: 0;
|
|
64
|
-
top: unset;
|
|
65
|
-
}
|
|
135
|
+
${({ theme, outline }) => getTabsListStyled(theme, outline)}
|
|
66
136
|
`;
|
|
67
137
|
const TabPanelStyled = styled.div`
|
|
68
138
|
padding-top: 0.625rem;
|
package/dist/Tabs/types.d.ts
CHANGED
|
@@ -24,6 +24,8 @@ export interface ITabsProps {
|
|
|
24
24
|
keepMounted?: boolean;
|
|
25
25
|
/** Tab change handler */
|
|
26
26
|
onChange?: (value: string) => void;
|
|
27
|
+
/** Adds an outline border to the active tab instead of a filled background */
|
|
28
|
+
outline?: boolean;
|
|
27
29
|
}
|
|
28
30
|
export interface ITabsListProps {
|
|
29
31
|
/** <Tab> components */
|
|
@@ -36,12 +38,14 @@ export interface ITabsListProps {
|
|
|
36
38
|
justify?: "flex-start" | "flex-end" | "center" | "space-between" | "space-around";
|
|
37
39
|
}
|
|
38
40
|
export interface ITabsContext {
|
|
39
|
-
/**
|
|
41
|
+
/** Active tab value */
|
|
40
42
|
value: string | undefined;
|
|
41
|
-
/**
|
|
43
|
+
/** Keeps hidden tabs in DOM */
|
|
42
44
|
keepMounted?: boolean;
|
|
43
|
-
/**
|
|
45
|
+
/** Tab change handler */
|
|
44
46
|
onChange: (value: string) => void;
|
|
47
|
+
/** Adds an outline border to the active tab instead of a filled background */
|
|
48
|
+
outline?: boolean;
|
|
45
49
|
}
|
|
46
50
|
export interface ITabPanelProps {
|
|
47
51
|
/** Panel content */
|
package/dist/Tag/Tag.cjs.js
CHANGED
|
@@ -10,12 +10,15 @@ const Tag = ({
|
|
|
10
10
|
className,
|
|
11
11
|
closable,
|
|
12
12
|
onClickClose,
|
|
13
|
+
size = "m",
|
|
14
|
+
color,
|
|
13
15
|
...props
|
|
14
16
|
}) => {
|
|
15
17
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16
18
|
styles.TagStyled,
|
|
17
19
|
{
|
|
18
|
-
|
|
20
|
+
color,
|
|
21
|
+
size,
|
|
19
22
|
disabled,
|
|
20
23
|
onClick,
|
|
21
24
|
className,
|
package/dist/Tag/Tag.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { ITagProps } from './types';
|
|
3
|
-
declare const Tag: ({ children, disabled, icon, onClick, className, closable, onClickClose, ...props }: ITagProps) => React.ReactElement;
|
|
3
|
+
declare const Tag: ({ children, disabled, icon, onClick, className, closable, onClickClose, size, color, ...props }: ITagProps) => React.ReactElement;
|
|
4
4
|
export default Tag;
|
package/dist/Tag/Tag.es.js
CHANGED
package/dist/Tag/styles.cjs.js
CHANGED
|
@@ -2,8 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const styled = require("styled-components");
|
|
4
4
|
const Text = require("../typography/Text/Text.cjs.js");
|
|
5
|
+
const getBackground = (theme, color) => {
|
|
6
|
+
if (color && color in theme.colors) {
|
|
7
|
+
return theme.colors[color][4];
|
|
8
|
+
}
|
|
9
|
+
return theme.components.Tag.background;
|
|
10
|
+
};
|
|
5
11
|
const TagStyled = styled(Text).withConfig({
|
|
6
|
-
shouldForwardProp: (prop) => !["disabled"].includes(prop)
|
|
12
|
+
shouldForwardProp: (prop) => !["disabled", "color"].includes(prop)
|
|
7
13
|
})`
|
|
8
14
|
display: flex;
|
|
9
15
|
align-items: center;
|
|
@@ -12,15 +18,14 @@ const TagStyled = styled(Text).withConfig({
|
|
|
12
18
|
padding: 0.15rem;
|
|
13
19
|
width: max-content;
|
|
14
20
|
border-radius: 0.25rem;
|
|
15
|
-
border: 1px solid ${({ theme }) => theme.
|
|
16
|
-
background: ${({ theme }) => theme
|
|
21
|
+
border: 1px solid ${({ theme }) => theme.components.Tag.borderColor};
|
|
22
|
+
background: ${({ theme, color }) => getBackground(theme, color)};
|
|
17
23
|
|
|
18
24
|
${({ disabled, theme }) => disabled && styled.css`
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
color: ${({ theme: theme2 }) => theme2.colors.gray[4]};
|
|
25
|
+
background: ${theme.components.Tag.disabledBackground};
|
|
26
|
+
color: ${({ theme: theme2 }) => theme2.components.Tag.disabledColor};
|
|
22
27
|
* {
|
|
23
|
-
color: ${({ theme: theme2 }) => theme2.
|
|
28
|
+
color: ${({ theme: theme2 }) => theme2.components.Tag.disabledColor};
|
|
24
29
|
}
|
|
25
30
|
`}
|
|
26
31
|
`;
|
|
@@ -30,7 +35,7 @@ const TagButtonClosable = styled.button.withConfig({
|
|
|
30
35
|
cursor: pointer;
|
|
31
36
|
padding: 2px;
|
|
32
37
|
border: 1px solid
|
|
33
|
-
${({ theme, disabled }) => disabled ? theme.
|
|
38
|
+
${({ theme, disabled }) => disabled ? theme.components.Tag.disabledBackground : theme.components.Tag.disabledColor};
|
|
34
39
|
background: transparent;
|
|
35
40
|
border-radius: 0.5rem;
|
|
36
41
|
display: flex;
|
|
@@ -38,7 +43,7 @@ const TagButtonClosable = styled.button.withConfig({
|
|
|
38
43
|
justify-content: center;
|
|
39
44
|
width: 1rem;
|
|
40
45
|
height: 1rem;
|
|
41
|
-
|
|
46
|
+
|
|
42
47
|
&:disabled {
|
|
43
48
|
cursor: not-allowed;
|
|
44
49
|
}
|
package/dist/Tag/styles.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { IQuenUITheme } from '../../../theme/src';
|
|
1
2
|
export declare const TagStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('..').ITextProps, {
|
|
2
3
|
disabled?: boolean;
|
|
4
|
+
color?: keyof IQuenUITheme["colors"];
|
|
3
5
|
}>> & string & Omit<import('react').FC<import('..').ITextProps>, keyof import('react').Component<any, {}, any>>;
|
|
4
6
|
export declare const TagButtonClosable: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
5
7
|
disabled?: boolean;
|
package/dist/Tag/styles.es.js
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
2
|
import Text from "../typography/Text/Text.es.js";
|
|
3
|
+
const getBackground = (theme, color) => {
|
|
4
|
+
if (color && color in theme.colors) {
|
|
5
|
+
return theme.colors[color][4];
|
|
6
|
+
}
|
|
7
|
+
return theme.components.Tag.background;
|
|
8
|
+
};
|
|
3
9
|
const TagStyled = styled(Text).withConfig({
|
|
4
|
-
shouldForwardProp: (prop) => !["disabled"].includes(prop)
|
|
10
|
+
shouldForwardProp: (prop) => !["disabled", "color"].includes(prop)
|
|
5
11
|
})`
|
|
6
12
|
display: flex;
|
|
7
13
|
align-items: center;
|
|
@@ -10,15 +16,14 @@ const TagStyled = styled(Text).withConfig({
|
|
|
10
16
|
padding: 0.15rem;
|
|
11
17
|
width: max-content;
|
|
12
18
|
border-radius: 0.25rem;
|
|
13
|
-
border: 1px solid ${({ theme }) => theme.
|
|
14
|
-
background: ${({ theme }) => theme
|
|
19
|
+
border: 1px solid ${({ theme }) => theme.components.Tag.borderColor};
|
|
20
|
+
background: ${({ theme, color }) => getBackground(theme, color)};
|
|
15
21
|
|
|
16
22
|
${({ disabled, theme }) => disabled && css`
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
color: ${({ theme: theme2 }) => theme2.colors.gray[4]};
|
|
23
|
+
background: ${theme.components.Tag.disabledBackground};
|
|
24
|
+
color: ${({ theme: theme2 }) => theme2.components.Tag.disabledColor};
|
|
20
25
|
* {
|
|
21
|
-
color: ${({ theme: theme2 }) => theme2.
|
|
26
|
+
color: ${({ theme: theme2 }) => theme2.components.Tag.disabledColor};
|
|
22
27
|
}
|
|
23
28
|
`}
|
|
24
29
|
`;
|
|
@@ -28,7 +33,7 @@ const TagButtonClosable = styled.button.withConfig({
|
|
|
28
33
|
cursor: pointer;
|
|
29
34
|
padding: 2px;
|
|
30
35
|
border: 1px solid
|
|
31
|
-
${({ theme, disabled }) => disabled ? theme.
|
|
36
|
+
${({ theme, disabled }) => disabled ? theme.components.Tag.disabledBackground : theme.components.Tag.disabledColor};
|
|
32
37
|
background: transparent;
|
|
33
38
|
border-radius: 0.5rem;
|
|
34
39
|
display: flex;
|
|
@@ -36,7 +41,7 @@ const TagButtonClosable = styled.button.withConfig({
|
|
|
36
41
|
justify-content: center;
|
|
37
42
|
width: 1rem;
|
|
38
43
|
height: 1rem;
|
|
39
|
-
|
|
44
|
+
|
|
40
45
|
&:disabled {
|
|
41
46
|
cursor: not-allowed;
|
|
42
47
|
}
|
package/dist/Tag/types.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { IQuenUITheme } from '../../../theme/src';
|
|
3
|
+
import { TQuenSize } from '../types/size';
|
|
2
4
|
export interface ITagProps {
|
|
3
5
|
/** Disables interaction */
|
|
4
6
|
disabled?: boolean;
|
|
@@ -14,5 +16,9 @@ export interface ITagProps {
|
|
|
14
16
|
className?: string;
|
|
15
17
|
/** Content */
|
|
16
18
|
children: React.ReactNode;
|
|
19
|
+
/** Controls track height. Default size 'm' */
|
|
20
|
+
size?: TQuenSize;
|
|
21
|
+
/** Background color from theme tokens */
|
|
22
|
+
color?: keyof IQuenUITheme["colors"];
|
|
17
23
|
[key: string]: any;
|
|
18
24
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const jsxRuntime = require("react/jsx-runtime");
|
|
3
3
|
const React = require("react");
|
|
4
|
-
const
|
|
4
|
+
const helpers = require("@quen-ui/helpers");
|
|
5
5
|
const Button = require("../Button/Button.cjs.js");
|
|
6
6
|
const styles = require("./styles.cjs.js");
|
|
7
7
|
const iconClose = require("../assets/icon-close.svg.cjs.js");
|
|
@@ -25,76 +25,77 @@ const TextField = ({
|
|
|
25
25
|
clearable,
|
|
26
26
|
classNameInput,
|
|
27
27
|
type,
|
|
28
|
+
style,
|
|
28
29
|
...props
|
|
29
30
|
}) => {
|
|
30
31
|
const [focus, setFocus] = React.useState(false);
|
|
31
32
|
const inputRef = React.useRef(null);
|
|
32
33
|
const handleChange = (event) => {
|
|
33
|
-
onChange
|
|
34
|
+
onChange?.(event.target.value, event);
|
|
34
35
|
};
|
|
35
36
|
const handleClick = () => {
|
|
36
|
-
var _a;
|
|
37
37
|
setFocus(true);
|
|
38
|
-
|
|
38
|
+
inputRef.current?.click();
|
|
39
39
|
};
|
|
40
40
|
const handleBlur = (event) => {
|
|
41
41
|
setFocus(false);
|
|
42
|
-
onBlur
|
|
42
|
+
onBlur?.(event);
|
|
43
43
|
};
|
|
44
44
|
const handleClearClick = (event) => {
|
|
45
45
|
event.stopPropagation();
|
|
46
|
-
onChange
|
|
47
|
-
onClear
|
|
46
|
+
onChange?.("", event);
|
|
47
|
+
onClear?.(event);
|
|
48
48
|
};
|
|
49
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
50
|
-
|
|
49
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
50
|
+
styles.TextFieldStyled,
|
|
51
|
+
{
|
|
52
|
+
"data-testid": "text-field",
|
|
53
|
+
onClick: handleClick,
|
|
54
|
+
size,
|
|
55
|
+
error,
|
|
56
|
+
disabled,
|
|
57
|
+
className: helpers.cnMerge(className, {
|
|
58
|
+
"quen-ui__input-base--focus-input": focus
|
|
59
|
+
}),
|
|
60
|
+
rightContent,
|
|
61
|
+
leftContent,
|
|
62
|
+
id,
|
|
63
|
+
style,
|
|
51
64
|
label,
|
|
52
|
-
required
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
size: "xs",
|
|
88
|
-
onClick: handleClearClick,
|
|
89
|
-
disabled,
|
|
90
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(iconClose, { width: 16, height: 16 })
|
|
91
|
-
}
|
|
92
|
-
),
|
|
93
|
-
rightContent
|
|
94
|
-
]
|
|
95
|
-
}
|
|
96
|
-
),
|
|
97
|
-
typeof error === "string" && /* @__PURE__ */ jsxRuntime.jsx(Text, { className: "text-field__error-message", size: "xs", children: error })
|
|
98
|
-
] });
|
|
65
|
+
required,
|
|
66
|
+
children: [
|
|
67
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
68
|
+
styles.TextFieldInputStyled,
|
|
69
|
+
{
|
|
70
|
+
type,
|
|
71
|
+
disabled,
|
|
72
|
+
className: classNameInput,
|
|
73
|
+
name,
|
|
74
|
+
ref: inputRef,
|
|
75
|
+
size,
|
|
76
|
+
forwardedAs: "input",
|
|
77
|
+
value,
|
|
78
|
+
onChange: handleChange,
|
|
79
|
+
onBlur: handleBlur,
|
|
80
|
+
placeholder,
|
|
81
|
+
onFocus,
|
|
82
|
+
...props
|
|
83
|
+
}
|
|
84
|
+
),
|
|
85
|
+
clearable && /* @__PURE__ */ jsxRuntime.jsx(
|
|
86
|
+
Button,
|
|
87
|
+
{
|
|
88
|
+
"aria-label": "clear",
|
|
89
|
+
"data-testid": "clearable-button",
|
|
90
|
+
view: "icon",
|
|
91
|
+
size: "xs",
|
|
92
|
+
onClick: handleClearClick,
|
|
93
|
+
disabled,
|
|
94
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(iconClose, { width: 16, height: 16 })
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
);
|
|
99
100
|
};
|
|
100
101
|
module.exports = TextField;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { ITextFieldProps } from './types';
|
|
3
|
-
declare const TextField: ({ value, onBlur, onFocus, onChange, onClear, leftContent, rightContent, id, name, className, label, size, disabled, required, error, placeholder, clearable, classNameInput, type, ...props }: ITextFieldProps) => React.ReactElement;
|
|
3
|
+
declare const TextField: ({ value, onBlur, onFocus, onChange, onClear, leftContent, rightContent, id, name, className, label, size, disabled, required, error, placeholder, clearable, classNameInput, type, style, ...props }: ITextFieldProps) => React.ReactElement;
|
|
4
4
|
export default TextField;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useRef } from "react";
|
|
3
|
-
import
|
|
3
|
+
import { cnMerge } from "@quen-ui/helpers";
|
|
4
4
|
import Button from "../Button/Button.es.js";
|
|
5
|
-
import {
|
|
5
|
+
import { TextFieldStyled, TextFieldInputStyled } from "./styles.es.js";
|
|
6
6
|
import SvgIconClose from "../assets/icon-close.svg.es.js";
|
|
7
7
|
const TextField = ({
|
|
8
8
|
value,
|
|
@@ -24,77 +24,78 @@ const TextField = ({
|
|
|
24
24
|
clearable,
|
|
25
25
|
classNameInput,
|
|
26
26
|
type,
|
|
27
|
+
style,
|
|
27
28
|
...props
|
|
28
29
|
}) => {
|
|
29
30
|
const [focus, setFocus] = useState(false);
|
|
30
31
|
const inputRef = useRef(null);
|
|
31
32
|
const handleChange = (event) => {
|
|
32
|
-
onChange
|
|
33
|
+
onChange?.(event.target.value, event);
|
|
33
34
|
};
|
|
34
35
|
const handleClick = () => {
|
|
35
|
-
var _a;
|
|
36
36
|
setFocus(true);
|
|
37
|
-
|
|
37
|
+
inputRef.current?.click();
|
|
38
38
|
};
|
|
39
39
|
const handleBlur = (event) => {
|
|
40
40
|
setFocus(false);
|
|
41
|
-
onBlur
|
|
41
|
+
onBlur?.(event);
|
|
42
42
|
};
|
|
43
43
|
const handleClearClick = (event) => {
|
|
44
44
|
event.stopPropagation();
|
|
45
|
-
onChange
|
|
46
|
-
onClear
|
|
45
|
+
onChange?.("", event);
|
|
46
|
+
onClear?.(event);
|
|
47
47
|
};
|
|
48
|
-
return /* @__PURE__ */ jsxs(
|
|
49
|
-
|
|
48
|
+
return /* @__PURE__ */ jsxs(
|
|
49
|
+
TextFieldStyled,
|
|
50
|
+
{
|
|
51
|
+
"data-testid": "text-field",
|
|
52
|
+
onClick: handleClick,
|
|
53
|
+
size,
|
|
54
|
+
error,
|
|
55
|
+
disabled,
|
|
56
|
+
className: cnMerge(className, {
|
|
57
|
+
"quen-ui__input-base--focus-input": focus
|
|
58
|
+
}),
|
|
59
|
+
rightContent,
|
|
60
|
+
leftContent,
|
|
61
|
+
id,
|
|
62
|
+
style,
|
|
50
63
|
label,
|
|
51
|
-
required
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
size: "xs",
|
|
87
|
-
onClick: handleClearClick,
|
|
88
|
-
disabled,
|
|
89
|
-
children: /* @__PURE__ */ jsx(SvgIconClose, { width: 16, height: 16 })
|
|
90
|
-
}
|
|
91
|
-
),
|
|
92
|
-
rightContent
|
|
93
|
-
]
|
|
94
|
-
}
|
|
95
|
-
),
|
|
96
|
-
typeof error === "string" && /* @__PURE__ */ jsx(Text, { className: "text-field__error-message", size: "xs", children: error })
|
|
97
|
-
] });
|
|
64
|
+
required,
|
|
65
|
+
children: [
|
|
66
|
+
/* @__PURE__ */ jsx(
|
|
67
|
+
TextFieldInputStyled,
|
|
68
|
+
{
|
|
69
|
+
type,
|
|
70
|
+
disabled,
|
|
71
|
+
className: classNameInput,
|
|
72
|
+
name,
|
|
73
|
+
ref: inputRef,
|
|
74
|
+
size,
|
|
75
|
+
forwardedAs: "input",
|
|
76
|
+
value,
|
|
77
|
+
onChange: handleChange,
|
|
78
|
+
onBlur: handleBlur,
|
|
79
|
+
placeholder,
|
|
80
|
+
onFocus,
|
|
81
|
+
...props
|
|
82
|
+
}
|
|
83
|
+
),
|
|
84
|
+
clearable && /* @__PURE__ */ jsx(
|
|
85
|
+
Button,
|
|
86
|
+
{
|
|
87
|
+
"aria-label": "clear",
|
|
88
|
+
"data-testid": "clearable-button",
|
|
89
|
+
view: "icon",
|
|
90
|
+
size: "xs",
|
|
91
|
+
onClick: handleClearClick,
|
|
92
|
+
disabled,
|
|
93
|
+
children: /* @__PURE__ */ jsx(SvgIconClose, { width: 16, height: 16 })
|
|
94
|
+
}
|
|
95
|
+
)
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
);
|
|
98
99
|
};
|
|
99
100
|
export {
|
|
100
101
|
TextField as default
|