@pushwoosh/dumb-components 1.0.0 → 1.0.2
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/ActionsGroup/ActionsGroup.d.ts +3 -0
- package/ActionsGroup/ActionsGroup.js +18 -0
- package/ActionsGroup/ActionsGroupItem.d.ts +3 -0
- package/ActionsGroup/ActionsGroupItem.js +12 -0
- package/ActionsGroup/index.d.ts +3 -0
- package/ActionsGroup/index.js +2 -0
- package/ActionsGroup/styles.d.ts +7 -0
- package/ActionsGroup/styles.js +22 -0
- package/ActionsGroup/types.d.ts +12 -0
- package/Badge/Badge.d.ts +3 -0
- package/Badge/Badge.js +16 -0
- package/Badge/index.d.ts +2 -0
- package/Badge/index.js +1 -0
- package/Badge/maps.d.ts +19 -0
- package/Badge/maps.js +19 -0
- package/Badge/styles.d.ts +5 -0
- package/Badge/styles.js +14 -0
- package/Badge/types.d.ts +8 -0
- package/Banner/Banner.d.ts +3 -0
- package/Banner/Banner.js +82 -0
- package/Banner/colors.d.ts +12 -0
- package/Banner/colors.js +115 -0
- package/Banner/index.d.ts +2 -0
- package/Banner/index.js +1 -0
- package/Banner/maps.d.ts +27 -0
- package/Banner/maps.js +19 -0
- package/Banner/styles.d.ts +29 -0
- package/Banner/styles.js +45 -0
- package/Banner/types.d.ts +20 -0
- package/Button/Button.d.ts +5 -0
- package/Button/Button.js +48 -0
- package/Button/GhostButton.d.ts +1 -0
- package/Button/GhostButton.js +5 -0
- package/Button/colors.d.ts +16 -0
- package/Button/colors.js +130 -0
- package/Button/index.d.ts +3 -0
- package/Button/index.js +2 -0
- package/Button/maps.d.ts +132 -0
- package/Button/maps.js +37 -0
- package/Button/styles.d.ts +120 -0
- package/Button/styles.js +103 -0
- package/Button/types.d.ts +26 -0
- package/CardMetric/CardChildren.d.ts +3 -0
- package/CardMetric/CardChildren.js +25 -0
- package/CardMetric/CardCollapse.d.ts +3 -0
- package/CardMetric/CardCollapse.js +13 -0
- package/CardMetric/CardMetric.d.ts +3 -0
- package/CardMetric/CardMetric.js +62 -0
- package/CardMetric/index.d.ts +2 -0
- package/CardMetric/index.js +1 -0
- package/CardMetric/styles.d.ts +13 -0
- package/CardMetric/styles.js +74 -0
- package/CardMetric/types.d.ts +34 -0
- package/Checkbox/Checkbox.d.ts +3 -0
- package/Checkbox/Checkbox.js +47 -0
- package/Checkbox/index.d.ts +2 -0
- package/Checkbox/index.js +1 -0
- package/Checkbox/maps.d.ts +3 -0
- package/Checkbox/maps.js +7 -0
- package/Checkbox/styles.d.ts +9 -0
- package/Checkbox/styles.js +17 -0
- package/Checkbox/types.d.ts +15 -0
- package/Drawer/Drawer.d.ts +3 -0
- package/Drawer/Drawer.js +62 -0
- package/Drawer/index.d.ts +1 -0
- package/Drawer/index.js +1 -0
- package/Drawer/maps.d.ts +6 -0
- package/Drawer/maps.js +6 -0
- package/Drawer/styles.d.ts +11 -0
- package/Drawer/styles.js +57 -0
- package/Drawer/types.d.ts +18 -0
- package/DropdownMenu/components/DropdownMenu/DropdownMenu.d.ts +3 -0
- package/DropdownMenu/components/DropdownMenu/DropdownMenu.js +27 -0
- package/DropdownMenu/components/DropdownMenu/hooks.d.ts +4 -0
- package/DropdownMenu/components/DropdownMenu/hooks.js +10 -0
- package/DropdownMenu/components/DropdownMenu/index.d.ts +2 -0
- package/DropdownMenu/components/DropdownMenu/index.js +2 -0
- package/DropdownMenu/components/DropdownMenu/types.d.ts +23 -0
- package/DropdownMenu/components/DropdownMenuContainer/DropdownMenuContainer.d.ts +3 -0
- package/DropdownMenu/components/DropdownMenuContainer/DropdownMenuContainer.js +79 -0
- package/DropdownMenu/components/DropdownMenuContainer/index.d.ts +1 -0
- package/DropdownMenu/components/DropdownMenuContainer/index.js +1 -0
- package/DropdownMenu/components/DropdownMenuContainer/maps.d.ts +26 -0
- package/DropdownMenu/components/DropdownMenuContainer/maps.js +11 -0
- package/DropdownMenu/components/DropdownMenuContainer/styles.d.ts +35 -0
- package/DropdownMenu/components/DropdownMenuContainer/styles.js +109 -0
- package/DropdownMenu/components/DropdownMenuContainer/types.d.ts +19 -0
- package/DropdownMenu/components/DropdownMenuGroup/DropdownMenuGroup.d.ts +3 -0
- package/DropdownMenu/components/DropdownMenuGroup/DropdownMenuGroup.js +12 -0
- package/DropdownMenu/components/DropdownMenuGroup/index.d.ts +1 -0
- package/DropdownMenu/components/DropdownMenuGroup/index.js +1 -0
- package/DropdownMenu/components/DropdownMenuGroup/styles.d.ts +1 -0
- package/DropdownMenu/components/DropdownMenuGroup/styles.js +7 -0
- package/DropdownMenu/components/DropdownMenuGroup/types.d.ts +5 -0
- package/DropdownMenu/components/DropdownMenuGroup/types.js +1 -0
- package/DropdownMenu/components/DropdownMenuItem/DropdownMenuItem.d.ts +5 -0
- package/DropdownMenu/components/DropdownMenuItem/DropdownMenuItem.js +38 -0
- package/DropdownMenu/components/DropdownMenuItem/index.d.ts +2 -0
- package/DropdownMenu/components/DropdownMenuItem/index.js +2 -0
- package/DropdownMenu/components/DropdownMenuItem/styles.d.ts +5 -0
- package/DropdownMenu/components/DropdownMenuItem/styles.js +73 -0
- package/DropdownMenu/components/DropdownMenuItem/types.d.ts +24 -0
- package/DropdownMenu/components/DropdownMenuItem/types.js +1 -0
- package/DropdownMenu/components/DropdownMenuItemCheckbox/DropdownMenuItemCheckbox.d.ts +3 -0
- package/DropdownMenu/components/DropdownMenuItemCheckbox/DropdownMenuItemCheckbox.js +9 -0
- package/DropdownMenu/components/DropdownMenuItemCheckbox/index.d.ts +1 -0
- package/DropdownMenu/components/DropdownMenuItemCheckbox/index.js +1 -0
- package/DropdownMenu/components/DropdownMenuItemCheckbox/styles.d.ts +1 -0
- package/DropdownMenu/components/DropdownMenuItemCheckbox/styles.js +8 -0
- package/DropdownMenu/components/DropdownMenuItemPick/DropdownMenuItemPick.d.ts +3 -0
- package/DropdownMenu/components/DropdownMenuItemPick/DropdownMenuItemPick.js +16 -0
- package/DropdownMenu/components/DropdownMenuItemPick/index.d.ts +1 -0
- package/DropdownMenu/components/DropdownMenuItemPick/index.js +1 -0
- package/DropdownMenu/components/DropdownMenuItemPick/styles.d.ts +3 -0
- package/DropdownMenu/components/DropdownMenuItemPick/styles.js +8 -0
- package/DropdownMenu/components/DropdownMenuItemPick/types.d.ts +2 -0
- package/DropdownMenu/components/DropdownMenuItemPick/types.js +1 -0
- package/DropdownMenu/components/DropdownMenuItemRadio/DropdownMenuItemRadio.d.ts +3 -0
- package/DropdownMenu/components/DropdownMenuItemRadio/DropdownMenuItemRadio.js +9 -0
- package/DropdownMenu/components/DropdownMenuItemRadio/index.d.ts +1 -0
- package/DropdownMenu/components/DropdownMenuItemRadio/index.js +1 -0
- package/DropdownMenu/components/DropdownMenuItemRadio/styles.d.ts +1 -0
- package/DropdownMenu/components/DropdownMenuItemRadio/styles.js +8 -0
- package/DropdownMenu/components/DropdownMenuNested/DropdownMenuNested.d.ts +3 -0
- package/DropdownMenu/components/DropdownMenuNested/DropdownMenuNested.js +69 -0
- package/DropdownMenu/components/DropdownMenuNested/index.d.ts +1 -0
- package/DropdownMenu/components/DropdownMenuNested/index.js +1 -0
- package/DropdownMenu/components/DropdownMenuNested/styles.d.ts +8 -0
- package/DropdownMenu/components/DropdownMenuNested/styles.js +35 -0
- package/DropdownMenu/components/DropdownMenuNested/types.d.ts +6 -0
- package/DropdownMenu/components/DropdownMenuNested/types.js +1 -0
- package/DropdownMenu/components/DropdownMenuWindow/DropdownMenuWindow.d.ts +3 -0
- package/DropdownMenu/components/DropdownMenuWindow/DropdownMenuWindow.js +12 -0
- package/DropdownMenu/components/DropdownMenuWindow/index.d.ts +1 -0
- package/DropdownMenu/components/DropdownMenuWindow/index.js +1 -0
- package/DropdownMenu/components/DropdownMenuWindow/styles.d.ts +1 -0
- package/DropdownMenu/components/DropdownMenuWindow/styles.js +7 -0
- package/DropdownMenu/components/DropdownMenuWindow/types.d.ts +5 -0
- package/DropdownMenu/components/DropdownMenuWindow/types.js +1 -0
- package/DropdownMenu/index.d.ts +9 -0
- package/DropdownMenu/index.js +9 -0
- package/EditableField/EditableField.d.ts +3 -0
- package/EditableField/EditableField.js +61 -0
- package/EditableField/index.d.ts +2 -0
- package/EditableField/index.js +1 -0
- package/EditableField/styles.d.ts +8 -0
- package/EditableField/styles.js +25 -0
- package/EditableField/types.d.ts +15 -0
- package/EditableField/types.js +1 -0
- package/EmailTemplatePreview/EmailTemplatePreview.d.ts +3 -11
- package/EmailTemplatePreview/EmailTemplatePreview.js +11 -10
- package/EmailTemplatePreview/components/NoEmailTemplatePreview/NoEmailTemplatePreview.d.ts +2 -2
- package/EmailTemplatePreview/components/NoEmailTemplatePreview/NoEmailTemplatePreview.js +3 -3
- package/EmailTemplatePreview/components/NoEmailTemplatePreview/assets/PW_logo.svg +1 -5
- package/EmailTemplatePreview/components/NoEmailTemplatePreview/{styled.js → styles.js} +2 -2
- package/EmailTemplatePreview/{styled.js → styles.js} +1 -1
- package/EmailTemplatePreview/types.d.ts +8 -0
- package/EmailTemplatePreview/types.js +1 -0
- package/ExportResult/ExportResult.d.ts +2 -2
- package/ExportResult/ExportResult.js +11 -10
- package/ExportResult/{styled.js → styles.js} +5 -5
- package/FieldBox/FieldBox.d.ts +3 -3
- package/FieldBox/FieldBox.js +8 -7
- package/FieldBox/index.d.ts +1 -1
- package/FieldBox/types.js +1 -0
- package/InputFile/InputFile.d.ts +3 -0
- package/InputFile/InputFile.js +88 -0
- package/InputFile/index.d.ts +1 -0
- package/InputFile/index.js +1 -0
- package/InputFile/styles.d.ts +5 -0
- package/InputFile/styles.js +29 -0
- package/InputFile/types.d.ts +25 -0
- package/InputFile/types.js +1 -0
- package/Link/Link.d.ts +5 -0
- package/Link/Link.js +12 -0
- package/Link/index.d.ts +1 -0
- package/Link/index.js +1 -0
- package/Link/styles.d.ts +1 -0
- package/Link/styles.js +7 -0
- package/Link/types.d.ts +21 -0
- package/Link/types.js +1 -0
- package/Modal/components/Modal/Modal.d.ts +3 -0
- package/Modal/components/Modal/Modal.js +51 -0
- package/Modal/components/Modal/index.d.ts +1 -0
- package/Modal/components/Modal/index.js +1 -0
- package/Modal/components/Modal/maps.d.ts +6 -0
- package/Modal/components/Modal/maps.js +6 -0
- package/Modal/components/Modal/styles.d.ts +13 -0
- package/Modal/components/Modal/styles.js +45 -0
- package/Modal/components/Modal/types.d.ts +13 -0
- package/Modal/components/Modal/types.js +1 -0
- package/Modal/components/ModalConfirm/ModalConfirm.d.ts +3 -0
- package/Modal/components/ModalConfirm/ModalConfirm.js +54 -0
- package/Modal/components/ModalConfirm/ModalConfirmProvider.d.ts +4 -0
- package/Modal/components/ModalConfirm/ModalConfirmProvider.js +35 -0
- package/Modal/components/ModalConfirm/hooks.d.ts +2 -0
- package/Modal/components/ModalConfirm/hooks.js +9 -0
- package/Modal/components/ModalConfirm/index.d.ts +3 -0
- package/Modal/components/ModalConfirm/index.js +3 -0
- package/Modal/components/ModalConfirm/types.d.ts +20 -0
- package/Modal/components/ModalConfirm/types.js +1 -0
- package/Modal/components/ModalContent/index.d.ts +1 -0
- package/Modal/components/ModalContent/index.js +1 -0
- package/Modal/components/ModalContent/styled.d.ts +19 -0
- package/Modal/components/ModalContent/styled.js +29 -0
- package/Modal/components/ModalTitle/ModalTitle.d.ts +3 -0
- package/Modal/components/ModalTitle/ModalTitle.js +18 -0
- package/Modal/components/ModalTitle/index.d.ts +1 -0
- package/Modal/components/ModalTitle/index.js +1 -0
- package/Modal/components/ModalTitle/styles.d.ts +1 -0
- package/Modal/components/ModalTitle/styles.js +8 -0
- package/Modal/components/ModalTitle/types.d.ts +5 -0
- package/Modal/components/ModalTitle/types.js +1 -0
- package/Modal/index.d.ts +4 -0
- package/Modal/index.js +4 -0
- package/NumberPicker/NumberPicker.js +2 -2
- package/NumberPicker/{AutosizeInput.d.ts → components/AutosizeInput/AutosizeInput.d.ts} +1 -1
- package/NumberPicker/{AutosizeInput.js → components/AutosizeInput/AutosizeInput.js} +3 -3
- package/NumberPicker/components/AutosizeInput/index.d.ts +1 -0
- package/NumberPicker/components/AutosizeInput/index.js +1 -0
- package/NumberPicker/{AutosizeInput.styled.js → components/AutosizeInput/styles.js} +1 -1
- package/NumberPicker/components/AutosizeInput/types.js +1 -0
- package/NumberPicker/{styled.js → styles.js} +3 -3
- package/PageHeader/components/AutosizeInput/AutosizeInput.d.ts +3 -0
- package/PageHeader/components/AutosizeInput/AutosizeInput.js +80 -0
- package/PageHeader/components/AutosizeInput/constants.d.ts +2 -0
- package/PageHeader/components/AutosizeInput/constants.js +2 -0
- package/PageHeader/components/AutosizeInput/index.d.ts +1 -0
- package/PageHeader/components/AutosizeInput/index.js +1 -0
- package/PageHeader/components/AutosizeInput/styles.d.ts +5 -0
- package/PageHeader/components/AutosizeInput/styles.js +20 -0
- package/PageHeader/components/AutosizeInput/types.d.ts +10 -0
- package/PageHeader/components/AutosizeInput/types.js +1 -0
- package/PageHeader/components/PageHeader/PageHeader.d.ts +3 -0
- package/PageHeader/components/PageHeader/PageHeader.js +51 -0
- package/PageHeader/components/PageHeader/index.d.ts +1 -0
- package/PageHeader/components/PageHeader/index.js +1 -0
- package/PageHeader/components/PageHeader/styles.d.ts +9 -0
- package/PageHeader/components/PageHeader/styles.js +29 -0
- package/PageHeader/components/PageHeader/types.d.ts +15 -0
- package/PageHeader/components/PageHeader/types.js +1 -0
- package/PageHeader/components/PageHeaderEditable/PageHeaderEditable.d.ts +3 -0
- package/PageHeader/components/PageHeaderEditable/PageHeaderEditable.js +67 -0
- package/PageHeader/components/PageHeaderEditable/index.d.ts +1 -0
- package/PageHeader/components/PageHeaderEditable/index.js +1 -0
- package/PageHeader/components/PageHeaderEditable/styles.d.ts +10 -0
- package/PageHeader/components/PageHeaderEditable/styles.js +33 -0
- package/PageHeader/components/PageHeaderEditable/types.d.ts +21 -0
- package/PageHeader/components/PageHeaderEditable/types.js +1 -0
- package/PageHeader/components/PageHeaderError/PageHeaderError.d.ts +3 -0
- package/PageHeader/components/PageHeaderError/PageHeaderError.js +19 -0
- package/PageHeader/components/PageHeaderError/index.d.ts +1 -0
- package/PageHeader/components/PageHeaderError/index.js +1 -0
- package/PageHeader/components/PageHeaderError/styles.d.ts +6 -0
- package/PageHeader/components/PageHeaderError/styles.js +20 -0
- package/PageHeader/components/PageHeaderError/types.d.ts +5 -0
- package/PageHeader/components/PageHeaderError/types.js +1 -0
- package/PageHeader/components/PageHeaderSkeleton/PageHeaderSkeleton.d.ts +2 -0
- package/PageHeader/components/PageHeaderSkeleton/PageHeaderSkeleton.js +20 -0
- package/PageHeader/components/PageHeaderSkeleton/index.d.ts +1 -0
- package/PageHeader/components/PageHeaderSkeleton/index.js +1 -0
- package/PageHeader/components/PageHeaderSkeleton/styles.d.ts +5 -0
- package/PageHeader/components/PageHeaderSkeleton/styles.js +15 -0
- package/PageHeader/index.d.ts +3 -0
- package/PageHeader/index.js +3 -0
- package/Pagination/Pagination.d.ts +3 -0
- package/Pagination/Pagination.js +85 -0
- package/Pagination/helpers.d.ts +1 -0
- package/Pagination/helpers.js +4 -0
- package/Pagination/index.d.ts +1 -0
- package/Pagination/index.js +1 -0
- package/Pagination/styles.d.ts +8 -0
- package/Pagination/styles.js +35 -0
- package/Pagination/types.d.ts +9 -0
- package/Pagination/types.js +1 -0
- package/Popover/Popover.d.ts +3 -0
- package/Popover/Popover.js +44 -0
- package/Popover/index.d.ts +4 -0
- package/Popover/index.js +2 -0
- package/Popover/styles.d.ts +6 -0
- package/Popover/styles.js +19 -0
- package/Popover/types.d.ts +12 -0
- package/Popover/types.js +1 -0
- package/ProgressBar/ProgressBar.d.ts +2 -2
- package/ProgressBar/ProgressBar.js +20 -17
- package/ProgressBar/{styled.js → styles.js} +10 -10
- package/PushPreview/PushPreview.js +4 -4
- package/PushPreview/{styled.js → styles.js} +8 -8
- package/Radio/Radio.d.ts +3 -0
- package/Radio/Radio.js +37 -0
- package/Radio/index.d.ts +2 -0
- package/Radio/index.js +1 -0
- package/Radio/maps.d.ts +3 -0
- package/Radio/maps.js +8 -0
- package/Radio/styled.d.ts +5 -0
- package/Radio/styled.js +13 -0
- package/Radio/types.d.ts +12 -0
- package/Radio/types.js +1 -0
- package/ReCaptcha/ReCaptcha.d.ts +2 -0
- package/ReCaptcha/ReCaptcha.js +8 -0
- package/ReCaptcha/constants.d.ts +3 -0
- package/ReCaptcha/constants.js +4 -0
- package/ReCaptcha/helpers.d.ts +1 -0
- package/ReCaptcha/helpers.js +15 -0
- package/ReCaptcha/hooks.d.ts +2 -0
- package/ReCaptcha/hooks.js +66 -0
- package/ReCaptcha/index.d.ts +3 -0
- package/ReCaptcha/index.js +3 -0
- package/ReCaptcha/styles.d.ts +1 -0
- package/ReCaptcha/styles.js +5 -0
- package/ReCaptcha/types.d.ts +8 -0
- package/ReCaptcha/types.js +1 -0
- package/Skeleton/TextSkeleton.d.ts +3 -0
- package/Skeleton/TextSkeleton.js +16 -0
- package/Skeleton/index.d.ts +2 -0
- package/Skeleton/index.js +2 -0
- package/Skeleton/styles.d.ts +4 -0
- package/Skeleton/styles.js +33 -0
- package/Skeleton/types.d.ts +16 -0
- package/Skeleton/types.js +1 -0
- package/SortButton/SortButton.d.ts +6 -0
- package/SortButton/SortButton.js +33 -0
- package/SortButton/constants.d.ts +2 -0
- package/SortButton/constants.js +1 -0
- package/SortButton/index.d.ts +1 -0
- package/SortButton/index.js +1 -0
- package/SortButton/maps.d.ts +10 -0
- package/SortButton/maps.js +15 -0
- package/SortButton/styles.d.ts +3 -0
- package/SortButton/styles.js +9 -0
- package/SortButton/types.d.ts +14 -0
- package/SortButton/types.js +1 -0
- package/Spinner/Spinner.d.ts +3 -0
- package/Spinner/Spinner.js +20 -0
- package/Spinner/assets/index.d.ts +4 -0
- package/Spinner/assets/index.js +6 -0
- package/Spinner/assets/spinner.medium.svg +1 -0
- package/Spinner/assets/spinner.small.svg +1 -0
- package/Spinner/index.d.ts +2 -0
- package/Spinner/index.js +1 -0
- package/Spinner/maps.d.ts +5 -0
- package/Spinner/maps.js +5 -0
- package/Spinner/styles.d.ts +5 -0
- package/Spinner/styles.js +20 -0
- package/Spinner/types.d.ts +6 -0
- package/Spinner/types.js +1 -0
- package/StatisticCard/StatisticCard.d.ts +2 -2
- package/StatisticCard/StatisticCard.js +16 -15
- package/Switch/Switch.d.ts +3 -0
- package/Switch/Switch.js +23 -0
- package/Switch/index.d.ts +1 -0
- package/Switch/index.js +1 -0
- package/Switch/styles.d.ts +5 -0
- package/Switch/styles.js +62 -0
- package/Switch/types.d.ts +15 -0
- package/Switch/types.js +1 -0
- package/Tabs/{tab/tab.d.ts → components/Tab/Tab.d.ts} +2 -2
- package/Tabs/{tab/tab.js → components/Tab/Tab.js} +2 -2
- package/Tabs/components/Tab/index.d.ts +1 -0
- package/Tabs/components/Tab/index.js +1 -0
- package/Tabs/{tab/tab.types.d.ts → components/Tab/types.d.ts} +1 -1
- package/Tabs/components/Tab/types.js +1 -0
- package/Tabs/{tab-bar/tab-bar.js → components/TabBar/TabBar.js} +2 -2
- package/Tabs/components/TabBar/index.d.ts +1 -0
- package/Tabs/components/TabBar/index.js +1 -0
- package/Tabs/{tab-bar/tab-bar.styles.js → components/TabBar/styles.js} +2 -2
- package/Tabs/components/TabBar/types.js +1 -0
- package/Tabs/{tabs-list-slide-frame/tabs-list-slide-frame.d.ts → components/TabBarScrollableFrame/TabBarScrollableFrame.d.ts} +1 -1
- package/Tabs/{tabs-list-slide-frame/tabs-list-slide-frame.js → components/TabBarScrollableFrame/TabBarScrollableFrame.js} +2 -2
- package/Tabs/components/TabBarScrollableFrame/index.d.ts +1 -0
- package/Tabs/components/TabBarScrollableFrame/index.js +1 -0
- package/Tabs/{tabs-list-slide-frame/tabs-list-slide-frame.styles.js → components/TabBarScrollableFrame/styles.js} +5 -5
- package/Tabs/components/TabBarScrollableFrame/types.js +1 -0
- package/Tabs/{tab-base/tab-base.js → components/TabBase/TabBase.js} +1 -1
- package/Tabs/components/TabBase/index.d.ts +1 -0
- package/Tabs/components/TabBase/index.js +1 -0
- package/Tabs/{tab-base/tab-base.styles.js → components/TabBase/styles.js} +4 -4
- package/Tabs/components/TabBase/types.js +1 -0
- package/Tabs/{tab-panel/tab-panel.d.ts → components/TabPanel/TabPanel.d.ts} +1 -1
- package/Tabs/{tab-panel/tab-panel.js → components/TabPanel/TabPanel.js} +1 -1
- package/Tabs/components/TabPanel/index.d.ts +1 -0
- package/Tabs/components/TabPanel/index.js +1 -0
- package/Tabs/{tab-panel → components/TabPanel}/styles.js +1 -1
- package/Tabs/{tab-panel/tab-panel.types.d.ts → components/TabPanel/types.d.ts} +1 -1
- package/Tabs/components/TabPanel/types.js +1 -0
- package/Tabs/{tabs/tabs.d.ts → components/Tabs/Tabs.d.ts} +1 -1
- package/Tabs/{tabs/tabs.js → components/Tabs/Tabs.js} +1 -1
- package/Tabs/components/Tabs/index.d.ts +1 -0
- package/Tabs/components/Tabs/index.js +1 -0
- package/Tabs/{tabs → components/Tabs}/styles.js +1 -1
- package/Tabs/{tabs/tabs.types.d.ts → components/Tabs/types.d.ts} +1 -1
- package/Tabs/components/Tabs/types.js +1 -0
- package/Tabs/{tabs.context.d.ts → context.d.ts} +1 -1
- package/Tabs/index.d.ts +5 -5
- package/Tabs/index.js +4 -5
- package/Tabs/types.js +1 -0
- package/Toast/Toast.d.ts +3 -0
- package/Toast/Toast.js +62 -0
- package/Toast/ToastProvider.d.ts +4 -0
- package/Toast/ToastProvider.js +45 -0
- package/Toast/constants.d.ts +8 -0
- package/Toast/constants.js +8 -0
- package/Toast/hooks.d.ts +2 -0
- package/Toast/hooks.js +9 -0
- package/Toast/index.d.ts +3 -0
- package/Toast/index.js +3 -0
- package/Toast/styles.d.ts +8 -0
- package/Toast/styles.js +23 -0
- package/Toast/types.d.ts +28 -0
- package/Toast/types.js +1 -0
- package/Tooltip/Tooltip.d.ts +3 -0
- package/Tooltip/Tooltip.js +47 -0
- package/Tooltip/index.d.ts +2 -0
- package/Tooltip/index.js +1 -0
- package/Tooltip/maps.d.ts +48 -0
- package/Tooltip/maps.js +161 -0
- package/Tooltip/styles.d.ts +5 -0
- package/Tooltip/styles.js +22 -0
- package/Tooltip/types.d.ts +14 -0
- package/Tooltip/types.js +1 -0
- package/hooks/index.d.ts +2 -0
- package/hooks/index.js +2 -0
- package/hooks/useElementWidth.d.ts +11 -0
- package/hooks/useElementWidth.js +27 -0
- package/hooks/useOnClickOutside.d.ts +4 -0
- package/hooks/useOnClickOutside.js +23 -0
- package/index.d.ts +24 -3
- package/index.js +22 -1
- package/package.json +6 -5
- package/Tabs/tab/index.d.ts +0 -2
- package/Tabs/tab/index.js +0 -2
- package/Tabs/tab-bar/index.d.ts +0 -2
- package/Tabs/tab-bar/index.js +0 -2
- package/Tabs/tab-base/index.d.ts +0 -3
- package/Tabs/tab-base/index.js +0 -3
- package/Tabs/tab-panel/index.d.ts +0 -2
- package/Tabs/tab-panel/index.js +0 -2
- package/Tabs/tabs/index.d.ts +0 -2
- package/Tabs/tabs/index.js +0 -2
- package/Tabs/tabs-list-slide-frame/index.d.ts +0 -3
- package/Tabs/tabs-list-slide-frame/index.js +0 -3
- package/{FieldBox/FieldBox.types.js → ActionsGroup/types.js} +0 -0
- package/{NumberPicker/AutosizeInput.types.js → Badge/types.js} +0 -0
- package/{Tabs/tab-bar/tab-bar.types.js → Banner/types.js} +0 -0
- package/{Tabs/tab-base/tab-base.types.js → Button/types.js} +0 -0
- package/{Tabs/tab-panel/tab-panel.types.js → CardMetric/types.js} +0 -0
- package/{Tabs/tab/tab.types.js → Checkbox/types.js} +0 -0
- package/{Tabs/tabs-list-slide-frame/tabs-list-slide-frame.types.js → Drawer/types.js} +0 -0
- package/{Tabs/tabs.types.js → DropdownMenu/components/DropdownMenu/types.js} +0 -0
- package/{Tabs/tabs/tabs.types.js → DropdownMenu/components/DropdownMenuContainer/types.js} +0 -0
- package/EmailTemplatePreview/components/NoEmailTemplatePreview/{styled.d.ts → styles.d.ts} +0 -0
- package/EmailTemplatePreview/{styled.d.ts → styles.d.ts} +0 -0
- package/ExportResult/{styled.d.ts → styles.d.ts} +0 -0
- package/FieldBox/{FieldBox.types.d.ts → types.d.ts} +0 -0
- package/NumberPicker/{AutosizeInput.constants.d.ts → components/AutosizeInput/constants.d.ts} +0 -0
- package/NumberPicker/{AutosizeInput.constants.js → components/AutosizeInput/constants.js} +0 -0
- package/NumberPicker/{AutosizeInput.styled.d.ts → components/AutosizeInput/styles.d.ts} +0 -0
- package/NumberPicker/{AutosizeInput.types.d.ts → components/AutosizeInput/types.d.ts} +0 -0
- package/NumberPicker/{styled.d.ts → styles.d.ts} +0 -0
- package/ProgressBar/{styled.d.ts → styles.d.ts} +0 -0
- package/PushPreview/{constants/urls.d.ts → constants.d.ts} +0 -0
- package/PushPreview/{constants/urls.js → constants.js} +0 -0
- package/PushPreview/{helpers/helpers.d.ts → helpers.d.ts} +0 -0
- package/PushPreview/{helpers/helpers.js → helpers.js} +0 -0
- package/PushPreview/{styled.d.ts → styles.d.ts} +0 -0
- package/Tabs/{tab-bar/tab-bar.d.ts → components/TabBar/TabBar.d.ts} +0 -0
- package/Tabs/{tab-bar/tab-bar.styles.d.ts → components/TabBar/styles.d.ts} +0 -0
- package/Tabs/{tab-bar/tab-bar.types.d.ts → components/TabBar/types.d.ts} +0 -0
- package/Tabs/{tabs-list-slide-frame/tabs-list-slide-frame.styles.d.ts → components/TabBarScrollableFrame/styles.d.ts} +0 -0
- package/Tabs/{tabs-list-slide-frame/tabs-list-slide-frame.types.d.ts → components/TabBarScrollableFrame/types.d.ts} +0 -0
- package/Tabs/{tab-base/tab-base.d.ts → components/TabBase/TabBase.d.ts} +1 -1
- package/Tabs/{tab-base/tab-base.styles.d.ts → components/TabBase/styles.d.ts} +0 -0
- package/Tabs/{tab-base/tab-base.types.d.ts → components/TabBase/types.d.ts} +1 -1
- /package/Tabs/{tab-panel → components/TabPanel}/styles.d.ts +0 -0
- /package/Tabs/{tabs → components/Tabs}/styles.d.ts +0 -0
- /package/Tabs/{tabs.context.js → context.js} +0 -0
- /package/Tabs/{tabs.helpers.d.ts → helpers.d.ts} +0 -0
- /package/Tabs/{tabs.helpers.js → helpers.js} +0 -0
- /package/Tabs/{tabs.types.d.ts → types.d.ts} +0 -0
package/Button/colors.js
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { css } from 'styled-components';
|
|
2
|
+
import { Color } from '@pushwoosh/kit-constants';
|
|
3
|
+
export const colors = {
|
|
4
|
+
primary: {
|
|
5
|
+
shape: {
|
|
6
|
+
base: {
|
|
7
|
+
color: `var(--primary-shape-base-color, ${Color.CLEAR})`,
|
|
8
|
+
bgColor: `var(--primary-shape-base-bg-color, ${Color.PRIMARY})`
|
|
9
|
+
},
|
|
10
|
+
disabled: {
|
|
11
|
+
bgColor: `var(--primary-shape-disabled-bg-color, ${Color.LOCKED})`
|
|
12
|
+
},
|
|
13
|
+
hover: {
|
|
14
|
+
bgColor: `var(--primary-shape-hover-bg-color, ${Color.PRIMARY_HOVER})`
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
ghost: {
|
|
18
|
+
base: {
|
|
19
|
+
color: `var(--primary-ghost-base-color, ${Color.PRIMARY})`,
|
|
20
|
+
bgColor: 'var(--primary-ghost-base-bg-color, transparent)'
|
|
21
|
+
},
|
|
22
|
+
disabled: {
|
|
23
|
+
color: `var(--primary-ghost-disabled-color, ${Color.LOCKED})`
|
|
24
|
+
},
|
|
25
|
+
hover: {
|
|
26
|
+
color: `var(--primary-ghost-hover-color, ${Color.PRIMARY_HOVER})`,
|
|
27
|
+
bgColor: `var(--primary-ghost-hover-bg-color, ${Color.BRIGHT_LIGHT})`
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
secondary: {
|
|
32
|
+
shape: {
|
|
33
|
+
base: {
|
|
34
|
+
color: `var(--secondary-shape-base-color, ${Color.MAIN})`,
|
|
35
|
+
bgColor: `var(--secondary-shape-base-bg-color, ${Color.FROZEN})`,
|
|
36
|
+
borderColor: `var(--secondary-shape-base-border-color, ${Color.FORM})`
|
|
37
|
+
},
|
|
38
|
+
disabled: {
|
|
39
|
+
color: `var(--secondary-shape-disabled-color, ${Color.LOCKED})`
|
|
40
|
+
},
|
|
41
|
+
hover: {
|
|
42
|
+
color: `var(--secondary-shape-hover-color, ${Color.PRIMARY_HOVER})`,
|
|
43
|
+
bgColor: `var(--secondary-shape-hover-bg-color, ${Color.BRIGHT_LIGHT})`,
|
|
44
|
+
borderColor: 'var(--secondary-shape-hover-border-color, #005EFF24)'
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
ghost: {
|
|
48
|
+
base: {
|
|
49
|
+
color: `var(--secondary-ghost-base-color, ${Color.MAIN})`,
|
|
50
|
+
bgColor: 'var(--secondary-ghost-base-bg-color, transparent)'
|
|
51
|
+
},
|
|
52
|
+
disabled: {
|
|
53
|
+
color: `var(--secondary-ghost-disabled-color, ${Color.LOCKED})`
|
|
54
|
+
},
|
|
55
|
+
hover: {
|
|
56
|
+
color: `var(--secondary-ghost-hover-color, ${Color.PRIMARY_HOVER})`,
|
|
57
|
+
bgColor: `var(--secondary-ghost-hover-bg-color, ${Color.BRIGHT_LIGHT})`
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
danger: {
|
|
62
|
+
shape: {
|
|
63
|
+
base: {
|
|
64
|
+
color: `var(--danger-shape-base-color, ${Color.CLEAR})`,
|
|
65
|
+
bgColor: `var(--danger-shape-base-bg-color, ${Color.DANGER})`
|
|
66
|
+
},
|
|
67
|
+
disabled: {
|
|
68
|
+
color: `var(--danger-shape-disabled-color, ${Color.LOCKED})`
|
|
69
|
+
},
|
|
70
|
+
hover: {
|
|
71
|
+
bgColor: `var(--danger-shape-hover-bg-color, ${Color.DANGER_HOVER})`
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
ghost: {
|
|
75
|
+
base: {
|
|
76
|
+
color: `var(--danger-ghost-base-color, ${Color.DANGER})`,
|
|
77
|
+
bgColor: 'var(--danger-ghost-base-bg-color, transparent)'
|
|
78
|
+
},
|
|
79
|
+
disabled: {
|
|
80
|
+
color: `var(--danger-ghost-disabled-color, ${Color.LOCKED})`
|
|
81
|
+
},
|
|
82
|
+
hover: {
|
|
83
|
+
color: `var(--danger-ghost-hover-color, ${Color.DANGER_HOVER})`,
|
|
84
|
+
bgColor: `var(--danger-ghost-hover-bg-color, ${Color.DANGER_LIGHT})`
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
export function createColors(buttonColors) {
|
|
90
|
+
const base = {
|
|
91
|
+
borderColor: 'transparent',
|
|
92
|
+
...buttonColors.base
|
|
93
|
+
};
|
|
94
|
+
const disabled = {
|
|
95
|
+
...base,
|
|
96
|
+
...buttonColors.disabled
|
|
97
|
+
};
|
|
98
|
+
const hover = {
|
|
99
|
+
...base,
|
|
100
|
+
...buttonColors.hover
|
|
101
|
+
};
|
|
102
|
+
const hoverCss = css(["&:hover:not([disabled]){color:", ";background-color:", ";border-color:", ";}"], hover.color, hover.bgColor, hover.borderColor);
|
|
103
|
+
return css(["color:", ";background-color:", ";border-color:", ";&:disabled{color:", ";background-color:", ";border-color:", ";}", " &:active:not([disabled]){color:", ";background-color:", ";border-color:", ";opacity:0.5;}"], ({
|
|
104
|
+
$isOpen,
|
|
105
|
+
$isDisabled
|
|
106
|
+
}) => {
|
|
107
|
+
if ($isOpen) {
|
|
108
|
+
return Color.CLEAR;
|
|
109
|
+
}
|
|
110
|
+
return $isDisabled ? disabled.color : base.color;
|
|
111
|
+
}, ({
|
|
112
|
+
$isOpen,
|
|
113
|
+
$isDisabled
|
|
114
|
+
}) => {
|
|
115
|
+
if ($isOpen) {
|
|
116
|
+
return Color.MAIN;
|
|
117
|
+
}
|
|
118
|
+
return $isDisabled ? disabled.color : base.bgColor;
|
|
119
|
+
}, ({
|
|
120
|
+
$isOpen,
|
|
121
|
+
$isDisabled
|
|
122
|
+
}) => {
|
|
123
|
+
if ($isOpen) {
|
|
124
|
+
return Color.MAIN;
|
|
125
|
+
}
|
|
126
|
+
return $isDisabled ? disabled.color : base.bgColor;
|
|
127
|
+
}, disabled.color, disabled.bgColor, disabled.borderColor, ({
|
|
128
|
+
$isOpen
|
|
129
|
+
}) => $isOpen ? '' : hoverCss /* sc-custom "display: none;" */, hover.color, hover.bgColor, hover.borderColor);
|
|
130
|
+
}
|
package/Button/index.js
ADDED
package/Button/maps.d.ts
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
export declare const SpinnerSizeByButtonSizeMap: {
|
|
2
|
+
compact: "small";
|
|
3
|
+
field: "medium";
|
|
4
|
+
};
|
|
5
|
+
export declare const ButtonPropsToButtonBoxMap: {
|
|
6
|
+
readonly danger: {
|
|
7
|
+
readonly shape: {
|
|
8
|
+
readonly field: import("styled-components").StyledComponent<"button", any, {
|
|
9
|
+
$isDisabled?: boolean;
|
|
10
|
+
$isLoading?: boolean;
|
|
11
|
+
$isOpen?: boolean;
|
|
12
|
+
$hideContent?: boolean;
|
|
13
|
+
$hasLeftIcon?: boolean;
|
|
14
|
+
$hasRightIcon?: boolean;
|
|
15
|
+
$hasContent?: boolean;
|
|
16
|
+
}, never>;
|
|
17
|
+
readonly compact: import("styled-components").StyledComponent<"button", any, {
|
|
18
|
+
$isDisabled?: boolean;
|
|
19
|
+
$isLoading?: boolean;
|
|
20
|
+
$isOpen?: boolean;
|
|
21
|
+
$hideContent?: boolean;
|
|
22
|
+
$hasLeftIcon?: boolean;
|
|
23
|
+
$hasRightIcon?: boolean;
|
|
24
|
+
$hasContent?: boolean;
|
|
25
|
+
}, never>;
|
|
26
|
+
};
|
|
27
|
+
readonly ghost: {
|
|
28
|
+
readonly field: import("styled-components").StyledComponent<"button", any, {
|
|
29
|
+
$isDisabled?: boolean;
|
|
30
|
+
$isLoading?: boolean;
|
|
31
|
+
$isOpen?: boolean;
|
|
32
|
+
$hideContent?: boolean;
|
|
33
|
+
$hasLeftIcon?: boolean;
|
|
34
|
+
$hasRightIcon?: boolean;
|
|
35
|
+
$hasContent?: boolean;
|
|
36
|
+
}, never>;
|
|
37
|
+
readonly compact: import("styled-components").StyledComponent<"button", any, {
|
|
38
|
+
$isDisabled?: boolean;
|
|
39
|
+
$isLoading?: boolean;
|
|
40
|
+
$isOpen?: boolean;
|
|
41
|
+
$hideContent?: boolean;
|
|
42
|
+
$hasLeftIcon?: boolean;
|
|
43
|
+
$hasRightIcon?: boolean;
|
|
44
|
+
$hasContent?: boolean;
|
|
45
|
+
}, never>;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
readonly primary: {
|
|
49
|
+
readonly shape: {
|
|
50
|
+
readonly field: import("styled-components").StyledComponent<"button", any, {
|
|
51
|
+
$isDisabled?: boolean;
|
|
52
|
+
$isLoading?: boolean;
|
|
53
|
+
$isOpen?: boolean;
|
|
54
|
+
$hideContent?: boolean;
|
|
55
|
+
$hasLeftIcon?: boolean;
|
|
56
|
+
$hasRightIcon?: boolean;
|
|
57
|
+
$hasContent?: boolean;
|
|
58
|
+
}, never>;
|
|
59
|
+
readonly compact: import("styled-components").StyledComponent<"button", any, {
|
|
60
|
+
$isDisabled?: boolean;
|
|
61
|
+
$isLoading?: boolean;
|
|
62
|
+
$isOpen?: boolean;
|
|
63
|
+
$hideContent?: boolean;
|
|
64
|
+
$hasLeftIcon?: boolean;
|
|
65
|
+
$hasRightIcon?: boolean;
|
|
66
|
+
$hasContent?: boolean;
|
|
67
|
+
}, never>;
|
|
68
|
+
};
|
|
69
|
+
readonly ghost: {
|
|
70
|
+
readonly field: import("styled-components").StyledComponent<"button", any, {
|
|
71
|
+
$isDisabled?: boolean;
|
|
72
|
+
$isLoading?: boolean;
|
|
73
|
+
$isOpen?: boolean;
|
|
74
|
+
$hideContent?: boolean;
|
|
75
|
+
$hasLeftIcon?: boolean;
|
|
76
|
+
$hasRightIcon?: boolean;
|
|
77
|
+
$hasContent?: boolean;
|
|
78
|
+
}, never>;
|
|
79
|
+
readonly compact: import("styled-components").StyledComponent<"button", any, {
|
|
80
|
+
$isDisabled?: boolean;
|
|
81
|
+
$isLoading?: boolean;
|
|
82
|
+
$isOpen?: boolean;
|
|
83
|
+
$hideContent?: boolean;
|
|
84
|
+
$hasLeftIcon?: boolean;
|
|
85
|
+
$hasRightIcon?: boolean;
|
|
86
|
+
$hasContent?: boolean;
|
|
87
|
+
}, never>;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
readonly secondary: {
|
|
91
|
+
readonly shape: {
|
|
92
|
+
readonly field: import("styled-components").StyledComponent<"button", any, {
|
|
93
|
+
$isDisabled?: boolean;
|
|
94
|
+
$isLoading?: boolean;
|
|
95
|
+
$isOpen?: boolean;
|
|
96
|
+
$hideContent?: boolean;
|
|
97
|
+
$hasLeftIcon?: boolean;
|
|
98
|
+
$hasRightIcon?: boolean;
|
|
99
|
+
$hasContent?: boolean;
|
|
100
|
+
}, never>;
|
|
101
|
+
readonly compact: import("styled-components").StyledComponent<"button", any, {
|
|
102
|
+
$isDisabled?: boolean;
|
|
103
|
+
$isLoading?: boolean;
|
|
104
|
+
$isOpen?: boolean;
|
|
105
|
+
$hideContent?: boolean;
|
|
106
|
+
$hasLeftIcon?: boolean;
|
|
107
|
+
$hasRightIcon?: boolean;
|
|
108
|
+
$hasContent?: boolean;
|
|
109
|
+
}, never>;
|
|
110
|
+
};
|
|
111
|
+
readonly ghost: {
|
|
112
|
+
readonly field: import("styled-components").StyledComponent<"button", any, {
|
|
113
|
+
$isDisabled?: boolean;
|
|
114
|
+
$isLoading?: boolean;
|
|
115
|
+
$isOpen?: boolean;
|
|
116
|
+
$hideContent?: boolean;
|
|
117
|
+
$hasLeftIcon?: boolean;
|
|
118
|
+
$hasRightIcon?: boolean;
|
|
119
|
+
$hasContent?: boolean;
|
|
120
|
+
}, never>;
|
|
121
|
+
readonly compact: import("styled-components").StyledComponent<"button", any, {
|
|
122
|
+
$isDisabled?: boolean;
|
|
123
|
+
$isLoading?: boolean;
|
|
124
|
+
$isOpen?: boolean;
|
|
125
|
+
$hideContent?: boolean;
|
|
126
|
+
$hasLeftIcon?: boolean;
|
|
127
|
+
$hasRightIcon?: boolean;
|
|
128
|
+
$hasContent?: boolean;
|
|
129
|
+
}, never>;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
};
|
package/Button/maps.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ButtonBoxDangerShapeCompact, ButtonBoxDangerGhostCompact, ButtonBoxDangerShapeField, ButtonBoxDangerGhostField, ButtonBoxPrimaryShapeCompact, ButtonBoxPrimaryGhostCompact, ButtonBoxPrimaryShapeField, ButtonBoxPrimaryGhostField, ButtonBoxSecondaryShapeCompact, ButtonBoxSecondaryGhostCompact, ButtonBoxSecondaryShapeField, ButtonBoxSecondaryGhostField } from './styles';
|
|
2
|
+
export const SpinnerSizeByButtonSizeMap = {
|
|
3
|
+
compact: 'small',
|
|
4
|
+
field: 'medium'
|
|
5
|
+
};
|
|
6
|
+
export const ButtonPropsToButtonBoxMap = {
|
|
7
|
+
danger: {
|
|
8
|
+
shape: {
|
|
9
|
+
field: ButtonBoxDangerShapeField,
|
|
10
|
+
compact: ButtonBoxDangerShapeCompact
|
|
11
|
+
},
|
|
12
|
+
ghost: {
|
|
13
|
+
field: ButtonBoxDangerGhostField,
|
|
14
|
+
compact: ButtonBoxDangerGhostCompact
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
primary: {
|
|
18
|
+
shape: {
|
|
19
|
+
field: ButtonBoxPrimaryShapeField,
|
|
20
|
+
compact: ButtonBoxPrimaryShapeCompact
|
|
21
|
+
},
|
|
22
|
+
ghost: {
|
|
23
|
+
field: ButtonBoxPrimaryGhostField,
|
|
24
|
+
compact: ButtonBoxPrimaryGhostCompact
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
secondary: {
|
|
28
|
+
shape: {
|
|
29
|
+
field: ButtonBoxSecondaryShapeField,
|
|
30
|
+
compact: ButtonBoxSecondaryShapeCompact
|
|
31
|
+
},
|
|
32
|
+
ghost: {
|
|
33
|
+
field: ButtonBoxSecondaryGhostField,
|
|
34
|
+
compact: ButtonBoxSecondaryGhostCompact
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
export declare const ButtonIcon: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const ButtonContent: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const ButtonSpinner: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
+
export declare const ButtonBox: import("styled-components").StyledComponent<"button", any, {
|
|
5
|
+
$isDisabled?: boolean;
|
|
6
|
+
$isLoading?: boolean;
|
|
7
|
+
$isOpen?: boolean;
|
|
8
|
+
$hideContent?: boolean;
|
|
9
|
+
$hasLeftIcon?: boolean;
|
|
10
|
+
$hasRightIcon?: boolean;
|
|
11
|
+
$hasContent?: boolean;
|
|
12
|
+
}, never>;
|
|
13
|
+
export declare const ButtonBoxDangerGhostCompact: import("styled-components").StyledComponent<"button", any, {
|
|
14
|
+
$isDisabled?: boolean;
|
|
15
|
+
$isLoading?: boolean;
|
|
16
|
+
$isOpen?: boolean;
|
|
17
|
+
$hideContent?: boolean;
|
|
18
|
+
$hasLeftIcon?: boolean;
|
|
19
|
+
$hasRightIcon?: boolean;
|
|
20
|
+
$hasContent?: boolean;
|
|
21
|
+
}, never>;
|
|
22
|
+
export declare const ButtonBoxDangerGhostField: import("styled-components").StyledComponent<"button", any, {
|
|
23
|
+
$isDisabled?: boolean;
|
|
24
|
+
$isLoading?: boolean;
|
|
25
|
+
$isOpen?: boolean;
|
|
26
|
+
$hideContent?: boolean;
|
|
27
|
+
$hasLeftIcon?: boolean;
|
|
28
|
+
$hasRightIcon?: boolean;
|
|
29
|
+
$hasContent?: boolean;
|
|
30
|
+
}, never>;
|
|
31
|
+
export declare const ButtonBoxDangerShapeCompact: import("styled-components").StyledComponent<"button", any, {
|
|
32
|
+
$isDisabled?: boolean;
|
|
33
|
+
$isLoading?: boolean;
|
|
34
|
+
$isOpen?: boolean;
|
|
35
|
+
$hideContent?: boolean;
|
|
36
|
+
$hasLeftIcon?: boolean;
|
|
37
|
+
$hasRightIcon?: boolean;
|
|
38
|
+
$hasContent?: boolean;
|
|
39
|
+
}, never>;
|
|
40
|
+
export declare const ButtonBoxDangerShapeField: import("styled-components").StyledComponent<"button", any, {
|
|
41
|
+
$isDisabled?: boolean;
|
|
42
|
+
$isLoading?: boolean;
|
|
43
|
+
$isOpen?: boolean;
|
|
44
|
+
$hideContent?: boolean;
|
|
45
|
+
$hasLeftIcon?: boolean;
|
|
46
|
+
$hasRightIcon?: boolean;
|
|
47
|
+
$hasContent?: boolean;
|
|
48
|
+
}, never>;
|
|
49
|
+
export declare const ButtonBoxPrimaryShapeCompact: import("styled-components").StyledComponent<"button", any, {
|
|
50
|
+
$isDisabled?: boolean;
|
|
51
|
+
$isLoading?: boolean;
|
|
52
|
+
$isOpen?: boolean;
|
|
53
|
+
$hideContent?: boolean;
|
|
54
|
+
$hasLeftIcon?: boolean;
|
|
55
|
+
$hasRightIcon?: boolean;
|
|
56
|
+
$hasContent?: boolean;
|
|
57
|
+
}, never>;
|
|
58
|
+
export declare const ButtonBoxPrimaryShapeField: import("styled-components").StyledComponent<"button", any, {
|
|
59
|
+
$isDisabled?: boolean;
|
|
60
|
+
$isLoading?: boolean;
|
|
61
|
+
$isOpen?: boolean;
|
|
62
|
+
$hideContent?: boolean;
|
|
63
|
+
$hasLeftIcon?: boolean;
|
|
64
|
+
$hasRightIcon?: boolean;
|
|
65
|
+
$hasContent?: boolean;
|
|
66
|
+
}, never>;
|
|
67
|
+
export declare const ButtonBoxPrimaryGhostCompact: import("styled-components").StyledComponent<"button", any, {
|
|
68
|
+
$isDisabled?: boolean;
|
|
69
|
+
$isLoading?: boolean;
|
|
70
|
+
$isOpen?: boolean;
|
|
71
|
+
$hideContent?: boolean;
|
|
72
|
+
$hasLeftIcon?: boolean;
|
|
73
|
+
$hasRightIcon?: boolean;
|
|
74
|
+
$hasContent?: boolean;
|
|
75
|
+
}, never>;
|
|
76
|
+
export declare const ButtonBoxPrimaryGhostField: import("styled-components").StyledComponent<"button", any, {
|
|
77
|
+
$isDisabled?: boolean;
|
|
78
|
+
$isLoading?: boolean;
|
|
79
|
+
$isOpen?: boolean;
|
|
80
|
+
$hideContent?: boolean;
|
|
81
|
+
$hasLeftIcon?: boolean;
|
|
82
|
+
$hasRightIcon?: boolean;
|
|
83
|
+
$hasContent?: boolean;
|
|
84
|
+
}, never>;
|
|
85
|
+
export declare const ButtonBoxSecondaryGhostCompact: import("styled-components").StyledComponent<"button", any, {
|
|
86
|
+
$isDisabled?: boolean;
|
|
87
|
+
$isLoading?: boolean;
|
|
88
|
+
$isOpen?: boolean;
|
|
89
|
+
$hideContent?: boolean;
|
|
90
|
+
$hasLeftIcon?: boolean;
|
|
91
|
+
$hasRightIcon?: boolean;
|
|
92
|
+
$hasContent?: boolean;
|
|
93
|
+
}, never>;
|
|
94
|
+
export declare const ButtonBoxSecondaryGhostField: import("styled-components").StyledComponent<"button", any, {
|
|
95
|
+
$isDisabled?: boolean;
|
|
96
|
+
$isLoading?: boolean;
|
|
97
|
+
$isOpen?: boolean;
|
|
98
|
+
$hideContent?: boolean;
|
|
99
|
+
$hasLeftIcon?: boolean;
|
|
100
|
+
$hasRightIcon?: boolean;
|
|
101
|
+
$hasContent?: boolean;
|
|
102
|
+
}, never>;
|
|
103
|
+
export declare const ButtonBoxSecondaryShapeCompact: import("styled-components").StyledComponent<"button", any, {
|
|
104
|
+
$isDisabled?: boolean;
|
|
105
|
+
$isLoading?: boolean;
|
|
106
|
+
$isOpen?: boolean;
|
|
107
|
+
$hideContent?: boolean;
|
|
108
|
+
$hasLeftIcon?: boolean;
|
|
109
|
+
$hasRightIcon?: boolean;
|
|
110
|
+
$hasContent?: boolean;
|
|
111
|
+
}, never>;
|
|
112
|
+
export declare const ButtonBoxSecondaryShapeField: import("styled-components").StyledComponent<"button", any, {
|
|
113
|
+
$isDisabled?: boolean;
|
|
114
|
+
$isLoading?: boolean;
|
|
115
|
+
$isOpen?: boolean;
|
|
116
|
+
$hideContent?: boolean;
|
|
117
|
+
$hasLeftIcon?: boolean;
|
|
118
|
+
$hasRightIcon?: boolean;
|
|
119
|
+
$hasContent?: boolean;
|
|
120
|
+
}, never>;
|
package/Button/styles.js
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { Color, FontSize, LineHeight, Spacing, ShapeRadius, FontWeight, UnitSize } from '@pushwoosh/kit-constants';
|
|
3
|
+
import { colors, createColors } from './colors';
|
|
4
|
+
export const ButtonIcon = styled.div.withConfig({
|
|
5
|
+
displayName: "ButtonIcon",
|
|
6
|
+
componentId: "sc-qltvdl-0"
|
|
7
|
+
})(["flex:0 0 auto;"]);
|
|
8
|
+
export const ButtonContent = styled.div.withConfig({
|
|
9
|
+
displayName: "ButtonContent",
|
|
10
|
+
componentId: "sc-qltvdl-1"
|
|
11
|
+
})(["display:grid;justify-content:start;& > div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}&:first-child{justify-content:center;}&:first-child:last-child{padding-left:", ";padding-right:", ";}&:last-child:not(:first-child){padding-right:", ";}"], Spacing.S2, Spacing.S2, Spacing.S2);
|
|
12
|
+
export const ButtonSpinner = styled.div.withConfig({
|
|
13
|
+
displayName: "ButtonSpinner",
|
|
14
|
+
componentId: "sc-qltvdl-2"
|
|
15
|
+
})(["position:absolute;top:0;left:0;right:0;bottom:0;display:flex;flex-wrap:nowrap;align-items:center;justify-content:center;"]);
|
|
16
|
+
export const ButtonBox = styled.button.withConfig({
|
|
17
|
+
displayName: "ButtonBox",
|
|
18
|
+
componentId: "sc-qltvdl-3"
|
|
19
|
+
})(["position:relative;display:inline-grid;grid-template-columns:", ";gap:", ";align-items:center;appearance:none !important;border:1px solid transparent;border-radius:", ";font-size:", ";line-height:", ";text-decoration:none;cursor:", ";user-select:none;&:hover{text-decoration:none;}&:focus{outline:none;}&:active{pointer-events:", ";}& ", "{opacity:", ";}"], props => `${props.$hasLeftIcon ? 'auto ' : ''}${props.$hasContent ? '1fr' : ''}${props.$hasRightIcon ? ' auto' : ''}`, Spacing.S1, ShapeRadius.CONTROL, FontSize.REGULAR, LineHeight.REGULAR, props => props.$isDisabled || props.$isLoading ? 'not-allowed!important' : 'pointer', props => props.$isDisabled || props.$isLoading ? 'none' : 'auto', /* sc-selector */ButtonContent, ({
|
|
20
|
+
$hideContent,
|
|
21
|
+
$isLoading
|
|
22
|
+
}) => {
|
|
23
|
+
if ($hideContent) {
|
|
24
|
+
return 0;
|
|
25
|
+
}
|
|
26
|
+
return $isLoading ? 0.5 : 1;
|
|
27
|
+
});
|
|
28
|
+
// danger ghost --------------
|
|
29
|
+
const dangerGhostColors = createColors(colors.danger.ghost);
|
|
30
|
+
export const ButtonBoxDangerGhostCompact = styled(ButtonBox).withConfig({
|
|
31
|
+
displayName: "ButtonBoxDangerGhostCompact",
|
|
32
|
+
componentId: "sc-qltvdl-4"
|
|
33
|
+
})(["height:16px;padding:0;font-size:", ";font-weight:", ";text-transform:uppercase;& ", "{padding:0;}& ", " + ", "{padding:0 0 0 ", ";}", ";--danger-ghost-hover-bg-color:transparent;"], FontSize.SMALL, FontWeight.BOLD, /* sc-selector */ButtonContent, /* sc-selector */ButtonIcon, /* sc-selector */ButtonContent, Spacing.S1, /* sc-custom "display: none;" */dangerGhostColors);
|
|
34
|
+
export const ButtonBoxDangerGhostField = styled(ButtonBox).withConfig({
|
|
35
|
+
displayName: "ButtonBoxDangerGhostField",
|
|
36
|
+
componentId: "sc-qltvdl-5"
|
|
37
|
+
})(["height:", ";padding:0 calc(", " - 1px);font-weight:", ";", ";"], UnitSize.FIELD_HEIGHT, Spacing.S2, FontWeight.MEDIUM, /* sc-custom "display: none;" */dangerGhostColors);
|
|
38
|
+
// danger shape --------------
|
|
39
|
+
const dangerShapeColors = createColors(colors.danger.shape);
|
|
40
|
+
export const ButtonBoxDangerShapeCompact = styled(ButtonBox).withConfig({
|
|
41
|
+
displayName: "ButtonBoxDangerShapeCompact",
|
|
42
|
+
componentId: "sc-qltvdl-6"
|
|
43
|
+
})(["height:28px;padding:0 calc(", " - 1px);font-size:", ";font-weight:", ";text-transform:uppercase;", ";"], Spacing.S2, FontSize.SMALL, FontWeight.BOLD, /* sc-custom "display: none;" */dangerShapeColors);
|
|
44
|
+
export const ButtonBoxDangerShapeField = styled(ButtonBox).withConfig({
|
|
45
|
+
displayName: "ButtonBoxDangerShapeField",
|
|
46
|
+
componentId: "sc-qltvdl-7"
|
|
47
|
+
})(["height:", ";padding:0 calc(", " - 1px);font-weight:", ";", ";"], UnitSize.FIELD_HEIGHT, Spacing.S2, FontWeight.MEDIUM, /* sc-custom "display: none;" */dangerShapeColors);
|
|
48
|
+
// primary shape --------------
|
|
49
|
+
const primaryShapeColors = createColors(colors.primary.shape);
|
|
50
|
+
export const ButtonBoxPrimaryShapeCompact = styled(ButtonBox).withConfig({
|
|
51
|
+
displayName: "ButtonBoxPrimaryShapeCompact",
|
|
52
|
+
componentId: "sc-qltvdl-8"
|
|
53
|
+
})(["height:28px;padding:0 calc(", " - 1px);font-size:", ";font-weight:", ";text-transform:uppercase;", ";"], Spacing.S2, FontSize.SMALL, FontWeight.BOLD, /* sc-custom "display: none;" */primaryShapeColors);
|
|
54
|
+
export const ButtonBoxPrimaryShapeField = styled(ButtonBox).withConfig({
|
|
55
|
+
displayName: "ButtonBoxPrimaryShapeField",
|
|
56
|
+
componentId: "sc-qltvdl-9"
|
|
57
|
+
})(["height:", ";padding:0 calc(", " - 1px);font-weight:", ";", ";"], UnitSize.FIELD_HEIGHT, Spacing.S2, FontWeight.MEDIUM, /* sc-custom "display: none;" */primaryShapeColors);
|
|
58
|
+
// primary ghost --------------
|
|
59
|
+
const primaryGhostColors = createColors(colors.primary.ghost);
|
|
60
|
+
export const ButtonBoxPrimaryGhostCompact = styled(ButtonBox).withConfig({
|
|
61
|
+
displayName: "ButtonBoxPrimaryGhostCompact",
|
|
62
|
+
componentId: "sc-qltvdl-10"
|
|
63
|
+
})(["height:16px;padding:0;font-size:", ";font-weight:", ";text-transform:uppercase;& ", "{padding:0;}& ", " + ", "{padding:0 0 0 ", ";}", ";--primary-ghost-hover-bg-color:transparent;"], FontSize.SMALL, FontWeight.BOLD, /* sc-selector */ButtonContent, /* sc-selector */ButtonIcon, /* sc-selector */ButtonContent, Spacing.S1, /* sc-custom "display: none;" */primaryGhostColors);
|
|
64
|
+
export const ButtonBoxPrimaryGhostField = styled(ButtonBox).withConfig({
|
|
65
|
+
displayName: "ButtonBoxPrimaryGhostField",
|
|
66
|
+
componentId: "sc-qltvdl-11"
|
|
67
|
+
})(["height:", ";padding:0 calc(", " - 1px);font-weight:", ";", ";"], UnitSize.FIELD_HEIGHT, Spacing.S2, FontWeight.MEDIUM, /* sc-custom "display: none;" */primaryGhostColors);
|
|
68
|
+
// secondary ghost --------------
|
|
69
|
+
const secondaryGhostColors = createColors(colors.secondary.ghost);
|
|
70
|
+
export const ButtonBoxSecondaryGhostCompact = styled(ButtonBox).withConfig({
|
|
71
|
+
displayName: "ButtonBoxSecondaryGhostCompact",
|
|
72
|
+
componentId: "sc-qltvdl-12"
|
|
73
|
+
})(["height:16px;padding:0;font-size:", ";font-weight:", ";text-transform:uppercase;& ", "{padding:0;}& ", " + ", "{padding:0 0 0 ", ";}", ";--secondary-ghost-base-color:", ";--secondary-ghost-hover-bg-color:transparent;"], FontSize.SMALL, FontWeight.BOLD, /* sc-selector */ButtonContent, /* sc-selector */ButtonIcon, /* sc-selector */ButtonContent, Spacing.S1, /* sc-custom "display: none;" */secondaryGhostColors, Color.SOFT);
|
|
74
|
+
export const ButtonBoxSecondaryGhostField = styled(ButtonBox).withConfig({
|
|
75
|
+
displayName: "ButtonBoxSecondaryGhostField",
|
|
76
|
+
componentId: "sc-qltvdl-13"
|
|
77
|
+
})(["height:", ";padding:0 calc(", " - 1px);font-weight:", ";", ";"], UnitSize.FIELD_HEIGHT, Spacing.S2, FontWeight.MEDIUM, /* sc-custom "display: none;" */secondaryGhostColors);
|
|
78
|
+
// secondary shape --------------
|
|
79
|
+
const secondaryShapeColors = createColors(colors.secondary.shape);
|
|
80
|
+
export const ButtonBoxSecondaryShapeCompact = styled(ButtonBox).withConfig({
|
|
81
|
+
displayName: "ButtonBoxSecondaryShapeCompact",
|
|
82
|
+
componentId: "sc-qltvdl-14"
|
|
83
|
+
})(["height:28px;padding:0 calc(", " - 1px);font-size:", ";font-weight:", ";text-transform:uppercase;", ";"], Spacing.S2, FontSize.SMALL, FontWeight.MEDIUM, /* sc-custom "display: none;" */secondaryShapeColors);
|
|
84
|
+
export const ButtonBoxSecondaryShapeField = styled(ButtonBox).withConfig({
|
|
85
|
+
displayName: "ButtonBoxSecondaryShapeField",
|
|
86
|
+
componentId: "sc-qltvdl-15"
|
|
87
|
+
})(["height:", ";padding:0 calc(", " - 1px);font-weight:", ";", ";"], UnitSize.FIELD_HEIGHT, Spacing.S2, FontWeight.MEDIUM, /* sc-custom "display: none;" */secondaryShapeColors);
|
|
88
|
+
ButtonBox.displayName = 'ButtonBox';
|
|
89
|
+
ButtonIcon.displayName = 'ButtonIcon';
|
|
90
|
+
ButtonContent.displayName = 'ButtonContent';
|
|
91
|
+
ButtonSpinner.displayName = 'ButtonSpinner';
|
|
92
|
+
ButtonBoxDangerGhostCompact.displayName = 'ButtonBoxDangerGhostCompact';
|
|
93
|
+
ButtonBoxDangerGhostField.displayName = 'ButtonBoxDangerGhostField';
|
|
94
|
+
ButtonBoxDangerShapeCompact.displayName = 'ButtonBoxDangerShapeCompact';
|
|
95
|
+
ButtonBoxDangerShapeField.displayName = 'ButtonBoxDangerShapeField';
|
|
96
|
+
ButtonBoxPrimaryGhostCompact.displayName = 'ButtonBoxPrimaryGhostCompact';
|
|
97
|
+
ButtonBoxPrimaryGhostField.displayName = 'ButtonBoxPrimaryGhostField';
|
|
98
|
+
ButtonBoxPrimaryShapeCompact.displayName = 'ButtonBoxPrimaryShapeCompact';
|
|
99
|
+
ButtonBoxPrimaryShapeField.displayName = 'ButtonBoxPrimaryShapeField';
|
|
100
|
+
ButtonBoxSecondaryGhostCompact.displayName = 'ButtonBoxSecondaryGhostCompact';
|
|
101
|
+
ButtonBoxSecondaryGhostField.displayName = 'ButtonBoxSecondaryGhostField';
|
|
102
|
+
ButtonBoxSecondaryShapeCompact.displayName = 'ButtonBoxSecondaryShapeCompact';
|
|
103
|
+
ButtonBoxSecondaryShapeField.displayName = 'ButtonBoxSecondaryShapeField';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { JSX, ReactNode, Ref, ComponentType } from 'react';
|
|
2
|
+
export type RequiredButtonProps = {
|
|
3
|
+
readonly boxRef?: any;
|
|
4
|
+
readonly color: 'primary' | 'secondary' | 'danger';
|
|
5
|
+
readonly size?: 'field' | 'compact';
|
|
6
|
+
readonly view?: 'shape' | 'ghost';
|
|
7
|
+
readonly className?: string;
|
|
8
|
+
readonly isDisabled?: boolean;
|
|
9
|
+
readonly isLoading?: boolean;
|
|
10
|
+
readonly isOpen?: boolean;
|
|
11
|
+
readonly icon?: ReactNode;
|
|
12
|
+
readonly rightIcon?: ReactNode;
|
|
13
|
+
readonly children?: ReactNode;
|
|
14
|
+
};
|
|
15
|
+
export type ButtonPropsWithoutAs = Omit<JSX.IntrinsicElements['button'], 'ref'> & RequiredButtonProps & {
|
|
16
|
+
readonly boxRef?: Ref<HTMLButtonElement>;
|
|
17
|
+
readonly type?: 'button' | 'submit';
|
|
18
|
+
};
|
|
19
|
+
export type ButtonPropsWithAsTag<AS extends keyof HTMLElementTagNameMap> = Omit<JSX.IntrinsicElements[AS], 'ref'> & RequiredButtonProps & {
|
|
20
|
+
readonly boxRef?: Ref<HTMLElementTagNameMap[AS]>;
|
|
21
|
+
readonly as?: AS;
|
|
22
|
+
};
|
|
23
|
+
export type ButtonPropsWithAsComponent<OuterProps extends object> = OuterProps & RequiredButtonProps & {
|
|
24
|
+
readonly boxRef?: Ref<HTMLElement>;
|
|
25
|
+
readonly as?: ComponentType<OuterProps>;
|
|
26
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Spinner } from '../Spinner';
|
|
3
|
+
import { CardCollapse } from './CardCollapse';
|
|
4
|
+
export function CardChildren(props) {
|
|
5
|
+
const {
|
|
6
|
+
loading,
|
|
7
|
+
collapse,
|
|
8
|
+
isCollapsed,
|
|
9
|
+
children
|
|
10
|
+
} = props;
|
|
11
|
+
if (!children) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
if (loading) {
|
|
15
|
+
return React.createElement(Spinner, {
|
|
16
|
+
size: "medium"
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
if (collapse !== undefined) {
|
|
20
|
+
return React.createElement(CardCollapse, {
|
|
21
|
+
isCollapsed: isCollapsed
|
|
22
|
+
}, children);
|
|
23
|
+
}
|
|
24
|
+
return React.createElement(React.Fragment, null, children);
|
|
25
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CollapseContainer, CollapseInner } from './styles';
|
|
3
|
+
export function CardCollapse(props) {
|
|
4
|
+
const {
|
|
5
|
+
children,
|
|
6
|
+
isCollapsed
|
|
7
|
+
} = props;
|
|
8
|
+
return React.createElement(CollapseContainer, {
|
|
9
|
+
isCollapsed: isCollapsed
|
|
10
|
+
}, React.createElement(CollapseInner, {
|
|
11
|
+
isCollapsed: isCollapsed
|
|
12
|
+
}, children));
|
|
13
|
+
}
|