@elastic/eui 87.1.0 → 88.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 (159) hide show
  1. package/dist/eui_charts_theme.js.map +1 -1
  2. package/dist/eui_theme_dark.css +0 -388
  3. package/dist/eui_theme_dark.min.css +1 -1
  4. package/dist/eui_theme_light.css +0 -388
  5. package/dist/eui_theme_light.min.css +1 -1
  6. package/es/components/color_picker/color_palette_display/color_palette_display.js +3 -6
  7. package/es/components/color_picker/color_palette_display/color_palette_display_fixed.js +2 -5
  8. package/es/components/color_picker/color_palette_display/color_palette_display_gradient.js +2 -5
  9. package/es/components/color_picker/color_palette_picker/color_palette_picker.js +3 -3
  10. package/es/components/color_picker/color_stops/color_stops.js +11 -0
  11. package/es/components/control_bar/control_bar.js +11 -0
  12. package/es/components/datagrid/controls/keyboard_shortcuts.js +0 -1
  13. package/es/components/description_list/description_list.js +28 -12
  14. package/es/components/description_list/description_list.styles.js +19 -6
  15. package/es/components/description_list/description_list_context.js +1 -1
  16. package/es/components/description_list/description_list_description.js +3 -9
  17. package/es/components/description_list/description_list_description.styles.js +3 -9
  18. package/es/components/description_list/description_list_title.js +7 -4
  19. package/es/components/description_list/description_list_title.styles.js +3 -6
  20. package/es/components/description_list/description_list_types.js +4 -2
  21. package/es/components/key_pad_menu/key_pad_menu_item.js +37 -34
  22. package/es/components/key_pad_menu/key_pad_menu_item.styles.js +41 -0
  23. package/es/components/notification/notification_event.js +10 -0
  24. package/es/components/page_template/page_template.js +2 -1
  25. package/es/components/resizable_container/index.js +2 -1
  26. package/es/components/resizable_container/resizable_button.js +81 -50
  27. package/es/components/resizable_container/resizable_button.styles.js +66 -0
  28. package/es/components/resizable_container/resizable_collapse_button.js +24 -14
  29. package/es/components/resizable_container/resizable_collapse_button.styles.js +85 -0
  30. package/es/components/steps/step.styles.js +5 -5
  31. package/es/components/suggest/suggest.js +16 -0
  32. package/es/components/suggest/suggest_item.js +12 -0
  33. package/es/services/accessibility/html_id_generator.js +19 -3
  34. package/es/services/color_picker/color_picker.js +4 -0
  35. package/es/themes/amsterdam/global_styling/mixins/shadow.js +0 -1
  36. package/eui.d.ts +2277 -2090
  37. package/i18ntokens.json +154 -154
  38. package/lib/components/color_picker/color_palette_display/color_palette_display.js +3 -6
  39. package/lib/components/color_picker/color_palette_display/color_palette_display_fixed.js +2 -5
  40. package/lib/components/color_picker/color_palette_display/color_palette_display_gradient.js +2 -5
  41. package/lib/components/color_picker/color_palette_picker/color_palette_picker.js +3 -3
  42. package/lib/components/color_picker/color_stops/color_stops.js +10 -1
  43. package/lib/components/control_bar/control_bar.js +10 -1
  44. package/lib/components/datagrid/controls/keyboard_shortcuts.js +0 -1
  45. package/lib/components/description_list/description_list.js +31 -12
  46. package/lib/components/description_list/description_list.styles.js +24 -13
  47. package/lib/components/description_list/description_list_context.js +1 -1
  48. package/lib/components/description_list/description_list_description.js +2 -8
  49. package/lib/components/description_list/description_list_description.styles.js +2 -8
  50. package/lib/components/description_list/description_list_title.js +7 -4
  51. package/lib/components/description_list/description_list_title.styles.js +2 -5
  52. package/lib/components/description_list/description_list_types.js +8 -4
  53. package/lib/components/key_pad_menu/key_pad_menu_item.js +40 -34
  54. package/lib/components/key_pad_menu/key_pad_menu_item.styles.js +49 -0
  55. package/lib/components/notification/notification_event.js +9 -0
  56. package/lib/components/page_template/page_template.js +2 -1
  57. package/lib/components/resizable_container/index.js +8 -1
  58. package/lib/components/resizable_container/resizable_button.js +83 -51
  59. package/lib/components/resizable_container/resizable_button.styles.js +71 -0
  60. package/lib/components/resizable_container/resizable_collapse_button.js +24 -14
  61. package/lib/components/resizable_container/resizable_collapse_button.styles.js +90 -0
  62. package/lib/components/steps/step.styles.js +5 -5
  63. package/lib/components/suggest/suggest.js +16 -0
  64. package/lib/components/suggest/suggest_item.js +11 -0
  65. package/lib/services/accessibility/html_id_generator.js +21 -2
  66. package/lib/services/color_picker/color_picker.js +4 -0
  67. package/lib/themes/amsterdam/global_styling/mixins/shadow.js +0 -1
  68. package/optimize/es/components/color_picker/color_stops/color_stops.js +11 -0
  69. package/optimize/es/components/control_bar/control_bar.js +11 -0
  70. package/optimize/es/components/datagrid/controls/keyboard_shortcuts.js +0 -1
  71. package/optimize/es/components/description_list/description_list.js +20 -10
  72. package/optimize/es/components/description_list/description_list.styles.js +19 -6
  73. package/optimize/es/components/description_list/description_list_context.js +1 -1
  74. package/optimize/es/components/description_list/description_list_description.js +3 -9
  75. package/optimize/es/components/description_list/description_list_description.styles.js +3 -9
  76. package/optimize/es/components/description_list/description_list_title.js +7 -4
  77. package/optimize/es/components/description_list/description_list_title.styles.js +3 -6
  78. package/optimize/es/components/description_list/description_list_types.js +4 -2
  79. package/optimize/es/components/key_pad_menu/key_pad_menu_item.js +37 -34
  80. package/optimize/es/components/key_pad_menu/key_pad_menu_item.styles.js +41 -0
  81. package/optimize/es/components/notification/notification_event.js +10 -0
  82. package/optimize/es/components/page_template/page_template.js +2 -1
  83. package/optimize/es/components/resizable_container/index.js +2 -1
  84. package/optimize/es/components/resizable_container/resizable_button.js +61 -44
  85. package/optimize/es/components/resizable_container/resizable_button.styles.js +66 -0
  86. package/optimize/es/components/resizable_container/resizable_collapse_button.js +19 -11
  87. package/optimize/es/components/resizable_container/resizable_collapse_button.styles.js +85 -0
  88. package/optimize/es/components/steps/step.styles.js +5 -5
  89. package/optimize/es/components/suggest/suggest.js +16 -0
  90. package/optimize/es/components/suggest/suggest_item.js +12 -0
  91. package/optimize/es/services/accessibility/html_id_generator.js +19 -3
  92. package/optimize/es/services/color_picker/color_picker.js +4 -0
  93. package/optimize/es/themes/amsterdam/global_styling/mixins/shadow.js +0 -1
  94. package/optimize/lib/components/color_picker/color_stops/color_stops.js +10 -1
  95. package/optimize/lib/components/control_bar/control_bar.js +10 -1
  96. package/optimize/lib/components/datagrid/controls/keyboard_shortcuts.js +0 -1
  97. package/optimize/lib/components/description_list/description_list.js +23 -10
  98. package/optimize/lib/components/description_list/description_list.styles.js +24 -13
  99. package/optimize/lib/components/description_list/description_list_context.js +1 -1
  100. package/optimize/lib/components/description_list/description_list_description.js +2 -8
  101. package/optimize/lib/components/description_list/description_list_description.styles.js +2 -8
  102. package/optimize/lib/components/description_list/description_list_title.js +7 -4
  103. package/optimize/lib/components/description_list/description_list_title.styles.js +2 -5
  104. package/optimize/lib/components/description_list/description_list_types.js +8 -4
  105. package/optimize/lib/components/key_pad_menu/key_pad_menu_item.js +40 -34
  106. package/optimize/lib/components/key_pad_menu/key_pad_menu_item.styles.js +49 -0
  107. package/optimize/lib/components/notification/notification_event.js +9 -0
  108. package/optimize/lib/components/page_template/page_template.js +2 -1
  109. package/optimize/lib/components/resizable_container/index.js +8 -1
  110. package/optimize/lib/components/resizable_container/resizable_button.js +63 -45
  111. package/optimize/lib/components/resizable_container/resizable_button.styles.js +71 -0
  112. package/optimize/lib/components/resizable_container/resizable_collapse_button.js +19 -11
  113. package/optimize/lib/components/resizable_container/resizable_collapse_button.styles.js +90 -0
  114. package/optimize/lib/components/steps/step.styles.js +5 -5
  115. package/optimize/lib/components/suggest/suggest.js +16 -0
  116. package/optimize/lib/components/suggest/suggest_item.js +11 -0
  117. package/optimize/lib/services/accessibility/html_id_generator.js +21 -2
  118. package/optimize/lib/services/color_picker/color_picker.js +4 -0
  119. package/optimize/lib/themes/amsterdam/global_styling/mixins/shadow.js +0 -1
  120. package/package.json +18 -18
  121. package/src/components/index.scss +0 -2
  122. package/src/themes/amsterdam/overrides/_index.scss +0 -1
  123. package/test-env/components/color_picker/color_palette_display/color_palette_display.js +3 -6
  124. package/test-env/components/color_picker/color_palette_display/color_palette_display_fixed.js +2 -5
  125. package/test-env/components/color_picker/color_palette_display/color_palette_display_gradient.js +2 -5
  126. package/test-env/components/color_picker/color_palette_picker/color_palette_picker.js +3 -3
  127. package/test-env/components/color_picker/color_stops/color_stops.js +10 -1
  128. package/test-env/components/control_bar/control_bar.js +10 -1
  129. package/test-env/components/datagrid/controls/keyboard_shortcuts.js +0 -1
  130. package/test-env/components/description_list/description_list.js +31 -12
  131. package/test-env/components/description_list/description_list.styles.js +24 -13
  132. package/test-env/components/description_list/description_list_context.js +1 -1
  133. package/test-env/components/description_list/description_list_description.js +2 -8
  134. package/test-env/components/description_list/description_list_description.styles.js +2 -8
  135. package/test-env/components/description_list/description_list_title.js +7 -4
  136. package/test-env/components/description_list/description_list_title.styles.js +2 -5
  137. package/test-env/components/description_list/description_list_types.js +8 -4
  138. package/test-env/components/key_pad_menu/key_pad_menu_item.js +40 -34
  139. package/test-env/components/key_pad_menu/key_pad_menu_item.styles.js +49 -0
  140. package/test-env/components/notification/notification_event.js +9 -0
  141. package/test-env/components/page_template/page_template.js +2 -1
  142. package/test-env/components/resizable_container/index.js +8 -1
  143. package/test-env/components/resizable_container/resizable_button.js +83 -51
  144. package/test-env/components/resizable_container/resizable_button.styles.js +71 -0
  145. package/test-env/components/resizable_container/resizable_collapse_button.js +19 -14
  146. package/test-env/components/resizable_container/resizable_collapse_button.styles.js +90 -0
  147. package/test-env/components/steps/step.styles.js +5 -5
  148. package/test-env/components/suggest/suggest.js +16 -0
  149. package/test-env/components/suggest/suggest_item.js +11 -0
  150. package/test-env/services/color_picker/color_picker.js +4 -0
  151. package/test-env/themes/amsterdam/global_styling/mixins/shadow.js +0 -1
  152. package/src/components/key_pad_menu/_index.scss +0 -5
  153. package/src/components/key_pad_menu/_key_pad_menu_item.scss +0 -123
  154. package/src/components/key_pad_menu/_variables.scss +0 -2
  155. package/src/components/resizable_container/_index.scss +0 -3
  156. package/src/components/resizable_container/_resizable_button.scss +0 -129
  157. package/src/components/resizable_container/_resizable_collapse_button.scss +0 -145
  158. package/src/components/resizable_container/_variables.scss +0 -2
  159. package/src/themes/amsterdam/overrides/_key_pad_menu.scss +0 -46
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.euiResizableCollapseButtonStyles = void 0;
7
+ var _react = require("@emotion/react");
8
+ var _global_styling = require("../../global_styling");
9
+ var _amsterdam = require("../../themes/amsterdam");
10
+ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } /*
11
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
12
+ * or more contributor license agreements. Licensed under the Elastic License
13
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
14
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
15
+ * Side Public License, v 1.
16
+ */
17
+ var _ref = process.env.NODE_ENV === "production" ? {
18
+ name: "fuwsll-euiResizableCollapseButton",
19
+ styles: "z-index:2;position:absolute;&:focus{animation:none;};label:euiResizableCollapseButton;"
20
+ } : {
21
+ name: "fuwsll-euiResizableCollapseButton",
22
+ styles: "z-index:2;position:absolute;&:focus{animation:none;};label:euiResizableCollapseButton;",
23
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
24
+ };
25
+ var euiResizableCollapseButtonStyles = function euiResizableCollapseButtonStyles(euiThemeContext) {
26
+ var euiTheme = euiThemeContext.euiTheme;
27
+ var buttonSize = euiTheme.size.l;
28
+ var centeringOffset = (0, _global_styling.mathWithUnits)(buttonSize, function (x) {
29
+ return x / -2;
30
+ }); // Use negative margins instead of transforms to avoid having to override EuiButtonIcon's CSS
31
+ var buttonOffset = euiTheme.size.base;
32
+ return {
33
+ euiResizableCollapseButton: _ref,
34
+ collapsible: {
35
+ collapsible: /*#__PURE__*/(0, _react.css)("background:", euiTheme.colors.emptyShade, ";", (0, _amsterdam.euiShadowXSmall)(euiThemeContext), " &:focus{", (0, _amsterdam.euiSlightShadowHover)(euiThemeContext), ";};label:collapsible;"),
36
+ horizontal: {
37
+ after: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('right', 0), " ", (0, _global_styling.logicalCSS)('margin-right', centeringOffset), ";;label:after;"),
38
+ before: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('left', 0), " ", (0, _global_styling.logicalCSS)('margin-left', centeringOffset), ";;label:before;"),
39
+ middle: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('top', '50%'), " ", (0, _global_styling.logicalCSS)('margin-top', centeringOffset), ";;label:middle;"),
40
+ top: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('top', 0), " ", (0, _global_styling.logicalCSS)('margin-top', buttonOffset), ";;label:top;"),
41
+ bottom: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('bottom', 0), " ", (0, _global_styling.logicalCSS)('margin-bottom', buttonOffset), ";;label:bottom;"),
42
+ // `left/right` aren't valid positions for the horizontal direction,
43
+ // so we're using getters to fall back to the `middle` CSS
44
+ get left() {
45
+ return this.middle;
46
+ },
47
+ get right() {
48
+ return this.middle;
49
+ }
50
+ },
51
+ vertical: {
52
+ after: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('top', '100%'), " ", (0, _global_styling.logicalCSS)('margin-top', centeringOffset), ";;label:after;"),
53
+ before: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('bottom', '100%'), " ", (0, _global_styling.logicalCSS)('margin-bottom', centeringOffset), ";;label:before;"),
54
+ middle: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('left', '50%'), " ", (0, _global_styling.logicalCSS)('margin-left', centeringOffset), ";;label:middle;"),
55
+ left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('left', 0), " ", (0, _global_styling.logicalCSS)('margin-left', buttonOffset), ";;label:left;"),
56
+ right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('right', 0), " ", (0, _global_styling.logicalCSS)('margin-right', buttonOffset), ";;label:right;"),
57
+ // `top/bottom` aren't valid positions for the horizontal direction,
58
+ // so we're using getters to fall back to the `middle` CSS
59
+ get top() {
60
+ return this.middle;
61
+ },
62
+ get bottom() {
63
+ return this.middle;
64
+ }
65
+ }
66
+ },
67
+ collapsed: {
68
+ // When collapsed, the button itself is the full collapsed area
69
+ // and we use flex to align the icon within
70
+ collapsed: /*#__PURE__*/(0, _react.css)("border-radius:0;", (0, _global_styling.logicalCSS)('top', 0), ";;label:collapsed;"),
71
+ horizontal: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', '100%'), ";;label:horizontal;"),
72
+ vertical: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', '100%'), ";;label:vertical;"),
73
+ horizontalPositions: {
74
+ top: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('padding-top', buttonOffset), " align-items:flex-start;;label:top;"),
75
+ bottom: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('padding-bottom', buttonOffset), " align-items:flex-end;;label:bottom;"),
76
+ middle: /*#__PURE__*/(0, _react.css)(";label:middle;"),
77
+ left: /*#__PURE__*/(0, _react.css)(";label:left;"),
78
+ right: /*#__PURE__*/(0, _react.css)(";label:right;")
79
+ },
80
+ verticalPositions: {
81
+ left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('padding-left', buttonOffset), " justify-content:flex-start;;label:left;"),
82
+ right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('padding-right', buttonOffset), " justify-content:flex-end;;label:right;"),
83
+ middle: /*#__PURE__*/(0, _react.css)(";label:middle;"),
84
+ top: /*#__PURE__*/(0, _react.css)(";label:top;"),
85
+ bottom: /*#__PURE__*/(0, _react.css)(";label:bottom;")
86
+ }
87
+ }
88
+ };
89
+ };
90
+ exports.euiResizableCollapseButtonStyles = euiResizableCollapseButtonStyles;
@@ -48,7 +48,7 @@ exports.euiStepStyles = euiStepStyles;
48
48
  var euiStepContentStyles = function euiStepContentStyles(euiThemeContext) {
49
49
  var euiTheme = euiThemeContext.euiTheme;
50
50
  var euiStep = euiStepVariables(euiTheme);
51
- var styles = {
51
+ return {
52
52
  euiStep__content: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('margin-top', euiTheme.size.s), " ", (0, _global_styling.logicalCSS)('padding-top', euiTheme.size.base), " ", (0, _global_styling.logicalCSS)('padding-bottom', (0, _global_styling.mathWithUnits)([euiTheme.size.xl, euiTheme.size.s], function (x, y) {
53
53
  return x + y;
54
54
  })), " ", (0, _global_styling.logicalCSS)('padding-right', euiTheme.size.base), ";;label:euiStep__content;"),
@@ -58,16 +58,16 @@ var euiStepContentStyles = function euiStepContentStyles(euiThemeContext) {
58
58
  })), (0, _global_styling.logicalCSS)('margin-left', (0, _global_styling.mathWithUnits)(euiStep.numberSize, function (x) {
59
59
  return x / 2;
60
60
  })), ";;label:m;"),
61
- s: /*#__PURE__*/(0, _react.css)(";label:s;"),
62
- // s is the same as m, so we'll programmatically duplicate it below
61
+ // `s` is the same as `m` - use a getter to duplicate its content
62
+ get s() {
63
+ return this.m;
64
+ },
63
65
  xs: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('padding-left', (0, _global_styling.mathWithUnits)([euiStep.numberXSSize, euiStep.numberMargin], function (x, y) {
64
66
  return x / 2 + y;
65
67
  })), (0, _global_styling.logicalCSS)('margin-left', (0, _global_styling.mathWithUnits)(euiStep.numberXSSize, function (x) {
66
68
  return x / 2;
67
69
  })), ";;label:xs;")
68
70
  };
69
- styles.s = styles.m;
70
- return styles;
71
71
  };
72
72
  exports.euiStepContentStyles = euiStepContentStyles;
73
73
  var euiStepTitleStyles = function euiStepTitleStyles(euiThemeContext) {
@@ -49,6 +49,22 @@ var statusMap = {
49
49
 
50
50
  // keys of _EuiSuggestItemPropsBase
51
51
  var suggestItemPropsKeys = ['label', 'type', 'description', 'labelDisplay', 'labelWidth', 'descriptionDisplay'];
52
+
53
+ /**
54
+ * @deprecated
55
+ */
56
+
57
+ /**
58
+ * @deprecated
59
+ */
60
+
61
+ /**
62
+ * @deprecated - EuiSuggest is scheduled for deprecation due to low internal usage and high
63
+ * overlap with other existing EUI components. We recommend using EuiSelectable instead,
64
+ * or copying this component into your own application for usage if necessary.
65
+ *
66
+ * The component will be permanently removed in October 2023.
67
+ */
52
68
  var EuiSuggest = function EuiSuggest(_ref) {
53
69
  var onItemClick = _ref.onItemClick,
54
70
  onBlur = _ref.onBlur,
@@ -21,6 +21,9 @@ var _excluded = ["className", "label", "type", "labelWidth", "description", "tru
21
21
  * in compliance with, at your election, the Elastic License 2.0 or the Server
22
22
  * Side Public License, v 1.
23
23
  */
24
+ /**
25
+ * @deprecated
26
+ */
24
27
  var colorToClassNameMap = {
25
28
  tint0: 'euiSuggestItem__type--tint0',
26
29
  tint1: 'euiSuggestItem__type--tint1',
@@ -35,6 +38,14 @@ var colorToClassNameMap = {
35
38
  tint10: 'euiSuggestItem__type--tint10'
36
39
  };
37
40
  var COLORS = (0, _common.keysOf)(colorToClassNameMap);
41
+
42
+ /**
43
+ * @deprecated - EuiSuggest is scheduled for deprecation due to low internal usage and high
44
+ * overlap with other existing EUI components. We recommend using EuiSelectable instead,
45
+ * or copying this component into your own application for usage if necessary.
46
+ *
47
+ * The component will be permanently removed in October 2023.
48
+ */
38
49
  exports.COLORS = COLORS;
39
50
  var EuiSuggestItem = function EuiSuggestItem(_ref) {
40
51
  var className = _ref.className,
@@ -20,6 +20,10 @@ var generateRandomColor = function generateRandomColor() {
20
20
  "#".concat(Math.floor(Math.random() * 16777215).toString(16))
21
21
  );
22
22
  };
23
+
24
+ /**
25
+ * @deprecated
26
+ */
23
27
  var useColorStopsState = function useColorStopsState() {
24
28
  var useRandomColor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
25
29
  var initialColorStops = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [{
@@ -87,7 +87,6 @@ var euiShadowXLarge = function euiShadowXLarge(_ref9) {
87
87
 
88
88
  /**
89
89
  * slightShadowHover
90
- * TODO: I think this is only used by panels/cards in the Amsterdam theme, move there
91
90
  */
92
91
  exports.euiShadowXLarge = euiShadowXLarge;
93
92
  var euiSlightShadowHover = function euiSlightShadowHover(_ref11) {
@@ -1,5 +0,0 @@
1
- // Key pad is a phone like nav comprised of an svg icon and a title.
2
-
3
- @import 'variables';
4
-
5
- @import 'key_pad_menu_item';
@@ -1,123 +0,0 @@
1
- /**
2
- * 1. If this class is applied to a button, we need to override the Chrome default font.
3
- * 2. If it has a BetaBadge, make sure only the first letter shows
4
- */
5
- .euiKeyPadMenuItem {
6
- @include euiFont; /* 1 */
7
- display: block;
8
- padding: $euiSizeXS;
9
- height: $euiKeyPadMenuSize;
10
- width: $euiKeyPadMenuSize;
11
- border: $euiBorderThin;
12
- border-color: transparent;
13
- border-radius: $euiBorderRadius;
14
- color: $euiTextColor; // Override possible link color
15
-
16
- @include euiCanAnimate {
17
- transition:
18
- background-color $euiAnimSpeedFast ease-in,
19
- border-color $euiAnimSpeedFast ease-in,
20
- box-shadow $euiAnimSpeedFast ease-in;
21
- }
22
-
23
- // Focus and Hover states (when not disabled)
24
- &:not(.euiKeyPadMenuItem-isDisabled) {
25
- &:hover,
26
- &:focus,
27
- &:focus-within {
28
- @include euiHoverState;
29
- @include euiSlightShadow;
30
- border-color: $euiBorderColor;
31
-
32
- @include euiCanAnimate {
33
- .euiKeyPadMenuItem__icon {
34
- transform: translateY(0);
35
- }
36
- }
37
- }
38
-
39
- &:focus {
40
- @include euiFocusState;
41
- }
42
- }
43
-
44
- // Disabled state
45
- &.euiKeyPadMenuItem-isDisabled {
46
- @include euiDisabledState;
47
-
48
- .euiKeyPadMenuItem__icon {
49
- filter: grayscale(100%);
50
-
51
- svg * { // stylelint-disable-line max-nesting-depth
52
- fill: $euiButtonColorDisabledText;
53
- }
54
- }
55
- }
56
-
57
- // Selected state (when not disabled)
58
- &.euiKeyPadMenuItem-isSelected:not(.euiKeyPadMenuItem-isDisabled) {
59
- @include euiSlightShadow;
60
- color: $euiTitleColor;
61
- }
62
-
63
- // Selected (even if disabled)
64
- &.euiKeyPadMenuItem-isSelected {
65
- border-color: $euiBorderColor;
66
- }
67
-
68
- // Hide the input if not selected, or being interacted with
69
- &:not(:hover):not(:focus):not(:focus-within):not(.euiKeyPadMenuItem-isSelected),
70
- // Also specifically if disabled but not selected
71
- &.euiKeyPadMenuItem-isDisabled:not(.euiKeyPadMenuItem-isSelected) {
72
- .euiKeyPadMenuItem__checkableInput {
73
- @include euiScreenReaderOnly;
74
- }
75
- }
76
- }
77
-
78
- .euiKeyPadMenuItem__inner {
79
- width: 100%;
80
- height: 100%;
81
- display: flex;
82
- flex-direction: column;
83
- align-items: center;
84
- justify-content: center;
85
- position: relative;
86
-
87
- .euiKeyPadMenuItem__checkableInput {
88
- transform: scale(.75);
89
- transform-origin: top right;
90
- }
91
-
92
- .euiKeyPadMenuItem__checkableInput,
93
- .euiKeyPadMenuItem__betaBadge {
94
- position: absolute;
95
- top: $euiSizeXS;
96
- right: $euiSizeXS;
97
- z-index: 3;
98
- }
99
- }
100
-
101
- .euiKeyPadMenuItem__icon {
102
- transition: transform $euiAnimSpeedNormal $euiAnimSlightBounce;
103
- margin-bottom: $euiSizeM;
104
- transform: translateY(2px);
105
- }
106
-
107
- .euiKeyPadMenuItem__label {
108
- font-size: $euiFontSizeXS;
109
- font-weight: $euiFontWeightMedium;
110
- line-height: $euiSize;
111
- text-align: center;
112
- }
113
-
114
- .euiKeyPadMenuItem--checkable.euiKeyPadMenuItem-isSelected:not(.euiKeyPadMenuItem-isDisabled) {
115
- &,
116
- &:hover,
117
- &:focus,
118
- &:focus-within {
119
- @include euiFocusBackground;
120
- color: $euiColorPrimaryText;
121
- border-color: $euiColorPrimaryText;
122
- }
123
- }
@@ -1,2 +0,0 @@
1
- $euiKeyPadMenuSize: $euiSize * 6 !default;
2
- $euiKeyPadMenuMarginSize: $euiSizeXS !default;
@@ -1,3 +0,0 @@
1
- @import 'variables';
2
- @import 'resizable_button';
3
- @import 'resizable_collapse_button';
@@ -1,129 +0,0 @@
1
- // Mimics the "grab" icon with CSS psuedo-elements.
2
- // The "grab" icon transforms into a 2px straight line on :hover and :focus.
3
- .euiResizableButton {
4
- position: relative;
5
- flex-shrink: 0;
6
- z-index: 1;
7
-
8
- &::before,
9
- &::after {
10
- content: '';
11
- display: block;
12
- position: absolute;
13
- top: 50%;
14
- left: 50%;
15
- background-color: $euiColorDarkestShade;
16
- transition:
17
- width $euiResizableButtonTransitionSpeed ease,
18
- height $euiResizableButtonTransitionSpeed ease,
19
- transform $euiResizableButtonTransitionSpeed ease,
20
- background-color $euiResizableButtonTransitionSpeed ease
21
- ;
22
- }
23
-
24
- &.euiResizableButton--horizontal {
25
- cursor: col-resize;
26
- width: $euiResizableButtonSize;
27
- margin-left: -($euiResizableButtonSize / 2);
28
- margin-right: -($euiResizableButtonSize / 2);
29
-
30
- &::before,
31
- &::after {
32
- width: 1px;
33
- height: $euiSizeM;
34
- }
35
-
36
- &::before {
37
- transform: translate(-2px, -50%);
38
- }
39
-
40
- &::after {
41
- transform: translate(1px, -50%);
42
- }
43
- }
44
-
45
- &.euiResizableButton--vertical {
46
- cursor: row-resize;
47
- height: $euiResizableButtonSize;
48
- margin-top: -($euiResizableButtonSize / 2);
49
- margin-bottom: -($euiResizableButtonSize / 2);
50
-
51
- &::before,
52
- &::after {
53
- width: $euiSizeM;
54
- height: 1px;
55
- }
56
-
57
- &::before {
58
- transform: translate(-50%, -2px);
59
- }
60
-
61
- &::after {
62
- transform: translate(-50%, 1px);
63
- }
64
- }
65
-
66
- // Lighten the "grab" icon on :hover
67
- &:hover:not(:disabled) {
68
- &::before,
69
- &::after {
70
- background-color: $euiColorMediumShade;
71
- transition-delay: $euiResizableButtonTransitionSpeed; // Delay transition on hover so animation is not accidentally triggered on mouse over
72
- }
73
- }
74
-
75
- // Add a transparent background to the container and emphasis the "grab" icon with primary color on :focus
76
- &:focus:not(:disabled) {
77
- background-color: transparentize($euiColorPrimary, .9);
78
-
79
- &::before,
80
- &::after {
81
- background-color: $euiColorPrimary;
82
- // Overrides default transition so that "grab" icon background-color doesn't animate
83
- transition:
84
- width $euiResizableButtonTransitionSpeed ease,
85
- height $euiResizableButtonTransitionSpeed ease,
86
- transform $euiResizableButtonTransitionSpeed ease
87
- ;
88
- transition-delay: $euiResizableButtonTransitionSpeed / 2;
89
- }
90
- }
91
-
92
- // Morph the "grab" icon into a fluid 2px straight line on :hover and :focus
93
- &:hover:not(:disabled),
94
- &:focus:not(:disabled) {
95
- &.euiResizableButton--horizontal {
96
- &::before,
97
- &::after {
98
- height: 100%;
99
- }
100
-
101
- &::before {
102
- transform: translate(-1px, -50%);
103
- }
104
-
105
- &::after {
106
- transform: translate(0, -50%);
107
- }
108
- }
109
-
110
- &.euiResizableButton--vertical {
111
- &::before,
112
- &::after {
113
- width: 100%;
114
- }
115
-
116
- &::before {
117
- transform: translate(-50%, -1px);
118
- }
119
-
120
- &::after {
121
- transform: translate(-50%, 0);
122
- }
123
- }
124
- }
125
-
126
- &:disabled {
127
- display: none !important; // stylelint-disable-line declaration-no-important
128
- }
129
- }
@@ -1,145 +0,0 @@
1
- // This file has lots of modifiers and is somewhat nesty by nature because of positioning
2
- // stylelint-disable max-nesting-depth
3
-
4
- /**
5
- * 1. The default position of the button should always be `middle`, so
6
- * those position styles aren't restricted to a class
7
- * 2. When collpsed, the button itself is the full collapsed area and we use
8
- * flex to align the icon within
9
- */
10
-
11
- .euiResizableToggleButton {
12
- @include euiSlightShadow;
13
- position: absolute;
14
- z-index: 2;
15
- // Remove animations from EuiButtonIcon because of the custom transforms
16
- animation: none !important; // stylelint-disable-line declaration-no-important
17
- // Remove transition from EuiButtonIcon because of the custom transforms
18
- transition-property: background, box-shadow;
19
- background: $euiColorEmptyShade;
20
-
21
- &:focus {
22
- @include euiSlightShadowHover;
23
- }
24
-
25
- &-isCollapsed {
26
- box-shadow: none;
27
- background: transparent;
28
- border-radius: 0;
29
- }
30
-
31
- &:not(:focus):not(:active):not(.euiResizableToggleButton-isVisible):not(.euiResizableToggleButton-isCollapsed) {
32
- @include euiScreenReaderOnly;
33
- }
34
- }
35
-
36
- .euiResizableToggleButton--horizontal {
37
- &.euiResizableToggleButton { // Extra layer of nesting to override EuiButtonIcon transforms on hover
38
- &.euiResizableToggleButton--after {
39
- right: 0;
40
- top: 50%; /* 1 */
41
- transform: translate(50%, -50%); /* 1 */
42
-
43
- &.euiResizableToggleButton--top {
44
- top: 0;
45
- transform: translate(50%, $euiSize);
46
- }
47
-
48
- &.euiResizableToggleButton--bottom {
49
- top: auto;
50
- bottom: 0;
51
- transform: translate(50%, -$euiSize);
52
- }
53
- }
54
-
55
- &.euiResizableToggleButton--before {
56
- left: 0;
57
- top: 50%; /* 1 */
58
- transform: translate(-50%, -50%); /* 1 */
59
-
60
- &.euiResizableToggleButton--top {
61
- top: 0;
62
- transform: translate(-50%, $euiSize);
63
- }
64
-
65
- &.euiResizableToggleButton--bottom {
66
- top: auto;
67
- bottom: 0;
68
- transform: translate(-50%, -$euiSize);
69
- }
70
- }
71
-
72
- &.euiResizableToggleButton-isCollapsed {
73
- top: 0 !important; // stylelint-disable-line declaration-no-important
74
- bottom: 0 !important; // stylelint-disable-line declaration-no-important
75
- transform: none !important; // stylelint-disable-line declaration-no-important
76
- height: 100%;
77
-
78
- &.euiResizableToggleButton--top {
79
- padding-top: $euiSize;
80
- align-items: flex-start; /* 2 */
81
- }
82
-
83
- &.euiResizableToggleButton--bottom {
84
- padding-bottom: $euiSize;
85
- align-items: flex-end; /* 2 */
86
- }
87
- }
88
- }
89
- }
90
-
91
- .euiResizableToggleButton--vertical {
92
- &.euiResizableToggleButton { // Extra layer of nesting to override EuiButtonIcon transforms on hover
93
- &.euiResizableToggleButton--after {
94
- top: 100%;
95
- left: 50%; /* 1 */
96
- transform: translate(-50%, -50%); /* 1 */
97
-
98
- &.euiResizableToggleButton--left {
99
- left: 0;
100
- transform: translate($euiSize, -50%);
101
- }
102
-
103
- &.euiResizableToggleButton--right {
104
- left: auto;
105
- right: 0;
106
- transform: translate(-$euiSize, -50%);
107
- }
108
- }
109
-
110
- &.euiResizableToggleButton--before {
111
- bottom: 100%;
112
- left: 50%; /* 1 */
113
- transform: translate(-50%, 50%); /* 1 */
114
-
115
- &.euiResizableToggleButton--left {
116
- left: 0;
117
- transform: translate($euiSize, 50%);
118
- }
119
-
120
- &.euiResizableToggleButton--right {
121
- left: auto;
122
- right: 0;
123
- transform: translate(-$euiSize, 50%);
124
- }
125
- }
126
-
127
- &.euiResizableToggleButton-isCollapsed {
128
- top: 0 !important; // stylelint-disable-line declaration-no-important
129
- bottom: 0 !important; // stylelint-disable-line declaration-no-important
130
- left: 0 !important; // stylelint-disable-line declaration-no-important
131
- transform: none !important; // stylelint-disable-line declaration-no-important
132
- width: 100%;
133
-
134
- &.euiResizableToggleButton--left {
135
- padding-left: $euiSize;
136
- justify-content: flex-start; /* 2 */
137
- }
138
-
139
- &.euiResizableToggleButton--right {
140
- padding-right: $euiSize;
141
- justify-content: flex-end; /* 2 */
142
- }
143
- }
144
- }
145
- }
@@ -1,2 +0,0 @@
1
- $euiResizableButtonTransitionSpeed: $euiAnimSpeedFast !default;
2
- $euiResizableButtonSize: $euiSize !default;
@@ -1,46 +0,0 @@
1
- .euiKeyPadMenuItem {
2
- border: none !important; // stylelint-disable-line declaration-no-important
3
- box-shadow: none;
4
-
5
- // Focus and Hover states (when not disabled)
6
- &:not(.euiKeyPadMenuItem-isDisabled) {
7
- &:hover,
8
- &:focus:hover,
9
- &:focus-within {
10
- @include euiBottomShadowSmall;
11
- }
12
-
13
- &:focus {
14
- box-shadow: none;
15
- }
16
- }
17
-
18
- &.euiKeyPadMenuItem-isSelected:not(.euiKeyPadMenuItem-isDisabled) {
19
- box-shadow: none;
20
-
21
- &:hover {
22
- @include euiBottomShadowSmall;
23
- }
24
-
25
- &,
26
- &:hover,
27
- &:focus,
28
- &:focus-within {
29
- @include euiFocusBackground;
30
- // Calculate the right text contrast ratio based on focus transparency
31
- $backgroundColorSimulated: mix($euiColorEmptyShade, $euiColorPrimary, $euiFocusTransparencyPercent);
32
- color: makeHighContrastColor($euiColorPrimaryText, $backgroundColorSimulated);
33
- }
34
- }
35
-
36
- &.euiKeyPadMenuItem-isSelected.euiKeyPadMenuItem-isDisabled {
37
- @include euiFocusBackground($euiColorDisabled);
38
- // Calculate the right text contrast ratio based on focus transparency
39
- $backgroundColorSimulated: mix($euiColorEmptyShade, $euiColorDisabled, $euiFocusTransparencyPercent);
40
- color: makeDisabledContrastColor($euiColorDisabledText, $backgroundColorSimulated);
41
- }
42
- }
43
-
44
- .euiKeyPadMenuItem__label {
45
- font-weight: $euiFontWeightSemiBold;
46
- }