@chayns-components/core 5.0.0-beta.24 → 5.0.0-beta.240
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 +27 -2
- package/lib/components/accordion/Accordion.js +74 -83
- package/lib/components/accordion/Accordion.js.map +1 -1
- package/lib/components/accordion/Accordion.styles.d.ts +3 -2
- package/lib/components/accordion/Accordion.styles.js +95 -26
- package/lib/components/accordion/Accordion.styles.js.map +1 -1
- package/lib/components/accordion/accordion-body/AccordionBody.d.ts +17 -2
- package/lib/components/accordion/accordion-body/AccordionBody.js +22 -13
- package/lib/components/accordion/accordion-body/AccordionBody.js.map +1 -1
- package/lib/components/accordion/accordion-body/AccordionBody.styles.d.ts +4 -1
- package/lib/components/accordion/accordion-body/AccordionBody.styles.js +15 -10
- package/lib/components/accordion/accordion-body/AccordionBody.styles.js.map +1 -1
- package/lib/components/accordion/accordion-content/AccordionContent.d.ts +16 -2
- package/lib/components/accordion/accordion-content/AccordionContent.js +13 -11
- package/lib/components/accordion/accordion-content/AccordionContent.js.map +1 -1
- package/lib/components/accordion/accordion-content/AccordionContent.styles.d.ts +2 -1
- package/lib/components/accordion/accordion-content/AccordionContent.styles.js +24 -14
- package/lib/components/accordion/accordion-content/AccordionContent.styles.js.map +1 -1
- package/lib/components/accordion/accordion-group/AccordionGroup.d.ts +12 -3
- package/lib/components/accordion/accordion-group/AccordionGroup.js +33 -44
- package/lib/components/accordion/accordion-group/AccordionGroup.js.map +1 -1
- package/lib/components/accordion/accordion-head/AccordionHead.d.ts +1 -1
- package/lib/components/accordion/accordion-head/AccordionHead.js +25 -53
- package/lib/components/accordion/accordion-head/AccordionHead.js.map +1 -1
- package/lib/components/accordion/accordion-head/AccordionHead.styles.js +136 -49
- package/lib/components/accordion/accordion-head/AccordionHead.styles.js.map +1 -1
- package/lib/components/accordion/accordion-intro/AccordionIntro.d.ts +8 -2
- package/lib/components/accordion/accordion-intro/AccordionIntro.js +4 -7
- package/lib/components/accordion/accordion-intro/AccordionIntro.js.map +1 -1
- package/lib/components/accordion/accordion-intro/AccordionIntro.styles.js +3 -9
- 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 +28 -0
- package/lib/components/accordion/accordion-item/AccordionItem.js.map +1 -0
- package/lib/components/accordion/accordion-item/AccordionItem.styles.d.ts +5 -0
- package/lib/components/accordion/accordion-item/AccordionItem.styles.js +34 -0
- package/lib/components/accordion/accordion-item/AccordionItem.styles.js.map +1 -0
- package/lib/components/accordion/utils.js +10 -12
- package/lib/components/accordion/utils.js.map +1 -1
- package/lib/components/amount-control/AmountControl.d.ts +22 -0
- package/lib/components/amount-control/AmountControl.js +186 -0
- package/lib/components/amount-control/AmountControl.js.map +1 -0
- package/lib/components/amount-control/AmountControl.styles.d.ts +14 -0
- package/lib/components/amount-control/AmountControl.styles.js +61 -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 +12 -12
- package/lib/components/badge/Badge.js.map +1 -1
- package/lib/components/badge/Badge.styles.d.ts +4 -1
- package/lib/components/badge/Badge.styles.js +22 -15
- package/lib/components/badge/Badge.styles.js.map +1 -1
- package/lib/components/button/Button.d.ts +6 -2
- package/lib/components/button/Button.js +65 -22
- package/lib/components/button/Button.js.map +1 -1
- package/lib/components/button/Button.styles.d.ts +2 -0
- package/lib/components/button/Button.styles.js +57 -24
- package/lib/components/button/Button.styles.js.map +1 -1
- package/lib/components/checkbox/Checkbox.d.ts +25 -0
- package/lib/components/checkbox/Checkbox.js +44 -0
- package/lib/components/checkbox/Checkbox.js.map +1 -0
- package/lib/components/checkbox/Checkbox.styles.d.ts +6 -0
- package/lib/components/checkbox/Checkbox.styles.js +131 -0
- package/lib/components/checkbox/Checkbox.styles.js.map +1 -0
- package/lib/components/color-scheme-provider/ColorSchemeProvider.d.ts +2 -2
- package/lib/components/color-scheme-provider/ColorSchemeProvider.js +44 -78
- 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 +25 -0
- package/lib/components/combobox/ComboBox.js +144 -0
- package/lib/components/combobox/ComboBox.js.map +1 -0
- package/lib/components/combobox/ComboBox.styles.d.ts +17 -0
- package/lib/components/combobox/ComboBox.styles.js +128 -0
- package/lib/components/combobox/ComboBox.styles.js.map +1 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.d.ts +18 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.js +30 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.js.map +1 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.styles.d.ts +6 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.styles.js +30 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.styles.js.map +1 -0
- package/lib/components/content-card/ContentCard.d.ts +9 -0
- package/lib/components/content-card/ContentCard.js +19 -0
- package/lib/components/content-card/ContentCard.js.map +1 -0
- package/lib/components/content-card/ContentCard.styles.d.ts +1 -0
- package/lib/components/content-card/ContentCard.styles.js +23 -0
- package/lib/components/content-card/ContentCard.styles.js.map +1 -0
- package/lib/components/context-menu/ContextMenu.d.ts +6 -6
- package/lib/components/context-menu/ContextMenu.js +82 -98
- package/lib/components/context-menu/ContextMenu.js.map +1 -1
- package/lib/components/context-menu/ContextMenu.styles.js +3 -9
- package/lib/components/context-menu/ContextMenu.styles.js.map +1 -1
- package/lib/components/context-menu/constants/alignment.js +4 -5
- package/lib/components/context-menu/constants/alignment.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 +32 -28
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.js.map +1 -1
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.styles.js +92 -41
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.styles.js.map +1 -1
- package/lib/components/date-info/DateInfo.d.ts +40 -0
- package/lib/components/date-info/DateInfo.js +109 -0
- package/lib/components/date-info/DateInfo.js.map +1 -0
- package/lib/components/date-info/utils/format.d.ts +43 -0
- package/lib/components/date-info/utils/format.js +288 -0
- package/lib/components/date-info/utils/format.js.map +1 -0
- package/lib/components/date-info/utils/language.d.ts +1 -0
- package/lib/components/date-info/utils/language.js +34 -0
- package/lib/components/date-info/utils/language.js.map +1 -0
- package/lib/components/filter-button/FilterButton.d.ts +22 -0
- package/lib/components/filter-button/FilterButton.js +89 -0
- package/lib/components/filter-button/FilterButton.js.map +1 -0
- package/lib/components/filter-button/FilterButton.styles.d.ts +1 -0
- package/lib/components/filter-button/FilterButton.styles.js +15 -0
- package/lib/components/filter-button/FilterButton.styles.js.map +1 -0
- package/lib/components/filter-button/filter-button-item/FilterButtonItem.d.ts +14 -0
- package/lib/components/filter-button/filter-button-item/FilterButtonItem.js +48 -0
- package/lib/components/filter-button/filter-button-item/FilterButtonItem.js.map +1 -0
- package/lib/components/filter-button/filter-button-item/FilterButtonItem.styles.d.ts +26 -0
- package/lib/components/filter-button/filter-button-item/FilterButtonItem.styles.js +109 -0
- package/lib/components/filter-button/filter-button-item/FilterButtonItem.styles.js.map +1 -0
- package/lib/components/filter-button/types.d.ts +15 -0
- package/lib/components/filter-button/types.js +19 -0
- package/lib/components/filter-button/types.js.map +1 -0
- package/lib/components/grid-image/GridImage.d.ts +1 -1
- package/lib/components/grid-image/GridImage.js +15 -52
- package/lib/components/grid-image/GridImage.js.map +1 -1
- package/lib/components/grid-image/GridImage.styles.d.ts +3 -3
- package/lib/components/grid-image/GridImage.styles.js +82 -38
- package/lib/components/grid-image/GridImage.styles.js.map +1 -1
- package/lib/components/icon/Icon.d.ts +2 -2
- package/lib/components/icon/Icon.js +22 -34
- package/lib/components/icon/Icon.js.map +1 -1
- package/lib/components/icon/Icon.styles.d.ts +1 -1
- package/lib/components/icon/Icon.styles.js +61 -39
- package/lib/components/icon/Icon.styles.js.map +1 -1
- package/lib/components/icon/utils.js +2 -5
- package/lib/components/icon/utils.js.map +1 -1
- package/lib/components/input/Input.d.ts +52 -0
- package/lib/components/input/Input.js +110 -0
- package/lib/components/input/Input.js.map +1 -0
- package/lib/components/input/Input.styles.d.ts +9 -0
- package/lib/components/input/Input.styles.js +96 -0
- package/lib/components/input/Input.styles.js.map +1 -0
- package/lib/components/list/List.d.ts +1 -1
- package/lib/components/list/List.js +26 -63
- package/lib/components/list/List.js.map +1 -1
- package/lib/components/list/list-item/ListItem.d.ts +10 -1
- package/lib/components/list/list-item/ListItem.js +37 -47
- package/lib/components/list/list-item/ListItem.js.map +1 -1
- package/lib/components/list/list-item/ListItem.styles.js +44 -26
- package/lib/components/list/list-item/ListItem.styles.js.map +1 -1
- package/lib/components/list/list-item/list-item-body/ListItemBody.d.ts +4 -1
- package/lib/components/list/list-item/list-item-body/ListItemBody.js +31 -12
- 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.js +3 -9
- 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.js +4 -7
- 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.js +8 -11
- 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.d.ts +2 -1
- package/lib/components/list/list-item/list-item-head/ListItemHead.js +37 -88
- 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 +1 -11
- package/lib/components/list/list-item/list-item-head/ListItemHead.styles.js +88 -81
- 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.d.ts +6 -0
- package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.js +23 -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 +1 -0
- package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.styles.js +32 -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 +44 -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 +10 -0
- package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.js +52 -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 +141 -0
- package/lib/components/mention-finder/MentionFinder.js.map +1 -0
- package/lib/components/mention-finder/MentionFinder.styles.d.ts +5 -0
- package/lib/components/mention-finder/MentionFinder.styles.js +94 -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 +13 -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 +32 -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 +8 -0
- package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.styles.js +100 -0
- package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.styles.js.map +1 -0
- package/lib/components/number-input/NumberInput.d.ts +34 -0
- package/lib/components/number-input/NumberInput.js +111 -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 +15 -0
- package/lib/components/number-input/constants/number.js.map +1 -0
- package/lib/components/number-input/utils/number.d.ts +10 -0
- package/lib/components/number-input/utils/number.js +32 -0
- package/lib/components/number-input/utils/number.js.map +1 -0
- package/lib/components/popup/Popup.d.ts +26 -0
- package/lib/components/popup/Popup.js +145 -0
- package/lib/components/popup/Popup.js.map +1 -0
- package/lib/components/popup/Popup.styles.d.ts +2 -0
- package/lib/components/popup/Popup.styles.js +22 -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 +64 -0
- package/lib/components/popup/popup-content/PopupContent.js.map +1 -0
- package/lib/components/popup/popup-content/PopupContent.styles.d.ts +6 -0
- package/lib/components/popup/popup-content/PopupContent.styles.js +90 -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 +17 -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 +39 -0
- package/lib/components/progress-bar/ProgressBar.js.map +1 -0
- package/lib/components/progress-bar/ProgressBar.styles.d.ts +7 -0
- package/lib/components/progress-bar/ProgressBar.styles.js +39 -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 +86 -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 +100 -0
- package/lib/components/radio-button/RadioButton.styles.js.map +1 -0
- package/lib/components/radio-button/radio-button-group/RadioButtonGroup.d.ts +22 -0
- package/lib/components/radio-button/radio-button-group/RadioButtonGroup.js +56 -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 +6 -0
- package/lib/components/radio-button/types.js.map +1 -0
- package/lib/components/scroll-view/ScrollView.d.ts +9 -0
- package/lib/components/scroll-view/ScrollView.js +23 -0
- package/lib/components/scroll-view/ScrollView.js.map +1 -0
- package/lib/components/scroll-view/ScrollView.styles.d.ts +6 -0
- package/lib/components/scroll-view/ScrollView.styles.js +27 -0
- package/lib/components/scroll-view/ScrollView.styles.js.map +1 -0
- package/lib/components/search-box/SearchBox.d.ts +26 -0
- package/lib/components/search-box/SearchBox.js +166 -0
- package/lib/components/search-box/SearchBox.js.map +1 -0
- package/lib/components/search-box/SearchBox.styles.d.ts +7 -0
- package/lib/components/search-box/SearchBox.styles.js +58 -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 +6 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.styles.js +30 -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 +6 -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 +25 -0
- package/lib/components/search-input/SearchInput.js +96 -0
- package/lib/components/search-input/SearchInput.js.map +1 -0
- package/lib/components/search-input/SearchInput.styles.d.ts +4 -0
- package/lib/components/search-input/SearchInput.styles.js +30 -0
- package/lib/components/search-input/SearchInput.styles.js.map +1 -0
- package/lib/components/sharing-bar/SharingBar.d.ts +18 -0
- package/lib/components/sharing-bar/SharingBar.js +114 -0
- package/lib/components/sharing-bar/SharingBar.js.map +1 -0
- package/lib/components/sharing-bar/SharingBar.styles.d.ts +5 -0
- package/lib/components/sharing-bar/SharingBar.styles.js +27 -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 +52 -0
- package/lib/components/slider/Slider.js.map +1 -0
- package/lib/components/slider/Slider.styles.d.ts +8 -0
- package/lib/components/slider/Slider.styles.js +77 -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 +45 -0
- package/lib/components/small-wait-cursor/SmallWaitCursor.js.map +1 -0
- package/lib/components/small-wait-cursor/SmallWaitCursor.styles.d.ts +18 -0
- package/lib/components/small-wait-cursor/SmallWaitCursor.styles.js +105 -0
- package/lib/components/small-wait-cursor/SmallWaitCursor.styles.js.map +1 -0
- package/lib/components/text-area/TextArea.d.ts +25 -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 +8 -0
- package/lib/components/text-area/TextArea.styles.js +46 -0
- package/lib/components/text-area/TextArea.styles.js.map +1 -0
- package/lib/components/textstring/TextString.d.ts +22 -0
- package/lib/components/textstring/TextString.js +63 -0
- package/lib/components/textstring/TextString.js.map +1 -0
- package/lib/components/textstring/TextString.styles.d.ts +1 -0
- package/lib/components/textstring/TextString.styles.js +11 -0
- package/lib/components/textstring/TextString.styles.js.map +1 -0
- package/lib/components/textstring/types.d.ts +8 -0
- package/lib/components/textstring/types.js +6 -0
- package/lib/components/textstring/types.js.map +1 -0
- package/lib/components/textstring-provider/TextStringProvider.d.ts +21 -0
- package/lib/components/textstring-provider/TextStringProvider.js +39 -0
- package/lib/components/textstring-provider/TextStringProvider.js.map +1 -0
- package/lib/components/textstring-provider/utils.d.ts +11 -0
- package/lib/components/textstring-provider/utils.js +32 -0
- package/lib/components/textstring-provider/utils.js.map +1 -0
- package/lib/components/tooltip/Tooltip.d.ts +18 -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 +1 -0
- package/lib/components/tooltip/Tooltip.styles.js +11 -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 +6 -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 +21 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.js.map +1 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.styles.d.ts +7 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.styles.js +32 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.styles.js.map +1 -0
- package/lib/hooks/uuid.js +2 -21
- package/lib/hooks/uuid.js.map +1 -1
- package/lib/index.d.ts +37 -0
- package/lib/index.js +230 -27
- package/lib/index.js.map +1 -1
- package/lib/types/chayns.d.ts +98 -0
- package/lib/types/chayns.js +14 -0
- package/lib/types/chayns.js.map +1 -0
- package/lib/types/file.d.ts +42 -0
- package/lib/types/file.js +6 -0
- package/lib/types/file.js.map +1 -0
- package/lib/utils/calculate.d.ts +2 -0
- package/lib/utils/calculate.js +40 -0
- package/lib/utils/calculate.js.map +1 -0
- package/lib/utils/fileDialog.d.ts +7 -0
- package/lib/utils/fileDialog.js +70 -0
- package/lib/utils/fileDialog.js.map +1 -0
- package/lib/utils/isTobitEmployee.d.ts +1 -0
- package/lib/utils/isTobitEmployee.js +29 -0
- package/lib/utils/isTobitEmployee.js.map +1 -0
- package/lib/utils/textstring.d.ts +6 -0
- package/lib/utils/textstring.js +33 -0
- package/lib/utils/textstring.js.map +1 -0
- package/lib/utils/uploadFile.d.ts +9 -0
- package/lib/utils/uploadFile.js +48 -0
- package/lib/utils/uploadFile.js.map +1 -0
- package/package.json +23 -19
|
@@ -1,95 +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(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
|
+
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; }
|
|
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 || {});
|
|
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
49
|
if (hexColor) {
|
|
86
|
-
|
|
87
|
-
newColors[
|
|
50
|
+
const rgbColor = (0, _colors.hexToRgb255)(hexColor);
|
|
51
|
+
newColors[`--chayns-color--${colorName}`] = hexColor;
|
|
88
52
|
newThemeColors[colorName] = hexColor;
|
|
89
|
-
|
|
90
53
|
if (rgbColor) {
|
|
91
|
-
newColors[
|
|
92
|
-
newThemeColors[
|
|
54
|
+
newColors[`--chayns-color-rgb--${colorName}`] = `${rgbColor.r}, ${rgbColor.g}, ${rgbColor.b}`;
|
|
55
|
+
newThemeColors[`${colorName}-rgb`] = `${rgbColor.r}, ${rgbColor.g}, ${rgbColor.b}`;
|
|
93
56
|
}
|
|
94
57
|
}
|
|
95
58
|
});
|
|
@@ -99,10 +62,13 @@ var ColorSchemeProvider = function ColorSchemeProvider(_ref) {
|
|
|
99
62
|
return /*#__PURE__*/_react.default.createElement(_styledComponents.ThemeProvider, {
|
|
100
63
|
theme: themeColors
|
|
101
64
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
102
|
-
style:
|
|
65
|
+
style: {
|
|
66
|
+
...colors,
|
|
67
|
+
...cssVariables,
|
|
68
|
+
...style
|
|
69
|
+
}
|
|
103
70
|
}, children), /*#__PURE__*/_react.default.createElement(GlobalStyle, null));
|
|
104
71
|
};
|
|
105
|
-
|
|
106
72
|
ColorSchemeProvider.displayName = 'ColorSchemeProvider';
|
|
107
73
|
var _default = ColorSchemeProvider;
|
|
108
74
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"ColorSchemeProvider.js","names":["_colors","require","_react","_interopRequireWildcard","_styledComponents","_font","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","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","r","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\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[\n `--chayns-color-rgb--${colorName}`\n ] = `${rgbColor.r}, ${rgbColor.g}, ${rgbColor.b}`;\n newThemeColors[\n `${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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GAAEG,QAAQ,CAACE,CAAE,KAAIF,QAAQ,CAACG,CAAE,KAAIH,QAAQ,CAACI,CAAE,EAAC;QACrD;MACJ;IACJ,CAAC,CAAC;IAEFjB,SAAS,CAACO,SAAS,CAAC;IACpBJ,cAAc,CAACK,cAAc,CAAC;EAClC,CAAC,EAAE,CAACf,KAAK,EAAEC,SAAS,EAAEG,cAAc,CAAC,CAAC;EAEtC,oBACIrC,MAAA,CAAAW,OAAA,CAAA+C,aAAA,CAACxD,iBAAA,CAAAyD,aAAa;IAACC,KAAK,EAAElB;EAAY,gBAC9B1C,MAAA,CAAAW,OAAA,CAAA+C,aAAA;IAAKpB,KAAK,EAAE;MAAE,GAAGC,MAAM;MAAE,GAAGH,YAAY;MAAE,GAAGE;IAAM;EAAE,GAAEN,QAAc,CAAC,eACtEhC,MAAA,CAAAW,OAAA,CAAA+C,aAAA,CAAC/B,WAAW,MAAE,CACH,CAAC;AAExB,CAAC;AAEDG,mBAAmB,CAAC+B,WAAW,GAAG,qBAAqB;AAAC,IAAAC,QAAA,GAEzChC,mBAAmB;AAAAiC,OAAA,CAAApD,OAAA,GAAAmD,QAAA"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
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,KA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,iBAAA,GAAAA,iBAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export interface IComboBoxItem {
|
|
3
|
+
text: string;
|
|
4
|
+
value: string | number;
|
|
5
|
+
}
|
|
6
|
+
export type ComboBoxProps = {
|
|
7
|
+
/**
|
|
8
|
+
* The list of the items that should be displayed.
|
|
9
|
+
*/
|
|
10
|
+
list: IComboBoxItem[];
|
|
11
|
+
/**
|
|
12
|
+
* Function that should be executed when an item is selected.
|
|
13
|
+
*/
|
|
14
|
+
onSelect?: (comboboxItem: IComboBoxItem) => void;
|
|
15
|
+
/**
|
|
16
|
+
* A text that should be displayed when no item is selected.
|
|
17
|
+
*/
|
|
18
|
+
placeholder: string;
|
|
19
|
+
/**
|
|
20
|
+
* An item that should be preselected.
|
|
21
|
+
*/
|
|
22
|
+
selectedItem?: IComboBoxItem;
|
|
23
|
+
};
|
|
24
|
+
declare const ComboBox: FC<ComboBoxProps>;
|
|
25
|
+
export default ComboBox;
|
|
@@ -0,0 +1,144 @@
|
|
|
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 _calculate = require("../../utils/calculate");
|
|
9
|
+
var _Icon = _interopRequireDefault(require("../icon/Icon"));
|
|
10
|
+
var _ComboBoxItem = _interopRequireDefault(require("./combobox-item/ComboBoxItem"));
|
|
11
|
+
var _ComboBox = require("./ComboBox.styles");
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
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); }
|
|
14
|
+
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; }
|
|
15
|
+
const ComboBox = _ref => {
|
|
16
|
+
let {
|
|
17
|
+
placeholder,
|
|
18
|
+
list,
|
|
19
|
+
onSelect,
|
|
20
|
+
selectedItem
|
|
21
|
+
} = _ref;
|
|
22
|
+
const [item, setItem] = (0, _react.useState)();
|
|
23
|
+
const [isAnimating, setIsAnimating] = (0, _react.useState)(false);
|
|
24
|
+
const [minWidth, setMinWidth] = (0, _react.useState)(0);
|
|
25
|
+
const [height, setHeight] = (0, _react.useState)(0);
|
|
26
|
+
const ref = (0, _react.useRef)(null);
|
|
27
|
+
const handleClick = (0, _react.useCallback)(event => {
|
|
28
|
+
if (ref.current && !ref.current.contains(event.target)) {
|
|
29
|
+
setIsAnimating(false);
|
|
30
|
+
}
|
|
31
|
+
}, [ref]);
|
|
32
|
+
(0, _react.useEffect)(() => {
|
|
33
|
+
document.addEventListener('click', handleClick);
|
|
34
|
+
return () => {
|
|
35
|
+
document.removeEventListener('click', handleClick);
|
|
36
|
+
};
|
|
37
|
+
}, [handleClick, ref]);
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* This function sets the selected item
|
|
41
|
+
*/
|
|
42
|
+
const handleSetSelectedItem = (0, _react.useCallback)(itemToSelect => {
|
|
43
|
+
setItem(itemToSelect);
|
|
44
|
+
setIsAnimating(false);
|
|
45
|
+
if (onSelect) {
|
|
46
|
+
onSelect(itemToSelect);
|
|
47
|
+
}
|
|
48
|
+
}, [onSelect]);
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* This function calculates the greatest width
|
|
52
|
+
*/
|
|
53
|
+
(0, _react.useEffect)(() => {
|
|
54
|
+
const textArray = list.map(_ref2 => {
|
|
55
|
+
let {
|
|
56
|
+
text
|
|
57
|
+
} = _ref2;
|
|
58
|
+
return text;
|
|
59
|
+
});
|
|
60
|
+
setHeight((0, _calculate.calculateContentHeight)(textArray));
|
|
61
|
+
textArray.push(placeholder);
|
|
62
|
+
setMinWidth((0, _calculate.calculateContentWidth)(textArray) + 45);
|
|
63
|
+
}, [list, placeholder]);
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* This function sets the external selected item
|
|
67
|
+
*/
|
|
68
|
+
(0, _react.useEffect)(() => {
|
|
69
|
+
if (selectedItem) {
|
|
70
|
+
setItem(selectedItem);
|
|
71
|
+
setIsAnimating(false);
|
|
72
|
+
}
|
|
73
|
+
}, [selectedItem]);
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Function that renders the combobox items
|
|
77
|
+
*/
|
|
78
|
+
const content = (0, _react.useMemo)(() => {
|
|
79
|
+
const items = [];
|
|
80
|
+
list.forEach(_ref3 => {
|
|
81
|
+
let {
|
|
82
|
+
text,
|
|
83
|
+
value
|
|
84
|
+
} = _ref3;
|
|
85
|
+
items.push( /*#__PURE__*/_react.default.createElement(_ComboBoxItem.default, {
|
|
86
|
+
key: value,
|
|
87
|
+
value: value,
|
|
88
|
+
text: text,
|
|
89
|
+
onSelect: handleSetSelectedItem
|
|
90
|
+
}));
|
|
91
|
+
});
|
|
92
|
+
return items;
|
|
93
|
+
}, [handleSetSelectedItem, list]);
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* This function resets the placeholder
|
|
97
|
+
*/
|
|
98
|
+
const placeholderText = (0, _react.useMemo)(() => {
|
|
99
|
+
let text = placeholder;
|
|
100
|
+
if (!selectedItem) {
|
|
101
|
+
text = placeholder;
|
|
102
|
+
} else if (item !== null && item !== void 0 && item.text) {
|
|
103
|
+
text = item.text;
|
|
104
|
+
}
|
|
105
|
+
return text;
|
|
106
|
+
}, [item === null || item === void 0 ? void 0 : item.text, placeholder, selectedItem]);
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* This function opens the content of the combobox
|
|
110
|
+
*/
|
|
111
|
+
const handleHeaderClick = () => {
|
|
112
|
+
setIsAnimating(prevState => !prevState);
|
|
113
|
+
};
|
|
114
|
+
return (0, _react.useMemo)(() => /*#__PURE__*/_react.default.createElement(_ComboBox.StyledComboBox, {
|
|
115
|
+
ref: ref
|
|
116
|
+
}, /*#__PURE__*/_react.default.createElement(_ComboBox.StyledComboBoxHeader, {
|
|
117
|
+
minWidth: minWidth,
|
|
118
|
+
onClick: handleHeaderClick,
|
|
119
|
+
isOpen: isAnimating
|
|
120
|
+
}, /*#__PURE__*/_react.default.createElement(_ComboBox.StyledComboBoxPlaceholder, null, placeholderText), /*#__PURE__*/_react.default.createElement(_ComboBox.StyledComboBoxIconWrapper, null, /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
121
|
+
icons: ['fa fa-chevron-down']
|
|
122
|
+
}))), /*#__PURE__*/_react.default.createElement(_ComboBox.StyledMotionComboBoxBody, {
|
|
123
|
+
height: height,
|
|
124
|
+
minWidth: minWidth,
|
|
125
|
+
initial: {
|
|
126
|
+
height: 0,
|
|
127
|
+
opacity: 0
|
|
128
|
+
},
|
|
129
|
+
animate: isAnimating ? {
|
|
130
|
+
height: 'fit-content',
|
|
131
|
+
opacity: 1
|
|
132
|
+
} : {
|
|
133
|
+
height: 0,
|
|
134
|
+
opacity: 0
|
|
135
|
+
},
|
|
136
|
+
transition: {
|
|
137
|
+
duration: 0.2
|
|
138
|
+
}
|
|
139
|
+
}, content)), [content, height, isAnimating, minWidth, placeholderText]);
|
|
140
|
+
};
|
|
141
|
+
ComboBox.displayName = 'ComboBox';
|
|
142
|
+
var _default = ComboBox;
|
|
143
|
+
exports.default = _default;
|
|
144
|
+
//# sourceMappingURL=ComboBox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComboBox.js","names":["_react","_interopRequireWildcard","require","_calculate","_Icon","_interopRequireDefault","_ComboBoxItem","_ComboBox","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","ComboBox","_ref","placeholder","list","onSelect","selectedItem","item","setItem","useState","isAnimating","setIsAnimating","minWidth","setMinWidth","height","setHeight","ref","useRef","handleClick","useCallback","event","current","contains","target","useEffect","document","addEventListener","removeEventListener","handleSetSelectedItem","itemToSelect","textArray","map","_ref2","text","calculateContentHeight","push","calculateContentWidth","content","useMemo","items","forEach","_ref3","value","createElement","placeholderText","handleHeaderClick","prevState","StyledComboBox","StyledComboBoxHeader","onClick","isOpen","StyledComboBoxPlaceholder","StyledComboBoxIconWrapper","icons","StyledMotionComboBoxBody","initial","opacity","animate","transition","duration","displayName","_default","exports"],"sources":["../../../src/components/combobox/ComboBox.tsx"],"sourcesContent":["import React, { FC, ReactNode, useCallback, useEffect, useMemo, useRef, useState } from 'react';\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 StyledMotionComboBoxBody,\n} from './ComboBox.styles';\n\nexport interface IComboBoxItem {\n text: string;\n value: string | number;\n}\n\nexport type ComboBoxProps = {\n /**\n * The list of the items that should be displayed.\n */\n list: IComboBoxItem[];\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\nconst ComboBox: FC<ComboBoxProps> = ({ placeholder, list, onSelect, selectedItem }) => {\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 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 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 textArray = list.map(({ text }) => text);\n\n setHeight(calculateContentHeight(textArray));\n\n textArray.push(placeholder);\n\n setMinWidth(calculateContentWidth(textArray) + 45);\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 /**\n * Function that renders the combobox items\n */\n const content = useMemo(() => {\n const items: ReactNode[] = [];\n\n list.forEach(({ text, value }) => {\n items.push(\n <ComboBoxItem\n key={value}\n value={value}\n text={text}\n onSelect={handleSetSelectedItem}\n />\n );\n });\n\n return items;\n }, [handleSetSelectedItem, list]);\n\n /**\n * This function resets the placeholder\n */\n const placeholderText = useMemo(() => {\n let text = placeholder;\n\n if (!selectedItem) {\n text = placeholder;\n } else if (item?.text) {\n text = item.text;\n }\n\n return text;\n }, [item?.text, placeholder, selectedItem]);\n\n /**\n * This function opens the content of the combobox\n */\n const handleHeaderClick = () => {\n setIsAnimating((prevState) => !prevState);\n };\n\n return useMemo(\n () => (\n <StyledComboBox ref={ref}>\n <StyledComboBoxHeader\n minWidth={minWidth}\n onClick={handleHeaderClick}\n isOpen={isAnimating}\n >\n <StyledComboBoxPlaceholder>{placeholderText}</StyledComboBoxPlaceholder>\n <StyledComboBoxIconWrapper>\n <Icon icons={['fa fa-chevron-down']} />\n </StyledComboBoxIconWrapper>\n </StyledComboBoxHeader>\n <StyledMotionComboBoxBody\n height={height}\n minWidth={minWidth}\n initial={{ height: 0, opacity: 0 }}\n animate={\n isAnimating\n ? { height: 'fit-content', opacity: 1 }\n : { height: 0, opacity: 0 }\n }\n transition={{\n duration: 0.2,\n }}\n >\n {content}\n </StyledMotionComboBoxBody>\n </StyledComboBox>\n ),\n [content, height, isAnimating, minWidth, placeholderText]\n );\n};\n\nComboBox.displayName = 'ComboBox';\n\nexport default ComboBox;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,aAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AAM2B,SAAAG,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAX,wBAAAO,GAAA,EAAAI,WAAA,SAAAA,WAAA,IAAAJ,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,o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OAAA,CAAAjF,OAAA,GAAAgF,QAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const StyledComboBox: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const StyledComboBoxHeader: import("styled-components").StyledComponent<"div", any, {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
minWidth: number;
|
|
5
|
+
} & {
|
|
6
|
+
theme: import("../color-scheme-provider/ColorSchemeProvider").Theme;
|
|
7
|
+
}, never>;
|
|
8
|
+
export declare const StyledComboBoxPlaceholder: import("styled-components").StyledComponent<"p", any, {
|
|
9
|
+
theme: import("../color-scheme-provider/ColorSchemeProvider").Theme;
|
|
10
|
+
}, never>;
|
|
11
|
+
export declare const StyledComboBoxIconWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
12
|
+
export declare const StyledMotionComboBoxBody: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, any, {
|
|
13
|
+
height: number;
|
|
14
|
+
minWidth: number;
|
|
15
|
+
} & {
|
|
16
|
+
theme: import("../color-scheme-provider/ColorSchemeProvider").Theme;
|
|
17
|
+
}, never>;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.StyledMotionComboBoxBody = exports.StyledComboBoxPlaceholder = exports.StyledComboBoxIconWrapper = exports.StyledComboBoxHeader = exports.StyledComboBox = void 0;
|
|
7
|
+
var _framerMotion = require("framer-motion");
|
|
8
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
+
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); }
|
|
10
|
+
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; }
|
|
11
|
+
const StyledComboBox = _styledComponents.default.div`
|
|
12
|
+
width: fit-content;
|
|
13
|
+
`;
|
|
14
|
+
exports.StyledComboBox = StyledComboBox;
|
|
15
|
+
const StyledComboBoxHeader = _styledComponents.default.div`
|
|
16
|
+
display: flex;
|
|
17
|
+
justify-content: space-between;
|
|
18
|
+
border: 1px solid rgba(160, 160, 160, 0.3);
|
|
19
|
+
padding: 8px 10px;
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
background: ${_ref => {
|
|
22
|
+
let {
|
|
23
|
+
theme
|
|
24
|
+
} = _ref;
|
|
25
|
+
return theme['001'];
|
|
26
|
+
}};
|
|
27
|
+
min-width: ${_ref2 => {
|
|
28
|
+
let {
|
|
29
|
+
minWidth
|
|
30
|
+
} = _ref2;
|
|
31
|
+
return minWidth;
|
|
32
|
+
}}px;
|
|
33
|
+
max-width: ${_ref3 => {
|
|
34
|
+
let {
|
|
35
|
+
minWidth
|
|
36
|
+
} = _ref3;
|
|
37
|
+
return minWidth;
|
|
38
|
+
}}px;
|
|
39
|
+
|
|
40
|
+
${_ref4 => {
|
|
41
|
+
let {
|
|
42
|
+
isOpen
|
|
43
|
+
} = _ref4;
|
|
44
|
+
return isOpen ? (0, _styledComponents.css)`
|
|
45
|
+
border-top-left-radius: 3px;
|
|
46
|
+
border-top-right-radius: 3px;
|
|
47
|
+
` : (0, _styledComponents.css)`
|
|
48
|
+
border-radius: 3px;
|
|
49
|
+
`;
|
|
50
|
+
}}
|
|
51
|
+
|
|
52
|
+
&:hover {
|
|
53
|
+
background: ${_ref5 => {
|
|
54
|
+
let {
|
|
55
|
+
theme
|
|
56
|
+
} = _ref5;
|
|
57
|
+
return theme['secondary-103'];
|
|
58
|
+
}};
|
|
59
|
+
}
|
|
60
|
+
`;
|
|
61
|
+
exports.StyledComboBoxHeader = StyledComboBoxHeader;
|
|
62
|
+
const StyledComboBoxPlaceholder = _styledComponents.default.p`
|
|
63
|
+
color: ${_ref6 => {
|
|
64
|
+
let {
|
|
65
|
+
theme
|
|
66
|
+
} = _ref6;
|
|
67
|
+
return theme.text;
|
|
68
|
+
}};
|
|
69
|
+
margin: 0;
|
|
70
|
+
`;
|
|
71
|
+
exports.StyledComboBoxPlaceholder = StyledComboBoxPlaceholder;
|
|
72
|
+
const StyledComboBoxIconWrapper = _styledComponents.default.div`
|
|
73
|
+
margin-left: 5px;
|
|
74
|
+
`;
|
|
75
|
+
exports.StyledComboBoxIconWrapper = StyledComboBoxIconWrapper;
|
|
76
|
+
const StyledMotionComboBoxBody = (0, _styledComponents.default)(_framerMotion.motion.div)`
|
|
77
|
+
background: ${_ref7 => {
|
|
78
|
+
let {
|
|
79
|
+
theme
|
|
80
|
+
} = _ref7;
|
|
81
|
+
return theme['001'];
|
|
82
|
+
}};
|
|
83
|
+
display: flex;
|
|
84
|
+
position: absolute;
|
|
85
|
+
z-index: 4;
|
|
86
|
+
flex-direction: column;
|
|
87
|
+
border: 1px solid rgba(160, 160, 160, 0.3);
|
|
88
|
+
border-bottom-left-radius: 3px;
|
|
89
|
+
border-bottom-right-radius: 3px;
|
|
90
|
+
border-top: none;
|
|
91
|
+
cursor: pointer;
|
|
92
|
+
min-width: ${_ref8 => {
|
|
93
|
+
let {
|
|
94
|
+
minWidth
|
|
95
|
+
} = _ref8;
|
|
96
|
+
return minWidth;
|
|
97
|
+
}}px;
|
|
98
|
+
max-width: ${_ref9 => {
|
|
99
|
+
let {
|
|
100
|
+
minWidth
|
|
101
|
+
} = _ref9;
|
|
102
|
+
return minWidth;
|
|
103
|
+
}}px;
|
|
104
|
+
max-height: 300px;
|
|
105
|
+
overflow-y: ${_ref10 => {
|
|
106
|
+
let {
|
|
107
|
+
height
|
|
108
|
+
} = _ref10;
|
|
109
|
+
return height <= 300 ? 'hidden' : 'auto';
|
|
110
|
+
}};
|
|
111
|
+
box-shadow: 0 0 0 1px rgba(${_ref11 => {
|
|
112
|
+
let {
|
|
113
|
+
theme
|
|
114
|
+
} = _ref11;
|
|
115
|
+
return theme['009-rgb'];
|
|
116
|
+
}}, 0.08)
|
|
117
|
+
inset;
|
|
118
|
+
|
|
119
|
+
&::-webkit-scrollbar {
|
|
120
|
+
width: 5px;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&::-webkit-scrollbar-thumb {
|
|
124
|
+
background: rgba(160, 160, 160, 1);
|
|
125
|
+
}
|
|
126
|
+
`;
|
|
127
|
+
exports.StyledMotionComboBoxBody = StyledMotionComboBoxBody;
|
|
128
|
+
//# sourceMappingURL=ComboBox.styles.js.map
|