@plesk/ui-library 3.31.2 → 3.32.0
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/cjs/components/Action/Action.js +20 -12
- package/cjs/components/Alert/Alert.js +9 -8
- package/cjs/components/Alert/Alert.stories.js +19 -12
- package/cjs/components/AutoClosable/AutoClosable.js +7 -9
- package/cjs/components/AuxiliaryActions/AuxiliaryActions.js +14 -12
- package/cjs/components/Badge/Badge.js +11 -10
- package/cjs/components/Breadcrumbs/Breadcrumbs.js +18 -15
- package/cjs/components/Button/Button.js +34 -25
- package/cjs/components/Button/Button.stories.js +82 -49
- package/cjs/components/Button/ButtonContext.js +27 -0
- package/cjs/components/ButtonGroup/ButtonGroup.js +6 -5
- package/cjs/components/Card/Card.js +132 -109
- package/cjs/components/Card/CardButton.js +5 -4
- package/cjs/components/Card/PreviewPanel.js +24 -21
- package/cjs/components/CardList/CardList.js +57 -50
- package/cjs/components/CardList/CardListToolbar.js +47 -40
- package/cjs/components/Carousel/Carousel.js +42 -35
- package/cjs/components/Checkbox/Checkbox.js +27 -22
- package/cjs/components/ClosingConfirmation/useClosingConfirmation.js +24 -22
- package/cjs/components/CodeEditor/CodeEditor.js +5 -5
- package/cjs/components/Columns/Column.js +7 -7
- package/cjs/components/Columns/Columns.js +18 -14
- package/cjs/components/ComboBox/ComboBox.js +17 -13
- package/cjs/components/ComboBox/ComboBoxOption.js +2 -3
- package/cjs/components/ComboBoxDropdown/ComboBoxDropdown.js +73 -68
- package/cjs/components/ConsoleOutput/ConsoleOutput.js +9 -9
- package/cjs/components/ContentLoader/ContentLoader.js +24 -16
- package/cjs/components/ContentLoader/IconsLoader.js +19 -17
- package/cjs/components/Cuttable/Cuttable.js +33 -30
- package/cjs/components/Cuttable/Cuttable.stories.js +27 -5
- package/cjs/components/Dialog/Dialog.js +74 -54
- package/cjs/components/Dialog/Dialog.stories.js +18 -14
- package/cjs/components/Drawer/Drawer.js +60 -50
- package/cjs/components/Drawer/Drawer.stories.js +24 -16
- package/cjs/components/Drawer/DrawerProgress.js +40 -31
- package/cjs/components/Drawer/Header.js +34 -26
- package/cjs/components/Dropdown/Dropdown.js +49 -41
- package/cjs/components/ExtendedStatusMessage/ExtendedStatusMessage.js +21 -17
- package/cjs/components/ExtendedStatusMessage/ExtendedStatusMessageActions.js +6 -5
- package/cjs/components/ExtendedStatusMessage/ExtendedStatusMessageDescription.js +6 -5
- package/cjs/components/ExtendedStatusMessage/ExtendedStatusMessageSeparator.js +5 -5
- package/cjs/components/ExtendedStatusMessage/ExtendedStatusMessageTitle.js +6 -5
- package/cjs/components/Figure/Figure.js +12 -9
- package/cjs/components/FocusTrap/FocusTrap.js +13 -14
- package/cjs/components/Form/Form.js +89 -75
- package/cjs/components/Form/Form.stories.js +8 -9
- package/cjs/components/FormField/FormField.js +55 -50
- package/cjs/components/FormFieldCheckbox/FormFieldCheckbox.js +36 -29
- package/cjs/components/FormFieldCheckbox/FormFieldCheckbox.stories.js +9 -3
- package/cjs/components/FormFieldPassword/FormFieldPassword.js +74 -66
- package/cjs/components/FormFieldPassword/PasswordMeter.js +34 -23
- package/cjs/components/FormFieldPassword/estimatePassword.js +11 -11
- package/cjs/components/FormFieldRadioButtons/FormFieldRadioButtons.js +54 -50
- package/cjs/components/FormFieldSelect/FormFieldSelect.js +26 -24
- package/cjs/components/FormFieldText/FormFieldText.js +39 -35
- package/cjs/components/Grid/Grid.js +16 -13
- package/cjs/components/GridCol/GridCol.js +7 -7
- package/cjs/components/Heading/Heading.js +12 -10
- package/cjs/components/Hint/Hint.js +6 -5
- package/cjs/components/Icon/Icon.js +15 -14
- package/cjs/components/Icon/Icon.stories.js +15 -12
- package/cjs/components/Icon/utils.js +9 -6
- package/cjs/components/InPlaceEdit/InPlaceEdit.js +54 -49
- package/cjs/components/Input/Input.js +18 -14
- package/cjs/components/InputFile/InputFile.js +45 -42
- package/cjs/components/InputNumber/InputNumber.js +8 -10
- package/cjs/components/Item/Item.js +34 -22
- package/cjs/components/ItemLink/ItemLink.js +9 -7
- package/cjs/components/ItemLink/ItemLink.stories.js +4 -2
- package/cjs/components/ItemList/ItemList.js +39 -31
- package/cjs/components/ItemList/ItemList.stories.js +26 -27
- package/cjs/components/Label/Label.js +41 -8
- package/cjs/components/Layer/Layer.js +11 -10
- package/cjs/components/Layout/Layout.js +129 -101
- package/cjs/components/Link/Link.js +10 -10
- package/cjs/components/List/List.js +338 -279
- package/cjs/components/List/List.stories.js +21 -19
- package/cjs/components/List/ListAction.js +10 -8
- package/cjs/components/List/ListActions.js +21 -19
- package/cjs/components/List/ListActionsDivider.js +4 -3
- package/cjs/components/List/ListEmptyView.js +38 -23
- package/cjs/components/List/ListOperation.js +28 -21
- package/cjs/components/LocaleProvider/LocaleProvider.js +6 -6
- package/cjs/components/Markdown/Markdown.js +5 -4
- package/cjs/components/Media/Media.js +30 -22
- package/cjs/components/Media/MediaSection.js +7 -6
- package/cjs/components/Menu/Menu.js +7 -6
- package/cjs/components/Menu/Menu.stories.js +35 -33
- package/cjs/components/Menu/MenuBaseItem.js +18 -14
- package/cjs/components/Menu/MenuDivider.js +6 -6
- package/cjs/components/Menu/MenuHeader.js +7 -6
- package/cjs/components/Menu/MenuItem.js +12 -9
- package/cjs/components/Menu/MenuSelectableItem.js +7 -6
- package/cjs/components/Overlay/Backdrop.js +5 -4
- package/cjs/components/Overlay/Overlay.js +63 -52
- package/cjs/components/PageHeader/PageHeader.js +36 -25
- package/cjs/components/Pagination/Pagination.js +72 -66
- package/cjs/components/Panel/Panel.js +38 -36
- package/cjs/components/Paragraph/Paragraph.js +6 -5
- package/cjs/components/Plaintext/Plaintext.js +5 -3
- package/cjs/components/Popover/Popover.js +43 -34
- package/cjs/components/Popover/Popover.stories.js +33 -15
- package/cjs/components/Popper/Popper.js +19 -17
- package/cjs/components/Progress/Progress.js +6 -4
- package/cjs/components/ProgressBar/ProgressBar.js +10 -10
- package/cjs/components/ProgressBar/ProgressIndicator.js +5 -5
- package/cjs/components/ProgressDialog/ProgressDialog.js +16 -13
- package/cjs/components/ProgressDialogStep/ProgressDialogStep.js +5 -3
- package/cjs/components/ProgressStep/ProgressStep.js +34 -23
- package/cjs/components/Radio/Radio.js +21 -18
- package/cjs/components/Rating/Rating.js +10 -8
- package/cjs/components/Section/Section.js +55 -50
- package/cjs/components/Section/SectionItem.js +12 -8
- package/cjs/components/SegmentedControl/SegmentedControl.js +86 -75
- package/cjs/components/Select/MultiValue.js +26 -21
- package/cjs/components/Select/Select.js +8 -7
- package/cjs/components/Select/Select.stories.js +41 -40
- package/cjs/components/Select/SelectControl.js +87 -77
- package/cjs/components/Select/SelectOption.js +2 -3
- package/cjs/components/Select/SelectOptionGroup.js +2 -3
- package/cjs/components/Skeleton/Skeleton.js +5 -5
- package/cjs/components/Skeleton/Skeleton.stories.js +7 -3
- package/cjs/components/Skeleton/SkeletonTabs.js +11 -10
- package/cjs/components/Skeleton/SkeletonTabs.stories.js +4 -2
- package/cjs/components/Skeleton/SkeletonText.js +13 -13
- package/cjs/components/Skeleton/SkeletonText.stories.js +10 -4
- package/cjs/components/Spinner/Spinner.js +15 -15
- package/cjs/components/SplitButton/SplitButton.js +18 -14
- package/cjs/components/Spot/Spot.js +19 -15
- package/cjs/components/Spot/SpotPopup.js +33 -29
- package/cjs/components/Spot/SpotPulsar.js +12 -13
- package/cjs/components/Squeezer/Squeezer.js +11 -13
- package/cjs/components/Status/Status.js +7 -7
- package/cjs/components/Status/Status.stories.js +4 -2
- package/cjs/components/StatusMessage/StatusMessage.js +9 -8
- package/cjs/components/Subnav/Subnav.js +7 -6
- package/cjs/components/Switch/Switch.js +21 -17
- package/cjs/components/SwitchesPanel/SwitchesPanel.js +11 -8
- package/cjs/components/SwitchesPanelItem/SwitchesPanelItem.js +34 -26
- package/cjs/components/Tabs/SearchBar.js +57 -51
- package/cjs/components/Tabs/Tab.js +5 -3
- package/cjs/components/Tabs/Tabs.js +157 -129
- package/cjs/components/Tabs/Tabs.stories.js +8 -6
- package/cjs/components/Text/Text.js +7 -7
- package/cjs/components/TextArea/TextArea.js +6 -7
- package/cjs/components/Toast/Toast.js +32 -29
- package/cjs/components/Toaster/Toaster.js +54 -48
- package/cjs/components/Toolbar/Toolbar.js +19 -14
- package/cjs/components/Toolbar/ToolbarExpander.js +7 -7
- package/cjs/components/Toolbar/ToolbarGroup.js +23 -17
- package/cjs/components/Toolbar/ToolbarItem.js +11 -9
- package/cjs/components/Toolbar/ToolbarMenu.js +21 -15
- package/cjs/components/Tooltip/Tooltip.js +26 -21
- package/cjs/components/Tour/Tour.js +3 -4
- package/cjs/components/Translate/Translate.js +4 -1
- package/cjs/components/utils.js +4 -8
- package/cjs/index.js +1 -1
- package/cjs/utils.js +0 -2
- package/dist/.DS_Store +0 -0
- package/dist/plesk-ui-library-rtl.css +1 -1
- package/dist/plesk-ui-library-rtl.css.map +1 -1
- package/dist/plesk-ui-library.css +1 -1
- package/dist/plesk-ui-library.css.map +1 -1
- package/dist/plesk-ui-library.js +4755 -2803
- package/dist/plesk-ui-library.js.map +1 -1
- package/dist/plesk-ui-library.min.js +19 -6
- package/dist/plesk-ui-library.min.js.map +1 -1
- package/esm/components/Action/Action.js +21 -12
- package/esm/components/Alert/Alert.js +10 -8
- package/esm/components/Alert/Alert.stories.js +21 -12
- package/esm/components/AutoClosable/AutoClosable.js +7 -7
- package/esm/components/AuxiliaryActions/AuxiliaryActions.js +14 -10
- package/esm/components/Badge/Badge.js +12 -8
- package/esm/components/Breadcrumbs/Breadcrumbs.js +19 -13
- package/esm/components/Button/Button.js +35 -26
- package/esm/components/Button/Button.stories.js +84 -49
- package/esm/components/Button/ButtonContext.js +18 -0
- package/esm/components/ButtonGroup/ButtonGroup.js +6 -5
- package/esm/components/Card/Card.js +133 -109
- package/esm/components/Card/CardButton.js +5 -4
- package/esm/components/Card/PreviewPanel.js +25 -19
- package/esm/components/CardList/CardList.js +58 -50
- package/esm/components/CardList/CardListToolbar.js +47 -40
- package/esm/components/Carousel/Carousel.js +43 -35
- package/esm/components/Checkbox/Checkbox.js +28 -22
- package/esm/components/ClosingConfirmation/useClosingConfirmation.js +24 -20
- package/esm/components/CodeEditor/CodeEditor.js +5 -6
- package/esm/components/Columns/Column.js +7 -5
- package/esm/components/Columns/Columns.js +18 -14
- package/esm/components/ComboBox/ComboBox.js +17 -13
- package/esm/components/ComboBox/ComboBoxOption.js +2 -2
- package/esm/components/ComboBoxDropdown/ComboBoxDropdown.js +75 -68
- package/esm/components/ConsoleOutput/ConsoleOutput.js +10 -7
- package/esm/components/ContentLoader/ContentLoader.js +25 -14
- package/esm/components/ContentLoader/IconsLoader.js +20 -15
- package/esm/components/Cuttable/Cuttable.js +34 -28
- package/esm/components/Cuttable/Cuttable.stories.js +29 -5
- package/esm/components/Dialog/Dialog.js +75 -53
- package/esm/components/Dialog/Dialog.stories.js +20 -12
- package/esm/components/Drawer/Drawer.js +61 -50
- package/esm/components/Drawer/Drawer.stories.js +26 -14
- package/esm/components/Drawer/DrawerProgress.js +41 -31
- package/esm/components/Drawer/Header.js +35 -26
- package/esm/components/Dropdown/Dropdown.js +51 -41
- package/esm/components/ExtendedStatusMessage/ExtendedStatusMessage.js +22 -17
- package/esm/components/ExtendedStatusMessage/ExtendedStatusMessageActions.js +6 -5
- package/esm/components/ExtendedStatusMessage/ExtendedStatusMessageDescription.js +6 -5
- package/esm/components/ExtendedStatusMessage/ExtendedStatusMessageSeparator.js +5 -5
- package/esm/components/ExtendedStatusMessage/ExtendedStatusMessageTitle.js +6 -5
- package/esm/components/Figure/Figure.js +13 -9
- package/esm/components/FocusTrap/FocusTrap.js +14 -11
- package/esm/components/Form/Form.js +90 -75
- package/esm/components/Form/Form.stories.js +8 -9
- package/esm/components/FormField/FormField.js +56 -50
- package/esm/components/FormFieldCheckbox/FormFieldCheckbox.js +38 -29
- package/esm/components/FormFieldCheckbox/FormFieldCheckbox.stories.js +9 -3
- package/esm/components/FormFieldPassword/FormFieldPassword.js +75 -64
- package/esm/components/FormFieldPassword/PasswordMeter.js +36 -23
- package/esm/components/FormFieldPassword/estimatePassword.js +11 -11
- package/esm/components/FormFieldRadioButtons/FormFieldRadioButtons.js +55 -50
- package/esm/components/FormFieldSelect/FormFieldSelect.js +26 -24
- package/esm/components/FormFieldText/FormFieldText.js +39 -35
- package/esm/components/Grid/Grid.js +16 -13
- package/esm/components/GridCol/GridCol.js +6 -5
- package/esm/components/Heading/Heading.js +13 -10
- package/esm/components/Hint/Hint.js +6 -5
- package/esm/components/Icon/Icon.js +15 -12
- package/esm/components/Icon/Icon.stories.js +15 -12
- package/esm/components/Icon/utils.js +9 -6
- package/esm/components/InPlaceEdit/InPlaceEdit.js +55 -49
- package/esm/components/Input/Input.js +19 -14
- package/esm/components/InputFile/InputFile.js +47 -40
- package/esm/components/InputNumber/InputNumber.js +8 -8
- package/esm/components/Item/Item.js +35 -22
- package/esm/components/ItemLink/ItemLink.js +9 -7
- package/esm/components/ItemLink/ItemLink.stories.js +4 -2
- package/esm/components/ItemList/ItemList.js +39 -31
- package/esm/components/ItemList/ItemList.stories.js +26 -25
- package/esm/components/Label/Label.js +42 -8
- package/esm/components/Layer/Layer.js +11 -8
- package/esm/components/Layout/Layout.js +130 -101
- package/esm/components/Link/Link.js +11 -9
- package/esm/components/List/List.js +341 -280
- package/esm/components/List/List.stories.js +22 -17
- package/esm/components/List/ListAction.js +10 -8
- package/esm/components/List/ListActions.js +22 -17
- package/esm/components/List/ListActionsDivider.js +4 -2
- package/esm/components/List/ListEmptyView.js +39 -23
- package/esm/components/List/ListOperation.js +29 -19
- package/esm/components/LocaleProvider/LocaleProvider.js +6 -4
- package/esm/components/Markdown/Markdown.js +5 -4
- package/esm/components/Media/Media.js +31 -22
- package/esm/components/Media/MediaSection.js +6 -4
- package/esm/components/Menu/Menu.js +7 -6
- package/esm/components/Menu/Menu.stories.js +35 -33
- package/esm/components/Menu/MenuBaseItem.js +18 -12
- package/esm/components/Menu/MenuDivider.js +5 -4
- package/esm/components/Menu/MenuHeader.js +6 -4
- package/esm/components/Menu/MenuItem.js +11 -7
- package/esm/components/Menu/MenuSelectableItem.js +6 -4
- package/esm/components/Overlay/Backdrop.js +5 -4
- package/esm/components/Overlay/Overlay.js +65 -53
- package/esm/components/PageHeader/PageHeader.js +37 -23
- package/esm/components/Pagination/Pagination.js +73 -66
- package/esm/components/Panel/Panel.js +39 -34
- package/esm/components/Paragraph/Paragraph.js +6 -5
- package/esm/components/Plaintext/Plaintext.js +5 -3
- package/esm/components/Popover/Popover.js +44 -34
- package/esm/components/Popover/Popover.stories.js +35 -15
- package/esm/components/Popper/Popper.js +19 -15
- package/esm/components/Progress/Progress.js +6 -4
- package/esm/components/ProgressBar/ProgressBar.js +10 -8
- package/esm/components/ProgressBar/ProgressIndicator.js +5 -5
- package/esm/components/ProgressDialog/ProgressDialog.js +17 -13
- package/esm/components/ProgressDialogStep/ProgressDialogStep.js +4 -1
- package/esm/components/ProgressStep/ProgressStep.js +35 -23
- package/esm/components/Radio/Radio.js +22 -18
- package/esm/components/Rating/Rating.js +10 -8
- package/esm/components/Section/Section.js +56 -50
- package/esm/components/Section/SectionItem.js +13 -8
- package/esm/components/SegmentedControl/SegmentedControl.js +87 -75
- package/esm/components/Select/MultiValue.js +27 -21
- package/esm/components/Select/Select.js +8 -7
- package/esm/components/Select/Select.stories.js +41 -40
- package/esm/components/Select/SelectControl.js +88 -75
- package/esm/components/Select/SelectOption.js +2 -2
- package/esm/components/Select/SelectOptionGroup.js +2 -2
- package/esm/components/Skeleton/Skeleton.js +5 -5
- package/esm/components/Skeleton/Skeleton.stories.js +7 -3
- package/esm/components/Skeleton/SkeletonTabs.js +11 -10
- package/esm/components/Skeleton/SkeletonTabs.stories.js +4 -2
- package/esm/components/Skeleton/SkeletonText.js +13 -13
- package/esm/components/Skeleton/SkeletonText.stories.js +10 -4
- package/esm/components/Spinner/Spinner.js +15 -15
- package/esm/components/SplitButton/SplitButton.js +19 -14
- package/esm/components/Spot/Spot.js +19 -13
- package/esm/components/Spot/SpotPopup.js +34 -28
- package/esm/components/Spot/SpotPulsar.js +13 -11
- package/esm/components/Squeezer/Squeezer.js +11 -11
- package/esm/components/Status/Status.js +7 -5
- package/esm/components/Status/Status.stories.js +4 -2
- package/esm/components/StatusMessage/StatusMessage.js +10 -8
- package/esm/components/Subnav/Subnav.js +7 -6
- package/esm/components/Switch/Switch.js +22 -17
- package/esm/components/SwitchesPanel/SwitchesPanel.js +11 -8
- package/esm/components/SwitchesPanelItem/SwitchesPanelItem.js +35 -26
- package/esm/components/Tabs/SearchBar.js +60 -52
- package/esm/components/Tabs/Tab.js +4 -1
- package/esm/components/Tabs/Tabs.js +158 -129
- package/esm/components/Tabs/Tabs.stories.js +8 -6
- package/esm/components/Text/Text.js +7 -5
- package/esm/components/TextArea/TextArea.js +6 -5
- package/esm/components/Toast/Toast.js +33 -27
- package/esm/components/Toaster/Toaster.js +54 -46
- package/esm/components/Toolbar/Toolbar.js +19 -14
- package/esm/components/Toolbar/ToolbarExpander.js +7 -5
- package/esm/components/Toolbar/ToolbarGroup.js +22 -15
- package/esm/components/Toolbar/ToolbarItem.js +11 -7
- package/esm/components/Toolbar/ToolbarMenu.js +21 -15
- package/esm/components/Tooltip/Tooltip.js +27 -21
- package/esm/components/Tour/Tour.js +3 -2
- package/esm/components/Translate/Translate.js +4 -1
- package/esm/components/utils.js +4 -8
- package/esm/index.js +1 -1
- package/esm/utils.js +1 -3
- package/package.json +56 -60
- package/styleguide/build/bundle.57b0e524.js +2 -0
- package/styleguide/build/{bundle.26082873.js.LICENSE.txt → bundle.57b0e524.js.LICENSE.txt} +13 -4
- package/styleguide/index.html +2 -2
- package/types/src/components/Alert/Alert.stories.d.ts +5 -8
- package/types/src/components/AutoClosable/AutoClosable.d.ts +2 -23
- package/types/src/components/Button/Button.stories.d.ts +4 -2
- package/types/src/components/Button/ButtonContext.d.ts +8 -0
- package/types/src/components/ClosingConfirmation/useClosingConfirmation.d.ts +2 -2
- package/types/src/components/Cuttable/Cuttable.d.ts +2 -2
- package/types/src/components/Cuttable/Cuttable.stories.d.ts +6 -23
- package/types/src/components/Dialog/Dialog.stories.d.ts +6 -2
- package/types/src/components/Drawer/Drawer.stories.d.ts +8 -4
- package/types/src/components/Drawer/DrawerProgress.d.ts +1 -1
- package/types/src/components/FocusTrap/FocusTrap.d.ts +2 -2
- package/types/src/components/Form/Form.d.ts +17 -17
- package/types/src/components/Form/Form.stories.d.ts +3 -1
- package/types/src/components/FormFieldCheckbox/FormFieldCheckbox.stories.d.ts +6 -2
- package/types/src/components/FormFieldSelect/FormFieldSelect.d.ts +0 -1
- package/types/src/components/Icon/Icon.d.ts +0 -1
- package/types/src/components/Icon/Icon.stories.d.ts +3 -1
- package/types/src/components/Input/Input.d.ts +0 -1
- package/types/src/components/ItemLink/ItemLink.stories.d.ts +5 -7
- package/types/src/components/ItemList/ItemList.d.ts +2 -2
- package/types/src/components/ItemList/ItemList.stories.d.ts +46 -175
- package/types/src/components/Label/Label.d.ts +32 -5
- package/types/src/components/Layer/Layer.d.ts +3 -3
- package/types/src/components/List/List.stories.d.ts +9 -7
- package/types/src/components/List/ListActionsDivider.d.ts +4 -4
- package/types/src/components/Menu/Menu.stories.d.ts +5 -3
- package/types/src/components/Panel/Panel.d.ts +2 -2
- package/types/src/components/Popover/Popover.stories.d.ts +7 -3
- package/types/src/components/Select/Select.d.ts +0 -1
- package/types/src/components/Select/Select.stories.d.ts +5 -16
- package/types/src/components/Select/SelectControl.d.ts +2 -2
- package/types/src/components/Skeleton/Skeleton.d.ts +1 -1
- package/types/src/components/Skeleton/Skeleton.stories.d.ts +6 -3
- package/types/src/components/Skeleton/SkeletonTabs.stories.d.ts +5 -6
- package/types/src/components/Skeleton/SkeletonText.d.ts +1 -1
- package/types/src/components/Skeleton/SkeletonText.stories.d.ts +7 -22
- package/types/src/components/Spot/SpotPulsar.d.ts +2 -3
- package/types/src/components/Status/Status.stories.d.ts +5 -16
- package/types/src/components/Tabs/Tabs.stories.d.ts +5 -1
- package/types/src/components/TextArea/TextArea.d.ts +4 -4
- package/types/src/components/Toolbar/ToolbarItem.d.ts +2 -2
- package/types/src/components/Toolbar/ToolbarMenu.d.ts +2 -2
- package/types/src/components/utils.d.ts +5 -5
- package/types/src/utils.d.ts +0 -1
- package/cjs/components/Drawer/ScrollDirection.js +0 -45
- package/esm/components/Drawer/ScrollDirection.js +0 -37
- package/styleguide/build/bundle.26082873.js +0 -2
- package/styleguide/images/default.svg +0 -1
- package/styleguide/images/empty-list_256.png +0 -0
- package/styleguide/images/filtered.svg +0 -1
- package/styleguide/patterns/controls/control-button-tooltip-1-do.png +0 -0
- package/styleguide/patterns/controls/control-button-tooltip-1-dont.png +0 -0
- package/styleguide/patterns/controls/control-button-tooltip-2-do.png +0 -0
- package/styleguide/patterns/controls/control-button-tooltip-2-dont.png +0 -0
- package/styleguide/patterns/controls/control-button-tooltip-3-do.png +0 -0
- package/styleguide/patterns/controls/control-button-tooltip-3-dont.png +0 -0
- package/styleguide/patterns/dialogsWindows/autoclose.png +0 -0
- package/styleguide/patterns/dialogsWindows/focus.png +0 -0
- package/styleguide/patterns/dialogsWindows/header.png +0 -0
- package/styleguide/patterns/dialogsWindows/image.png +0 -0
- package/styleguide/patterns/dialogsWindows/list_submit.png +0 -0
- package/styleguide/patterns/dialogsWindows/new_object.png +0 -0
- package/styleguide/patterns/dialogsWindows/popover-confirm.png +0 -0
- package/styleguide/patterns/dialogsWindows/popover.png +0 -0
- package/styleguide/patterns/dialogsWindows/similar_buttons.png +0 -0
- package/styleguide/patterns/dialogsWindows/submit.png +0 -0
- package/styleguide/patterns/dialogsWindows/toast_controls.png +0 -0
- package/styleguide/patterns/dialogsWindows/toaster_intent.png +0 -0
- package/styleguide/patterns/dialogsWindows/tooltip.png +0 -0
- package/styleguide/patterns/dialogsWindows/tour.png +0 -0
- package/styleguide/patterns/dialogsWindows/when_to_show.png +0 -0
- package/styleguide/patterns/dialogsWindows/width.png +0 -0
- package/types/package.d.ts +0 -138
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
3
2
|
// Copyright 1999-2021. Plesk International GmbH. All rights reserved.
|
|
4
3
|
|
|
5
|
-
/* eslint-disable react/no-deprecated */
|
|
6
|
-
|
|
7
4
|
import React, { Component, Fragment, cloneElement, isValidElement, createRef } from 'react';
|
|
8
5
|
import PropTypes from 'prop-types';
|
|
9
6
|
import classNames from 'classnames';
|
|
@@ -24,6 +21,10 @@ import VerticalContext, { VERTICAL_BREAKPOINT } from '../VerticalContext';
|
|
|
24
21
|
import ListEmptyView from './ListEmptyView';
|
|
25
22
|
import Columns, { Column } from '../Columns';
|
|
26
23
|
import { FocusVisibleManager, useFocusVisible } from 'use-focus-visible';
|
|
24
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
26
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
27
|
+
import { createElement as _createElement } from "react";
|
|
27
28
|
const getRowKey = (row, props) => {
|
|
28
29
|
const {
|
|
29
30
|
rowKey
|
|
@@ -44,13 +45,14 @@ const Tbody = _ref => {
|
|
|
44
45
|
onFocus,
|
|
45
46
|
onBlur
|
|
46
47
|
} = useFocusVisible();
|
|
47
|
-
return /*#__PURE__*/
|
|
48
|
+
return /*#__PURE__*/_jsx("tbody", {
|
|
49
|
+
...props,
|
|
48
50
|
onFocus: wrapFunction(props.onFocus, onFocus),
|
|
49
51
|
onBlur: wrapFunction(props.onBlur, onBlur),
|
|
50
52
|
className: classNames(className, {
|
|
51
53
|
[`${baseClassName}--focus-visible`]: focusVisible
|
|
52
54
|
})
|
|
53
|
-
})
|
|
55
|
+
});
|
|
54
56
|
};
|
|
55
57
|
Tbody.propTypes = {
|
|
56
58
|
onFocus: PropTypes.func,
|
|
@@ -64,8 +66,6 @@ Tbody.defaultProps = {
|
|
|
64
66
|
className: undefined,
|
|
65
67
|
baseClassName: `${CLS_PREFIX}list__wrapper`
|
|
66
68
|
};
|
|
67
|
-
|
|
68
|
-
// eslint-disable-next-line react/prop-types
|
|
69
69
|
const getHumanTotalRows = _ref2 => {
|
|
70
70
|
let {
|
|
71
71
|
selectedRows,
|
|
@@ -81,12 +81,13 @@ const getHumanTotalRows = _ref2 => {
|
|
|
81
81
|
} else {
|
|
82
82
|
mode = 'selectedRows';
|
|
83
83
|
}
|
|
84
|
-
const wrapToText = element => /*#__PURE__*/
|
|
85
|
-
fontSize: "sm"
|
|
86
|
-
|
|
84
|
+
const wrapToText = element => /*#__PURE__*/_jsx(Text, {
|
|
85
|
+
fontSize: "sm",
|
|
86
|
+
children: element
|
|
87
|
+
});
|
|
87
88
|
switch (mode) {
|
|
88
89
|
case 'totalRows':
|
|
89
|
-
return wrapToText( /*#__PURE__*/
|
|
90
|
+
return wrapToText( /*#__PURE__*/_jsx(Translate, {
|
|
90
91
|
namespace: "List",
|
|
91
92
|
content: "totalRows",
|
|
92
93
|
fallback: "%%totalRows%% items total",
|
|
@@ -96,32 +97,34 @@ const getHumanTotalRows = _ref2 => {
|
|
|
96
97
|
translators: translators
|
|
97
98
|
}));
|
|
98
99
|
case 'selectedRows':
|
|
99
|
-
return wrapToText( /*#__PURE__*/
|
|
100
|
+
return wrapToText( /*#__PURE__*/_jsx(Translate, {
|
|
100
101
|
namespace: "List",
|
|
101
102
|
content: "selectedRows",
|
|
102
103
|
fallback: "%%selectedRows%% of %%totalRows%% items selected",
|
|
103
104
|
params: {
|
|
104
|
-
selectedRows: /*#__PURE__*/
|
|
105
|
-
bold: true
|
|
106
|
-
|
|
105
|
+
selectedRows: /*#__PURE__*/_jsx(Text, {
|
|
106
|
+
bold: true,
|
|
107
|
+
children: selectedRows
|
|
108
|
+
}),
|
|
107
109
|
totalRows
|
|
108
110
|
},
|
|
109
111
|
translators: translators
|
|
110
112
|
}));
|
|
111
113
|
case 'selectedAllRows':
|
|
112
|
-
return wrapToText( /*#__PURE__*/
|
|
114
|
+
return wrapToText( /*#__PURE__*/_jsx(Translate, {
|
|
113
115
|
namespace: "List",
|
|
114
116
|
content: "selectedRows",
|
|
115
117
|
fallback: "%%selectedRows%% of %%totalRows%% items selected",
|
|
116
118
|
params: {
|
|
117
|
-
selectedRows: /*#__PURE__*/
|
|
118
|
-
bold: true
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
119
|
+
selectedRows: /*#__PURE__*/_jsx(Text, {
|
|
120
|
+
bold: true,
|
|
121
|
+
children: /*#__PURE__*/_jsx(Translate, {
|
|
122
|
+
namespace: "List",
|
|
123
|
+
content: "all",
|
|
124
|
+
fallback: "All",
|
|
125
|
+
translators: translators
|
|
126
|
+
})
|
|
127
|
+
}),
|
|
125
128
|
totalRows
|
|
126
129
|
},
|
|
127
130
|
translators: translators
|
|
@@ -523,9 +526,10 @@ class List extends Component {
|
|
|
523
526
|
} = this.getRowProps(row);
|
|
524
527
|
let skipCells = 0;
|
|
525
528
|
const Wrapper = reorderable && !parent ? Tbody : Fragment;
|
|
526
|
-
const element = /*#__PURE__*/
|
|
529
|
+
const element = /*#__PURE__*/_createElement(Wrapper, {
|
|
530
|
+
...(Wrapper === Tbody && !isDragged ? reorderableProps : undefined),
|
|
527
531
|
key: getRowKey(row, this.props)
|
|
528
|
-
}
|
|
532
|
+
}, /*#__PURE__*/_jsx("tr", {
|
|
529
533
|
className: classNames({
|
|
530
534
|
'is-selected': this.isRowSelected(row),
|
|
531
535
|
[`${baseClassName}__row--expanded`]: this.isRowExpanded(row),
|
|
@@ -534,92 +538,100 @@ class List extends Component {
|
|
|
534
538
|
[`${baseClassName}__row--virtual`]: virtual,
|
|
535
539
|
[`${baseClassName}__row--child`]: parent,
|
|
536
540
|
[`${baseClassName}__row--reorderable`]: reorderable
|
|
537
|
-
}, className)
|
|
538
|
-
|
|
539
|
-
onClick: renderRowBody ? this.createRowClickHandler(row) : undefined
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
}
|
|
554
|
-
let style;
|
|
555
|
-
if (!hasTitle && width && !vertical) {
|
|
556
|
-
style = {
|
|
557
|
-
width
|
|
558
|
-
};
|
|
559
|
-
}
|
|
560
|
-
if (isDragged) {
|
|
561
|
-
style = {
|
|
562
|
-
width: reorderableItemWidths[index]
|
|
563
|
-
};
|
|
564
|
-
}
|
|
565
|
-
let content = render ? render(row, {
|
|
566
|
-
parent
|
|
567
|
-
}) : row[key];
|
|
568
|
-
// cell props from render
|
|
569
|
-
if (content && content.children && ! /*#__PURE__*/isValidElement(content)) {
|
|
570
|
-
const {
|
|
571
|
-
children,
|
|
572
|
-
...other
|
|
573
|
-
} = content;
|
|
574
|
-
content = children;
|
|
575
|
-
cellProps = {
|
|
576
|
-
...cellProps,
|
|
577
|
-
...other
|
|
578
|
-
};
|
|
579
|
-
if (other.colSpan) {
|
|
580
|
-
skipCells += other.colSpan - 1;
|
|
541
|
+
}, className),
|
|
542
|
+
...rowProps,
|
|
543
|
+
onClick: renderRowBody ? this.createRowClickHandler(row) : undefined,
|
|
544
|
+
children: realColumn.map((_ref11, index) => {
|
|
545
|
+
let {
|
|
546
|
+
key,
|
|
547
|
+
title,
|
|
548
|
+
render,
|
|
549
|
+
width,
|
|
550
|
+
cellProps,
|
|
551
|
+
truncate,
|
|
552
|
+
type
|
|
553
|
+
} = _ref11;
|
|
554
|
+
if (skipCells > 0) {
|
|
555
|
+
skipCells -= 1;
|
|
556
|
+
return null;
|
|
581
557
|
}
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
588
|
-
truncate: true
|
|
589
|
-
}, content));
|
|
590
|
-
}
|
|
591
|
-
if (vertical) {
|
|
592
|
-
const hasColumnTitle = type !== 'internal' && type !== 'actions' && type !== 'title' && title;
|
|
593
|
-
if (!isCellEmpty && type !== 'internal') {
|
|
594
|
-
content = /*#__PURE__*/React.createElement(React.Fragment, null, hasColumnTitle && /*#__PURE__*/React.createElement("div", {
|
|
595
|
-
className: `${baseClassName}__cell-inner-title`
|
|
596
|
-
}, title), /*#__PURE__*/React.createElement("div", {
|
|
597
|
-
className: `${baseClassName}__cell-inner-content`
|
|
598
|
-
}, content));
|
|
558
|
+
let style;
|
|
559
|
+
if (!hasTitle && width && !vertical) {
|
|
560
|
+
style = {
|
|
561
|
+
width
|
|
562
|
+
};
|
|
599
563
|
}
|
|
600
|
-
if (
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
}
|
|
564
|
+
if (isDragged) {
|
|
565
|
+
style = {
|
|
566
|
+
width: reorderableItemWidths[index]
|
|
567
|
+
};
|
|
568
|
+
}
|
|
569
|
+
let content = render ? render(row, {
|
|
570
|
+
parent
|
|
571
|
+
}) : row[key];
|
|
572
|
+
// cell props from render
|
|
573
|
+
if (content && content.children && ! /*#__PURE__*/isValidElement(content)) {
|
|
574
|
+
const {
|
|
575
|
+
children,
|
|
576
|
+
...other
|
|
577
|
+
} = content;
|
|
578
|
+
content = children;
|
|
579
|
+
cellProps = {
|
|
580
|
+
...cellProps,
|
|
581
|
+
...other
|
|
582
|
+
};
|
|
583
|
+
if (other.colSpan) {
|
|
584
|
+
skipCells += other.colSpan - 1;
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
const isCellEmpty = !title && !content;
|
|
588
|
+
if (truncate) {
|
|
589
|
+
content = /*#__PURE__*/_jsx("div", {
|
|
590
|
+
className: `${baseClassName}__truncate`,
|
|
591
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
592
|
+
truncate: true,
|
|
593
|
+
children: content
|
|
594
|
+
})
|
|
595
|
+
});
|
|
596
|
+
}
|
|
597
|
+
if (vertical) {
|
|
598
|
+
const hasColumnTitle = type !== 'internal' && type !== 'actions' && type !== 'title' && title;
|
|
599
|
+
if (!isCellEmpty && type !== 'internal') {
|
|
600
|
+
content = /*#__PURE__*/_jsxs(_Fragment, {
|
|
601
|
+
children: [hasColumnTitle && /*#__PURE__*/_jsx("div", {
|
|
602
|
+
className: `${baseClassName}__cell-inner-title`,
|
|
603
|
+
children: title
|
|
604
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
605
|
+
className: `${baseClassName}__cell-inner-content`,
|
|
606
|
+
children: content
|
|
607
|
+
})]
|
|
608
|
+
});
|
|
609
|
+
}
|
|
610
|
+
if (type === 'actions') {
|
|
611
|
+
content = /*#__PURE__*/_jsx(VerticalContext.Provider, {
|
|
612
|
+
value: true,
|
|
613
|
+
children: content
|
|
614
|
+
});
|
|
615
|
+
}
|
|
604
616
|
}
|
|
605
|
-
}
|
|
606
617
|
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
618
|
+
// do not render reorderable handler for nested rows
|
|
619
|
+
if (key === 'reorderable' && type === 'internal' && parent) {
|
|
620
|
+
content = null;
|
|
621
|
+
}
|
|
622
|
+
return /*#__PURE__*/_jsx("td", {
|
|
623
|
+
style: style,
|
|
624
|
+
...cellProps,
|
|
625
|
+
className: classNames(cellProps && cellProps.className, {
|
|
626
|
+
[`${baseClassName}__cell-controls`]: type === 'controls',
|
|
627
|
+
[`${baseClassName}__cell-actions`]: type === 'actions',
|
|
628
|
+
[`${baseClassName}__cell-title`]: type === 'title',
|
|
629
|
+
[`${baseClassName}__cell-has-actions`]: type === 'title' && hasActions
|
|
630
|
+
}) || undefined,
|
|
631
|
+
children: content
|
|
632
|
+
}, key);
|
|
633
|
+
})
|
|
634
|
+
}), renderRowBody && !virtual && this.renderRowBody({
|
|
623
635
|
row,
|
|
624
636
|
index,
|
|
625
637
|
realColumn,
|
|
@@ -632,14 +644,17 @@ class List extends Component {
|
|
|
632
644
|
parent: row
|
|
633
645
|
})) : null);
|
|
634
646
|
if (isDragged) {
|
|
635
|
-
return /*#__PURE__*/
|
|
636
|
-
className: classNames(baseClassName, `${baseClassName}--dragged`)
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
647
|
+
return /*#__PURE__*/_jsx("div", {
|
|
648
|
+
className: classNames(baseClassName, `${baseClassName}--dragged`),
|
|
649
|
+
...reorderableProps,
|
|
650
|
+
children: /*#__PURE__*/_jsx("table", {
|
|
651
|
+
className: classNames(`${baseClassName}__table`, `${baseClassName}__table--reorderable`, {
|
|
652
|
+
[`${baseClassName}--expandable`]: renderRowBody,
|
|
653
|
+
[`${baseClassName}__table--vertical`]: vertical
|
|
654
|
+
}),
|
|
655
|
+
children: element
|
|
641
656
|
})
|
|
642
|
-
}
|
|
657
|
+
});
|
|
643
658
|
}
|
|
644
659
|
return element;
|
|
645
660
|
}
|
|
@@ -674,7 +689,7 @@ class List extends Component {
|
|
|
674
689
|
});
|
|
675
690
|
const isRowExpanded = this.isRowExpanded(row);
|
|
676
691
|
const trRef = /*#__PURE__*/createRef();
|
|
677
|
-
return /*#__PURE__*/
|
|
692
|
+
return /*#__PURE__*/_jsx(CSSTransition, {
|
|
678
693
|
in: isRowExpanded,
|
|
679
694
|
unmountOnExit: true,
|
|
680
695
|
timeout: {
|
|
@@ -682,27 +697,33 @@ class List extends Component {
|
|
|
682
697
|
exit: 300
|
|
683
698
|
},
|
|
684
699
|
classNames: `${baseClassName}__row-body-`,
|
|
685
|
-
nodeRef: trRef
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
700
|
+
nodeRef: trRef,
|
|
701
|
+
children: state => /*#__PURE__*/_jsxs("tr", {
|
|
702
|
+
className: `${baseClassName}__row-body`,
|
|
703
|
+
ref: trRef,
|
|
704
|
+
children: [reorderable ? /*#__PURE__*/_jsx("td", {
|
|
705
|
+
className: `${baseClassName}__cell-reorderable`
|
|
706
|
+
}) : null, expander ? /*#__PURE__*/_jsx("td", {
|
|
707
|
+
className: `${baseClassName}__cell-expander`
|
|
708
|
+
}) : null, /*#__PURE__*/_jsx("td", {
|
|
709
|
+
colSpan: realColumn.length - (reorderable ? 1 : 0) - (expander ? 1 : 0),
|
|
710
|
+
className: `${baseClassName}__cell-body`,
|
|
711
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
712
|
+
className: `${baseClassName}__row-body-content-wrapper`,
|
|
713
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
714
|
+
className: `${baseClassName}__row-body-content ${baseClassName}__row-body-content--${state}`,
|
|
715
|
+
children: /*#__PURE__*/_jsx(VerticalContext.Provider, {
|
|
716
|
+
value: vertical,
|
|
717
|
+
children: renderRowBody(row, {
|
|
718
|
+
index,
|
|
719
|
+
parent
|
|
720
|
+
})
|
|
721
|
+
})
|
|
722
|
+
})
|
|
723
|
+
})
|
|
724
|
+
})]
|
|
725
|
+
})
|
|
726
|
+
});
|
|
706
727
|
}
|
|
707
728
|
renderSelectAllButton() {
|
|
708
729
|
const {
|
|
@@ -718,18 +739,19 @@ class List extends Component {
|
|
|
718
739
|
if (allRowsSelected || selection.length === totalRows || !onSelectionChange) {
|
|
719
740
|
return null;
|
|
720
741
|
}
|
|
721
|
-
return /*#__PURE__*/
|
|
742
|
+
return /*#__PURE__*/_jsx(Button, {
|
|
722
743
|
ghost: true,
|
|
723
744
|
onClick: () => {
|
|
724
745
|
this.handleGlobalSelectionChange(true);
|
|
725
746
|
safeInvoke(onAllRowsSelectedChange, true);
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
747
|
+
},
|
|
748
|
+
children: /*#__PURE__*/_jsx(Translate, {
|
|
749
|
+
namespace: "List",
|
|
750
|
+
content: "selectAll",
|
|
751
|
+
fallback: "Select all",
|
|
752
|
+
translators: locale
|
|
753
|
+
})
|
|
754
|
+
});
|
|
733
755
|
}
|
|
734
756
|
renderDeselectAllButton() {
|
|
735
757
|
const {
|
|
@@ -744,18 +766,19 @@ class List extends Component {
|
|
|
744
766
|
if (!allRowsSelected && selection.length === 0 || !onSelectionChange) {
|
|
745
767
|
return null;
|
|
746
768
|
}
|
|
747
|
-
return /*#__PURE__*/
|
|
769
|
+
return /*#__PURE__*/_jsx(Button, {
|
|
748
770
|
ghost: true,
|
|
749
771
|
onClick: () => {
|
|
750
772
|
this.handleGlobalSelectionChange(false);
|
|
751
773
|
safeInvoke(onAllRowsSelectedChange, false);
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
774
|
+
},
|
|
775
|
+
children: /*#__PURE__*/_jsx(Translate, {
|
|
776
|
+
namespace: "List",
|
|
777
|
+
content: "deselectAll",
|
|
778
|
+
fallback: "Deselect",
|
|
779
|
+
translators: locale
|
|
780
|
+
})
|
|
781
|
+
});
|
|
759
782
|
}
|
|
760
783
|
renderToolbar() {
|
|
761
784
|
const {
|
|
@@ -778,8 +801,9 @@ class List extends Component {
|
|
|
778
801
|
if (!toolbar) {
|
|
779
802
|
return null;
|
|
780
803
|
}
|
|
804
|
+
// eslint-disable-next-line react/jsx-no-constructed-context-values
|
|
781
805
|
const context = {
|
|
782
|
-
selectedRows: allRowsSelected ? totalRows || /*#__PURE__*/
|
|
806
|
+
selectedRows: allRowsSelected ? totalRows || /*#__PURE__*/_jsx(Translate, {
|
|
783
807
|
namespace: "List",
|
|
784
808
|
content: "all",
|
|
785
809
|
fallback: "all",
|
|
@@ -787,9 +811,10 @@ class List extends Component {
|
|
|
787
811
|
}) : selection.length,
|
|
788
812
|
selectedRowTitle
|
|
789
813
|
};
|
|
790
|
-
return /*#__PURE__*/
|
|
791
|
-
value: context
|
|
792
|
-
|
|
814
|
+
return /*#__PURE__*/_jsx(ListOperationContext.Provider, {
|
|
815
|
+
value: context,
|
|
816
|
+
children: toolbar
|
|
817
|
+
});
|
|
793
818
|
}
|
|
794
819
|
shouldBePagination() {
|
|
795
820
|
const {
|
|
@@ -829,20 +854,26 @@ class List extends Component {
|
|
|
829
854
|
if (totalRows === undefined && !shouldBePagination) {
|
|
830
855
|
return null;
|
|
831
856
|
}
|
|
832
|
-
return /*#__PURE__*/
|
|
833
|
-
className: `${baseClassName}__header
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
857
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
858
|
+
className: `${baseClassName}__header`,
|
|
859
|
+
children: [totalRows === undefined ? /*#__PURE__*/_jsx("span", {}) : /*#__PURE__*/_jsxs("span", {
|
|
860
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
861
|
+
className: `${baseClassName}__header-text`,
|
|
862
|
+
children: getHumanTotalRows({
|
|
863
|
+
selectedRows: selection.length,
|
|
864
|
+
totalRows,
|
|
865
|
+
allRowsSelected,
|
|
866
|
+
translators: locale
|
|
867
|
+
})
|
|
868
|
+
}), ` `, /*#__PURE__*/_jsxs("span", {
|
|
869
|
+
className: `${baseClassName}__header-buttons`,
|
|
870
|
+
children: [this.renderSelectAllButton(), this.renderDeselectAllButton()]
|
|
871
|
+
})]
|
|
872
|
+
}), shouldBePagination && /*#__PURE__*/_jsx("div", {
|
|
873
|
+
className: `${baseClassName}__header-text`,
|
|
874
|
+
children: this.renderPagination('header')
|
|
875
|
+
})]
|
|
876
|
+
});
|
|
846
877
|
}
|
|
847
878
|
renderEmptyView() {
|
|
848
879
|
const {
|
|
@@ -850,9 +881,9 @@ class List extends Component {
|
|
|
850
881
|
filtered
|
|
851
882
|
} = this.props;
|
|
852
883
|
if (emptyView === undefined) {
|
|
853
|
-
return filtered ? /*#__PURE__*/
|
|
884
|
+
return filtered ? /*#__PURE__*/_jsx(ListEmptyView, {
|
|
854
885
|
reason: "filtered"
|
|
855
|
-
}) : /*#__PURE__*/
|
|
886
|
+
}) : /*#__PURE__*/_jsx(ListEmptyView, {});
|
|
856
887
|
}
|
|
857
888
|
return emptyView;
|
|
858
889
|
}
|
|
@@ -967,7 +998,9 @@ class List extends Component {
|
|
|
967
998
|
cellProps: {
|
|
968
999
|
className: `${baseClassName}__cell-selection`
|
|
969
1000
|
},
|
|
970
|
-
title: typeof renderSelectionCheckbox === 'function' ? renderSelectionCheckbox(headerCheckboxProps) : /*#__PURE__*/
|
|
1001
|
+
title: typeof renderSelectionCheckbox === 'function' ? renderSelectionCheckbox(headerCheckboxProps) : /*#__PURE__*/_jsx(Checkbox, {
|
|
1002
|
+
...headerCheckboxProps
|
|
1003
|
+
}),
|
|
971
1004
|
render: row => {
|
|
972
1005
|
const {
|
|
973
1006
|
virtual
|
|
@@ -976,7 +1009,7 @@ class List extends Component {
|
|
|
976
1009
|
return null;
|
|
977
1010
|
}
|
|
978
1011
|
if (this.isRowLoading(row)) {
|
|
979
|
-
return /*#__PURE__*/
|
|
1012
|
+
return /*#__PURE__*/_jsx(Spinner, {
|
|
980
1013
|
className: `${baseClassName}__spinner`
|
|
981
1014
|
});
|
|
982
1015
|
}
|
|
@@ -991,7 +1024,9 @@ class List extends Component {
|
|
|
991
1024
|
if (typeof renderSelectionCheckbox === 'function') {
|
|
992
1025
|
return renderSelectionCheckbox(checkboxProps, row);
|
|
993
1026
|
}
|
|
994
|
-
return /*#__PURE__*/
|
|
1027
|
+
return /*#__PURE__*/_jsx(Checkbox, {
|
|
1028
|
+
...checkboxProps
|
|
1029
|
+
});
|
|
995
1030
|
}
|
|
996
1031
|
});
|
|
997
1032
|
}
|
|
@@ -1003,38 +1038,42 @@ class List extends Component {
|
|
|
1003
1038
|
cellProps: {
|
|
1004
1039
|
className: `${baseClassName}__cell-expander`
|
|
1005
1040
|
},
|
|
1006
|
-
title: /*#__PURE__*/
|
|
1041
|
+
title: /*#__PURE__*/_jsx(Button, {
|
|
1007
1042
|
ghost: true,
|
|
1008
1043
|
className: `${baseClassName}__row-expander`,
|
|
1009
|
-
icon: /*#__PURE__*/
|
|
1010
|
-
className: `${baseClassName}__row-expander-icon
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1044
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
|
1045
|
+
className: `${baseClassName}__row-expander-icon`,
|
|
1046
|
+
children: /*#__PURE__*/_jsx("svg", {
|
|
1047
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1048
|
+
viewBox: "0 0 10 10",
|
|
1049
|
+
children: /*#__PURE__*/_jsx("path", {
|
|
1050
|
+
fill: "none",
|
|
1051
|
+
stroke: "currentColor",
|
|
1052
|
+
strokeLinecap: "round",
|
|
1053
|
+
strokeLinejoin: "round",
|
|
1054
|
+
d: "M1.5 1.4L5 4.9l3.5-3.5M1.5 5.1L5 8.6l3.5-3.5"
|
|
1055
|
+
})
|
|
1056
|
+
})
|
|
1057
|
+
}),
|
|
1021
1058
|
onClick: this.handleGlobalExpandingChange
|
|
1022
1059
|
}),
|
|
1023
|
-
render: row => this.isRowExpandable(row) && /*#__PURE__*/
|
|
1060
|
+
render: row => this.isRowExpandable(row) && /*#__PURE__*/_jsx(Button, {
|
|
1024
1061
|
ghost: true,
|
|
1025
1062
|
className: `${baseClassName}__row-expander`,
|
|
1026
|
-
icon: /*#__PURE__*/
|
|
1027
|
-
className: `${baseClassName}__row-expander-icon
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1063
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
|
1064
|
+
className: `${baseClassName}__row-expander-icon`,
|
|
1065
|
+
children: /*#__PURE__*/_jsx("svg", {
|
|
1066
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1067
|
+
viewBox: "0 0 10 10",
|
|
1068
|
+
children: /*#__PURE__*/_jsx("path", {
|
|
1069
|
+
fill: "none",
|
|
1070
|
+
stroke: "currentColor",
|
|
1071
|
+
strokeLinecap: "round",
|
|
1072
|
+
strokeLinejoin: "round",
|
|
1073
|
+
d: "M1.5 3.2L5 6.7l3.5-3.5"
|
|
1074
|
+
})
|
|
1075
|
+
})
|
|
1076
|
+
}),
|
|
1038
1077
|
onClick: () => this.handleRowExpandingChange(row)
|
|
1039
1078
|
})
|
|
1040
1079
|
});
|
|
@@ -1048,19 +1087,21 @@ class List extends Component {
|
|
|
1048
1087
|
className: `${baseClassName}__cell-reorderable`
|
|
1049
1088
|
},
|
|
1050
1089
|
title: null,
|
|
1051
|
-
render: () => /*#__PURE__*/
|
|
1090
|
+
render: () => /*#__PURE__*/_jsx("span", {
|
|
1052
1091
|
className: `${baseClassName}__cell-reorderable-indicator`,
|
|
1053
|
-
"data-movable-handle": true
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1092
|
+
"data-movable-handle": true,
|
|
1093
|
+
children: /*#__PURE__*/_jsx("svg", {
|
|
1094
|
+
width: "6",
|
|
1095
|
+
height: "14",
|
|
1096
|
+
fill: "none",
|
|
1097
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1098
|
+
"aria-hidden": "true",
|
|
1099
|
+
children: /*#__PURE__*/_jsx("path", {
|
|
1100
|
+
d: "M0 0h2v2H0zM0 4h2v2H0zM0 8h2v2H0zM0 12h2v2H0zM4 0h2v2H4zM4 4h2v2H4zM4 8h2v2H4zM4 12h2v2H4z",
|
|
1101
|
+
fill: "currentColor"
|
|
1102
|
+
})
|
|
1103
|
+
})
|
|
1104
|
+
})
|
|
1064
1105
|
});
|
|
1065
1106
|
}
|
|
1066
1107
|
const hasTitle = !vertical && columns.some(column => column.title);
|
|
@@ -1073,50 +1114,61 @@ class List extends Component {
|
|
|
1073
1114
|
children,
|
|
1074
1115
|
props: reorderableProps
|
|
1075
1116
|
} = _ref15;
|
|
1076
|
-
return /*#__PURE__*/
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1117
|
+
return /*#__PURE__*/_jsx(FocusVisibleManager, {
|
|
1118
|
+
children: /*#__PURE__*/_jsxs("table", {
|
|
1119
|
+
className: classNames(`${baseClassName}__table`, {
|
|
1120
|
+
[`${baseClassName}--expandable`]: renderRowBody,
|
|
1121
|
+
[`${baseClassName}__table--vertical`]: vertical,
|
|
1122
|
+
[`${baseClassName}__table--reorderable`]: reorderable
|
|
1123
|
+
}),
|
|
1124
|
+
...reorderableProps,
|
|
1125
|
+
children: [hasTitle && /*#__PURE__*/_jsx("thead", {
|
|
1126
|
+
children: /*#__PURE__*/_jsx("tr", {
|
|
1127
|
+
className: classNames(`${baseClassName}__table-thead`, {
|
|
1128
|
+
[`${baseClassName}__row--expanded`]: this.isAllRowsExpanded(data, this.state.expandedRows)
|
|
1129
|
+
}),
|
|
1130
|
+
children: realColumn.map(_ref16 => {
|
|
1131
|
+
let {
|
|
1132
|
+
key,
|
|
1133
|
+
title,
|
|
1134
|
+
sortable,
|
|
1135
|
+
sort,
|
|
1136
|
+
width,
|
|
1137
|
+
render,
|
|
1138
|
+
truncate,
|
|
1139
|
+
type,
|
|
1140
|
+
cellProps,
|
|
1141
|
+
...headerProps
|
|
1142
|
+
} = _ref16;
|
|
1143
|
+
if (sortable) {
|
|
1144
|
+
title = /*#__PURE__*/_jsx("div", {
|
|
1145
|
+
className: "th__action",
|
|
1146
|
+
children: title
|
|
1147
|
+
});
|
|
1148
|
+
headerProps.className = classNames({
|
|
1149
|
+
'is-sortable': sortable,
|
|
1150
|
+
'is-sorted is-sorted--up': this.state.sortColumn === key && this.state.sortDirection === 'ASC',
|
|
1151
|
+
'is-sorted is-sorted--down': this.state.sortColumn === key && this.state.sortDirection === 'DESC'
|
|
1152
|
+
}, headerProps.className);
|
|
1153
|
+
headerProps.onClick = () => this.sort(key);
|
|
1154
|
+
}
|
|
1155
|
+
if (width) {
|
|
1156
|
+
headerProps.style = {
|
|
1157
|
+
...headerProps.style,
|
|
1158
|
+
width
|
|
1159
|
+
};
|
|
1160
|
+
}
|
|
1161
|
+
return /*#__PURE__*/_jsx("th", {
|
|
1162
|
+
...headerProps,
|
|
1163
|
+
children: title
|
|
1164
|
+
}, key);
|
|
1165
|
+
})
|
|
1166
|
+
})
|
|
1167
|
+
}), reorderable ? children : /*#__PURE__*/_jsx("tbody", {
|
|
1168
|
+
children: children
|
|
1169
|
+
})]
|
|
1081
1170
|
})
|
|
1082
|
-
}
|
|
1083
|
-
className: classNames(`${baseClassName}__table-thead`, {
|
|
1084
|
-
[`${baseClassName}__row--expanded`]: this.isAllRowsExpanded(data, this.state.expandedRows)
|
|
1085
|
-
})
|
|
1086
|
-
}, realColumn.map(_ref16 => {
|
|
1087
|
-
let {
|
|
1088
|
-
key,
|
|
1089
|
-
title,
|
|
1090
|
-
sortable,
|
|
1091
|
-
sort,
|
|
1092
|
-
width,
|
|
1093
|
-
render,
|
|
1094
|
-
truncate,
|
|
1095
|
-
type,
|
|
1096
|
-
cellProps,
|
|
1097
|
-
...headerProps
|
|
1098
|
-
} = _ref16;
|
|
1099
|
-
if (sortable) {
|
|
1100
|
-
title = /*#__PURE__*/React.createElement("div", {
|
|
1101
|
-
className: "th__action"
|
|
1102
|
-
}, title);
|
|
1103
|
-
headerProps.className = classNames({
|
|
1104
|
-
'is-sortable': sortable,
|
|
1105
|
-
'is-sorted is-sorted--up': this.state.sortColumn === key && this.state.sortDirection === 'ASC',
|
|
1106
|
-
'is-sorted is-sorted--down': this.state.sortColumn === key && this.state.sortDirection === 'DESC'
|
|
1107
|
-
}, headerProps.className);
|
|
1108
|
-
headerProps.onClick = () => this.sort(key);
|
|
1109
|
-
}
|
|
1110
|
-
if (width) {
|
|
1111
|
-
headerProps.style = {
|
|
1112
|
-
...headerProps.style,
|
|
1113
|
-
width
|
|
1114
|
-
};
|
|
1115
|
-
}
|
|
1116
|
-
return /*#__PURE__*/React.createElement("th", _extends({
|
|
1117
|
-
key: key
|
|
1118
|
-
}, headerProps), title);
|
|
1119
|
-
}))), reorderable ? children : /*#__PURE__*/React.createElement("tbody", null, children)));
|
|
1171
|
+
});
|
|
1120
1172
|
};
|
|
1121
1173
|
const renderItem = _ref17 => {
|
|
1122
1174
|
let {
|
|
@@ -1140,7 +1192,7 @@ class List extends Component {
|
|
|
1140
1192
|
const {
|
|
1141
1193
|
ReorderableList
|
|
1142
1194
|
} = this.state;
|
|
1143
|
-
content = /*#__PURE__*/
|
|
1195
|
+
content = /*#__PURE__*/_jsx(ReorderableList, {
|
|
1144
1196
|
beforeDrag: _ref18 => {
|
|
1145
1197
|
let {
|
|
1146
1198
|
elements,
|
|
@@ -1184,36 +1236,45 @@ class List extends Component {
|
|
|
1184
1236
|
});
|
|
1185
1237
|
}
|
|
1186
1238
|
}
|
|
1187
|
-
content = /*#__PURE__*/
|
|
1239
|
+
content = /*#__PURE__*/_jsx("div", {
|
|
1188
1240
|
className: classNames(`${baseClassName}__table-container`, {
|
|
1189
1241
|
[`${baseClassName}__table-container--loading`]: loading
|
|
1190
|
-
})
|
|
1191
|
-
|
|
1242
|
+
}),
|
|
1243
|
+
children: content
|
|
1244
|
+
});
|
|
1192
1245
|
if (sidebar) {
|
|
1193
|
-
content = /*#__PURE__*/
|
|
1194
|
-
gap: "md"
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1246
|
+
content = /*#__PURE__*/_jsxs(Columns, {
|
|
1247
|
+
gap: "md",
|
|
1248
|
+
children: [/*#__PURE__*/_jsx(Column, {
|
|
1249
|
+
fill: true,
|
|
1250
|
+
children: content
|
|
1251
|
+
}), /*#__PURE__*/_jsx(Column, {
|
|
1252
|
+
children: sidebar
|
|
1253
|
+
})]
|
|
1254
|
+
});
|
|
1198
1255
|
}
|
|
1199
1256
|
const shouldBePagination = this.shouldBePagination();
|
|
1200
|
-
const createRoot = ref => /*#__PURE__*/
|
|
1257
|
+
const createRoot = ref => /*#__PURE__*/_jsxs("div", {
|
|
1201
1258
|
ref: ref,
|
|
1202
|
-
className: classNames(baseClassName, className)
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1259
|
+
className: classNames(baseClassName, className),
|
|
1260
|
+
...props,
|
|
1261
|
+
children: [this.renderHeader(), this.renderToolbar(), shouldBePagination && /*#__PURE__*/_jsx("span", {
|
|
1262
|
+
ref: this.anchorRef
|
|
1263
|
+
}), content, shouldBePagination && /*#__PURE__*/_jsx("div", {
|
|
1264
|
+
className: `${baseClassName}__footer`,
|
|
1265
|
+
children: this.renderPagination('footer')
|
|
1266
|
+
})]
|
|
1267
|
+
});
|
|
1208
1268
|
if (typeof verticalProp === 'number') {
|
|
1209
|
-
return /*#__PURE__*/
|
|
1269
|
+
return /*#__PURE__*/_jsx(Measure, {
|
|
1210
1270
|
bounds: true,
|
|
1211
|
-
onResize: this.handleResize
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1271
|
+
onResize: this.handleResize,
|
|
1272
|
+
children: _ref20 => {
|
|
1273
|
+
let {
|
|
1274
|
+
measureRef
|
|
1275
|
+
} = _ref20;
|
|
1276
|
+
return createRoot(measureRef);
|
|
1277
|
+
}
|
|
1217
1278
|
});
|
|
1218
1279
|
}
|
|
1219
1280
|
return createRoot();
|