@plesk/ui-library 3.31.0 → 3.31.1

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.
Files changed (605) hide show
  1. package/cjs/components/Action/Action.js +18 -34
  2. package/cjs/components/Action/index.js +0 -2
  3. package/cjs/components/Alert/Alert.js +18 -22
  4. package/cjs/components/Alert/Alert.stories.js +1 -8
  5. package/cjs/components/Alert/index.js +0 -2
  6. package/cjs/components/AutoClosable/AutoClosable.js +3 -23
  7. package/cjs/components/AutoClosable/index.js +0 -2
  8. package/cjs/components/AuxiliaryActions/AuxiliaryActions.js +16 -22
  9. package/cjs/components/AuxiliaryActions/index.js +0 -2
  10. package/cjs/components/Badge/Badge.js +10 -25
  11. package/cjs/components/Badge/index.js +0 -2
  12. package/cjs/components/Breadcrumbs/Breadcrumbs.js +21 -29
  13. package/cjs/components/Breadcrumbs/index.js +0 -2
  14. package/cjs/components/Button/Button.js +39 -86
  15. package/cjs/components/Button/Button.stories.js +1 -14
  16. package/cjs/components/Button/index.js +0 -2
  17. package/cjs/components/ButtonGroup/ButtonGroup.js +13 -17
  18. package/cjs/components/ButtonGroup/index.js +0 -2
  19. package/cjs/components/Card/Card.js +4 -77
  20. package/cjs/components/Card/CardButton.js +9 -14
  21. package/cjs/components/Card/PreviewPanel.js +21 -52
  22. package/cjs/components/Card/helpers.js +6 -6
  23. package/cjs/components/Card/index.js +0 -3
  24. package/cjs/components/CardList/CardList.js +44 -100
  25. package/cjs/components/CardList/CardListToolbar.js +17 -51
  26. package/cjs/components/CardList/index.js +0 -2
  27. package/cjs/components/Carousel/Carousel.js +41 -74
  28. package/cjs/components/Carousel/index.js +0 -2
  29. package/cjs/components/Checkbox/Checkbox.js +16 -26
  30. package/cjs/components/Checkbox/index.js +0 -2
  31. package/cjs/components/ClosingConfirmation/index.js +0 -2
  32. package/cjs/components/ClosingConfirmation/useClosingConfirmation.js +6 -23
  33. package/cjs/components/CodeEditor/CodeEditor.js +21 -61
  34. package/cjs/components/CodeEditor/CodeMirror.js +1 -12
  35. package/cjs/components/CodeEditor/index.js +0 -2
  36. package/cjs/components/Columns/Column.js +15 -24
  37. package/cjs/components/Columns/Columns.js +19 -31
  38. package/cjs/components/Columns/index.js +0 -3
  39. package/cjs/components/ComboBox/ComboBox.js +16 -59
  40. package/cjs/components/ComboBox/ComboBoxOption.js +0 -5
  41. package/cjs/components/ComboBox/index.js +0 -3
  42. package/cjs/components/ComboBoxDropdown/ComboBoxDropdown.js +22 -50
  43. package/cjs/components/ComboBoxDropdown/index.js +0 -3
  44. package/cjs/components/ConsoleOutput/ConsoleOutput.js +3 -22
  45. package/cjs/components/ConsoleOutput/index.js +0 -2
  46. package/cjs/components/ContentLoader/ContentLoader.js +16 -31
  47. package/cjs/components/ContentLoader/IconsLoader.js +15 -32
  48. package/cjs/components/ContentLoader/index.js +0 -2
  49. package/cjs/components/Cuttable/Cuttable.js +23 -35
  50. package/cjs/components/Cuttable/Cuttable.stories.js +1 -9
  51. package/cjs/components/Cuttable/index.js +0 -2
  52. package/cjs/components/Dialog/Dialog.js +28 -81
  53. package/cjs/components/Dialog/Dialog.stories.js +3 -13
  54. package/cjs/components/Dialog/index.js +0 -2
  55. package/cjs/components/DistractionFreeModeContext/DistractionFreeModeContext.js +1 -2
  56. package/cjs/components/DistractionFreeModeContext/index.js +0 -2
  57. package/cjs/components/Drawer/Drawer.js +77 -112
  58. package/cjs/components/Drawer/Drawer.stories.js +7 -19
  59. package/cjs/components/Drawer/DrawerProgress.js +3 -33
  60. package/cjs/components/Drawer/Header.js +5 -26
  61. package/cjs/components/Drawer/ScrollDirection.js +3 -10
  62. package/cjs/components/Drawer/index.js +0 -2
  63. package/cjs/components/Dropdown/Dropdown.js +26 -65
  64. package/cjs/components/Dropdown/index.js +0 -2
  65. package/cjs/components/ExtendedStatusMessage/ExtendedStatusMessage.js +26 -31
  66. package/cjs/components/ExtendedStatusMessage/ExtendedStatusMessageActions.js +11 -14
  67. package/cjs/components/ExtendedStatusMessage/ExtendedStatusMessageDescription.js +11 -14
  68. package/cjs/components/ExtendedStatusMessage/ExtendedStatusMessageSeparator.js +9 -11
  69. package/cjs/components/ExtendedStatusMessage/ExtendedStatusMessageTitle.js +12 -16
  70. package/cjs/components/ExtendedStatusMessage/index.js +0 -6
  71. package/cjs/components/Figure/Figure.js +18 -27
  72. package/cjs/components/Figure/index.js +0 -2
  73. package/cjs/components/FocusTrap/FocusTrap.js +9 -39
  74. package/cjs/components/FocusTrap/index.js +0 -2
  75. package/cjs/components/Form/DisabledContext.js +1 -2
  76. package/cjs/components/Form/Form.js +67 -110
  77. package/cjs/components/Form/Form.stories.js +1 -8
  78. package/cjs/components/Form/FormContext.js +1 -2
  79. package/cjs/components/Form/ScrollableElementFormContext.js +1 -2
  80. package/cjs/components/Form/index.js +0 -3
  81. package/cjs/components/Form/utils.js +7 -19
  82. package/cjs/components/FormField/FormField.js +50 -113
  83. package/cjs/components/FormField/index.js +0 -2
  84. package/cjs/components/FormFieldCheckbox/FormFieldCheckbox.js +44 -58
  85. package/cjs/components/FormFieldCheckbox/FormFieldCheckbox.stories.js +3 -9
  86. package/cjs/components/FormFieldCheckbox/index.js +0 -2
  87. package/cjs/components/FormFieldPassword/FormFieldPassword.js +23 -42
  88. package/cjs/components/FormFieldPassword/PasswordMeter.js +13 -24
  89. package/cjs/components/FormFieldPassword/estimatePassword.js +3 -42
  90. package/cjs/components/FormFieldPassword/generatePassword.js +1 -2
  91. package/cjs/components/FormFieldPassword/index.js +0 -3
  92. package/cjs/components/FormFieldRadioButtons/FormFieldRadioButtons.js +49 -69
  93. package/cjs/components/FormFieldRadioButtons/index.js +0 -2
  94. package/cjs/components/FormFieldSelect/FormFieldSelect.js +36 -39
  95. package/cjs/components/FormFieldSelect/index.js +0 -2
  96. package/cjs/components/FormFieldText/FormFieldText.js +33 -56
  97. package/cjs/components/FormFieldText/index.js +0 -2
  98. package/cjs/components/Grid/Grid.js +16 -49
  99. package/cjs/components/Grid/index.js +0 -2
  100. package/cjs/components/GridCol/GridCol.js +13 -26
  101. package/cjs/components/GridCol/index.js +0 -2
  102. package/cjs/components/Heading/Heading.js +10 -24
  103. package/cjs/components/Heading/index.js +0 -2
  104. package/cjs/components/Hint/Hint.js +8 -14
  105. package/cjs/components/Hint/index.js +0 -2
  106. package/cjs/components/Icon/Icon.js +18 -34
  107. package/cjs/components/Icon/Icon.stories.js +1 -8
  108. package/cjs/components/Icon/constants.js +3 -3
  109. package/cjs/components/Icon/images/symbols.svg +59 -1
  110. package/cjs/components/Icon/index.js +0 -4
  111. package/cjs/components/Icon/oldIconNames.js +1 -0
  112. package/cjs/components/Icon/utils.js +5 -16
  113. package/cjs/components/InPlaceEdit/InPlaceEdit.js +11 -29
  114. package/cjs/components/InPlaceEdit/index.js +0 -2
  115. package/cjs/components/Input/Input.js +13 -19
  116. package/cjs/components/Input/index.js +0 -2
  117. package/cjs/components/InputFile/InputFile.js +14 -33
  118. package/cjs/components/InputFile/index.js +0 -2
  119. package/cjs/components/InputNumber/InputNumber.js +20 -57
  120. package/cjs/components/InputNumber/index.js +0 -2
  121. package/cjs/components/Item/Item.js +2 -42
  122. package/cjs/components/Item/index.js +0 -2
  123. package/cjs/components/ItemLink/ItemLink.js +8 -16
  124. package/cjs/components/ItemLink/ItemLink.stories.js +1 -5
  125. package/cjs/components/ItemLink/index.js +0 -2
  126. package/cjs/components/ItemList/ItemList.js +28 -71
  127. package/cjs/components/ItemList/ItemList.stories.js +11 -16
  128. package/cjs/components/ItemList/index.js +0 -2
  129. package/cjs/components/Label/Label.js +12 -16
  130. package/cjs/components/Label/index.js +0 -2
  131. package/cjs/components/Layer/Layer.js +12 -23
  132. package/cjs/components/Layer/index.js +0 -4
  133. package/cjs/components/Layout/Layout.js +66 -111
  134. package/cjs/components/Layout/index.js +0 -2
  135. package/cjs/components/Link/Link.js +15 -30
  136. package/cjs/components/Link/index.js +0 -2
  137. package/cjs/components/List/List.js +205 -372
  138. package/cjs/components/List/List.stories.js +18 -24
  139. package/cjs/components/List/ListAction.js +8 -17
  140. package/cjs/components/List/ListActions.js +12 -31
  141. package/cjs/components/List/ListActionsDivider.js +0 -5
  142. package/cjs/components/List/ListEmptyView.js +23 -39
  143. package/cjs/components/List/ListOperation.js +14 -42
  144. package/cjs/components/List/ListOperationContext.js +1 -2
  145. package/cjs/components/List/example-data/domains.js +1 -12
  146. package/cjs/components/List/images/default.png +0 -0
  147. package/cjs/components/List/images/filtered.png +0 -0
  148. package/cjs/components/List/index.js +0 -7
  149. package/cjs/components/LocaleProvider/LocaleProvider.js +10 -34
  150. package/cjs/components/LocaleProvider/index.js +0 -4
  151. package/cjs/components/Markdown/Markdown.js +20 -29
  152. package/cjs/components/Markdown/index.js +0 -2
  153. package/cjs/components/Media/Media.js +15 -41
  154. package/cjs/components/Media/MediaSection.js +11 -18
  155. package/cjs/components/Media/index.js +0 -3
  156. package/cjs/components/Menu/Menu.js +14 -49
  157. package/cjs/components/Menu/Menu.stories.js +1 -9
  158. package/cjs/components/Menu/MenuBaseItem.js +22 -35
  159. package/cjs/components/Menu/MenuDivider.js +11 -17
  160. package/cjs/components/Menu/MenuHeader.js +12 -20
  161. package/cjs/components/Menu/MenuItem.js +13 -35
  162. package/cjs/components/Menu/MenuSelectableItem.js +15 -24
  163. package/cjs/components/Menu/index.js +0 -7
  164. package/cjs/components/OnDarkContext/OnDarkContext.js +1 -2
  165. package/cjs/components/OnDarkContext/index.js +0 -2
  166. package/cjs/components/Overlay/Backdrop.js +12 -18
  167. package/cjs/components/Overlay/Focuser.js +1 -24
  168. package/cjs/components/Overlay/Overlay.js +22 -71
  169. package/cjs/components/Overlay/index.js +0 -2
  170. package/cjs/components/PageHeader/PageHeader.js +35 -43
  171. package/cjs/components/PageHeader/index.js +0 -2
  172. package/cjs/components/Pagination/Pagination.js +18 -38
  173. package/cjs/components/Pagination/index.js +0 -3
  174. package/cjs/components/Panel/Panel.js +10 -29
  175. package/cjs/components/Panel/index.js +0 -2
  176. package/cjs/components/Paragraph/Paragraph.js +12 -16
  177. package/cjs/components/Paragraph/index.js +0 -2
  178. package/cjs/components/Plaintext/Plaintext.js +10 -16
  179. package/cjs/components/Plaintext/index.js +0 -2
  180. package/cjs/components/Popover/Popover.js +18 -85
  181. package/cjs/components/Popover/Popover.stories.js +5 -14
  182. package/cjs/components/Popover/index.js +0 -2
  183. package/cjs/components/Popper/Popper.js +14 -52
  184. package/cjs/components/Popper/index.js +0 -2
  185. package/cjs/components/Progress/Progress.js +6 -32
  186. package/cjs/components/Progress/index.js +0 -2
  187. package/cjs/components/ProgressBar/ProgressBar.js +21 -28
  188. package/cjs/components/ProgressBar/ProgressIndicator.js +18 -21
  189. package/cjs/components/ProgressBar/index.js +0 -2
  190. package/cjs/components/ProgressDialog/ProgressDialog.js +6 -45
  191. package/cjs/components/ProgressDialog/index.js +0 -2
  192. package/cjs/components/ProgressDialogStep/ProgressDialogStep.js +0 -6
  193. package/cjs/components/ProgressDialogStep/index.js +0 -2
  194. package/cjs/components/ProgressStep/ProgressStep.js +14 -43
  195. package/cjs/components/ProgressStep/index.js +0 -4
  196. package/cjs/components/Radio/Radio.js +15 -21
  197. package/cjs/components/Radio/index.js +0 -2
  198. package/cjs/components/Rating/Rating.js +24 -34
  199. package/cjs/components/Rating/index.js +0 -2
  200. package/cjs/components/ResponsiveContext/ResponsiveContext.js +1 -2
  201. package/cjs/components/ResponsiveContext/index.js +0 -2
  202. package/cjs/components/Section/Section.js +73 -112
  203. package/cjs/components/Section/SectionItem.js +10 -25
  204. package/cjs/components/Section/index.js +0 -3
  205. package/cjs/components/SegmentedControl/SegmentedControl.js +37 -89
  206. package/cjs/components/SegmentedControl/index.js +0 -2
  207. package/cjs/components/Select/MultiValue.js +8 -16
  208. package/cjs/components/Select/Select.js +24 -88
  209. package/cjs/components/Select/Select.stories.js +1 -9
  210. package/cjs/components/Select/SelectControl.js +39 -68
  211. package/cjs/components/Select/SelectOption.js +0 -5
  212. package/cjs/components/Select/SelectOptionGroup.js +0 -5
  213. package/cjs/components/Select/index.js +0 -4
  214. package/cjs/components/Skeleton/Skeleton.js +13 -19
  215. package/cjs/components/Skeleton/Skeleton.stories.js +1 -7
  216. package/cjs/components/Skeleton/SkeletonTabs.js +16 -21
  217. package/cjs/components/Skeleton/SkeletonTabs.stories.js +1 -5
  218. package/cjs/components/Skeleton/SkeletonText.js +21 -25
  219. package/cjs/components/Skeleton/SkeletonText.stories.js +1 -9
  220. package/cjs/components/Skeleton/index.js +0 -4
  221. package/cjs/components/Spinner/Spinner.js +21 -25
  222. package/cjs/components/Spinner/index.js +0 -2
  223. package/cjs/components/SplitButton/SplitButton.js +13 -40
  224. package/cjs/components/SplitButton/index.js +0 -2
  225. package/cjs/components/Spot/Spot.js +10 -30
  226. package/cjs/components/Spot/SpotPopup.js +20 -34
  227. package/cjs/components/Spot/SpotPulsar.js +9 -21
  228. package/cjs/components/Spot/index.js +0 -2
  229. package/cjs/components/Squeezer/Squeezer.js +15 -28
  230. package/cjs/components/Squeezer/index.js +0 -2
  231. package/cjs/components/Status/Status.js +17 -31
  232. package/cjs/components/Status/Status.stories.js +1 -5
  233. package/cjs/components/Status/index.js +0 -2
  234. package/cjs/components/StatusMessage/StatusMessage.js +16 -23
  235. package/cjs/components/StatusMessage/index.js +0 -2
  236. package/cjs/components/Subnav/Subnav.js +23 -50
  237. package/cjs/components/Subnav/index.js +0 -4
  238. package/cjs/components/Switch/Switch.js +2 -29
  239. package/cjs/components/Switch/index.js +0 -2
  240. package/cjs/components/SwitchesPanel/SwitchesPanel.js +15 -25
  241. package/cjs/components/SwitchesPanel/index.js +0 -2
  242. package/cjs/components/SwitchesPanelItem/SwitchesPanelItem.js +2 -27
  243. package/cjs/components/SwitchesPanelItem/index.js +0 -2
  244. package/cjs/components/Tabs/SearchBar.js +6 -83
  245. package/cjs/components/Tabs/Tab.js +6 -15
  246. package/cjs/components/Tabs/Tabs.js +40 -123
  247. package/cjs/components/Tabs/Tabs.stories.js +1 -6
  248. package/cjs/components/Tabs/index.js +0 -4
  249. package/cjs/components/Text/Text.js +15 -25
  250. package/cjs/components/Text/index.js +0 -2
  251. package/cjs/components/TextArea/TextArea.js +8 -31
  252. package/cjs/components/TextArea/calculateNodeHeight.js +14 -21
  253. package/cjs/components/TextArea/index.js +0 -2
  254. package/cjs/components/Toast/Toast.js +3 -27
  255. package/cjs/components/Toast/index.js +0 -4
  256. package/cjs/components/Toaster/Toaster.js +45 -61
  257. package/cjs/components/Toaster/index.js +0 -2
  258. package/cjs/components/Toolbar/RegistryContext.js +3 -14
  259. package/cjs/components/Toolbar/Toolbar.js +16 -31
  260. package/cjs/components/Toolbar/ToolbarExpander.js +7 -18
  261. package/cjs/components/Toolbar/ToolbarGroup.js +5 -37
  262. package/cjs/components/Toolbar/ToolbarItem.js +3 -25
  263. package/cjs/components/Toolbar/ToolbarMenu.js +7 -34
  264. package/cjs/components/Toolbar/index.js +0 -4
  265. package/cjs/components/Tooltip/Tooltip.js +28 -49
  266. package/cjs/components/Tooltip/index.js +0 -2
  267. package/cjs/components/Tour/Tour.js +11 -19
  268. package/cjs/components/Tour/index.js +0 -2
  269. package/cjs/components/Translate/Translate.js +14 -37
  270. package/cjs/components/Translate/index.js +0 -3
  271. package/cjs/components/VerticalContext/VerticalContext.js +1 -2
  272. package/cjs/components/VerticalContext/index.js +0 -3
  273. package/cjs/components/index.js +0 -104
  274. package/cjs/components/intentIconMap.js +1 -0
  275. package/cjs/components/utils.js +39 -81
  276. package/cjs/constants.js +1 -0
  277. package/cjs/index.js +1 -9
  278. package/cjs/publicPath.js +3 -7
  279. package/cjs/utils.js +3 -9
  280. package/dist/images/default.png +0 -0
  281. package/dist/images/filtered.png +0 -0
  282. package/dist/images/symbols.svg +59 -1
  283. package/dist/plesk-ui-library-rtl.css +1 -1
  284. package/dist/plesk-ui-library-rtl.css.map +1 -1
  285. package/dist/plesk-ui-library.css +1 -1
  286. package/dist/plesk-ui-library.css.map +1 -1
  287. package/dist/plesk-ui-library.js +8861 -13237
  288. package/dist/plesk-ui-library.js.map +1 -1
  289. package/dist/plesk-ui-library.min.js +8 -8
  290. package/dist/plesk-ui-library.min.js.map +1 -1
  291. package/esm/components/Action/Action.js +19 -24
  292. package/esm/components/Action/index.js +1 -0
  293. package/esm/components/Alert/Alert.js +19 -17
  294. package/esm/components/Alert/Alert.stories.js +1 -0
  295. package/esm/components/Alert/index.js +1 -0
  296. package/esm/components/AutoClosable/AutoClosable.js +3 -21
  297. package/esm/components/AutoClosable/index.js +1 -0
  298. package/esm/components/AuxiliaryActions/AuxiliaryActions.js +17 -15
  299. package/esm/components/AuxiliaryActions/index.js +1 -0
  300. package/esm/components/Badge/Badge.js +11 -16
  301. package/esm/components/Badge/index.js +1 -0
  302. package/esm/components/Breadcrumbs/Breadcrumbs.js +22 -20
  303. package/esm/components/Breadcrumbs/index.js +1 -0
  304. package/esm/components/Button/Button.js +40 -70
  305. package/esm/components/Button/Button.stories.js +1 -0
  306. package/esm/components/Button/index.js +1 -0
  307. package/esm/components/ButtonGroup/ButtonGroup.js +14 -12
  308. package/esm/components/ButtonGroup/index.js +1 -0
  309. package/esm/components/Card/Card.js +4 -63
  310. package/esm/components/Card/CardButton.js +10 -8
  311. package/esm/components/Card/PreviewPanel.js +21 -42
  312. package/esm/components/Card/helpers.js +6 -5
  313. package/esm/components/Card/index.js +1 -0
  314. package/esm/components/CardList/CardList.js +44 -87
  315. package/esm/components/CardList/CardListToolbar.js +17 -35
  316. package/esm/components/CardList/index.js +1 -0
  317. package/esm/components/Carousel/Carousel.js +41 -64
  318. package/esm/components/Carousel/index.js +1 -0
  319. package/esm/components/Checkbox/Checkbox.js +17 -20
  320. package/esm/components/Checkbox/index.js +1 -0
  321. package/esm/components/ClosingConfirmation/index.js +1 -0
  322. package/esm/components/ClosingConfirmation/locale/en-US.js +1 -0
  323. package/esm/components/ClosingConfirmation/useClosingConfirmation.js +6 -13
  324. package/esm/components/CodeEditor/CodeEditor.js +22 -55
  325. package/esm/components/CodeEditor/CodeMirror.js +1 -4
  326. package/esm/components/CodeEditor/index.js +1 -0
  327. package/esm/components/Columns/Column.js +15 -16
  328. package/esm/components/Columns/Columns.js +20 -22
  329. package/esm/components/Columns/index.js +1 -0
  330. package/esm/components/ComboBox/ComboBox.js +16 -43
  331. package/esm/components/ComboBox/ComboBoxOption.js +1 -3
  332. package/esm/components/ComboBox/index.js +1 -0
  333. package/esm/components/ComboBoxDropdown/ComboBoxDropdown.js +22 -35
  334. package/esm/components/ComboBoxDropdown/index.js +1 -0
  335. package/esm/components/ConsoleOutput/ConsoleOutput.js +3 -19
  336. package/esm/components/ConsoleOutput/index.js +1 -0
  337. package/esm/components/ContentLoader/ContentLoader.js +16 -22
  338. package/esm/components/ContentLoader/IconsLoader.js +15 -23
  339. package/esm/components/ContentLoader/index.js +1 -0
  340. package/esm/components/Cuttable/Cuttable.js +24 -29
  341. package/esm/components/Cuttable/Cuttable.stories.js +1 -0
  342. package/esm/components/Cuttable/index.js +1 -0
  343. package/esm/components/Dialog/Dialog.js +27 -65
  344. package/esm/components/Dialog/Dialog.stories.js +3 -1
  345. package/esm/components/Dialog/index.js +1 -0
  346. package/esm/components/DistractionFreeModeContext/DistractionFreeModeContext.js +1 -0
  347. package/esm/components/DistractionFreeModeContext/index.js +1 -0
  348. package/esm/components/Drawer/Drawer.js +77 -94
  349. package/esm/components/Drawer/Drawer.stories.js +7 -3
  350. package/esm/components/Drawer/DrawerProgress.js +3 -25
  351. package/esm/components/Drawer/Header.js +5 -14
  352. package/esm/components/Drawer/ScrollDirection.js +3 -9
  353. package/esm/components/Drawer/index.js +1 -0
  354. package/esm/components/Dropdown/Dropdown.js +26 -48
  355. package/esm/components/Dropdown/index.js +1 -0
  356. package/esm/components/Dropdown/locale/en-US.js +1 -0
  357. package/esm/components/ExtendedStatusMessage/ExtendedStatusMessage.js +27 -25
  358. package/esm/components/ExtendedStatusMessage/ExtendedStatusMessageActions.js +12 -9
  359. package/esm/components/ExtendedStatusMessage/ExtendedStatusMessageDescription.js +12 -9
  360. package/esm/components/ExtendedStatusMessage/ExtendedStatusMessageSeparator.js +10 -7
  361. package/esm/components/ExtendedStatusMessage/ExtendedStatusMessageTitle.js +13 -10
  362. package/esm/components/ExtendedStatusMessage/index.js +1 -0
  363. package/esm/components/Figure/Figure.js +19 -21
  364. package/esm/components/Figure/index.js +1 -0
  365. package/esm/components/FocusTrap/FocusTrap.js +9 -30
  366. package/esm/components/FocusTrap/index.js +1 -0
  367. package/esm/components/Form/DisabledContext.js +1 -0
  368. package/esm/components/Form/Form.js +67 -101
  369. package/esm/components/Form/Form.stories.js +1 -0
  370. package/esm/components/Form/FormContext.js +1 -0
  371. package/esm/components/Form/ScrollableElementFormContext.js +1 -0
  372. package/esm/components/Form/index.js +1 -0
  373. package/esm/components/Form/utils.js +7 -17
  374. package/esm/components/FormField/FormField.js +50 -98
  375. package/esm/components/FormField/index.js +1 -0
  376. package/esm/components/FormFieldCheckbox/FormFieldCheckbox.js +45 -48
  377. package/esm/components/FormFieldCheckbox/FormFieldCheckbox.stories.js +3 -1
  378. package/esm/components/FormFieldCheckbox/index.js +1 -0
  379. package/esm/components/FormFieldPassword/FormFieldPassword.js +24 -31
  380. package/esm/components/FormFieldPassword/PasswordMeter.js +13 -14
  381. package/esm/components/FormFieldPassword/estimatePassword.js +3 -35
  382. package/esm/components/FormFieldPassword/generatePassword.js +1 -2
  383. package/esm/components/FormFieldPassword/index.js +1 -0
  384. package/esm/components/FormFieldPassword/locale/en-US.js +1 -0
  385. package/esm/components/FormFieldRadioButtons/FormFieldRadioButtons.js +50 -58
  386. package/esm/components/FormFieldRadioButtons/index.js +1 -0
  387. package/esm/components/FormFieldSelect/FormFieldSelect.js +37 -32
  388. package/esm/components/FormFieldSelect/index.js +1 -0
  389. package/esm/components/FormFieldText/FormFieldText.js +34 -45
  390. package/esm/components/FormFieldText/index.js +1 -0
  391. package/esm/components/Grid/Grid.js +17 -40
  392. package/esm/components/Grid/index.js +1 -0
  393. package/esm/components/GridCol/GridCol.js +14 -19
  394. package/esm/components/GridCol/index.js +1 -0
  395. package/esm/components/Heading/Heading.js +11 -16
  396. package/esm/components/Heading/index.js +1 -0
  397. package/esm/components/Hint/Hint.js +9 -9
  398. package/esm/components/Hint/index.js +1 -0
  399. package/esm/components/Icon/Icon.js +18 -20
  400. package/esm/components/Icon/Icon.stories.js +1 -0
  401. package/esm/components/Icon/constants.js +3 -2
  402. package/esm/components/Icon/images/symbols.svg +59 -1
  403. package/esm/components/Icon/index.js +1 -0
  404. package/esm/components/Icon/oldIconNames.js +1 -0
  405. package/esm/components/Icon/utils.js +5 -7
  406. package/esm/components/InPlaceEdit/InPlaceEdit.js +12 -20
  407. package/esm/components/InPlaceEdit/index.js +1 -0
  408. package/esm/components/InPlaceEdit/locale/en-US.js +1 -0
  409. package/esm/components/Input/Input.js +14 -14
  410. package/esm/components/Input/index.js +1 -0
  411. package/esm/components/InputFile/InputFile.js +14 -21
  412. package/esm/components/InputFile/index.js +1 -0
  413. package/esm/components/InputFile/locale/en-US.js +1 -0
  414. package/esm/components/InputNumber/InputNumber.js +20 -47
  415. package/esm/components/InputNumber/index.js +1 -0
  416. package/esm/components/Item/Item.js +2 -28
  417. package/esm/components/Item/index.js +1 -0
  418. package/esm/components/ItemLink/ItemLink.js +9 -10
  419. package/esm/components/ItemLink/ItemLink.stories.js +1 -0
  420. package/esm/components/ItemLink/index.js +1 -0
  421. package/esm/components/ItemList/ItemList.js +29 -62
  422. package/esm/components/ItemList/ItemList.stories.js +11 -7
  423. package/esm/components/ItemList/index.js +1 -0
  424. package/esm/components/Label/Label.js +13 -11
  425. package/esm/components/Label/index.js +1 -0
  426. package/esm/components/Layer/Layer.js +12 -14
  427. package/esm/components/Layer/index.js +1 -0
  428. package/esm/components/Layout/Layout.js +66 -105
  429. package/esm/components/Layout/index.js +1 -0
  430. package/esm/components/Link/Link.js +16 -20
  431. package/esm/components/Link/index.js +1 -0
  432. package/esm/components/List/List.js +206 -361
  433. package/esm/components/List/List.stories.js +18 -12
  434. package/esm/components/List/ListAction.js +9 -12
  435. package/esm/components/List/ListActions.js +13 -17
  436. package/esm/components/List/ListActionsDivider.js +1 -2
  437. package/esm/components/List/ListEmptyView.js +23 -30
  438. package/esm/components/List/ListOperation.js +14 -29
  439. package/esm/components/List/ListOperationContext.js +1 -0
  440. package/esm/components/List/example-data/domains.js +1 -12
  441. package/esm/components/List/images/default.png +0 -0
  442. package/esm/components/List/images/filtered.png +0 -0
  443. package/esm/components/List/index.js +1 -0
  444. package/esm/components/LocaleProvider/LocaleProvider.js +11 -28
  445. package/esm/components/LocaleProvider/index.js +1 -0
  446. package/esm/components/Markdown/Markdown.js +21 -22
  447. package/esm/components/Markdown/index.js +1 -0
  448. package/esm/components/Media/Media.js +16 -31
  449. package/esm/components/Media/MediaSection.js +13 -12
  450. package/esm/components/Media/index.js +1 -0
  451. package/esm/components/Menu/Menu.js +14 -34
  452. package/esm/components/Menu/Menu.stories.js +1 -1
  453. package/esm/components/Menu/MenuBaseItem.js +24 -26
  454. package/esm/components/Menu/MenuDivider.js +13 -11
  455. package/esm/components/Menu/MenuHeader.js +14 -13
  456. package/esm/components/Menu/MenuItem.js +15 -24
  457. package/esm/components/Menu/MenuSelectableItem.js +17 -17
  458. package/esm/components/Menu/index.js +1 -0
  459. package/esm/components/OnDarkContext/OnDarkContext.js +1 -0
  460. package/esm/components/OnDarkContext/index.js +1 -0
  461. package/esm/components/Overlay/Backdrop.js +13 -13
  462. package/esm/components/Overlay/Focuser.js +1 -18
  463. package/esm/components/Overlay/Overlay.js +23 -63
  464. package/esm/components/Overlay/index.js +1 -0
  465. package/esm/components/PageHeader/PageHeader.js +36 -34
  466. package/esm/components/PageHeader/index.js +1 -0
  467. package/esm/components/Pagination/Pagination.js +18 -24
  468. package/esm/components/Pagination/index.js +1 -0
  469. package/esm/components/Panel/Panel.js +11 -18
  470. package/esm/components/Panel/index.js +1 -0
  471. package/esm/components/Paragraph/Paragraph.js +13 -11
  472. package/esm/components/Paragraph/index.js +1 -0
  473. package/esm/components/Plaintext/Plaintext.js +11 -11
  474. package/esm/components/Plaintext/index.js +1 -0
  475. package/esm/components/Popover/Popover.js +18 -73
  476. package/esm/components/Popover/Popover.stories.js +5 -2
  477. package/esm/components/Popover/index.js +1 -0
  478. package/esm/components/Popper/Popper.js +16 -44
  479. package/esm/components/Popper/index.js +1 -0
  480. package/esm/components/Progress/Progress.js +7 -22
  481. package/esm/components/Progress/index.js +1 -0
  482. package/esm/components/ProgressBar/ProgressBar.js +22 -20
  483. package/esm/components/ProgressBar/ProgressIndicator.js +19 -17
  484. package/esm/components/ProgressBar/index.js +1 -0
  485. package/esm/components/ProgressDialog/ProgressDialog.js +7 -35
  486. package/esm/components/ProgressDialog/index.js +1 -0
  487. package/esm/components/ProgressDialogStep/ProgressDialogStep.js +2 -3
  488. package/esm/components/ProgressDialogStep/index.js +1 -0
  489. package/esm/components/ProgressStep/ProgressStep.js +14 -29
  490. package/esm/components/ProgressStep/index.js +1 -0
  491. package/esm/components/Radio/Radio.js +15 -15
  492. package/esm/components/Radio/index.js +1 -0
  493. package/esm/components/Rating/Rating.js +24 -28
  494. package/esm/components/Rating/index.js +1 -0
  495. package/esm/components/ResponsiveContext/ResponsiveContext.js +1 -0
  496. package/esm/components/ResponsiveContext/index.js +1 -0
  497. package/esm/components/Section/Section.js +73 -98
  498. package/esm/components/Section/SectionItem.js +11 -16
  499. package/esm/components/Section/index.js +1 -0
  500. package/esm/components/SegmentedControl/SegmentedControl.js +37 -79
  501. package/esm/components/SegmentedControl/index.js +1 -0
  502. package/esm/components/Select/MultiValue.js +8 -10
  503. package/esm/components/Select/Select.js +24 -73
  504. package/esm/components/Select/Select.stories.js +1 -0
  505. package/esm/components/Select/SelectControl.js +39 -57
  506. package/esm/components/Select/SelectOption.js +1 -3
  507. package/esm/components/Select/SelectOptionGroup.js +1 -3
  508. package/esm/components/Select/index.js +1 -0
  509. package/esm/components/Skeleton/Skeleton.js +14 -13
  510. package/esm/components/Skeleton/Skeleton.stories.js +1 -0
  511. package/esm/components/Skeleton/SkeletonTabs.js +17 -15
  512. package/esm/components/Skeleton/SkeletonTabs.stories.js +1 -0
  513. package/esm/components/Skeleton/SkeletonText.js +22 -19
  514. package/esm/components/Skeleton/SkeletonText.stories.js +1 -0
  515. package/esm/components/Skeleton/index.js +1 -0
  516. package/esm/components/Spinner/Spinner.js +22 -20
  517. package/esm/components/Spinner/index.js +1 -0
  518. package/esm/components/SplitButton/SplitButton.js +13 -27
  519. package/esm/components/SplitButton/index.js +1 -0
  520. package/esm/components/Spot/Spot.js +10 -19
  521. package/esm/components/Spot/SpotPopup.js +20 -22
  522. package/esm/components/Spot/SpotPulsar.js +9 -13
  523. package/esm/components/Spot/index.js +1 -0
  524. package/esm/components/Squeezer/Squeezer.js +15 -26
  525. package/esm/components/Squeezer/index.js +1 -0
  526. package/esm/components/Status/Status.js +17 -20
  527. package/esm/components/Status/Status.stories.js +1 -0
  528. package/esm/components/Status/index.js +1 -0
  529. package/esm/components/StatusMessage/StatusMessage.js +17 -15
  530. package/esm/components/StatusMessage/index.js +1 -0
  531. package/esm/components/Subnav/Subnav.js +24 -38
  532. package/esm/components/Subnav/index.js +1 -0
  533. package/esm/components/Switch/Switch.js +3 -19
  534. package/esm/components/Switch/index.js +1 -0
  535. package/esm/components/SwitchesPanel/SwitchesPanel.js +16 -16
  536. package/esm/components/SwitchesPanel/index.js +1 -0
  537. package/esm/components/SwitchesPanelItem/SwitchesPanelItem.js +3 -17
  538. package/esm/components/SwitchesPanelItem/index.js +1 -0
  539. package/esm/components/Tabs/SearchBar.js +7 -78
  540. package/esm/components/Tabs/Tab.js +8 -12
  541. package/esm/components/Tabs/Tabs.js +40 -106
  542. package/esm/components/Tabs/Tabs.stories.js +1 -0
  543. package/esm/components/Tabs/index.js +1 -0
  544. package/esm/components/Text/Text.js +16 -17
  545. package/esm/components/Text/index.js +1 -0
  546. package/esm/components/TextArea/TextArea.js +8 -26
  547. package/esm/components/TextArea/calculateNodeHeight.js +14 -21
  548. package/esm/components/TextArea/index.js +1 -0
  549. package/esm/components/Toast/Toast.js +3 -13
  550. package/esm/components/Toast/index.js +1 -0
  551. package/esm/components/Toaster/Toaster.js +45 -50
  552. package/esm/components/Toaster/index.js +1 -0
  553. package/esm/components/Toolbar/RegistryContext.js +3 -10
  554. package/esm/components/Toolbar/Toolbar.js +17 -20
  555. package/esm/components/Toolbar/ToolbarExpander.js +8 -10
  556. package/esm/components/Toolbar/ToolbarGroup.js +6 -22
  557. package/esm/components/Toolbar/ToolbarItem.js +3 -13
  558. package/esm/components/Toolbar/ToolbarMenu.js +7 -21
  559. package/esm/components/Toolbar/index.js +1 -0
  560. package/esm/components/Tooltip/Tooltip.js +28 -43
  561. package/esm/components/Tooltip/index.js +1 -0
  562. package/esm/components/Tour/Tour.js +12 -16
  563. package/esm/components/Tour/index.js +1 -0
  564. package/esm/components/Translate/Translate.js +14 -28
  565. package/esm/components/Translate/index.js +1 -0
  566. package/esm/components/VerticalContext/VerticalContext.js +1 -0
  567. package/esm/components/VerticalContext/index.js +1 -0
  568. package/esm/components/index.js +1 -0
  569. package/esm/components/intentIconMap.js +1 -0
  570. package/esm/components/utils.js +39 -60
  571. package/esm/constants.js +1 -0
  572. package/esm/index.js +1 -1
  573. package/esm/publicPath.js +3 -7
  574. package/esm/utils.js +4 -1
  575. package/package.json +27 -23
  576. package/styleguide/build/bundle.a0fc0411.js +2 -0
  577. package/styleguide/build/{bundle.59e52792.js.LICENSE.txt → bundle.a0fc0411.js.LICENSE.txt} +19 -8
  578. package/styleguide/images/default.png +0 -0
  579. package/styleguide/images/filtered.png +0 -0
  580. package/styleguide/images/symbols.svg +59 -1
  581. package/styleguide/index.html +2 -2
  582. package/types/package.d.ts +8 -4
  583. package/types/src/components/Button/Button.stories.d.ts +0 -1
  584. package/types/src/components/Dialog/Dialog.stories.d.ts +0 -1
  585. package/types/src/components/DistractionFreeModeContext/DistractionFreeModeContext.d.ts +0 -1
  586. package/types/src/components/Drawer/Drawer.stories.d.ts +0 -1
  587. package/types/src/components/Form/DisabledContext.d.ts +0 -1
  588. package/types/src/components/Form/Form.stories.d.ts +0 -1
  589. package/types/src/components/Form/FormContext.d.ts +0 -1
  590. package/types/src/components/FormFieldCheckbox/FormFieldCheckbox.stories.d.ts +0 -1
  591. package/types/src/components/Icon/Icon.stories.d.ts +0 -1
  592. package/types/src/components/Icon/constants.d.ts +1 -1
  593. package/types/src/components/List/List.stories.d.ts +0 -1
  594. package/types/src/components/Menu/Menu.stories.d.ts +0 -1
  595. package/types/src/components/OnDarkContext/OnDarkContext.d.ts +0 -1
  596. package/types/src/components/Popover/Popover.stories.d.ts +0 -1
  597. package/types/src/components/ResponsiveContext/ResponsiveContext.d.ts +0 -1
  598. package/types/src/components/Tabs/Tabs.stories.d.ts +0 -1
  599. package/types/src/components/Toolbar/RegistryContext.d.ts +0 -1
  600. package/types/src/components/VerticalContext/VerticalContext.d.ts +0 -1
  601. package/cjs/components/List/images/default.svg +0 -1
  602. package/cjs/components/List/images/filtered.svg +0 -1
  603. package/esm/components/List/images/default.svg +0 -1
  604. package/esm/components/List/images/filtered.svg +0 -1
  605. package/styleguide/build/bundle.59e52792.js +0 -2
@@ -1,77 +1,49 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = void 0;
9
-
10
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
-
12
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
10
  var _react = _interopRequireWildcard(require("react"));
15
-
16
11
  var _propTypes = _interopRequireDefault(require("prop-types"));
17
-
18
12
  var _classnames = _interopRequireDefault(require("classnames"));
19
-
20
13
  var _reactTransitionGroup = require("react-transition-group");
21
-
22
14
  var _memoizeOne = _interopRequireDefault(require("memoize-one"));
23
-
24
15
  var _reactMeasure = _interopRequireDefault(require("react-measure"));
25
-
26
16
  var _constants = require("../../constants");
27
-
28
17
  var _Checkbox = _interopRequireDefault(require("../Checkbox"));
29
-
30
18
  var _Icon = _interopRequireDefault(require("../Icon"));
31
-
32
19
  var _utils = require("../utils");
33
-
34
20
  var _Button = _interopRequireDefault(require("../Button"));
35
-
36
21
  var _Translate = _interopRequireDefault(require("../Translate"));
37
-
38
22
  var _Text = _interopRequireDefault(require("../Text"));
39
-
40
23
  var _Pagination = require("../Pagination");
41
-
42
24
  var _Spinner = _interopRequireDefault(require("../Spinner"));
43
-
44
25
  var _ListOperationContext = _interopRequireDefault(require("./ListOperationContext"));
45
-
46
26
  var _VerticalContext = _interopRequireWildcard(require("../VerticalContext"));
47
-
48
27
  var _ListEmptyView = _interopRequireDefault(require("./ListEmptyView"));
49
-
50
28
  var _Columns = _interopRequireWildcard(require("../Columns"));
51
-
52
29
  var _useFocusVisible = require("use-focus-visible");
53
-
54
30
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
55
-
56
31
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
57
-
58
32
  const getRowKey = (row, props) => {
59
33
  const {
60
34
  rowKey
61
35
  } = props;
62
-
63
36
  if (typeof rowKey === 'function') {
64
37
  return rowKey(row);
65
38
  }
66
-
67
39
  return row[rowKey];
68
40
  };
69
-
70
- const Tbody = ({
71
- baseClassName,
72
- className,
73
- ...props
74
- }) => {
41
+ const Tbody = _ref => {
42
+ let {
43
+ baseClassName,
44
+ className,
45
+ ...props
46
+ } = _ref;
75
47
  const {
76
48
  focusVisible,
77
49
  onFocus,
@@ -85,7 +57,6 @@ const Tbody = ({
85
57
  })
86
58
  }));
87
59
  };
88
-
89
60
  Tbody.propTypes = {
90
61
  onFocus: _propTypes.default.func,
91
62
  onBlur: _propTypes.default.func,
@@ -97,16 +68,17 @@ Tbody.defaultProps = {
97
68
  onBlur: undefined,
98
69
  className: undefined,
99
70
  baseClassName: `${_constants.CLS_PREFIX}list__wrapper`
100
- }; // eslint-disable-next-line react/prop-types
71
+ };
101
72
 
102
- const getHumanTotalRows = ({
103
- selectedRows,
104
- totalRows,
105
- allRowsSelected,
106
- translators
107
- }) => {
73
+ // eslint-disable-next-line react/prop-types
74
+ const getHumanTotalRows = _ref2 => {
75
+ let {
76
+ selectedRows,
77
+ totalRows,
78
+ allRowsSelected,
79
+ translators
80
+ } = _ref2;
108
81
  let mode;
109
-
110
82
  if (!allRowsSelected && selectedRows === 0) {
111
83
  mode = 'totalRows';
112
84
  } else if (allRowsSelected || selectedRows === totalRows) {
@@ -114,11 +86,9 @@ const getHumanTotalRows = ({
114
86
  } else {
115
87
  mode = 'selectedRows';
116
88
  }
117
-
118
89
  const wrapToText = element => /*#__PURE__*/_react.default.createElement(_Text.default, {
119
90
  fontSize: "sm"
120
91
  }, element);
121
-
122
92
  switch (mode) {
123
93
  case 'totalRows':
124
94
  return wrapToText( /*#__PURE__*/_react.default.createElement(_Translate.default, {
@@ -130,7 +100,6 @@ const getHumanTotalRows = ({
130
100
  },
131
101
  translators: translators
132
102
  }));
133
-
134
103
  case 'selectedRows':
135
104
  return wrapToText( /*#__PURE__*/_react.default.createElement(_Translate.default, {
136
105
  namespace: "List",
@@ -144,7 +113,6 @@ const getHumanTotalRows = ({
144
113
  },
145
114
  translators: translators
146
115
  }));
147
-
148
116
  case 'selectedAllRows':
149
117
  return wrapToText( /*#__PURE__*/_react.default.createElement(_Translate.default, {
150
118
  namespace: "List",
@@ -163,21 +131,19 @@ const getHumanTotalRows = ({
163
131
  },
164
132
  translators: translators
165
133
  }));
166
-
167
134
  default:
168
135
  return null;
169
136
  }
170
137
  };
138
+
171
139
  /**
172
140
  * `List` component is used for displaying a collection of tabular data.
173
141
  * [More details about designing of lists.](#!/Sets%20of%20Objects)
174
142
  * @since 0.0.42
175
143
  */
176
-
177
-
178
144
  class List extends _react.Component {
179
- constructor(...args) {
180
- super(...args);
145
+ constructor() {
146
+ super(...arguments);
181
147
  (0, _defineProperty2.default)(this, "state", {
182
148
  sortInPlace: !this.props.pagination,
183
149
  vertical: false,
@@ -189,18 +155,17 @@ class List extends _react.Component {
189
155
  reorderableItemWidths: []
190
156
  });
191
157
  (0, _defineProperty2.default)(this, "anchorRef", /*#__PURE__*/(0, _react.createRef)());
192
- (0, _defineProperty2.default)(this, "flatData", data => data.reduce((acc, {
193
- data,
194
- ...row
195
- }) => {
158
+ (0, _defineProperty2.default)(this, "flatData", data => data.reduce((acc, _ref3) => {
159
+ let {
160
+ data,
161
+ ...row
162
+ } = _ref3;
196
163
  const {
197
164
  virtual
198
165
  } = this.getRowProps(row);
199
-
200
166
  if (virtual) {
201
167
  return [...acc, ...(data ? this.flatData(data) : [])];
202
168
  }
203
-
204
169
  return [...acc, row, ...(data ? this.flatData(data) : [])];
205
170
  }, []));
206
171
  (0, _defineProperty2.default)(this, "handleRowSelectionChange", (checked, rowKey) => {
@@ -208,7 +173,6 @@ class List extends _react.Component {
208
173
  onAllRowsSelectedChange
209
174
  } = this.props;
210
175
  let selection;
211
-
212
176
  if (checked) {
213
177
  selection = this.state.selection.slice();
214
178
  selection.push(rowKey);
@@ -216,7 +180,6 @@ class List extends _react.Component {
216
180
  selection = this.state.selection.filter(value => value !== rowKey);
217
181
  (0, _utils.safeInvoke)(onAllRowsSelectedChange, false);
218
182
  }
219
-
220
183
  this.setSelection(selection);
221
184
  });
222
185
  (0, _defineProperty2.default)(this, "handleGlobalSelectionChange", headerChecked => {
@@ -229,29 +192,25 @@ class List extends _react.Component {
229
192
  const nextSelection = [];
230
193
  this.flatData(this.props.data).forEach(row => {
231
194
  const key = getRowKey(row, this.props);
232
-
233
195
  if (row.disabled || this.isRowLoading(row)) {
234
196
  if (selection.indexOf(key) !== -1) {
235
197
  nextSelection.push(key);
236
198
  }
237
-
238
199
  return;
239
200
  }
240
-
241
201
  if (headerChecked) {
242
202
  nextSelection.push(key);
243
203
  }
244
204
  });
245
-
246
205
  if (!headerChecked) {
247
206
  (0, _utils.safeInvoke)(onAllRowsSelectedChange, false);
248
207
  }
249
-
250
208
  this.setSelection(nextSelection);
251
209
  });
252
- (0, _defineProperty2.default)(this, "handleResize", ({
253
- bounds
254
- }) => {
210
+ (0, _defineProperty2.default)(this, "handleResize", _ref4 => {
211
+ let {
212
+ bounds
213
+ } = _ref4;
255
214
  this.setState({
256
215
  vertical: bounds.width < this.props.vertical
257
216
  });
@@ -262,43 +221,38 @@ class List extends _react.Component {
262
221
  columns
263
222
  } = this.props;
264
223
  const column = columns.find(c => c.type === 'title');
265
-
266
224
  if (column && column.key) {
267
225
  return row[column.key];
268
226
  }
269
-
270
227
  return undefined;
271
228
  });
272
229
  (0, _defineProperty2.default)(this, "getRowProps", row => {
273
230
  const {
274
231
  rowProps
275
232
  } = this.props;
276
-
277
233
  if (typeof rowProps === 'function') {
278
- return { ...rowProps(row)
234
+ return {
235
+ ...rowProps(row)
279
236
  };
280
237
  }
281
-
282
- return { ...rowProps
238
+ return {
239
+ ...rowProps
283
240
  };
284
241
  });
285
242
  (0, _defineProperty2.default)(this, "isAllRowsChecked", (0, _memoizeOne.default)((rows, selectedKeys) => {
286
243
  const filteredRows = this.flatData(rows).filter(row => !row.disabled);
287
-
288
244
  if (filteredRows.length > 0) {
289
245
  return filteredRows.every(row => {
290
246
  const key = getRowKey(row, this.props);
291
247
  return selectedKeys.indexOf(key) !== -1;
292
248
  });
293
249
  }
294
-
295
250
  return false;
296
251
  }));
297
252
  (0, _defineProperty2.default)(this, "isAllRowsExpanded", (0, _memoizeOne.default)((rows, expandedRows) => this.flatData(rows).every(row => {
298
253
  if (!this.isRowExpandable(row)) {
299
254
  return true;
300
255
  }
301
-
302
256
  const key = getRowKey(row, this.props);
303
257
  return expandedRows.indexOf(key) !== -1;
304
258
  })));
@@ -313,15 +267,12 @@ class List extends _react.Component {
313
267
  const nextExpandedRows = [];
314
268
  this.flatData(this.props.data).forEach(row => {
315
269
  const key = getRowKey(row, this.props);
316
-
317
270
  if (!this.isRowExpandable(row)) {
318
271
  if (expandedRows.indexOf(key) !== -1) {
319
272
  nextExpandedRows.push(key);
320
273
  }
321
-
322
274
  return;
323
275
  }
324
-
325
276
  if (!headerExpanded) {
326
277
  nextExpandedRows.push(key);
327
278
  }
@@ -332,86 +283,83 @@ class List extends _react.Component {
332
283
  if ((0, _utils.isClickable)(e)) {
333
284
  return;
334
285
  }
335
-
336
286
  if (this.isRowExpandable(row)) {
337
287
  this.handleRowExpandingChange(row);
338
288
  }
339
289
  });
340
290
  }
341
-
342
- static getDerivedStateFromProps({
343
- sortColumn,
344
- sortDirection,
345
- selection,
346
- expandedRows,
347
- notExpandableRows,
348
- renderRowBody,
349
- data,
350
- pagination,
351
- vertical,
352
- rowKey
353
- }, {
354
- prevSortColumn,
355
- prevSortDirection,
356
- prevData,
357
- prevSelection,
358
- prevPagination,
359
- prevExpandedRows,
360
- ...state
361
- }) {
291
+ static getDerivedStateFromProps(_ref5, _ref6) {
292
+ let {
293
+ sortColumn,
294
+ sortDirection,
295
+ selection,
296
+ expandedRows,
297
+ notExpandableRows,
298
+ renderRowBody,
299
+ data,
300
+ pagination,
301
+ vertical,
302
+ rowKey
303
+ } = _ref5;
304
+ let {
305
+ prevSortColumn,
306
+ prevSortDirection,
307
+ prevData,
308
+ prevSelection,
309
+ prevPagination,
310
+ prevExpandedRows,
311
+ ...state
312
+ } = _ref6;
362
313
  let nextState = {};
363
-
364
314
  if (prevSortColumn !== sortColumn || prevSortDirection !== sortDirection) {
365
- nextState = { ...nextState,
315
+ nextState = {
316
+ ...nextState,
366
317
  sortColumn,
367
318
  sortDirection
368
319
  };
369
320
  }
370
-
371
321
  if (prevData !== data) {
372
322
  if (renderRowBody && (prevData === undefined || prevData && prevData.length === 0) && data && data.length === 1) {
373
323
  const key = getRowKey(data[0], {
374
324
  rowKey
375
325
  });
376
-
377
326
  if (notExpandableRows.indexOf(key) === -1) {
378
- nextState = { ...nextState,
327
+ nextState = {
328
+ ...nextState,
379
329
  expandedRows: [...expandedRows, key]
380
330
  };
381
331
  }
382
332
  }
383
-
384
333
  const keys = data.map(row => getRowKey(row, {
385
334
  rowKey
386
335
  }));
387
336
  const nextSelection = state.selection.filter(key => keys.indexOf(key) !== -1);
388
- nextState = { ...nextState,
337
+ nextState = {
338
+ ...nextState,
389
339
  selection: nextSelection
390
340
  };
391
341
  }
392
-
393
342
  if (prevSelection !== selection) {
394
- nextState = { ...nextState,
343
+ nextState = {
344
+ ...nextState,
395
345
  selection
396
346
  };
397
347
  }
398
-
399
348
  if (prevExpandedRows !== expandedRows) {
400
- nextState = { ...nextState,
349
+ nextState = {
350
+ ...nextState,
401
351
  expandedRows
402
352
  };
403
353
  }
404
-
405
354
  if (prevPagination !== pagination) {
406
- nextState = { ...nextState,
355
+ nextState = {
356
+ ...nextState,
407
357
  sortInPlace: !pagination
408
358
  };
409
359
  }
410
-
411
360
  if (typeof vertical === 'boolean') {
412
361
  nextState.vertical = vertical;
413
362
  }
414
-
415
363
  nextState.prevSortColumn = sortColumn;
416
364
  nextState.prevSortDirection = sortDirection;
417
365
  nextState.prevData = data;
@@ -420,19 +368,18 @@ class List extends _react.Component {
420
368
  nextState.prevExpandedRows = expandedRows;
421
369
  return nextState;
422
370
  }
423
-
424
371
  componentDidMount() {
425
372
  if (this.props.reorderable) {
426
- Promise.resolve().then(() => _interopRequireWildcard(require('@plesk/react-movable'))).then(({
427
- List: ReorderableList
428
- }) => {
373
+ Promise.resolve().then(() => _interopRequireWildcard(require( /* webpackChunkName: "react-movable" */'@plesk/react-movable'))).then(_ref7 => {
374
+ let {
375
+ List: ReorderableList
376
+ } = _ref7;
429
377
  this.setState({
430
378
  ReorderableList
431
379
  });
432
380
  });
433
381
  }
434
382
  }
435
-
436
383
  componentDidUpdate(prevProps) {
437
384
  const {
438
385
  data
@@ -440,7 +387,6 @@ class List extends _react.Component {
440
387
  const {
441
388
  data: prevData
442
389
  } = prevProps;
443
-
444
390
  if (data !== prevData && this.needScroll && this.anchorRef.current) {
445
391
  (0, _utils.scrollIntoView)(this.anchorRef.current, {
446
392
  scrollMode: 'if-needed'
@@ -448,7 +394,6 @@ class List extends _react.Component {
448
394
  this.needScroll = false;
449
395
  }
450
396
  }
451
-
452
397
  getData() {
453
398
  const {
454
399
  sortInPlace,
@@ -459,34 +404,29 @@ class List extends _react.Component {
459
404
  data,
460
405
  columns
461
406
  } = this.props;
462
-
463
407
  if (!sortInPlace) {
464
408
  return data;
465
409
  }
466
-
467
- const [column] = columns.filter(({
468
- key
469
- }) => key === sortColumn);
470
-
410
+ const [column] = columns.filter(_ref8 => {
411
+ let {
412
+ key
413
+ } = _ref8;
414
+ return key === sortColumn;
415
+ });
471
416
  const defaultSort = (a, b) => {
472
417
  if (a > b) {
473
418
  return 1;
474
419
  }
475
-
476
420
  if (a < b) {
477
421
  return -1;
478
422
  }
479
-
480
423
  return 0;
481
424
  };
482
-
483
425
  if (!column) {
484
426
  return data;
485
427
  }
486
-
487
428
  return data.sort((a, b) => (column.sort ? column.sort(a, b) : defaultSort(a[sortColumn], b[sortColumn])) * (sortDirection === 'ASC' ? 1 : -1));
488
429
  }
489
-
490
430
  sort(columnKey) {
491
431
  const {
492
432
  sortInPlace
@@ -497,14 +437,12 @@ class List extends _react.Component {
497
437
  } = this.state;
498
438
  sortDirection = sortColumn === columnKey && sortDirection === 'ASC' ? 'DESC' : 'ASC';
499
439
  sortColumn = columnKey;
500
-
501
440
  if (sortInPlace) {
502
441
  this.setState({
503
442
  sortColumn,
504
443
  sortDirection
505
444
  });
506
445
  }
507
-
508
446
  if (this.props.onSortChange) {
509
447
  this.props.onSortChange({
510
448
  sortColumn,
@@ -512,67 +450,56 @@ class List extends _react.Component {
512
450
  });
513
451
  }
514
452
  }
515
-
516
453
  isRowSelected(row) {
517
454
  return this.state.selection.indexOf(getRowKey(row, this.props)) !== -1;
518
455
  }
519
-
520
456
  setSelection(selection) {
521
457
  this.setState({
522
458
  selection
523
459
  });
524
-
525
460
  if (this.props.onSelectionChange) {
526
461
  this.props.onSelectionChange(selection.slice());
527
462
  }
528
463
  }
529
-
530
464
  isRowExpanded(row) {
531
465
  return this.state.expandedRows.indexOf(getRowKey(row, this.props)) !== -1;
532
466
  }
533
-
534
467
  isRowExpandable(row) {
535
468
  const {
536
469
  virtual
537
470
  } = this.getRowProps(row);
538
-
539
471
  if (virtual) {
540
472
  return false;
541
473
  }
542
-
543
474
  return this.props.notExpandableRows.indexOf(getRowKey(row, this.props)) === -1;
544
475
  }
545
-
546
476
  handleRowExpandingChange(row) {
547
477
  let expandedRows;
548
478
  const rowKey = getRowKey(row, this.props);
549
-
550
479
  if (this.isRowExpanded(row)) {
551
480
  expandedRows = this.state.expandedRows.filter(value => value !== rowKey);
552
481
  } else {
553
482
  expandedRows = this.state.expandedRows.slice();
554
483
  expandedRows.push(rowKey);
555
484
  }
556
-
557
485
  this.setExpandedRows(expandedRows);
558
486
  }
559
-
560
487
  setExpandedRows(expandedRows) {
561
488
  this.setState({
562
489
  expandedRows
563
490
  });
564
491
  (0, _utils.safeInvoke)(this.props.onExpandedRowsChange, expandedRows.slice());
565
492
  }
566
-
567
- renderRow({
568
- row,
569
- index,
570
- hasTitle,
571
- realColumn,
572
- parent,
573
- isDragged,
574
- reorderableProps
575
- }) {
493
+ renderRow(_ref9) {
494
+ let {
495
+ row,
496
+ index,
497
+ hasTitle,
498
+ realColumn,
499
+ parent,
500
+ isDragged,
501
+ reorderableProps
502
+ } = _ref9;
576
503
  const {
577
504
  baseClassName,
578
505
  renderRowBody,
@@ -582,9 +509,12 @@ class List extends _react.Component {
582
509
  vertical,
583
510
  reorderableItemWidths
584
511
  } = this.state;
585
- const hasActions = realColumn.some(({
586
- type
587
- }) => type === 'actions');
512
+ const hasActions = realColumn.some(_ref10 => {
513
+ let {
514
+ type
515
+ } = _ref10;
516
+ return type === 'actions';
517
+ });
588
518
  const {
589
519
  className,
590
520
  virtual,
@@ -592,7 +522,6 @@ class List extends _react.Component {
592
522
  } = this.getRowProps(row);
593
523
  let skipCells = 0;
594
524
  const Wrapper = reorderable && !parent ? Tbody : _react.Fragment;
595
-
596
525
  const element = /*#__PURE__*/_react.default.createElement(Wrapper, (0, _extends2.default)({}, Wrapper === Tbody && !isDragged ? reorderableProps : undefined, {
597
526
  key: getRowKey(row, this.props)
598
527
  }), /*#__PURE__*/_react.default.createElement("tr", (0, _extends2.default)({
@@ -607,55 +536,50 @@ class List extends _react.Component {
607
536
  }, className)
608
537
  }, rowProps, {
609
538
  onClick: renderRowBody ? this.createRowClickHandler(row) : undefined
610
- }), realColumn.map(({
611
- key,
612
- title,
613
- render,
614
- width,
615
- cellProps,
616
- truncate,
617
- type
618
- }, index) => {
539
+ }), realColumn.map((_ref11, index) => {
540
+ let {
541
+ key,
542
+ title,
543
+ render,
544
+ width,
545
+ cellProps,
546
+ truncate,
547
+ type
548
+ } = _ref11;
619
549
  if (skipCells > 0) {
620
550
  skipCells -= 1;
621
551
  return null;
622
552
  }
623
-
624
553
  let style;
625
-
626
554
  if (!hasTitle && width && !vertical) {
627
555
  style = {
628
556
  width
629
557
  };
630
558
  }
631
-
632
559
  if (isDragged) {
633
560
  style = {
634
561
  width: reorderableItemWidths[index]
635
562
  };
636
563
  }
637
-
638
564
  let content = render ? render(row, {
639
565
  parent
640
- }) : row[key]; // cell props from render
641
-
566
+ }) : row[key];
567
+ // cell props from render
642
568
  if (content && content.children && ! /*#__PURE__*/(0, _react.isValidElement)(content)) {
643
569
  const {
644
570
  children,
645
571
  ...other
646
572
  } = content;
647
573
  content = children;
648
- cellProps = { ...cellProps,
574
+ cellProps = {
575
+ ...cellProps,
649
576
  ...other
650
577
  };
651
-
652
578
  if (other.colSpan) {
653
579
  skipCells += other.colSpan - 1;
654
580
  }
655
581
  }
656
-
657
582
  const isCellEmpty = !title && !content;
658
-
659
583
  if (truncate) {
660
584
  content = /*#__PURE__*/_react.default.createElement("div", {
661
585
  className: `${baseClassName}__truncate`
@@ -663,10 +587,8 @@ class List extends _react.Component {
663
587
  truncate: true
664
588
  }, content));
665
589
  }
666
-
667
590
  if (vertical) {
668
591
  const hasColumnTitle = type !== 'internal' && type !== 'actions' && type !== 'title' && title;
669
-
670
592
  if (!isCellEmpty && type !== 'internal') {
671
593
  content = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, hasColumnTitle && /*#__PURE__*/_react.default.createElement("div", {
672
594
  className: `${baseClassName}__cell-inner-title`
@@ -674,19 +596,17 @@ class List extends _react.Component {
674
596
  className: `${baseClassName}__cell-inner-content`
675
597
  }, content));
676
598
  }
677
-
678
599
  if (type === 'actions') {
679
600
  content = /*#__PURE__*/_react.default.createElement(_VerticalContext.default.Provider, {
680
601
  value: true
681
602
  }, content);
682
603
  }
683
- } // do not render reorderable handler for nested rows
684
-
604
+ }
685
605
 
606
+ // do not render reorderable handler for nested rows
686
607
  if (key === 'reorderable' && type === 'internal' && parent) {
687
608
  content = null;
688
609
  }
689
-
690
610
  return /*#__PURE__*/_react.default.createElement("td", (0, _extends2.default)({
691
611
  key: key,
692
612
  style: style
@@ -710,7 +630,6 @@ class List extends _react.Component {
710
630
  realColumn,
711
631
  parent: row
712
632
  })) : null);
713
-
714
633
  if (isDragged) {
715
634
  return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({
716
635
  className: (0, _classnames.default)(baseClassName, `${baseClassName}--dragged`)
@@ -721,16 +640,15 @@ class List extends _react.Component {
721
640
  })
722
641
  }, element));
723
642
  }
724
-
725
643
  return element;
726
644
  }
727
-
728
- renderRowBody({
729
- row,
730
- index,
731
- realColumn,
732
- parent
733
- }) {
645
+ renderRowBody(_ref12) {
646
+ let {
647
+ row,
648
+ index,
649
+ realColumn,
650
+ parent
651
+ } = _ref12;
734
652
  const {
735
653
  baseClassName,
736
654
  renderRowBody
@@ -738,17 +656,21 @@ class List extends _react.Component {
738
656
  const {
739
657
  vertical
740
658
  } = this.state;
741
-
742
659
  if (!renderRowBody) {
743
660
  return null;
744
661
  }
745
-
746
- const reorderable = realColumn.find(({
747
- key
748
- }) => key === 'reorderable');
749
- const expander = realColumn.find(({
750
- key
751
- }) => key === 'expander');
662
+ const reorderable = realColumn.find(_ref13 => {
663
+ let {
664
+ key
665
+ } = _ref13;
666
+ return key === 'reorderable';
667
+ });
668
+ const expander = realColumn.find(_ref14 => {
669
+ let {
670
+ key
671
+ } = _ref14;
672
+ return key === 'expander';
673
+ });
752
674
  const isRowExpanded = this.isRowExpanded(row);
753
675
  const trRef = /*#__PURE__*/(0, _react.createRef)();
754
676
  return /*#__PURE__*/_react.default.createElement(_reactTransitionGroup.CSSTransition, {
@@ -781,7 +703,6 @@ class List extends _react.Component {
781
703
  parent
782
704
  })))))));
783
705
  }
784
-
785
706
  renderSelectAllButton() {
786
707
  const {
787
708
  allRowsSelected,
@@ -793,11 +714,9 @@ class List extends _react.Component {
793
714
  const {
794
715
  selection
795
716
  } = this.state;
796
-
797
717
  if (allRowsSelected || selection.length === totalRows || !onSelectionChange) {
798
718
  return null;
799
719
  }
800
-
801
720
  return /*#__PURE__*/_react.default.createElement(_Button.default, {
802
721
  ghost: true,
803
722
  onClick: () => {
@@ -811,7 +730,6 @@ class List extends _react.Component {
811
730
  translators: locale
812
731
  }));
813
732
  }
814
-
815
733
  renderDeselectAllButton() {
816
734
  const {
817
735
  allRowsSelected,
@@ -822,11 +740,9 @@ class List extends _react.Component {
822
740
  const {
823
741
  selection
824
742
  } = this.state;
825
-
826
743
  if (!allRowsSelected && selection.length === 0 || !onSelectionChange) {
827
744
  return null;
828
745
  }
829
-
830
746
  return /*#__PURE__*/_react.default.createElement(_Button.default, {
831
747
  ghost: true,
832
748
  onClick: () => {
@@ -840,7 +756,6 @@ class List extends _react.Component {
840
756
  translators: locale
841
757
  }));
842
758
  }
843
-
844
759
  renderToolbar() {
845
760
  const {
846
761
  toolbar,
@@ -853,19 +768,15 @@ class List extends _react.Component {
853
768
  selection
854
769
  } = this.state;
855
770
  let selectedRowTitle;
856
-
857
771
  if (selection.length === 1) {
858
772
  const row = this.flatData(data).find(row => getRowKey(row, this.props) === selection[0]);
859
-
860
773
  if (row) {
861
774
  selectedRowTitle = this.getRowTitle(row);
862
775
  }
863
776
  }
864
-
865
777
  if (!toolbar) {
866
778
  return null;
867
779
  }
868
-
869
780
  const context = {
870
781
  selectedRows: allRowsSelected ? totalRows || /*#__PURE__*/_react.default.createElement(_Translate.default, {
871
782
  namespace: "List",
@@ -879,38 +790,30 @@ class List extends _react.Component {
879
790
  value: context
880
791
  }, toolbar);
881
792
  }
882
-
883
793
  shouldBePagination() {
884
794
  const {
885
795
  totalRows,
886
796
  pagination
887
797
  } = this.props;
888
-
889
798
  if (!pagination || !totalRows) {
890
799
  return false;
891
800
  }
892
-
893
801
  if (totalRows && /*#__PURE__*/(0, _react.isValidElement)(pagination)) {
894
802
  const {
895
803
  itemsPerPageOptions = _Pagination.ITEMS_PER_PAGE_OPTIONS
896
804
  } = pagination.props;
897
-
898
805
  if (Array.isArray(itemsPerPageOptions)) {
899
806
  const numericOptions = itemsPerPageOptions.filter(v => Number(v) === v);
900
-
901
807
  if (numericOptions.length) {
902
808
  const min = Math.min(...numericOptions);
903
-
904
809
  if (totalRows <= min) {
905
810
  return false;
906
811
  }
907
812
  }
908
813
  }
909
814
  }
910
-
911
815
  return true;
912
816
  }
913
-
914
817
  renderHeader() {
915
818
  const {
916
819
  baseClassName,
@@ -922,11 +825,9 @@ class List extends _react.Component {
922
825
  selection
923
826
  } = this.state;
924
827
  const shouldBePagination = this.shouldBePagination();
925
-
926
828
  if (totalRows === undefined && !shouldBePagination) {
927
829
  return null;
928
830
  }
929
-
930
831
  return /*#__PURE__*/_react.default.createElement("div", {
931
832
  className: `${baseClassName}__header`
932
833
  }, totalRows === undefined ? /*#__PURE__*/_react.default.createElement("span", null) : /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("span", {
@@ -942,22 +843,18 @@ class List extends _react.Component {
942
843
  className: `${baseClassName}__header-text`
943
844
  }, this.renderPagination('header')));
944
845
  }
945
-
946
846
  renderEmptyView() {
947
847
  const {
948
848
  emptyView,
949
849
  filtered
950
850
  } = this.props;
951
-
952
851
  if (emptyView === undefined) {
953
852
  return filtered ? /*#__PURE__*/_react.default.createElement(_ListEmptyView.default, {
954
853
  reason: "filtered"
955
854
  }) : /*#__PURE__*/_react.default.createElement(_ListEmptyView.default, null);
956
855
  }
957
-
958
856
  return emptyView;
959
857
  }
960
-
961
858
  renderPagination(placement) {
962
859
  const {
963
860
  pagination,
@@ -966,32 +863,27 @@ class List extends _react.Component {
966
863
  const paginationProps = {
967
864
  loading
968
865
  };
969
-
970
866
  switch (placement) {
971
867
  case 'header':
972
868
  paginationProps.view = 'popover';
973
869
  break;
974
-
975
870
  case 'footer':
976
871
  paginationProps.onSelect = current => {
977
872
  this.needScroll = true;
978
873
  (0, _utils.safeInvoke)(pagination.props.onSelect, current);
979
874
  };
980
-
981
875
  if (pagination.props.onItemsPerPageChange) {
982
876
  paginationProps.onItemsPerPageChange = itemsPerPage => {
983
877
  this.needScroll = true;
984
878
  (0, _utils.safeInvoke)(pagination.props.onItemsPerPageChange, itemsPerPage);
985
879
  };
986
880
  }
987
-
988
881
  break;
989
882
  }
990
-
991
- return /*#__PURE__*/(0, _react.cloneElement)(pagination, { ...paginationProps
883
+ return /*#__PURE__*/(0, _react.cloneElement)(pagination, {
884
+ ...paginationProps
992
885
  });
993
886
  }
994
-
995
887
  render() {
996
888
  const {
997
889
  baseClassName,
@@ -1030,46 +922,37 @@ class List extends _react.Component {
1030
922
  const {
1031
923
  vertical
1032
924
  } = this.state;
1033
-
1034
925
  if (false === (data && data.length > 0) && !filtered && emptyViewMode === 'all') {
1035
926
  return this.renderEmptyView();
1036
927
  }
1037
-
1038
928
  const realColumn = columns.map((column, i) => {
1039
929
  const classList = [];
1040
930
  const cellClassList = [];
1041
-
1042
931
  if (i === 0) {
1043
932
  cellClassList.push(`${baseClassName}__cell-first`);
1044
933
  }
1045
-
1046
934
  if (column.align && !vertical) {
1047
935
  const className = `${baseClassName}__cell-${column.align}`;
1048
936
  classList.push(className);
1049
937
  cellClassList.push(className);
1050
938
  }
1051
-
1052
939
  if (column.className) {
1053
940
  classList.push(column.className);
1054
941
  cellClassList.push(column.className);
1055
942
  }
1056
-
1057
- const newColumn = { ...column
943
+ const newColumn = {
944
+ ...column
1058
945
  };
1059
-
1060
946
  if (classList.length) {
1061
947
  newColumn.className = (0, _classnames.default)(...classList);
1062
948
  }
1063
-
1064
949
  if (cellClassList.length) {
1065
950
  newColumn.cellProps = {
1066
951
  className: (0, _classnames.default)(...cellClassList)
1067
952
  };
1068
953
  }
1069
-
1070
954
  return newColumn;
1071
955
  });
1072
-
1073
956
  if (onSelectionChange) {
1074
957
  const headerChecked = this.isAllRowsChecked(data, this.state.selection);
1075
958
  const headerCheckboxProps = {
@@ -1088,17 +971,14 @@ class List extends _react.Component {
1088
971
  const {
1089
972
  virtual
1090
973
  } = this.getRowProps(row);
1091
-
1092
974
  if (virtual) {
1093
975
  return null;
1094
976
  }
1095
-
1096
977
  if (this.isRowLoading(row)) {
1097
978
  return /*#__PURE__*/_react.default.createElement(_Spinner.default, {
1098
979
  className: `${baseClassName}__spinner`
1099
980
  });
1100
981
  }
1101
-
1102
982
  const checkboxProps = {
1103
983
  checked: this.isRowSelected(row),
1104
984
  disabled: row.disabled,
@@ -1107,16 +987,13 @@ class List extends _react.Component {
1107
987
  value: getRowKey(row, this.props)
1108
988
  }
1109
989
  };
1110
-
1111
990
  if (typeof renderSelectionCheckbox === 'function') {
1112
991
  return renderSelectionCheckbox(checkboxProps, row);
1113
992
  }
1114
-
1115
993
  return /*#__PURE__*/_react.default.createElement(_Checkbox.default, checkboxProps);
1116
994
  }
1117
995
  });
1118
996
  }
1119
-
1120
997
  if (renderRowBody) {
1121
998
  realColumn.unshift({
1122
999
  key: 'expander',
@@ -1161,7 +1038,6 @@ class List extends _react.Component {
1161
1038
  })
1162
1039
  });
1163
1040
  }
1164
-
1165
1041
  if (reorderable) {
1166
1042
  realColumn.unshift({
1167
1043
  key: 'reorderable',
@@ -1186,70 +1062,70 @@ class List extends _react.Component {
1186
1062
  })))
1187
1063
  });
1188
1064
  }
1189
-
1190
1065
  const hasTitle = !vertical && columns.some(column => column.title);
1191
1066
  let content;
1192
-
1193
1067
  if (false === (data && data.length > 0) && (filtered || emptyViewMode === 'items')) {
1194
1068
  content = this.renderEmptyView();
1195
1069
  } else {
1196
- const renderList = ({
1197
- children,
1198
- props: reorderableProps
1199
- }) => /*#__PURE__*/_react.default.createElement(_useFocusVisible.FocusVisibleManager, null, /*#__PURE__*/_react.default.createElement("table", (0, _extends2.default)({
1200
- className: (0, _classnames.default)(`${baseClassName}__table`, {
1201
- [`${baseClassName}--expandable`]: renderRowBody,
1202
- [`${baseClassName}__table--vertical`]: vertical,
1203
- [`${baseClassName}__table--reorderable`]: reorderable
1204
- })
1205
- }, reorderableProps), hasTitle && /*#__PURE__*/_react.default.createElement("thead", null, /*#__PURE__*/_react.default.createElement("tr", {
1206
- className: (0, _classnames.default)(`${baseClassName}__table-thead`, {
1207
- [`${baseClassName}__row--expanded`]: this.isAllRowsExpanded(data, this.state.expandedRows)
1208
- })
1209
- }, realColumn.map(({
1210
- key,
1211
- title,
1212
- sortable,
1213
- sort,
1214
- width,
1215
- render,
1216
- truncate,
1217
- type,
1218
- cellProps,
1219
- ...headerProps
1220
- }) => {
1221
- if (sortable) {
1222
- title = /*#__PURE__*/_react.default.createElement("div", {
1223
- className: "th__action"
1224
- }, title);
1225
- headerProps.className = (0, _classnames.default)({
1226
- 'is-sortable': sortable,
1227
- 'is-sorted is-sorted--up': this.state.sortColumn === key && this.state.sortDirection === 'ASC',
1228
- 'is-sorted is-sorted--down': this.state.sortColumn === key && this.state.sortDirection === 'DESC'
1229
- }, headerProps.className);
1230
-
1231
- headerProps.onClick = () => this.sort(key);
1232
- }
1233
-
1234
- if (width) {
1235
- headerProps.style = { ...headerProps.style,
1236
- width
1237
- };
1238
- }
1239
-
1240
- return /*#__PURE__*/_react.default.createElement("th", (0, _extends2.default)({
1241
- key: key
1242
- }, headerProps), title);
1243
- }))), reorderable ? children : /*#__PURE__*/_react.default.createElement("tbody", null, children)));
1244
-
1245
- const renderItem = ({
1246
- value: {
1247
- row
1248
- },
1249
- index,
1250
- props: reorderableProps,
1251
- isDragged
1252
- }) => {
1070
+ const renderList = _ref15 => {
1071
+ let {
1072
+ children,
1073
+ props: reorderableProps
1074
+ } = _ref15;
1075
+ return /*#__PURE__*/_react.default.createElement(_useFocusVisible.FocusVisibleManager, null, /*#__PURE__*/_react.default.createElement("table", (0, _extends2.default)({
1076
+ className: (0, _classnames.default)(`${baseClassName}__table`, {
1077
+ [`${baseClassName}--expandable`]: renderRowBody,
1078
+ [`${baseClassName}__table--vertical`]: vertical,
1079
+ [`${baseClassName}__table--reorderable`]: reorderable
1080
+ })
1081
+ }, reorderableProps), hasTitle && /*#__PURE__*/_react.default.createElement("thead", null, /*#__PURE__*/_react.default.createElement("tr", {
1082
+ className: (0, _classnames.default)(`${baseClassName}__table-thead`, {
1083
+ [`${baseClassName}__row--expanded`]: this.isAllRowsExpanded(data, this.state.expandedRows)
1084
+ })
1085
+ }, realColumn.map(_ref16 => {
1086
+ let {
1087
+ key,
1088
+ title,
1089
+ sortable,
1090
+ sort,
1091
+ width,
1092
+ render,
1093
+ truncate,
1094
+ type,
1095
+ cellProps,
1096
+ ...headerProps
1097
+ } = _ref16;
1098
+ if (sortable) {
1099
+ title = /*#__PURE__*/_react.default.createElement("div", {
1100
+ className: "th__action"
1101
+ }, title);
1102
+ headerProps.className = (0, _classnames.default)({
1103
+ 'is-sortable': sortable,
1104
+ 'is-sorted is-sorted--up': this.state.sortColumn === key && this.state.sortDirection === 'ASC',
1105
+ 'is-sorted is-sorted--down': this.state.sortColumn === key && this.state.sortDirection === 'DESC'
1106
+ }, headerProps.className);
1107
+ headerProps.onClick = () => this.sort(key);
1108
+ }
1109
+ if (width) {
1110
+ headerProps.style = {
1111
+ ...headerProps.style,
1112
+ width
1113
+ };
1114
+ }
1115
+ return /*#__PURE__*/_react.default.createElement("th", (0, _extends2.default)({
1116
+ key: key
1117
+ }, headerProps), title);
1118
+ }))), reorderable ? children : /*#__PURE__*/_react.default.createElement("tbody", null, children)));
1119
+ };
1120
+ const renderItem = _ref17 => {
1121
+ let {
1122
+ value: {
1123
+ row
1124
+ },
1125
+ index,
1126
+ props: reorderableProps,
1127
+ isDragged
1128
+ } = _ref17;
1253
1129
  return this.renderRow({
1254
1130
  row,
1255
1131
  index,
@@ -1259,26 +1135,27 @@ class List extends _react.Component {
1259
1135
  isDragged
1260
1136
  });
1261
1137
  };
1262
-
1263
1138
  if (reorderable) {
1264
1139
  const {
1265
1140
  ReorderableList
1266
1141
  } = this.state;
1267
1142
  content = /*#__PURE__*/_react.default.createElement(ReorderableList, {
1268
- beforeDrag: ({
1269
- elements,
1270
- index
1271
- }) => {
1143
+ beforeDrag: _ref18 => {
1144
+ let {
1145
+ elements,
1146
+ index
1147
+ } = _ref18;
1272
1148
  const cells = Array.from(elements[index].firstElementChild.children);
1273
1149
  const reorderableItemWidths = cells.map(cell => window.getComputedStyle(cell).width);
1274
1150
  this.setState({
1275
1151
  reorderableItemWidths
1276
1152
  });
1277
1153
  },
1278
- onChange: ({
1279
- oldIndex,
1280
- newIndex
1281
- }) => {
1154
+ onChange: _ref19 => {
1155
+ let {
1156
+ oldIndex,
1157
+ newIndex
1158
+ } = _ref19;
1282
1159
  (0, _utils.safeInvoke)(onReorderEnd, {
1283
1160
  oldIndex,
1284
1161
  newIndex
@@ -1306,13 +1183,11 @@ class List extends _react.Component {
1306
1183
  });
1307
1184
  }
1308
1185
  }
1309
-
1310
1186
  content = /*#__PURE__*/_react.default.createElement("div", {
1311
1187
  className: (0, _classnames.default)(`${baseClassName}__table-container`, {
1312
1188
  [`${baseClassName}__table-container--loading`]: loading
1313
1189
  })
1314
1190
  }, content);
1315
-
1316
1191
  if (sidebar) {
1317
1192
  content = /*#__PURE__*/_react.default.createElement(_Columns.default, {
1318
1193
  gap: "md"
@@ -1320,9 +1195,7 @@ class List extends _react.Component {
1320
1195
  fill: true
1321
1196
  }, content), /*#__PURE__*/_react.default.createElement(_Columns.Column, null, sidebar));
1322
1197
  }
1323
-
1324
1198
  const shouldBePagination = this.shouldBePagination();
1325
-
1326
1199
  const createRoot = ref => /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({
1327
1200
  ref: ref,
1328
1201
  className: (0, _classnames.default)(baseClassName, className)
@@ -1331,21 +1204,20 @@ class List extends _react.Component {
1331
1204
  }), content, shouldBePagination && /*#__PURE__*/_react.default.createElement("div", {
1332
1205
  className: `${baseClassName}__footer`
1333
1206
  }, this.renderPagination('footer')));
1334
-
1335
1207
  if (typeof verticalProp === 'number') {
1336
1208
  return /*#__PURE__*/_react.default.createElement(_reactMeasure.default, {
1337
1209
  bounds: true,
1338
1210
  onResize: this.handleResize
1339
- }, ({
1340
- measureRef
1341
- }) => createRoot(measureRef));
1211
+ }, _ref20 => {
1212
+ let {
1213
+ measureRef
1214
+ } = _ref20;
1215
+ return createRoot(measureRef);
1216
+ });
1342
1217
  }
1343
-
1344
1218
  return createRoot();
1345
1219
  }
1346
-
1347
1220
  }
1348
-
1349
1221
  List.propTypes = {
1350
1222
  /**
1351
1223
  * Columns definition.
@@ -1359,39 +1231,32 @@ List.propTypes = {
1359
1231
  * Unique column key.
1360
1232
  */
1361
1233
  key: _propTypes.default.string.isRequired,
1362
-
1363
1234
  /**
1364
1235
  * Column title.
1365
1236
  */
1366
1237
  title: _propTypes.default.node,
1367
-
1368
1238
  /**
1369
1239
  * Optional cell renderer function: `row => Component`. By default render value of cell.
1370
1240
  * The renderer function can also returns a configuration object like: `{children: 'cell content', colSpan: 3}`
1371
1241
  */
1372
1242
  render: _propTypes.default.func,
1373
-
1374
1243
  /**
1375
1244
  * Is column sortable.
1376
1245
  * Default is `false`
1377
1246
  */
1378
1247
  sortable: _propTypes.default.bool,
1379
-
1380
1248
  /**
1381
1249
  * Optional function for row comparison: `(row1, row2) => -1 | 0 | 1`
1382
1250
  */
1383
1251
  sort: _propTypes.default.func,
1384
-
1385
1252
  /**
1386
1253
  * Column alignment.
1387
1254
  */
1388
1255
  align: _propTypes.default.oneOf(['left', 'center', 'right']),
1389
-
1390
1256
  /**
1391
1257
  * Truncate the text in cell with an ellipsis.
1392
1258
  */
1393
1259
  truncate: _propTypes.default.bool,
1394
-
1395
1260
  /**
1396
1261
  * Determine type of column content.
1397
1262
  *
@@ -1401,7 +1266,6 @@ List.propTypes = {
1401
1266
  */
1402
1267
  type: _propTypes.default.oneOf(['title', 'controls', 'actions'])
1403
1268
  })).isRequired,
1404
-
1405
1269
  /**
1406
1270
  * Array of row objects.
1407
1271
  *
@@ -1413,145 +1277,121 @@ List.propTypes = {
1413
1277
  * Unique column key. This property can by renamed using `rowKey` property of List.
1414
1278
  */
1415
1279
  key: _propTypes.default.string,
1416
-
1417
1280
  /**
1418
1281
  * Optional property for disabling ability to select this row.
1419
1282
  */
1420
1283
  disabled: _propTypes.default.bool,
1421
-
1422
1284
  /**
1423
1285
  * Optional array of children rows.
1424
1286
  */
1425
1287
  data: _propTypes.default.array
1426
1288
  })),
1427
-
1428
1289
  /**
1429
1290
  * Current sort column key
1430
1291
  * @since 0.0.42
1431
1292
  */
1432
1293
  sortColumn: _propTypes.default.string,
1433
-
1434
1294
  /**
1435
1295
  * Sort direction of the column being sorted.
1436
1296
  * @since 0.0.42
1437
1297
  */
1438
1298
  sortDirection: _propTypes.default.oneOf(['ASC', 'DESC']),
1439
-
1440
1299
  /**
1441
1300
  * Sort change handler
1442
1301
  * @since 0.0.42
1443
1302
  */
1444
1303
  onSortChange: _propTypes.default.func,
1445
-
1446
1304
  /**
1447
1305
  * Array of keys of selected rows
1448
1306
  * @since 0.0.42
1449
1307
  */
1450
1308
  selection: _propTypes.default.array,
1451
-
1452
1309
  /**
1453
1310
  * Selection change handler for list. Checkboxes will only be rendered if this prop is defined.
1454
1311
  * @since 0.0.42
1455
1312
  */
1456
1313
  onSelectionChange: _propTypes.default.func,
1457
-
1458
1314
  /**
1459
1315
  * Renderer for a selection checkbox. Allow to replace checkboxes in the List by a custom implementation.
1460
1316
  * @since 3.19.0
1461
1317
  */
1462
1318
  renderSelectionCheckbox: _propTypes.default.func,
1463
-
1464
1319
  /**
1465
1320
  * Row's key getter. Could be a string or function like: `row => <unique_string>`
1466
1321
  * @since 0.0.45
1467
1322
  */
1468
1323
  rowKey: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.func]),
1469
-
1470
1324
  /**
1471
1325
  * Renderer for a row body. Should return ReactNode.
1472
1326
  * @since 1.12.0
1473
1327
  */
1474
1328
  renderRowBody: _propTypes.default.func,
1475
-
1476
1329
  /**
1477
1330
  * Array of keys of expanded rows
1478
1331
  * @since 1.12.0
1479
1332
  */
1480
1333
  expandedRows: _propTypes.default.array,
1481
-
1482
1334
  /**
1483
1335
  * Array of keys of rows which not have expand indicator
1484
1336
  * @since 1.12.0
1485
1337
  */
1486
1338
  notExpandableRows: _propTypes.default.array,
1487
-
1488
1339
  /**
1489
1340
  * Rows expanding change handler.
1490
1341
  * @since 1.12.0
1491
1342
  */
1492
1343
  onExpandedRowsChange: _propTypes.default.func,
1493
-
1494
1344
  /**
1495
1345
  * Array of keys of loading rows. They are displayed instead of checkboxes.
1496
1346
  * @since 2.5.0
1497
1347
  */
1498
1348
  loadingRows: _propTypes.default.array,
1499
-
1500
1349
  /**
1501
1350
  * A `Pagination` element. It displays at the top and the bottom of the list. When pagination is defined, the built-in sort is disabled.
1502
1351
  * @since 2.4.0
1503
1352
  */
1504
1353
  pagination: _propTypes.default.node,
1505
-
1506
1354
  /**
1507
1355
  * Total rows count, including nested rows. Usually, it uses together with pagination.
1508
1356
  * @since 2.4.0
1509
1357
  */
1510
1358
  totalRows: _propTypes.default.number,
1511
-
1512
1359
  /**
1513
1360
  * A `Toolbar` element.
1514
1361
  * @since 2.4.0
1515
1362
  */
1516
1363
  toolbar: _propTypes.default.node,
1517
-
1518
1364
  /**
1519
1365
  * A flag that all rows are selected.
1520
1366
  * @since 2.4.0
1521
1367
  */
1522
1368
  allRowsSelected: _propTypes.default.bool,
1523
-
1524
1369
  /**
1525
1370
  * A callback executed when the allRowsSelected prop is changed.
1526
1371
  * @since 2.4.0
1527
1372
  */
1528
1373
  onAllRowsSelectedChange: _propTypes.default.func,
1529
-
1530
1374
  /**
1531
1375
  * Filtered list. Manages toolbar visibility when data is absent and defines the defaults for empty view.
1532
1376
  * @since 3.0.1
1533
1377
  */
1534
1378
  filtered: _propTypes.default.bool,
1535
-
1536
1379
  /**
1537
1380
  * A custom view for the case when data is absent.
1538
1381
  * @since 2.5.0
1539
1382
  */
1540
1383
  emptyView: _propTypes.default.node,
1541
-
1542
1384
  /**
1543
1385
  * Which part of the List component should be replaced by the empty view.
1544
1386
  * @since 2.6.0
1545
1387
  * @deprecated Use `filtered` instead.
1546
1388
  */
1547
1389
  emptyViewMode: _propTypes.default.oneOf(['all', 'items']),
1548
-
1549
1390
  /**
1550
1391
  * A slot on the right of the items.
1551
1392
  * @since 2.6.0
1552
1393
  */
1553
1394
  sidebar: _propTypes.default.node,
1554
-
1555
1395
  /**
1556
1396
  * Custom localization messages.
1557
1397
  * @since 2.6.0
@@ -1563,20 +1403,17 @@ List.propTypes = {
1563
1403
  totalRows: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.node]),
1564
1404
  selectedRows: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.node])
1565
1405
  }),
1566
-
1567
1406
  /**
1568
1407
  * Render List row's content vertically.
1569
1408
  * When some number is specified, it turns into vertical mode automatically if the List's width is less than the provided number.
1570
1409
  * @since 3.3.0
1571
1410
  */
1572
1411
  vertical: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.number]),
1573
-
1574
1412
  /**
1575
1413
  * Indicate the loading state of the list.
1576
1414
  * @since 3.3.1
1577
1415
  */
1578
1416
  loading: _propTypes.default.bool,
1579
-
1580
1417
  /**
1581
1418
  * Apply some props to each row.
1582
1419
  *
@@ -1587,24 +1424,20 @@ List.propTypes = {
1587
1424
  rowProps: _propTypes.default.oneOfType([_propTypes.default.shape({
1588
1425
  virtual: _propTypes.default.bool
1589
1426
  }), _propTypes.default.func]),
1590
-
1591
1427
  /**
1592
1428
  * Enable reorderable view.
1593
1429
  * @since 3.18.0
1594
1430
  */
1595
1431
  reorderable: _propTypes.default.bool,
1596
-
1597
1432
  /**
1598
1433
  * Reorder end handler.
1599
1434
  * @since 3.18.0
1600
1435
  */
1601
1436
  onReorderEnd: _propTypes.default.func,
1602
-
1603
1437
  /**
1604
1438
  * @ignore
1605
1439
  */
1606
1440
  className: _propTypes.default.string,
1607
-
1608
1441
  /**
1609
1442
  * @ignore
1610
1443
  */