@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
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import styled, { keyframes } from 'styled-components';
|
|
2
|
+
import { Color, Spacing, ShapeRadius } from '@pushwoosh/kit-constants';
|
|
3
|
+
const animation = keyframes(["0%{opacity:0.2;}50%{opacity:0.1;}100%{opacity:0.2;}"]);
|
|
4
|
+
export const RootBox = styled.div.withConfig({
|
|
5
|
+
displayName: "RootBox",
|
|
6
|
+
componentId: "sc-1idyyj7-0"
|
|
7
|
+
})(["display:flex;align-items:center;justify-content:space-between;"]);
|
|
8
|
+
export const SkeletonStyled = styled.div.withConfig({
|
|
9
|
+
displayName: "SkeletonStyled",
|
|
10
|
+
componentId: "sc-1idyyj7-1"
|
|
11
|
+
})(["width:", ";height:", ";padding:", " 0;background:", ";border-radius:", ";animation:", " 1s ease-in-out infinite;opacity:0.1;"], ({
|
|
12
|
+
width
|
|
13
|
+
}) => width ? `${width}px` : Spacing.S7, ({
|
|
14
|
+
height
|
|
15
|
+
}) => height ? `${height}px` : Spacing.S7, Spacing.S1, Color.SOFT, ShapeRadius.CONTROL, animation);
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import React, { useCallback } from 'react';
|
|
2
|
+
import { ArrowIcon } from '@pushwoosh/kit-icons';
|
|
3
|
+
import { getSafelyNumber } from './helpers';
|
|
4
|
+
import { PaginationBox, PaginationArrow, PaginationDivider, PaginationButton } from './styles';
|
|
5
|
+
export function Pagination(props) {
|
|
6
|
+
const {
|
|
7
|
+
boxRef,
|
|
8
|
+
activePage,
|
|
9
|
+
totalPages,
|
|
10
|
+
adjacentPagesCount = 2,
|
|
11
|
+
isLoading = false,
|
|
12
|
+
onChangePage,
|
|
13
|
+
...rest
|
|
14
|
+
} = props;
|
|
15
|
+
const safelyActivePageNumber = getSafelyNumber(activePage);
|
|
16
|
+
const safelyTotalPagesNumber = getSafelyNumber(totalPages);
|
|
17
|
+
const handleChangePage = useCallback(event => {
|
|
18
|
+
onChangePage(getSafelyNumber(event.currentTarget.value));
|
|
19
|
+
}, [onChangePage]);
|
|
20
|
+
const isValidActivePage = safelyActivePageNumber >= 1 && safelyActivePageNumber <= safelyTotalPagesNumber;
|
|
21
|
+
const helperArray = Array.from({
|
|
22
|
+
length: adjacentPagesCount
|
|
23
|
+
});
|
|
24
|
+
const isDisabledLeftArrow = safelyActivePageNumber === 1;
|
|
25
|
+
const isDisabledRightArrow = safelyActivePageNumber >= safelyTotalPagesNumber;
|
|
26
|
+
const shouldShowShowFirstPage = safelyActivePageNumber - adjacentPagesCount - 1 > 0;
|
|
27
|
+
const shouldShowShowLeftDivider = safelyActivePageNumber - adjacentPagesCount - 2 > 0;
|
|
28
|
+
const shouldShowShowLastPage = safelyTotalPagesNumber - safelyActivePageNumber > adjacentPagesCount;
|
|
29
|
+
const shouldShowShowRightDivider = safelyTotalPagesNumber - safelyActivePageNumber - 1 > adjacentPagesCount;
|
|
30
|
+
if (!isValidActivePage) {
|
|
31
|
+
console.error(`[Pagination]: prop activePage: ${activePage} is not valid!`);
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
return React.createElement(PaginationBox, {
|
|
35
|
+
...rest,
|
|
36
|
+
ref: boxRef
|
|
37
|
+
}, React.createElement(PaginationArrow, {
|
|
38
|
+
value: safelyActivePageNumber - 1,
|
|
39
|
+
disabled: isLoading || isDisabledLeftArrow,
|
|
40
|
+
onClick: handleChangePage
|
|
41
|
+
}, React.createElement(ArrowIcon, {
|
|
42
|
+
direction: "left",
|
|
43
|
+
size: "medium"
|
|
44
|
+
})), shouldShowShowFirstPage && React.createElement(PaginationButton, {
|
|
45
|
+
value: 1,
|
|
46
|
+
disabled: isLoading,
|
|
47
|
+
onClick: handleChangePage
|
|
48
|
+
}, 1), shouldShowShowLeftDivider && React.createElement(PaginationDivider, null, "..."), helperArray.map((_, index) => {
|
|
49
|
+
const currentIndex = safelyActivePageNumber - adjacentPagesCount + index;
|
|
50
|
+
if (currentIndex < 1 || currentIndex > safelyTotalPagesNumber) {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
return React.createElement(PaginationButton, {
|
|
54
|
+
key: currentIndex,
|
|
55
|
+
value: currentIndex,
|
|
56
|
+
disabled: isLoading,
|
|
57
|
+
onClick: handleChangePage
|
|
58
|
+
}, currentIndex);
|
|
59
|
+
}), React.createElement(PaginationButton, {
|
|
60
|
+
"$isActive": true,
|
|
61
|
+
disabled: true
|
|
62
|
+
}, safelyActivePageNumber), helperArray.map((_, index) => {
|
|
63
|
+
const currentIndex = safelyActivePageNumber + index + 1;
|
|
64
|
+
if (currentIndex > safelyTotalPagesNumber) {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
return React.createElement(PaginationButton, {
|
|
68
|
+
key: currentIndex,
|
|
69
|
+
value: currentIndex,
|
|
70
|
+
disabled: isLoading,
|
|
71
|
+
onClick: handleChangePage
|
|
72
|
+
}, currentIndex);
|
|
73
|
+
}), shouldShowShowRightDivider && React.createElement(PaginationDivider, null, "..."), shouldShowShowLastPage && React.createElement(PaginationButton, {
|
|
74
|
+
value: safelyTotalPagesNumber,
|
|
75
|
+
disabled: isLoading,
|
|
76
|
+
onClick: handleChangePage
|
|
77
|
+
}, safelyTotalPagesNumber), React.createElement(PaginationArrow, {
|
|
78
|
+
value: safelyActivePageNumber + 1,
|
|
79
|
+
disabled: isLoading || isDisabledRightArrow,
|
|
80
|
+
onClick: handleChangePage
|
|
81
|
+
}, React.createElement(ArrowIcon, {
|
|
82
|
+
direction: "right",
|
|
83
|
+
size: "medium"
|
|
84
|
+
})));
|
|
85
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getSafelyNumber: (input: string | number) => number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Pagination } from './Pagination';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Pagination } from './Pagination';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const PaginationBox: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const PaginationArrow: import("styled-components").StyledComponent<"button", any, {
|
|
3
|
+
$isActive?: boolean;
|
|
4
|
+
}, never>;
|
|
5
|
+
export declare const PaginationDivider: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
|
+
export declare const PaginationButton: import("styled-components").StyledComponent<"button", any, {
|
|
7
|
+
$isActive?: boolean;
|
|
8
|
+
}, never>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { Color, FontSize, FontWeight, ShapeRadius, Spacing, UnitSize } from '@pushwoosh/kit-constants';
|
|
3
|
+
const PaginationControl = styled.button.withConfig({
|
|
4
|
+
displayName: "PaginationControl",
|
|
5
|
+
componentId: "sc-o79vko-0"
|
|
6
|
+
})(["height:", ";appearance:none;border:1px solid ", ";border-right:none;background-color:", ";color:", ";font-weight:", ";font-size:", ";&:hover{background-color:", ";color:", ";}&:disabled{background-color:", ";color:", ";}user-select:none;"], UnitSize.FIELD_HEIGHT, Color.DIVIDER, Color.CLEAR, Color.MAIN, FontWeight.MEDIUM, FontSize.REGULAR, ({
|
|
7
|
+
$isActive
|
|
8
|
+
}) => $isActive ? Color.MAIN : Color.BRIGHT_LIGHT, ({
|
|
9
|
+
$isActive
|
|
10
|
+
}) => $isActive ? Color.CLEAR : Color.PRIMARY_HOVER, Color.CLEAR, Color.PHANTOM);
|
|
11
|
+
export const PaginationBox = styled.div.withConfig({
|
|
12
|
+
displayName: "PaginationBox",
|
|
13
|
+
componentId: "sc-o79vko-1"
|
|
14
|
+
})(["display:flex;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start;"]);
|
|
15
|
+
export const PaginationArrow = styled(PaginationControl).withConfig({
|
|
16
|
+
displayName: "PaginationArrow",
|
|
17
|
+
componentId: "sc-o79vko-2"
|
|
18
|
+
})(["padding:0 ", ";&:first-child{border-radius:", " 0 0 ", ";}&:last-child{border-right:1px solid ", ";border-radius:0 ", " ", " 0;}user-select:none;"], Spacing.S2, ShapeRadius.CONTROL, ShapeRadius.CONTROL, Color.DIVIDER, ShapeRadius.CONTROL, ShapeRadius.CONTROL);
|
|
19
|
+
export const PaginationDivider = styled.div.withConfig({
|
|
20
|
+
displayName: "PaginationDivider",
|
|
21
|
+
componentId: "sc-o79vko-3"
|
|
22
|
+
})(["display:flex;flex-wrap:nowrap;align-items:center;justify-content:center;width:32px;height:", ";color:", ";background-color:", ";border:1px solid ", ";border-right:none;box-sizing:border-box;user-select:none;"], UnitSize.FIELD_HEIGHT, Color.LOCKED, Color.FROZEN, Color.DIVIDER);
|
|
23
|
+
export const PaginationButton = styled(PaginationControl).withConfig({
|
|
24
|
+
displayName: "PaginationButton",
|
|
25
|
+
componentId: "sc-o79vko-4"
|
|
26
|
+
})(["padding:0 ", ";&:disabled{background-color:", ";color:", ";}"], Spacing.S4, ({
|
|
27
|
+
$isActive
|
|
28
|
+
}) => $isActive ? Color.MAIN : Color.CLEAR, ({
|
|
29
|
+
$isActive
|
|
30
|
+
}) => $isActive ? Color.CLEAR : Color.MAIN);
|
|
31
|
+
PaginationBox.displayName = 'PaginationBox';
|
|
32
|
+
PaginationControl.displayName = 'PaginationControl';
|
|
33
|
+
PaginationArrow.displayName = 'PaginationArrow';
|
|
34
|
+
PaginationDivider.displayName = 'PaginationDivider';
|
|
35
|
+
PaginationButton.displayName = 'PaginationButton';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Ref } from 'react';
|
|
2
|
+
export type PaginationProps = Omit<JSX.IntrinsicElements['div'], 'ref'> & {
|
|
3
|
+
readonly boxRef?: Ref<HTMLDivElement>;
|
|
4
|
+
readonly activePage: string | number;
|
|
5
|
+
readonly totalPages: string | number;
|
|
6
|
+
readonly adjacentPagesCount?: number;
|
|
7
|
+
readonly isLoading?: boolean;
|
|
8
|
+
readonly onChangePage: (page: number) => any;
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PopoverContainerPortal, PopoverContainerWindow } from './styles';
|
|
3
|
+
export function Popover(props) {
|
|
4
|
+
const {
|
|
5
|
+
open,
|
|
6
|
+
anchorEl,
|
|
7
|
+
internalWindowRef = null,
|
|
8
|
+
loading = false,
|
|
9
|
+
position = 'right-start',
|
|
10
|
+
zIndex = 1000,
|
|
11
|
+
windowWidth,
|
|
12
|
+
children
|
|
13
|
+
} = props;
|
|
14
|
+
return React.createElement(PopoverContainerPortal, {
|
|
15
|
+
animation: false,
|
|
16
|
+
delay: 0,
|
|
17
|
+
duration: 0,
|
|
18
|
+
placement: position,
|
|
19
|
+
maxWidth: windowWidth,
|
|
20
|
+
reference: anchorEl,
|
|
21
|
+
zIndex: zIndex,
|
|
22
|
+
visible: open,
|
|
23
|
+
className: "popover-container",
|
|
24
|
+
content: React.createElement(PopoverContainerWindow, {
|
|
25
|
+
"$minWidth": windowWidth,
|
|
26
|
+
"$isLoading": loading,
|
|
27
|
+
ref: internalWindowRef
|
|
28
|
+
}, open && children),
|
|
29
|
+
popperOptions: {
|
|
30
|
+
strategy: 'fixed',
|
|
31
|
+
modifiers: [{
|
|
32
|
+
name: 'offset',
|
|
33
|
+
options: {
|
|
34
|
+
offset: [0, 4]
|
|
35
|
+
}
|
|
36
|
+
}, {
|
|
37
|
+
name: 'preventOverflow',
|
|
38
|
+
options: {
|
|
39
|
+
mainAxis: false
|
|
40
|
+
}
|
|
41
|
+
}]
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}
|
package/Popover/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const PopoverContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const PopoverContainerWindow: import("styled-components").StyledComponent<"div", any, {
|
|
3
|
+
$minWidth?: number | null;
|
|
4
|
+
$isLoading: boolean;
|
|
5
|
+
}, never>;
|
|
6
|
+
export declare const PopoverContainerPortal: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@tippyjs/react").TippyProps>, any, {}, never>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import Tippy from '@tippyjs/react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { Color, ShapeRadius, Spacing } from '@pushwoosh/kit-constants';
|
|
4
|
+
export const PopoverContainer = styled.div.withConfig({
|
|
5
|
+
displayName: "PopoverContainer",
|
|
6
|
+
componentId: "sc-qsqk3z-0"
|
|
7
|
+
})(["display:flex;position:relative;"]);
|
|
8
|
+
export const PopoverContainerWindow = styled.div.withConfig({
|
|
9
|
+
displayName: "PopoverContainerWindow",
|
|
10
|
+
componentId: "sc-qsqk3z-1"
|
|
11
|
+
})(["min-width:", ";padding:", ";border:1px solid ", ";border-radius:", ";background:", ";transition:visibility 50ms linear;> *{opacity:", ";}"], ({
|
|
12
|
+
$minWidth
|
|
13
|
+
}) => $minWidth ? `${$minWidth}px` : 'auto', Spacing.S5, Color.FORM, ShapeRadius.DIALOG, Color.CLEAR, ({
|
|
14
|
+
$isLoading
|
|
15
|
+
}) => $isLoading ? '0.5' : '1');
|
|
16
|
+
export const PopoverContainerPortal = styled(Tippy).withConfig({
|
|
17
|
+
displayName: "PopoverContainerPortal",
|
|
18
|
+
componentId: "sc-qsqk3z-2"
|
|
19
|
+
})(["pointer-events:all;&.popover-container.tippy-box{position:static;background-color:transparent;border-radius:0;color:", ";font-size:inherit;line-height:inherit;outline:0;transition:none;}&.popover-container .tippy-content{position:static;padding:0;z-index:auto;}&.popover-container .tippy-arrow{display:none;}"], Color.MAIN);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { RefObject, ReactNode } from 'react';
|
|
2
|
+
import type { Placement } from 'tippy.js';
|
|
3
|
+
export interface PopoverProps {
|
|
4
|
+
readonly anchorEl: RefObject<HTMLElement>;
|
|
5
|
+
readonly internalWindowRef?: RefObject<HTMLDivElement>;
|
|
6
|
+
readonly position?: Placement;
|
|
7
|
+
readonly open: boolean;
|
|
8
|
+
readonly loading?: boolean;
|
|
9
|
+
readonly zIndex?: number;
|
|
10
|
+
readonly windowWidth?: number;
|
|
11
|
+
readonly children: ReactNode | undefined;
|
|
12
|
+
}
|
package/Popover/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ReactElement } from 'react';
|
|
2
2
|
import { type ProgressBoxProps } from './types';
|
|
3
|
-
export declare
|
|
3
|
+
export declare function ProgressBar(props: ProgressBoxProps): ReactElement;
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Color } from '@pushwoosh/kit-constants';
|
|
3
|
-
import { Spinner } from '
|
|
4
|
-
import { Container, LoadingHeader, LoadingText, ProgressLine, ProgressBarActive, ProgressBoxContainer, RightSlotContainer, SpinnerContainer, ProgressLineContainer } from './
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
3
|
+
import { Spinner } from '../Spinner';
|
|
4
|
+
import { Container, LoadingHeader, LoadingText, ProgressLine, ProgressBarActive, ProgressBoxContainer, RightSlotContainer, SpinnerContainer, ProgressLineContainer } from './styles';
|
|
5
|
+
export function ProgressBar(props) {
|
|
6
|
+
const {
|
|
7
|
+
percentValue,
|
|
8
|
+
title,
|
|
9
|
+
rightSlot,
|
|
10
|
+
color = Color.BRIGHT,
|
|
11
|
+
backgroundColor = Color.BRIGHT_LIGHT
|
|
12
|
+
} = props;
|
|
13
|
+
return React.createElement(Container, null, React.createElement(SpinnerContainer, {
|
|
14
|
+
"$backgroundColor": backgroundColor
|
|
15
|
+
}, React.createElement(Spinner, {
|
|
16
|
+
color: color,
|
|
17
|
+
size: "medium"
|
|
18
|
+
})), React.createElement(ProgressBoxContainer, null, React.createElement(LoadingHeader, null, React.createElement(LoadingText, null, title, ' ', `${percentValue}%`), rightSlot && React.createElement(RightSlotContainer, null, rightSlot)), React.createElement(ProgressLineContainer, null, React.createElement(ProgressLine, null, React.createElement(ProgressBarActive, {
|
|
19
|
+
"$width": percentValue,
|
|
20
|
+
"$color": color
|
|
21
|
+
})))));
|
|
22
|
+
}
|
|
@@ -3,15 +3,15 @@ import { Color, FontSize, ShapeRadius, Spacing } from '@pushwoosh/kit-constants'
|
|
|
3
3
|
import { H5 } from '@pushwoosh/kit-typography';
|
|
4
4
|
export const ProgressLine = styled.div.withConfig({
|
|
5
5
|
displayName: "ProgressLine",
|
|
6
|
-
componentId: "sc-
|
|
6
|
+
componentId: "sc-jfhkho-0"
|
|
7
7
|
})(["display:flex;height:5px;border-radius:", ";background:", ";"], ShapeRadius.CONTROL, Color.SOFT_LIGHT);
|
|
8
8
|
export const ProgressLineContainer = styled.div.withConfig({
|
|
9
9
|
displayName: "ProgressLineContainer",
|
|
10
|
-
componentId: "sc-
|
|
10
|
+
componentId: "sc-jfhkho-1"
|
|
11
11
|
})(["padding:", " 0;"], Spacing.S1);
|
|
12
12
|
export const ProgressBarActive = styled(ProgressLine).withConfig({
|
|
13
13
|
displayName: "ProgressBarActive",
|
|
14
|
-
componentId: "sc-
|
|
14
|
+
componentId: "sc-jfhkho-2"
|
|
15
15
|
})(["width:", ";background:", ";"], ({
|
|
16
16
|
$width
|
|
17
17
|
}) => `${$width}%`, ({
|
|
@@ -19,27 +19,27 @@ export const ProgressBarActive = styled(ProgressLine).withConfig({
|
|
|
19
19
|
}) => $color || Color.BRIGHT);
|
|
20
20
|
export const Container = styled.div.withConfig({
|
|
21
21
|
displayName: "Container",
|
|
22
|
-
componentId: "sc-
|
|
23
|
-
})(["display:flex;width:100%;gap:", ";
|
|
22
|
+
componentId: "sc-jfhkho-3"
|
|
23
|
+
})(["display:flex;align-items:center;width:100%;gap:", ";"], Spacing.S4);
|
|
24
24
|
export const SpinnerContainer = styled.div.withConfig({
|
|
25
25
|
displayName: "SpinnerContainer",
|
|
26
|
-
componentId: "sc-
|
|
26
|
+
componentId: "sc-jfhkho-4"
|
|
27
27
|
})(["background-color:", ";border-radius:", ";padding:", ";"], ({
|
|
28
28
|
$backgroundColor
|
|
29
29
|
}) => $backgroundColor, ShapeRadius.CONTROL, Spacing.S1);
|
|
30
30
|
export const ProgressBoxContainer = styled.div.withConfig({
|
|
31
31
|
displayName: "ProgressBoxContainer",
|
|
32
|
-
componentId: "sc-
|
|
32
|
+
componentId: "sc-jfhkho-5"
|
|
33
33
|
})(["display:flex;flex-direction:column;flex:1;"]);
|
|
34
34
|
export const LoadingHeader = styled.div.withConfig({
|
|
35
35
|
displayName: "LoadingHeader",
|
|
36
|
-
componentId: "sc-
|
|
36
|
+
componentId: "sc-jfhkho-6"
|
|
37
37
|
})(["display:flex;gap:", ";align-items:center;justify-content:space-between;"], Spacing.S2);
|
|
38
38
|
export const LoadingText = styled(H5).withConfig({
|
|
39
39
|
displayName: "LoadingText",
|
|
40
|
-
componentId: "sc-
|
|
40
|
+
componentId: "sc-jfhkho-7"
|
|
41
41
|
})(["color:", ";text-transform:uppercase;font-size:", ";"], Color.MAIN, FontSize.SMALL);
|
|
42
42
|
export const RightSlotContainer = styled.div.withConfig({
|
|
43
43
|
displayName: "RightSlotContainer",
|
|
44
|
-
componentId: "sc-
|
|
44
|
+
componentId: "sc-jfhkho-8"
|
|
45
45
|
})(["display:flex;right:0;"]);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Columns } from '@pushwoosh/kit-helpers';
|
|
3
|
-
import { Spinner } from '
|
|
4
|
-
import { PREVIEW_ICON_URL } from './constants
|
|
5
|
-
import { getLocalizedContent } from './helpers
|
|
6
|
-
import { LoadingBox, PushBox, AppIcon, PushContent, PushTitleBox, PushTitleText, PushDate, PushDescription } from './
|
|
3
|
+
import { Spinner } from '../Spinner';
|
|
4
|
+
import { PREVIEW_ICON_URL } from './constants';
|
|
5
|
+
import { getLocalizedContent } from './helpers';
|
|
6
|
+
import { LoadingBox, PushBox, AppIcon, PushContent, PushTitleBox, PushTitleText, PushDate, PushDescription } from './styles';
|
|
7
7
|
export function PushPreview(props) {
|
|
8
8
|
const {
|
|
9
9
|
pushPreset,
|
|
@@ -3,37 +3,37 @@ import { Color, FontWeight, FontSize, Shadow, ShapeRadius, Spacing } from '@push
|
|
|
3
3
|
import { Vertical } from '@pushwoosh/kit-helpers';
|
|
4
4
|
export const PushBox = styled.div.withConfig({
|
|
5
5
|
displayName: "PushBox",
|
|
6
|
-
componentId: "sc-
|
|
6
|
+
componentId: "sc-185rvhg-0"
|
|
7
7
|
})(["display:grid;width:", ";min-height:50px;padding:10px;background:", ";box-shadow:", ";border-radius:10px;"], ({
|
|
8
8
|
$width
|
|
9
9
|
}) => $width || '100%', Color.CLEAR, Shadow.LARGE);
|
|
10
10
|
export const AppIcon = styled.img.withConfig({
|
|
11
11
|
displayName: "AppIcon",
|
|
12
|
-
componentId: "sc-
|
|
12
|
+
componentId: "sc-185rvhg-1"
|
|
13
13
|
})(["width:30px;height:30px;border-radius:", ";"], ShapeRadius.CONTROL);
|
|
14
14
|
export const PushContent = styled(Vertical).withConfig({
|
|
15
15
|
displayName: "PushContent",
|
|
16
|
-
componentId: "sc-
|
|
16
|
+
componentId: "sc-185rvhg-2"
|
|
17
17
|
})(["max-width:240px;"]);
|
|
18
18
|
export const PushTitleBox = styled.span.withConfig({
|
|
19
19
|
displayName: "PushTitleBox",
|
|
20
|
-
componentId: "sc-
|
|
20
|
+
componentId: "sc-185rvhg-3"
|
|
21
21
|
})(["display:grid;grid-template-columns:1fr min-content;grid-gap:", ";"], Spacing.S3);
|
|
22
22
|
export const PushTitleText = styled.span.withConfig({
|
|
23
23
|
displayName: "PushTitleText",
|
|
24
|
-
componentId: "sc-
|
|
24
|
+
componentId: "sc-185rvhg-4"
|
|
25
25
|
})(["font-weight:", ";font-size:13px;line-height:140%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;"], FontWeight.MEDIUM);
|
|
26
26
|
export const PushDate = styled.span.withConfig({
|
|
27
27
|
displayName: "PushDate",
|
|
28
|
-
componentId: "sc-
|
|
28
|
+
componentId: "sc-185rvhg-5"
|
|
29
29
|
})(["color:#555;font-weight:", ";font-size:", ";letter-spacing:0;"], FontWeight.REGULAR, FontSize.SMALL);
|
|
30
30
|
export const PushDescription = styled.div.withConfig({
|
|
31
31
|
displayName: "PushDescription",
|
|
32
|
-
componentId: "sc-
|
|
32
|
+
componentId: "sc-185rvhg-6"
|
|
33
33
|
})(["color:", ";font-weight:", ";font-size:13px;line-height:140%;"], ({
|
|
34
34
|
$isLocked
|
|
35
35
|
}) => $isLocked ? Color.LOCKED : Color.MAIN, FontWeight.REGULAR);
|
|
36
36
|
export const LoadingBox = styled.div.withConfig({
|
|
37
37
|
displayName: "LoadingBox",
|
|
38
|
-
componentId: "sc-
|
|
38
|
+
componentId: "sc-185rvhg-7"
|
|
39
39
|
})(["display:flex;align-items:center;justify-content:center;flex:1;"]);
|
package/Radio/Radio.d.ts
ADDED
package/Radio/Radio.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { NativeLabel, NativeRadio } from './styled';
|
|
3
|
+
// eslint-disable-next-line prefer-const
|
|
4
|
+
let counter = 0;
|
|
5
|
+
export function Radio(props) {
|
|
6
|
+
const {
|
|
7
|
+
label,
|
|
8
|
+
id,
|
|
9
|
+
name,
|
|
10
|
+
value,
|
|
11
|
+
color,
|
|
12
|
+
isChecked,
|
|
13
|
+
isDisabled,
|
|
14
|
+
onChange,
|
|
15
|
+
onBlur
|
|
16
|
+
} = props;
|
|
17
|
+
const [localId] = useState(() => {
|
|
18
|
+
if (id) {
|
|
19
|
+
return id;
|
|
20
|
+
}
|
|
21
|
+
const newCounter = counter + 1;
|
|
22
|
+
return `radio-id-${newCounter}`;
|
|
23
|
+
});
|
|
24
|
+
return React.createElement(NativeLabel, {
|
|
25
|
+
htmlFor: localId,
|
|
26
|
+
"$color": isDisabled ? 'locked' : color
|
|
27
|
+
}, React.createElement(NativeRadio, {
|
|
28
|
+
type: "radio",
|
|
29
|
+
id: localId,
|
|
30
|
+
value: value,
|
|
31
|
+
name: name,
|
|
32
|
+
checked: isChecked,
|
|
33
|
+
disabled: isDisabled,
|
|
34
|
+
onChange: event => onChange === null || onChange === void 0 ? void 0 : onChange(event.currentTarget.value),
|
|
35
|
+
onBlur: onBlur
|
|
36
|
+
}), label && React.createElement("span", null, label));
|
|
37
|
+
}
|
package/Radio/index.d.ts
ADDED
package/Radio/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Radio } from './Radio';
|
package/Radio/maps.d.ts
ADDED
package/Radio/maps.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { RadioTextColor } from './types';
|
|
2
|
+
export declare const NativeRadio: import("styled-components").StyledComponent<"input", any, {}, never>;
|
|
3
|
+
export declare const NativeLabel: import("styled-components").StyledComponent<"label", any, {
|
|
4
|
+
$color?: RadioTextColor;
|
|
5
|
+
}, never>;
|
package/Radio/styled.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { Color, Spacing, FontSize, LineHeight } from '@pushwoosh/kit-constants';
|
|
3
|
+
import { ColorMap } from './maps';
|
|
4
|
+
export const NativeRadio = styled.input.withConfig({
|
|
5
|
+
displayName: "NativeRadio",
|
|
6
|
+
componentId: "sc-154q01x-0"
|
|
7
|
+
})(["appearance:none;-webkit-appearance:none;-moz-appearance:none;width:20px;height:20px;border:2px solid ", ";border-radius:50%;background-color:", ";transition:border 0.1s,background-color 0.1s;cursor:pointer;&:focus{outline:none;}&[type=radio]:hover{border-color:", ";}&[type=radio]:disabled{cursor:not-allowed;border-color:", ";background-color:", ";}&[type=radio]:checked{border:6px solid ", ";}&[type=radio]:checked:hover{border-color:", ";}&[type=radio]:checked:disabled{border-color:", ";background-color:", ";}"], Color.PHANTOM, Color.CLEAR, Color.PRIMARY_HOVER, Color.LOCKED, Color.FROZEN, Color.PRIMARY, Color.PRIMARY_HOVER, Color.LOCKED, Color.FROZEN);
|
|
8
|
+
export const NativeLabel = styled.label.withConfig({
|
|
9
|
+
displayName: "NativeLabel",
|
|
10
|
+
componentId: "sc-154q01x-1"
|
|
11
|
+
})(["display:inline-flex;align-items:center;font-size:", ";line-height:", ";user-select:none;", " & > ", "{&:not(:last-child){margin-right:", ";}}"], FontSize.REGULAR, LineHeight.REGULAR, ({
|
|
12
|
+
$color
|
|
13
|
+
}) => $color && `color: ${ColorMap[$color]};`, NativeRadio, Spacing.S3);
|
package/Radio/types.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type RadioTextColor = 'main' | 'primary' | 'danger' | 'current' | 'locked';
|
|
2
|
+
export type RadioProps = {
|
|
3
|
+
label?: string;
|
|
4
|
+
id?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
value?: string;
|
|
7
|
+
color?: RadioTextColor;
|
|
8
|
+
isChecked?: boolean;
|
|
9
|
+
isDisabled?: boolean;
|
|
10
|
+
onChange?: (checked: string | number) => void;
|
|
11
|
+
onBlur?: () => void;
|
|
12
|
+
};
|
package/Radio/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export const RECAPTCHA_KEY = '6LdS7DYUAAAAABVgt0djIBoyyMQ0oDAUl7jt1Mxh';
|
|
2
|
+
// onload script: https://www.google.com/recaptcha/api.js?onload=recaptchaOnLoad&render=explicit'
|
|
3
|
+
export const RECAPTCHA_SCRIPT_URL = 'https://www.google.com/recaptcha/api.js?render=explicit';
|
|
4
|
+
export const RECAPTCHA_CONTAINER_ID = 'g-recaptcha';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function asyncScriptLoad(scriptUrl: string): Promise<Event | void>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export async function asyncScriptLoad(scriptUrl) {
|
|
2
|
+
return new Promise((resolve, reject) => {
|
|
3
|
+
const isAlreadyLoaded = document.querySelector(`script[src="${scriptUrl}"]`);
|
|
4
|
+
if (isAlreadyLoaded) {
|
|
5
|
+
resolve();
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
const script = document.createElement('script');
|
|
9
|
+
script.src = scriptUrl;
|
|
10
|
+
script.async = true;
|
|
11
|
+
document.body.appendChild(script);
|
|
12
|
+
script.onload = resolve;
|
|
13
|
+
script.onerror = reject;
|
|
14
|
+
});
|
|
15
|
+
}
|