@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,79 @@
|
|
|
1
|
+
import React, { useLayoutEffect, useRef } from 'react';
|
|
2
|
+
import { useOnClickOutside, useElementWidth } from '@pushwoosh/kit-hooks';
|
|
3
|
+
import { DropdownIcon as Icon } from '@pushwoosh/kit-icons';
|
|
4
|
+
import { useDropdownMenuContext } from '../DropdownMenu';
|
|
5
|
+
import { DropdownMenuContainerButtonMap } from './maps';
|
|
6
|
+
import { DropdownMenuContainerBox, DropdownMenuContainerChevron, DropdownMenuContainerIcon, DropdownMenuContainerPortal, DropdownMenuContainerTitle, DropdownMenuContainerWindow } from './styles';
|
|
7
|
+
export function DropdownMenuContainer(props) {
|
|
8
|
+
const {
|
|
9
|
+
boxRef,
|
|
10
|
+
title,
|
|
11
|
+
color,
|
|
12
|
+
view,
|
|
13
|
+
minimal,
|
|
14
|
+
windowZIndex,
|
|
15
|
+
windowPlacement = 'bottom-start',
|
|
16
|
+
isDisabled,
|
|
17
|
+
hideChevron = false,
|
|
18
|
+
icon,
|
|
19
|
+
iconPlacement = 'left',
|
|
20
|
+
children,
|
|
21
|
+
isOpen,
|
|
22
|
+
onChangeIsOpen,
|
|
23
|
+
...rest
|
|
24
|
+
} = props;
|
|
25
|
+
const DropdownMenuContainerButton = DropdownMenuContainerButtonMap[color][view];
|
|
26
|
+
const {
|
|
27
|
+
closeDropdown
|
|
28
|
+
} = useDropdownMenuContext();
|
|
29
|
+
const internalButtonRef = useRef(null);
|
|
30
|
+
const internalWindowRef = useRef(null);
|
|
31
|
+
const [buttonWidth, recalculateWidth] = useElementWidth(internalButtonRef);
|
|
32
|
+
useOnClickOutside([internalButtonRef, internalWindowRef], closeDropdown);
|
|
33
|
+
useLayoutEffect(() => {
|
|
34
|
+
recalculateWidth();
|
|
35
|
+
}, [recalculateWidth, title]);
|
|
36
|
+
return React.createElement(DropdownMenuContainerBox, {
|
|
37
|
+
...rest,
|
|
38
|
+
ref: boxRef
|
|
39
|
+
}, React.createElement(DropdownMenuContainerButton, {
|
|
40
|
+
type: "button",
|
|
41
|
+
disabled: isDisabled,
|
|
42
|
+
isDisabled: isDisabled,
|
|
43
|
+
isActive: isOpen,
|
|
44
|
+
onClick: () => onChangeIsOpen(!isOpen),
|
|
45
|
+
minimal: minimal,
|
|
46
|
+
ref: internalButtonRef
|
|
47
|
+
}, icon && iconPlacement === 'left' && React.createElement(DropdownMenuContainerIcon, null, icon), title && React.createElement(React.Fragment, null, React.createElement(DropdownMenuContainerTitle, {
|
|
48
|
+
hideChevron: hideChevron
|
|
49
|
+
}, title), !hideChevron && React.createElement(DropdownMenuContainerChevron, null, React.createElement(Icon, {
|
|
50
|
+
direction: "down",
|
|
51
|
+
size: "small"
|
|
52
|
+
}))), icon && iconPlacement === 'right' && React.createElement(DropdownMenuContainerIcon, null, icon)), React.createElement(DropdownMenuContainerPortal, {
|
|
53
|
+
animation: false,
|
|
54
|
+
delay: 0,
|
|
55
|
+
duration: 0,
|
|
56
|
+
placement: windowPlacement,
|
|
57
|
+
reference: internalButtonRef,
|
|
58
|
+
visible: isOpen,
|
|
59
|
+
zIndex: windowZIndex,
|
|
60
|
+
content: React.createElement(DropdownMenuContainerWindow, {
|
|
61
|
+
"$minWidth": buttonWidth,
|
|
62
|
+
ref: internalWindowRef
|
|
63
|
+
}, isOpen && children),
|
|
64
|
+
popperOptions: {
|
|
65
|
+
strategy: 'fixed',
|
|
66
|
+
modifiers: [{
|
|
67
|
+
name: 'offset',
|
|
68
|
+
options: {
|
|
69
|
+
offset: [0, 4]
|
|
70
|
+
}
|
|
71
|
+
}, {
|
|
72
|
+
name: 'preventOverflow',
|
|
73
|
+
options: {
|
|
74
|
+
mainAxis: false
|
|
75
|
+
}
|
|
76
|
+
}]
|
|
77
|
+
}
|
|
78
|
+
}));
|
|
79
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DropdownMenuContainer } from './DropdownMenuContainer';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DropdownMenuContainer } from './DropdownMenuContainer';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const DropdownMenuContainerButtonMap: {
|
|
2
|
+
primary: {
|
|
3
|
+
ghost: import("styled-components").StyledComponent<"button", any, {
|
|
4
|
+
isDisabled?: boolean;
|
|
5
|
+
isActive: boolean;
|
|
6
|
+
minimal?: boolean;
|
|
7
|
+
}, never>;
|
|
8
|
+
shape: import("styled-components").StyledComponent<"button", any, {
|
|
9
|
+
isDisabled?: boolean;
|
|
10
|
+
isActive: boolean;
|
|
11
|
+
minimal?: boolean;
|
|
12
|
+
}, never>;
|
|
13
|
+
};
|
|
14
|
+
secondary: {
|
|
15
|
+
ghost: import("styled-components").StyledComponent<"button", any, {
|
|
16
|
+
isDisabled?: boolean;
|
|
17
|
+
isActive: boolean;
|
|
18
|
+
minimal?: boolean;
|
|
19
|
+
}, never>;
|
|
20
|
+
shape: import("styled-components").StyledComponent<"button", any, {
|
|
21
|
+
isDisabled?: boolean;
|
|
22
|
+
isActive: boolean;
|
|
23
|
+
minimal?: boolean;
|
|
24
|
+
}, never>;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DropdownMenuContainerButtonPrimaryGhost, DropdownMenuContainerButtonPrimaryShape, DropdownMenuContainerButtonSecondaryGhost, DropdownMenuContainerButtonSecondaryShape } from './styles';
|
|
2
|
+
export const DropdownMenuContainerButtonMap = {
|
|
3
|
+
primary: {
|
|
4
|
+
ghost: DropdownMenuContainerButtonPrimaryGhost,
|
|
5
|
+
shape: DropdownMenuContainerButtonPrimaryShape
|
|
6
|
+
},
|
|
7
|
+
secondary: {
|
|
8
|
+
ghost: DropdownMenuContainerButtonSecondaryGhost,
|
|
9
|
+
shape: DropdownMenuContainerButtonSecondaryShape
|
|
10
|
+
}
|
|
11
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export declare const DropdownMenuContainerBox: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const DropdownMenuContainerButton: import("styled-components").StyledComponent<"button", any, {
|
|
3
|
+
isDisabled?: boolean;
|
|
4
|
+
isActive: boolean;
|
|
5
|
+
minimal?: boolean;
|
|
6
|
+
}, never>;
|
|
7
|
+
export declare const DropdownMenuContainerButtonPrimaryGhost: import("styled-components").StyledComponent<"button", any, {
|
|
8
|
+
isDisabled?: boolean;
|
|
9
|
+
isActive: boolean;
|
|
10
|
+
minimal?: boolean;
|
|
11
|
+
}, never>;
|
|
12
|
+
export declare const DropdownMenuContainerButtonPrimaryShape: import("styled-components").StyledComponent<"button", any, {
|
|
13
|
+
isDisabled?: boolean;
|
|
14
|
+
isActive: boolean;
|
|
15
|
+
minimal?: boolean;
|
|
16
|
+
}, never>;
|
|
17
|
+
export declare const DropdownMenuContainerButtonSecondaryGhost: import("styled-components").StyledComponent<"button", any, {
|
|
18
|
+
isDisabled?: boolean;
|
|
19
|
+
isActive: boolean;
|
|
20
|
+
minimal?: boolean;
|
|
21
|
+
}, never>;
|
|
22
|
+
export declare const DropdownMenuContainerButtonSecondaryShape: import("styled-components").StyledComponent<"button", any, {
|
|
23
|
+
isDisabled?: boolean;
|
|
24
|
+
isActive: boolean;
|
|
25
|
+
minimal?: boolean;
|
|
26
|
+
}, never>;
|
|
27
|
+
export declare const DropdownMenuContainerIcon: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
28
|
+
export declare const DropdownMenuContainerTitle: import("styled-components").StyledComponent<"div", any, {
|
|
29
|
+
hideChevron: boolean;
|
|
30
|
+
}, never>;
|
|
31
|
+
export declare const DropdownMenuContainerChevron: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
32
|
+
export declare const DropdownMenuContainerPortal: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@tippyjs/react").TippyProps>, any, {}, never>;
|
|
33
|
+
export declare const DropdownMenuContainerWindow: import("styled-components").StyledComponent<"div", any, {
|
|
34
|
+
$minWidth?: number | null;
|
|
35
|
+
}, never>;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import Tippy from '@tippyjs/react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { Color, FontSize, FontWeight, LineHeight, ShapeRadius, Spacing, UnitSize } from '@pushwoosh/kit-constants';
|
|
4
|
+
export const DropdownMenuContainerBox = styled.div.withConfig({
|
|
5
|
+
displayName: "DropdownMenuContainerBox",
|
|
6
|
+
componentId: "sc-1vy81n-0"
|
|
7
|
+
})(["position:relative;max-width:100%;"]);
|
|
8
|
+
export const DropdownMenuContainerButton = styled.button.withConfig({
|
|
9
|
+
displayName: "DropdownMenuContainerButton",
|
|
10
|
+
componentId: "sc-1vy81n-1"
|
|
11
|
+
})(["display:flex;flex-wrap:nowrap;align-items:center;justify-content:flex-start;max-width:100%;height:", ";padding:0 ", ";border:1px solid transparent;border-radius:", ";font-size:", ";font-weight:", ";line-height:", ";cursor:pointer;user-select:none;&:focus{outline:none;}&:disabled{cursor:not-allowed;}"], ({
|
|
12
|
+
minimal
|
|
13
|
+
}) => minimal ? UnitSize.ICON_MEDIUM : UnitSize.FIELD_HEIGHT, ({
|
|
14
|
+
minimal
|
|
15
|
+
}) => minimal ? 0 : `calc(${Spacing.S2} - 1px)`, ShapeRadius.CONTROL, FontSize.REGULAR, FontWeight.MEDIUM, LineHeight.REGULAR);
|
|
16
|
+
export const DropdownMenuContainerButtonPrimaryGhost = styled(DropdownMenuContainerButton).withConfig({
|
|
17
|
+
displayName: "DropdownMenuContainerButtonPrimaryGhost",
|
|
18
|
+
componentId: "sc-1vy81n-2"
|
|
19
|
+
})(["color:", ";background-color:", ";&:hover{color:", ";background-color:", ";}&:active{color:", ";background-color:", ";}&:disabled{color:", ";background-color:transparent;}"], ({
|
|
20
|
+
isActive
|
|
21
|
+
}) => isActive ? Color.CLEAR : Color.PRIMARY, ({
|
|
22
|
+
isActive
|
|
23
|
+
}) => isActive ? Color.MAIN : 'transparent', ({
|
|
24
|
+
isActive
|
|
25
|
+
}) => isActive ? Color.CLEAR : Color.PRIMARY_HOVER, ({
|
|
26
|
+
isActive
|
|
27
|
+
}) => isActive ? Color.MAIN : Color.BRIGHT_LIGHT, ({
|
|
28
|
+
isActive
|
|
29
|
+
}) => isActive ? Color.CLEAR : Color.PRIMARY_PRESSED, ({
|
|
30
|
+
isActive
|
|
31
|
+
}) => isActive ? Color.MAIN : Color.BRIGHT_LIGHT, Color.LOCKED);
|
|
32
|
+
export const DropdownMenuContainerButtonPrimaryShape = styled(DropdownMenuContainerButton).withConfig({
|
|
33
|
+
displayName: "DropdownMenuContainerButtonPrimaryShape",
|
|
34
|
+
componentId: "sc-1vy81n-3"
|
|
35
|
+
})(["color:", ";background-color:", ";&:hover{background-color:", ";}&:active{background-color:", ";}&:disabled{background-color:", ";}"], Color.CLEAR, ({
|
|
36
|
+
isActive
|
|
37
|
+
}) => isActive ? Color.MAIN : Color.PRIMARY, ({
|
|
38
|
+
isActive
|
|
39
|
+
}) => isActive ? Color.MAIN : Color.PRIMARY_HOVER, ({
|
|
40
|
+
isActive
|
|
41
|
+
}) => isActive ? Color.MAIN : Color.PRIMARY_PRESSED, Color.LOCKED);
|
|
42
|
+
export const DropdownMenuContainerButtonSecondaryGhost = styled(DropdownMenuContainerButton).withConfig({
|
|
43
|
+
displayName: "DropdownMenuContainerButtonSecondaryGhost",
|
|
44
|
+
componentId: "sc-1vy81n-4"
|
|
45
|
+
})(["color:", ";background-color:", ";&:hover{color:", ";background-color:", ";}&:active{color:", ";background-color:", ";}&:disabled{color:", ";background-color:transparent;}"], ({
|
|
46
|
+
isActive
|
|
47
|
+
}) => isActive ? Color.CLEAR : Color.MAIN, ({
|
|
48
|
+
isActive
|
|
49
|
+
}) => isActive ? Color.MAIN : 'transparent', ({
|
|
50
|
+
isActive
|
|
51
|
+
}) => isActive ? Color.CLEAR : Color.PRIMARY_HOVER, ({
|
|
52
|
+
isActive
|
|
53
|
+
}) => isActive ? Color.MAIN : Color.BRIGHT_LIGHT, ({
|
|
54
|
+
isActive
|
|
55
|
+
}) => isActive ? Color.CLEAR : Color.PRIMARY_PRESSED, ({
|
|
56
|
+
isActive
|
|
57
|
+
}) => isActive ? Color.MAIN : Color.BRIGHT_LIGHT, Color.LOCKED);
|
|
58
|
+
export const DropdownMenuContainerButtonSecondaryShape = styled(DropdownMenuContainerButton).withConfig({
|
|
59
|
+
displayName: "DropdownMenuContainerButtonSecondaryShape",
|
|
60
|
+
componentId: "sc-1vy81n-5"
|
|
61
|
+
})(["border:1px solid ", ";color:", ";background-color:", ";&:hover{color:", ";background-color:", ";}&:active{color:", ";background-color:", ";}&:disabled{color:", ";background-color:", ";}"], ({
|
|
62
|
+
isActive
|
|
63
|
+
}) => isActive ? 'transparent' : Color.FORM, ({
|
|
64
|
+
isActive
|
|
65
|
+
}) => isActive ? Color.CLEAR : Color.MAIN, ({
|
|
66
|
+
isActive
|
|
67
|
+
}) => isActive ? Color.MAIN : Color.FROZEN, ({
|
|
68
|
+
isActive
|
|
69
|
+
}) => isActive ? Color.CLEAR : Color.PRIMARY, ({
|
|
70
|
+
isActive
|
|
71
|
+
}) => isActive ? Color.MAIN : Color.FROZEN, ({
|
|
72
|
+
isActive
|
|
73
|
+
}) => isActive ? Color.CLEAR : Color.MAIN, ({
|
|
74
|
+
isActive
|
|
75
|
+
}) => isActive ? Color.MAIN : Color.FORM, Color.LOCKED, Color.FROZEN);
|
|
76
|
+
export const DropdownMenuContainerIcon = styled.div.withConfig({
|
|
77
|
+
displayName: "DropdownMenuContainerIcon",
|
|
78
|
+
componentId: "sc-1vy81n-6"
|
|
79
|
+
})(["flex:0 0 auto;"]);
|
|
80
|
+
export const DropdownMenuContainerTitle = styled.div.withConfig({
|
|
81
|
+
displayName: "DropdownMenuContainerTitle",
|
|
82
|
+
componentId: "sc-1vy81n-7"
|
|
83
|
+
})(["flex:1 1 auto;padding:", ";white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left;", " + &{padding:0 0 0 ", ";}"], ({
|
|
84
|
+
hideChevron
|
|
85
|
+
}) => hideChevron ? `0 ${Spacing.S2}` : `0 0 0 ${Spacing.S2}`, /* sc-selector */DropdownMenuContainerIcon, Spacing.S1);
|
|
86
|
+
export const DropdownMenuContainerChevron = styled.div.withConfig({
|
|
87
|
+
displayName: "DropdownMenuContainerChevron",
|
|
88
|
+
componentId: "sc-1vy81n-8"
|
|
89
|
+
})(["flex:0 0 auto;padding:0 ", " 0 ", ";"], Spacing.S0, Spacing.S1);
|
|
90
|
+
export const DropdownMenuContainerPortal = styled(Tippy).withConfig({
|
|
91
|
+
displayName: "DropdownMenuContainerPortal",
|
|
92
|
+
componentId: "sc-1vy81n-9"
|
|
93
|
+
})(["pointer-events:all;.tippy-box{position:static;background-color:transparent;color:inherit;border-radius:0;font-size:inherit;line-height:inherit;outline:0;transition:none;}.tippy-content{position:static;padding:0;z-index:auto;}.tippy-arrow{display:none;}"]);
|
|
94
|
+
export const DropdownMenuContainerWindow = styled.div.withConfig({
|
|
95
|
+
displayName: "DropdownMenuContainerWindow",
|
|
96
|
+
componentId: "sc-1vy81n-10"
|
|
97
|
+
})(["min-width:", ";"], ({
|
|
98
|
+
$minWidth
|
|
99
|
+
}) => $minWidth ? `${$minWidth}px` : 'auto');
|
|
100
|
+
DropdownMenuContainerBox.displayName = 'DropdownMenuContainerBox';
|
|
101
|
+
DropdownMenuContainerButton.displayName = 'DropdownMenuContainerButton';
|
|
102
|
+
DropdownMenuContainerButtonPrimaryGhost.displayName = 'DropdownMenuContainerButtonPrimaryGhost';
|
|
103
|
+
DropdownMenuContainerButtonPrimaryShape.displayName = 'DropdownMenuContainerButtonPrimaryShape';
|
|
104
|
+
DropdownMenuContainerButtonSecondaryGhost.displayName = 'DropdownMenuContainerButtonSecondaryGhost';
|
|
105
|
+
DropdownMenuContainerButtonSecondaryShape.displayName = 'DropdownMenuContainerButtonSecondaryShape';
|
|
106
|
+
DropdownMenuContainerIcon.displayName = 'DropdownMenuContainerIcon';
|
|
107
|
+
DropdownMenuContainerTitle.displayName = 'DropdownMenuContainerTitle';
|
|
108
|
+
DropdownMenuContainerChevron.displayName = 'DropdownMenuContainerChevron';
|
|
109
|
+
DropdownMenuContainerWindow.displayName = 'DropdownMenuContainerWindow';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Ref, ReactNode } from 'react';
|
|
2
|
+
type WindowPlacement = 'auto' | 'auto-start' | 'auto-end' | 'top' | 'bottom' | 'right' | 'left' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'right-start' | 'right-end' | 'left-start' | 'left-end';
|
|
3
|
+
export type DropdownMenuContainerProps = {
|
|
4
|
+
readonly boxRef?: Ref<HTMLDivElement>;
|
|
5
|
+
readonly title?: ReactNode;
|
|
6
|
+
readonly color: 'primary' | 'secondary';
|
|
7
|
+
readonly view: 'shape' | 'ghost';
|
|
8
|
+
readonly minimal?: boolean;
|
|
9
|
+
readonly hideChevron?: boolean;
|
|
10
|
+
readonly icon?: ReactNode;
|
|
11
|
+
readonly iconPlacement?: 'left' | 'right';
|
|
12
|
+
readonly windowPlacement: WindowPlacement;
|
|
13
|
+
readonly windowZIndex: number;
|
|
14
|
+
readonly isDisabled?: boolean;
|
|
15
|
+
readonly isOpen: boolean;
|
|
16
|
+
readonly onChangeIsOpen: (isOpen: boolean) => any;
|
|
17
|
+
readonly children: ReactNode;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DropdownMenuGroup } from './DropdownMenuGroup';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DropdownMenuGroup } from './DropdownMenuGroup';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DropdownMenuGroupBox: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { Color, Spacing } from '@pushwoosh/kit-constants';
|
|
3
|
+
export const DropdownMenuGroupBox = styled.div.withConfig({
|
|
4
|
+
displayName: "DropdownMenuGroupBox",
|
|
5
|
+
componentId: "sc-hgafu1-0"
|
|
6
|
+
})(["padding:", " 0;& + &{border-top:1px solid ", ";}"], Spacing.S3, Color.FORM);
|
|
7
|
+
DropdownMenuGroupBox.displayName = 'DropdownMenuGroupBox';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type ReactElement } from 'react';
|
|
2
|
+
import type { DropdownMenuItemPropsWithoutAs, DropdownMenuItemPropsWithAsTag, DropdownMenuItemPropsWithAsComponent } from './types';
|
|
3
|
+
export declare function DropdownMenuItem(props: DropdownMenuItemPropsWithoutAs): ReactElement;
|
|
4
|
+
export declare function DropdownMenuItem<AS extends keyof HTMLElementTagNameMap>(props: DropdownMenuItemPropsWithAsTag<AS>): ReactElement;
|
|
5
|
+
export declare function DropdownMenuItem<OuterProps extends object>(props: DropdownMenuItemPropsWithAsComponent<OuterProps>): ReactElement;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React, { useCallback } from 'react';
|
|
2
|
+
import { useDropdownMenuContext } from '../DropdownMenu';
|
|
3
|
+
import { DropdownMenuItemBox } from './styles';
|
|
4
|
+
export function DropdownMenuItem(props) {
|
|
5
|
+
const {
|
|
6
|
+
boxRef,
|
|
7
|
+
color,
|
|
8
|
+
isInteractive,
|
|
9
|
+
isDisabled,
|
|
10
|
+
onClick,
|
|
11
|
+
onChange,
|
|
12
|
+
...rest
|
|
13
|
+
} = props;
|
|
14
|
+
const {
|
|
15
|
+
closeDropdown
|
|
16
|
+
} = useDropdownMenuContext();
|
|
17
|
+
const handleClick = useCallback(event => {
|
|
18
|
+
onClick === null || onClick === void 0 || onClick(event);
|
|
19
|
+
if (!isInteractive && !isDisabled && !onChange) {
|
|
20
|
+
closeDropdown();
|
|
21
|
+
}
|
|
22
|
+
}, [isDisabled, isInteractive, onClick, onChange, closeDropdown]);
|
|
23
|
+
const handleChange = useCallback(event => {
|
|
24
|
+
onChange === null || onChange === void 0 || onChange(event);
|
|
25
|
+
if (!isInteractive && !isDisabled) {
|
|
26
|
+
closeDropdown();
|
|
27
|
+
}
|
|
28
|
+
}, [isDisabled, isInteractive, onChange, closeDropdown]);
|
|
29
|
+
return React.createElement(DropdownMenuItemBox, {
|
|
30
|
+
ref: boxRef,
|
|
31
|
+
"$color": color,
|
|
32
|
+
"$isDisabled": isDisabled,
|
|
33
|
+
disabled: isDisabled,
|
|
34
|
+
onClick: handleClick,
|
|
35
|
+
onChange: handleChange,
|
|
36
|
+
...rest
|
|
37
|
+
});
|
|
38
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { Color, FontSize, FontWeight, LineHeight, Spacing } from '@pushwoosh/kit-constants';
|
|
3
|
+
export const DropdownMenuItemBox = styled.a.withConfig({
|
|
4
|
+
displayName: "DropdownMenuItemBox",
|
|
5
|
+
componentId: "sc-1wmyvxp-0"
|
|
6
|
+
})(["display:block;width:100%;padding:", " ", ";appearance:none;background:transparent;border:none;color:", ";font-size:", ";font-weight:", ";line-height:", ";white-space:nowrap;text-decoration:none;text-align:left;cursor:", ";user-select:none;&:hover{background:", ";color:", ";text-decoration:none;}&:active{background:", ";color:", ";pointer-events:", ";}"], Spacing.S3, Spacing.S4, ({
|
|
7
|
+
$color,
|
|
8
|
+
$isDisabled
|
|
9
|
+
}) => {
|
|
10
|
+
if ($isDisabled) {
|
|
11
|
+
return Color.LOCKED;
|
|
12
|
+
}
|
|
13
|
+
switch ($color) {
|
|
14
|
+
case 'primary':
|
|
15
|
+
return Color.PRIMARY;
|
|
16
|
+
case 'danger':
|
|
17
|
+
return Color.DANGER;
|
|
18
|
+
default:
|
|
19
|
+
return Color.MAIN;
|
|
20
|
+
}
|
|
21
|
+
}, FontSize.REGULAR, FontWeight.REGULAR, LineHeight.REGULAR, ({
|
|
22
|
+
$isDisabled
|
|
23
|
+
}) => $isDisabled ? 'not-allowed' : 'pointer', ({
|
|
24
|
+
$isDisabled
|
|
25
|
+
}) => $isDisabled ? 'transparent' : Color.SOFT_LIGHT, ({
|
|
26
|
+
$color,
|
|
27
|
+
$isDisabled
|
|
28
|
+
}) => {
|
|
29
|
+
if ($isDisabled) {
|
|
30
|
+
return Color.LOCKED;
|
|
31
|
+
}
|
|
32
|
+
switch ($color) {
|
|
33
|
+
case 'primary':
|
|
34
|
+
return Color.PRIMARY_HOVER;
|
|
35
|
+
case 'danger':
|
|
36
|
+
return Color.DANGER_HOVER;
|
|
37
|
+
default:
|
|
38
|
+
return Color.MAIN;
|
|
39
|
+
}
|
|
40
|
+
}, ({
|
|
41
|
+
$color,
|
|
42
|
+
$isDisabled
|
|
43
|
+
}) => {
|
|
44
|
+
if ($isDisabled) {
|
|
45
|
+
return 'transparent';
|
|
46
|
+
}
|
|
47
|
+
switch ($color) {
|
|
48
|
+
case 'primary':
|
|
49
|
+
return Color.BRIGHT_LIGHT;
|
|
50
|
+
case 'danger':
|
|
51
|
+
return Color.DANGER_LIGHT;
|
|
52
|
+
default:
|
|
53
|
+
return Color.BRIGHT_LIGHT;
|
|
54
|
+
}
|
|
55
|
+
}, ({
|
|
56
|
+
$color,
|
|
57
|
+
$isDisabled
|
|
58
|
+
}) => {
|
|
59
|
+
if ($isDisabled) {
|
|
60
|
+
return Color.LOCKED;
|
|
61
|
+
}
|
|
62
|
+
switch ($color) {
|
|
63
|
+
case 'primary':
|
|
64
|
+
return Color.PRIMARY_PRESSED;
|
|
65
|
+
case 'danger':
|
|
66
|
+
return Color.DANGER_PRESSED;
|
|
67
|
+
default:
|
|
68
|
+
return Color.PRIMARY_PRESSED;
|
|
69
|
+
}
|
|
70
|
+
}, ({
|
|
71
|
+
$isDisabled
|
|
72
|
+
}) => $isDisabled ? 'none' : 'auto');
|
|
73
|
+
DropdownMenuItemBox.displayName = 'DropdownMenuItemBox';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { JSX, Ref, ComponentType } from 'react';
|
|
2
|
+
export type DropdownMenuItemColor = 'main' | 'primary' | 'danger';
|
|
3
|
+
export type DropdownMenuItemPropsWithoutAs = Omit<JSX.IntrinsicElements['a'], 'ref'> & {
|
|
4
|
+
readonly boxRef?: Ref<HTMLAnchorElement>;
|
|
5
|
+
readonly color: DropdownMenuItemColor;
|
|
6
|
+
readonly title: string;
|
|
7
|
+
readonly href: string;
|
|
8
|
+
readonly isInteractive?: boolean;
|
|
9
|
+
readonly isDisabled?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export type DropdownMenuItemPropsWithAsTag<AS extends keyof HTMLElementTagNameMap> = Omit<JSX.IntrinsicElements[AS], 'ref'> & {
|
|
12
|
+
readonly boxRef?: Ref<HTMLElementTagNameMap[AS]>;
|
|
13
|
+
readonly as: AS;
|
|
14
|
+
readonly color: DropdownMenuItemColor;
|
|
15
|
+
readonly isInteractive?: boolean;
|
|
16
|
+
readonly isDisabled?: boolean;
|
|
17
|
+
};
|
|
18
|
+
export type DropdownMenuItemPropsWithAsComponent<OuterProps extends object> = OuterProps & {
|
|
19
|
+
readonly boxRef?: Ref<HTMLElement>;
|
|
20
|
+
readonly as: ComponentType<OuterProps>;
|
|
21
|
+
readonly color: DropdownMenuItemColor;
|
|
22
|
+
readonly isInteractive?: boolean;
|
|
23
|
+
readonly isDisabled?: boolean;
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Checkbox } from '@pushwoosh/kit-checkbox';
|
|
3
|
+
import { DropdownMenuItemCheckboxBox } from './styles';
|
|
4
|
+
export function DropdownMenuItemCheckbox(props) {
|
|
5
|
+
return React.createElement(DropdownMenuItemCheckboxBox, null, React.createElement(Checkbox, {
|
|
6
|
+
color: "main",
|
|
7
|
+
...props
|
|
8
|
+
}));
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DropdownMenuItemCheckbox } from './DropdownMenuItemCheckbox';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DropdownMenuItemCheckbox } from './DropdownMenuItemCheckbox';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DropdownMenuItemCheckboxBox: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { FontWeight, Spacing } from '@pushwoosh/kit-constants';
|
|
3
|
+
import { DropdownMenuItemBox } from '../DropdownMenuItem';
|
|
4
|
+
export const DropdownMenuItemCheckboxBox = styled.div.withConfig({
|
|
5
|
+
displayName: "DropdownMenuItemCheckboxBox",
|
|
6
|
+
componentId: "sc-wl9da7-0"
|
|
7
|
+
})(["padding:", " ", ";", "{padding:", " ", " ", " calc(", " - 3px);}label{font-weight:", ";}"], Spacing.S1, Spacing.S3, DropdownMenuItemBox, Spacing.S3, Spacing.S4, Spacing.S3, Spacing.S4, FontWeight.REGULAR);
|
|
8
|
+
DropdownMenuItemCheckboxBox.displayName = 'DropdownMenuItemCheckboxBox';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Radio } from '../../../Radio';
|
|
3
|
+
import { DropdownMenuItem } from '../DropdownMenuItem';
|
|
4
|
+
import { DropdownMenuItemPickBox } from './styles';
|
|
5
|
+
export function DropdownMenuItemPick(props) {
|
|
6
|
+
const {
|
|
7
|
+
isChecked
|
|
8
|
+
} = props;
|
|
9
|
+
return React.createElement(DropdownMenuItemPickBox, {
|
|
10
|
+
"$isChecked": isChecked
|
|
11
|
+
}, React.createElement(DropdownMenuItem, {
|
|
12
|
+
as: Radio,
|
|
13
|
+
...props,
|
|
14
|
+
color: "main"
|
|
15
|
+
}));
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DropdownMenuItemPick } from './DropdownMenuItemPick';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DropdownMenuItemPick } from './DropdownMenuItemPick';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { DropdownMenuItemBox } from '../DropdownMenuItem';
|
|
3
|
+
export const DropdownMenuItemPickBox = styled.div.withConfig({
|
|
4
|
+
displayName: "DropdownMenuItemPickBox",
|
|
5
|
+
componentId: "sc-k4izj2-0"
|
|
6
|
+
})(["", "{pointer-events:", ";}"], DropdownMenuItemBox, ({
|
|
7
|
+
$isChecked
|
|
8
|
+
}) => $isChecked ? 'none' : 'all');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DropdownMenuItemRadioBox } from './styles';
|
|
3
|
+
import { Radio } from '../../../Radio';
|
|
4
|
+
export function DropdownMenuItemRadio(props) {
|
|
5
|
+
return React.createElement(DropdownMenuItemRadioBox, null, React.createElement(Radio, {
|
|
6
|
+
color: "main",
|
|
7
|
+
...props
|
|
8
|
+
}));
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DropdownMenuItemRadio } from './DropdownMenuItemRadio';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DropdownMenuItemRadio } from './DropdownMenuItemRadio';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DropdownMenuItemRadioBox: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { FontWeight, Spacing } from '@pushwoosh/kit-constants';
|
|
3
|
+
import { DropdownMenuItemBox } from '../DropdownMenuItem';
|
|
4
|
+
export const DropdownMenuItemRadioBox = styled.div.withConfig({
|
|
5
|
+
displayName: "DropdownMenuItemRadioBox",
|
|
6
|
+
componentId: "sc-xu32yy-0"
|
|
7
|
+
})(["padding:", " ", ";", "{padding:", " ", " ", " calc(", " - 3px);}label{font-weight:", ";}input{flex-shrink:0;}"], Spacing.S1, Spacing.S3, DropdownMenuItemBox, Spacing.S3, Spacing.S4, Spacing.S3, Spacing.S4, FontWeight.REGULAR);
|
|
8
|
+
DropdownMenuItemRadioBox.displayName = 'DropdownMenuItemRadioBox';
|