@plesk/ui-library 3.25.6 → 3.27.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.
Files changed (98) hide show
  1. package/README.md +35 -35
  2. package/cjs/components/Action/Action.js +3 -3
  3. package/cjs/components/Button/Button.js +50 -50
  4. package/cjs/components/Checkbox/Checkbox.js +3 -3
  5. package/cjs/components/CodeEditor/CodeEditor.js +40 -40
  6. package/cjs/components/Dialog/Dialog.js +63 -63
  7. package/cjs/components/Drawer/Drawer.js +100 -90
  8. package/cjs/components/Drawer/DrawerProgress.js +17 -14
  9. package/cjs/components/Drawer/Header.js +11 -4
  10. package/cjs/components/Form/Form.js +4 -4
  11. package/cjs/components/FormField/FormField.js +87 -82
  12. package/cjs/components/FormFieldCheckbox/FormFieldCheckbox.js +26 -26
  13. package/cjs/components/FormFieldPassword/FormFieldPassword.js +34 -34
  14. package/cjs/components/FormFieldRadioButtons/FormFieldRadioButtons.js +32 -32
  15. package/cjs/components/FormFieldSelect/FormFieldSelect.js +1 -1
  16. package/cjs/components/Icon/Icon.js +6 -6
  17. package/cjs/components/Icon/constants.js +2 -2
  18. package/cjs/components/Icon/images/symbols.svg +1653 -1639
  19. package/cjs/components/InputNumber/InputNumber.js +3 -3
  20. package/cjs/components/Item/Item.js +50 -41
  21. package/cjs/components/ItemLink/ItemLink.js +1 -0
  22. package/cjs/components/ItemList/ItemList.js +43 -12
  23. package/cjs/components/ItemList/ItemList.stories.js +35 -3
  24. package/cjs/components/Layout/Layout.js +55 -55
  25. package/cjs/components/List/List.js +139 -134
  26. package/cjs/components/LocaleProvider/LocaleProvider.js +3 -3
  27. package/cjs/components/Menu/MenuBaseItem.js +19 -19
  28. package/cjs/components/Overlay/Overlay.js +34 -34
  29. package/cjs/components/Pagination/Pagination.js +3 -3
  30. package/cjs/components/Panel/Panel.js +14 -4
  31. package/cjs/components/Popper/Popper.js +30 -30
  32. package/cjs/components/ProgressStep/ProgressStep.js +16 -14
  33. package/cjs/components/Section/Section.js +128 -68
  34. package/cjs/components/Select/Select.js +9 -9
  35. package/cjs/components/Select/SelectControl.js +1 -1
  36. package/cjs/components/Tabs/Tab.js +28 -28
  37. package/cjs/components/Tabs/Tabs.js +33 -33
  38. package/cjs/components/Translate/Translate.js +25 -25
  39. package/cjs/index.js +1 -1
  40. package/dist/images/symbols.svg +1653 -1639
  41. package/dist/plesk-ui-library-rtl.css +1 -1
  42. package/dist/plesk-ui-library-rtl.css.map +1 -1
  43. package/dist/plesk-ui-library.css +1 -1
  44. package/dist/plesk-ui-library.css.map +1 -1
  45. package/dist/plesk-ui-library.js +1116 -970
  46. package/dist/plesk-ui-library.js.map +1 -1
  47. package/dist/plesk-ui-library.min.js +5 -5
  48. package/dist/plesk-ui-library.min.js.map +1 -1
  49. package/esm/components/Action/Action.js +3 -3
  50. package/esm/components/Button/Button.js +50 -50
  51. package/esm/components/Checkbox/Checkbox.js +3 -3
  52. package/esm/components/CodeEditor/CodeEditor.js +40 -40
  53. package/esm/components/Dialog/Dialog.js +63 -63
  54. package/esm/components/Drawer/Drawer.js +100 -89
  55. package/esm/components/Drawer/DrawerProgress.js +16 -15
  56. package/esm/components/Drawer/Header.js +11 -4
  57. package/esm/components/Form/Form.js +4 -4
  58. package/esm/components/FormField/FormField.js +87 -82
  59. package/esm/components/FormFieldCheckbox/FormFieldCheckbox.js +26 -26
  60. package/esm/components/FormFieldPassword/FormFieldPassword.js +34 -34
  61. package/esm/components/FormFieldRadioButtons/FormFieldRadioButtons.js +32 -32
  62. package/esm/components/FormFieldSelect/FormFieldSelect.js +1 -1
  63. package/esm/components/Icon/Icon.js +6 -6
  64. package/esm/components/Icon/constants.js +2 -2
  65. package/esm/components/Icon/images/symbols.svg +1653 -1639
  66. package/esm/components/InputNumber/InputNumber.js +3 -3
  67. package/esm/components/Item/Item.js +50 -41
  68. package/esm/components/ItemLink/ItemLink.js +1 -0
  69. package/esm/components/ItemList/ItemList.js +43 -12
  70. package/esm/components/ItemList/ItemList.stories.js +32 -2
  71. package/esm/components/Layout/Layout.js +55 -55
  72. package/esm/components/List/List.js +139 -134
  73. package/esm/components/LocaleProvider/LocaleProvider.js +3 -3
  74. package/esm/components/Menu/MenuBaseItem.js +19 -19
  75. package/esm/components/Overlay/Overlay.js +34 -34
  76. package/esm/components/Pagination/Pagination.js +3 -3
  77. package/esm/components/Panel/Panel.js +14 -5
  78. package/esm/components/Popper/Popper.js +30 -30
  79. package/esm/components/ProgressStep/ProgressStep.js +17 -15
  80. package/esm/components/Section/Section.js +129 -72
  81. package/esm/components/Select/Select.js +9 -9
  82. package/esm/components/Select/SelectControl.js +1 -1
  83. package/esm/components/Tabs/Tab.js +28 -28
  84. package/esm/components/Tabs/Tabs.js +33 -33
  85. package/esm/components/Translate/Translate.js +25 -25
  86. package/esm/index.js +1 -1
  87. package/package.json +146 -146
  88. package/styleguide/build/bundle.ff1f903a.js +2 -0
  89. package/styleguide/build/{bundle.b7db9339.js.LICENSE.txt → bundle.ff1f903a.js.LICENSE.txt} +0 -0
  90. package/styleguide/images/symbols.svg +1653 -1639
  91. package/styleguide/index.html +6 -6
  92. package/types/src/components/Drawer/DrawerProgress.d.ts +7 -2
  93. package/types/src/components/Icon/constants.d.ts +1 -1
  94. package/types/src/components/ItemLink/ItemLink.d.ts +4 -0
  95. package/types/src/components/ItemLink/ItemLink.stories.d.ts +1 -0
  96. package/types/src/components/ItemList/ItemList.d.ts +8 -0
  97. package/types/src/components/ItemList/ItemList.stories.d.ts +104 -0
  98. package/styleguide/build/bundle.b7db9339.js +0 -2
@@ -137,10 +137,10 @@ const getHumanTotalRows = ({
137
137
  return null;
138
138
  }
139
139
  };
140
- /**
141
- * `List` component is used for displaying a collection of tabular data.
142
- * [More details about designing of lists.](#!/Sets%20of%20Objects)
143
- * @since 0.0.42
140
+ /**
141
+ * `List` component is used for displaying a collection of tabular data.
142
+ * [More details about designing of lists.](#!/Sets%20of%20Objects)
143
+ * @since 0.0.42
144
144
  */
145
145
 
146
146
 
@@ -875,9 +875,14 @@ class List extends Component {
875
875
 
876
876
  if (totalRows && /*#__PURE__*/isValidElement(pagination)) {
877
877
  const {
878
- itemsPerPageOptions = ITEMS_PER_PAGE_OPTIONS
878
+ itemsPerPageOptions = ITEMS_PER_PAGE_OPTIONS,
879
+ itemsPerPage
879
880
  } = pagination.props;
880
881
 
882
+ if (Number.isInteger(itemsPerPage)) {
883
+ return totalRows > itemsPerPage;
884
+ }
885
+
881
886
  if (Array.isArray(itemsPerPageOptions)) {
882
887
  const numericOptions = itemsPerPageOptions.filter(v => Number(v) === v);
883
888
 
@@ -1330,214 +1335,214 @@ class List extends Component {
1330
1335
  }
1331
1336
 
1332
1337
  List.propTypes = {
1333
- /**
1334
- * Columns definition.
1335
- *
1336
- * In addition to the properties described below, you can use any native properties
1337
- * supported by the `TH` element like `className`, `style`, etc.
1338
- * @since 0.0.42
1338
+ /**
1339
+ * Columns definition.
1340
+ *
1341
+ * In addition to the properties described below, you can use any native properties
1342
+ * supported by the `TH` element like `className`, `style`, etc.
1343
+ * @since 0.0.42
1339
1344
  */
1340
1345
  columns: PropTypes.arrayOf(PropTypes.shape({
1341
- /**
1342
- * Unique column key.
1346
+ /**
1347
+ * Unique column key.
1343
1348
  */
1344
1349
  key: PropTypes.string.isRequired,
1345
1350
 
1346
- /**
1347
- * Column title.
1351
+ /**
1352
+ * Column title.
1348
1353
  */
1349
1354
  title: PropTypes.node,
1350
1355
 
1351
- /**
1352
- * Optional cell renderer function: `row => Component`. By default render value of cell.
1353
- * The renderer function can also returns a configuration object like: `{children: 'cell content', colSpan: 3}`
1356
+ /**
1357
+ * Optional cell renderer function: `row => Component`. By default render value of cell.
1358
+ * The renderer function can also returns a configuration object like: `{children: 'cell content', colSpan: 3}`
1354
1359
  */
1355
1360
  render: PropTypes.func,
1356
1361
 
1357
- /**
1358
- * Is column sortable.
1359
- * Default is `false`
1362
+ /**
1363
+ * Is column sortable.
1364
+ * Default is `false`
1360
1365
  */
1361
1366
  sortable: PropTypes.bool,
1362
1367
 
1363
- /**
1364
- * Optional function for row comparison: `(row1, row2) => -1 | 0 | 1`
1368
+ /**
1369
+ * Optional function for row comparison: `(row1, row2) => -1 | 0 | 1`
1365
1370
  */
1366
1371
  sort: PropTypes.func,
1367
1372
 
1368
- /**
1369
- * Column alignment.
1373
+ /**
1374
+ * Column alignment.
1370
1375
  */
1371
1376
  align: PropTypes.oneOf(['left', 'center', 'right']),
1372
1377
 
1373
- /**
1374
- * Truncate the text in cell with an ellipsis.
1378
+ /**
1379
+ * Truncate the text in cell with an ellipsis.
1375
1380
  */
1376
1381
  truncate: PropTypes.bool,
1377
1382
 
1378
- /**
1379
- * Determine type of column content.
1380
- *
1381
- * * title - There should a title of the row.
1382
- * * controls - There should be some control: a button or a dropdown.
1383
- * * actions - There should be the ListAction component.
1383
+ /**
1384
+ * Determine type of column content.
1385
+ *
1386
+ * * title - There should a title of the row.
1387
+ * * controls - There should be some control: a button or a dropdown.
1388
+ * * actions - There should be the ListAction component.
1384
1389
  */
1385
1390
  type: PropTypes.oneOf(['title', 'controls', 'actions'])
1386
1391
  })).isRequired,
1387
1392
 
1388
- /**
1389
- * Array of row objects.
1390
- *
1391
- * Each row must contains `key` property, all columns keys, and can contain `disabled` property.
1392
- * @since 0.0.42
1393
+ /**
1394
+ * Array of row objects.
1395
+ *
1396
+ * Each row must contains `key` property, all columns keys, and can contain `disabled` property.
1397
+ * @since 0.0.42
1393
1398
  */
1394
1399
  data: PropTypes.arrayOf(PropTypes.shape({
1395
- /**
1396
- * Unique column key. This property can by renamed using `rowKey` property of List.
1400
+ /**
1401
+ * Unique column key. This property can by renamed using `rowKey` property of List.
1397
1402
  */
1398
1403
  key: PropTypes.string,
1399
1404
 
1400
- /**
1401
- * Optional property for disabling ability to select this row.
1405
+ /**
1406
+ * Optional property for disabling ability to select this row.
1402
1407
  */
1403
1408
  disabled: PropTypes.bool,
1404
1409
 
1405
- /**
1406
- * Optional array of children rows.
1410
+ /**
1411
+ * Optional array of children rows.
1407
1412
  */
1408
1413
  data: PropTypes.array
1409
1414
  })),
1410
1415
 
1411
- /**
1412
- * Current sort column key
1413
- * @since 0.0.42
1416
+ /**
1417
+ * Current sort column key
1418
+ * @since 0.0.42
1414
1419
  */
1415
1420
  sortColumn: PropTypes.string,
1416
1421
 
1417
- /**
1418
- * Sort direction of the column being sorted.
1419
- * @since 0.0.42
1422
+ /**
1423
+ * Sort direction of the column being sorted.
1424
+ * @since 0.0.42
1420
1425
  */
1421
1426
  sortDirection: PropTypes.oneOf(['ASC', 'DESC']),
1422
1427
 
1423
- /**
1424
- * Sort change handler
1425
- * @since 0.0.42
1428
+ /**
1429
+ * Sort change handler
1430
+ * @since 0.0.42
1426
1431
  */
1427
1432
  onSortChange: PropTypes.func,
1428
1433
 
1429
- /**
1430
- * Array of keys of selected rows
1431
- * @since 0.0.42
1434
+ /**
1435
+ * Array of keys of selected rows
1436
+ * @since 0.0.42
1432
1437
  */
1433
1438
  selection: PropTypes.array,
1434
1439
 
1435
- /**
1436
- * Selection change handler for list. Checkboxes will only be rendered if this prop is defined.
1437
- * @since 0.0.42
1440
+ /**
1441
+ * Selection change handler for list. Checkboxes will only be rendered if this prop is defined.
1442
+ * @since 0.0.42
1438
1443
  */
1439
1444
  onSelectionChange: PropTypes.func,
1440
1445
 
1441
- /**
1442
- * Renderer for a selection checkbox. Allow to replace checkboxes in the List by a custom implementation.
1443
- * @since 3.19.0
1446
+ /**
1447
+ * Renderer for a selection checkbox. Allow to replace checkboxes in the List by a custom implementation.
1448
+ * @since 3.19.0
1444
1449
  */
1445
1450
  renderSelectionCheckbox: PropTypes.func,
1446
1451
 
1447
- /**
1448
- * Row's key getter. Could be a string or function like: `row => <unique_string>`
1449
- * @since 0.0.45
1452
+ /**
1453
+ * Row's key getter. Could be a string or function like: `row => <unique_string>`
1454
+ * @since 0.0.45
1450
1455
  */
1451
1456
  rowKey: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
1452
1457
 
1453
- /**
1454
- * Renderer for a row body. Should return ReactNode.
1455
- * @since 1.12.0
1458
+ /**
1459
+ * Renderer for a row body. Should return ReactNode.
1460
+ * @since 1.12.0
1456
1461
  */
1457
1462
  renderRowBody: PropTypes.func,
1458
1463
 
1459
- /**
1460
- * Array of keys of expanded rows
1461
- * @since 1.12.0
1464
+ /**
1465
+ * Array of keys of expanded rows
1466
+ * @since 1.12.0
1462
1467
  */
1463
1468
  expandedRows: PropTypes.array,
1464
1469
 
1465
- /**
1466
- * Array of keys of rows which not have expand indicator
1467
- * @since 1.12.0
1470
+ /**
1471
+ * Array of keys of rows which not have expand indicator
1472
+ * @since 1.12.0
1468
1473
  */
1469
1474
  notExpandableRows: PropTypes.array,
1470
1475
 
1471
- /**
1472
- * Rows expanding change handler.
1473
- * @since 1.12.0
1476
+ /**
1477
+ * Rows expanding change handler.
1478
+ * @since 1.12.0
1474
1479
  */
1475
1480
  onExpandedRowsChange: PropTypes.func,
1476
1481
 
1477
- /**
1478
- * Array of keys of loading rows. They are displayed instead of checkboxes.
1479
- * @since 2.5.0
1482
+ /**
1483
+ * Array of keys of loading rows. They are displayed instead of checkboxes.
1484
+ * @since 2.5.0
1480
1485
  */
1481
1486
  loadingRows: PropTypes.array,
1482
1487
 
1483
- /**
1484
- * A `Pagination` element. It displays at the top and the bottom of the list. When pagination is defined, the built-in sort is disabled.
1485
- * @since 2.4.0
1488
+ /**
1489
+ * A `Pagination` element. It displays at the top and the bottom of the list. When pagination is defined, the built-in sort is disabled.
1490
+ * @since 2.4.0
1486
1491
  */
1487
1492
  pagination: PropTypes.node,
1488
1493
 
1489
- /**
1490
- * Total rows count, including nested rows. Usually, it uses together with pagination.
1491
- * @since 2.4.0
1494
+ /**
1495
+ * Total rows count, including nested rows. Usually, it uses together with pagination.
1496
+ * @since 2.4.0
1492
1497
  */
1493
1498
  totalRows: PropTypes.number,
1494
1499
 
1495
- /**
1496
- * A `Toolbar` element.
1497
- * @since 2.4.0
1500
+ /**
1501
+ * A `Toolbar` element.
1502
+ * @since 2.4.0
1498
1503
  */
1499
1504
  toolbar: PropTypes.node,
1500
1505
 
1501
- /**
1502
- * A flag that all rows are selected.
1503
- * @since 2.4.0
1506
+ /**
1507
+ * A flag that all rows are selected.
1508
+ * @since 2.4.0
1504
1509
  */
1505
1510
  allRowsSelected: PropTypes.bool,
1506
1511
 
1507
- /**
1508
- * A callback executed when the allRowsSelected prop is changed.
1509
- * @since 2.4.0
1512
+ /**
1513
+ * A callback executed when the allRowsSelected prop is changed.
1514
+ * @since 2.4.0
1510
1515
  */
1511
1516
  onAllRowsSelectedChange: PropTypes.func,
1512
1517
 
1513
- /**
1514
- * Filtered list. Manages toolbar visibility when data is absent and defines the defaults for empty view.
1515
- * @since 3.0.1
1518
+ /**
1519
+ * Filtered list. Manages toolbar visibility when data is absent and defines the defaults for empty view.
1520
+ * @since 3.0.1
1516
1521
  */
1517
1522
  filtered: PropTypes.bool,
1518
1523
 
1519
- /**
1520
- * A custom view for the case when data is absent.
1521
- * @since 2.5.0
1524
+ /**
1525
+ * A custom view for the case when data is absent.
1526
+ * @since 2.5.0
1522
1527
  */
1523
1528
  emptyView: PropTypes.node,
1524
1529
 
1525
- /**
1526
- * Which part of the List component should be replaced by the empty view.
1527
- * @since 2.6.0
1528
- * @deprecated Use `filtered` instead.
1530
+ /**
1531
+ * Which part of the List component should be replaced by the empty view.
1532
+ * @since 2.6.0
1533
+ * @deprecated Use `filtered` instead.
1529
1534
  */
1530
1535
  emptyViewMode: PropTypes.oneOf(['all', 'items']),
1531
1536
 
1532
- /**
1533
- * A slot on the right of the items.
1534
- * @since 2.6.0
1537
+ /**
1538
+ * A slot on the right of the items.
1539
+ * @since 2.6.0
1535
1540
  */
1536
1541
  sidebar: PropTypes.node,
1537
1542
 
1538
- /**
1539
- * Custom localization messages.
1540
- * @since 2.6.0
1543
+ /**
1544
+ * Custom localization messages.
1545
+ * @since 2.6.0
1541
1546
  */
1542
1547
  locale: PropTypes.shape({
1543
1548
  selectAll: PropTypes.node,
@@ -1547,49 +1552,49 @@ List.propTypes = {
1547
1552
  selectedRows: PropTypes.oneOfType([PropTypes.func, PropTypes.node])
1548
1553
  }),
1549
1554
 
1550
- /**
1551
- * Render List row's content vertically.
1552
- * When some number is specified, it turns into vertical mode automatically if the List's width is less than the provided number.
1553
- * @since 3.3.0
1555
+ /**
1556
+ * Render List row's content vertically.
1557
+ * When some number is specified, it turns into vertical mode automatically if the List's width is less than the provided number.
1558
+ * @since 3.3.0
1554
1559
  */
1555
1560
  vertical: PropTypes.oneOfType([PropTypes.bool, PropTypes.number]),
1556
1561
 
1557
- /**
1558
- * Indicate the loading state of the list.
1559
- * @since 3.3.1
1562
+ /**
1563
+ * Indicate the loading state of the list.
1564
+ * @since 3.3.1
1560
1565
  */
1561
1566
  loading: PropTypes.bool,
1562
1567
 
1563
- /**
1564
- * Apply some props to each row.
1565
- *
1566
- * `virtual` - Virtual row does not have any controls.
1567
- *
1568
- * @since 3.11.0
1568
+ /**
1569
+ * Apply some props to each row.
1570
+ *
1571
+ * `virtual` - Virtual row does not have any controls.
1572
+ *
1573
+ * @since 3.11.0
1569
1574
  */
1570
1575
  rowProps: PropTypes.oneOfType([PropTypes.shape({
1571
1576
  virtual: PropTypes.bool
1572
1577
  }), PropTypes.func]),
1573
1578
 
1574
- /**
1575
- * Enable reorderable view.
1576
- * @since 3.18.0
1579
+ /**
1580
+ * Enable reorderable view.
1581
+ * @since 3.18.0
1577
1582
  */
1578
1583
  reorderable: PropTypes.bool,
1579
1584
 
1580
- /**
1581
- * Reorder end handler.
1582
- * @since 3.18.0
1585
+ /**
1586
+ * Reorder end handler.
1587
+ * @since 3.18.0
1583
1588
  */
1584
1589
  onReorderEnd: PropTypes.func,
1585
1590
 
1586
- /**
1587
- * @ignore
1591
+ /**
1592
+ * @ignore
1588
1593
  */
1589
1594
  className: PropTypes.string,
1590
1595
 
1591
- /**
1592
- * @ignore
1596
+ /**
1597
+ * @ignore
1593
1598
  */
1594
1599
  baseClassName: PropTypes.string
1595
1600
  };
@@ -83,9 +83,9 @@ export const useTranslate = namespace => {
83
83
  };
84
84
  };
85
85
 
86
- /**
87
- * LocaleProvider provides a uniform localization support for built-in text of components.
88
- * @since 0.0.42
86
+ /**
87
+ * LocaleProvider provides a uniform localization support for built-in text of components.
88
+ * @since 0.0.42
89
89
  */
90
90
  class LocaleProvider extends PureComponent {
91
91
  getChildContext() {
@@ -5,9 +5,9 @@ import PropTypes from 'prop-types';
5
5
  import classNames from 'classnames';
6
6
  import { CLS_PREFIX } from '../../constants';
7
7
  import Icon, { ICON_SIZE_16 } from '../Icon';
8
- /**
9
- * `MenuBaseItem` component.
10
- * @since 0.0.60
8
+ /**
9
+ * `MenuBaseItem` component.
10
+ * @since 0.0.60
11
11
  */
12
12
 
13
13
  const MenuBaseItem = ({
@@ -31,37 +31,37 @@ const MenuBaseItem = ({
31
31
  }, label));
32
32
 
33
33
  MenuBaseItem.propTypes = {
34
- /**
35
- * Icon
36
- * @since 0.0.60
34
+ /**
35
+ * Icon
36
+ * @since 0.0.60
37
37
  */
38
38
  icon: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.element]),
39
39
 
40
- /**
41
- * Right label of item.
42
- * @since 0.0.60
40
+ /**
41
+ * Right label of item.
42
+ * @since 0.0.60
43
43
  */
44
44
  label: PropTypes.node,
45
45
 
46
- /**
47
- * Content of the `MenuBaseItem`.
48
- * @since 0.0.60
46
+ /**
47
+ * Content of the `MenuBaseItem`.
48
+ * @since 0.0.60
49
49
  */
50
50
  children: PropTypes.node,
51
51
 
52
- /**
53
- * @ignore
52
+ /**
53
+ * @ignore
54
54
  */
55
55
  className: PropTypes.string,
56
56
 
57
- /**
58
- * @ignore
57
+ /**
58
+ * @ignore
59
59
  */
60
60
  baseClassName: PropTypes.string,
61
61
 
62
- /**
63
- * Component to render as the root element. Useful when rendering a `MenuBaseItem` as other component or tag.
64
- * @since 1.9.1
62
+ /**
63
+ * Component to render as the root element. Useful when rendering a `MenuBaseItem` as other component or tag.
64
+ * @since 1.9.1
65
65
  */
66
66
  component: PropTypes.elementType
67
67
  };
@@ -12,12 +12,12 @@ import Backdrop from './Backdrop';
12
12
  import Layer from '../Layer';
13
13
  import FocusTrap from '../FocusTrap';
14
14
 
15
- /**
16
- * `Overlay` component.
15
+ /**
16
+ * `Overlay` component.
17
17
  */
18
18
  const overlays = [];
19
- /**
20
- * @since 0.0.65
19
+ /**
20
+ * @since 0.0.65
21
21
  */
22
22
 
23
23
  export default class Overlay extends Component {
@@ -254,75 +254,75 @@ export default class Overlay extends Component {
254
254
  }
255
255
 
256
256
  _defineProperty(Overlay, "propTypes", {
257
- /**
258
- * Toggles visibility.
257
+ /**
258
+ * Toggles visibility.
259
259
  */
260
260
  isOpen: PropTypes.bool,
261
261
 
262
- /**
263
- * Overlay placement.
262
+ /**
263
+ * Overlay placement.
264
264
  */
265
265
  placement: PropTypes.oneOf(['center', 'left', 'right']),
266
266
 
267
- /**
268
- * Overlay size.
267
+ /**
268
+ * Overlay size.
269
269
  */
270
270
  size: PropTypes.oneOf(['xs', 'sm', 'md', 'lg']),
271
271
 
272
- /**
273
- * onClose handler.
272
+ /**
273
+ * onClose handler.
274
274
  */
275
275
  onClose: PropTypes.func,
276
276
 
277
- /**
278
- * Indicating if clicking the backdrop should close the overlay.
277
+ /**
278
+ * Indicating if clicking the backdrop should close the overlay.
279
279
  */
280
280
  canCloseOnBackdropClick: PropTypes.bool,
281
281
 
282
- /**
283
- * Indicating if pressing the escape key should close the overlay.
282
+ /**
283
+ * Indicating if pressing the escape key should close the overlay.
284
284
  */
285
285
  canCloseOnEscapePress: PropTypes.bool,
286
286
 
287
- /**
288
- * Block with an image, placed at the side of the component
289
- * @since 3.25.0
287
+ /**
288
+ * Block with an image, placed at the side of the component
289
+ * @since 3.25.0
290
290
  */
291
291
  sideBanner: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.element]),
292
292
 
293
- /**
294
- * Additional properties for the sideBanner
295
- * @since 3.25.0
293
+ /**
294
+ * Additional properties for the sideBanner
295
+ * @since 3.25.0
296
296
  */
297
297
  sideBannerContainer: PropTypes.shape({
298
- /**
299
- * Values for css background property
298
+ /**
299
+ * Values for css background property
300
300
  */
301
301
  background: PropTypes.string,
302
302
 
303
- /**
304
- * One of: center, flex-start, flex-end
303
+ /**
304
+ * One of: center, flex-start, flex-end
305
305
  */
306
306
  align: PropTypes.oneOf(['center', 'flex-start', 'flex-end'])
307
307
  }),
308
308
 
309
- /**
310
- * @ignore
309
+ /**
310
+ * @ignore
311
311
  */
312
312
  style: PropTypes.object,
313
313
 
314
- /**
315
- * Content of the `Overlay`.
314
+ /**
315
+ * Content of the `Overlay`.
316
316
  */
317
317
  children: PropTypes.node,
318
318
 
319
- /**
320
- * @ignore
319
+ /**
320
+ * @ignore
321
321
  */
322
322
  className: PropTypes.string,
323
323
 
324
- /**
325
- * @ignore
324
+ /**
325
+ * @ignore
326
326
  */
327
327
  baseClassName: PropTypes.string
328
328
  });
@@ -15,9 +15,9 @@ export const ITEMS_PER_PAGE_OPTIONS = [25, 100, 'all'];
15
15
  const VIEW_DEFAULT = 'default';
16
16
  const VIEW_POPOVER = 'popover';
17
17
 
18
- /**
19
- * `Pagination` component is used for navigating objects in [List](#!/List) which content is displayed on multiple pages.
20
- * @since 0.0.54
18
+ /**
19
+ * `Pagination` component is used for navigating objects in [List](#!/List) which content is displayed on multiple pages.
20
+ * @since 0.0.54
21
21
  */
22
22
  const Pagination = ({
23
23
  baseClassName = `${CLS_PREFIX}pagination`,
@@ -1,11 +1,12 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
- // Copyright 1999-2020. Plesk International GmbH. All rights reserved.
3
+ // Copyright 1999-2021. Plesk International GmbH. All rights reserved.
4
4
 
5
5
  /* eslint-disable react/no-deprecated */
6
- import React, { Component } from 'react';
6
+ import React, { Component, createRef } from 'react';
7
7
  import classNames from 'classnames';
8
8
  import { CLS_PREFIX } from '../../constants';
9
+ import { CSSTransition } from 'react-transition-group';
9
10
  import { isLikeText } from '../Translate';
10
11
  import Heading from '../Heading';
11
12
  import Button from '../Button';
@@ -71,13 +72,21 @@ class Panel extends Component {
71
72
  collapsed
72
73
  } = this.state;
73
74
  const handleToggle = collapsible ? this.handleToggle : undefined;
74
- return /*#__PURE__*/React.createElement("div", _extends({
75
+ const rootRef = /*#__PURE__*/createRef();
76
+ return /*#__PURE__*/React.createElement(CSSTransition, {
77
+ classNames: `${baseClassName}-`,
78
+ in: !collapsed,
79
+ timeout: 300,
80
+ nodeRef: rootRef
81
+ }, /*#__PURE__*/React.createElement("div", _extends({
75
82
  className: classNames(baseClassName, {
76
83
  [`${baseClassName}--collapsible`]: collapsible,
77
84
  [`${baseClassName}--collapsed`]: collapsed,
78
85
  [`${baseClassName}--expanded`]: !collapsed
79
86
  }, className)
80
- }, props), title && /*#__PURE__*/React.createElement("div", {
87
+ }, props, {
88
+ ref: rootRef
89
+ }), title && /*#__PURE__*/React.createElement("div", {
81
90
  className: `${baseClassName}__header`,
82
91
  onClick: handleToggle
83
92
  }, isLikeText(title) ? /*#__PURE__*/React.createElement(Heading, {
@@ -96,7 +105,7 @@ class Panel extends Component {
96
105
  onClick: handleToggle
97
106
  }))), /*#__PURE__*/React.createElement("div", {
98
107
  className: `${baseClassName}__content`
99
- }, children));
108
+ }, children)));
100
109
  }
101
110
 
102
111
  }