@chayns-components/core 5.0.0-beta.49 → 5.0.0-beta.492
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 +3 -19
- package/lib/api/image/post.d.ts +14 -0
- package/lib/api/image/post.js +33 -0
- package/lib/api/image/post.js.map +1 -0
- package/lib/api/signature/delete.d.ts +1 -0
- package/lib/api/signature/delete.js +27 -0
- package/lib/api/signature/delete.js.map +1 -0
- package/lib/api/signature/get.d.ts +1 -0
- package/lib/api/signature/get.js +33 -0
- package/lib/api/signature/get.js.map +1 -0
- package/lib/api/signature/put.d.ts +1 -0
- package/lib/api/signature/put.js +31 -0
- package/lib/api/signature/put.js.map +1 -0
- package/lib/api/theme/get.d.ts +2 -0
- package/lib/api/theme/get.js +14 -0
- package/lib/api/theme/get.js.map +1 -0
- package/lib/api/video/post.d.ts +15 -0
- package/lib/api/video/post.js +30 -0
- package/lib/api/video/post.js.map +1 -0
- package/lib/components/accordion/Accordion.d.ts +21 -6
- package/lib/components/accordion/Accordion.js +78 -54
- package/lib/components/accordion/Accordion.js.map +1 -1
- package/lib/components/accordion/Accordion.styles.d.ts +11 -7
- package/lib/components/accordion/Accordion.styles.js +66 -53
- package/lib/components/accordion/Accordion.styles.js.map +1 -1
- package/lib/components/accordion/accordion-body/AccordionBody.d.ts +9 -1
- package/lib/components/accordion/accordion-body/AccordionBody.js +12 -20
- package/lib/components/accordion/accordion-body/AccordionBody.js.map +1 -1
- package/lib/components/accordion/accordion-body/AccordionBody.styles.d.ts +268 -3
- package/lib/components/accordion/accordion-body/AccordionBody.styles.js +6 -15
- package/lib/components/accordion/accordion-body/AccordionBody.styles.js.map +1 -1
- package/lib/components/accordion/accordion-content/AccordionContent.js +8 -16
- package/lib/components/accordion/accordion-content/AccordionContent.js.map +1 -1
- package/lib/components/accordion/accordion-content/AccordionContent.styles.d.ts +8 -6
- package/lib/components/accordion/accordion-content/AccordionContent.styles.js +7 -16
- package/lib/components/accordion/accordion-content/AccordionContent.styles.js.map +1 -1
- package/lib/components/accordion/accordion-group/AccordionGroup.d.ts +9 -2
- package/lib/components/accordion/accordion-group/AccordionGroup.js +15 -20
- package/lib/components/accordion/accordion-group/AccordionGroup.js.map +1 -1
- package/lib/components/accordion/accordion-head/AccordionHead.d.ts +2 -0
- package/lib/components/accordion/accordion-head/AccordionHead.js +45 -40
- package/lib/components/accordion/accordion-head/AccordionHead.js.map +1 -1
- package/lib/components/accordion/accordion-head/AccordionHead.styles.d.ts +2424 -15
- package/lib/components/accordion/accordion-head/AccordionHead.styles.js +70 -61
- package/lib/components/accordion/accordion-head/AccordionHead.styles.js.map +1 -1
- package/lib/components/accordion/accordion-intro/AccordionIntro.js +4 -12
- package/lib/components/accordion/accordion-intro/AccordionIntro.js.map +1 -1
- package/lib/components/accordion/accordion-intro/AccordionIntro.styles.d.ts +2 -1
- package/lib/components/accordion/accordion-intro/AccordionIntro.styles.js +2 -10
- package/lib/components/accordion/accordion-intro/AccordionIntro.styles.js.map +1 -1
- package/lib/components/accordion/accordion-item/AccordionItem.d.ts +9 -0
- package/lib/components/accordion/accordion-item/AccordionItem.js +20 -0
- package/lib/components/accordion/accordion-item/AccordionItem.js.map +1 -0
- package/lib/components/accordion/accordion-item/AccordionItem.styles.d.ts +7 -0
- package/lib/components/accordion/accordion-item/AccordionItem.styles.js +26 -0
- package/lib/components/accordion/accordion-item/AccordionItem.styles.js.map +1 -0
- package/lib/components/amount-control/AmountControl.d.ts +26 -0
- package/lib/components/amount-control/AmountControl.js +179 -0
- package/lib/components/amount-control/AmountControl.js.map +1 -0
- package/lib/components/amount-control/AmountControl.styles.d.ts +288 -0
- package/lib/components/amount-control/AmountControl.styles.js +50 -0
- package/lib/components/amount-control/AmountControl.styles.js.map +1 -0
- package/lib/components/badge/Badge.d.ts +5 -1
- package/lib/components/badge/Badge.js +12 -17
- package/lib/components/badge/Badge.js.map +1 -1
- package/lib/components/badge/Badge.styles.d.ts +9 -4
- package/lib/components/badge/Badge.styles.js +12 -14
- package/lib/components/badge/Badge.styles.js.map +1 -1
- package/lib/components/button/Button.d.ts +5 -1
- package/lib/components/button/Button.js +71 -20
- package/lib/components/button/Button.js.map +1 -1
- package/lib/components/button/Button.styles.d.ts +813 -6
- package/lib/components/button/Button.styles.js +44 -26
- package/lib/components/button/Button.styles.js.map +1 -1
- package/lib/components/checkbox/Checkbox.d.ts +10 -2
- package/lib/components/checkbox/Checkbox.js +19 -22
- package/lib/components/checkbox/Checkbox.js.map +1 -1
- package/lib/components/checkbox/Checkbox.styles.d.ts +12 -5
- package/lib/components/checkbox/Checkbox.styles.js +70 -63
- package/lib/components/checkbox/Checkbox.styles.js.map +1 -1
- package/lib/components/color-scheme-provider/ColorSchemeProvider.d.ts +6 -0
- package/lib/components/color-scheme-provider/ColorSchemeProvider.js +77 -40
- package/lib/components/color-scheme-provider/ColorSchemeProvider.js.map +1 -1
- package/lib/components/combobox/ComboBox.d.ts +44 -0
- package/lib/components/combobox/ComboBox.js +183 -0
- package/lib/components/combobox/ComboBox.js.map +1 -0
- package/lib/components/combobox/ComboBox.styles.d.ts +291 -0
- package/lib/components/combobox/ComboBox.styles.js +198 -0
- package/lib/components/combobox/ComboBox.styles.js.map +1 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.d.ts +13 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.js +33 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.js.map +1 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.styles.d.ts +12 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.styles.js +54 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.styles.js.map +1 -0
- package/lib/components/content-card/ContentCard.d.ts +13 -0
- package/lib/components/content-card/ContentCard.js +14 -0
- package/lib/components/content-card/ContentCard.js.map +1 -0
- package/lib/components/content-card/ContentCard.styles.d.ts +2 -0
- package/lib/components/content-card/ContentCard.styles.js +32 -0
- package/lib/components/content-card/ContentCard.styles.js.map +1 -0
- package/lib/components/context-menu/ContextMenu.d.ts +3 -3
- package/lib/components/context-menu/ContextMenu.js +43 -53
- package/lib/components/context-menu/ContextMenu.js.map +1 -1
- package/lib/components/context-menu/ContextMenu.styles.d.ts +2 -1
- package/lib/components/context-menu/ContextMenu.styles.js +2 -10
- package/lib/components/context-menu/ContextMenu.styles.js.map +1 -1
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.d.ts +1 -1
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.js +17 -23
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.js.map +1 -1
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.styles.d.ts +275 -10
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.styles.js +25 -38
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.styles.js.map +1 -1
- package/lib/components/file-input/FileInput.d.ts +29 -0
- package/lib/components/file-input/FileInput.js +112 -0
- package/lib/components/file-input/FileInput.js.map +1 -0
- package/lib/components/file-input/FileInput.styles.d.ts +277 -0
- package/lib/components/file-input/FileInput.styles.js +39 -0
- package/lib/components/file-input/FileInput.styles.js.map +1 -0
- package/lib/components/file-input/file-list/FileListItem.d.ts +9 -0
- package/lib/components/file-input/file-list/FileListItem.js +27 -0
- package/lib/components/file-input/file-list/FileListItem.js.map +1 -0
- package/lib/components/file-input/file-list/FileListItem.styles.d.ts +2 -0
- package/lib/components/file-input/file-list/FileListItem.styles.js +3 -0
- package/lib/components/file-input/file-list/FileListItem.styles.js.map +1 -0
- package/lib/components/filter-buttons/FilterButtons.d.ts +22 -0
- package/lib/components/filter-buttons/FilterButtons.js +79 -0
- package/lib/components/filter-buttons/FilterButtons.js.map +1 -0
- package/lib/components/filter-buttons/FilterButtons.styles.d.ts +2 -0
- package/lib/components/filter-buttons/FilterButtons.styles.js +7 -0
- package/lib/components/filter-buttons/FilterButtons.styles.js.map +1 -0
- package/lib/components/filter-buttons/filter-button/FilterButton.d.ts +14 -0
- package/lib/components/filter-buttons/filter-button/FilterButton.js +38 -0
- package/lib/components/filter-buttons/filter-button/FilterButton.js.map +1 -0
- package/lib/components/filter-buttons/filter-button/FilterButton.styles.d.ts +287 -0
- package/lib/components/filter-buttons/filter-button/FilterButton.styles.js +98 -0
- package/lib/components/filter-buttons/filter-button/FilterButton.styles.js.map +1 -0
- package/lib/components/grid-image/GridImage.js +20 -29
- package/lib/components/grid-image/GridImage.js.map +1 -1
- package/lib/components/grid-image/GridImage.styles.d.ts +15 -14
- package/lib/components/grid-image/GridImage.styles.js +21 -32
- package/lib/components/grid-image/GridImage.styles.js.map +1 -1
- package/lib/components/icon/Icon.js +22 -25
- package/lib/components/icon/Icon.js.map +1 -1
- package/lib/components/icon/Icon.styles.d.ts +13 -12
- package/lib/components/icon/Icon.styles.js +23 -33
- package/lib/components/icon/Icon.styles.js.map +1 -1
- package/lib/components/input/Input.d.ts +42 -2
- package/lib/components/input/Input.js +96 -29
- package/lib/components/input/Input.js.map +1 -1
- package/lib/components/input/Input.styles.d.ts +559 -7
- package/lib/components/input/Input.styles.js +118 -41
- package/lib/components/input/Input.styles.js.map +1 -1
- package/lib/components/list/List.d.ts +6 -0
- package/lib/components/list/List.js +24 -24
- package/lib/components/list/List.js.map +1 -1
- package/lib/components/list/list-item/ListItem.d.ts +1 -1
- package/lib/components/list/list-item/ListItem.js +37 -30
- package/lib/components/list/list-item/ListItem.js.map +1 -1
- package/lib/components/list/list-item/ListItem.styles.d.ts +272 -6
- package/lib/components/list/list-item/ListItem.styles.js +32 -39
- package/lib/components/list/list-item/ListItem.styles.js.map +1 -1
- package/lib/components/list/list-item/list-item-body/ListItemBody.d.ts +6 -2
- package/lib/components/list/list-item/list-item-body/ListItemBody.js +28 -15
- package/lib/components/list/list-item/list-item-body/ListItemBody.js.map +1 -1
- package/lib/components/list/list-item/list-item-body/ListItemBody.styles.d.ts +267 -1
- package/lib/components/list/list-item/list-item-body/ListItemBody.styles.js +3 -11
- package/lib/components/list/list-item/list-item-body/ListItemBody.styles.js.map +1 -1
- package/lib/components/list/list-item/list-item-content/ListItemContent.d.ts +8 -2
- package/lib/components/list/list-item/list-item-content/ListItemContent.js +4 -12
- package/lib/components/list/list-item/list-item-content/ListItemContent.js.map +1 -1
- package/lib/components/list/list-item/list-item-content/ListItemContent.styles.d.ts +2 -1
- package/lib/components/list/list-item/list-item-content/ListItemContent.styles.js +2 -10
- package/lib/components/list/list-item/list-item-content/ListItemContent.styles.js.map +1 -1
- package/lib/components/list/list-item/list-item-head/ListItemHead.js +25 -35
- package/lib/components/list/list-item/list-item-head/ListItemHead.js.map +1 -1
- package/lib/components/list/list-item/list-item-head/ListItemHead.styles.d.ts +546 -16
- package/lib/components/list/list-item/list-item-head/ListItemHead.styles.js +19 -38
- package/lib/components/list/list-item/list-item-head/ListItemHead.styles.js.map +1 -1
- package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.js +5 -13
- package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.js.map +1 -1
- package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.styles.d.ts +2 -1
- package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.styles.js +2 -10
- package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.styles.js.map +1 -1
- package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.js +11 -21
- package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.js.map +1 -1
- package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.d.ts +8 -7
- package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.js +7 -16
- package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.js.map +1 -1
- package/lib/components/mention-finder/MentionFinder.d.ts +31 -0
- package/lib/components/mention-finder/MentionFinder.js +130 -0
- package/lib/components/mention-finder/MentionFinder.js.map +1 -0
- package/lib/components/mention-finder/MentionFinder.styles.d.ts +272 -0
- package/lib/components/mention-finder/MentionFinder.styles.js +84 -0
- package/lib/components/mention-finder/MentionFinder.styles.js.map +1 -0
- package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.d.ts +10 -0
- package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.js +23 -0
- package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.js.map +1 -0
- package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.styles.d.ts +11 -0
- package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.styles.js +83 -0
- package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.styles.js.map +1 -0
- package/lib/components/number-input/NumberInput.d.ts +54 -0
- package/lib/components/number-input/NumberInput.js +133 -0
- package/lib/components/number-input/NumberInput.js.map +1 -0
- package/lib/components/popup/Popup.d.ts +30 -0
- package/lib/components/popup/Popup.js +150 -0
- package/lib/components/popup/Popup.js.map +1 -0
- package/lib/components/popup/Popup.styles.d.ts +5 -0
- package/lib/components/popup/Popup.styles.js +21 -0
- package/lib/components/popup/Popup.styles.js.map +1 -0
- package/lib/components/popup/popup-content/PopupContent.d.ts +10 -0
- package/lib/components/popup/popup-content/PopupContent.js +64 -0
- package/lib/components/popup/popup-content/PopupContent.js.map +1 -0
- package/lib/components/popup/popup-content/PopupContent.styles.d.ts +274 -0
- package/lib/components/popup/popup-content/PopupContent.styles.js +84 -0
- package/lib/components/popup/popup-content/PopupContent.styles.js.map +1 -0
- package/lib/components/progress-bar/ProgressBar.d.ts +13 -0
- package/lib/components/progress-bar/ProgressBar.js +31 -0
- package/lib/components/progress-bar/ProgressBar.js.map +1 -0
- package/lib/components/progress-bar/ProgressBar.styles.d.ts +272 -0
- package/lib/components/progress-bar/ProgressBar.styles.js +30 -0
- package/lib/components/progress-bar/ProgressBar.styles.js.map +1 -0
- package/lib/components/radio-button/RadioButton.d.ts +30 -0
- package/lib/components/radio-button/RadioButton.js +92 -0
- package/lib/components/radio-button/RadioButton.js.map +1 -0
- package/lib/components/radio-button/RadioButton.styles.d.ts +287 -0
- package/lib/components/radio-button/RadioButton.styles.js +105 -0
- package/lib/components/radio-button/RadioButton.styles.js.map +1 -0
- package/lib/components/radio-button/radio-button-group/RadioButtonGroup.d.ts +17 -0
- package/lib/components/radio-button/radio-button-group/RadioButtonGroup.js +38 -0
- package/lib/components/radio-button/radio-button-group/RadioButtonGroup.js.map +1 -0
- package/lib/components/scroll-view/ScrollView.d.ts +13 -0
- package/lib/components/scroll-view/ScrollView.js +19 -0
- package/lib/components/scroll-view/ScrollView.js.map +1 -0
- package/lib/components/scroll-view/ScrollView.styles.d.ts +9 -0
- package/lib/components/scroll-view/ScrollView.styles.js +41 -0
- package/lib/components/scroll-view/ScrollView.styles.js.map +1 -0
- package/lib/components/search-box/SearchBox.d.ts +41 -0
- package/lib/components/search-box/SearchBox.js +271 -0
- package/lib/components/search-box/SearchBox.js.map +1 -0
- package/lib/components/search-box/SearchBox.styles.d.ts +274 -0
- package/lib/components/search-box/SearchBox.styles.js +71 -0
- package/lib/components/search-box/SearchBox.styles.js.map +1 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.d.ts +11 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.js +27 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.js.map +1 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.styles.d.ts +13 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.styles.js +55 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.styles.js.map +1 -0
- package/lib/components/search-input/SearchInput.d.ts +33 -0
- package/lib/components/search-input/SearchInput.js +93 -0
- package/lib/components/search-input/SearchInput.js.map +1 -0
- package/lib/components/search-input/SearchInput.styles.d.ts +534 -0
- package/lib/components/search-input/SearchInput.styles.js +19 -0
- package/lib/components/search-input/SearchInput.styles.js.map +1 -0
- package/lib/components/select-button/SelectButton.d.ts +34 -0
- package/lib/components/select-button/SelectButton.js +56 -0
- package/lib/components/select-button/SelectButton.js.map +1 -0
- package/lib/components/select-button/SelectButton.styles.d.ts +2 -0
- package/lib/components/select-button/SelectButton.styles.js +3 -0
- package/lib/components/select-button/SelectButton.styles.js.map +1 -0
- package/lib/components/setup-wizard/SetupWizard.d.ts +27 -0
- package/lib/components/setup-wizard/SetupWizard.js +73 -0
- package/lib/components/setup-wizard/SetupWizard.js.map +1 -0
- package/lib/components/setup-wizard/SetupWizard.styles.d.ts +2 -0
- package/lib/components/setup-wizard/SetupWizard.styles.js +3 -0
- package/lib/components/setup-wizard/SetupWizard.styles.js.map +1 -0
- package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.d.ts +21 -0
- package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.js +49 -0
- package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.js.map +1 -0
- package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.styles.d.ts +3 -0
- package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.styles.js +7 -0
- package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.styles.js.map +1 -0
- package/lib/components/sharing-bar/SharingBar.d.ts +18 -0
- package/lib/components/sharing-bar/SharingBar.js +101 -0
- package/lib/components/sharing-bar/SharingBar.js.map +1 -0
- package/lib/components/sharing-bar/SharingBar.styles.d.ts +6 -0
- package/lib/components/sharing-bar/SharingBar.styles.js +17 -0
- package/lib/components/sharing-bar/SharingBar.styles.js.map +1 -0
- package/lib/components/signature/Signature.d.ts +33 -0
- package/lib/components/signature/Signature.js +95 -0
- package/lib/components/signature/Signature.js.map +1 -0
- package/lib/components/signature/Signature.styles.d.ts +5 -0
- package/lib/components/signature/Signature.styles.js +14 -0
- package/lib/components/signature/Signature.styles.js.map +1 -0
- package/lib/components/slider/Slider.d.ts +45 -0
- package/lib/components/slider/Slider.js +181 -0
- package/lib/components/slider/Slider.js.map +1 -0
- package/lib/components/slider/Slider.styles.d.ts +16 -0
- package/lib/components/slider/Slider.styles.js +98 -0
- package/lib/components/slider/Slider.styles.js.map +1 -0
- package/lib/components/slider-button/SliderButton.d.ts +23 -0
- package/lib/components/slider-button/SliderButton.js +148 -0
- package/lib/components/slider-button/SliderButton.js.map +1 -0
- package/lib/components/slider-button/SliderButton.styles.d.ts +279 -0
- package/lib/components/slider-button/SliderButton.styles.js +62 -0
- package/lib/components/slider-button/SliderButton.styles.js.map +1 -0
- package/lib/components/small-wait-cursor/SmallWaitCursor.d.ts +31 -0
- package/lib/components/small-wait-cursor/SmallWaitCursor.js +36 -0
- package/lib/components/small-wait-cursor/SmallWaitCursor.js.map +1 -0
- package/lib/components/small-wait-cursor/SmallWaitCursor.styles.d.ts +19 -0
- package/lib/components/small-wait-cursor/SmallWaitCursor.styles.js +93 -0
- package/lib/components/small-wait-cursor/SmallWaitCursor.styles.js.map +1 -0
- package/lib/components/tag-input/TagInput.d.ts +22 -0
- package/lib/components/tag-input/TagInput.js +79 -0
- package/lib/components/tag-input/TagInput.js.map +1 -0
- package/lib/components/tag-input/TagInput.styles.d.ts +9 -0
- package/lib/components/tag-input/TagInput.styles.js +41 -0
- package/lib/components/tag-input/TagInput.styles.js.map +1 -0
- package/lib/components/text-area/TextArea.d.ts +29 -0
- package/lib/components/text-area/TextArea.js +49 -0
- package/lib/components/text-area/TextArea.js.map +1 -0
- package/lib/components/text-area/TextArea.styles.d.ts +16 -0
- package/lib/components/text-area/TextArea.styles.js +101 -0
- package/lib/components/text-area/TextArea.styles.js.map +1 -0
- package/lib/components/tooltip/Tooltip.d.ts +22 -0
- package/lib/components/tooltip/Tooltip.js +33 -0
- package/lib/components/tooltip/Tooltip.js.map +1 -0
- package/lib/components/tooltip/Tooltip.styles.d.ts +2 -0
- package/lib/components/tooltip/Tooltip.styles.js +3 -0
- package/lib/components/tooltip/Tooltip.styles.js.map +1 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.d.ts +13 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.js +22 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.js.map +1 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.styles.d.ts +15 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.styles.js +36 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.styles.js.map +1 -0
- package/lib/components/truncation/Truncation.d.ts +34 -0
- package/lib/components/truncation/Truncation.js +132 -0
- package/lib/components/truncation/Truncation.js.map +1 -0
- package/lib/components/truncation/Truncation.styles.d.ts +277 -0
- package/lib/components/truncation/Truncation.styles.js +44 -0
- package/lib/components/truncation/Truncation.styles.js.map +1 -0
- package/lib/constants/mentionFinder.d.ts +4 -0
- package/lib/constants/mentionFinder.js +6 -0
- package/lib/constants/mentionFinder.js.map +1 -0
- package/lib/constants/numberInput.d.ts +5 -0
- package/lib/constants/numberInput.js +6 -0
- package/lib/constants/numberInput.js.map +1 -0
- package/lib/constants/signature.d.ts +1 -0
- package/lib/constants/signature.js +2 -0
- package/lib/constants/signature.js.map +1 -0
- package/lib/hooks/useElementSize.d.ts +2 -0
- package/lib/hooks/useElementSize.js +9 -0
- package/lib/hooks/useElementSize.js.map +1 -0
- package/lib/hooks/uuid.js +4 -11
- package/lib/hooks/uuid.js.map +1 -1
- package/lib/index.d.ts +44 -1
- package/lib/index.js +49 -111
- package/lib/index.js.map +1 -1
- package/lib/types/chayns.d.ts +67 -1
- package/lib/types/chayns.js +3 -10
- package/lib/types/chayns.js.map +1 -1
- package/lib/types/colorSchemeProvider.d.ts +15 -0
- package/lib/types/colorSchemeProvider.js +9 -0
- package/lib/types/colorSchemeProvider.js.map +1 -0
- package/lib/types/comboBox.d.ts +4 -0
- package/lib/types/comboBox.js +6 -0
- package/lib/types/comboBox.js.map +1 -0
- package/lib/{components/context-menu/constants/alignment.js → types/contextMenu.js} +4 -11
- package/lib/types/contextMenu.js.map +1 -0
- package/lib/types/file.d.ts +46 -0
- package/lib/types/file.js +2 -0
- package/lib/types/file.js.map +1 -0
- package/lib/types/filterButtons.d.ts +15 -0
- package/lib/types/filterButtons.js +11 -0
- package/lib/types/filterButtons.js.map +1 -0
- package/lib/types/popup.d.ts +16 -0
- package/lib/types/popup.js +10 -0
- package/lib/types/popup.js.map +1 -0
- package/lib/types/radioButton.d.ts +4 -0
- package/lib/types/radioButton.js +2 -0
- package/lib/types/radioButton.js.map +1 -0
- package/lib/types/searchBox.d.ts +5 -0
- package/lib/types/searchBox.js +2 -0
- package/lib/types/searchBox.js.map +1 -0
- package/lib/types/selectButton.d.ts +4 -0
- package/lib/types/selectButton.js +2 -0
- package/lib/types/selectButton.js.map +1 -0
- package/lib/types/signature.d.ts +10 -0
- package/lib/types/signature.js +2 -0
- package/lib/types/signature.js.map +1 -0
- package/lib/types/slider-button.d.ts +4 -0
- package/lib/types/slider-button.js +2 -0
- package/lib/types/slider-button.js.map +1 -0
- package/lib/types/tagInput.d.ts +4 -0
- package/lib/types/tagInput.js +2 -0
- package/lib/types/tagInput.js.map +1 -0
- package/lib/types/tooltip.d.ts +9 -0
- package/lib/types/tooltip.js +2 -0
- package/lib/types/tooltip.js.map +1 -0
- package/lib/types/truncation.d.ts +5 -0
- package/lib/types/truncation.js +7 -0
- package/lib/types/truncation.js.map +1 -0
- package/lib/{components/accordion/utils.js → utils/accordion.js} +2 -9
- package/lib/utils/accordion.js.map +1 -0
- package/lib/utils/amountControl.d.ts +7 -0
- package/lib/utils/amountControl.js +15 -0
- package/lib/utils/amountControl.js.map +1 -0
- package/lib/utils/calculate.d.ts +6 -0
- package/lib/utils/calculate.js +80 -0
- package/lib/utils/calculate.js.map +1 -0
- package/lib/utils/file.d.ts +363 -0
- package/lib/utils/file.js +393 -0
- package/lib/utils/file.js.map +1 -0
- package/lib/utils/fileDialog.d.ts +7 -0
- package/lib/utils/fileDialog.js +65 -0
- package/lib/utils/fileDialog.js.map +1 -0
- package/lib/utils/font.d.ts +8 -0
- package/lib/utils/font.js +67 -0
- package/lib/utils/font.js.map +1 -0
- package/lib/utils/icon.js +5 -0
- package/lib/utils/icon.js.map +1 -0
- package/lib/utils/isTobitEmployee.d.ts +1 -0
- package/lib/utils/isTobitEmployee.js +21 -0
- package/lib/utils/isTobitEmployee.js.map +1 -0
- package/lib/utils/numberInput.d.ts +23 -0
- package/lib/utils/numberInput.js +83 -0
- package/lib/utils/numberInput.js.map +1 -0
- package/lib/utils/searchBox.d.ts +7 -0
- package/lib/utils/searchBox.js +16 -0
- package/lib/utils/searchBox.js.map +1 -0
- package/lib/utils/slider.d.ts +7 -0
- package/lib/utils/slider.js +28 -0
- package/lib/utils/slider.js.map +1 -0
- package/lib/utils/sliderButton.d.ts +15 -0
- package/lib/utils/sliderButton.js +45 -0
- package/lib/utils/sliderButton.js.map +1 -0
- package/lib/utils/truncation.d.ts +1 -0
- package/lib/utils/truncation.js +27 -0
- package/lib/utils/truncation.js.map +1 -0
- package/lib/utils/uploadFile.d.ts +7 -0
- package/lib/utils/uploadFile.js +35 -0
- package/lib/utils/uploadFile.js.map +1 -0
- package/package.json +32 -21
- package/lib/components/accordion/utils.js.map +0 -1
- package/lib/components/context-menu/constants/alignment.js.map +0 -1
- package/lib/components/icon/utils.js +0 -13
- package/lib/components/icon/utils.js.map +0 -1
- /package/lib/{components/context-menu/constants/alignment.d.ts → types/contextMenu.d.ts} +0 -0
- /package/lib/{components/accordion/utils.d.ts → utils/accordion.d.ts} +0 -0
- /package/lib/{components/icon/utils.d.ts → utils/icon.d.ts} +0 -0
|
@@ -1,72 +1,109 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _styledComponents = require("styled-components");
|
|
10
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
11
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
12
|
-
var ColorMode;
|
|
13
|
-
(function (ColorMode) {
|
|
1
|
+
import { getAvailableColorList, getColorFromPalette, hexToRgb255 } from '@chayns/colors';
|
|
2
|
+
import { useSite } from 'chayns-api';
|
|
3
|
+
import React, { useEffect, useState } from 'react';
|
|
4
|
+
import { createGlobalStyle, ThemeProvider } from 'styled-components';
|
|
5
|
+
import { getDesignSettings } from '../../api/theme/get';
|
|
6
|
+
import { convertIconStyle, generateFontFaces } from '../../utils/font';
|
|
7
|
+
var ColorMode = /*#__PURE__*/function (ColorMode) {
|
|
14
8
|
ColorMode[ColorMode["Classic"] = 0] = "Classic";
|
|
15
9
|
ColorMode[ColorMode["Dark"] = 1] = "Dark";
|
|
16
10
|
ColorMode[ColorMode["Light"] = 2] = "Light";
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
return ColorMode;
|
|
12
|
+
}(ColorMode || {}); // ToDo remove type after the framer-motion bug is Fixed
|
|
13
|
+
const GlobalStyle = createGlobalStyle`
|
|
14
|
+
${generateFontFaces}
|
|
19
15
|
.ellipsis {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
text-overflow: ellipsis;
|
|
18
|
+
white-space: nowrap;
|
|
23
19
|
}
|
|
24
20
|
`;
|
|
25
21
|
const ColorSchemeProvider = _ref => {
|
|
26
22
|
let {
|
|
27
23
|
children,
|
|
28
|
-
color
|
|
29
|
-
colorMode
|
|
24
|
+
color,
|
|
25
|
+
colorMode,
|
|
30
26
|
cssVariables = {},
|
|
31
27
|
secondaryColor,
|
|
32
|
-
style = {}
|
|
28
|
+
style = {},
|
|
29
|
+
designSettings
|
|
33
30
|
} = _ref;
|
|
34
|
-
const [colors, setColors] =
|
|
35
|
-
const [
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
const [colors, setColors] = useState({});
|
|
32
|
+
const [theme, setTheme] = useState({});
|
|
33
|
+
const [internalDesignSettings, setInternalDesignSettings] = useState();
|
|
34
|
+
|
|
35
|
+
// Empty object is used to prevent error if ColorSchemeProvider is rendered on server
|
|
36
|
+
const {
|
|
37
|
+
color: internalColor,
|
|
38
|
+
colorMode: internalColorMode
|
|
39
|
+
} = useSite() ?? {};
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
if (designSettings) {
|
|
42
|
+
setInternalDesignSettings(designSettings);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
void getDesignSettings().then(result => {
|
|
46
|
+
setInternalDesignSettings(result);
|
|
47
|
+
});
|
|
48
|
+
}, [designSettings]);
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
const availableColors = getAvailableColorList();
|
|
38
51
|
const newColors = {};
|
|
39
|
-
const
|
|
52
|
+
const newTheme = {};
|
|
40
53
|
availableColors.forEach(colorName => {
|
|
41
|
-
const hexColor =
|
|
42
|
-
color,
|
|
43
|
-
colorMode,
|
|
54
|
+
const hexColor = getColorFromPalette(colorName, {
|
|
55
|
+
color: color ?? internalColor,
|
|
56
|
+
colorMode: colorMode ?? internalColorMode,
|
|
44
57
|
secondaryColor
|
|
45
58
|
});
|
|
46
59
|
if (hexColor) {
|
|
47
|
-
const rgbColor =
|
|
60
|
+
const rgbColor = hexToRgb255(hexColor);
|
|
48
61
|
newColors[`--chayns-color--${colorName}`] = hexColor;
|
|
49
|
-
|
|
62
|
+
newTheme[colorName] = hexColor;
|
|
50
63
|
if (rgbColor) {
|
|
51
64
|
newColors[`--chayns-color-rgb--${colorName}`] = `${rgbColor.r}, ${rgbColor.g}, ${rgbColor.b}`;
|
|
52
|
-
|
|
65
|
+
newTheme[`${colorName}-rgb`] = `${rgbColor.r}, ${rgbColor.g}, ${rgbColor.b}`;
|
|
53
66
|
}
|
|
54
67
|
}
|
|
55
68
|
});
|
|
69
|
+
switch (colorMode ?? internalColorMode) {
|
|
70
|
+
case ColorMode.Light:
|
|
71
|
+
newTheme.colorMode = 'light';
|
|
72
|
+
break;
|
|
73
|
+
case ColorMode.Dark:
|
|
74
|
+
newTheme.colorMode = 'dark';
|
|
75
|
+
break;
|
|
76
|
+
default:
|
|
77
|
+
newTheme.colorMode = 'classic';
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
if (internalDesignSettings) {
|
|
81
|
+
Object.keys(internalDesignSettings).forEach(key => {
|
|
82
|
+
if (key === 'iconStyle') {
|
|
83
|
+
newTheme[key] = convertIconStyle(internalDesignSettings.iconStyle);
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// ToDo: Find better solution
|
|
88
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
89
|
+
// @ts-ignore
|
|
90
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
91
|
+
newTheme[key] = internalDesignSettings[key];
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
setTheme(newTheme);
|
|
56
95
|
setColors(newColors);
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
96
|
+
}, [color, colorMode, internalColor, internalColorMode, internalDesignSettings, secondaryColor]);
|
|
97
|
+
return /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
98
|
+
theme: theme
|
|
99
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
62
100
|
style: {
|
|
63
101
|
...colors,
|
|
64
102
|
...cssVariables,
|
|
65
103
|
...style
|
|
66
104
|
}
|
|
67
|
-
}, children), /*#__PURE__*/
|
|
105
|
+
}, children), /*#__PURE__*/React.createElement(GlobalStyle, null));
|
|
68
106
|
};
|
|
69
107
|
ColorSchemeProvider.displayName = 'ColorSchemeProvider';
|
|
70
|
-
|
|
71
|
-
exports.default = _default;
|
|
108
|
+
export default ColorSchemeProvider;
|
|
72
109
|
//# sourceMappingURL=ColorSchemeProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorSchemeProvider.js","names":["
|
|
1
|
+
{"version":3,"file":"ColorSchemeProvider.js","names":["getAvailableColorList","getColorFromPalette","hexToRgb255","useSite","React","useEffect","useState","createGlobalStyle","ThemeProvider","getDesignSettings","convertIconStyle","generateFontFaces","ColorMode","GlobalStyle","ColorSchemeProvider","_ref","children","color","colorMode","cssVariables","secondaryColor","style","designSettings","colors","setColors","theme","setTheme","internalDesignSettings","setInternalDesignSettings","internalColor","internalColorMode","then","result","availableColors","newColors","newTheme","forEach","colorName","hexColor","rgbColor","r","g","b","Light","Dark","Object","keys","key","iconStyle","createElement","displayName"],"sources":["../../../src/components/color-scheme-provider/ColorSchemeProvider.tsx"],"sourcesContent":["import { getAvailableColorList, getColorFromPalette, hexToRgb255 } from '@chayns/colors';\nimport { useSite } from 'chayns-api';\nimport React, { FC, ReactNode, useEffect, useState } from 'react';\nimport { createGlobalStyle, ThemeProvider } from 'styled-components';\nimport { getDesignSettings } from '../../api/theme/get';\nimport type { DesignSettings } from '../../types/colorSchemeProvider';\nimport { convertIconStyle, generateFontFaces } from '../../utils/font';\n\nenum ColorMode {\n Classic,\n Dark,\n Light,\n}\n\ntype ColorSchemeProviderProps = {\n /**\n * The content of the application or the components for which the styles should be set\n */\n children: ReactNode;\n /**\n * The hex color to be used for the children\n */\n color?: string;\n /**\n * The color mode to be used for the children\n */\n colorMode?: ColorMode;\n /**\n * Css variables to be added in addition to the chayns variables\n */\n cssVariables?: { [key: string]: string | number };\n /**\n * The design settings of a page.\n */\n designSettings?: DesignSettings;\n /**\n * The secondary hex color to be used for the children\n */\n secondaryColor?: string;\n /**\n * Additional styles set on the root element\n */\n style?: { [key: string]: string | number };\n};\n\nexport interface Theme {\n [key: string]: string;\n}\n\nexport type WithTheme<T> = T & {\n theme: Theme;\n};\n\n// ToDo remove type after the framer-motion bug is Fixed\nexport type FramerMotionBugFix = WithTheme<unknown>;\n\nconst GlobalStyle = createGlobalStyle`\n ${generateFontFaces}\n .ellipsis {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n`;\n\nconst ColorSchemeProvider: FC<ColorSchemeProviderProps> = ({\n children,\n color,\n colorMode,\n cssVariables = {},\n secondaryColor,\n style = {},\n designSettings,\n}) => {\n const [colors, setColors] = useState<Theme>({});\n const [theme, setTheme] = useState<Theme>({});\n const [internalDesignSettings, setInternalDesignSettings] = useState<DesignSettings>();\n\n // Empty object is used to prevent error if ColorSchemeProvider is rendered on server\n const { color: internalColor, colorMode: internalColorMode } = useSite() ?? {};\n\n useEffect(() => {\n if (designSettings) {\n setInternalDesignSettings(designSettings);\n\n return;\n }\n\n void getDesignSettings().then((result) => {\n setInternalDesignSettings(result);\n });\n }, [designSettings]);\n\n useEffect(() => {\n const availableColors = getAvailableColorList();\n\n const newColors: Theme = {};\n const newTheme: Theme = {};\n\n availableColors.forEach((colorName: string) => {\n const hexColor = getColorFromPalette(colorName, {\n color: color ?? internalColor,\n colorMode: colorMode ?? internalColorMode,\n secondaryColor,\n });\n\n if (hexColor) {\n const rgbColor = hexToRgb255(hexColor);\n\n newColors[`--chayns-color--${colorName}`] = hexColor;\n newTheme[colorName] = hexColor;\n\n if (rgbColor) {\n newColors[`--chayns-color-rgb--${colorName}`] =\n `${rgbColor.r}, ${rgbColor.g}, ${rgbColor.b}`;\n newTheme[`${colorName}-rgb`] = `${rgbColor.r}, ${rgbColor.g}, ${rgbColor.b}`;\n }\n }\n });\n\n switch (colorMode ?? internalColorMode) {\n case ColorMode.Light:\n newTheme.colorMode = 'light';\n break;\n case ColorMode.Dark:\n newTheme.colorMode = 'dark';\n break;\n default:\n newTheme.colorMode = 'classic';\n break;\n }\n\n if (internalDesignSettings) {\n Object.keys(internalDesignSettings).forEach((key) => {\n if (key === 'iconStyle') {\n newTheme[key] = convertIconStyle(internalDesignSettings.iconStyle);\n\n return;\n }\n\n // ToDo: Find better solution\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n newTheme[key] = internalDesignSettings[key];\n });\n }\n\n setTheme(newTheme);\n setColors(newColors);\n }, [\n color,\n colorMode,\n internalColor,\n internalColorMode,\n internalDesignSettings,\n secondaryColor,\n ]);\n\n return (\n <ThemeProvider theme={theme}>\n <div style={{ ...colors, ...cssVariables, ...style }}>{children}</div>\n <GlobalStyle />\n </ThemeProvider>\n );\n};\n\nColorSchemeProvider.displayName = 'ColorSchemeProvider';\n\nexport default ColorSchemeProvider;\n"],"mappings":"AAAA,SAASA,qBAAqB,EAAEC,mBAAmB,EAAEC,WAAW,QAAQ,gBAAgB;AACxF,SAASC,OAAO,QAAQ,YAAY;AACpC,OAAOC,KAAK,IAAmBC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AACjE,SAASC,iBAAiB,EAAEC,aAAa,QAAQ,mBAAmB;AACpE,SAASC,iBAAiB,QAAQ,qBAAqB;AAEvD,SAASC,gBAAgB,EAAEC,iBAAiB,QAAQ,kBAAkB;AAAC,IAElEC,SAAS,0BAATA,SAAS;EAATA,SAAS,CAATA,SAAS;EAATA,SAAS,CAATA,SAAS;EAATA,SAAS,CAATA,SAAS;EAAA,OAATA,SAAS;AAAA,EAATA,SAAS,SA6Cd;AAGA,MAAMC,WAAW,GAAGN,iBAAkB;AACtC,MAAMI,iBAAkB;AACxB;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,MAAMG,mBAAiD,GAAGC,IAAA,IAQpD;EAAA,IARqD;IACvDC,QAAQ;IACRC,KAAK;IACLC,SAA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AAa;IAACiB,KAAK,EAAEA;EAAM,gBACxBrB,KAAA,CAAA6C,aAAA;IAAK5B,KAAK,EAAE;MAAE,GAAGE,MAAM;MAAE,GAAGJ,YAAY;MAAE,GAAGE;IAAM;EAAE,GAAEL,QAAc,CAAC,eACtEZ,KAAA,CAAA6C,aAAA,CAACpC,WAAW,MAAE,CACH,CAAC;AAExB,CAAC;AAEDC,mBAAmB,CAACoC,WAAW,GAAG,qBAAqB;AAEvD,eAAepC,mBAAmB"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { FC, type CSSProperties, type ReactNode } from 'react';
|
|
2
|
+
import { ComboBoxDirection } from '../../types/comboBox';
|
|
3
|
+
export interface IComboBoxItem {
|
|
4
|
+
imageUrl?: string;
|
|
5
|
+
suffixElement?: ReactNode;
|
|
6
|
+
text: string;
|
|
7
|
+
value: string | number;
|
|
8
|
+
}
|
|
9
|
+
export type ComboBoxProps = {
|
|
10
|
+
/**
|
|
11
|
+
* The direction in which the combobox should open.
|
|
12
|
+
*/
|
|
13
|
+
direction?: ComboBoxDirection;
|
|
14
|
+
/**
|
|
15
|
+
* Whether the combobox should be disabled.
|
|
16
|
+
*/
|
|
17
|
+
isDisabled?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* The list of the items that should be displayed.
|
|
20
|
+
*/
|
|
21
|
+
list: IComboBoxItem[];
|
|
22
|
+
/**
|
|
23
|
+
* The maximum height of the combobox content.
|
|
24
|
+
*/
|
|
25
|
+
maxHeight?: CSSProperties['maxHeight'];
|
|
26
|
+
/**
|
|
27
|
+
* Function that should be executed when an item is selected.
|
|
28
|
+
*/
|
|
29
|
+
onSelect?: (comboboxItem: IComboBoxItem) => void;
|
|
30
|
+
/**
|
|
31
|
+
* A text that should be displayed when no item is selected.
|
|
32
|
+
*/
|
|
33
|
+
placeholder: string;
|
|
34
|
+
/**
|
|
35
|
+
* An item that should be preselected.
|
|
36
|
+
*/
|
|
37
|
+
selectedItem?: IComboBoxItem;
|
|
38
|
+
/**
|
|
39
|
+
* If true, the images of the items are displayed in a round shape.
|
|
40
|
+
*/
|
|
41
|
+
shouldShowRoundImage?: boolean;
|
|
42
|
+
};
|
|
43
|
+
declare const ComboBox: FC<ComboBoxProps>;
|
|
44
|
+
export default ComboBox;
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { getDevice } from 'chayns-api';
|
|
2
|
+
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
3
|
+
import { ComboBoxDirection } from '../../types/comboBox';
|
|
4
|
+
import { calculateContentHeight, calculateContentWidth } from '../../utils/calculate';
|
|
5
|
+
import Icon from '../icon/Icon';
|
|
6
|
+
import ComboBoxItem from './combobox-item/ComboBoxItem';
|
|
7
|
+
import { StyledComboBox, StyledComboBoxHeader, StyledComboBoxIconWrapper, StyledComboBoxPlaceholder, StyledComboBoxPlaceholderImage, StyledMotionComboBoxBody } from './ComboBox.styles';
|
|
8
|
+
const ComboBox = _ref => {
|
|
9
|
+
let {
|
|
10
|
+
direction = ComboBoxDirection.BOTTOM,
|
|
11
|
+
isDisabled = false,
|
|
12
|
+
list,
|
|
13
|
+
maxHeight = '300px',
|
|
14
|
+
onSelect,
|
|
15
|
+
placeholder,
|
|
16
|
+
selectedItem,
|
|
17
|
+
shouldShowRoundImage
|
|
18
|
+
} = _ref;
|
|
19
|
+
const [item, setItem] = useState();
|
|
20
|
+
const [isAnimating, setIsAnimating] = useState(false);
|
|
21
|
+
const [minWidth, setMinWidth] = useState(0);
|
|
22
|
+
const [height, setHeight] = useState(0);
|
|
23
|
+
const ref = useRef(null);
|
|
24
|
+
const {
|
|
25
|
+
browser
|
|
26
|
+
} = getDevice();
|
|
27
|
+
const {
|
|
28
|
+
isMobile
|
|
29
|
+
} = chayns.env;
|
|
30
|
+
const handleClick = useCallback(event => {
|
|
31
|
+
if (ref.current && !ref.current.contains(event.target)) {
|
|
32
|
+
setIsAnimating(false);
|
|
33
|
+
}
|
|
34
|
+
}, [ref]);
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* This function adds an event listener to the document to close the combobox when the user clicks outside of it
|
|
38
|
+
*/
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
document.addEventListener('click', handleClick);
|
|
41
|
+
return () => {
|
|
42
|
+
document.removeEventListener('click', handleClick);
|
|
43
|
+
};
|
|
44
|
+
}, [handleClick, ref]);
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* This function sets the selected item
|
|
48
|
+
*/
|
|
49
|
+
const handleSetSelectedItem = useCallback(itemToSelect => {
|
|
50
|
+
setItem(itemToSelect);
|
|
51
|
+
setIsAnimating(false);
|
|
52
|
+
if (onSelect) {
|
|
53
|
+
onSelect(itemToSelect);
|
|
54
|
+
}
|
|
55
|
+
}, [onSelect]);
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* This function calculates the greatest width
|
|
59
|
+
*/
|
|
60
|
+
useEffect(() => {
|
|
61
|
+
const isAtLeastOneItemWithImageGiven = list.some(_ref2 => {
|
|
62
|
+
let {
|
|
63
|
+
imageUrl
|
|
64
|
+
} = _ref2;
|
|
65
|
+
return imageUrl;
|
|
66
|
+
});
|
|
67
|
+
const textArray = list.map(_ref3 => {
|
|
68
|
+
let {
|
|
69
|
+
text
|
|
70
|
+
} = _ref3;
|
|
71
|
+
return text;
|
|
72
|
+
});
|
|
73
|
+
setHeight(calculateContentHeight(textArray));
|
|
74
|
+
textArray.push(placeholder);
|
|
75
|
+
|
|
76
|
+
// 45px = padding left + padding right + border left + border right + arrow icon width + arrow icon margin left
|
|
77
|
+
// 32px = image width + flex gap
|
|
78
|
+
setMinWidth(calculateContentWidth(list) + 45 + (isAtLeastOneItemWithImageGiven ? 32 : 0));
|
|
79
|
+
}, [list, placeholder]);
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* This function sets the external selected item
|
|
83
|
+
*/
|
|
84
|
+
useEffect(() => {
|
|
85
|
+
setIsAnimating(false);
|
|
86
|
+
setItem(selectedItem);
|
|
87
|
+
}, [selectedItem]);
|
|
88
|
+
const placeholderImageUrl = useMemo(() => {
|
|
89
|
+
if (selectedItem) {
|
|
90
|
+
return selectedItem.imageUrl;
|
|
91
|
+
}
|
|
92
|
+
if (item) {
|
|
93
|
+
return item.imageUrl;
|
|
94
|
+
}
|
|
95
|
+
return undefined;
|
|
96
|
+
}, [item, selectedItem]);
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* This function resets the placeholder
|
|
100
|
+
*/
|
|
101
|
+
const placeholderText = useMemo(() => {
|
|
102
|
+
let text = placeholder;
|
|
103
|
+
if (selectedItem) {
|
|
104
|
+
text = selectedItem.text;
|
|
105
|
+
} else if (item) {
|
|
106
|
+
text = item.text;
|
|
107
|
+
}
|
|
108
|
+
return text;
|
|
109
|
+
}, [item, placeholder, selectedItem]);
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* This function opens the content of the combobox
|
|
113
|
+
*/
|
|
114
|
+
const handleHeaderClick = useCallback(() => {
|
|
115
|
+
if (!isDisabled) {
|
|
116
|
+
setIsAnimating(prevState => !prevState);
|
|
117
|
+
}
|
|
118
|
+
}, [isDisabled]);
|
|
119
|
+
const comboBoxBody = useMemo(() => {
|
|
120
|
+
const items = list.map(_ref4 => {
|
|
121
|
+
let {
|
|
122
|
+
imageUrl,
|
|
123
|
+
suffixElement,
|
|
124
|
+
text,
|
|
125
|
+
value
|
|
126
|
+
} = _ref4;
|
|
127
|
+
return /*#__PURE__*/React.createElement(ComboBoxItem, {
|
|
128
|
+
imageUrl: imageUrl,
|
|
129
|
+
isSelected: selectedItem ? value === selectedItem.value : false,
|
|
130
|
+
key: value,
|
|
131
|
+
onSelect: handleSetSelectedItem,
|
|
132
|
+
shouldShowRoundImage: shouldShowRoundImage,
|
|
133
|
+
suffixElement: suffixElement,
|
|
134
|
+
text: text,
|
|
135
|
+
value: value
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
const animate = isAnimating ? {
|
|
139
|
+
height: 'fit-content',
|
|
140
|
+
opacity: 1
|
|
141
|
+
} : {
|
|
142
|
+
height: 0,
|
|
143
|
+
opacity: 0
|
|
144
|
+
};
|
|
145
|
+
const style = direction === ComboBoxDirection.TOP ? {
|
|
146
|
+
transform: 'translateY(-100%)'
|
|
147
|
+
} : undefined;
|
|
148
|
+
return /*#__PURE__*/React.createElement(StyledMotionComboBoxBody, {
|
|
149
|
+
$browser: browser?.name,
|
|
150
|
+
animate: animate,
|
|
151
|
+
$height: height,
|
|
152
|
+
initial: {
|
|
153
|
+
height: 0,
|
|
154
|
+
opacity: 0
|
|
155
|
+
},
|
|
156
|
+
$maxHeight: maxHeight,
|
|
157
|
+
$minWidth: minWidth,
|
|
158
|
+
style: style,
|
|
159
|
+
$direction: direction,
|
|
160
|
+
transition: {
|
|
161
|
+
duration: 0.2
|
|
162
|
+
}
|
|
163
|
+
}, items);
|
|
164
|
+
}, [browser?.name, direction, handleSetSelectedItem, height, isAnimating, list, maxHeight, minWidth, selectedItem, shouldShowRoundImage]);
|
|
165
|
+
return useMemo(() => /*#__PURE__*/React.createElement(StyledComboBox, {
|
|
166
|
+
ref: ref
|
|
167
|
+
}, direction === ComboBoxDirection.TOP && comboBoxBody, /*#__PURE__*/React.createElement(StyledComboBoxHeader, {
|
|
168
|
+
$direction: direction,
|
|
169
|
+
$minWidth: minWidth,
|
|
170
|
+
onClick: handleHeaderClick,
|
|
171
|
+
$isOpen: isAnimating,
|
|
172
|
+
$isMobile: isMobile,
|
|
173
|
+
$isDisabled: isDisabled
|
|
174
|
+
}, /*#__PURE__*/React.createElement(StyledComboBoxPlaceholder, null, placeholderImageUrl && /*#__PURE__*/React.createElement(StyledComboBoxPlaceholderImage, {
|
|
175
|
+
src: placeholderImageUrl,
|
|
176
|
+
shouldShowRoundImage: shouldShowRoundImage
|
|
177
|
+
}), placeholderText), /*#__PURE__*/React.createElement(StyledComboBoxIconWrapper, null, /*#__PURE__*/React.createElement(Icon, {
|
|
178
|
+
icons: ['fa fa-chevron-down']
|
|
179
|
+
}))), direction === ComboBoxDirection.BOTTOM && comboBoxBody), [comboBoxBody, direction, handleHeaderClick, isAnimating, isDisabled, isMobile, minWidth, placeholderImageUrl, placeholderText, shouldShowRoundImage]);
|
|
180
|
+
};
|
|
181
|
+
ComboBox.displayName = 'ComboBox';
|
|
182
|
+
export default ComboBox;
|
|
183
|
+
//# sourceMappingURL=ComboBox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComboBox.js","names":["getDevice","React","useCallback","useEffect","useMemo","useRef","useState","ComboBoxDirection","calculateContentHeight","calculateContentWidth","Icon","ComboBoxItem","StyledComboBox","StyledComboBoxHeader","StyledComboBoxIconWrapper","StyledComboBoxPlaceholder","StyledComboBoxPlaceholderImage","StyledMotionComboBoxBody","ComboBox","_ref","direction","BOTTOM","isDisabled","list","maxHeight","onSelect","placeholder","selectedItem","shouldShowRoundImage","item","setItem","isAnimating","setIsAnimating","minWidth","setMinWidth","height","setHeight","ref","browser","isMobile","chayns","env","handleClick","event","current","contains","target","document","addEventListener","removeEventListener","handleSetSelectedItem","itemToSelect","isAtLeastOneItemWithImageGiven","some","_ref2","imageUrl","textArray","map","_ref3","text","push","placeholderImageUrl","undefined","placeholderText","handleHeaderClick","prevState","comboBoxBody","items","_ref4","suffixElement","value","createElement","isSelected","key","animate","opacity","style","TOP","transform","$browser","name","$height","initial","$maxHeight","$minWidth","$direction","transition","duration","onClick","$isOpen","$isMobile","$isDisabled","src","icons","displayName"],"sources":["../../../src/components/combobox/ComboBox.tsx"],"sourcesContent":["import { getDevice } from 'chayns-api';\nimport React, {\n FC,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n type CSSProperties,\n type ReactNode,\n} from 'react';\nimport { ComboBoxDirection } from '../../types/comboBox';\nimport { calculateContentHeight, calculateContentWidth } from '../../utils/calculate';\nimport Icon from '../icon/Icon';\nimport ComboBoxItem from './combobox-item/ComboBoxItem';\nimport {\n StyledComboBox,\n StyledComboBoxHeader,\n StyledComboBoxIconWrapper,\n StyledComboBoxPlaceholder,\n StyledComboBoxPlaceholderImage,\n StyledMotionComboBoxBody,\n} from './ComboBox.styles';\n\nexport interface IComboBoxItem {\n imageUrl?: string;\n suffixElement?: ReactNode;\n text: string;\n value: string | number;\n}\n\nexport type ComboBoxProps = {\n /**\n * The direction in which the combobox should open.\n */\n direction?: ComboBoxDirection;\n /**\n * Whether the combobox should be disabled.\n */\n isDisabled?: boolean;\n /**\n * The list of the items that should be displayed.\n */\n list: IComboBoxItem[];\n /**\n * The maximum height of the combobox content.\n */\n maxHeight?: CSSProperties['maxHeight'];\n /**\n * Function that should be executed when an item is selected.\n */\n onSelect?: (comboboxItem: IComboBoxItem) => void;\n /**\n * A text that should be displayed when no item is selected.\n */\n placeholder: string;\n /**\n * An item that should be preselected.\n */\n selectedItem?: IComboBoxItem;\n /**\n * If true, the images of the items are displayed in a round shape.\n */\n shouldShowRoundImage?: boolean;\n};\n\nconst ComboBox: FC<ComboBoxProps> = ({\n direction = ComboBoxDirection.BOTTOM,\n isDisabled = false,\n list,\n maxHeight = '300px',\n onSelect,\n placeholder,\n selectedItem,\n shouldShowRoundImage,\n}) => {\n const [item, setItem] = useState<IComboBoxItem>();\n const [isAnimating, setIsAnimating] = useState(false);\n const [minWidth, setMinWidth] = useState(0);\n const [height, setHeight] = useState(0);\n\n const ref = useRef<HTMLDivElement>(null);\n\n const { browser } = getDevice();\n\n const { isMobile } = chayns.env;\n\n const handleClick = useCallback(\n (event: MouseEvent) => {\n if (ref.current && !ref.current.contains(event.target as Node)) {\n setIsAnimating(false);\n }\n },\n [ref],\n );\n\n /**\n * This function adds an event listener to the document to close the combobox when the user clicks outside of it\n */\n useEffect(() => {\n document.addEventListener('click', handleClick);\n\n return () => {\n document.removeEventListener('click', handleClick);\n };\n }, [handleClick, ref]);\n\n /**\n * This function sets the selected item\n */\n const handleSetSelectedItem = useCallback(\n (itemToSelect: IComboBoxItem) => {\n setItem(itemToSelect);\n setIsAnimating(false);\n\n if (onSelect) {\n onSelect(itemToSelect);\n }\n },\n [onSelect],\n );\n\n /**\n * This function calculates the greatest width\n */\n useEffect(() => {\n const isAtLeastOneItemWithImageGiven = list.some(({ imageUrl }) => imageUrl);\n\n const textArray = list.map(({ text }) => text);\n\n setHeight(calculateContentHeight(textArray));\n\n textArray.push(placeholder);\n\n // 45px = padding left + padding right + border left + border right + arrow icon width + arrow icon margin left\n // 32px = image width + flex gap\n setMinWidth(calculateContentWidth(list) + 45 + (isAtLeastOneItemWithImageGiven ? 32 : 0));\n }, [list, placeholder]);\n\n /**\n * This function sets the external selected item\n */\n useEffect(() => {\n setIsAnimating(false);\n setItem(selectedItem);\n }, [selectedItem]);\n\n const placeholderImageUrl = useMemo(() => {\n if (selectedItem) {\n return selectedItem.imageUrl;\n }\n\n if (item) {\n return item.imageUrl;\n }\n\n return undefined;\n }, [item, selectedItem]);\n\n /**\n * This function resets the placeholder\n */\n const placeholderText = useMemo(() => {\n let text = placeholder;\n\n if (selectedItem) {\n text = selectedItem.text;\n } else if (item) {\n text = item.text;\n }\n\n return text;\n }, [item, placeholder, selectedItem]);\n\n /**\n * This function opens the content of the combobox\n */\n const handleHeaderClick = useCallback(() => {\n if (!isDisabled) {\n setIsAnimating((prevState) => !prevState);\n }\n }, [isDisabled]);\n\n const comboBoxBody = useMemo(() => {\n const items = list.map(({ imageUrl, suffixElement, text, value }) => (\n <ComboBoxItem\n imageUrl={imageUrl}\n isSelected={selectedItem ? value === selectedItem.value : false}\n key={value}\n onSelect={handleSetSelectedItem}\n shouldShowRoundImage={shouldShowRoundImage}\n suffixElement={suffixElement}\n text={text}\n value={value}\n />\n ));\n\n const animate = isAnimating\n ? { height: 'fit-content', opacity: 1 }\n : { height: 0, opacity: 0 };\n\n const style =\n direction === ComboBoxDirection.TOP ? { transform: 'translateY(-100%)' } : undefined;\n\n return (\n <StyledMotionComboBoxBody\n $browser={browser?.name}\n animate={animate}\n $height={height}\n initial={{ height: 0, opacity: 0 }}\n $maxHeight={maxHeight}\n $minWidth={minWidth}\n style={style}\n $direction={direction}\n transition={{ duration: 0.2 }}\n >\n {items}\n </StyledMotionComboBoxBody>\n );\n }, [\n browser?.name,\n direction,\n handleSetSelectedItem,\n height,\n isAnimating,\n list,\n maxHeight,\n minWidth,\n selectedItem,\n shouldShowRoundImage,\n ]);\n\n return useMemo(\n () => (\n <StyledComboBox ref={ref}>\n {direction === ComboBoxDirection.TOP && comboBoxBody}\n <StyledComboBoxHeader\n $direction={direction}\n $minWidth={minWidth}\n onClick={handleHeaderClick}\n $isOpen={isAnimating}\n $isMobile={isMobile}\n $isDisabled={isDisabled}\n >\n <StyledComboBoxPlaceholder>\n {placeholderImageUrl && (\n <StyledComboBoxPlaceholderImage\n src={placeholderImageUrl}\n shouldShowRoundImage={shouldShowRoundImage}\n />\n )}\n {placeholderText}\n </StyledComboBoxPlaceholder>\n <StyledComboBoxIconWrapper>\n <Icon icons={['fa fa-chevron-down']} />\n </StyledComboBoxIconWrapper>\n </StyledComboBoxHeader>\n {direction === ComboBoxDirection.BOTTOM && comboBoxBody}\n </StyledComboBox>\n ),\n [\n comboBoxBody,\n direction,\n handleHeaderClick,\n isAnimating,\n isDisabled,\n isMobile,\n minWidth,\n placeholderImageUrl,\n placeholderText,\n shouldShowRoundImage,\n ],\n );\n};\n\nComboBox.displayName = 'ComboBox';\n\nexport default ComboBox;\n"],"mappings":"AAAA,SAASA,SAAS,QAAQ,YAAY;AACtC,OAAOC,KAAK,IAERC,WAAW,EACXC,SAAS,EACTC,OAAO,EACPC,MAAM,EACNC,QAAQ,QAGL,OAAO;AACd,SAASC,iBAAiB,QAAQ,sBAAsB;AACxD,SAASC,sBAAsB,EAAEC,qBAAqB,QAAQ,uBAAuB;AACrF,OAAOC,IAAI,MAAM,cAAc;AAC/B,OAAOC,YAAY,MAAM,8BAA8B;AACvD,SACIC,cAAc,EACdC,oBAAoB,EACpBC,yBAAyB,EACzBC,yBAAyB,EACzBC,8BAA8B,EAC9BC,wBAAwB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