@chayns-components/core 5.0.0-beta.4 → 5.0.0-beta.400
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 -9
- package/lib/api/image/post.d.ts +16 -0
- package/lib/api/image/post.js +34 -0
- package/lib/api/image/post.js.map +1 -0
- package/lib/api/video/post.d.ts +16 -0
- package/lib/api/video/post.js +31 -0
- package/lib/api/video/post.js.map +1 -0
- package/lib/components/accordion/Accordion.d.ts +72 -6
- package/lib/components/accordion/Accordion.js +122 -166
- package/lib/components/accordion/Accordion.js.map +1 -1
- package/lib/components/accordion/Accordion.styles.d.ts +9 -0
- package/lib/components/accordion/Accordion.styles.js +95 -0
- package/lib/components/accordion/Accordion.styles.js.map +1 -0
- package/lib/components/accordion/accordion-body/AccordionBody.d.ts +20 -2
- package/lib/components/accordion/accordion-body/AccordionBody.js +25 -25
- package/lib/components/accordion/accordion-body/AccordionBody.js.map +1 -1
- package/lib/components/accordion/accordion-body/AccordionBody.styles.d.ts +268 -0
- package/lib/components/accordion/accordion-body/AccordionBody.styles.js +24 -0
- package/lib/components/accordion/accordion-body/AccordionBody.styles.js.map +1 -0
- package/lib/components/accordion/accordion-content/AccordionContent.d.ts +14 -3
- package/lib/components/accordion/accordion-content/AccordionContent.js +20 -24
- package/lib/components/accordion/accordion-content/AccordionContent.js.map +1 -1
- package/lib/components/accordion/accordion-content/AccordionContent.styles.d.ts +8 -0
- package/lib/components/accordion/accordion-content/AccordionContent.styles.js +34 -0
- package/lib/components/accordion/accordion-content/AccordionContent.styles.js.map +1 -0
- package/lib/components/accordion/accordion-group/AccordionGroup.d.ts +27 -0
- package/lib/components/accordion/accordion-group/AccordionGroup.js +57 -0
- package/lib/components/accordion/accordion-group/AccordionGroup.js.map +1 -0
- package/lib/components/accordion/accordion-head/AccordionHead.d.ts +10 -4
- package/lib/components/accordion/accordion-head/AccordionHead.js +95 -129
- package/lib/components/accordion/accordion-head/AccordionHead.js.map +1 -1
- package/lib/components/accordion/accordion-head/AccordionHead.styles.d.ts +2424 -0
- package/lib/components/accordion/accordion-head/AccordionHead.styles.js +154 -0
- package/lib/components/accordion/accordion-head/AccordionHead.styles.js.map +1 -0
- package/lib/components/accordion/accordion-intro/AccordionIntro.d.ts +9 -0
- package/lib/components/accordion/accordion-intro/AccordionIntro.js +20 -0
- package/lib/components/accordion/accordion-intro/AccordionIntro.js.map +1 -0
- package/lib/components/accordion/accordion-intro/AccordionIntro.styles.d.ts +2 -0
- package/lib/components/accordion/accordion-intro/AccordionIntro.styles.js +12 -0
- package/lib/components/accordion/accordion-intro/AccordionIntro.styles.js.map +1 -0
- package/lib/components/accordion/accordion-item/AccordionItem.d.ts +9 -0
- package/lib/components/accordion/accordion-item/AccordionItem.js +27 -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 +33 -0
- package/lib/components/accordion/accordion-item/AccordionItem.styles.js.map +1 -0
- package/lib/components/accordion/utils.d.ts +11 -0
- package/lib/components/accordion/utils.js +36 -0
- package/lib/components/accordion/utils.js.map +1 -0
- package/lib/components/amount-control/AmountControl.d.ts +22 -0
- package/lib/components/amount-control/AmountControl.js +185 -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 +58 -0
- package/lib/components/amount-control/AmountControl.styles.js.map +1 -0
- package/lib/components/amount-control/utils.d.ts +7 -0
- package/lib/components/amount-control/utils.js +22 -0
- package/lib/components/amount-control/utils.js.map +1 -0
- package/lib/components/badge/Badge.d.ts +9 -1
- package/lib/components/badge/Badge.js +15 -28
- package/lib/components/badge/Badge.js.map +1 -1
- package/lib/components/badge/Badge.styles.d.ts +6 -0
- package/lib/components/badge/Badge.styles.js +31 -0
- package/lib/components/badge/Badge.styles.js.map +1 -0
- package/lib/components/button/Button.d.ts +7 -3
- package/lib/components/button/Button.js +69 -47
- package/lib/components/button/Button.js.map +1 -1
- package/lib/components/button/Button.styles.d.ts +541 -0
- package/lib/components/button/Button.styles.js +81 -0
- package/lib/components/button/Button.styles.js.map +1 -0
- package/lib/components/checkbox/Checkbox.d.ts +33 -0
- package/lib/components/checkbox/Checkbox.js +49 -0
- package/lib/components/checkbox/Checkbox.js.map +1 -0
- package/lib/components/checkbox/Checkbox.styles.d.ts +13 -0
- package/lib/components/checkbox/Checkbox.styles.js +140 -0
- package/lib/components/checkbox/Checkbox.styles.js.map +1 -0
- package/lib/components/code-highlighter/CodeHighlighter.d.ts +36 -0
- package/lib/components/code-highlighter/CodeHighlighter.js +85 -0
- package/lib/components/code-highlighter/CodeHighlighter.js.map +1 -0
- package/lib/components/code-highlighter/CodeHighlighter.styles.d.ts +16 -0
- package/lib/components/code-highlighter/CodeHighlighter.styles.js +88 -0
- package/lib/components/code-highlighter/CodeHighlighter.styles.js.map +1 -0
- package/lib/components/code-highlighter/copy-to-clipboard/CopyToClipboard.d.ts +9 -0
- package/lib/components/code-highlighter/copy-to-clipboard/CopyToClipboard.js +41 -0
- package/lib/components/code-highlighter/copy-to-clipboard/CopyToClipboard.js.map +1 -0
- package/lib/components/code-highlighter/copy-to-clipboard/CopyToClipboard.styles.d.ts +9 -0
- package/lib/components/code-highlighter/copy-to-clipboard/CopyToClipboard.styles.js +24 -0
- package/lib/components/code-highlighter/copy-to-clipboard/CopyToClipboard.styles.js.map +1 -0
- package/lib/components/color-scheme-provider/ColorSchemeProvider.d.ts +8 -1
- package/lib/components/color-scheme-provider/ColorSchemeProvider.js +45 -83
- package/lib/components/color-scheme-provider/ColorSchemeProvider.js.map +1 -1
- package/lib/components/color-scheme-provider/font.d.ts +6 -0
- package/lib/components/color-scheme-provider/font.js +59 -0
- package/lib/components/color-scheme-provider/font.js.map +1 -0
- package/lib/components/combobox/ComboBox.d.ts +43 -0
- package/lib/components/combobox/ComboBox.js +187 -0
- package/lib/components/combobox/ComboBox.js.map +1 -0
- package/lib/components/combobox/ComboBox.styles.d.ts +289 -0
- package/lib/components/combobox/ComboBox.styles.js +184 -0
- package/lib/components/combobox/ComboBox.styles.js.map +1 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.d.ts +12 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.js +40 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.js.map +1 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.styles.d.ts +11 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.styles.js +62 -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 +21 -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 +22 -0
- package/lib/components/content-card/ContentCard.styles.js.map +1 -0
- package/lib/components/context-menu/ContextMenu.d.ts +51 -0
- package/lib/components/context-menu/ContextMenu.js +153 -0
- package/lib/components/context-menu/ContextMenu.js.map +1 -0
- package/lib/components/context-menu/ContextMenu.styles.d.ts +2 -0
- package/lib/components/context-menu/ContextMenu.styles.js +12 -0
- package/lib/components/context-menu/ContextMenu.styles.js.map +1 -0
- package/lib/components/context-menu/constants/alignment.d.ts +8 -0
- package/lib/components/context-menu/constants/alignment.js +16 -0
- package/lib/components/context-menu/constants/alignment.js.map +1 -0
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.d.ts +10 -0
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.js +79 -0
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.js.map +1 -0
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.styles.d.ts +276 -0
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.styles.js +112 -0
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.styles.js.map +1 -0
- package/lib/components/date-info/DateInfo.d.ts +37 -0
- package/lib/components/date-info/DateInfo.js +111 -0
- package/lib/components/date-info/DateInfo.js.map +1 -0
- package/lib/components/date-info/constants/language.d.ts +22 -0
- package/lib/components/date-info/constants/language.js +629 -0
- package/lib/components/date-info/constants/language.js.map +1 -0
- package/lib/components/date-info/utils/format.d.ts +49 -0
- package/lib/components/date-info/utils/format.js +315 -0
- package/lib/components/date-info/utils/format.js.map +1 -0
- package/lib/components/date-info/utils/language.d.ts +7 -0
- package/lib/components/date-info/utils/language.js +57 -0
- package/lib/components/date-info/utils/language.js.map +1 -0
- package/lib/components/file-input/FileInput.d.ts +29 -0
- package/lib/components/file-input/FileInput.js +121 -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 +46 -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 +36 -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 +10 -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 +88 -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 +14 -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 +47 -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 +104 -0
- package/lib/components/filter-buttons/filter-button/FilterButton.styles.js.map +1 -0
- package/lib/components/filter-buttons/types.d.ts +15 -0
- package/lib/components/filter-buttons/types.js +17 -0
- package/lib/components/filter-buttons/types.js.map +1 -0
- package/lib/components/grid-image/GridImage.d.ts +19 -0
- package/lib/components/grid-image/GridImage.js +45 -0
- package/lib/components/grid-image/GridImage.js.map +1 -0
- package/lib/components/grid-image/GridImage.styles.d.ts +22 -0
- package/lib/components/grid-image/GridImage.styles.js +101 -0
- package/lib/components/grid-image/GridImage.styles.js.map +1 -0
- package/lib/components/icon/Icon.d.ts +11 -3
- package/lib/components/icon/Icon.js +37 -82
- package/lib/components/icon/Icon.js.map +1 -1
- package/lib/components/icon/Icon.styles.d.ts +15 -0
- package/lib/components/icon/Icon.styles.js +74 -0
- package/lib/components/icon/Icon.styles.js.map +1 -0
- package/lib/components/icon/utils.d.ts +1 -0
- package/lib/components/icon/utils.js +12 -0
- package/lib/components/icon/utils.js.map +1 -0
- package/lib/components/input/Input.d.ts +65 -0
- package/lib/components/input/Input.js +118 -0
- package/lib/components/input/Input.js.map +1 -0
- package/lib/components/input/Input.styles.d.ts +541 -0
- package/lib/components/input/Input.styles.js +98 -0
- package/lib/components/input/Input.styles.js.map +1 -0
- package/lib/components/list/List.d.ts +18 -0
- package/lib/components/list/List.js +52 -0
- package/lib/components/list/List.js.map +1 -0
- package/lib/components/list/list-item/ListItem.d.ts +67 -0
- package/lib/components/list/list-item/ListItem.js +91 -0
- package/lib/components/list/list-item/ListItem.js.map +1 -0
- package/lib/components/list/list-item/ListItem.styles.d.ts +8 -0
- package/lib/components/list/list-item/ListItem.styles.js +44 -0
- package/lib/components/list/list-item/ListItem.styles.js.map +1 -0
- package/lib/components/list/list-item/list-item-body/ListItemBody.d.ts +7 -0
- package/lib/components/list/list-item/list-item-body/ListItemBody.js +57 -0
- package/lib/components/list/list-item/list-item-body/ListItemBody.js.map +1 -0
- package/lib/components/list/list-item/list-item-body/ListItemBody.styles.d.ts +267 -0
- package/lib/components/list/list-item/list-item-body/ListItemBody.styles.js +13 -0
- package/lib/components/list/list-item/list-item-body/ListItemBody.styles.js.map +1 -0
- package/lib/components/list/list-item/list-item-content/ListItemContent.d.ts +9 -0
- package/lib/components/list/list-item/list-item-content/ListItemContent.js +20 -0
- package/lib/components/list/list-item/list-item-content/ListItemContent.js.map +1 -0
- package/lib/components/list/list-item/list-item-content/ListItemContent.styles.d.ts +2 -0
- package/lib/components/list/list-item/list-item-content/ListItemContent.styles.js +18 -0
- package/lib/components/list/list-item/list-item-content/ListItemContent.styles.js.map +1 -0
- package/lib/components/list/list-item/list-item-head/ListItemHead.d.ts +18 -0
- package/lib/components/list/list-item/list-item-head/ListItemHead.js +99 -0
- package/lib/components/list/list-item/list-item-head/ListItemHead.js.map +1 -0
- package/lib/components/list/list-item/list-item-head/ListItemHead.styles.d.ts +550 -0
- package/lib/components/list/list-item/list-item-head/ListItemHead.styles.js +99 -0
- package/lib/components/list/list-item/list-item-head/ListItemHead.styles.js.map +1 -0
- package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.d.ts +6 -0
- package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.js +22 -0
- package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.js.map +1 -0
- package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.styles.d.ts +2 -0
- package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.styles.js +31 -0
- package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.styles.js.map +1 -0
- package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.d.ts +7 -0
- package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.js +43 -0
- package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.js.map +1 -0
- package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.d.ts +11 -0
- package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.js +50 -0
- package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.js.map +1 -0
- package/lib/components/mention-finder/MentionFinder.d.ts +31 -0
- package/lib/components/mention-finder/MentionFinder.js +139 -0
- package/lib/components/mention-finder/MentionFinder.js.map +1 -0
- package/lib/components/mention-finder/MentionFinder.styles.d.ts +270 -0
- package/lib/components/mention-finder/MentionFinder.styles.js +92 -0
- package/lib/components/mention-finder/MentionFinder.styles.js.map +1 -0
- package/lib/components/mention-finder/constants/alignment.d.ts +4 -0
- package/lib/components/mention-finder/constants/alignment.js +12 -0
- package/lib/components/mention-finder/constants/alignment.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 +31 -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 +10 -0
- package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.styles.js +91 -0
- package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.styles.js.map +1 -0
- package/lib/components/number-input/NumberInput.d.ts +46 -0
- package/lib/components/number-input/NumberInput.js +123 -0
- package/lib/components/number-input/NumberInput.js.map +1 -0
- package/lib/components/number-input/constants/number.d.ts +4 -0
- package/lib/components/number-input/constants/number.js +11 -0
- package/lib/components/number-input/constants/number.js.map +1 -0
- package/lib/components/number-input/utils/number.d.ts +21 -0
- package/lib/components/number-input/utils/number.js +64 -0
- package/lib/components/number-input/utils/number.js.map +1 -0
- package/lib/components/popup/Popup.d.ts +30 -0
- package/lib/components/popup/Popup.js +154 -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 +26 -0
- package/lib/components/popup/Popup.styles.js.map +1 -0
- package/lib/components/popup/popup-content/PopupContent.d.ts +9 -0
- package/lib/components/popup/popup-content/PopupContent.js +66 -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 +92 -0
- package/lib/components/popup/popup-content/PopupContent.styles.js.map +1 -0
- package/lib/components/popup/types.d.ts +16 -0
- package/lib/components/popup/types.js +16 -0
- package/lib/components/popup/types.js.map +1 -0
- package/lib/components/progress-bar/ProgressBar.d.ts +9 -0
- package/lib/components/progress-bar/ProgressBar.js +38 -0
- package/lib/components/progress-bar/ProgressBar.js.map +1 -0
- package/lib/components/progress-bar/ProgressBar.styles.d.ts +271 -0
- package/lib/components/progress-bar/ProgressBar.styles.js +36 -0
- package/lib/components/progress-bar/ProgressBar.styles.js.map +1 -0
- package/lib/components/radio-button/RadioButton.d.ts +26 -0
- package/lib/components/radio-button/RadioButton.js +85 -0
- package/lib/components/radio-button/RadioButton.js.map +1 -0
- package/lib/components/radio-button/RadioButton.styles.d.ts +22 -0
- package/lib/components/radio-button/RadioButton.styles.js +95 -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 +46 -0
- package/lib/components/radio-button/radio-button-group/RadioButtonGroup.js.map +1 -0
- package/lib/components/radio-button/types.d.ts +4 -0
- package/lib/components/radio-button/types.js +2 -0
- package/lib/components/radio-button/types.js.map +1 -0
- package/lib/components/scroll-view/ScrollView.d.ts +13 -0
- package/lib/components/scroll-view/ScrollView.js +22 -0
- package/lib/components/scroll-view/ScrollView.js.map +1 -0
- package/lib/components/scroll-view/ScrollView.styles.d.ts +7 -0
- package/lib/components/scroll-view/ScrollView.styles.js +26 -0
- package/lib/components/scroll-view/ScrollView.styles.js.map +1 -0
- package/lib/components/search-box/SearchBox.d.ts +34 -0
- package/lib/components/search-box/SearchBox.js +246 -0
- package/lib/components/search-box/SearchBox.js.map +1 -0
- package/lib/components/search-box/SearchBox.styles.d.ts +272 -0
- package/lib/components/search-box/SearchBox.styles.js +56 -0
- package/lib/components/search-box/SearchBox.styles.js.map +1 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.d.ts +9 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.js +30 -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 +7 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.styles.js +37 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.styles.js.map +1 -0
- package/lib/components/search-box/types.d.ts +4 -0
- package/lib/components/search-box/types.js +2 -0
- package/lib/components/search-box/types.js.map +1 -0
- package/lib/components/search-box/utils.d.ts +7 -0
- package/lib/components/search-box/utils.js +23 -0
- package/lib/components/search-box/utils.js.map +1 -0
- package/lib/components/search-input/SearchInput.d.ts +33 -0
- package/lib/components/search-input/SearchInput.js +102 -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 +26 -0
- package/lib/components/search-input/SearchInput.styles.js.map +1 -0
- package/lib/components/setup-wizard/SetupWizard.d.ts +23 -0
- package/lib/components/setup-wizard/SetupWizard.js +79 -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 +10 -0
- package/lib/components/setup-wizard/SetupWizard.styles.js.map +1 -0
- package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.d.ts +25 -0
- package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.js +60 -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 +14 -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 +110 -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 +24 -0
- package/lib/components/sharing-bar/SharingBar.styles.js.map +1 -0
- package/lib/components/slider/Slider.d.ts +21 -0
- package/lib/components/slider/Slider.js +51 -0
- package/lib/components/slider/Slider.js.map +1 -0
- package/lib/components/slider/Slider.styles.d.ts +10 -0
- package/lib/components/slider/Slider.styles.js +74 -0
- package/lib/components/slider/Slider.styles.js.map +1 -0
- package/lib/components/small-wait-cursor/SmallWaitCursor.d.ts +31 -0
- package/lib/components/small-wait-cursor/SmallWaitCursor.js +42 -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 +101 -0
- package/lib/components/small-wait-cursor/SmallWaitCursor.styles.js.map +1 -0
- package/lib/components/text-area/TextArea.d.ts +29 -0
- package/lib/components/text-area/TextArea.js +72 -0
- package/lib/components/text-area/TextArea.js.map +1 -0
- package/lib/components/text-area/TextArea.styles.d.ts +13 -0
- package/lib/components/text-area/TextArea.styles.js +79 -0
- package/lib/components/text-area/TextArea.styles.js.map +1 -0
- package/lib/components/tooltip/Tooltip.d.ts +18 -0
- package/lib/components/tooltip/Tooltip.js +32 -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 +10 -0
- package/lib/components/tooltip/Tooltip.styles.js.map +1 -0
- package/lib/components/tooltip/interface.d.ts +4 -0
- package/lib/components/tooltip/interface.js +2 -0
- package/lib/components/tooltip/interface.js.map +1 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.d.ts +7 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.js +20 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.js.map +1 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.styles.d.ts +8 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.styles.js +29 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.styles.js.map +1 -0
- package/lib/components/truncation/Truncation.d.ts +25 -0
- package/lib/components/truncation/Truncation.js +86 -0
- package/lib/components/truncation/Truncation.js.map +1 -0
- package/lib/components/truncation/Truncation.styles.d.ts +270 -0
- package/lib/components/truncation/Truncation.styles.js +27 -0
- package/lib/components/truncation/Truncation.styles.js.map +1 -0
- package/lib/constants/codeHighlighter.d.ts +7 -0
- package/lib/constants/codeHighlighter.js +13 -0
- package/lib/constants/codeHighlighter.js.map +1 -0
- package/lib/hooks/colorMode.d.ts +2 -0
- package/lib/hooks/colorMode.js +22 -0
- package/lib/hooks/colorMode.js.map +1 -0
- package/lib/hooks/uuid.d.ts +1 -0
- package/lib/hooks/uuid.js +14 -0
- package/lib/hooks/uuid.js.map +1 -0
- package/lib/index.d.ts +50 -0
- package/lib/index.js +312 -11
- package/lib/index.js.map +1 -1
- package/lib/types/chayns.d.ts +115 -0
- package/lib/types/chayns.js +13 -0
- package/lib/types/chayns.js.map +1 -0
- package/lib/types/codeHighlighter.d.ts +10 -0
- package/lib/types/codeHighlighter.js +12 -0
- package/lib/types/codeHighlighter.js.map +1 -0
- package/lib/types/comboBox.d.ts +4 -0
- package/lib/types/comboBox.js +12 -0
- package/lib/types/comboBox.js.map +1 -0
- package/lib/types/file.d.ts +42 -0
- package/lib/types/file.js +2 -0
- package/lib/types/file.js.map +1 -0
- package/lib/types/parser/prettier-parser-babel.d.js +2 -0
- package/lib/types/parser/prettier-parser-babel.d.js.map +1 -0
- package/lib/types/parser/prettier-parser-graphql.d.js +2 -0
- package/lib/types/parser/prettier-parser-graphql.d.js.map +1 -0
- package/lib/types/parser/prettier-parser-html.d.js +2 -0
- package/lib/types/parser/prettier-parser-html.d.js.map +1 -0
- package/lib/types/parser/prettier-parser-markdown.d.js +2 -0
- package/lib/types/parser/prettier-parser-markdown.d.js.map +1 -0
- package/lib/types/parser/prettier-parser-postcss.d.js +2 -0
- package/lib/types/parser/prettier-parser-postcss.d.js.map +1 -0
- package/lib/types/parser/prettier-parser-yaml.d.js +2 -0
- package/lib/types/parser/prettier-parser-yaml.d.js.map +1 -0
- package/lib/utils/calculate.d.ts +3 -0
- package/lib/utils/calculate.js +49 -0
- package/lib/utils/calculate.js.map +1 -0
- package/lib/utils/codeHighlighter.d.ts +4 -0
- package/lib/utils/codeHighlighter.js +361 -0
- package/lib/utils/codeHighlighter.js.map +1 -0
- package/lib/utils/file.d.ts +363 -0
- package/lib/utils/file.js +402 -0
- package/lib/utils/file.js.map +1 -0
- package/lib/utils/fileDialog.d.ts +7 -0
- package/lib/utils/fileDialog.js +73 -0
- package/lib/utils/fileDialog.js.map +1 -0
- package/lib/utils/isTobitEmployee.d.ts +1 -0
- package/lib/utils/isTobitEmployee.js +28 -0
- package/lib/utils/isTobitEmployee.js.map +1 -0
- package/lib/utils/truncation.d.ts +1 -0
- package/lib/utils/truncation.js +34 -0
- package/lib/utils/truncation.js.map +1 -0
- package/lib/utils/uploadFile.d.ts +9 -0
- package/lib/utils/uploadFile.js +47 -0
- package/lib/utils/uploadFile.js.map +1 -0
- package/package.json +72 -62
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.StyledCopyToClipboardText = exports.StyledCopyToClipboard = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _codeHighlighter = require("../../../types/codeHighlighter");
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
const StyledCopyToClipboard = exports.StyledCopyToClipboard = _styledComponents.default.div`
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
`;
|
|
14
|
+
const StyledCopyToClipboardText = exports.StyledCopyToClipboardText = _styledComponents.default.span`
|
|
15
|
+
color: ${_ref => {
|
|
16
|
+
let {
|
|
17
|
+
codeTheme
|
|
18
|
+
} = _ref;
|
|
19
|
+
return codeTheme === _codeHighlighter.CodeHighlighterTheme.Dark ? '#e5e5e5' : '#999999';
|
|
20
|
+
}};
|
|
21
|
+
font-size: small;
|
|
22
|
+
margin-left: 4px;
|
|
23
|
+
`;
|
|
24
|
+
//# sourceMappingURL=CopyToClipboard.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CopyToClipboard.styles.js","names":["_styledComponents","_interopRequireDefault","require","_codeHighlighter","obj","__esModule","default","StyledCopyToClipboard","exports","styled","div","StyledCopyToClipboardText","span","_ref","codeTheme","CodeHighlighterTheme","Dark"],"sources":["../../../../src/components/code-highlighter/copy-to-clipboard/CopyToClipboard.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { CodeHighlighterTheme } from '../../../types/codeHighlighter';\nimport type { WithTheme } from '../../color-scheme-provider/ColorSchemeProvider';\n\nexport const StyledCopyToClipboard = styled.div`\n display: flex;\n align-items: center;\n`;\n\ntype StyledCopyToClipboardTextProps = WithTheme<{\n codeTheme: CodeHighlighterTheme;\n}>;\nexport const StyledCopyToClipboardText = styled.span<StyledCopyToClipboardTextProps>`\n color: ${({ codeTheme }) => (codeTheme === CodeHighlighterTheme.Dark ? '#e5e5e5' : '#999999')};\n font-size: small;\n margin-left: 4px;\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AAAsE,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAG/D,MAAMG,qBAAqB,GAAAC,OAAA,CAAAD,qBAAA,GAAGE,yBAAM,CAACC,GAAI;AAChD;AACA;AACA,CAAC;AAKM,MAAMC,yBAAyB,GAAAH,OAAA,CAAAG,yBAAA,GAAGF,yBAAM,CAACG,IAAqC;AACrF,aAAaC,IAAA;EAAA,IAAC;IAAEC;EAAU,CAAC,GAAAD,IAAA;EAAA,OAAMC,SAAS,KAAKC,qCAAoB,CAACC,IAAI,GAAG,SAAS,GAAG,SAAS;AAAA,CAAE;AAClG;AACA;AACA,CAAC"}
|
|
@@ -4,7 +4,7 @@ declare enum ColorMode {
|
|
|
4
4
|
Dark = 1,
|
|
5
5
|
Light = 2
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
type ColorSchemeProviderProps = {
|
|
8
8
|
/**
|
|
9
9
|
* The content of the application or the components for which the styles should be set
|
|
10
10
|
*/
|
|
@@ -34,5 +34,12 @@ declare type ColorSchemeProviderProps = {
|
|
|
34
34
|
[key: string]: string | number;
|
|
35
35
|
};
|
|
36
36
|
};
|
|
37
|
+
export interface Theme {
|
|
38
|
+
[key: string]: string;
|
|
39
|
+
}
|
|
40
|
+
export type WithTheme<T> = T & {
|
|
41
|
+
theme: Theme;
|
|
42
|
+
};
|
|
43
|
+
export type FramerMotionBugFix = WithTheme<unknown>;
|
|
37
44
|
declare const ColorSchemeProvider: FC<ColorSchemeProviderProps>;
|
|
38
45
|
export default ColorSchemeProvider;
|
|
@@ -1,98 +1,58 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.default = void 0;
|
|
9
|
-
|
|
10
7
|
var _colors = require("@chayns/colors");
|
|
11
|
-
|
|
12
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
-
|
|
14
9
|
var _styledComponents = require("styled-components");
|
|
15
|
-
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
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; }
|
|
21
|
-
|
|
22
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
23
|
-
|
|
24
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
25
|
-
|
|
26
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
27
|
-
|
|
28
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
29
|
-
|
|
30
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
31
|
-
|
|
32
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
33
|
-
|
|
34
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
35
|
-
|
|
36
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
37
|
-
|
|
38
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
39
|
-
|
|
40
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
41
|
-
|
|
42
|
-
var ColorMode;
|
|
43
|
-
|
|
44
|
-
(function (ColorMode) {
|
|
10
|
+
var _font = require("./font");
|
|
11
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
12
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
|
+
var ColorMode = /*#__PURE__*/function (ColorMode) {
|
|
45
14
|
ColorMode[ColorMode["Classic"] = 0] = "Classic";
|
|
46
15
|
ColorMode[ColorMode["Dark"] = 1] = "Dark";
|
|
47
16
|
ColorMode[ColorMode["Light"] = 2] = "Light";
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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
|
-
var hexColor = (0, _colors.getColorFromPalette)(colorName, {
|
|
80
|
-
color: color,
|
|
81
|
-
colorMode: colorMode,
|
|
82
|
-
secondaryColor: secondaryColor
|
|
17
|
+
return ColorMode;
|
|
18
|
+
}(ColorMode || {}); // ToDo remove type after the framer-motion bug is Fixed
|
|
19
|
+
const GlobalStyle = (0, _styledComponents.createGlobalStyle)`
|
|
20
|
+
${_font.generateFontFaces}
|
|
21
|
+
|
|
22
|
+
.ellipsis {
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
text-overflow: ellipsis;
|
|
25
|
+
white-space: nowrap;
|
|
26
|
+
}
|
|
27
|
+
`;
|
|
28
|
+
const ColorSchemeProvider = _ref => {
|
|
29
|
+
let {
|
|
30
|
+
children,
|
|
31
|
+
color = '#005EB8',
|
|
32
|
+
colorMode = ColorMode.Classic,
|
|
33
|
+
cssVariables = {},
|
|
34
|
+
secondaryColor,
|
|
35
|
+
style = {}
|
|
36
|
+
} = _ref;
|
|
37
|
+
const [colors, setColors] = (0, _react.useState)({});
|
|
38
|
+
const [themeColors, setThemeColors] = (0, _react.useState)({});
|
|
39
|
+
(0, _react.useEffect)(() => {
|
|
40
|
+
const availableColors = (0, _colors.getAvailableColorList)();
|
|
41
|
+
const newColors = {};
|
|
42
|
+
const newThemeColors = {};
|
|
43
|
+
availableColors.forEach(colorName => {
|
|
44
|
+
const hexColor = (0, _colors.getColorFromPalette)(colorName, {
|
|
45
|
+
color,
|
|
46
|
+
colorMode,
|
|
47
|
+
secondaryColor
|
|
83
48
|
});
|
|
84
|
-
|
|
85
|
-
if (colorName === 'text') {// console.debug('textColor', hexColor);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
49
|
if (hexColor) {
|
|
89
|
-
|
|
90
|
-
newColors[
|
|
50
|
+
const rgbColor = (0, _colors.hexToRgb255)(hexColor);
|
|
51
|
+
newColors[`--chayns-color--${colorName}`] = hexColor;
|
|
91
52
|
newThemeColors[colorName] = hexColor;
|
|
92
|
-
|
|
93
53
|
if (rgbColor) {
|
|
94
|
-
newColors[
|
|
95
|
-
newThemeColors[
|
|
54
|
+
newColors[`--chayns-color-rgb--${colorName}`] = `${rgbColor.r}, ${rgbColor.g}, ${rgbColor.b}`;
|
|
55
|
+
newThemeColors[`${colorName}-rgb`] = `${rgbColor.r}, ${rgbColor.g}, ${rgbColor.b}`;
|
|
96
56
|
}
|
|
97
57
|
}
|
|
98
58
|
});
|
|
@@ -102,11 +62,13 @@ var ColorSchemeProvider = function ColorSchemeProvider(_ref) {
|
|
|
102
62
|
return /*#__PURE__*/_react.default.createElement(_styledComponents.ThemeProvider, {
|
|
103
63
|
theme: themeColors
|
|
104
64
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
105
|
-
style:
|
|
65
|
+
style: {
|
|
66
|
+
...colors,
|
|
67
|
+
...cssVariables,
|
|
68
|
+
...style
|
|
69
|
+
}
|
|
106
70
|
}, children), /*#__PURE__*/_react.default.createElement(GlobalStyle, null));
|
|
107
71
|
};
|
|
108
|
-
|
|
109
72
|
ColorSchemeProvider.displayName = 'ColorSchemeProvider';
|
|
110
|
-
var _default = ColorSchemeProvider;
|
|
111
|
-
exports.default = _default;
|
|
73
|
+
var _default = exports.default = ColorSchemeProvider;
|
|
112
74
|
//# sourceMappingURL=ColorSchemeProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"ColorSchemeProvider.js","names":["_colors","require","_react","_interopRequireWildcard","_styledComponents","_font","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","ColorMode","GlobalStyle","createGlobalStyle","generateFontFaces","ColorSchemeProvider","_ref","children","color","colorMode","Classic","cssVariables","secondaryColor","style","colors","setColors","useState","themeColors","setThemeColors","useEffect","availableColors","getAvailableColorList","newColors","newThemeColors","forEach","colorName","hexColor","getColorFromPalette","rgbColor","hexToRgb255","g","b","createElement","ThemeProvider","theme","displayName","_default","exports"],"sources":["../../../src/components/color-scheme-provider/ColorSchemeProvider.tsx"],"sourcesContent":["import { getAvailableColorList, getColorFromPalette, hexToRgb255 } from '@chayns/colors';\nimport React, { FC, ReactNode, useEffect, useState } from 'react';\nimport { createGlobalStyle, ThemeProvider } from 'styled-components';\nimport { generateFontFaces } from './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 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\n .ellipsis {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n`;\n\nconst ColorSchemeProvider: FC<ColorSchemeProviderProps> = ({\n children,\n color = '#005EB8',\n colorMode = ColorMode.Classic,\n cssVariables = {},\n secondaryColor,\n style = {},\n}) => {\n const [colors, setColors] = useState<Theme>({});\n const [themeColors, setThemeColors] = useState<Theme>({});\n\n useEffect(() => {\n const availableColors = getAvailableColorList();\n\n const newColors: Theme = {};\n const newThemeColors: Theme = {};\n\n availableColors.forEach((colorName: string) => {\n const hexColor = getColorFromPalette(colorName, {\n color,\n colorMode,\n secondaryColor,\n });\n\n if (hexColor) {\n const rgbColor = hexToRgb255(hexColor);\n\n newColors[`--chayns-color--${colorName}`] = hexColor;\n newThemeColors[colorName] = hexColor;\n\n if (rgbColor) {\n newColors[`--chayns-color-rgb--${colorName}`] =\n `${rgbColor.r}, ${rgbColor.g}, ${rgbColor.b}`;\n newThemeColors[`${colorName}-rgb`] =\n `${rgbColor.r}, ${rgbColor.g}, ${rgbColor.b}`;\n }\n }\n });\n\n setColors(newColors);\n setThemeColors(newThemeColors);\n }, [color, colorMode, secondaryColor]);\n\n return (\n <ThemeProvider theme={themeColors}>\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,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AAA2C,SAAAK,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAJ,wBAAAI,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAjB,CAAA,EAAAc,CAAA,SAAAI,CAAA,GAAAR,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAI,CAAA,KAAAA,CAAA,CAAAX,GAAA,IAAAW,CAAA,CAAAC,GAAA,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5
|
+
});
|
|
6
|
+
exports.generateFontFaces = void 0;
|
|
7
|
+
const fonts = [{
|
|
8
|
+
family: 'Noto Color Emoji',
|
|
9
|
+
src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.0.woff2',
|
|
10
|
+
unicodeRange: 'U+1f1e6-1f1ff'
|
|
11
|
+
}, {
|
|
12
|
+
family: 'Noto Color Emoji',
|
|
13
|
+
src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.1.woff2',
|
|
14
|
+
unicodeRange: 'U+200d, U+2620, U+26a7, U+fe0f, U+1f308, U+1f38c, U+1f3c1, U+1f3f3-1f3f4, U+1f6a9, U+e0062-e0063, U+e0065, U+e0067, U+e006c, U+e006e, U+e0073-e0074, U+e0077, U+e007f'
|
|
15
|
+
}, {
|
|
16
|
+
family: 'Noto Color Emoji',
|
|
17
|
+
src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.2.woff2',
|
|
18
|
+
unicodeRange: 'U+23, U+2a, U+30-39, U+a9, U+ae, U+200d, U+203c, U+2049, U+20e3, U+2122, U+2139, U+2194-2199, U+21a9-21aa, U+23cf, U+23e9-23ef, U+23f8-23fa, U+24c2, U+25aa-25ab, U+25b6, U+25c0, U+25fb-25fe, U+2611, U+2622-2623, U+2626, U+262a, U+262e-262f, U+2638, U+2640, U+2642, U+2648-2653, U+2660, U+2663, U+2665-2666, U+2668, U+267b, U+267e-267f, U+2695, U+269b-269c, U+26a0, U+26a7, U+26aa-26ab, U+26ce, U+26d4, U+2705, U+2714, U+2716, U+271d, U+2721, U+2733-2734, U+2747, U+274c, U+274e, U+2753-2755, U+2757, U+2764, U+2795-2797, U+27a1, U+27b0, U+27bf, U+2934-2935, U+2b05-2b07, U+2b1b-2b1c, U+2b55, U+3030, U+303d, U+3297, U+3299, U+fe0f, U+1f170-1f171, U+1f17e-1f17f, U+1f18e, U+1f191-1f19a, U+1f201-1f202, U+1f21a, U+1f22f, U+1f232-1f23a, U+1f250-1f251, U+1f310, U+1f3a6, U+1f3b5-1f3b6, U+1f3bc, U+1f3e7, U+1f441, U+1f499-1f49c, U+1f49f-1f4a0, U+1f4a2, U+1f4ac-1f4ad, U+1f4b1-1f4b2, U+1f4b9, U+1f4db, U+1f4f2-1f4f6, U+1f500-1f50a, U+1f515, U+1f518-1f524, U+1f52f-1f53d, U+1f549, U+1f54e, U+1f5a4, U+1f5e8, U+1f5ef, U+1f6ab, U+1f6ad-1f6b1, U+1f6b3, U+1f6b7-1f6bc, U+1f6be, U+1f6c2-1f6c5, U+1f6d0-1f6d1, U+1f6d7, U+1f6dc, U+1f7e0-1f7eb, U+1f7f0, U+1f90d-1f90e, U+1f9e1, U+1fa75-1fa77, U+1faaf'
|
|
19
|
+
}, {
|
|
20
|
+
family: 'Noto Color Emoji',
|
|
21
|
+
src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.3.woff2',
|
|
22
|
+
unicodeRange: 'U+231a-231b, U+2328, U+23f0-23f3, U+2602, U+260e, U+2692, U+2694, U+2696-2697, U+2699, U+26b0-26b1, U+26cf, U+26d1, U+26d3, U+2702, U+2709, U+270f, U+2712, U+fe0f, U+1f302, U+1f321, U+1f392-1f393, U+1f3a9, U+1f3bd, U+1f3ee, U+1f3f7, U+1f3fa, U+1f451-1f462, U+1f484, U+1f489-1f48a, U+1f48c-1f48e, U+1f4a1, U+1f4a3, U+1f4b0, U+1f4b3-1f4b8, U+1f4bb-1f4da, U+1f4dc-1f4f1, U+1f4ff, U+1f50b-1f514, U+1f516-1f517, U+1f526-1f529, U+1f52c-1f52e, U+1f550-1f567, U+1f56f-1f570, U+1f576, U+1f587, U+1f58a-1f58d, U+1f5a5, U+1f5a8, U+1f5b1-1f5b2, U+1f5c2-1f5c4, U+1f5d1-1f5d3, U+1f5dc-1f5de, U+1f5e1, U+1f5f3, U+1f6aa, U+1f6ac, U+1f6bd, U+1f6bf, U+1f6c1, U+1f6cb, U+1f6cd-1f6cf, U+1f6d2, U+1f6e0-1f6e1, U+1f6f0, U+1f97b-1f97f, U+1f9af, U+1f9ba, U+1f9e2-1f9e6, U+1f9ea-1f9ec, U+1f9ee-1f9f4, U+1f9f7-1f9ff, U+1fa71-1fa74, U+1fa79-1fa7b, U+1fa86, U+1fa91-1fa93, U+1fa96, U+1fa99-1faa0, U+1faa2-1faa7, U+1faaa-1faae'
|
|
23
|
+
}, {
|
|
24
|
+
family: 'Noto Color Emoji',
|
|
25
|
+
src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.4.woff2',
|
|
26
|
+
unicodeRange: 'U+265f, U+26bd-26be, U+26f3, U+26f8, U+fe0f, U+1f004, U+1f0cf, U+1f380-1f384, U+1f386-1f38b, U+1f38d-1f391, U+1f396-1f397, U+1f399-1f39b, U+1f39e-1f39f, U+1f3a3-1f3a5, U+1f3a7-1f3a9, U+1f3ab-1f3b4, U+1f3b7-1f3bb, U+1f3bd-1f3c0, U+1f3c5-1f3c6, U+1f3c8-1f3c9, U+1f3cf-1f3d3, U+1f3f8-1f3f9, U+1f47e, U+1f4e2, U+1f4f7-1f4fd, U+1f52b, U+1f579, U+1f58c-1f58d, U+1f5bc, U+1f6f7, U+1f6f9, U+1f6fc, U+1f93f, U+1f941, U+1f945, U+1f947-1f94f, U+1f9e7-1f9e9, U+1f9f5-1f9f6, U+1fa70-1fa71, U+1fa80-1fa81, U+1fa83-1fa85, U+1fa87-1fa88, U+1fa94-1fa95, U+1fa97-1fa98, U+1faa1, U+1faa9'
|
|
27
|
+
}, {
|
|
28
|
+
family: 'Noto Color Emoji',
|
|
29
|
+
src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.5.woff2',
|
|
30
|
+
unicodeRange: 'U+2693, U+26e9-26ea, U+26f1-26f2, U+26f4-26f5, U+26fa, U+26fd, U+2708, U+fe0f, U+1f301, U+1f303, U+1f306-1f307, U+1f309, U+1f310, U+1f3a0-1f3a2, U+1f3aa, U+1f3cd-1f3ce, U+1f3d5, U+1f3d7-1f3db, U+1f3df-1f3e6, U+1f3e8-1f3ed, U+1f3ef-1f3f0, U+1f488, U+1f492, U+1f4ba, U+1f54b-1f54d, U+1f5fa-1f5ff, U+1f680-1f6a2, U+1f6a4-1f6a8, U+1f6b2, U+1f6d1, U+1f6d5-1f6d6, U+1f6dd-1f6df, U+1f6e2-1f6e5, U+1f6e9, U+1f6eb-1f6ec, U+1f6f3-1f6f6, U+1f6f8, U+1f6fa-1f6fb, U+1f9bc-1f9bd, U+1f9ed, U+1f9f3, U+1fa7c'
|
|
31
|
+
}, {
|
|
32
|
+
family: 'Noto Color Emoji',
|
|
33
|
+
src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.6.woff2',
|
|
34
|
+
unicodeRange: 'U+2615, U+fe0f, U+1f32d-1f330, U+1f336, U+1f33d, U+1f345-1f37f, U+1f382, U+1f52a, U+1f942-1f944, U+1f950-1f96f, U+1f99e, U+1f9aa, U+1f9c0-1f9cb, U+1fad0-1fadb'
|
|
35
|
+
}, {
|
|
36
|
+
family: 'Noto Color Emoji',
|
|
37
|
+
src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.7.woff2',
|
|
38
|
+
unicodeRange: 'U+200d, U+2600-2601, U+2603-2604, U+2614, U+2618, U+26a1, U+26c4-26c5, U+26c8, U+26f0, U+2728, U+2744, U+2b1b, U+2b50, U+fe0f, U+1f300, U+1f304-1f305, U+1f308, U+1f30a-1f30f, U+1f311-1f321, U+1f324-1f32c, U+1f331-1f335, U+1f337-1f33c, U+1f33e-1f344, U+1f3d4, U+1f3d6, U+1f3dc-1f3de, U+1f3f5, U+1f400-1f43f, U+1f490, U+1f4a7, U+1f4ab, U+1f4ae, U+1f525, U+1f54a, U+1f573, U+1f577-1f578, U+1f648-1f64a, U+1f940, U+1f980-1f9ae, U+1f9ba, U+1fa90, U+1faa8, U+1fab0-1fabd, U+1fabf, U+1face-1facf, U+1fae7'
|
|
39
|
+
}, {
|
|
40
|
+
family: 'Noto Color Emoji',
|
|
41
|
+
src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.8.woff2',
|
|
42
|
+
unicodeRange: 'U+200d, U+2640, U+2642, U+2695-2696, U+26f7, U+26f9, U+2708, U+2764, U+fe0f, U+1f33e, U+1f373, U+1f37c, U+1f384-1f385, U+1f393, U+1f3a4, U+1f3a8, U+1f3c2-1f3c4, U+1f3c7, U+1f3ca-1f3cc, U+1f3eb, U+1f3ed, U+1f3fb-1f3ff, U+1f466-1f478, U+1f47c, U+1f481-1f483, U+1f486-1f487, U+1f48b, U+1f48f, U+1f491, U+1f4bb-1f4bc, U+1f527, U+1f52c, U+1f574-1f575, U+1f57a, U+1f645-1f647, U+1f64b, U+1f64d-1f64e, U+1f680, U+1f692, U+1f6a3, U+1f6b4-1f6b6, U+1f6c0, U+1f6cc, U+1f91d, U+1f926, U+1f930-1f931, U+1f934-1f93a, U+1f93c-1f93e, U+1f977, U+1f9af-1f9b3, U+1f9b8-1f9b9, U+1f9bc-1f9bd, U+1f9cc-1f9cf, U+1f9d1-1f9df, U+1fa82, U+1fac3-1fac5'
|
|
43
|
+
}, {
|
|
44
|
+
family: 'Noto Color Emoji',
|
|
45
|
+
src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.9.woff2',
|
|
46
|
+
unicodeRange: 'U+200d, U+261d, U+2620, U+2639-263a, U+2665, U+270a-270d, U+2728, U+2763-2764, U+2b50, U+fe0f, U+1f31a-1f31f, U+1f32b, U+1f383, U+1f389, U+1f3fb-1f3ff, U+1f440-1f450, U+1f463-1f465, U+1f479-1f47b, U+1f47d-1f480, U+1f485, U+1f48b-1f48c, U+1f493-1f49f, U+1f4a4-1f4a6, U+1f4a8-1f4ab, U+1f4af, U+1f525, U+1f573, U+1f590, U+1f595-1f596, U+1f5a4, U+1f5e3, U+1f600-1f644, U+1f648-1f64a, U+1f64c, U+1f64f, U+1f90c-1f925, U+1f927-1f92f, U+1f932-1f933, U+1f970-1f976, U+1f978-1f97a, U+1f9a0, U+1f9b4-1f9b7, U+1f9bb, U+1f9be-1f9bf, U+1f9d0, U+1f9e0-1f9e1, U+1fa75-1fa79, U+1fac0-1fac2, U+1fae0-1fae6, U+1fae8, U+1faf0-1faf8'
|
|
47
|
+
}];
|
|
48
|
+
const generateFontFaces = () => fonts.map(font => `
|
|
49
|
+
@font-face {
|
|
50
|
+
font-display: swap;
|
|
51
|
+
font-family: "${font.family}";
|
|
52
|
+
font-style: normal;
|
|
53
|
+
font-weight: 400;
|
|
54
|
+
src: url("${font.src}") format("woff2");
|
|
55
|
+
${font.unicodeRange ? `unicode-range: ${font.unicodeRange};` : ''}
|
|
56
|
+
}
|
|
57
|
+
`).join('');
|
|
58
|
+
exports.generateFontFaces = generateFontFaces;
|
|
59
|
+
//# sourceMappingURL=font.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"font.js","names":["fonts","family","src","unicodeRange","generateFontFaces","map","font","join","exports"],"sources":["../../../src/components/color-scheme-provider/font.ts"],"sourcesContent":["export interface Font {\n family: string;\n src: string;\n unicodeRange?: string;\n}\n\nconst fonts: Font[] = [\n {\n family: 'Noto Color Emoji',\n src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.0.woff2',\n unicodeRange: 'U+1f1e6-1f1ff',\n },\n {\n family: 'Noto Color Emoji',\n src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.1.woff2',\n unicodeRange:\n 'U+200d, U+2620, U+26a7, U+fe0f, U+1f308, U+1f38c, U+1f3c1, U+1f3f3-1f3f4, U+1f6a9, U+e0062-e0063, U+e0065, U+e0067, U+e006c, U+e006e, U+e0073-e0074, U+e0077, U+e007f',\n },\n {\n family: 'Noto Color Emoji',\n src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.2.woff2',\n unicodeRange:\n 'U+23, U+2a, U+30-39, U+a9, U+ae, U+200d, U+203c, U+2049, U+20e3, U+2122, U+2139, U+2194-2199, U+21a9-21aa, U+23cf, U+23e9-23ef, U+23f8-23fa, U+24c2, U+25aa-25ab, U+25b6, U+25c0, U+25fb-25fe, U+2611, U+2622-2623, U+2626, U+262a, U+262e-262f, U+2638, U+2640, U+2642, U+2648-2653, U+2660, U+2663, U+2665-2666, U+2668, U+267b, U+267e-267f, U+2695, U+269b-269c, U+26a0, U+26a7, U+26aa-26ab, U+26ce, U+26d4, U+2705, U+2714, U+2716, U+271d, U+2721, U+2733-2734, U+2747, U+274c, U+274e, U+2753-2755, U+2757, U+2764, U+2795-2797, U+27a1, U+27b0, U+27bf, U+2934-2935, U+2b05-2b07, U+2b1b-2b1c, U+2b55, U+3030, U+303d, U+3297, U+3299, U+fe0f, U+1f170-1f171, U+1f17e-1f17f, U+1f18e, U+1f191-1f19a, U+1f201-1f202, U+1f21a, U+1f22f, U+1f232-1f23a, U+1f250-1f251, U+1f310, U+1f3a6, U+1f3b5-1f3b6, U+1f3bc, U+1f3e7, U+1f441, U+1f499-1f49c, U+1f49f-1f4a0, U+1f4a2, U+1f4ac-1f4ad, U+1f4b1-1f4b2, U+1f4b9, U+1f4db, U+1f4f2-1f4f6, U+1f500-1f50a, U+1f515, U+1f518-1f524, U+1f52f-1f53d, U+1f549, U+1f54e, U+1f5a4, U+1f5e8, U+1f5ef, U+1f6ab, U+1f6ad-1f6b1, U+1f6b3, U+1f6b7-1f6bc, U+1f6be, U+1f6c2-1f6c5, U+1f6d0-1f6d1, U+1f6d7, U+1f6dc, U+1f7e0-1f7eb, U+1f7f0, U+1f90d-1f90e, U+1f9e1, U+1fa75-1fa77, U+1faaf',\n },\n {\n family: 'Noto Color Emoji',\n src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.3.woff2',\n unicodeRange:\n 'U+231a-231b, U+2328, U+23f0-23f3, U+2602, U+260e, U+2692, U+2694, U+2696-2697, U+2699, U+26b0-26b1, U+26cf, U+26d1, U+26d3, U+2702, U+2709, U+270f, U+2712, U+fe0f, U+1f302, U+1f321, U+1f392-1f393, U+1f3a9, U+1f3bd, U+1f3ee, U+1f3f7, U+1f3fa, U+1f451-1f462, U+1f484, U+1f489-1f48a, U+1f48c-1f48e, U+1f4a1, U+1f4a3, U+1f4b0, U+1f4b3-1f4b8, U+1f4bb-1f4da, U+1f4dc-1f4f1, U+1f4ff, U+1f50b-1f514, U+1f516-1f517, U+1f526-1f529, U+1f52c-1f52e, U+1f550-1f567, U+1f56f-1f570, U+1f576, U+1f587, U+1f58a-1f58d, U+1f5a5, U+1f5a8, U+1f5b1-1f5b2, U+1f5c2-1f5c4, U+1f5d1-1f5d3, U+1f5dc-1f5de, U+1f5e1, U+1f5f3, U+1f6aa, U+1f6ac, U+1f6bd, U+1f6bf, U+1f6c1, U+1f6cb, U+1f6cd-1f6cf, U+1f6d2, U+1f6e0-1f6e1, U+1f6f0, U+1f97b-1f97f, U+1f9af, U+1f9ba, U+1f9e2-1f9e6, U+1f9ea-1f9ec, U+1f9ee-1f9f4, U+1f9f7-1f9ff, U+1fa71-1fa74, U+1fa79-1fa7b, U+1fa86, U+1fa91-1fa93, U+1fa96, U+1fa99-1faa0, U+1faa2-1faa7, U+1faaa-1faae',\n },\n {\n family: 'Noto Color Emoji',\n src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.4.woff2',\n unicodeRange:\n 'U+265f, U+26bd-26be, U+26f3, U+26f8, U+fe0f, U+1f004, U+1f0cf, U+1f380-1f384, U+1f386-1f38b, U+1f38d-1f391, U+1f396-1f397, U+1f399-1f39b, U+1f39e-1f39f, U+1f3a3-1f3a5, U+1f3a7-1f3a9, U+1f3ab-1f3b4, U+1f3b7-1f3bb, U+1f3bd-1f3c0, U+1f3c5-1f3c6, U+1f3c8-1f3c9, U+1f3cf-1f3d3, U+1f3f8-1f3f9, U+1f47e, U+1f4e2, U+1f4f7-1f4fd, U+1f52b, U+1f579, U+1f58c-1f58d, U+1f5bc, U+1f6f7, U+1f6f9, U+1f6fc, U+1f93f, U+1f941, U+1f945, U+1f947-1f94f, U+1f9e7-1f9e9, U+1f9f5-1f9f6, U+1fa70-1fa71, U+1fa80-1fa81, U+1fa83-1fa85, U+1fa87-1fa88, U+1fa94-1fa95, U+1fa97-1fa98, U+1faa1, U+1faa9',\n },\n {\n family: 'Noto Color Emoji',\n src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.5.woff2',\n unicodeRange:\n 'U+2693, U+26e9-26ea, U+26f1-26f2, U+26f4-26f5, U+26fa, U+26fd, U+2708, U+fe0f, U+1f301, U+1f303, U+1f306-1f307, U+1f309, U+1f310, U+1f3a0-1f3a2, U+1f3aa, U+1f3cd-1f3ce, U+1f3d5, U+1f3d7-1f3db, U+1f3df-1f3e6, U+1f3e8-1f3ed, U+1f3ef-1f3f0, U+1f488, U+1f492, U+1f4ba, U+1f54b-1f54d, U+1f5fa-1f5ff, U+1f680-1f6a2, U+1f6a4-1f6a8, U+1f6b2, U+1f6d1, U+1f6d5-1f6d6, U+1f6dd-1f6df, U+1f6e2-1f6e5, U+1f6e9, U+1f6eb-1f6ec, U+1f6f3-1f6f6, U+1f6f8, U+1f6fa-1f6fb, U+1f9bc-1f9bd, U+1f9ed, U+1f9f3, U+1fa7c',\n },\n {\n family: 'Noto Color Emoji',\n src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.6.woff2',\n unicodeRange:\n 'U+2615, U+fe0f, U+1f32d-1f330, U+1f336, U+1f33d, U+1f345-1f37f, U+1f382, U+1f52a, U+1f942-1f944, U+1f950-1f96f, U+1f99e, U+1f9aa, U+1f9c0-1f9cb, U+1fad0-1fadb',\n },\n {\n family: 'Noto Color Emoji',\n src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.7.woff2',\n unicodeRange:\n 'U+200d, U+2600-2601, U+2603-2604, U+2614, U+2618, U+26a1, U+26c4-26c5, U+26c8, U+26f0, U+2728, U+2744, U+2b1b, U+2b50, U+fe0f, U+1f300, U+1f304-1f305, U+1f308, U+1f30a-1f30f, U+1f311-1f321, U+1f324-1f32c, U+1f331-1f335, U+1f337-1f33c, U+1f33e-1f344, U+1f3d4, U+1f3d6, U+1f3dc-1f3de, U+1f3f5, U+1f400-1f43f, U+1f490, U+1f4a7, U+1f4ab, U+1f4ae, U+1f525, U+1f54a, U+1f573, U+1f577-1f578, U+1f648-1f64a, U+1f940, U+1f980-1f9ae, U+1f9ba, U+1fa90, U+1faa8, U+1fab0-1fabd, U+1fabf, U+1face-1facf, U+1fae7',\n },\n {\n family: 'Noto Color Emoji',\n src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.8.woff2',\n unicodeRange:\n 'U+200d, U+2640, U+2642, U+2695-2696, U+26f7, U+26f9, U+2708, U+2764, U+fe0f, U+1f33e, U+1f373, U+1f37c, U+1f384-1f385, U+1f393, U+1f3a4, U+1f3a8, U+1f3c2-1f3c4, U+1f3c7, U+1f3ca-1f3cc, U+1f3eb, U+1f3ed, U+1f3fb-1f3ff, U+1f466-1f478, U+1f47c, U+1f481-1f483, U+1f486-1f487, U+1f48b, U+1f48f, U+1f491, U+1f4bb-1f4bc, U+1f527, U+1f52c, U+1f574-1f575, U+1f57a, U+1f645-1f647, U+1f64b, U+1f64d-1f64e, U+1f680, U+1f692, U+1f6a3, U+1f6b4-1f6b6, U+1f6c0, U+1f6cc, U+1f91d, U+1f926, U+1f930-1f931, U+1f934-1f93a, U+1f93c-1f93e, U+1f977, U+1f9af-1f9b3, U+1f9b8-1f9b9, U+1f9bc-1f9bd, U+1f9cc-1f9cf, U+1f9d1-1f9df, U+1fa82, U+1fac3-1fac5',\n },\n {\n family: 'Noto Color Emoji',\n src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.9.woff2',\n unicodeRange:\n 'U+200d, U+261d, U+2620, U+2639-263a, U+2665, U+270a-270d, U+2728, U+2763-2764, U+2b50, U+fe0f, U+1f31a-1f31f, U+1f32b, U+1f383, U+1f389, U+1f3fb-1f3ff, U+1f440-1f450, U+1f463-1f465, U+1f479-1f47b, U+1f47d-1f480, U+1f485, U+1f48b-1f48c, U+1f493-1f49f, U+1f4a4-1f4a6, U+1f4a8-1f4ab, U+1f4af, U+1f525, U+1f573, U+1f590, U+1f595-1f596, U+1f5a4, U+1f5e3, U+1f600-1f644, U+1f648-1f64a, U+1f64c, U+1f64f, U+1f90c-1f925, U+1f927-1f92f, U+1f932-1f933, U+1f970-1f976, U+1f978-1f97a, U+1f9a0, U+1f9b4-1f9b7, U+1f9bb, U+1f9be-1f9bf, U+1f9d0, U+1f9e0-1f9e1, U+1fa75-1fa79, U+1fac0-1fac2, U+1fae0-1fae6, U+1fae8, U+1faf0-1faf8',\n },\n];\n\nexport const generateFontFaces = () =>\n fonts\n .map(\n (font) => `\n @font-face {\n font-display: swap;\n font-family: \"${font.family}\";\n font-style: normal;\n font-weight: 400;\n src: url(\"${font.src}\") format(\"woff2\");\n ${font.unicodeRange ? `unicode-range: ${font.unicodeRange};` : ''}\n }\n`\n )\n .join('');\n"],"mappings":";;;;;;AAMA,MAAMA,KAAa,GAAG,CAClB;EACIC,MAAM,EAAE,kBAAkB;EAC1BC,GAAG,EAAE,kHAAkH;EACvHC,YAAY,EAAE;AAClB,CAAC,EACD;EACIF,MAAM,EAAE,kBAAkB;EAC1BC,GAAG,EAAE,kHAAkH;EACvHC,YAAY,EACR;AACR,CAAC,EACD;EACIF,MAAM,EAAE,kBAAkB;EAC1BC,GAAG,EAAE,kHAAkH;EACvHC,YAAY,EACR;AACR,CAAC,EACD;EACIF,MAAM,EAAE,kBAAkB;EAC1BC,GAAG,EAAE,kHAAkH;EACvHC,YAAY,EACR;AACR,CAAC,EACD;EACIF,MAAM,EAAE,kBAAkB;EAC1BC,GAAG,EAAE,kHAAkH;EACvHC,YAAY,EACR;AACR,CAAC,EACD;EACIF,MAAM,EAAE,kBAAkB;EAC1BC,GAAG,EAAE,kHAAkH;EACvHC,YAAY,EACR;AACR,CAAC,EACD;EACIF,MAAM,EAAE,kBAAkB;EAC1BC,GAAG,EAAE,kHAAkH;EACvHC,YAAY,EACR;AACR,CAAC,EACD;EACIF,MAAM,EAAE,kBAAkB;EAC1BC,GAAG,EAAE,kHAAkH;EACvHC,YAAY,EACR;AACR,CAAC,EACD;EACIF,MAAM,EAAE,kBAAkB;EAC1BC,GAAG,EAAE,kHAAkH;EACvHC,YAAY,EACR;AACR,CAAC,EACD;EACIF,MAAM,EAAE,kBAAkB;EAC1BC,GAAG,EAAE,kHAAkH;EACvHC,YAAY,EACR;AACR,CAAC,CACJ;AAEM,MAAMC,iBAAiB,GAAGA,CAAA,KAC7BJ,KAAK,CACAK,GAAG,CACCC,IAAI,IAAM;AACvB;AACA;AACA,oBAAoBA,IAAI,CAACL,MAAO;AAChC;AACA;AACA,gBAAgBK,IAAI,CAACJ,GAAI;AACzB,MAAMI,IAAI,CAACH,YAAY,GAAI,kBAAiBG,IAAI,CAACH,YAAa,GAAE,GAAG,EAAG;AACtE;AACA,CACQ,CAAC,CACAI,IAAI,CAAC,EAAE,CAAC;AAACC,OAAA,CAAAJ,iBAAA,GAAAA,iBAAA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { FC, type CSSProperties } from 'react';
|
|
2
|
+
import { ComboBoxDirection } from '../../types/comboBox';
|
|
3
|
+
export interface IComboBoxItem {
|
|
4
|
+
imageUrl?: string;
|
|
5
|
+
text: string;
|
|
6
|
+
value: string | number;
|
|
7
|
+
}
|
|
8
|
+
export type ComboBoxProps = {
|
|
9
|
+
/**
|
|
10
|
+
* The direction in which the combobox should open.
|
|
11
|
+
*/
|
|
12
|
+
direction?: ComboBoxDirection;
|
|
13
|
+
/**
|
|
14
|
+
* Whether the combobox should be disabled.
|
|
15
|
+
*/
|
|
16
|
+
isDisabled?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* The list of the items that should be displayed.
|
|
19
|
+
*/
|
|
20
|
+
list: IComboBoxItem[];
|
|
21
|
+
/**
|
|
22
|
+
* The maximum height of the combobox content.
|
|
23
|
+
*/
|
|
24
|
+
maxHeight?: CSSProperties['maxHeight'];
|
|
25
|
+
/**
|
|
26
|
+
* Function that should be executed when an item is selected.
|
|
27
|
+
*/
|
|
28
|
+
onSelect?: (comboboxItem: IComboBoxItem) => void;
|
|
29
|
+
/**
|
|
30
|
+
* A text that should be displayed when no item is selected.
|
|
31
|
+
*/
|
|
32
|
+
placeholder: string;
|
|
33
|
+
/**
|
|
34
|
+
* An item that should be preselected.
|
|
35
|
+
*/
|
|
36
|
+
selectedItem?: IComboBoxItem;
|
|
37
|
+
/**
|
|
38
|
+
* If true, the images of the items are displayed in a round shape.
|
|
39
|
+
*/
|
|
40
|
+
shouldShowRoundImage?: boolean;
|
|
41
|
+
};
|
|
42
|
+
declare const ComboBox: FC<ComboBoxProps>;
|
|
43
|
+
export default ComboBox;
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _comboBox = require("../../types/comboBox");
|
|
9
|
+
var _calculate = require("../../utils/calculate");
|
|
10
|
+
var _Icon = _interopRequireDefault(require("../icon/Icon"));
|
|
11
|
+
var _ComboBoxItem = _interopRequireDefault(require("./combobox-item/ComboBoxItem"));
|
|
12
|
+
var _ComboBox = require("./ComboBox.styles");
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
15
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
16
|
+
const ComboBox = _ref => {
|
|
17
|
+
let {
|
|
18
|
+
direction = _comboBox.ComboBoxDirection.BOTTOM,
|
|
19
|
+
isDisabled = false,
|
|
20
|
+
list,
|
|
21
|
+
maxHeight = '300px',
|
|
22
|
+
onSelect,
|
|
23
|
+
placeholder,
|
|
24
|
+
selectedItem,
|
|
25
|
+
shouldShowRoundImage
|
|
26
|
+
} = _ref;
|
|
27
|
+
const [item, setItem] = (0, _react.useState)();
|
|
28
|
+
const [isAnimating, setIsAnimating] = (0, _react.useState)(false);
|
|
29
|
+
const [minWidth, setMinWidth] = (0, _react.useState)(0);
|
|
30
|
+
const [height, setHeight] = (0, _react.useState)(0);
|
|
31
|
+
const ref = (0, _react.useRef)(null);
|
|
32
|
+
const {
|
|
33
|
+
isMobile
|
|
34
|
+
} = chayns.env;
|
|
35
|
+
const handleClick = (0, _react.useCallback)(event => {
|
|
36
|
+
if (ref.current && !ref.current.contains(event.target)) {
|
|
37
|
+
setIsAnimating(false);
|
|
38
|
+
}
|
|
39
|
+
}, [ref]);
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* This function adds an event listener to the document to close the combobox when the user clicks outside of it
|
|
43
|
+
*/
|
|
44
|
+
(0, _react.useEffect)(() => {
|
|
45
|
+
document.addEventListener('click', handleClick);
|
|
46
|
+
return () => {
|
|
47
|
+
document.removeEventListener('click', handleClick);
|
|
48
|
+
};
|
|
49
|
+
}, [handleClick, ref]);
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* This function sets the selected item
|
|
53
|
+
*/
|
|
54
|
+
const handleSetSelectedItem = (0, _react.useCallback)(itemToSelect => {
|
|
55
|
+
setItem(itemToSelect);
|
|
56
|
+
setIsAnimating(false);
|
|
57
|
+
if (onSelect) {
|
|
58
|
+
onSelect(itemToSelect);
|
|
59
|
+
}
|
|
60
|
+
}, [onSelect]);
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* This function calculates the greatest width
|
|
64
|
+
*/
|
|
65
|
+
(0, _react.useEffect)(() => {
|
|
66
|
+
const isAtLeastOneItemWithImageGiven = list.some(_ref2 => {
|
|
67
|
+
let {
|
|
68
|
+
imageUrl
|
|
69
|
+
} = _ref2;
|
|
70
|
+
return imageUrl;
|
|
71
|
+
});
|
|
72
|
+
const textArray = list.map(_ref3 => {
|
|
73
|
+
let {
|
|
74
|
+
text
|
|
75
|
+
} = _ref3;
|
|
76
|
+
return text;
|
|
77
|
+
});
|
|
78
|
+
setHeight((0, _calculate.calculateContentHeight)(textArray));
|
|
79
|
+
textArray.push(placeholder);
|
|
80
|
+
|
|
81
|
+
// 45px = padding left + padding right + border left + border right + arrow icon width + arrow icon margin left
|
|
82
|
+
// 32px = image width + flex gap
|
|
83
|
+
setMinWidth((0, _calculate.calculateContentWidth)(textArray) + 45 + (isAtLeastOneItemWithImageGiven ? 32 : 0));
|
|
84
|
+
}, [list, placeholder]);
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* This function sets the external selected item
|
|
88
|
+
*/
|
|
89
|
+
(0, _react.useEffect)(() => {
|
|
90
|
+
if (selectedItem) {
|
|
91
|
+
setItem(selectedItem);
|
|
92
|
+
setIsAnimating(false);
|
|
93
|
+
}
|
|
94
|
+
}, [selectedItem]);
|
|
95
|
+
const placeholderImageUrl = (0, _react.useMemo)(() => {
|
|
96
|
+
if (selectedItem) {
|
|
97
|
+
return selectedItem.imageUrl;
|
|
98
|
+
}
|
|
99
|
+
if (item) {
|
|
100
|
+
return item.imageUrl;
|
|
101
|
+
}
|
|
102
|
+
return undefined;
|
|
103
|
+
}, [item, selectedItem]);
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* This function resets the placeholder
|
|
107
|
+
*/
|
|
108
|
+
const placeholderText = (0, _react.useMemo)(() => {
|
|
109
|
+
let text = placeholder;
|
|
110
|
+
if (selectedItem) {
|
|
111
|
+
text = selectedItem.text;
|
|
112
|
+
} else if (item) {
|
|
113
|
+
text = item.text;
|
|
114
|
+
}
|
|
115
|
+
return text;
|
|
116
|
+
}, [item, placeholder, selectedItem]);
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* This function opens the content of the combobox
|
|
120
|
+
*/
|
|
121
|
+
const handleHeaderClick = (0, _react.useCallback)(() => {
|
|
122
|
+
if (!isDisabled) {
|
|
123
|
+
setIsAnimating(prevState => !prevState);
|
|
124
|
+
}
|
|
125
|
+
}, [isDisabled]);
|
|
126
|
+
const comboBoxBody = (0, _react.useMemo)(() => {
|
|
127
|
+
const items = list.map(_ref4 => {
|
|
128
|
+
let {
|
|
129
|
+
imageUrl,
|
|
130
|
+
text,
|
|
131
|
+
value
|
|
132
|
+
} = _ref4;
|
|
133
|
+
return /*#__PURE__*/_react.default.createElement(_ComboBoxItem.default, {
|
|
134
|
+
imageUrl: imageUrl,
|
|
135
|
+
isSelected: selectedItem ? value === selectedItem.value : false,
|
|
136
|
+
key: value,
|
|
137
|
+
onSelect: handleSetSelectedItem,
|
|
138
|
+
shouldShowRoundImage: shouldShowRoundImage,
|
|
139
|
+
text: text,
|
|
140
|
+
value: value
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
const animate = isAnimating ? {
|
|
144
|
+
height: 'fit-content',
|
|
145
|
+
opacity: 1
|
|
146
|
+
} : {
|
|
147
|
+
height: 0,
|
|
148
|
+
opacity: 0
|
|
149
|
+
};
|
|
150
|
+
const style = direction === _comboBox.ComboBoxDirection.TOP ? {
|
|
151
|
+
transform: 'translateY(-100%)'
|
|
152
|
+
} : undefined;
|
|
153
|
+
return /*#__PURE__*/_react.default.createElement(_ComboBox.StyledMotionComboBoxBody, {
|
|
154
|
+
animate: animate,
|
|
155
|
+
height: height,
|
|
156
|
+
initial: {
|
|
157
|
+
height: 0,
|
|
158
|
+
opacity: 0
|
|
159
|
+
},
|
|
160
|
+
maxHeight: maxHeight,
|
|
161
|
+
minWidth: minWidth,
|
|
162
|
+
style: style,
|
|
163
|
+
direction: direction,
|
|
164
|
+
transition: {
|
|
165
|
+
duration: 0.2
|
|
166
|
+
}
|
|
167
|
+
}, items);
|
|
168
|
+
}, [direction, handleSetSelectedItem, height, isAnimating, list, maxHeight, minWidth, selectedItem, shouldShowRoundImage]);
|
|
169
|
+
return (0, _react.useMemo)(() => /*#__PURE__*/_react.default.createElement(_ComboBox.StyledComboBox, {
|
|
170
|
+
ref: ref
|
|
171
|
+
}, direction === _comboBox.ComboBoxDirection.TOP && comboBoxBody, /*#__PURE__*/_react.default.createElement(_ComboBox.StyledComboBoxHeader, {
|
|
172
|
+
direction: direction,
|
|
173
|
+
minWidth: minWidth,
|
|
174
|
+
onClick: handleHeaderClick,
|
|
175
|
+
isOpen: isAnimating,
|
|
176
|
+
isMobile: isMobile,
|
|
177
|
+
isDisabled: isDisabled
|
|
178
|
+
}, /*#__PURE__*/_react.default.createElement(_ComboBox.StyledComboBoxPlaceholder, null, placeholderImageUrl && /*#__PURE__*/_react.default.createElement(_ComboBox.StyledComboBoxPlaceholderImage, {
|
|
179
|
+
src: placeholderImageUrl,
|
|
180
|
+
shouldShowRoundImage: shouldShowRoundImage
|
|
181
|
+
}), placeholderText), /*#__PURE__*/_react.default.createElement(_ComboBox.StyledComboBoxIconWrapper, null, /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
182
|
+
icons: ['fa fa-chevron-down']
|
|
183
|
+
}))), direction === _comboBox.ComboBoxDirection.BOTTOM && comboBoxBody), [comboBoxBody, direction, handleHeaderClick, isAnimating, isDisabled, isMobile, minWidth, placeholderImageUrl, placeholderText, shouldShowRoundImage]);
|
|
184
|
+
};
|
|
185
|
+
ComboBox.displayName = 'ComboBox';
|
|
186
|
+
var _default = exports.default = ComboBox;
|
|
187
|
+
//# sourceMappingURL=ComboBox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComboBox.js","names":["_react","_interopRequireWildcard","require","_comboBox","_calculate","_Icon","_interopRequireDefault","_ComboBoxItem","_ComboBox","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","ComboBox","_ref","direction","ComboBoxDirection","BOTTOM","isDisabled","list","maxHeight","onSelect","placeholder","selectedItem","shouldShowRoundImage","item","setItem","useState","isAnimating","setIsAnimating","minWidth","setMinWidth","height","setHeight","ref","useRef","isMobile","chayns","env","handleClick","useCallback","event","current","contains","target","useEffect","document","addEventListener","removeEventListener","handleSetSelectedItem","itemToSelect","isAtLeastOneItemWithImageGiven","some","_ref2","imageUrl","textArray","map","_ref3","text","calculateContentHeight","push","calculateContentWidth","placeholderImageUrl","useMemo","undefined","placeholderText","handleHeaderClick","prevState","comboBoxBody","items","_ref4","value","createElement","isSelected","key","animate","opacity","style","TOP","transform","StyledMotionComboBoxBody","initial","transition","duration","StyledComboBox","StyledComboBoxHeader","onClick","isOpen","StyledComboBoxPlaceholder","StyledComboBoxPlaceholderImage","src","StyledComboBoxIconWrapper","icons","displayName","_default","exports"],"sources":["../../../src/components/combobox/ComboBox.tsx"],"sourcesContent":["import React, {\n FC,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n type CSSProperties,\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 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 { 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(\n calculateContentWidth(textArray) + 45 + (isAtLeastOneItemWithImageGiven ? 32 : 0)\n );\n }, [list, placeholder]);\n\n /**\n * This function sets the external selected item\n */\n useEffect(() => {\n if (selectedItem) {\n setItem(selectedItem);\n setIsAnimating(false);\n }\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, text, value }) => (\n <ComboBoxItem\n imageUrl={imageUrl}\n isSelected={selectedItem ? value === selectedItem.value : false}\n key={value}\n onSelect={handleSetSelectedItem}\n shouldShowRoundImage={shouldShowRoundImage}\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 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 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,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AASA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AAO2B,SAAAI,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAZ,wBAAAY,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAH,UAAA,SAAAG,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAF,OAAA,EAAAE,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAC,GAAA,CAAAJ,CAAA,UAAAG,CAAA,CAAAE,GAAA,C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