@chayns-components/core 5.0.0-beta.49 → 5.0.0-beta.492
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -19
- package/lib/api/image/post.d.ts +14 -0
- package/lib/api/image/post.js +33 -0
- package/lib/api/image/post.js.map +1 -0
- package/lib/api/signature/delete.d.ts +1 -0
- package/lib/api/signature/delete.js +27 -0
- package/lib/api/signature/delete.js.map +1 -0
- package/lib/api/signature/get.d.ts +1 -0
- package/lib/api/signature/get.js +33 -0
- package/lib/api/signature/get.js.map +1 -0
- package/lib/api/signature/put.d.ts +1 -0
- package/lib/api/signature/put.js +31 -0
- package/lib/api/signature/put.js.map +1 -0
- package/lib/api/theme/get.d.ts +2 -0
- package/lib/api/theme/get.js +14 -0
- package/lib/api/theme/get.js.map +1 -0
- package/lib/api/video/post.d.ts +15 -0
- package/lib/api/video/post.js +30 -0
- package/lib/api/video/post.js.map +1 -0
- package/lib/components/accordion/Accordion.d.ts +21 -6
- package/lib/components/accordion/Accordion.js +78 -54
- package/lib/components/accordion/Accordion.js.map +1 -1
- package/lib/components/accordion/Accordion.styles.d.ts +11 -7
- package/lib/components/accordion/Accordion.styles.js +66 -53
- package/lib/components/accordion/Accordion.styles.js.map +1 -1
- package/lib/components/accordion/accordion-body/AccordionBody.d.ts +9 -1
- package/lib/components/accordion/accordion-body/AccordionBody.js +12 -20
- package/lib/components/accordion/accordion-body/AccordionBody.js.map +1 -1
- package/lib/components/accordion/accordion-body/AccordionBody.styles.d.ts +268 -3
- package/lib/components/accordion/accordion-body/AccordionBody.styles.js +6 -15
- package/lib/components/accordion/accordion-body/AccordionBody.styles.js.map +1 -1
- package/lib/components/accordion/accordion-content/AccordionContent.js +8 -16
- package/lib/components/accordion/accordion-content/AccordionContent.js.map +1 -1
- package/lib/components/accordion/accordion-content/AccordionContent.styles.d.ts +8 -6
- package/lib/components/accordion/accordion-content/AccordionContent.styles.js +7 -16
- package/lib/components/accordion/accordion-content/AccordionContent.styles.js.map +1 -1
- package/lib/components/accordion/accordion-group/AccordionGroup.d.ts +9 -2
- package/lib/components/accordion/accordion-group/AccordionGroup.js +15 -20
- package/lib/components/accordion/accordion-group/AccordionGroup.js.map +1 -1
- package/lib/components/accordion/accordion-head/AccordionHead.d.ts +2 -0
- package/lib/components/accordion/accordion-head/AccordionHead.js +45 -40
- package/lib/components/accordion/accordion-head/AccordionHead.js.map +1 -1
- package/lib/components/accordion/accordion-head/AccordionHead.styles.d.ts +2424 -15
- package/lib/components/accordion/accordion-head/AccordionHead.styles.js +70 -61
- package/lib/components/accordion/accordion-head/AccordionHead.styles.js.map +1 -1
- package/lib/components/accordion/accordion-intro/AccordionIntro.js +4 -12
- package/lib/components/accordion/accordion-intro/AccordionIntro.js.map +1 -1
- package/lib/components/accordion/accordion-intro/AccordionIntro.styles.d.ts +2 -1
- package/lib/components/accordion/accordion-intro/AccordionIntro.styles.js +2 -10
- package/lib/components/accordion/accordion-intro/AccordionIntro.styles.js.map +1 -1
- package/lib/components/accordion/accordion-item/AccordionItem.d.ts +9 -0
- package/lib/components/accordion/accordion-item/AccordionItem.js +20 -0
- package/lib/components/accordion/accordion-item/AccordionItem.js.map +1 -0
- package/lib/components/accordion/accordion-item/AccordionItem.styles.d.ts +7 -0
- package/lib/components/accordion/accordion-item/AccordionItem.styles.js +26 -0
- package/lib/components/accordion/accordion-item/AccordionItem.styles.js.map +1 -0
- package/lib/components/amount-control/AmountControl.d.ts +26 -0
- package/lib/components/amount-control/AmountControl.js +179 -0
- package/lib/components/amount-control/AmountControl.js.map +1 -0
- package/lib/components/amount-control/AmountControl.styles.d.ts +288 -0
- package/lib/components/amount-control/AmountControl.styles.js +50 -0
- package/lib/components/amount-control/AmountControl.styles.js.map +1 -0
- package/lib/components/badge/Badge.d.ts +5 -1
- package/lib/components/badge/Badge.js +12 -17
- package/lib/components/badge/Badge.js.map +1 -1
- package/lib/components/badge/Badge.styles.d.ts +9 -4
- package/lib/components/badge/Badge.styles.js +12 -14
- package/lib/components/badge/Badge.styles.js.map +1 -1
- package/lib/components/button/Button.d.ts +5 -1
- package/lib/components/button/Button.js +71 -20
- package/lib/components/button/Button.js.map +1 -1
- package/lib/components/button/Button.styles.d.ts +813 -6
- package/lib/components/button/Button.styles.js +44 -26
- package/lib/components/button/Button.styles.js.map +1 -1
- package/lib/components/checkbox/Checkbox.d.ts +10 -2
- package/lib/components/checkbox/Checkbox.js +19 -22
- package/lib/components/checkbox/Checkbox.js.map +1 -1
- package/lib/components/checkbox/Checkbox.styles.d.ts +12 -5
- package/lib/components/checkbox/Checkbox.styles.js +70 -63
- package/lib/components/checkbox/Checkbox.styles.js.map +1 -1
- package/lib/components/color-scheme-provider/ColorSchemeProvider.d.ts +6 -0
- package/lib/components/color-scheme-provider/ColorSchemeProvider.js +77 -40
- package/lib/components/color-scheme-provider/ColorSchemeProvider.js.map +1 -1
- package/lib/components/combobox/ComboBox.d.ts +44 -0
- package/lib/components/combobox/ComboBox.js +183 -0
- package/lib/components/combobox/ComboBox.js.map +1 -0
- package/lib/components/combobox/ComboBox.styles.d.ts +291 -0
- package/lib/components/combobox/ComboBox.styles.js +198 -0
- package/lib/components/combobox/ComboBox.styles.js.map +1 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.d.ts +13 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.js +33 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.js.map +1 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.styles.d.ts +12 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.styles.js +54 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.styles.js.map +1 -0
- package/lib/components/content-card/ContentCard.d.ts +13 -0
- package/lib/components/content-card/ContentCard.js +14 -0
- package/lib/components/content-card/ContentCard.js.map +1 -0
- package/lib/components/content-card/ContentCard.styles.d.ts +2 -0
- package/lib/components/content-card/ContentCard.styles.js +32 -0
- package/lib/components/content-card/ContentCard.styles.js.map +1 -0
- package/lib/components/context-menu/ContextMenu.d.ts +3 -3
- package/lib/components/context-menu/ContextMenu.js +43 -53
- package/lib/components/context-menu/ContextMenu.js.map +1 -1
- package/lib/components/context-menu/ContextMenu.styles.d.ts +2 -1
- package/lib/components/context-menu/ContextMenu.styles.js +2 -10
- package/lib/components/context-menu/ContextMenu.styles.js.map +1 -1
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.d.ts +1 -1
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.js +17 -23
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.js.map +1 -1
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.styles.d.ts +275 -10
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.styles.js +25 -38
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.styles.js.map +1 -1
- package/lib/components/file-input/FileInput.d.ts +29 -0
- package/lib/components/file-input/FileInput.js +112 -0
- package/lib/components/file-input/FileInput.js.map +1 -0
- package/lib/components/file-input/FileInput.styles.d.ts +277 -0
- package/lib/components/file-input/FileInput.styles.js +39 -0
- package/lib/components/file-input/FileInput.styles.js.map +1 -0
- package/lib/components/file-input/file-list/FileListItem.d.ts +9 -0
- package/lib/components/file-input/file-list/FileListItem.js +27 -0
- package/lib/components/file-input/file-list/FileListItem.js.map +1 -0
- package/lib/components/file-input/file-list/FileListItem.styles.d.ts +2 -0
- package/lib/components/file-input/file-list/FileListItem.styles.js +3 -0
- package/lib/components/file-input/file-list/FileListItem.styles.js.map +1 -0
- package/lib/components/filter-buttons/FilterButtons.d.ts +22 -0
- package/lib/components/filter-buttons/FilterButtons.js +79 -0
- package/lib/components/filter-buttons/FilterButtons.js.map +1 -0
- package/lib/components/filter-buttons/FilterButtons.styles.d.ts +2 -0
- package/lib/components/filter-buttons/FilterButtons.styles.js +7 -0
- package/lib/components/filter-buttons/FilterButtons.styles.js.map +1 -0
- package/lib/components/filter-buttons/filter-button/FilterButton.d.ts +14 -0
- package/lib/components/filter-buttons/filter-button/FilterButton.js +38 -0
- package/lib/components/filter-buttons/filter-button/FilterButton.js.map +1 -0
- package/lib/components/filter-buttons/filter-button/FilterButton.styles.d.ts +287 -0
- package/lib/components/filter-buttons/filter-button/FilterButton.styles.js +98 -0
- package/lib/components/filter-buttons/filter-button/FilterButton.styles.js.map +1 -0
- package/lib/components/grid-image/GridImage.js +20 -29
- package/lib/components/grid-image/GridImage.js.map +1 -1
- package/lib/components/grid-image/GridImage.styles.d.ts +15 -14
- package/lib/components/grid-image/GridImage.styles.js +21 -32
- package/lib/components/grid-image/GridImage.styles.js.map +1 -1
- package/lib/components/icon/Icon.js +22 -25
- package/lib/components/icon/Icon.js.map +1 -1
- package/lib/components/icon/Icon.styles.d.ts +13 -12
- package/lib/components/icon/Icon.styles.js +23 -33
- package/lib/components/icon/Icon.styles.js.map +1 -1
- package/lib/components/input/Input.d.ts +42 -2
- package/lib/components/input/Input.js +96 -29
- package/lib/components/input/Input.js.map +1 -1
- package/lib/components/input/Input.styles.d.ts +559 -7
- package/lib/components/input/Input.styles.js +118 -41
- package/lib/components/input/Input.styles.js.map +1 -1
- package/lib/components/list/List.d.ts +6 -0
- package/lib/components/list/List.js +24 -24
- package/lib/components/list/List.js.map +1 -1
- package/lib/components/list/list-item/ListItem.d.ts +1 -1
- package/lib/components/list/list-item/ListItem.js +37 -30
- package/lib/components/list/list-item/ListItem.js.map +1 -1
- package/lib/components/list/list-item/ListItem.styles.d.ts +272 -6
- package/lib/components/list/list-item/ListItem.styles.js +32 -39
- package/lib/components/list/list-item/ListItem.styles.js.map +1 -1
- package/lib/components/list/list-item/list-item-body/ListItemBody.d.ts +6 -2
- package/lib/components/list/list-item/list-item-body/ListItemBody.js +28 -15
- package/lib/components/list/list-item/list-item-body/ListItemBody.js.map +1 -1
- package/lib/components/list/list-item/list-item-body/ListItemBody.styles.d.ts +267 -1
- package/lib/components/list/list-item/list-item-body/ListItemBody.styles.js +3 -11
- package/lib/components/list/list-item/list-item-body/ListItemBody.styles.js.map +1 -1
- package/lib/components/list/list-item/list-item-content/ListItemContent.d.ts +8 -2
- package/lib/components/list/list-item/list-item-content/ListItemContent.js +4 -12
- package/lib/components/list/list-item/list-item-content/ListItemContent.js.map +1 -1
- package/lib/components/list/list-item/list-item-content/ListItemContent.styles.d.ts +2 -1
- package/lib/components/list/list-item/list-item-content/ListItemContent.styles.js +2 -10
- package/lib/components/list/list-item/list-item-content/ListItemContent.styles.js.map +1 -1
- package/lib/components/list/list-item/list-item-head/ListItemHead.js +25 -35
- package/lib/components/list/list-item/list-item-head/ListItemHead.js.map +1 -1
- package/lib/components/list/list-item/list-item-head/ListItemHead.styles.d.ts +546 -16
- package/lib/components/list/list-item/list-item-head/ListItemHead.styles.js +19 -38
- package/lib/components/list/list-item/list-item-head/ListItemHead.styles.js.map +1 -1
- package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.js +5 -13
- package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.js.map +1 -1
- package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.styles.d.ts +2 -1
- package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.styles.js +2 -10
- package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.styles.js.map +1 -1
- package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.js +11 -21
- package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.js.map +1 -1
- package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.d.ts +8 -7
- package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.js +7 -16
- package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.js.map +1 -1
- package/lib/components/mention-finder/MentionFinder.d.ts +31 -0
- package/lib/components/mention-finder/MentionFinder.js +130 -0
- package/lib/components/mention-finder/MentionFinder.js.map +1 -0
- package/lib/components/mention-finder/MentionFinder.styles.d.ts +272 -0
- package/lib/components/mention-finder/MentionFinder.styles.js +84 -0
- package/lib/components/mention-finder/MentionFinder.styles.js.map +1 -0
- package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.d.ts +10 -0
- package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.js +23 -0
- package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.js.map +1 -0
- package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.styles.d.ts +11 -0
- package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.styles.js +83 -0
- package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.styles.js.map +1 -0
- package/lib/components/number-input/NumberInput.d.ts +54 -0
- package/lib/components/number-input/NumberInput.js +133 -0
- package/lib/components/number-input/NumberInput.js.map +1 -0
- package/lib/components/popup/Popup.d.ts +30 -0
- package/lib/components/popup/Popup.js +150 -0
- package/lib/components/popup/Popup.js.map +1 -0
- package/lib/components/popup/Popup.styles.d.ts +5 -0
- package/lib/components/popup/Popup.styles.js +21 -0
- package/lib/components/popup/Popup.styles.js.map +1 -0
- package/lib/components/popup/popup-content/PopupContent.d.ts +10 -0
- package/lib/components/popup/popup-content/PopupContent.js +64 -0
- package/lib/components/popup/popup-content/PopupContent.js.map +1 -0
- package/lib/components/popup/popup-content/PopupContent.styles.d.ts +274 -0
- package/lib/components/popup/popup-content/PopupContent.styles.js +84 -0
- package/lib/components/popup/popup-content/PopupContent.styles.js.map +1 -0
- package/lib/components/progress-bar/ProgressBar.d.ts +13 -0
- package/lib/components/progress-bar/ProgressBar.js +31 -0
- package/lib/components/progress-bar/ProgressBar.js.map +1 -0
- package/lib/components/progress-bar/ProgressBar.styles.d.ts +272 -0
- package/lib/components/progress-bar/ProgressBar.styles.js +30 -0
- package/lib/components/progress-bar/ProgressBar.styles.js.map +1 -0
- package/lib/components/radio-button/RadioButton.d.ts +30 -0
- package/lib/components/radio-button/RadioButton.js +92 -0
- package/lib/components/radio-button/RadioButton.js.map +1 -0
- package/lib/components/radio-button/RadioButton.styles.d.ts +287 -0
- package/lib/components/radio-button/RadioButton.styles.js +105 -0
- package/lib/components/radio-button/RadioButton.styles.js.map +1 -0
- package/lib/components/radio-button/radio-button-group/RadioButtonGroup.d.ts +17 -0
- package/lib/components/radio-button/radio-button-group/RadioButtonGroup.js +38 -0
- package/lib/components/radio-button/radio-button-group/RadioButtonGroup.js.map +1 -0
- package/lib/components/scroll-view/ScrollView.d.ts +13 -0
- package/lib/components/scroll-view/ScrollView.js +19 -0
- package/lib/components/scroll-view/ScrollView.js.map +1 -0
- package/lib/components/scroll-view/ScrollView.styles.d.ts +9 -0
- package/lib/components/scroll-view/ScrollView.styles.js +41 -0
- package/lib/components/scroll-view/ScrollView.styles.js.map +1 -0
- package/lib/components/search-box/SearchBox.d.ts +41 -0
- package/lib/components/search-box/SearchBox.js +271 -0
- package/lib/components/search-box/SearchBox.js.map +1 -0
- package/lib/components/search-box/SearchBox.styles.d.ts +274 -0
- package/lib/components/search-box/SearchBox.styles.js +71 -0
- package/lib/components/search-box/SearchBox.styles.js.map +1 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.d.ts +11 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.js +27 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.js.map +1 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.styles.d.ts +13 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.styles.js +55 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.styles.js.map +1 -0
- package/lib/components/search-input/SearchInput.d.ts +33 -0
- package/lib/components/search-input/SearchInput.js +93 -0
- package/lib/components/search-input/SearchInput.js.map +1 -0
- package/lib/components/search-input/SearchInput.styles.d.ts +534 -0
- package/lib/components/search-input/SearchInput.styles.js +19 -0
- package/lib/components/search-input/SearchInput.styles.js.map +1 -0
- package/lib/components/select-button/SelectButton.d.ts +34 -0
- package/lib/components/select-button/SelectButton.js +56 -0
- package/lib/components/select-button/SelectButton.js.map +1 -0
- package/lib/components/select-button/SelectButton.styles.d.ts +2 -0
- package/lib/components/select-button/SelectButton.styles.js +3 -0
- package/lib/components/select-button/SelectButton.styles.js.map +1 -0
- package/lib/components/setup-wizard/SetupWizard.d.ts +27 -0
- package/lib/components/setup-wizard/SetupWizard.js +73 -0
- package/lib/components/setup-wizard/SetupWizard.js.map +1 -0
- package/lib/components/setup-wizard/SetupWizard.styles.d.ts +2 -0
- package/lib/components/setup-wizard/SetupWizard.styles.js +3 -0
- package/lib/components/setup-wizard/SetupWizard.styles.js.map +1 -0
- package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.d.ts +21 -0
- package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.js +49 -0
- package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.js.map +1 -0
- package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.styles.d.ts +3 -0
- package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.styles.js +7 -0
- package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.styles.js.map +1 -0
- package/lib/components/sharing-bar/SharingBar.d.ts +18 -0
- package/lib/components/sharing-bar/SharingBar.js +101 -0
- package/lib/components/sharing-bar/SharingBar.js.map +1 -0
- package/lib/components/sharing-bar/SharingBar.styles.d.ts +6 -0
- package/lib/components/sharing-bar/SharingBar.styles.js +17 -0
- package/lib/components/sharing-bar/SharingBar.styles.js.map +1 -0
- package/lib/components/signature/Signature.d.ts +33 -0
- package/lib/components/signature/Signature.js +95 -0
- package/lib/components/signature/Signature.js.map +1 -0
- package/lib/components/signature/Signature.styles.d.ts +5 -0
- package/lib/components/signature/Signature.styles.js +14 -0
- package/lib/components/signature/Signature.styles.js.map +1 -0
- package/lib/components/slider/Slider.d.ts +45 -0
- package/lib/components/slider/Slider.js +181 -0
- package/lib/components/slider/Slider.js.map +1 -0
- package/lib/components/slider/Slider.styles.d.ts +16 -0
- package/lib/components/slider/Slider.styles.js +98 -0
- package/lib/components/slider/Slider.styles.js.map +1 -0
- package/lib/components/slider-button/SliderButton.d.ts +23 -0
- package/lib/components/slider-button/SliderButton.js +148 -0
- package/lib/components/slider-button/SliderButton.js.map +1 -0
- package/lib/components/slider-button/SliderButton.styles.d.ts +279 -0
- package/lib/components/slider-button/SliderButton.styles.js +62 -0
- package/lib/components/slider-button/SliderButton.styles.js.map +1 -0
- package/lib/components/small-wait-cursor/SmallWaitCursor.d.ts +31 -0
- package/lib/components/small-wait-cursor/SmallWaitCursor.js +36 -0
- package/lib/components/small-wait-cursor/SmallWaitCursor.js.map +1 -0
- package/lib/components/small-wait-cursor/SmallWaitCursor.styles.d.ts +19 -0
- package/lib/components/small-wait-cursor/SmallWaitCursor.styles.js +93 -0
- package/lib/components/small-wait-cursor/SmallWaitCursor.styles.js.map +1 -0
- package/lib/components/tag-input/TagInput.d.ts +22 -0
- package/lib/components/tag-input/TagInput.js +79 -0
- package/lib/components/tag-input/TagInput.js.map +1 -0
- package/lib/components/tag-input/TagInput.styles.d.ts +9 -0
- package/lib/components/tag-input/TagInput.styles.js +41 -0
- package/lib/components/tag-input/TagInput.styles.js.map +1 -0
- package/lib/components/text-area/TextArea.d.ts +29 -0
- package/lib/components/text-area/TextArea.js +49 -0
- package/lib/components/text-area/TextArea.js.map +1 -0
- package/lib/components/text-area/TextArea.styles.d.ts +16 -0
- package/lib/components/text-area/TextArea.styles.js +101 -0
- package/lib/components/text-area/TextArea.styles.js.map +1 -0
- package/lib/components/tooltip/Tooltip.d.ts +22 -0
- package/lib/components/tooltip/Tooltip.js +33 -0
- package/lib/components/tooltip/Tooltip.js.map +1 -0
- package/lib/components/tooltip/Tooltip.styles.d.ts +2 -0
- package/lib/components/tooltip/Tooltip.styles.js +3 -0
- package/lib/components/tooltip/Tooltip.styles.js.map +1 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.d.ts +13 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.js +22 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.js.map +1 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.styles.d.ts +15 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.styles.js +36 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.styles.js.map +1 -0
- package/lib/components/truncation/Truncation.d.ts +34 -0
- package/lib/components/truncation/Truncation.js +132 -0
- package/lib/components/truncation/Truncation.js.map +1 -0
- package/lib/components/truncation/Truncation.styles.d.ts +277 -0
- package/lib/components/truncation/Truncation.styles.js +44 -0
- package/lib/components/truncation/Truncation.styles.js.map +1 -0
- package/lib/constants/mentionFinder.d.ts +4 -0
- package/lib/constants/mentionFinder.js +6 -0
- package/lib/constants/mentionFinder.js.map +1 -0
- package/lib/constants/numberInput.d.ts +5 -0
- package/lib/constants/numberInput.js +6 -0
- package/lib/constants/numberInput.js.map +1 -0
- package/lib/constants/signature.d.ts +1 -0
- package/lib/constants/signature.js +2 -0
- package/lib/constants/signature.js.map +1 -0
- package/lib/hooks/useElementSize.d.ts +2 -0
- package/lib/hooks/useElementSize.js +9 -0
- package/lib/hooks/useElementSize.js.map +1 -0
- package/lib/hooks/uuid.js +4 -11
- package/lib/hooks/uuid.js.map +1 -1
- package/lib/index.d.ts +44 -1
- package/lib/index.js +49 -111
- package/lib/index.js.map +1 -1
- package/lib/types/chayns.d.ts +67 -1
- package/lib/types/chayns.js +3 -10
- package/lib/types/chayns.js.map +1 -1
- package/lib/types/colorSchemeProvider.d.ts +15 -0
- package/lib/types/colorSchemeProvider.js +9 -0
- package/lib/types/colorSchemeProvider.js.map +1 -0
- package/lib/types/comboBox.d.ts +4 -0
- package/lib/types/comboBox.js +6 -0
- package/lib/types/comboBox.js.map +1 -0
- package/lib/{components/context-menu/constants/alignment.js → types/contextMenu.js} +4 -11
- package/lib/types/contextMenu.js.map +1 -0
- package/lib/types/file.d.ts +46 -0
- package/lib/types/file.js +2 -0
- package/lib/types/file.js.map +1 -0
- package/lib/types/filterButtons.d.ts +15 -0
- package/lib/types/filterButtons.js +11 -0
- package/lib/types/filterButtons.js.map +1 -0
- package/lib/types/popup.d.ts +16 -0
- package/lib/types/popup.js +10 -0
- package/lib/types/popup.js.map +1 -0
- package/lib/types/radioButton.d.ts +4 -0
- package/lib/types/radioButton.js +2 -0
- package/lib/types/radioButton.js.map +1 -0
- package/lib/types/searchBox.d.ts +5 -0
- package/lib/types/searchBox.js +2 -0
- package/lib/types/searchBox.js.map +1 -0
- package/lib/types/selectButton.d.ts +4 -0
- package/lib/types/selectButton.js +2 -0
- package/lib/types/selectButton.js.map +1 -0
- package/lib/types/signature.d.ts +10 -0
- package/lib/types/signature.js +2 -0
- package/lib/types/signature.js.map +1 -0
- package/lib/types/slider-button.d.ts +4 -0
- package/lib/types/slider-button.js +2 -0
- package/lib/types/slider-button.js.map +1 -0
- package/lib/types/tagInput.d.ts +4 -0
- package/lib/types/tagInput.js +2 -0
- package/lib/types/tagInput.js.map +1 -0
- package/lib/types/tooltip.d.ts +9 -0
- package/lib/types/tooltip.js +2 -0
- package/lib/types/tooltip.js.map +1 -0
- package/lib/types/truncation.d.ts +5 -0
- package/lib/types/truncation.js +7 -0
- package/lib/types/truncation.js.map +1 -0
- package/lib/{components/accordion/utils.js → utils/accordion.js} +2 -9
- package/lib/utils/accordion.js.map +1 -0
- package/lib/utils/amountControl.d.ts +7 -0
- package/lib/utils/amountControl.js +15 -0
- package/lib/utils/amountControl.js.map +1 -0
- package/lib/utils/calculate.d.ts +6 -0
- package/lib/utils/calculate.js +80 -0
- package/lib/utils/calculate.js.map +1 -0
- package/lib/utils/file.d.ts +363 -0
- package/lib/utils/file.js +393 -0
- package/lib/utils/file.js.map +1 -0
- package/lib/utils/fileDialog.d.ts +7 -0
- package/lib/utils/fileDialog.js +65 -0
- package/lib/utils/fileDialog.js.map +1 -0
- package/lib/utils/font.d.ts +8 -0
- package/lib/utils/font.js +67 -0
- package/lib/utils/font.js.map +1 -0
- package/lib/utils/icon.js +5 -0
- package/lib/utils/icon.js.map +1 -0
- package/lib/utils/isTobitEmployee.d.ts +1 -0
- package/lib/utils/isTobitEmployee.js +21 -0
- package/lib/utils/isTobitEmployee.js.map +1 -0
- package/lib/utils/numberInput.d.ts +23 -0
- package/lib/utils/numberInput.js +83 -0
- package/lib/utils/numberInput.js.map +1 -0
- package/lib/utils/searchBox.d.ts +7 -0
- package/lib/utils/searchBox.js +16 -0
- package/lib/utils/searchBox.js.map +1 -0
- package/lib/utils/slider.d.ts +7 -0
- package/lib/utils/slider.js +28 -0
- package/lib/utils/slider.js.map +1 -0
- package/lib/utils/sliderButton.d.ts +15 -0
- package/lib/utils/sliderButton.js +45 -0
- package/lib/utils/sliderButton.js.map +1 -0
- package/lib/utils/truncation.d.ts +1 -0
- package/lib/utils/truncation.js +27 -0
- package/lib/utils/truncation.js.map +1 -0
- package/lib/utils/uploadFile.d.ts +7 -0
- package/lib/utils/uploadFile.js +35 -0
- package/lib/utils/uploadFile.js.map +1 -0
- package/package.json +32 -21
- package/lib/components/accordion/utils.js.map +0 -1
- package/lib/components/context-menu/constants/alignment.js.map +0 -1
- package/lib/components/icon/utils.js +0 -13
- package/lib/components/icon/utils.js.map +0 -1
- /package/lib/{components/context-menu/constants/alignment.d.ts → types/contextMenu.d.ts} +0 -0
- /package/lib/{components/accordion/utils.d.ts → utils/accordion.d.ts} +0 -0
- /package/lib/{components/icon/utils.d.ts → utils/icon.d.ts} +0 -0
|
@@ -1,51 +1,64 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports.StyledIconWrapper = exports.StyledButton = void 0;
|
|
7
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
-
const StyledButton = _styledComponents.default.button`
|
|
1
|
+
import { motion } from 'framer-motion';
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
export const StyledMotionButton = styled(motion.button)`
|
|
4
|
+
align-items: center;
|
|
10
5
|
background-color: ${_ref => {
|
|
11
6
|
let {
|
|
12
|
-
isSecondary,
|
|
7
|
+
$isSecondary,
|
|
13
8
|
theme
|
|
14
9
|
} = _ref;
|
|
15
|
-
return isSecondary ? theme['202'] : theme['408'];
|
|
10
|
+
return $isSecondary ? theme['202'] : theme['408'];
|
|
16
11
|
}};
|
|
17
12
|
border-radius: 3px;
|
|
18
13
|
box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.2);
|
|
19
14
|
border: none;
|
|
20
15
|
color: ${_ref2 => {
|
|
21
16
|
let {
|
|
22
|
-
isSecondary,
|
|
17
|
+
$isSecondary,
|
|
23
18
|
theme
|
|
24
19
|
} = _ref2;
|
|
25
|
-
return isSecondary ? theme.text : 'white';
|
|
20
|
+
return $isSecondary ? theme.text : 'white';
|
|
26
21
|
}};
|
|
27
|
-
cursor:
|
|
28
|
-
display: inline-block;
|
|
29
|
-
line-height: 1.15;
|
|
30
|
-
min-height: 30px;
|
|
31
|
-
opacity: ${_ref3 => {
|
|
22
|
+
cursor: ${_ref3 => {
|
|
32
23
|
let {
|
|
33
|
-
|
|
24
|
+
$isDisabled
|
|
34
25
|
} = _ref3;
|
|
35
|
-
return
|
|
26
|
+
return $isDisabled ? 'default' : 'pointer';
|
|
36
27
|
}};
|
|
37
|
-
|
|
28
|
+
display: inline-flex;
|
|
29
|
+
line-height: 1.15;
|
|
30
|
+
min-height: 32px;
|
|
31
|
+
opacity: ${_ref4 => {
|
|
38
32
|
let {
|
|
39
|
-
|
|
33
|
+
$isDisabled
|
|
40
34
|
} = _ref4;
|
|
41
|
-
return
|
|
35
|
+
return $isDisabled ? 0.5 : 1;
|
|
42
36
|
}};
|
|
43
37
|
position: relative;
|
|
44
38
|
user-select: none;
|
|
45
39
|
transition: opacity 0.3s ease;
|
|
40
|
+
|
|
41
|
+
${_ref5 => {
|
|
42
|
+
let {
|
|
43
|
+
$hasIcon,
|
|
44
|
+
$hasChildren
|
|
45
|
+
} = _ref5;
|
|
46
|
+
if ($hasIcon) {
|
|
47
|
+
if ($hasChildren) {
|
|
48
|
+
return css`
|
|
49
|
+
padding: 7px 12px 7px 42px;
|
|
50
|
+
`;
|
|
51
|
+
}
|
|
52
|
+
return css`
|
|
53
|
+
padding: 7px 12px 7px 18px;
|
|
54
|
+
`;
|
|
55
|
+
}
|
|
56
|
+
return css`
|
|
57
|
+
padding: 7px 12px 7px 12px;
|
|
58
|
+
`;
|
|
59
|
+
}}
|
|
46
60
|
`;
|
|
47
|
-
|
|
48
|
-
const StyledIconWrapper = _styledComponents.default.span`
|
|
61
|
+
export const StyledIconWrapper = styled.span`
|
|
49
62
|
align-items: center;
|
|
50
63
|
background-color: rgba(255, 255, 255, 0.2);
|
|
51
64
|
bottom: 0;
|
|
@@ -56,5 +69,10 @@ const StyledIconWrapper = _styledComponents.default.span`
|
|
|
56
69
|
top: 0;
|
|
57
70
|
width: 30px;
|
|
58
71
|
`;
|
|
59
|
-
|
|
72
|
+
export const StyledMotionChildrenWrapper = styled(motion.div)``;
|
|
73
|
+
export const StyledMotionWaitCursorWrapper = styled(motion.div)`
|
|
74
|
+
align-items: center;
|
|
75
|
+
display: flex;
|
|
76
|
+
justify-content: center;
|
|
77
|
+
`;
|
|
60
78
|
//# sourceMappingURL=Button.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.styles.js","names":["
|
|
1
|
+
{"version":3,"file":"Button.styles.js","names":["motion","styled","css","StyledMotionButton","button","_ref","$isSecondary","theme","_ref2","text","_ref3","$isDisabled","_ref4","_ref5","$hasIcon","$hasChildren","StyledIconWrapper","span","StyledMotionChildrenWrapper","div","StyledMotionWaitCursorWrapper"],"sources":["../../../src/components/button/Button.styles.ts"],"sourcesContent":["import { motion } from 'framer-motion';\nimport styled, { css } from 'styled-components';\nimport type { FramerMotionBugFix, WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\n\ntype StyledButtonProps = WithTheme<{\n $hasIcon: boolean;\n $hasChildren: boolean;\n $isDisabled?: boolean;\n $isSecondary?: boolean;\n}>;\n\nexport const StyledMotionButton = styled(motion.button)<StyledButtonProps>`\n align-items: center;\n background-color: ${({ $isSecondary, theme }: StyledButtonProps) =>\n $isSecondary ? theme['202'] : theme['408']};\n border-radius: 3px;\n box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.2);\n border: none;\n color: ${({ $isSecondary, theme }: StyledButtonProps) => ($isSecondary ? theme.text : 'white')};\n cursor: ${({ $isDisabled }) => ($isDisabled ? 'default' : 'pointer')};\n display: inline-flex;\n line-height: 1.15;\n min-height: 32px;\n opacity: ${({ $isDisabled }) => ($isDisabled ? 0.5 : 1)};\n position: relative;\n user-select: none;\n transition: opacity 0.3s ease;\n\n ${({ $hasIcon, $hasChildren }) => {\n if ($hasIcon) {\n if ($hasChildren) {\n return css`\n padding: 7px 12px 7px 42px;\n `;\n }\n return css`\n padding: 7px 12px 7px 18px;\n `;\n }\n return css`\n padding: 7px 12px 7px 12px;\n `;\n }}\n`;\n\nexport const StyledIconWrapper = styled.span`\n align-items: center;\n background-color: rgba(255, 255, 255, 0.2);\n bottom: 0;\n display: flex;\n justify-content: center;\n left: 0;\n position: absolute;\n top: 0;\n width: 30px;\n`;\n\nexport const StyledMotionChildrenWrapper = styled(motion.div)<FramerMotionBugFix>``;\n\nexport const StyledMotionWaitCursorWrapper = styled(motion.div)<FramerMotionBugFix>`\n align-items: center;\n display: flex;\n justify-content: center;\n`;\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,eAAe;AACtC,OAAOC,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAU/C,OAAO,MAAMC,kBAAkB,GAAGF,MAAM,CAACD,MAAM,CAACI,MAAM,CAAqB;AAC3E;AACA,wBAAwBC,IAAA;EAAA,IAAC;IAAEC,YAAY;IAAEC;EAAyB,CAAC,GAAAF,IAAA;EAAA,OAC3DC,YAAY,GAAGC,KAAK,CAAC,KAAK,CAAC,GAAGA,KAAK,CAAC,KAAK,CAAC;AAAA,CAAC;AACnD;AACA;AACA;AACA,aAAaC,KAAA;EAAA,IAAC;IAAEF,YAAY;IAAEC;EAAyB,CAAC,GAAAC,KAAA;EAAA,OAAMF,YAAY,GAAGC,KAAK,CAACE,IAAI,GAAG,OAAO;AAAA,CAAE;AACnG,cAAcC,KAAA;EAAA,IAAC;IAAEC;EAAY,CAAC,GAAAD,KAAA;EAAA,OAAMC,WAAW,GAAG,SAAS,GAAG,SAAS;AAAA,CAAE;AACzE;AACA;AACA;AACA,eAAeC,KAAA;EAAA,IAAC;IAAED;EAAY,CAAC,GAAAC,KAAA;EAAA,OAAMD,WAAW,GAAG,GAAG,GAAG,CAAC;AAAA,CAAE;AAC5D;AACA;AACA;AACA;AACA,MAAME,KAAA,IAAgC;EAAA,IAA/B;IAAEC,QAAQ;IAAEC;EAAa,CAAC,GAAAF,KAAA;EACzB,IAAIC,QAAQ,EAAE;IACV,IAAIC,YAAY,EAAE;MACd,OAAOb,GAAI;AAC3B;AACA,iBAAiB;IACL;IACA,OAAOA,GAAI;AACvB;AACA,aAAa;EACL;EACA,OAAOA,GAAI;AACnB;AACA,SAAS;AACL,CAAE;AACN,CAAC;AAED,OAAO,MAAMc,iBAAiB,GAAGf,MAAM,CAACgB,IAAK;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,2BAA2B,GAAGjB,MAAM,CAACD,MAAM,CAACmB,GAAG,CAAsB,EAAC;AAEnF,OAAO,MAAMC,6BAA6B,GAAGnB,MAAM,CAACD,MAAM,CAACmB,GAAG,CAAsB;AACpF;AACA;AACA;AACA,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ChangeEventHandler, FC,
|
|
1
|
+
import { ChangeEventHandler, FC, ReactElement } from 'react';
|
|
2
2
|
export type CheckboxProps = {
|
|
3
3
|
/**
|
|
4
4
|
* Text for checkbox or switch
|
|
5
5
|
*/
|
|
6
|
-
children?:
|
|
6
|
+
children?: ReactElement | string;
|
|
7
7
|
/**
|
|
8
8
|
* Indicates whether the checkbox or switch is selected
|
|
9
9
|
*/
|
|
@@ -12,6 +12,10 @@ export type CheckboxProps = {
|
|
|
12
12
|
* Disables the checkbox or switch so it cannot be toggled
|
|
13
13
|
*/
|
|
14
14
|
isDisabled?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Classname for the label
|
|
17
|
+
*/
|
|
18
|
+
labelClassName?: string;
|
|
15
19
|
/**
|
|
16
20
|
* Function to be executed if the checked value changes
|
|
17
21
|
*/
|
|
@@ -20,6 +24,10 @@ export type CheckboxProps = {
|
|
|
20
24
|
* Changes the design to use switch instead of checkbox
|
|
21
25
|
*/
|
|
22
26
|
shouldShowAsSwitch?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Whether the Checkbox should be displayed centered to the label or at the top
|
|
29
|
+
*/
|
|
30
|
+
shouldShowCentered?: boolean;
|
|
23
31
|
};
|
|
24
32
|
declare const Checkbox: FC<CheckboxProps>;
|
|
25
33
|
export default Checkbox;
|
|
@@ -1,44 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _uuid = require("../../hooks/uuid");
|
|
9
|
-
var _Checkbox = require("./Checkbox.styles");
|
|
10
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
11
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
1
|
+
import React, { useCallback, useMemo, useState } from 'react';
|
|
2
|
+
import { useUuid } from '../../hooks/uuid';
|
|
3
|
+
import { getHeightOfSingleTextLine } from '../../utils/calculate';
|
|
4
|
+
import { StyledCheckbox, StyledCheckboxInput, StyledCheckboxLabel } from './Checkbox.styles';
|
|
12
5
|
const Checkbox = _ref => {
|
|
13
6
|
let {
|
|
14
7
|
children,
|
|
15
8
|
isChecked,
|
|
16
9
|
isDisabled,
|
|
10
|
+
labelClassName,
|
|
17
11
|
onChange,
|
|
18
|
-
shouldShowAsSwitch
|
|
12
|
+
shouldShowAsSwitch,
|
|
13
|
+
shouldShowCentered = false
|
|
19
14
|
} = _ref;
|
|
20
|
-
const [isActive, setIsActive] =
|
|
21
|
-
const handleChange =
|
|
15
|
+
const [isActive, setIsActive] = useState(isChecked ?? false);
|
|
16
|
+
const handleChange = useCallback(event => {
|
|
22
17
|
setIsActive(event.target.checked);
|
|
23
18
|
if (typeof onChange === 'function') {
|
|
24
19
|
onChange(event);
|
|
25
20
|
}
|
|
26
21
|
}, [onChange]);
|
|
27
|
-
const uuid =
|
|
28
|
-
|
|
22
|
+
const uuid = useUuid();
|
|
23
|
+
const lineHeight = useMemo(() => shouldShowCentered ? undefined : getHeightOfSingleTextLine(), [shouldShowCentered]);
|
|
24
|
+
return /*#__PURE__*/React.createElement(StyledCheckbox, null, /*#__PURE__*/React.createElement(StyledCheckboxInput, {
|
|
29
25
|
checked: isChecked,
|
|
30
26
|
disabled: isDisabled,
|
|
31
27
|
id: uuid,
|
|
32
28
|
onChange: handleChange,
|
|
33
29
|
type: "checkbox"
|
|
34
|
-
}), /*#__PURE__*/
|
|
30
|
+
}), /*#__PURE__*/React.createElement(StyledCheckboxLabel, {
|
|
31
|
+
className: labelClassName,
|
|
35
32
|
htmlFor: uuid,
|
|
36
|
-
isChecked: isChecked
|
|
37
|
-
isDisabled: isDisabled,
|
|
38
|
-
shouldShowAsSwitch: shouldShowAsSwitch
|
|
33
|
+
$isChecked: isChecked ?? isActive,
|
|
34
|
+
$isDisabled: isDisabled,
|
|
35
|
+
$shouldShowAsSwitch: shouldShowAsSwitch,
|
|
36
|
+
$lineHeight: lineHeight
|
|
39
37
|
}, children));
|
|
40
38
|
};
|
|
41
39
|
Checkbox.displayName = 'Checkbox';
|
|
42
|
-
|
|
43
|
-
exports.default = _default;
|
|
40
|
+
export default Checkbox;
|
|
44
41
|
//# sourceMappingURL=Checkbox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","names":["Checkbox","children","isChecked","isDisabled","onChange","shouldShowAsSwitch","
|
|
1
|
+
{"version":3,"file":"Checkbox.js","names":["React","useCallback","useMemo","useState","useUuid","getHeightOfSingleTextLine","StyledCheckbox","StyledCheckboxInput","StyledCheckboxLabel","Checkbox","_ref","children","isChecked","isDisabled","labelClassName","onChange","shouldShowAsSwitch","shouldShowCentered","isActive","setIsActive","handleChange","event","target","checked","uuid","lineHeight","undefined","createElement","disabled","id","type","className","htmlFor","$isChecked","$isDisabled","$shouldShowAsSwitch","$lineHeight","displayName"],"sources":["../../../src/components/checkbox/Checkbox.tsx"],"sourcesContent":["import React, {\n ChangeEvent,\n ChangeEventHandler,\n FC,\n ReactElement,\n useCallback,\n useMemo,\n useState,\n} from 'react';\nimport { useUuid } from '../../hooks/uuid';\nimport { getHeightOfSingleTextLine } from '../../utils/calculate';\nimport { StyledCheckbox, StyledCheckboxInput, StyledCheckboxLabel } from './Checkbox.styles';\n\nexport type CheckboxProps = {\n /**\n * Text for checkbox or switch\n */\n children?: ReactElement | string;\n /**\n * Indicates whether the checkbox or switch is selected\n */\n isChecked?: boolean;\n /**\n * Disables the checkbox or switch so it cannot be toggled\n */\n isDisabled?: boolean;\n /**\n * Classname for the label\n */\n labelClassName?: string;\n /**\n * Function to be executed if the checked value changes\n */\n onChange?: ChangeEventHandler<HTMLInputElement>;\n /**\n * Changes the design to use switch instead of checkbox\n */\n shouldShowAsSwitch?: boolean;\n /**\n * Whether the Checkbox should be displayed centered to the label or at the top\n */\n shouldShowCentered?: boolean;\n};\n\nconst Checkbox: FC<CheckboxProps> = ({\n children,\n isChecked,\n isDisabled,\n labelClassName,\n onChange,\n shouldShowAsSwitch,\n shouldShowCentered = false,\n}) => {\n const [isActive, setIsActive] = useState(isChecked ?? false);\n\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n setIsActive(event.target.checked);\n\n if (typeof onChange === 'function') {\n onChange(event);\n }\n },\n [onChange],\n );\n\n const uuid = useUuid();\n\n const lineHeight = useMemo(\n () => (shouldShowCentered ? undefined : getHeightOfSingleTextLine()),\n [shouldShowCentered],\n );\n\n return (\n <StyledCheckbox>\n <StyledCheckboxInput\n checked={isChecked}\n disabled={isDisabled}\n id={uuid}\n onChange={handleChange}\n type=\"checkbox\"\n />\n <StyledCheckboxLabel\n className={labelClassName}\n htmlFor={uuid}\n $isChecked={isChecked ?? isActive}\n $isDisabled={isDisabled}\n $shouldShowAsSwitch={shouldShowAsSwitch}\n $lineHeight={lineHeight}\n >\n {children}\n </StyledCheckboxLabel>\n </StyledCheckbox>\n );\n};\n\nCheckbox.displayName = 'Checkbox';\n\nexport default Checkbox;\n"],"mappings":"AAAA,OAAOA,KAAK,IAKRC,WAAW,EACXC,OAAO,EACPC,QAAQ,QACL,OAAO;AACd,SAASC,OAAO,QAAQ,kBAAkB;AAC1C,SAASC,yBAAyB,QAAQ,uBAAuB;AACjE,SAASC,cAAc,EAAEC,mBAAmB,EAAEC,mBAAmB,QAAQ,mBAAmB;AAiC5F,MAAMC,QAA2B,GAAGC,IAAA,IAQ9B;EAAA,IAR+B;IACjCC,QAAQ;IACRC,SAAS;IACTC,UAAU;IACVC,cAAc;IACdC,QAAQ;IACRC,kBAAkB;IAClBC,kBAAkB,GAAG;EACzB,CAAC,GAAAP,IAAA;EACG,MAAM,CAACQ,QAAQ,EAAEC,WAAW,CAAC,GAAGhB,QAAQ,CAACS,SAAS,IAAI,KAAK,CAAC;EAE5D,MAAMQ,YAAY,GAAGnB,WAAW,CAC3BoB,KAAoC,IAAK;IACtCF,WAAW,CAACE,KAAK,CAACC,MAAM,CAACC,OAAO,CAAC;IAEjC,IAAI,OAAOR,QAAQ,KAAK,UAAU,EAAE;MAChCA,QAAQ,CAACM,KAAK,CAAC;IACnB;EACJ,CAAC,EACD,CAACN,QAAQ,CACb,CAAC;EAED,MAAMS,IAAI,GAAGpB,OAAO,CAAC,CAAC;EAEtB,MAAMqB,UAAU,GAAGvB,OAAO,CACtB,MAAOe,kBAAkB,GAAGS,SAAS,GAAGrB,yBAAyB,CAAC,CAAE,EACpE,CAACY,kBAAkB,CACvB,CAAC;EAED,oBACIjB,KAAA,CAAA2B,aAAA,CAACrB,cAAc,qBACXN,KAAA,CAAA2B,aAAA,CAACpB,mBAAmB;IAChBgB,OAAO,EAAEX,SAAU;IACnBgB,QAAQ,EAAEf,UAAW;IACrBgB,EAAE,EAAEL,IAAK;IACTT,QAAQ,EAAEK,YAAa;IACvBU,IAAI,EAAC;EAAU,CAClB,CAAC,eACF9B,KAAA,CAAA2B,aAAA,CAACnB,mBAAmB;IAChBuB,SAAS,EAAEjB,cAAe;IAC1BkB,OAAO,EAAER,IAAK;IACdS,UAAU,EAAErB,SAAS,IAAIM,QAAS;IAClCgB,WAAW,EAAErB,UAAW;IACxBsB,mBAAmB,EAAEnB,kBAAmB;IACxCoB,WAAW,EAAEX;EAAW,GAEvBd,QACgB,CACT,CAAC;AAEzB,CAAC;AAEDF,QAAQ,CAAC4B,WAAW,GAAG,UAAU;AAEjC,eAAe5B,QAAQ"}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';
|
|
1
3
|
import type { CheckboxProps } from './Checkbox';
|
|
2
|
-
export declare const StyledCheckbox: import("styled-components").
|
|
3
|
-
export declare const StyledCheckboxInput: import("styled-components").
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
export declare const StyledCheckbox: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
5
|
+
export declare const StyledCheckboxInput: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>>;
|
|
6
|
+
type StyledCheckboxLabelProps = WithTheme<{
|
|
7
|
+
$shouldShowAsSwitch?: CheckboxProps['shouldShowAsSwitch'];
|
|
8
|
+
$isDisabled?: CheckboxProps['isDisabled'];
|
|
9
|
+
$isChecked?: CheckboxProps['isChecked'];
|
|
10
|
+
$lineHeight?: number;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const StyledCheckboxLabel: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, StyledCheckboxLabelProps>>;
|
|
13
|
+
export {};
|
|
@@ -1,66 +1,65 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.StyledCheckboxLabel = exports.StyledCheckboxInput = exports.StyledCheckbox = void 0;
|
|
7
|
-
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
8
|
-
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); }
|
|
9
|
-
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; }
|
|
10
|
-
const StyledCheckbox = _styledComponents.default.div`
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
export const StyledCheckbox = styled.div`
|
|
11
3
|
align-items: center;
|
|
12
4
|
display: flex;
|
|
13
5
|
position: relative;
|
|
14
6
|
`;
|
|
15
|
-
|
|
16
|
-
const StyledCheckboxInput = _styledComponents.default.input`
|
|
7
|
+
export const StyledCheckboxInput = styled.input`
|
|
17
8
|
display: none;
|
|
18
9
|
`;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
cursor: ${_ref => {
|
|
10
|
+
export const StyledCheckboxLabel = styled.label`
|
|
11
|
+
color: ${_ref => {
|
|
22
12
|
let {
|
|
23
|
-
|
|
13
|
+
theme
|
|
24
14
|
} = _ref;
|
|
25
|
-
return
|
|
15
|
+
return theme.text;
|
|
26
16
|
}};
|
|
27
|
-
|
|
17
|
+
cursor: ${_ref2 => {
|
|
28
18
|
let {
|
|
29
|
-
isDisabled
|
|
19
|
+
$isDisabled
|
|
30
20
|
} = _ref2;
|
|
31
|
-
return isDisabled ?
|
|
21
|
+
return $isDisabled ? 'default' : 'pointer';
|
|
32
22
|
}};
|
|
33
|
-
|
|
23
|
+
opacity: ${_ref3 => {
|
|
34
24
|
let {
|
|
35
|
-
|
|
25
|
+
$isDisabled
|
|
36
26
|
} = _ref3;
|
|
37
|
-
return
|
|
27
|
+
return $isDisabled ? 0.5 : 1;
|
|
28
|
+
}};
|
|
29
|
+
padding-left: ${_ref4 => {
|
|
30
|
+
let {
|
|
31
|
+
$shouldShowAsSwitch
|
|
32
|
+
} = _ref4;
|
|
33
|
+
return $shouldShowAsSwitch ? '48px' : '20px';
|
|
38
34
|
}};
|
|
39
35
|
transition: opacity 0.2s ease;
|
|
40
36
|
user-select: none;
|
|
41
37
|
|
|
42
38
|
&:after {
|
|
43
|
-
${
|
|
39
|
+
${_ref5 => {
|
|
44
40
|
let {
|
|
45
|
-
isChecked,
|
|
46
|
-
shouldShowAsSwitch
|
|
47
|
-
|
|
48
|
-
|
|
41
|
+
$isChecked,
|
|
42
|
+
$shouldShowAsSwitch,
|
|
43
|
+
$lineHeight
|
|
44
|
+
} = _ref5;
|
|
45
|
+
return $shouldShowAsSwitch ? css`
|
|
49
46
|
background-color: white;
|
|
50
47
|
border-radius: 50%;
|
|
51
48
|
box-shadow: 0 1px 4px rgb(0 0 0 / 35%);
|
|
52
49
|
height: 16px;
|
|
53
50
|
left: 7px;
|
|
54
|
-
|
|
51
|
+
top: ${$lineHeight ? `${$lineHeight / 1.5}px` : '50%'};
|
|
52
|
+
transform: translateX(${$isChecked ? '18px' : 0}) translateY(-50%);
|
|
55
53
|
transition: transform 0.2s ease;
|
|
56
54
|
width: 16px;
|
|
57
|
-
` :
|
|
55
|
+
` : css`
|
|
58
56
|
border-right: 2px solid #fff;
|
|
59
57
|
border-bottom: 2px solid #fff;
|
|
60
58
|
height: 10px;
|
|
61
|
-
left:
|
|
62
|
-
opacity: ${isChecked ? 1 : 0};
|
|
63
|
-
|
|
59
|
+
left: 2px;
|
|
60
|
+
opacity: ${$isChecked ? 1 : 0};
|
|
61
|
+
top: ${$lineHeight ? `calc(${$lineHeight / 1.5}px - 2px)` : 'calc(50% - 2px)'};
|
|
62
|
+
transform: rotateZ(37deg) translateY(-50%);
|
|
64
63
|
transition: opacity 0.2s ease;
|
|
65
64
|
width: 5.5px;
|
|
66
65
|
`;
|
|
@@ -68,58 +67,66 @@ const StyledCheckboxLabel = _styledComponents.default.label`
|
|
|
68
67
|
|
|
69
68
|
content: ' ';
|
|
70
69
|
position: absolute;
|
|
71
|
-
top: 50%;
|
|
72
|
-
transform-origin: 100% 100%;
|
|
73
70
|
}
|
|
74
71
|
|
|
75
72
|
&:before {
|
|
76
|
-
background-color: ${
|
|
73
|
+
background-color: ${_ref6 => {
|
|
77
74
|
let {
|
|
78
|
-
isChecked,
|
|
79
|
-
shouldShowAsSwitch,
|
|
75
|
+
$isChecked,
|
|
76
|
+
$shouldShowAsSwitch,
|
|
80
77
|
theme
|
|
81
|
-
} =
|
|
82
|
-
if (shouldShowAsSwitch) {
|
|
83
|
-
return isChecked ? theme.green : theme.red;
|
|
78
|
+
} = _ref6;
|
|
79
|
+
if ($shouldShowAsSwitch) {
|
|
80
|
+
return $isChecked ? theme.green : theme.red;
|
|
84
81
|
}
|
|
85
|
-
return isChecked ? theme['408'] : theme['403'];
|
|
82
|
+
return $isChecked ? theme['408'] : theme['403'];
|
|
86
83
|
}};
|
|
87
|
-
border: 1px solid rgba(${
|
|
84
|
+
border: 1px solid rgba(${_ref7 => {
|
|
88
85
|
let {
|
|
89
86
|
theme
|
|
90
|
-
} =
|
|
87
|
+
} = _ref7;
|
|
91
88
|
return theme['409-rgb'];
|
|
92
89
|
}}, 0.5);
|
|
93
|
-
border-radius: ${
|
|
90
|
+
border-radius: ${_ref8 => {
|
|
94
91
|
let {
|
|
95
|
-
shouldShowAsSwitch
|
|
96
|
-
} =
|
|
97
|
-
return shouldShowAsSwitch ? '100px' : 0;
|
|
92
|
+
$shouldShowAsSwitch
|
|
93
|
+
} = _ref8;
|
|
94
|
+
return $shouldShowAsSwitch ? '100px' : 0;
|
|
98
95
|
}};
|
|
99
96
|
content: ' ';
|
|
100
|
-
height: ${
|
|
97
|
+
height: ${_ref9 => {
|
|
101
98
|
let {
|
|
102
|
-
shouldShowAsSwitch
|
|
103
|
-
} =
|
|
104
|
-
return shouldShowAsSwitch ? '13px' : '15px';
|
|
99
|
+
$shouldShowAsSwitch
|
|
100
|
+
} = _ref9;
|
|
101
|
+
return $shouldShowAsSwitch ? '13px' : '15px';
|
|
105
102
|
}};
|
|
106
|
-
left: ${
|
|
103
|
+
left: ${_ref10 => {
|
|
107
104
|
let {
|
|
108
|
-
shouldShowAsSwitch
|
|
109
|
-
} =
|
|
110
|
-
return shouldShowAsSwitch ? '10px' : 0;
|
|
105
|
+
$shouldShowAsSwitch
|
|
106
|
+
} = _ref10;
|
|
107
|
+
return $shouldShowAsSwitch ? '10px' : 0;
|
|
111
108
|
}};
|
|
112
109
|
position: absolute;
|
|
113
|
-
top: 50%;
|
|
114
|
-
transform: translateY(-50%);
|
|
115
110
|
transition: background-color 0.2s ease;
|
|
116
|
-
width: ${
|
|
111
|
+
width: ${_ref11 => {
|
|
117
112
|
let {
|
|
118
|
-
shouldShowAsSwitch
|
|
119
|
-
} =
|
|
120
|
-
return shouldShowAsSwitch ? '28px' : '15px';
|
|
113
|
+
$shouldShowAsSwitch
|
|
114
|
+
} = _ref11;
|
|
115
|
+
return $shouldShowAsSwitch ? '28px' : '15px';
|
|
121
116
|
}};
|
|
117
|
+
${_ref12 => {
|
|
118
|
+
let {
|
|
119
|
+
$lineHeight
|
|
120
|
+
} = _ref12;
|
|
121
|
+
return $lineHeight ? css`
|
|
122
|
+
top: ${$lineHeight / 1.5}px;
|
|
123
|
+
transform: translateY(-50%);
|
|
124
|
+
` : css`
|
|
125
|
+
top: 50%;
|
|
126
|
+
transform: translateY(-50%);
|
|
127
|
+
`;
|
|
128
|
+
}}
|
|
129
|
+
}
|
|
122
130
|
}
|
|
123
131
|
`;
|
|
124
|
-
exports.StyledCheckboxLabel = StyledCheckboxLabel;
|
|
125
132
|
//# sourceMappingURL=Checkbox.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.styles.js","names":["
|
|
1
|
+
{"version":3,"file":"Checkbox.styles.js","names":["styled","css","StyledCheckbox","div","StyledCheckboxInput","input","StyledCheckboxLabel","label","_ref","theme","text","_ref2","$isDisabled","_ref3","_ref4","$shouldShowAsSwitch","_ref5","$isChecked","$lineHeight","_ref6","green","red","_ref7","_ref8","_ref9","_ref10","_ref11","_ref12"],"sources":["../../../src/components/checkbox/Checkbox.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\nimport type { CheckboxProps } from './Checkbox';\n\nexport const StyledCheckbox = styled.div`\n align-items: center;\n display: flex;\n position: relative;\n`;\n\nexport const StyledCheckboxInput = styled.input`\n display: none;\n`;\n\ntype StyledCheckboxLabelProps = WithTheme<{\n $shouldShowAsSwitch?: CheckboxProps['shouldShowAsSwitch'];\n $isDisabled?: CheckboxProps['isDisabled'];\n $isChecked?: CheckboxProps['isChecked'];\n $lineHeight?: number;\n}>;\n\nexport const StyledCheckboxLabel = styled.label<StyledCheckboxLabelProps>`\n color: ${({ theme }: StyledCheckboxLabelProps) => theme.text};\n cursor: ${({ $isDisabled }) => ($isDisabled ? 'default' : 'pointer')};\n opacity: ${({ $isDisabled }) => ($isDisabled ? 0.5 : 1)};\n padding-left: ${({ $shouldShowAsSwitch }) => ($shouldShowAsSwitch ? '48px' : '20px')};\n transition: opacity 0.2s ease;\n user-select: none;\n\n &:after {\n ${({ $isChecked, $shouldShowAsSwitch, $lineHeight }) =>\n $shouldShowAsSwitch\n ? css`\n background-color: white;\n border-radius: 50%;\n box-shadow: 0 1px 4px rgb(0 0 0 / 35%);\n height: 16px;\n left: 7px;\n top: ${$lineHeight ? `${$lineHeight / 1.5}px` : '50%'};\n transform: translateX(${$isChecked ? '18px' : 0}) translateY(-50%);\n transition: transform 0.2s ease;\n width: 16px;\n `\n : css`\n border-right: 2px solid #fff;\n border-bottom: 2px solid #fff;\n height: 10px;\n left: 2px;\n opacity: ${$isChecked ? 1 : 0};\n top: ${$lineHeight\n ? `calc(${$lineHeight / 1.5}px - 2px)`\n : 'calc(50% - 2px)'};\n transform: rotateZ(37deg) translateY(-50%);\n transition: opacity 0.2s ease;\n width: 5.5px;\n `}\n\n content: ' ';\n position: absolute;\n }\n\n &:before {\n background-color: ${({\n $isChecked,\n $shouldShowAsSwitch,\n theme,\n }: StyledCheckboxLabelProps) => {\n if ($shouldShowAsSwitch) {\n return $isChecked ? theme.green : theme.red;\n }\n\n return $isChecked ? theme['408'] : theme['403'];\n }};\n border: 1px solid rgba(${({ theme }: StyledCheckboxLabelProps) => theme['409-rgb']}, 0.5);\n border-radius: ${({ $shouldShowAsSwitch }) => ($shouldShowAsSwitch ? '100px' : 0)};\n content: ' ';\n height: ${({ $shouldShowAsSwitch }) => ($shouldShowAsSwitch ? '13px' : '15px')};\n left: ${({ $shouldShowAsSwitch }) => ($shouldShowAsSwitch ? '10px' : 0)};\n position: absolute;\n transition: background-color 0.2s ease;\n width: ${({ $shouldShowAsSwitch }) => ($shouldShowAsSwitch ? '28px' : '15px')};\n ${({ $lineHeight }) =>\n $lineHeight\n ? css`\n top: ${$lineHeight / 1.5}px;\n transform: translateY(-50%);\n `\n : css`\n top: 50%;\n transform: translateY(-50%);\n `}\n }\n }\n`;\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAI/C,OAAO,MAAMC,cAAc,GAAGF,MAAM,CAACG,GAAI;AACzC;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,mBAAmB,GAAGJ,MAAM,CAACK,KAAM;AAChD;AACA,CAAC;AASD,OAAO,MAAMC,mBAAmB,GAAGN,MAAM,CAACO,KAAgC;AAC1E,aAAaC,IAAA;EAAA,IAAC;IAAEC;EAAgC,CAAC,GAAAD,IAAA;EAAA,OAAKC,KAAK,CAACC,IAAI;AAAA,CAAC;AACjE,cAAcC,KAAA;EAAA,IAAC;IAAEC;EAAY,CAAC,GAAAD,KAAA;EAAA,OAAMC,WAAW,GAAG,SAAS,GAAG,SAAS;AAAA,CAAE;AACzE,eAAeC,KAAA;EAAA,IAAC;IAAED;EAAY,CAAC,GAAAC,KAAA;EAAA,OAAMD,WAAW,GAAG,GAAG,GAAG,CAAC;AAAA,CAAE;AAC5D,oBAAoBE,KAAA;EAAA,IAAC;IAAEC;EAAoB,CAAC,GAAAD,KAAA;EAAA,OAAMC,mBAAmB,GAAG,MAAM,GAAG,MAAM;AAAA,CAAE;AACzF;AACA;AACA;AACA;AACA,UAAUC,KAAA;EAAA,IAAC;IAAEC,UAAU;IAAEF,mBAAmB;IAAEG;EAAY,CAAC,GAAAF,KAAA;EAAA,OAC/CD,mBAAmB,GACbd,GAAI;AACtB;AACA;AACA;AACA;AACA;AACA,6BAA6BiB,WAAW,GAAI,GAAEA,WAAW,GAAG,GAAI,IAAG,GAAG,KAAM;AAC5E,8CAA8CD,UAAU,GAAG,MAAM,GAAG,CAAE;AACtE;AACA;AACA,mBAAmB,GACDhB,GAAI;AACtB;AACA;AACA;AACA;AACA,iCAAiCgB,UAAU,GAAG,CAAC,GAAG,CAAE;AACpD,6BAA6BC,WAAW,GACX,QAAOA,WAAW,GAAG,GAAI,WAAU,GACpC,iBAAkB;AAC9C;AACA;AACA;AACA,mBAAmB;AAAA,CAAC;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4BC,KAAA,IAIY;EAAA,IAJX;IACjBF,UAAU;IACVF,mBAAmB;IACnBN;EACsB,CAAC,GAAAU,KAAA;EACvB,IAAIJ,mBAAmB,EAAE;IACrB,OAAOE,UAAU,GAAGR,KAAK,CAACW,KAAK,GAAGX,KAAK,CAACY,GAAG;EAC/C;EAEA,OAAOJ,UAAU,GAAGR,KAAK,CAAC,KAAK,CAAC,GAAGA,KAAK,CAAC,KAAK,CAAC;AACnD,CAAE;AACV,iCAAiCa,KAAA;EAAA,IAAC;IAAEb;EAAgC,CAAC,GAAAa,KAAA;EAAA,OAAKb,KAAK,CAAC,SAAS,CAAC;AAAA,CAAC;AAC3F,yBAAyBc,KAAA;EAAA,IAAC;IAAER;EAAoB,CAAC,GAAAQ,KAAA;EAAA,OAAMR,mBAAmB,GAAG,OAAO,GAAG,CAAC;AAAA,CAAE;AAC1F;AACA,kBAAkBS,KAAA;EAAA,IAAC;IAAET;EAAoB,CAAC,GAAAS,KAAA;EAAA,OAAMT,mBAAmB,GAAG,MAAM,GAAG,MAAM;AAAA,CAAE;AACvF,gBAAgBU,MAAA;EAAA,IAAC;IAAEV;EAAoB,CAAC,GAAAU,MAAA;EAAA,OAAMV,mBAAmB,GAAG,MAAM,GAAG,CAAC;AAAA,CAAE;AAChF;AACA;AACA,iBAAiBW,MAAA;EAAA,IAAC;IAAEX;EAAoB,CAAC,GAAAW,MAAA;EAAA,OAAMX,mBAAmB,GAAG,MAAM,GAAG,MAAM;AAAA,CAAE;AACtF,UAAUY,MAAA;EAAA,IAAC;IAAET;EAAY,CAAC,GAAAS,MAAA;EAAA,OACdT,WAAW,GACLjB,GAAI;AACtB,6BAA6BiB,WAAW,GAAG,GAAI;AAC/C;AACA,mBAAmB,GACDjB,GAAI;AACtB;AACA;AACA,mBAAmB;AAAA,CAAC;AACpB;AACA;AACA,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
|
+
import type { DesignSettings } from '../../types/colorSchemeProvider';
|
|
2
3
|
declare enum ColorMode {
|
|
3
4
|
Classic = 0,
|
|
4
5
|
Dark = 1,
|
|
@@ -23,6 +24,10 @@ type ColorSchemeProviderProps = {
|
|
|
23
24
|
cssVariables?: {
|
|
24
25
|
[key: string]: string | number;
|
|
25
26
|
};
|
|
27
|
+
/**
|
|
28
|
+
* The design settings of a page.
|
|
29
|
+
*/
|
|
30
|
+
designSettings?: DesignSettings;
|
|
26
31
|
/**
|
|
27
32
|
* The secondary hex color to be used for the children
|
|
28
33
|
*/
|
|
@@ -40,5 +45,6 @@ export interface Theme {
|
|
|
40
45
|
export type WithTheme<T> = T & {
|
|
41
46
|
theme: Theme;
|
|
42
47
|
};
|
|
48
|
+
export type FramerMotionBugFix = WithTheme<unknown>;
|
|
43
49
|
declare const ColorSchemeProvider: FC<ColorSchemeProviderProps>;
|
|
44
50
|
export default ColorSchemeProvider;
|