@elastic/eui 95.12.0 → 96.0.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 (99) hide show
  1. package/es/components/breadcrumbs/_breadcrumb_content.js +2 -0
  2. package/es/components/breadcrumbs/breadcrumbs.js +2 -0
  3. package/es/components/datagrid/body/cell/data_grid_cell.styles.js +3 -1
  4. package/es/components/datagrid/controls/column_selector.js +2 -2
  5. package/es/components/datagrid/controls/column_selector.styles.js +2 -2
  6. package/es/components/datagrid/controls/column_sorting.js +0 -1
  7. package/es/components/datagrid/controls/column_sorting.styles.js +2 -2
  8. package/es/components/datagrid/controls/column_sorting_draggable.js +2 -1
  9. package/es/components/drag_and_drop/draggable.js +15 -2
  10. package/es/components/header/header_breadcrumbs/header_breadcrumbs.js +2 -0
  11. package/es/components/header/header_links/header_links.js +2 -0
  12. package/es/components/page/page_header/page_header_content.js +32 -31
  13. package/es/components/page/page_header/page_header_content.styles.js +28 -16
  14. package/es/components/popover/popover.js +2 -0
  15. package/es/components/provider/system_color_mode/system_color_mode_provider.js +3 -3
  16. package/es/components/search_bar/search_box.js +2 -3
  17. package/es/components/tour/tour_step.js +2 -0
  18. package/eui.d.ts +23 -6
  19. package/i18ntokens.json +56 -56
  20. package/lib/components/breadcrumbs/_breadcrumb_content.js +2 -0
  21. package/lib/components/datagrid/body/cell/data_grid_cell.styles.js +3 -1
  22. package/lib/components/datagrid/controls/column_selector.js +2 -2
  23. package/lib/components/datagrid/controls/column_selector.styles.js +1 -1
  24. package/lib/components/datagrid/controls/column_sorting.js +0 -1
  25. package/lib/components/datagrid/controls/column_sorting.styles.js +1 -1
  26. package/lib/components/datagrid/controls/column_sorting_draggable.js +2 -1
  27. package/lib/components/drag_and_drop/draggable.js +15 -2
  28. package/lib/components/page/page_header/page_header_content.js +29 -30
  29. package/lib/components/page/page_header/page_header_content.styles.js +28 -16
  30. package/lib/components/popover/popover.js +2 -0
  31. package/lib/components/provider/system_color_mode/system_color_mode_provider.js +3 -3
  32. package/lib/components/search_bar/search_box.js +1 -2
  33. package/optimize/es/components/datagrid/body/cell/data_grid_cell.styles.js +3 -1
  34. package/optimize/es/components/datagrid/controls/column_selector.js +2 -2
  35. package/optimize/es/components/datagrid/controls/column_selector.styles.js +2 -2
  36. package/optimize/es/components/datagrid/controls/column_sorting.js +0 -1
  37. package/optimize/es/components/datagrid/controls/column_sorting.styles.js +2 -2
  38. package/optimize/es/components/datagrid/controls/column_sorting_draggable.js +2 -1
  39. package/optimize/es/components/drag_and_drop/draggable.js +6 -2
  40. package/optimize/es/components/page/page_header/page_header_content.js +26 -28
  41. package/optimize/es/components/page/page_header/page_header_content.styles.js +28 -16
  42. package/optimize/es/components/provider/system_color_mode/system_color_mode_provider.js +3 -3
  43. package/optimize/es/components/search_bar/search_box.js +2 -3
  44. package/optimize/lib/components/datagrid/body/cell/data_grid_cell.styles.js +3 -1
  45. package/optimize/lib/components/datagrid/controls/column_selector.js +2 -2
  46. package/optimize/lib/components/datagrid/controls/column_selector.styles.js +1 -1
  47. package/optimize/lib/components/datagrid/controls/column_sorting.js +0 -1
  48. package/optimize/lib/components/datagrid/controls/column_sorting.styles.js +1 -1
  49. package/optimize/lib/components/datagrid/controls/column_sorting_draggable.js +2 -1
  50. package/optimize/lib/components/drag_and_drop/draggable.js +6 -2
  51. package/optimize/lib/components/page/page_header/page_header_content.js +25 -27
  52. package/optimize/lib/components/page/page_header/page_header_content.styles.js +28 -16
  53. package/optimize/lib/components/provider/system_color_mode/system_color_mode_provider.js +3 -3
  54. package/optimize/lib/components/search_bar/search_box.js +1 -2
  55. package/package.json +1 -1
  56. package/src/global_styling/mixins/_form.scss +0 -245
  57. package/src/global_styling/mixins/_index.scss +0 -3
  58. package/src/global_styling/mixins/_states.scss +0 -33
  59. package/src/global_styling/mixins/_tool_tip.scss +4 -4
  60. package/src/global_styling/variables/_buttons.scss +4 -5
  61. package/src/global_styling/variables/_form.scss +0 -38
  62. package/src/global_styling/variables/_index.scss +0 -3
  63. package/src/themes/amsterdam/global_styling/mixins/_index.scss +0 -3
  64. package/src/themes/amsterdam/global_styling/mixins/_states.scss +0 -33
  65. package/src/themes/amsterdam/global_styling/variables/_index.scss +0 -2
  66. package/test-env/components/breadcrumbs/_breadcrumb_content.js +2 -0
  67. package/test-env/components/datagrid/body/cell/data_grid_cell.styles.js +3 -1
  68. package/test-env/components/datagrid/controls/column_selector.js +2 -2
  69. package/test-env/components/datagrid/controls/column_selector.styles.js +1 -1
  70. package/test-env/components/datagrid/controls/column_sorting.js +0 -1
  71. package/test-env/components/datagrid/controls/column_sorting.styles.js +1 -1
  72. package/test-env/components/datagrid/controls/column_sorting_draggable.js +2 -1
  73. package/test-env/components/drag_and_drop/draggable.js +15 -2
  74. package/test-env/components/page/page_header/page_header_content.js +29 -30
  75. package/test-env/components/page/page_header/page_header_content.styles.js +28 -16
  76. package/test-env/components/popover/popover.js +2 -0
  77. package/test-env/components/provider/system_color_mode/system_color_mode_provider.js +3 -3
  78. package/test-env/components/search_bar/search_box.js +1 -2
  79. package/dist/eui_theme_dark.css +0 -173
  80. package/dist/eui_theme_dark.min.css +0 -1
  81. package/dist/eui_theme_light.css +0 -173
  82. package/dist/eui_theme_light.min.css +0 -1
  83. package/src/global_styling/mixins/_link.scss +0 -11
  84. package/src/global_styling/mixins/_loading.scss +0 -6
  85. package/src/global_styling/mixins/_range.scss +0 -62
  86. package/src/global_styling/variables/_page.scss +0 -2
  87. package/src/global_styling/variables/_panel.scss +0 -21
  88. package/src/global_styling/variables/_tool_tip.scss +0 -9
  89. package/src/themes/amsterdam/global_styling/mixins/_link.scss +0 -23
  90. package/src/themes/amsterdam/global_styling/variables/_buttons.scss +0 -4
  91. package/src/themes/amsterdam/global_styling/variables/_page.scss +0 -1
  92. package/src/themes/legacy/_colors_dark.scss +0 -49
  93. package/src/themes/legacy/_colors_light.scss +0 -49
  94. package/src/themes/legacy/_globals.scss +0 -11
  95. package/src/themes/legacy/legacy_dark.scss +0 -11
  96. package/src/themes/legacy/legacy_light.scss +0 -11
  97. package/src/themes/legacy/reset/_index.scss +0 -2
  98. package/src/themes/legacy/reset/_reset.scss +0 -161
  99. package/src/themes/legacy/reset/_scrollbar.scss +0 -6
package/i18ntokens.json CHANGED
@@ -1409,14 +1409,14 @@
1409
1409
  "highlighting": "string",
1410
1410
  "loc": {
1411
1411
  "start": {
1412
- "line": 159,
1412
+ "line": 158,
1413
1413
  "column": 12,
1414
- "index": 4993
1414
+ "index": 4973
1415
1415
  },
1416
1416
  "end": {
1417
- "line": 159,
1417
+ "line": 158,
1418
1418
  "column": 74,
1419
- "index": 5055
1419
+ "index": 5035
1420
1420
  }
1421
1421
  },
1422
1422
  "filepath": "src/components/datagrid/controls/column_selector.tsx"
@@ -1427,14 +1427,14 @@
1427
1427
  "highlighting": "string",
1428
1428
  "loc": {
1429
1429
  "start": {
1430
- "line": 165,
1430
+ "line": 164,
1431
1431
  "column": 12,
1432
- "index": 5201
1432
+ "index": 5181
1433
1433
  },
1434
1434
  "end": {
1435
- "line": 171,
1435
+ "line": 170,
1436
1436
  "column": 13,
1437
- "index": 5413
1437
+ "index": 5393
1438
1438
  }
1439
1439
  },
1440
1440
  "filepath": "src/components/datagrid/controls/column_selector.tsx"
@@ -1445,14 +1445,14 @@
1445
1445
  "highlighting": "string",
1446
1446
  "loc": {
1447
1447
  "start": {
1448
- "line": 165,
1448
+ "line": 164,
1449
1449
  "column": 12,
1450
- "index": 5201
1450
+ "index": 5181
1451
1451
  },
1452
1452
  "end": {
1453
- "line": 171,
1453
+ "line": 170,
1454
1454
  "column": 13,
1455
- "index": 5413
1455
+ "index": 5393
1456
1456
  }
1457
1457
  },
1458
1458
  "filepath": "src/components/datagrid/controls/column_selector.tsx"
@@ -1465,12 +1465,12 @@
1465
1465
  "start": {
1466
1466
  "line": 288,
1467
1467
  "column": 18,
1468
- "index": 10378
1468
+ "index": 10386
1469
1469
  },
1470
1470
  "end": {
1471
1471
  "line": 291,
1472
1472
  "column": 20,
1473
- "index": 10502
1473
+ "index": 10510
1474
1474
  }
1475
1475
  },
1476
1476
  "filepath": "src/components/datagrid/controls/column_selector.tsx"
@@ -1483,12 +1483,12 @@
1483
1483
  "start": {
1484
1484
  "line": 301,
1485
1485
  "column": 18,
1486
- "index": 10862
1486
+ "index": 10870
1487
1487
  },
1488
1488
  "end": {
1489
1489
  "line": 304,
1490
1490
  "column": 20,
1491
- "index": 10984
1491
+ "index": 10992
1492
1492
  }
1493
1493
  },
1494
1494
  "filepath": "src/components/datagrid/controls/column_selector.tsx"
@@ -1553,14 +1553,14 @@
1553
1553
  "highlighting": "string",
1554
1554
  "loc": {
1555
1555
  "start": {
1556
- "line": 119,
1556
+ "line": 120,
1557
1557
  "column": 14,
1558
- "index": 3743
1558
+ "index": 3759
1559
1559
  },
1560
1560
  "end": {
1561
- "line": 123,
1561
+ "line": 124,
1562
1562
  "column": 15,
1563
- "index": 3932
1563
+ "index": 3948
1564
1564
  }
1565
1565
  },
1566
1566
  "filepath": "src/components/datagrid/controls/column_sorting_draggable.tsx"
@@ -1571,14 +1571,14 @@
1571
1571
  "highlighting": "string",
1572
1572
  "loc": {
1573
1573
  "start": {
1574
- "line": 129,
1574
+ "line": 130,
1575
1575
  "column": 12,
1576
- "index": 4120
1576
+ "index": 4136
1577
1577
  },
1578
1578
  "end": {
1579
- "line": 133,
1579
+ "line": 134,
1580
1580
  "column": 13,
1581
- "index": 4302
1581
+ "index": 4318
1582
1582
  }
1583
1583
  },
1584
1584
  "filepath": "src/components/datagrid/controls/column_sorting_draggable.tsx"
@@ -1589,14 +1589,14 @@
1589
1589
  "highlighting": "string",
1590
1590
  "loc": {
1591
1591
  "start": {
1592
- "line": 177,
1592
+ "line": 178,
1593
1593
  "column": 12,
1594
- "index": 5805
1594
+ "index": 5821
1595
1595
  },
1596
1596
  "end": {
1597
- "line": 181,
1597
+ "line": 182,
1598
1598
  "column": 13,
1599
- "index": 5983
1599
+ "index": 5999
1600
1600
  }
1601
1601
  },
1602
1602
  "filepath": "src/components/datagrid/controls/column_sorting_draggable.tsx"
@@ -1643,14 +1643,14 @@
1643
1643
  "highlighting": "string",
1644
1644
  "loc": {
1645
1645
  "start": {
1646
- "line": 221,
1646
+ "line": 220,
1647
1647
  "column": 14,
1648
- "index": 6957
1648
+ "index": 6937
1649
1649
  },
1650
1650
  "end": {
1651
- "line": 224,
1651
+ "line": 223,
1652
1652
  "column": 16,
1653
- "index": 7093
1653
+ "index": 7073
1654
1654
  }
1655
1655
  },
1656
1656
  "filepath": "src/components/datagrid/controls/column_sorting.tsx"
@@ -1661,14 +1661,14 @@
1661
1661
  "highlighting": "string",
1662
1662
  "loc": {
1663
1663
  "start": {
1664
- "line": 254,
1664
+ "line": 253,
1665
1665
  "column": 24,
1666
- "index": 8316
1666
+ "index": 8296
1667
1667
  },
1668
1668
  "end": {
1669
- "line": 257,
1669
+ "line": 256,
1670
1670
  "column": 26,
1671
- "index": 8472
1671
+ "index": 8452
1672
1672
  }
1673
1673
  },
1674
1674
  "filepath": "src/components/datagrid/controls/column_sorting.tsx"
@@ -1679,14 +1679,14 @@
1679
1679
  "highlighting": "string",
1680
1680
  "loc": {
1681
1681
  "start": {
1682
- "line": 329,
1682
+ "line": 328,
1683
1683
  "column": 20,
1684
- "index": 11826
1684
+ "index": 11806
1685
1685
  },
1686
1686
  "end": {
1687
- "line": 332,
1687
+ "line": 331,
1688
1688
  "column": 22,
1689
- "index": 11959
1689
+ "index": 11939
1690
1690
  }
1691
1691
  },
1692
1692
  "filepath": "src/components/datagrid/controls/column_sorting.tsx"
@@ -5927,14 +5927,14 @@
5927
5927
  "highlighting": "string",
5928
5928
  "loc": {
5929
5929
  "start": {
5930
- "line": 698,
5930
+ "line": 700,
5931
5931
  "column": 16,
5932
- "index": 20714
5932
+ "index": 20806
5933
5933
  },
5934
5934
  "end": {
5935
- "line": 701,
5935
+ "line": 703,
5936
5936
  "column": 18,
5937
- "index": 20908
5937
+ "index": 21000
5938
5938
  }
5939
5939
  },
5940
5940
  "filepath": "src/components/popover/popover.tsx"
@@ -6017,14 +6017,14 @@
6017
6017
  "highlighting": "string",
6018
6018
  "loc": {
6019
6019
  "start": {
6020
- "line": 49,
6020
+ "line": 48,
6021
6021
  "column": 29,
6022
- "index": 1421
6022
+ "index": 1388
6023
6023
  },
6024
6024
  "end": {
6025
- "line": 52,
6025
+ "line": 51,
6026
6026
  "column": 3,
6027
- "index": 1484
6027
+ "index": 1451
6028
6028
  }
6029
6029
  },
6030
6030
  "filepath": "src/components/search_bar/search_box.tsx"
@@ -6035,14 +6035,14 @@
6035
6035
  "highlighting": "string",
6036
6036
  "loc": {
6037
6037
  "start": {
6038
- "line": 53,
6038
+ "line": 52,
6039
6039
  "column": 31,
6040
- "index": 1517
6040
+ "index": 1484
6041
6041
  },
6042
6042
  "end": {
6043
- "line": 56,
6043
+ "line": 55,
6044
6044
  "column": 3,
6045
- "index": 1671
6045
+ "index": 1638
6046
6046
  }
6047
6047
  },
6048
6048
  "filepath": "src/components/search_bar/search_box.tsx"
@@ -6053,14 +6053,14 @@
6053
6053
  "highlighting": "string",
6054
6054
  "loc": {
6055
6055
  "start": {
6056
- "line": 57,
6056
+ "line": 56,
6057
6057
  "column": 25,
6058
- "index": 1698
6058
+ "index": 1665
6059
6059
  },
6060
6060
  "end": {
6061
- "line": 60,
6061
+ "line": 59,
6062
6062
  "column": 3,
6063
- "index": 1847
6063
+ "index": 1814
6064
6064
  }
6065
6065
  },
6066
6066
  "filepath": "src/components/search_bar/search_box.tsx"
@@ -260,6 +260,8 @@ EuiBreadcrumbContent.propTypes = {
260
260
  /**
261
261
  * Must be set to true if using `EuiDragDropContext` within a popover,
262
262
  * otherwise your nested drag & drop will have incorrect positioning
263
+ *
264
+ * @deprecated - use `usePortal` prop on children `EuiDraggable` components instead.
263
265
  */
264
266
  hasDragDrop: _propTypes.default.bool,
265
267
  /**
@@ -108,7 +108,9 @@ var euiDataGridRowCellStyles = exports.euiDataGridRowCellStyles = function euiDa
108
108
  defaultHeight: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', '100%'), ";;label:defaultHeight;"),
109
109
  // Control columns should be vertically centered with the *first line* of text
110
110
  // for both single and multi-line heights (see https://github.com/elastic/eui/issues/7897)
111
- controlColumn: /*#__PURE__*/(0, _react.css)("display:inline-flex;align-items:start;gap:", euiTheme.size.xxs, ";vertical-align:-webkit-baseline-middle;vertical-align:-moz-middle-with-baseline;.euiDataGrid--fontSizeSmall &:where(.euiDataGridRowCell__content--defaultHeight){", (0, _global_styling.logicalCSS)('height', '100%'), " align-items:center;}.euiCheckbox:not(:has(label)){display:inline;.euiCheckbox__square{display:inline-flex;vertical-align:text-bottom;@supports (vertical-align: -moz-middle-with-baseline){vertical-align:sub;}}};label:controlColumn;")
111
+ controlColumn: /*#__PURE__*/(0, _react.css)(
112
+ // ❗ For some reason Chromium browsers will scrollbar stutter without this :|||
113
+ (0, _global_styling.logicalCSS)('max-height', '100%'), " display:inline-flex;align-items:start;gap:", euiTheme.size.xxs, ";vertical-align:-webkit-baseline-middle;vertical-align:-moz-middle-with-baseline;.euiDataGrid--fontSizeSmall &:where(.euiDataGridRowCell__content--defaultHeight){", (0, _global_styling.logicalCSS)('height', '100%'), " align-items:center;}.euiCheckbox:not(:has(label)){display:inline;.euiCheckbox__square{display:inline-flex;vertical-align:text-bottom;@supports (vertical-align: -moz-middle-with-baseline){vertical-align:sub;}}};label:controlColumn;")
112
114
  }
113
115
  };
114
116
  };
@@ -110,7 +110,6 @@ var useDataGridColumnSelector = exports.useDataGridColumnSelector = function use
110
110
  },
111
111
  anchorPosition: "downLeft",
112
112
  panelPaddingSize: "none",
113
- hasDragDrop: true,
114
113
  button: (0, _react2.jsx)(_data_grid_toolbar_control.EuiDataGridToolbarControl, {
115
114
  badgeContent: numberOfHiddenFields > 0 ? "".concat(orderedVisibleColumns.length, "/").concat(availableColumns.length) : availableColumns.length,
116
115
  iconType: "tableDensityNormal",
@@ -154,7 +153,8 @@ var useDataGridColumnSelector = exports.useDataGridColumnSelector = function use
154
153
  index: index,
155
154
  isDragDisabled: !isDragEnabled,
156
155
  hasInteractiveChildren: true,
157
- customDragHandle: true
156
+ customDragHandle: true,
157
+ usePortal: true
158
158
  }, function (provided, state) {
159
159
  return (0, _react2.jsx)("div", {
160
160
  css: styles.euiDataGridColumnSelector__item,
@@ -22,7 +22,7 @@ var euiDataGridColumnSelectorStyles = exports.euiDataGridColumnSelectorStyles =
22
22
  });
23
23
  var maxResponsiveHeight = "min(".concat(maxStaticHeight, ", 50vh)");
24
24
  return {
25
- euiDataGridColumnSelector: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiYScroll)(euiThemeContext), " ", (0, _global_styling.logicalCSS)('max-height', maxResponsiveHeight), " padding:", euiTheme.size.s, ";;label:euiDataGridColumnSelector;"),
25
+ euiDataGridColumnSelector: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiYScrollWithShadows)(euiThemeContext), " ", (0, _global_styling.logicalCSS)('max-height', maxResponsiveHeight), " padding:", euiTheme.size.s, ";;label:euiDataGridColumnSelector;"),
26
26
  euiDataGridColumnSelector__item: /*#__PURE__*/(0, _react.css)("padding:", euiTheme.size.xs, ";&.euiDataGridColumnSelector__item-isDragging{", (0, _themes.euiShadowLarge)(euiThemeContext), " background-color:", euiTheme.colors.emptyShade, ";};label:euiDataGridColumnSelector__item;")
27
27
  };
28
28
  };
@@ -151,7 +151,6 @@ var DataGridSortingControl = exports.DataGridSortingControl = /*#__PURE__*/(0, _
151
151
  },
152
152
  anchorPosition: "downLeft",
153
153
  panelPaddingSize: "s",
154
- hasDragDrop: true,
155
154
  button: (0, _react2.jsx)(_data_grid_toolbar_control.EuiDataGridToolbarControl, {
156
155
  badgeContent: sorting.columns.length,
157
156
  iconType: "sortable",
@@ -25,7 +25,7 @@ var euiDataGridColumnSortingStyles = exports.euiDataGridColumnSortingStyles = fu
25
25
  /**
26
26
  * Sorted fields
27
27
  */
28
- euiDataGridColumnSorting: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-height', maxResponsiveHeight), " ", (0, _global_styling.logicalCSS)('padding-vertical', euiTheme.size.s), "margin:-", euiTheme.size.s, ";", (0, _global_styling.euiYScroll)(euiThemeContext), ";;label:euiDataGridColumnSorting;"),
28
+ euiDataGridColumnSorting: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-height', maxResponsiveHeight), " ", (0, _global_styling.logicalCSS)('padding-vertical', euiTheme.size.s), "margin:-", euiTheme.size.s, ";", (0, _global_styling.euiYScrollWithShadows)(euiThemeContext), ";;label:euiDataGridColumnSorting;"),
29
29
  euiDataGridColumnSorting__item: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.s), " &.euiDataGridColumnSorting__item-isDragging{", (0, _themes.euiShadowLarge)(euiThemeContext), " background-color:", euiTheme.colors.emptyShade, ";};label:euiDataGridColumnSorting__item;"),
30
30
  euiDataGridColumnSorting__name: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('padding-right', euiTheme.size.xs), " ", (0, _global_styling.euiMinBreakpoint)(euiThemeContext, 'm'), "{", (0, _global_styling.logicalCSS)('padding-right', euiTheme.size.l), ";};label:euiDataGridColumnSorting__name;"),
31
31
  euiDataGridColumnSorting__order: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiMinBreakpoint)(euiThemeContext, 'm'), "{", (0, _global_styling.logicalCSS)('min-width', (0, _global_styling.mathWithUnits)(euiTheme.size.xxl, function (x) {
@@ -98,7 +98,8 @@ var EuiDataGridColumnSortingDraggable = exports.EuiDataGridColumnSortingDraggabl
98
98
  draggableId: id,
99
99
  index: index,
100
100
  hasInteractiveChildren: true,
101
- customDragHandle: true
101
+ customDragHandle: true,
102
+ usePortal: true
102
103
  }, rest), function (provided, state) {
103
104
  return (0, _react2.jsx)(_flex.EuiFlexGroup, {
104
105
  css: styles.euiDataGridColumnSorting__item,
@@ -12,8 +12,9 @@ var _classnames = _interopRequireDefault(require("classnames"));
12
12
  var _services = require("../../services");
13
13
  var _droppable = require("./droppable");
14
14
  var _draggable = require("./draggable.styles");
15
+ var _portal = require("../portal");
15
16
  var _react2 = require("@emotion/react");
16
- var _excluded = ["customDragHandle", "draggableId", "isDragDisabled", "hasInteractiveChildren", "isRemovable", "index", "children", "className", "spacing", "style", "data-test-subj"];
17
+ var _excluded = ["customDragHandle", "draggableId", "isDragDisabled", "hasInteractiveChildren", "isRemovable", "usePortal", "index", "children", "className", "spacing", "style", "data-test-subj"];
17
18
  /*
18
19
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
19
20
  * or more contributor license agreements. Licensed under the Elastic License
@@ -42,6 +43,8 @@ var EuiDraggable = exports.EuiDraggable = function EuiDraggable(_ref) {
42
43
  hasInteractiveChildren = _ref$hasInteractiveCh === void 0 ? false : _ref$hasInteractiveCh,
43
44
  _ref$isRemovable = _ref.isRemovable,
44
45
  isRemovable = _ref$isRemovable === void 0 ? false : _ref$isRemovable,
46
+ _ref$usePortal = _ref.usePortal,
47
+ usePortal = _ref$usePortal === void 0 ? false : _ref$usePortal,
45
48
  index = _ref.index,
46
49
  children = _ref.children,
47
50
  className = _ref.className,
@@ -68,7 +71,7 @@ var EuiDraggable = exports.EuiDraggable = function EuiDraggable(_ref) {
68
71
  'euiDraggable__item-isDisabled': isDragDisabled
69
72
  });
70
73
  var DraggableElement = typeof children === 'function' ? children(provided, snapshot, rubric) : children;
71
- return (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)("div", _extends({}, provided.draggableProps, !customDragHandle ? provided.dragHandleProps : {}, {
74
+ var content = (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)("div", _extends({}, provided.draggableProps, !customDragHandle ? provided.dragHandleProps : {}, {
72
75
  ref: provided.innerRef,
73
76
  "data-test-subj": dataTestSubj,
74
77
  className: classes,
@@ -90,6 +93,7 @@ var EuiDraggable = exports.EuiDraggable = function EuiDraggable(_ref) {
90
93
  className: (0, _classnames.default)(classes, 'euiDraggable--clone'),
91
94
  css: cssStyles
92
95
  }, DraggableElement));
96
+ return isDragging && usePortal ? (0, _react2.jsx)(_portal.EuiPortal, null, content) : content;
93
97
  });
94
98
  };
95
99
  EuiDraggable.propTypes = {
@@ -111,6 +115,15 @@ EuiDraggable.propTypes = {
111
115
  * Whether the item is currently in a position to be removed
112
116
  */
113
117
  isRemovable: _propTypes.default.bool,
118
+ /**
119
+ * Whether the currently dragged item is cloned into a portal in the body. This settings will
120
+ * ensure that drag & drop still works as expected within stacking contexts (e.g. within `EuiFlyout`,
121
+ * `EuiModal` and `EuiPopover`).
122
+ *
123
+ * Make sure to apply styles directly to the Draggable content as relative styling from an outside
124
+ * scope might not be applied when the content is placed in a portal as the DOM structure changes.
125
+ */
126
+ usePortal: _propTypes.default.bool,
114
127
  /**
115
128
  * Adds padding to the draggable item
116
129
  */
@@ -74,10 +74,9 @@ var EuiPageHeaderContent = exports.EuiPageHeaderContent = function EuiPageHeader
74
74
  style = _ref.style,
75
75
  rest = _objectWithoutProperties(_ref, _excluded);
76
76
  var isResponsiveBreakpoint = (0, _services.useIsWithinBreakpoints)(['xs', 's'], !!responsive);
77
- var useTheme = (0, _services.useEuiTheme)();
78
77
  var classes = (0, _classnames.default)('euiPageHeaderContent', className);
79
- var pageHeaderStyles = (0, _page_header.euiPageHeaderStyles)(useTheme);
80
- var contentStyles = (0, _page_header_content.euiPageHeaderContentStyles)(useTheme);
78
+ var pageHeaderStyles = (0, _services.useEuiMemoizedStyles)(_page_header.euiPageHeaderStyles);
79
+ var contentStyles = (0, _services.useEuiMemoizedStyles)(_page_header_content.euiPageHeaderContentStyles);
81
80
  var styles = (0, _restrict_width.setStyleForRestrictedPageWidth)(restrictWidth, style);
82
81
  var paddingSides = 'vertical';
83
82
  var paddingSize = _paddingSize;
@@ -100,7 +99,7 @@ var EuiPageHeaderContent = exports.EuiPageHeaderContent = function EuiPageHeader
100
99
  }
101
100
  var blockPadding = (0, _global_styling.useEuiPaddingCSS)(paddingSides);
102
101
  var cssStyles = [contentStyles.euiPageHeaderContent, bottomBorder && pageHeaderStyles.border, blockPadding[paddingSize]];
103
- var childrenOnlyStyles = [contentStyles.flex, contentStyles[alignItems || 'center'], responsive === true && isResponsiveBreakpoint && contentStyles.responsive, responsive === 'reverse' && isResponsiveBreakpoint && contentStyles.responsiveReverse];
102
+ var childrenOnlyStyles = [contentStyles.childrenOnly.flex, contentStyles[alignItems || 'center'], isResponsiveBreakpoint && responsive && (responsive === 'reverse' ? contentStyles.childrenOnly.responsiveReverse : contentStyles.childrenOnly.responsive)];
104
103
 
105
104
  // Don't go any further if there's no other content than children
106
105
  if (onlyChildren) {
@@ -159,10 +158,10 @@ var EuiPageHeaderContent = exports.EuiPageHeaderContent = function EuiPageHeader
159
158
  }
160
159
  var childrenNode = children && (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_spacer.EuiSpacer, null), children);
161
160
  var bottomContentNode;
162
- if (childrenNode || tabsNode && pageTitleNode) {
161
+ if (tabsNode && pageTitleNode) {
163
162
  bottomContentNode = (0, _react2.jsx)("div", {
164
163
  className: "euiPageHeaderContent__bottom"
165
- }, childrenNode, pageTitleNode && tabsNode);
164
+ }, pageTitleNode && tabsNode);
166
165
  }
167
166
 
168
167
  /**
@@ -171,10 +170,14 @@ var EuiPageHeaderContent = exports.EuiPageHeaderContent = function EuiPageHeader
171
170
  */
172
171
  var leftSideOrder;
173
172
  if (tabsNode && !pageTitleNode) {
174
- leftSideOrder = (0, _react2.jsx)(_react.default.Fragment, null, tabsNode, descriptionNode);
173
+ leftSideOrder = (0, _react2.jsx)(_react.default.Fragment, null, tabsNode, descriptionNode, childrenNode);
175
174
  } else {
176
- leftSideOrder = (0, _react2.jsx)(_react.default.Fragment, null, pageTitleNode, descriptionNode);
175
+ leftSideOrder = (0, _react2.jsx)(_react.default.Fragment, null, pageTitleNode, descriptionNode, childrenNode);
177
176
  }
177
+ var leftSideFlexItem = (0, _react2.jsx)(_flex.EuiFlexItem, {
178
+ grow: 2,
179
+ css: contentStyles.euiPageHeaderContent__leftSideItems
180
+ }, leftSideOrder);
178
181
  var rightSideFlexItem;
179
182
  if (rightSideItems && rightSideItems.length) {
180
183
  var itemsToRender = isResponsiveBreakpoint ? rightSideItems : _toConsumableArray(rightSideItems).reverse();
@@ -184,32 +187,27 @@ var EuiPageHeaderContent = exports.EuiPageHeaderContent = function EuiPageHeader
184
187
  key: index
185
188
  }, item);
186
189
  });
187
- rightSideFlexItem = (0, _react2.jsx)(_flex.EuiFlexItem, {
188
- grow: false
189
- }, (0, _react2.jsx)(_flex.EuiFlexGroup, _extends({
190
- wrap: true,
191
- responsive: false
192
- }, rightSideGroupProps), rightSideFlexItems));
190
+ var _cssStyles = [contentStyles.euiPageHeaderContent__rightSideItems, rightSideGroupProps === null || rightSideGroupProps === void 0 ? void 0 : rightSideGroupProps.css];
191
+ rightSideFlexItem = (0, _react2.jsx)(_flex.EuiFlexGroup, _extends({
192
+ gutterSize: "l",
193
+ responsive: false,
194
+ wrap: true
195
+ }, rightSideGroupProps, {
196
+ css: _cssStyles
197
+ }), rightSideFlexItems);
193
198
  }
194
- return alignItems === 'top' || isResponsiveBreakpoint ? (0, _react2.jsx)("div", _extends({
195
- className: classes,
196
- css: cssStyles,
197
- style: styles
198
- }, rest), optionalBreadcrumbs, (0, _react2.jsx)(_flex.EuiFlexGroup, {
199
- responsive: !!responsive,
200
- className: "euiPageHeaderContent__top",
201
- alignItems: pageTitle ? 'flexStart' : 'baseline',
202
- gutterSize: "l"
203
- }, isResponsiveBreakpoint && responsive === 'reverse' ? (0, _react2.jsx)(_react.default.Fragment, null, rightSideFlexItem, (0, _react2.jsx)(_flex.EuiFlexItem, null, leftSideOrder)) : (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_flex.EuiFlexItem, null, leftSideOrder), rightSideFlexItem)), bottomContentNode) : (0, _react2.jsx)("div", _extends({
199
+ return (0, _react2.jsx)("div", _extends({
204
200
  className: classes,
205
201
  css: cssStyles,
206
202
  style: styles
207
203
  }, rest), optionalBreadcrumbs, (0, _react2.jsx)(_flex.EuiFlexGroup, {
208
204
  responsive: !!responsive,
205
+ css: contentStyles.euiPageHeaderContent__top,
209
206
  className: "euiPageHeaderContent__top",
210
- alignItems: alignItems === 'bottom' ? 'flexEnd' : alignItems,
211
- gutterSize: "l"
212
- }, (0, _react2.jsx)(_flex.EuiFlexItem, null, leftSideOrder, bottomContentNode), rightSideFlexItem));
207
+ alignItems: alignItems === 'bottom' ? 'flexEnd' : alignItems === 'top' ? 'flexStart' : alignItems,
208
+ gutterSize: "l",
209
+ wrap: true
210
+ }, isResponsiveBreakpoint && responsive === 'reverse' ? (0, _react2.jsx)(_react.default.Fragment, null, rightSideFlexItem, leftSideFlexItem) : (0, _react2.jsx)(_react.default.Fragment, null, leftSideFlexItem, rightSideFlexItem)), bottomContentNode);
213
211
  };
214
212
  EuiPageHeaderContent.propTypes = {
215
213
  className: _propTypes.default.string,
@@ -217,7 +215,8 @@ EuiPageHeaderContent.propTypes = {
217
215
  "data-test-subj": _propTypes.default.string,
218
216
  css: _propTypes.default.any,
219
217
  /**
220
- * The only option is on/off
218
+ * If not set, defaults to true if `tabs` are passed and render at the bottom of the page.
219
+ * Otherwise, defaults to false.
221
220
  */
222
221
  bottomBorder: _propTypes.default.bool,
223
222
  /**
@@ -237,8 +236,8 @@ EuiPageHeaderContent.propTypes = {
237
236
  alignItems: _propTypes.default.any,
238
237
  /**
239
238
  * Pass custom an array of content to this side usually up to 3 buttons.
240
- * The first button should be primary, usually with `fill` and will be visually displayed as the last item,
241
- * but first in the tab order
239
+ * The first button should be primary, usually with `fill`. At larger breakpoints, items will
240
+ * render from right to left, but will collapse vertically and render left to right on smaller mobile screens.
242
241
  */
243
242
  rightSideItems: _propTypes.default.arrayOf(_propTypes.default.node.isRequired),
244
243
  /**
@@ -14,6 +14,14 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
14
14
  * Side Public License, v 1.
15
15
  */
16
16
  var _ref = process.env.NODE_ENV === "production" ? {
17
+ name: "1574q9m-euiPageHeaderContent__top",
18
+ styles: "container-type:inline-size;label:euiPageHeaderContent__top;"
19
+ } : {
20
+ name: "1574q9m-euiPageHeaderContent__top",
21
+ styles: "container-type:inline-size;label:euiPageHeaderContent__top;",
22
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
23
+ };
24
+ var _ref2 = process.env.NODE_ENV === "production" ? {
17
25
  name: "1ajq27l-responsiveReverse",
18
26
  styles: "flex-direction:column-reverse;align-items:flex-start;label:responsiveReverse;"
19
27
  } : {
@@ -21,7 +29,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
21
29
  styles: "flex-direction:column-reverse;align-items:flex-start;label:responsiveReverse;",
22
30
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
23
31
  };
24
- var _ref2 = process.env.NODE_ENV === "production" ? {
32
+ var _ref3 = process.env.NODE_ENV === "production" ? {
25
33
  name: "177mkz8-responsive",
26
34
  styles: "flex-direction:column;align-items:flex-start;label:responsive;"
27
35
  } : {
@@ -29,7 +37,7 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
29
37
  styles: "flex-direction:column;align-items:flex-start;label:responsive;",
30
38
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
31
39
  };
32
- var _ref3 = process.env.NODE_ENV === "production" ? {
40
+ var _ref4 = process.env.NODE_ENV === "production" ? {
33
41
  name: "1uwc4oj-stretch",
34
42
  styles: "align-items:stretch;label:stretch;"
35
43
  } : {
@@ -37,7 +45,7 @@ var _ref3 = process.env.NODE_ENV === "production" ? {
37
45
  styles: "align-items:stretch;label:stretch;",
38
46
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
39
47
  };
40
- var _ref4 = process.env.NODE_ENV === "production" ? {
48
+ var _ref5 = process.env.NODE_ENV === "production" ? {
41
49
  name: "8391db-center",
42
50
  styles: "align-items:center;label:center;"
43
51
  } : {
@@ -45,7 +53,7 @@ var _ref4 = process.env.NODE_ENV === "production" ? {
45
53
  styles: "align-items:center;label:center;",
46
54
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
47
55
  };
48
- var _ref5 = process.env.NODE_ENV === "production" ? {
56
+ var _ref6 = process.env.NODE_ENV === "production" ? {
49
57
  name: "1msaet2-bottom",
50
58
  styles: "align-items:flex-end;label:bottom;"
51
59
  } : {
@@ -53,7 +61,7 @@ var _ref5 = process.env.NODE_ENV === "production" ? {
53
61
  styles: "align-items:flex-end;label:bottom;",
54
62
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
55
63
  };
56
- var _ref6 = process.env.NODE_ENV === "production" ? {
64
+ var _ref7 = process.env.NODE_ENV === "production" ? {
57
65
  name: "1gnwbvd-top",
58
66
  styles: "align-items:flex-start;label:top;"
59
67
  } : {
@@ -61,21 +69,25 @@ var _ref6 = process.env.NODE_ENV === "production" ? {
61
69
  styles: "align-items:flex-start;label:top;",
62
70
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
63
71
  };
64
- var euiPageHeaderContentStyles = exports.euiPageHeaderContentStyles = function euiPageHeaderContentStyles(_ref7) {
65
- var euiTheme = _ref7.euiTheme;
72
+ var euiPageHeaderContentStyles = exports.euiPageHeaderContentStyles = function euiPageHeaderContentStyles(_ref8) {
73
+ var euiTheme = _ref8.euiTheme;
66
74
  return {
67
75
  euiPageHeaderContent: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', '100%'), " ", (0, _global_styling.logicalCSS)('margin-horizontal', 'auto'), ";;label:euiPageHeaderContent;"),
68
76
  // alignItems
69
- top: _ref6,
70
- bottom: _ref5,
71
- center: _ref4,
72
- stretch: _ref3,
77
+ top: _ref7,
78
+ bottom: _ref6,
79
+ center: _ref5,
80
+ stretch: _ref4,
73
81
  // Children only (legacy) expects EuiPageHeaderSections as children
74
- flex: /*#__PURE__*/(0, _react.css)("flex-direction:row;display:flex;gap:", euiTheme.size.base, ";justify-content:space-between;;label:flex;"),
75
- // Responsive (what to do at the smaller breakpoint)
76
- responsive: _ref2,
77
- responsiveReverse: _ref,
78
- // Content
82
+ childrenOnly: {
83
+ flex: /*#__PURE__*/(0, _react.css)("flex-direction:row;display:flex;gap:", euiTheme.size.base, ";justify-content:space-between;;label:flex;"),
84
+ // Responsive (what to do at the smaller breakpoint)
85
+ responsive: _ref3,
86
+ responsiveReverse: _ref2
87
+ },
88
+ euiPageHeaderContent__top: _ref,
89
+ euiPageHeaderContent__leftSideItems: /*#__PURE__*/(0, _react.css)("@container (max-width: ", euiTheme.breakpoint.m, "px){", (0, _global_styling.logicalCSS)('min-width', '50%'), ";};label:euiPageHeaderContent__leftSideItems;"),
90
+ euiPageHeaderContent__rightSideItems: /*#__PURE__*/(0, _react.css)("flex:0 1 auto;align-content:flex-start;@container (min-width: ", euiTheme.breakpoint.m, "px){", (0, _global_styling.logicalCSS)('max-width', '50%'), " justify-content:flex-end;};label:euiPageHeaderContent__rightSideItems;"),
79
91
  euiPageHeaderContent__titleIcon: /*#__PURE__*/(0, _react.css)("position:relative;", (0, _global_styling.logicalCSS)('top', "-".concat(euiTheme.size.xs)), " ", (0, _global_styling.logicalCSS)('margin-right', euiTheme.size.base), ";;label:euiPageHeaderContent__titleIcon;")
80
92
  };
81
93
  };
@@ -653,6 +653,8 @@ EuiPopover.propTypes = {
653
653
  /**
654
654
  * Must be set to true if using `EuiDragDropContext` within a popover,
655
655
  * otherwise your nested drag & drop will have incorrect positioning
656
+ *
657
+ * @deprecated - use `usePortal` prop on children `EuiDraggable` components instead.
656
658
  */
657
659
  hasDragDrop: _propTypes.default.bool,
658
660
  /**
@@ -22,10 +22,10 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } /*
22
22
  var COLOR_MODE_MEDIA_QUERY = exports.COLOR_MODE_MEDIA_QUERY = '(prefers-color-scheme: dark)';
23
23
  var EuiSystemColorModeProvider = exports.EuiSystemColorModeProvider = function EuiSystemColorModeProvider(_ref) {
24
24
  var children = _ref.children;
25
- // Use optional chaining here for SSR or test environments
25
+ // Check typeof and use optional chaining for SSR or test environments
26
26
  var _useState = (0, _react.useState)(function () {
27
- var _window, _window$matchMedia;
28
- return (_window = window) !== null && _window !== void 0 && (_window$matchMedia = _window.matchMedia) !== null && _window$matchMedia !== void 0 && _window$matchMedia.call(_window, COLOR_MODE_MEDIA_QUERY).matches ? 'DARK' : 'LIGHT';
27
+ var _window$matchMedia, _window;
28
+ return typeof window !== 'undefined' && (_window$matchMedia = (_window = window).matchMedia) !== null && _window$matchMedia !== void 0 && (_window$matchMedia = _window$matchMedia.call(_window, COLOR_MODE_MEDIA_QUERY)) !== null && _window$matchMedia !== void 0 && _window$matchMedia.matches ? 'DARK' : 'LIGHT';
29
29
  }),
30
30
  _useState2 = _slicedToArray(_useState, 2),
31
31
  systemColorMode = _useState2[0],