@elastic/eui 105.0.0 → 106.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 (233) hide show
  1. package/dist/eui_theme_amsterdam_dark.json +2 -0
  2. package/dist/eui_theme_amsterdam_dark.json.d.ts +2 -0
  3. package/dist/eui_theme_amsterdam_light.json +2 -0
  4. package/dist/eui_theme_amsterdam_light.json.d.ts +2 -0
  5. package/dist/eui_theme_borealis_dark.json +2 -0
  6. package/dist/eui_theme_borealis_dark.json.d.ts +2 -0
  7. package/dist/eui_theme_borealis_light.json +10 -8
  8. package/dist/eui_theme_borealis_light.json.d.ts +2 -0
  9. package/es/components/combo_box/combo_box_input/combo_box_input.js +65 -61
  10. package/es/components/combo_box/combo_box_input/combo_box_input.styles.js +6 -4
  11. package/es/components/date_picker/date_picker.styles.js +4 -1
  12. package/es/components/date_picker/date_picker_range.js +3 -2
  13. package/es/components/date_picker/date_picker_range.styles.js +11 -4
  14. package/es/components/date_picker/super_date_picker/super_date_picker.styles.js +23 -14
  15. package/es/components/flyout/_flyout_close_button.styles.js +10 -1
  16. package/es/components/flyout/flyout_child.js +8 -3
  17. package/es/components/flyout/flyout_child.styles.js +3 -2
  18. package/es/components/flyout/sessions/flyout_provider.js +7 -21
  19. package/es/components/flyout/sessions/flyout_reducer.js +5 -26
  20. package/es/components/flyout/sessions/use_eui_flyout.js +21 -10
  21. package/es/components/form/field_number/field_number.styles.js +4 -1
  22. package/es/components/form/field_text/field_text.styles.js +4 -1
  23. package/es/components/form/file_picker/file_picker.js +107 -101
  24. package/es/components/form/file_picker/file_picker.styles.js +18 -17
  25. package/es/components/form/form.styles.js +72 -22
  26. package/es/components/form/form_control_layout/form_control_layout.styles.js +28 -17
  27. package/es/components/form/form_control_layout/form_control_layout_clear_button.styles.js +7 -7
  28. package/es/components/form/form_control_layout/form_control_layout_delimited.js +10 -7
  29. package/es/components/form/form_control_layout/form_control_layout_delimited.styles.js +34 -29
  30. package/es/components/form/form_control_layout/form_control_layout_icons.js +35 -20
  31. package/es/components/form/form_control_layout/form_control_layout_icons.styles.js +6 -6
  32. package/es/components/form/form_error_text/form_error_text.styles.js +3 -1
  33. package/es/components/form/form_label/form_label.styles.js +4 -2
  34. package/es/components/header/header.styles.js +5 -3
  35. package/es/components/markdown_editor/markdown_editor_drop_zone.styles.js +6 -3
  36. package/es/components/progress/progress.a11y.js +7 -7
  37. package/es/components/progress/progress.js +18 -27
  38. package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +59 -23
  39. package/es/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +8 -2
  40. package/es/components/selectable/selectable_templates/selectable_template_sitewide_popover.js +63 -0
  41. package/es/global_styling/mixins/_button.js +1 -1
  42. package/es/services/color/eui_palettes.js +26 -0
  43. package/es/services/color/vis_color_store.js +1 -1
  44. package/es/services/color/visualization_colors.js +4 -0
  45. package/es/services/theme/provider.js +13 -6
  46. package/es/themes/amsterdam/global_styling/variables/_colors.js +8 -3
  47. package/es/themes/amsterdam/global_styling/variables/_forms.js +96 -53
  48. package/es/themes/amsterdam/theme.js +2 -1
  49. package/es/themes/json/eui_theme_amsterdam_dark.json +2 -0
  50. package/es/themes/json/eui_theme_amsterdam_light.json +2 -0
  51. package/es/themes/json/eui_theme_borealis_dark.json +2 -0
  52. package/es/themes/json/eui_theme_borealis_light.json +10 -8
  53. package/eui.d.ts +461 -376
  54. package/i18ntokens.json +3595 -3523
  55. package/lib/components/combo_box/combo_box_input/combo_box_input.js +64 -60
  56. package/lib/components/combo_box/combo_box_input/combo_box_input.styles.js +6 -4
  57. package/lib/components/date_picker/date_picker.styles.js +4 -1
  58. package/lib/components/date_picker/date_picker_range.js +3 -2
  59. package/lib/components/date_picker/date_picker_range.styles.js +11 -4
  60. package/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +21 -12
  61. package/lib/components/flyout/_flyout_close_button.styles.js +10 -3
  62. package/lib/components/flyout/flyout_child.js +8 -3
  63. package/lib/components/flyout/flyout_child.styles.js +3 -2
  64. package/lib/components/flyout/sessions/flyout_provider.js +7 -21
  65. package/lib/components/flyout/sessions/flyout_reducer.js +5 -26
  66. package/lib/components/flyout/sessions/use_eui_flyout.js +21 -10
  67. package/lib/components/form/field_number/field_number.styles.js +4 -1
  68. package/lib/components/form/field_text/field_text.styles.js +4 -1
  69. package/lib/components/form/file_picker/file_picker.js +106 -100
  70. package/lib/components/form/file_picker/file_picker.styles.js +16 -15
  71. package/lib/components/form/form.styles.js +72 -22
  72. package/lib/components/form/form_control_layout/form_control_layout.styles.js +28 -17
  73. package/lib/components/form/form_control_layout/form_control_layout_clear_button.styles.js +7 -7
  74. package/lib/components/form/form_control_layout/form_control_layout_delimited.js +9 -6
  75. package/lib/components/form/form_control_layout/form_control_layout_delimited.styles.js +34 -27
  76. package/lib/components/form/form_control_layout/form_control_layout_icons.js +34 -19
  77. package/lib/components/form/form_control_layout/form_control_layout_icons.styles.js +6 -6
  78. package/lib/components/form/form_error_text/form_error_text.styles.js +3 -1
  79. package/lib/components/form/form_label/form_label.styles.js +4 -2
  80. package/lib/components/header/header.styles.js +4 -2
  81. package/lib/components/markdown_editor/markdown_editor_drop_zone.styles.js +6 -3
  82. package/lib/components/progress/progress.a11y.js +7 -7
  83. package/lib/components/progress/progress.js +18 -27
  84. package/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +57 -21
  85. package/lib/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +9 -3
  86. package/lib/components/selectable/selectable_templates/selectable_template_sitewide_popover.js +69 -0
  87. package/lib/global_styling/mixins/_button.js +1 -1
  88. package/lib/services/color/eui_palettes.js +26 -0
  89. package/lib/services/color/vis_color_store.js +1 -1
  90. package/lib/services/color/visualization_colors.js +3 -0
  91. package/lib/services/theme/provider.js +13 -6
  92. package/lib/themes/amsterdam/global_styling/variables/_colors.js +8 -3
  93. package/lib/themes/amsterdam/global_styling/variables/_forms.js +96 -53
  94. package/lib/themes/amsterdam/theme.js +2 -1
  95. package/lib/themes/json/eui_theme_amsterdam_dark.json +2 -0
  96. package/lib/themes/json/eui_theme_amsterdam_light.json +2 -0
  97. package/lib/themes/json/eui_theme_borealis_dark.json +2 -0
  98. package/lib/themes/json/eui_theme_borealis_light.json +10 -8
  99. package/optimize/es/components/combo_box/combo_box_input/combo_box_input.js +65 -61
  100. package/optimize/es/components/combo_box/combo_box_input/combo_box_input.styles.js +6 -4
  101. package/optimize/es/components/date_picker/date_picker.styles.js +4 -1
  102. package/optimize/es/components/date_picker/date_picker_range.js +3 -2
  103. package/optimize/es/components/date_picker/date_picker_range.styles.js +11 -4
  104. package/optimize/es/components/date_picker/super_date_picker/super_date_picker.styles.js +23 -14
  105. package/optimize/es/components/flyout/_flyout_close_button.styles.js +10 -1
  106. package/optimize/es/components/flyout/flyout_child.js +4 -3
  107. package/optimize/es/components/flyout/flyout_child.styles.js +3 -2
  108. package/optimize/es/components/flyout/sessions/flyout_provider.js +7 -21
  109. package/optimize/es/components/flyout/sessions/flyout_reducer.js +5 -26
  110. package/optimize/es/components/flyout/sessions/use_eui_flyout.js +21 -10
  111. package/optimize/es/components/form/field_number/field_number.styles.js +4 -1
  112. package/optimize/es/components/form/field_text/field_text.styles.js +4 -1
  113. package/optimize/es/components/form/file_picker/file_picker.js +107 -101
  114. package/optimize/es/components/form/file_picker/file_picker.styles.js +18 -17
  115. package/optimize/es/components/form/form.styles.js +72 -22
  116. package/optimize/es/components/form/form_control_layout/form_control_layout.styles.js +28 -17
  117. package/optimize/es/components/form/form_control_layout/form_control_layout_clear_button.styles.js +7 -7
  118. package/optimize/es/components/form/form_control_layout/form_control_layout_delimited.js +10 -7
  119. package/optimize/es/components/form/form_control_layout/form_control_layout_delimited.styles.js +34 -29
  120. package/optimize/es/components/form/form_control_layout/form_control_layout_icons.js +35 -20
  121. package/optimize/es/components/form/form_control_layout/form_control_layout_icons.styles.js +6 -6
  122. package/optimize/es/components/form/form_error_text/form_error_text.styles.js +3 -1
  123. package/optimize/es/components/form/form_label/form_label.styles.js +4 -2
  124. package/optimize/es/components/header/header.styles.js +5 -3
  125. package/optimize/es/components/markdown_editor/markdown_editor_drop_zone.styles.js +6 -3
  126. package/optimize/es/components/progress/progress.a11y.js +7 -7
  127. package/optimize/es/components/progress/progress.js +18 -27
  128. package/optimize/es/components/selectable/selectable_templates/selectable_template_sitewide.js +47 -22
  129. package/optimize/es/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +8 -2
  130. package/optimize/es/components/selectable/selectable_templates/selectable_template_sitewide_popover.js +52 -0
  131. package/optimize/es/global_styling/mixins/_button.js +1 -1
  132. package/optimize/es/services/color/eui_palettes.js +26 -0
  133. package/optimize/es/services/color/vis_color_store.js +1 -1
  134. package/optimize/es/services/color/visualization_colors.js +4 -0
  135. package/optimize/es/services/theme/provider.js +13 -6
  136. package/optimize/es/themes/amsterdam/global_styling/variables/_colors.js +8 -3
  137. package/optimize/es/themes/amsterdam/global_styling/variables/_forms.js +96 -53
  138. package/optimize/es/themes/amsterdam/theme.js +2 -1
  139. package/optimize/es/themes/json/eui_theme_amsterdam_dark.json +2 -0
  140. package/optimize/es/themes/json/eui_theme_amsterdam_light.json +2 -0
  141. package/optimize/es/themes/json/eui_theme_borealis_dark.json +2 -0
  142. package/optimize/es/themes/json/eui_theme_borealis_light.json +10 -8
  143. package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.js +64 -60
  144. package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.styles.js +6 -4
  145. package/optimize/lib/components/date_picker/date_picker.styles.js +4 -1
  146. package/optimize/lib/components/date_picker/date_picker_range.js +3 -2
  147. package/optimize/lib/components/date_picker/date_picker_range.styles.js +11 -4
  148. package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +21 -12
  149. package/optimize/lib/components/flyout/_flyout_close_button.styles.js +10 -3
  150. package/optimize/lib/components/flyout/flyout_child.js +4 -3
  151. package/optimize/lib/components/flyout/flyout_child.styles.js +3 -2
  152. package/optimize/lib/components/flyout/sessions/flyout_provider.js +7 -21
  153. package/optimize/lib/components/flyout/sessions/flyout_reducer.js +5 -26
  154. package/optimize/lib/components/flyout/sessions/use_eui_flyout.js +21 -10
  155. package/optimize/lib/components/form/field_number/field_number.styles.js +4 -1
  156. package/optimize/lib/components/form/field_text/field_text.styles.js +4 -1
  157. package/optimize/lib/components/form/file_picker/file_picker.js +106 -100
  158. package/optimize/lib/components/form/file_picker/file_picker.styles.js +16 -15
  159. package/optimize/lib/components/form/form.styles.js +72 -22
  160. package/optimize/lib/components/form/form_control_layout/form_control_layout.styles.js +28 -17
  161. package/optimize/lib/components/form/form_control_layout/form_control_layout_clear_button.styles.js +7 -7
  162. package/optimize/lib/components/form/form_control_layout/form_control_layout_delimited.js +9 -6
  163. package/optimize/lib/components/form/form_control_layout/form_control_layout_delimited.styles.js +34 -27
  164. package/optimize/lib/components/form/form_control_layout/form_control_layout_icons.js +34 -19
  165. package/optimize/lib/components/form/form_control_layout/form_control_layout_icons.styles.js +6 -6
  166. package/optimize/lib/components/form/form_error_text/form_error_text.styles.js +3 -1
  167. package/optimize/lib/components/form/form_label/form_label.styles.js +4 -2
  168. package/optimize/lib/components/header/header.styles.js +4 -2
  169. package/optimize/lib/components/markdown_editor/markdown_editor_drop_zone.styles.js +6 -3
  170. package/optimize/lib/components/progress/progress.a11y.js +7 -7
  171. package/optimize/lib/components/progress/progress.js +18 -27
  172. package/optimize/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +45 -20
  173. package/optimize/lib/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +9 -3
  174. package/optimize/lib/components/selectable/selectable_templates/selectable_template_sitewide_popover.js +58 -0
  175. package/optimize/lib/global_styling/mixins/_button.js +1 -1
  176. package/optimize/lib/services/color/eui_palettes.js +26 -0
  177. package/optimize/lib/services/color/vis_color_store.js +1 -1
  178. package/optimize/lib/services/color/visualization_colors.js +3 -0
  179. package/optimize/lib/services/theme/provider.js +13 -6
  180. package/optimize/lib/themes/amsterdam/global_styling/variables/_colors.js +8 -3
  181. package/optimize/lib/themes/amsterdam/global_styling/variables/_forms.js +96 -53
  182. package/optimize/lib/themes/amsterdam/theme.js +2 -1
  183. package/optimize/lib/themes/json/eui_theme_amsterdam_dark.json +2 -0
  184. package/optimize/lib/themes/json/eui_theme_amsterdam_light.json +2 -0
  185. package/optimize/lib/themes/json/eui_theme_borealis_dark.json +2 -0
  186. package/optimize/lib/themes/json/eui_theme_borealis_light.json +10 -8
  187. package/package.json +12 -10
  188. package/src/themes/amsterdam/_colors_dark.scss +3 -0
  189. package/src/themes/amsterdam/_colors_light.scss +3 -0
  190. package/test-env/components/combo_box/combo_box_input/combo_box_input.js +64 -60
  191. package/test-env/components/combo_box/combo_box_input/combo_box_input.styles.js +6 -4
  192. package/test-env/components/date_picker/date_picker.styles.js +4 -1
  193. package/test-env/components/date_picker/date_picker_range.js +3 -2
  194. package/test-env/components/date_picker/date_picker_range.styles.js +11 -4
  195. package/test-env/components/date_picker/super_date_picker/super_date_picker.styles.js +21 -12
  196. package/test-env/components/flyout/_flyout_close_button.styles.js +10 -3
  197. package/test-env/components/flyout/flyout_child.js +8 -3
  198. package/test-env/components/flyout/flyout_child.styles.js +3 -2
  199. package/test-env/components/flyout/sessions/flyout_provider.js +7 -21
  200. package/test-env/components/flyout/sessions/flyout_reducer.js +5 -26
  201. package/test-env/components/flyout/sessions/use_eui_flyout.js +21 -10
  202. package/test-env/components/form/field_number/field_number.styles.js +4 -1
  203. package/test-env/components/form/field_text/field_text.styles.js +4 -1
  204. package/test-env/components/form/file_picker/file_picker.js +106 -100
  205. package/test-env/components/form/file_picker/file_picker.styles.js +16 -15
  206. package/test-env/components/form/form.styles.js +72 -22
  207. package/test-env/components/form/form_control_layout/form_control_layout.styles.js +28 -17
  208. package/test-env/components/form/form_control_layout/form_control_layout_clear_button.styles.js +7 -7
  209. package/test-env/components/form/form_control_layout/form_control_layout_delimited.js +9 -6
  210. package/test-env/components/form/form_control_layout/form_control_layout_delimited.styles.js +34 -27
  211. package/test-env/components/form/form_control_layout/form_control_layout_icons.js +34 -19
  212. package/test-env/components/form/form_control_layout/form_control_layout_icons.styles.js +6 -6
  213. package/test-env/components/form/form_error_text/form_error_text.styles.js +3 -1
  214. package/test-env/components/form/form_label/form_label.styles.js +4 -2
  215. package/test-env/components/header/header.styles.js +4 -2
  216. package/test-env/components/markdown_editor/markdown_editor_drop_zone.styles.js +6 -3
  217. package/test-env/components/progress/progress.a11y.js +7 -7
  218. package/test-env/components/progress/progress.js +18 -27
  219. package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.js +57 -21
  220. package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +9 -3
  221. package/test-env/components/selectable/selectable_templates/selectable_template_sitewide_popover.js +68 -0
  222. package/test-env/global_styling/mixins/_button.js +1 -1
  223. package/test-env/services/color/eui_palettes.js +26 -0
  224. package/test-env/services/color/vis_color_store.js +1 -1
  225. package/test-env/services/color/visualization_colors.js +3 -0
  226. package/test-env/services/theme/provider.js +13 -6
  227. package/test-env/themes/amsterdam/global_styling/variables/_colors.js +8 -3
  228. package/test-env/themes/amsterdam/global_styling/variables/_forms.js +96 -53
  229. package/test-env/themes/amsterdam/theme.js +2 -1
  230. package/test-env/themes/json/eui_theme_amsterdam_dark.json +2 -0
  231. package/test-env/themes/json/eui_theme_amsterdam_light.json +2 -0
  232. package/test-env/themes/json/eui_theme_borealis_dark.json +2 -0
  233. package/test-env/themes/json/eui_theme_borealis_light.json +10 -8
@@ -8,18 +8,11 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
8
8
  */
9
9
 
10
10
  import { css } from '@emotion/react';
11
+ import { isEuiThemeRefreshVariant } from '../../../services';
11
12
  import { euiTextTruncate, logicalCSS, mathWithUnits } from '../../../global_styling';
12
13
  import { highContrastModeStyles } from '../../../global_styling/functions/high_contrast';
13
14
  import { euiFormVariables } from '../form.styles';
14
15
  var _ref = process.env.NODE_ENV === "production" ? {
15
- name: "1w10n1m-inGroup",
16
- styles: "flex-grow:1;overflow:hidden;label:inGroup;"
17
- } : {
18
- name: "1w10n1m-inGroup",
19
- styles: "flex-grow:1;overflow:hidden;label:inGroup;",
20
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
21
- };
22
- var _ref2 = process.env.NODE_ENV === "production" ? {
23
16
  name: "1lbfa6m-euiFormControlLayout__childrenWrapper",
24
17
  styles: "position:relative;label:euiFormControlLayout__childrenWrapper;"
25
18
  } : {
@@ -27,11 +20,24 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
27
20
  styles: "position:relative;label:euiFormControlLayout__childrenWrapper;",
28
21
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
29
22
  };
23
+ var _ref2 = process.env.NODE_ENV === "production" ? {
24
+ name: "12dhv84-euiFormControlLayout",
25
+ styles: "position:relative;z-index:0;label:euiFormControlLayout;"
26
+ } : {
27
+ name: "12dhv84-euiFormControlLayout",
28
+ styles: "position:relative;z-index:0;label:euiFormControlLayout;",
29
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
30
+ };
30
31
  export var euiFormControlLayoutStyles = function euiFormControlLayoutStyles(euiThemeContext) {
31
32
  var euiTheme = euiThemeContext.euiTheme;
33
+ var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'formVariant');
32
34
  var form = euiFormVariables(euiThemeContext);
35
+ var groupStyles = "\n /* use pseudo element for borders to prevent dimension changes and support nested elements better */\n &::after {\n content: '';\n position: absolute;\n inset: 0;\n z-index: 0;\n border: ".concat(euiTheme.border.width.thin, " solid ").concat(form.borderColor, ";\n border-radius: inherit;\n pointer-events: none;\n }\n\n /* the filter group will use the form layout border instead */\n .euiFilterGroup {\n border-radius: 0;\n /* creating extra space to prevent the focus indicator being cut off */\n ").concat(logicalCSS('padding-right', euiTheme.border.width.thin), "\n\n &::after {\n display: none;\n }\n }\n\n .euiFilterButton__wrapper:first-of-type::before,\n .euiFilterButton__wrapper::after {\n display: none;\n }\n ");
36
+ var wrapperGroupStyles = "\n > :first-child {\n ".concat(logicalCSS('border-top-left-radius', '0'), "\n ").concat(logicalCSS('border-bottom-left-radius', '0'), "\n }\n\n > :last-child {\n ").concat(logicalCSS('border-top-right-radius', '0'), "\n ").concat(logicalCSS('border-bottom-right-radius', '0'), "\n }\n ");
37
+ var prependOnlyStyles = "\n > :last-child {\n ".concat(logicalCSS('border-top-right-radius', 'inherit'), "\n ").concat(logicalCSS('border-bottom-right-radius', 'inherit'), "\n }\n ");
38
+ var appendOnlyStyles = "\n > :first-child {\n ".concat(logicalCSS('border-top-left-radius', 'inherit'), "\n ").concat(logicalCSS('border-bottom-left-radius', 'inherit'), "\n }\n ");
33
39
  return {
34
- euiFormControlLayout: /*#__PURE__*/css(";label:euiFormControlLayout;"),
40
+ euiFormControlLayout: _ref2,
35
41
  // Skip the css`` on the default height to avoid generating a className
36
42
  uncompressed: "\n ".concat(logicalCSS('height', form.controlHeight), "\n "),
37
43
  compressed: /*#__PURE__*/css(logicalCSS('height', form.controlCompressedHeight), ";;label:compressed;"),
@@ -39,36 +45,41 @@ export var euiFormControlLayoutStyles = function euiFormControlLayoutStyles(euiT
39
45
  formWidth: "\n ".concat(logicalCSS('max-width', form.maxWidth), "\n ").concat(logicalCSS('width', '100%'), "\n "),
40
46
  fullWidth: /*#__PURE__*/css(logicalCSS('max-width', '100%'), " ", logicalCSS('width', '100%'), ";;label:fullWidth;"),
41
47
  group: {
42
- group: /*#__PURE__*/css("display:flex;align-items:stretch;border:", euiTheme.border.width.thin, " solid ", form.borderColor, ";background-color:", form.backgroundColor, ";overflow:hidden;>*{", logicalCSS('height', '100%'), ";};label:group;"),
48
+ group: /*#__PURE__*/css("position:relative;display:flex;align-items:stretch;border:", isRefreshVariant ? 'none' : "".concat(euiTheme.border.width.thin, " solid ").concat(form.borderColor), ";background-color:", form.backgroundColor, ";overflow:hidden;", isRefreshVariant && groupStyles, ">*{", logicalCSS('height', '100%'), ";};label:group;"),
43
49
  // Skipping css`` to avoid repeated compressed/uncompressed classNames
44
50
  uncompressed: "\n border-radius: ".concat(form.controlBorderRadius, ";\n "),
45
51
  compressed: "\n border-radius: ".concat(form.controlCompressedBorderRadius, ";\n ")
46
52
  },
47
53
  children: {
48
- euiFormControlLayout__childrenWrapper: _ref2,
49
- inGroup: _ref,
50
- prependOnly: /*#__PURE__*/css(logicalCSS('border-top-right-radius', 'inherit'), " ", logicalCSS('border-bottom-right-radius', 'inherit'), ";;label:prependOnly;"),
51
- appendOnly: /*#__PURE__*/css(logicalCSS('border-top-left-radius', 'inherit'), " ", logicalCSS('border-bottom-left-radius', 'inherit'), ";;label:appendOnly;")
54
+ euiFormControlLayout__childrenWrapper: _ref,
55
+ inGroup: /*#__PURE__*/css("flex-grow:1;overflow:hidden;", isRefreshVariant && wrapperGroupStyles, ";;label:inGroup;"),
56
+ prependOnly: /*#__PURE__*/css(logicalCSS('border-top-right-radius', 'inherit'), " ", logicalCSS('border-bottom-right-radius', 'inherit'), " ", isRefreshVariant && prependOnlyStyles, ";;label:prependOnly;"),
57
+ appendOnly: /*#__PURE__*/css(logicalCSS('border-top-left-radius', 'inherit'), " ", logicalCSS('border-bottom-left-radius', 'inherit'), " ", isRefreshVariant && appendOnlyStyles, ";;label:appendOnly;")
52
58
  }
53
59
  };
54
60
  };
55
61
  export var euiFormControlLayoutSideNodeStyles = function euiFormControlLayoutSideNodeStyles(euiThemeContext) {
56
62
  var euiTheme = euiThemeContext.euiTheme;
63
+ var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'formVariant');
57
64
  var form = euiFormVariables(euiThemeContext);
58
65
  var uncompressedHeight = mathWithUnits([form.controlHeight, euiTheme.border.width.thin], function (x, y) {
59
- return x - y * 2;
66
+ return isRefreshVariant ? x : x - y * 2;
60
67
  });
61
68
  var compressedHeight = mathWithUnits([form.controlCompressedHeight, euiTheme.border.width.thin], function (x, y) {
62
- return x - y * 2;
69
+ return isRefreshVariant ? x : x - y * 2;
63
70
  });
64
71
  var buttons = '*:is(.euiButton, .euiButtonEmpty, .euiButtonIcon)';
65
72
  var text = '*:is(.euiFormLabel, .euiText)';
73
+ var appendStyles = "\n position: relative;\n ".concat(logicalCSS('margin-left', "-".concat(euiTheme.border.width.thin)), "\n\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n pointer-events: none;\n border-inline-start: \n ").concat(euiTheme.border.width.thin, " solid ").concat(form.borderColor, ";\n }\n ");
74
+ var prependStyles = "\n position: relative;\n ".concat(logicalCSS('margin-right', "-".concat(euiTheme.border.width.thin)), "\n\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n z-index: 1;\n pointer-events: none;\n border-inline-end: \n ").concat(euiTheme.border.width.thin, " solid ").concat(form.borderColor, ";\n }\n ");
66
75
  return {
67
- euiFormControlLayout__side: /*#__PURE__*/css(logicalCSS('height', '100%'), " ", euiTextTruncate('50%'), " flex-shrink:0;display:flex;align-items:center;gap:", euiTheme.size.xs, ";background-color:", form.appendPrependBackground, ";", buttons, "{transform:none!important;&:focus-visible{outline-offset:-", euiTheme.focus.width, ";}}", text, "{cursor:default;overflow:hidden;text-overflow:ellipsis;}&:not(:has(> ", buttons, ":first-child, > *:first-child > ", buttons, ")){", logicalCSS('padding-left', euiTheme.size.s), ";}&:not(:has(> ", buttons, ":last-child, > *:last-child > ", buttons, ")){", logicalCSS('padding-right', euiTheme.size.s), ";};label:euiFormControlLayout__side;"),
76
+ euiFormControlLayout__side: /*#__PURE__*/css(logicalCSS('height', '100%'), " ", euiTextTruncate('50%'), " flex-shrink:0;display:flex;align-items:center;gap:", euiTheme.size.xs, ";background-color:", form.appendPrependBackground, ";", buttons, "{transform:none!important;line-height:1;&:focus-visible{outline-offset:-", euiTheme.focus.width, ";}}", text, "{cursor:default;overflow:hidden;text-overflow:ellipsis;}&:not(:has(> ", buttons, ":first-child, > *:first-child > ", buttons, ")){", logicalCSS('padding-left', euiTheme.size.s), ";}&:not(:has(> ", buttons, ":last-child, > *:last-child > ", buttons, ")){", logicalCSS('padding-right', euiTheme.size.s), ";};label:euiFormControlLayout__side;"),
68
77
  append: /*#__PURE__*/css(highContrastModeStyles(euiThemeContext, {
78
+ none: "\n ".concat(isRefreshVariant && appendStyles, "\n "),
69
79
  preferred: logicalCSS('border-left', euiTheme.border.thin)
70
80
  }), ";label:append;"),
71
81
  prepend: /*#__PURE__*/css(highContrastModeStyles(euiThemeContext, {
82
+ none: "\n ".concat(isRefreshVariant && prependStyles, "\n "),
72
83
  preferred: logicalCSS('border-right', euiTheme.border.thin)
73
84
  }), ";label:prepend;"),
74
85
  uncompressed: "\n ".concat(text, " {\n ").concat(logicalCSS('padding-horizontal', euiTheme.size.xs), "\n line-height: ").concat(uncompressedHeight, ";\n }\n\n ").concat(buttons, " {\n ").concat(logicalCSS('height', uncompressedHeight), "\n }\n\n .euiButtonIcon {\n flex-shrink: 0;\n ").concat(logicalCSS('width', euiTheme.size.xl), "\n }\n "),
@@ -8,14 +8,14 @@
8
8
 
9
9
  import { css } from '@emotion/react';
10
10
  import { logicalSizeCSS, mathWithUnits } from '../../../global_styling';
11
- export var EuiFormControlLayoutClearButtonStyles = function EuiFormControlLayoutClearButtonStyles(_ref) {
12
- var euiTheme = _ref.euiTheme,
13
- colorMode = _ref.colorMode,
14
- highContrastMode = _ref.highContrastMode;
15
- var backgroundColor = colorMode === 'DARK' || highContrastMode // mediumShade is not sufficient WCAG contrast
16
- ? euiTheme.colors.darkShade : euiTheme.colors.mediumShade;
11
+ import { isEuiThemeRefreshVariant } from '../../../services';
12
+ export var EuiFormControlLayoutClearButtonStyles = function EuiFormControlLayoutClearButtonStyles(euiThemeContext) {
13
+ var euiTheme = euiThemeContext.euiTheme,
14
+ highContrastMode = euiThemeContext.highContrastMode;
15
+ var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'formVariant');
16
+ var backgroundColor = highContrastMode ? euiTheme.colors.darkShade : euiTheme.components.forms.clearButtonBackground;
17
17
  return {
18
- euiFormControlLayoutClearButton: /*#__PURE__*/css("pointer-events:all;display:flex;justify-content:center;align-items:center;border-radius:50%;border-style:solid;border-color:", backgroundColor, ";&:disabled{cursor:not-allowed;background-color:", euiTheme.colors.disabled, ";};label:euiFormControlLayoutClearButton;"),
18
+ euiFormControlLayoutClearButton: /*#__PURE__*/css("pointer-events:all;display:flex;justify-content:center;align-items:center;border-radius:50%;border-style:solid;border-color:", backgroundColor, ";&:disabled{cursor:not-allowed;background-color:", isRefreshVariant ? euiTheme.colors.backgroundBaseDisabled : euiTheme.colors.disabled, ";};label:euiFormControlLayoutClearButton;"),
19
19
  size: {
20
20
  s: "\n ".concat(logicalSizeCSS(euiTheme.size.m), "\n border-width: ").concat(mathWithUnits(euiTheme.size.m, function (x) {
21
21
  return x / 2;
@@ -14,7 +14,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
14
14
 
15
15
  import React from 'react';
16
16
  import classNames from 'classnames';
17
- import { useEuiMemoizedStyles, cloneElementWithCss } from '../../../services';
17
+ import { useEuiMemoizedStyles, cloneElementWithCss, useEuiTheme, useEuiThemeRefreshVariant } from '../../../services';
18
18
  import { useEuiI18n } from '../../i18n';
19
19
  import { EuiIcon } from '../../icon';
20
20
  import { EuiText } from '../../text';
@@ -30,6 +30,8 @@ export var EuiFormControlLayoutDelimited = function EuiFormControlLayoutDelimite
30
30
  className = _ref.className,
31
31
  _fullWidth = _ref.fullWidth,
32
32
  rest = _objectWithoutProperties(_ref, _excluded);
33
+ var euiThemeContext = useEuiTheme();
34
+ var isRefreshVariant = useEuiThemeRefreshVariant('formVariant');
33
35
  var _useFormContext = useFormContext(),
34
36
  defaultFullWidth = _useFormContext.defaultFullWidth;
35
37
  var fullWidth = _fullWidth !== null && _fullWidth !== void 0 ? _fullWidth : defaultFullWidth;
@@ -42,7 +44,7 @@ export var EuiFormControlLayoutDelimited = function EuiFormControlLayoutDelimite
42
44
  });
43
45
  var styles = useEuiMemoizedStyles(euiFormControlLayoutDelimitedStyles);
44
46
  var cssStyles = [styles.delimited, rest.isDisabled && styles.disabled, rest.readOnly && styles.readOnly];
45
- var wrapperStyles = [styles.childrenWrapper.delimited, showInvalidState && styles.childrenWrapper.invalid, (_rest$wrapperProps = rest.wrapperProps) === null || _rest$wrapperProps === void 0 ? void 0 : _rest$wrapperProps.css];
47
+ var wrapperStyles = [styles.childrenWrapper.delimited, showInvalidState && styles.childrenWrapper.invalid, (_rest$wrapperProps = rest.wrapperProps) === null || _rest$wrapperProps === void 0 ? void 0 : _rest$wrapperProps.css, isRefreshVariant && rest.readOnly && styles.childrenWrapper.readOnly];
46
48
  return ___EmotionJSX(EuiFormControlLayout, _extends({
47
49
  isDelimited: true,
48
50
  css: cssStyles,
@@ -57,23 +59,24 @@ export var EuiFormControlLayoutDelimited = function EuiFormControlLayoutDelimite
57
59
  value: {
58
60
  defaultFullWidth: fullWidth
59
61
  }
60
- }, startControl && addClassesToControl(startControl), ___EmotionJSX(EuiFormControlDelimiter, {
62
+ }, startControl && addClassesToControl(euiThemeContext, startControl), ___EmotionJSX(EuiFormControlDelimiter, {
61
63
  delimiter: delimiter,
62
64
  isInvalid: showInvalidState
63
- }), endControl && addClassesToControl(endControl)));
65
+ }), endControl && addClassesToControl(euiThemeContext, endControl)));
64
66
  };
65
- var addClassesToControl = function addClassesToControl(control) {
67
+ var addClassesToControl = function addClassesToControl(euiThemeContext, control) {
66
68
  return cloneElementWithCss(control, {
67
- css: euiFormControlLayoutDelimited__input,
69
+ css: euiFormControlLayoutDelimited__input(euiThemeContext),
68
70
  className: classNames(control.props.className, 'euiFormControlLayoutDelimited__input')
69
71
  }, 'before');
70
72
  };
71
73
  var EuiFormControlDelimiter = function EuiFormControlDelimiter(_ref2) {
72
74
  var delimiter = _ref2.delimiter,
73
75
  isInvalid = _ref2.isInvalid;
76
+ var euiThemeContext = useEuiTheme();
74
77
  var defaultAriaLabel = useEuiI18n('euiFormControlLayoutDelimited.delimiterLabel', 'to');
75
78
  return ___EmotionJSX(EuiText, {
76
- css: euiFormControlLayoutDelimited__delimiter,
79
+ css: euiFormControlLayoutDelimited__delimiter(euiThemeContext),
77
80
  className: "euiFormControlLayoutDelimited__delimiter",
78
81
  size: "s",
79
82
  color: isInvalid ? 'danger' : 'subdued'
@@ -1,4 +1,3 @@
1
- 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)."; }
2
1
  /*
3
2
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
4
3
  * or more contributor license agreements. Licensed under the Elastic License
@@ -8,45 +7,51 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
8
7
  */
9
8
 
10
9
  import { css } from '@emotion/react';
11
- import { logicalCSS } from '../../../global_styling';
12
- import { euiFormControlDisabledStyles, euiFormControlReadOnlyStyles, euiFormControlDefaultShadow, euiFormControlInvalidStyles } from '../form.styles';
13
- var _ref = process.env.NODE_ENV === "production" ? {
14
- name: "1o1b8cl-delimited",
15
- styles: "display:flex;label:delimited;"
16
- } : {
17
- name: "1o1b8cl-delimited",
18
- styles: "display:flex;label:delimited;",
19
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
20
- };
10
+ import { isEuiThemeRefreshVariant } from '../../../services';
11
+ import { logicalCSS, mathWithUnits } from '../../../global_styling';
12
+ import { euiFormControlDisabledStyles, euiFormControlReadOnlyStyles, euiFormControlDefaultShadow, euiFormControlInvalidStyles, euiFormControlHoverStyles, euiFormVariables } from '../form.styles';
21
13
  export var euiFormControlLayoutDelimitedStyles = function euiFormControlLayoutDelimitedStyles(euiThemeContext) {
14
+ var highContrastMode = euiThemeContext.highContrastMode;
15
+ var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'formVariant');
16
+ var form = euiFormVariables(euiThemeContext);
17
+ var invalidStyles = isRefreshVariant ? "\n :not(.euiFormControlLayoutDelimited__input, .euiFormControlLayoutDelimited__delimiter) {\n ".concat(euiFormControlInvalidStyles(euiThemeContext), "\n }\n\n &:focus-within {\n --euiFormControlStateColor: ").concat(form.borderColor, ";\n --euiFormControlStateHoverColor: ").concat(form.borderHovered, ";\n }\n\n .euiFormControlLayoutDelimited__input {\n background-color: transparent;\n }\n ") : "\n ".concat(euiFormControlInvalidStyles(euiThemeContext), ";\n ");
18
+ var readOnlyStyles = "\n & .euiFormControlLayoutDelimited__input {\n outline: none; \n box-shadow: none;\n --euiFormControlStateColor: transparent;\n }\n ";
19
+ var delimitedStyles = "\n /* Transition smoothly between disabled/readOnly background color changes */\n ".concat(euiFormControlDefaultShadow(euiThemeContext, {
20
+ withBorder: isRefreshVariant && !highContrastMode ? true : false,
21
+ withBackground: false,
22
+ withBackgroundAnimation: isRefreshVariant ? false : true
23
+ }), "\n ").trim();
24
+ var delimitedWrapperStyles = "\n ".concat(euiFormControlDefaultShadow(euiThemeContext, {
25
+ withBorder: !highContrastMode,
26
+ withBackground: false,
27
+ withBackgroundAnimation: true
28
+ }), "\n \n &:hover {\n ").concat(euiFormControlHoverStyles(euiThemeContext), "\n box-shadow: none;\n\n /* using hover styling on wrapper instead of the children inputs */\n .euiFormControlLayoutDelimited__input:not(:focus) {\n outline: none;\n background-color: transparent;\n }\n }\n\n /* adjust for delimited behavior differing from default form layout */\n > :first-child {\n ").concat(logicalCSS('border-top-left-radius', 'inherit'), "\n ").concat(logicalCSS('border-bottom-left-radius', 'inherit'), "\n }\n\n > :last-child {\n ").concat(logicalCSS('border-top-right-radius', 'inherit'), "\n ").concat(logicalCSS('border-bottom-right-radius', 'inherit'), "\n }\n ");
22
29
  return {
23
30
  // Appended onto existing `euiFormControlLayout` styles
24
- delimited: /*#__PURE__*/css(
25
- // Transition smoothly between disabled/readOnly background color changes
26
- euiFormControlDefaultShadow(euiThemeContext, {
27
- withBorder: false,
28
- withBackground: false,
29
- withBackgroundAnimation: true
30
- }), ";label:delimited;"),
31
+ delimited: /*#__PURE__*/css(delimitedStyles, ";label:delimited;"),
31
32
  disabled: /*#__PURE__*/css(euiFormControlDisabledStyles(euiThemeContext), ";label:disabled;"),
32
- readOnly: /*#__PURE__*/css(euiFormControlReadOnlyStyles(euiThemeContext), ";label:readOnly;"),
33
+ readOnly: /*#__PURE__*/css(euiFormControlReadOnlyStyles(euiThemeContext), " ", isRefreshVariant && readOnlyStyles, ";;label:readOnly;"),
33
34
  // Appended onto existing `euiFormControlLayout__childrenWrapper` styles
34
35
  childrenWrapper: {
35
- delimited: _ref,
36
+ delimited: /*#__PURE__*/css("display:flex;", isRefreshVariant && delimitedWrapperStyles, ";;label:delimited;"),
36
37
  invalid: /*#__PURE__*/css(euiFormControlDefaultShadow(euiThemeContext, {
37
38
  withBorder: false,
38
39
  withBackgroundColor: false,
39
40
  withBackgroundAnimation: false
40
- }), euiFormControlInvalidStyles(euiThemeContext), ";label:invalid;")
41
+ }), "\n ".concat(invalidStyles, "\n "), ";label:invalid;"),
42
+ readOnly: /*#__PURE__*/css(";label:readOnly;")
41
43
  }
42
44
  };
43
45
  };
44
- export var euiFormControlLayoutDelimited__delimiter = process.env.NODE_ENV === "production" ? {
45
- name: "14bhjql-euiFormControlLayoutDelimited__delimiter",
46
- styles: "align-self:stretch;flex-grow:0;display:flex;align-items:center;line-height:1;label:euiFormControlLayoutDelimited__delimiter;"
47
- } : {
48
- name: "14bhjql-euiFormControlLayoutDelimited__delimiter",
49
- styles: "align-self:stretch;flex-grow:0;display:flex;align-items:center;line-height:1;label:euiFormControlLayoutDelimited__delimiter;",
50
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
46
+ export var euiFormControlLayoutDelimited__delimiter = function euiFormControlLayoutDelimited__delimiter(euiThemeContext) {
47
+ var euiTheme = euiThemeContext.euiTheme;
48
+ var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'formVariant');
49
+ var experimentalStyles = isRefreshVariant && "\n ".concat(logicalCSS('padding-horizontal', mathWithUnits([euiTheme.size.xs, euiTheme.size.xxs], function (x, y) {
50
+ return x + y;
51
+ })), "\n ");
52
+ return /*#__PURE__*/css("display:flex;align-self:stretch;flex-grow:0;align-items:center;line-height:1;", experimentalStyles, ";;label:euiFormControlLayoutDelimited__delimiter;");
51
53
  };
52
- export var euiFormControlLayoutDelimited__input = /*#__PURE__*/css("box-shadow:none;border:none;border-radius:0;text-align:center;", logicalCSS('height', '100%'), ";;label:euiFormControlLayoutDelimited__input;");
54
+ export var euiFormControlLayoutDelimited__input = function euiFormControlLayoutDelimited__input(euiThemeContext) {
55
+ var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'formVariant');
56
+ return /*#__PURE__*/css("box-shadow:none;border:none;border-radius:", isRefreshVariant ? '' : '0', ";text-align:center;", logicalCSS('height', '100%'), ";;label:euiFormControlLayoutDelimited__input;");
57
+ };
@@ -18,7 +18,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
18
18
  */
19
19
 
20
20
  import React, { Component } from 'react';
21
- import { RenderWithEuiStylesMemoizer } from '../../../services';
21
+ import { isEuiThemeRefreshVariant, RenderWithEuiStylesMemoizer, RenderWithEuiTheme } from '../../../services';
22
22
  import { EuiIcon } from '../../icon';
23
23
  import { EuiLoadingSpinner } from '../../loading';
24
24
  import { EuiFormControlLayoutClearButton } from './form_control_layout_clear_button';
@@ -77,11 +77,14 @@ export var EuiFormControlLayoutIcons = /*#__PURE__*/function (_Component) {
77
77
  var iconRef = iconProps.ref,
78
78
  side = iconProps.side,
79
79
  iconRest = _objectWithoutProperties(iconProps, _excluded);
80
- return ___EmotionJSX(EuiFormControlLayoutCustomIcon, _extends({
81
- size: compressed ? 's' : 'm',
82
- disabled: isDisabled,
83
- iconRef: iconRef
84
- }, iconRest));
80
+ return ___EmotionJSX(RenderWithEuiTheme, null, function (euiThemeContext) {
81
+ var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'formVariant');
82
+ return ___EmotionJSX(EuiFormControlLayoutCustomIcon, _extends({
83
+ size: compressed && !isRefreshVariant ? 's' : 'm',
84
+ disabled: isDisabled,
85
+ iconRef: iconRef
86
+ }, iconRest));
87
+ });
85
88
  }
86
89
  }, {
87
90
  key: "renderDropdownIcon",
@@ -93,10 +96,13 @@ export var EuiFormControlLayoutIcons = /*#__PURE__*/function (_Component) {
93
96
  if (!isDropdown) {
94
97
  return null;
95
98
  }
96
- return ___EmotionJSX(EuiFormControlLayoutCustomIcon, {
97
- size: compressed ? 's' : 'm',
98
- disabled: isDisabled,
99
- type: "arrowDown"
99
+ return ___EmotionJSX(RenderWithEuiTheme, null, function (euiThemeContext) {
100
+ var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'formVariant');
101
+ return ___EmotionJSX(EuiFormControlLayoutCustomIcon, {
102
+ size: compressed && !isRefreshVariant ? 's' : 'm',
103
+ disabled: isDisabled,
104
+ type: "arrowDown"
105
+ });
100
106
  });
101
107
  }
102
108
  }, {
@@ -108,8 +114,11 @@ export var EuiFormControlLayoutIcons = /*#__PURE__*/function (_Component) {
108
114
  if (!isLoading) {
109
115
  return null;
110
116
  }
111
- return ___EmotionJSX(EuiLoadingSpinner, {
112
- size: compressed ? 's' : 'm'
117
+ return ___EmotionJSX(RenderWithEuiTheme, null, function (euiThemeContext) {
118
+ var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'formVariant');
119
+ return ___EmotionJSX(EuiLoadingSpinner, {
120
+ size: compressed && !isRefreshVariant ? 's' : 'm'
121
+ });
113
122
  });
114
123
  }
115
124
  }, {
@@ -122,10 +131,13 @@ export var EuiFormControlLayoutIcons = /*#__PURE__*/function (_Component) {
122
131
  if (!clear) {
123
132
  return null;
124
133
  }
125
- return ___EmotionJSX(EuiFormControlLayoutClearButton, _extends({
126
- size: compressed ? 's' : 'm',
127
- disabled: isDisabled
128
- }, clear));
134
+ return ___EmotionJSX(RenderWithEuiTheme, null, function (euiThemeContext) {
135
+ var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'formVariant');
136
+ return ___EmotionJSX(EuiFormControlLayoutClearButton, _extends({
137
+ size: compressed && !isRefreshVariant ? 's' : 'm',
138
+ disabled: isDisabled
139
+ }, clear));
140
+ });
129
141
  }
130
142
  }, {
131
143
  key: "renderInvalidIcon",
@@ -136,10 +148,13 @@ export var EuiFormControlLayoutIcons = /*#__PURE__*/function (_Component) {
136
148
  if (!isInvalid) {
137
149
  return null;
138
150
  }
139
- return ___EmotionJSX(EuiIcon, {
140
- size: compressed ? 's' : 'm',
141
- color: "danger",
142
- type: "warning"
151
+ return ___EmotionJSX(RenderWithEuiTheme, null, function (euiThemeContext) {
152
+ var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'formVariant');
153
+ return ___EmotionJSX(EuiIcon, {
154
+ size: compressed && !isRefreshVariant ? 's' : 'm',
155
+ color: "danger",
156
+ type: "warning"
157
+ });
143
158
  });
144
159
  }
145
160
  }]);
@@ -11,11 +11,11 @@ import { css } from '@emotion/react';
11
11
  import { logicalCSS, mathWithUnits } from '../../../global_styling';
12
12
  import { euiFormVariables } from '../form.styles';
13
13
  var _ref = process.env.NODE_ENV === "production" ? {
14
- name: "3lf9c4-euiFormControlLayoutIcons",
15
- styles: "pointer-events:none;display:flex;align-items:center;label:euiFormControlLayoutIcons;"
14
+ name: "oaqulw-euiFormControlLayoutIcons",
15
+ styles: "position:relative;z-index:1;display:flex;align-items:center;pointer-events:none;label:euiFormControlLayoutIcons;"
16
16
  } : {
17
- name: "3lf9c4-euiFormControlLayoutIcons",
18
- styles: "pointer-events:none;display:flex;align-items:center;label:euiFormControlLayoutIcons;",
17
+ name: "oaqulw-euiFormControlLayoutIcons",
18
+ styles: "position:relative;z-index:1;display:flex;align-items:center;pointer-events:none;label:euiFormControlLayoutIcons;",
19
19
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
20
20
  };
21
21
  export var euiFormControlLayoutIconsStyles = function euiFormControlLayoutIconsStyles(euiThemeContext) {
@@ -38,11 +38,11 @@ export var euiFormControlLayoutIconsStyles = function euiFormControlLayoutIconsS
38
38
  absolute: {
39
39
  absolute: /*#__PURE__*/css("position:absolute;", logicalCSS('vertical', 0), ";;label:absolute;"),
40
40
  uncompressed: {
41
- left: /*#__PURE__*/css("z-index:1;", logicalCSS('left', controlPadding), ";;label:left;"),
41
+ left: /*#__PURE__*/css("z-index:2;", logicalCSS('left', controlPadding), ";;label:left;"),
42
42
  right: /*#__PURE__*/css(logicalCSS('right', controlPadding), ";;label:right;")
43
43
  },
44
44
  compressed: {
45
- left: /*#__PURE__*/css("z-index:1;", logicalCSS('left', controlCompressedPadding), ";;label:left;"),
45
+ left: /*#__PURE__*/css("z-index:2;", logicalCSS('left', controlCompressedPadding), ";;label:left;"),
46
46
  right: /*#__PURE__*/css(logicalCSS('right', controlCompressedPadding), ";;label:right;")
47
47
  }
48
48
  },
@@ -7,10 +7,12 @@
7
7
  */
8
8
 
9
9
  import { css } from '@emotion/react';
10
+ import { isEuiThemeRefreshVariant } from '../../../services';
10
11
  import { euiFontSize, logicalCSS } from '../../../global_styling';
11
12
  export var euiFormErrorTextStyles = function euiFormErrorTextStyles(euiThemeContext) {
12
13
  var euiTheme = euiThemeContext.euiTheme;
14
+ var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'formVariant');
13
15
  return {
14
- euiFormErrorText: /*#__PURE__*/css(logicalCSS('padding-top', euiTheme.size.xs), " ", euiFontSize(euiThemeContext, 'xs'), " color:", euiTheme.colors.danger, ";;label:euiFormErrorText;")
16
+ euiFormErrorText: /*#__PURE__*/css(logicalCSS('padding-top', euiTheme.size.xs), " ", euiFontSize(euiThemeContext, 'xs'), " color:", isRefreshVariant ? euiTheme.colors.textDanger : euiTheme.colors.danger, ";;label:euiFormErrorText;")
15
17
  };
16
18
  };
@@ -10,6 +10,7 @@ var _excluded = ["fontWeight"];
10
10
 
11
11
  import { css } from '@emotion/react';
12
12
  import { serializeStyles } from '@emotion/serialize';
13
+ import { isEuiThemeRefreshVariant } from '../../../services';
13
14
  import { euiCanAnimate, euiTextBreakWord } from '../../../global_styling';
14
15
  import { euiTitle } from '../../title/title.styles';
15
16
  export var euiFormLabel = function euiFormLabel(euiThemeContext) {
@@ -25,13 +26,14 @@ export var euiFormLabel = function euiFormLabel(euiThemeContext) {
25
26
  };
26
27
  export var euiFormLabelStyles = function euiFormLabelStyles(euiThemeContext) {
27
28
  var euiTheme = euiThemeContext.euiTheme;
29
+ var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'formVariant');
28
30
  return {
29
31
  euiFormLabel: /*#__PURE__*/css(euiFormLabel(euiThemeContext), " display:inline-block;", euiCanAnimate, "{transition:color ", euiTheme.animation.fast, " ", euiTheme.animation.resistance, ";};label:euiFormLabel;"),
30
32
  // Skip css`` to avoid generating an extra Emotion className
31
33
  // Use :where to reduce specificity & make the CSS easier to override by prepend/append nodes
32
34
  notDisabled: "\n &:where([for]) {\n cursor: pointer;\n }\n ",
33
- invalid: /*#__PURE__*/css("color:", euiTheme.colors.danger, ";;label:invalid;"),
35
+ invalid: /*#__PURE__*/css("color:", isRefreshVariant ? euiTheme.colors.textDanger : euiTheme.colors.danger, ";;label:invalid;"),
34
36
  // Focused state should override invalid state
35
- focused: /*#__PURE__*/css("color:", euiTheme.colors.primary, ";;label:focused;")
37
+ focused: /*#__PURE__*/css("color:", isRefreshVariant ? '' : euiTheme.colors.primary, ";;label:focused;")
36
38
  };
37
39
  };
@@ -9,7 +9,7 @@
9
9
  import { css } from '@emotion/react';
10
10
  import { euiShadowXSmall } from '@elastic/eui-theme-common';
11
11
  import { logicalCSS } from '../../global_styling';
12
- import { makeHighContrastColor } from '../../services';
12
+ import { isEuiThemeRefreshVariant, makeHighContrastColor } from '../../services';
13
13
  export var euiHeaderVariables = function euiHeaderVariables(euiThemeContext) {
14
14
  var euiTheme = euiThemeContext.euiTheme;
15
15
  return {
@@ -47,6 +47,7 @@ import { euiFormVariables } from '../form/form.styles';
47
47
  var euiHeaderDarkStyles = function euiHeaderDarkStyles(euiThemeContext) {
48
48
  var euiTheme = euiThemeContext.euiTheme,
49
49
  highContrastMode = euiThemeContext.highContrastMode;
50
+ var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'formVariant');
50
51
  var _euiFormVariables = euiFormVariables(euiThemeContext),
51
52
  controlPlaceholderText = _euiFormVariables.controlPlaceholderText;
52
53
  var backgroundColor = euiTheme.components.headerDarkBackground;
@@ -57,8 +58,9 @@ var euiHeaderDarkStyles = function euiHeaderDarkStyles(euiThemeContext) {
57
58
  borderColor: euiTheme.components.headerDarkSearchBorderColor,
58
59
  placeholderColor: makeHighContrastColor(controlPlaceholderText, 8)(backgroundColor)
59
60
  };
60
- return "\n background-color: ".concat(backgroundColor, ";\n\n .euiHeaderLogo__text,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n color: ").concat(euiTheme.colors.ghost, ";\n }\n\n .euiHeaderLink-isActive {\n color: ").concat(makeHighContrastColor(euiTheme.colors.primary)(backgroundColor), ";\n }\n\n .euiHeaderLogo,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n &:focus {\n background-color: ").concat(euiTheme.components.headerDarkSectionItemBackgroundFocus, ";\n }\n }\n\n .euiHeaderSectionItemButton__notification--badge {\n box-shadow: 0 0 0 ").concat(euiTheme.border.width.thin, " ").concat(backgroundColor, ";\n }\n\n .euiHeaderSectionItemButton__notification--dot {\n stroke: ").concat(backgroundColor, ";\n }\n\n .euiSelectableTemplateSitewide .euiFormControlLayout {\n background-color: transparent;\n\n input {\n box-shadow: inset 0 0 0 ").concat(euiTheme.border.width.thin, " ").concat(selectableSitewide.borderColor, ";\n }\n\n &--group {\n border-color: ").concat(
61
+ var formLayoutStyles = "\n .euiSelectableTemplateSitewide .euiFormControlLayout {\n background-color: transparent;\n\n input {\n box-shadow: inset 0 0 0 ".concat(euiTheme.border.width.thin, " ").concat(selectableSitewide.borderColor, ";\n }\n\n &--group {\n border-color: ").concat(
61
62
  // the header is in a faux dark mode, we can't rely on color
62
63
  // switch tokens as they'd be in the wrong color mode
63
- highContrastMode ? euiTheme.colors.plainLight : euiTheme.components.headerDarkSearchBorderColor, ";\n\n input {\n box-shadow: none;\n }\n }\n\n &__append {\n border-color: ").concat(highContrastMode ? euiTheme.colors.plainLight : '', "\n }\n\n &:not(:focus-within) {\n /* Increase contrast of filled text to be more than placeholder text */\n color: ").concat(selectableSitewide.color, ";\n\n input {\n /* Increase contrast of placeholder text */\n &::placeholder {\n color: ").concat(selectableSitewide.placeholderColor, ";\n }\n\n /* Inherit color from form control layout */\n color: inherit;\n background-color: transparent;\n }\n\n .euiFormControlLayout__append,\n .euiFormControlLayout__prepend {\n background-color: transparent;\n }\n\n .euiFormLabel {\n color: inherit;\n }\n }\n }\n ");
64
+ highContrastMode ? euiTheme.colors.plainLight : euiTheme.components.headerDarkSearchBorderColor, ";\n\n input {\n box-shadow: none;\n }\n }\n\n &__append {\n border-color: ").concat(highContrastMode ? euiTheme.colors.plainLight : '', "\n }\n\n &:not(:focus-within) {\n /* Increase contrast of filled text to be more than placeholder text */\n color: ").concat(selectableSitewide.color, ";\n\n input {\n /* Increase contrast of placeholder text */\n &::placeholder {\n color: ").concat(selectableSitewide.placeholderColor, ";\n }\n\n /* Inherit color from form control layout */\n color: inherit;\n background-color: transparent;\n }\n\n .euiFormControlLayout__append,\n .euiFormControlLayout__prepend {\n background-color: transparent;\n }\n\n .euiFormLabel {\n color: inherit;\n }\n }\n }\n ");
65
+ return "\n background-color: ".concat(backgroundColor, ";\n\n .euiHeaderLogo__text,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n color: ").concat(euiTheme.colors.ghost, ";\n }\n\n .euiHeaderLink-isActive {\n color: ").concat(makeHighContrastColor(euiTheme.colors.primary)(backgroundColor), ";\n }\n\n .euiHeaderLogo,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n &:focus {\n background-color: ").concat(euiTheme.components.headerDarkSectionItemBackgroundFocus, ";\n }\n }\n\n .euiHeaderSectionItemButton__notification--badge {\n box-shadow: 0 0 0 ").concat(euiTheme.border.width.thin, " ").concat(backgroundColor, ";\n }\n\n .euiHeaderSectionItemButton__notification--dot {\n stroke: ").concat(backgroundColor, ";\n }\n\n ").concat(!isRefreshVariant && formLayoutStyles, " \n ");
64
66
  };
@@ -8,8 +8,10 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
8
8
  */
9
9
 
10
10
  import { css } from '@emotion/react';
11
+ import { isEuiThemeRefreshVariant } from '../../services';
11
12
  import { logicalCSS } from '../../global_styling';
12
13
  import { euiMarkdownEditorVariables } from './markdown_editor.styles';
14
+ import { euiFormControlInvalidStyles } from '../form/form.styles';
13
15
  var _ref = process.env.NODE_ENV === "production" ? {
14
16
  name: "gwjnpv-euiMarkdownEditorDropZone__input",
15
17
  styles: "position:absolute;inset:0;opacity:0;overflow:hidden;&:hover{cursor:pointer;}&:hover:disabled{cursor:not-allowed;};label:euiMarkdownEditorDropZone__input;"
@@ -20,13 +22,14 @@ var _ref = process.env.NODE_ENV === "production" ? {
20
22
  };
21
23
  export var euiMarkdownEditorDropZoneStyles = function euiMarkdownEditorDropZoneStyles(euiThemeContext) {
22
24
  var euiTheme = euiThemeContext.euiTheme;
25
+ var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'formVariant');
23
26
  var _euiMarkdownEditorVar = euiMarkdownEditorVariables(euiThemeContext),
24
27
  minHeight = _euiMarkdownEditorVar.minHeight;
25
28
  return {
26
29
  euiMarkdownEditorDropZone: /*#__PURE__*/css("position:relative;display:flex;flex-direction:column;", logicalCSS('min-height', minHeight), ";;label:euiMarkdownEditorDropZone;"),
27
- isDragging: /*#__PURE__*/css(".euiMarkdownEditorFooter,.euiMarkdownEditorTextArea{background-color:", euiTheme.colors.backgroundTransparentPrimary, "!important;};label:isDragging;"),
28
- isDraggingError: /*#__PURE__*/css(".euiMarkdownEditorFooter,.euiMarkdownEditorTextArea{background-color:", euiTheme.colors.backgroundTransparentDanger, "!important;};label:isDraggingError;"),
29
- hasError: /*#__PURE__*/css(".euiMarkdownEditorTextArea{--euiFormControlStateColor:", euiTheme.colors.danger, "!important;background-size:100% 100%;};label:hasError;"),
30
+ isDragging: /*#__PURE__*/css(".euiMarkdownEditorFooter,.euiMarkdownEditorTextArea{background-color:", isRefreshVariant ? euiTheme.colors.backgroundBasePrimary : euiTheme.colors.backgroundTransparentPrimary, "!important;};label:isDragging;"),
31
+ isDraggingError: /*#__PURE__*/css(".euiMarkdownEditorFooter,.euiMarkdownEditorTextArea{background-color:", isRefreshVariant ? euiTheme.colors.backgroundBaseDanger : euiTheme.colors.backgroundTransparentDanger, "!important;};label:isDraggingError;"),
32
+ hasError: /*#__PURE__*/css(".euiMarkdownEditorTextArea{--euiFormControlStateColor:", euiTheme.colors.danger, ";background-size:100% 100%;", isRefreshVariant && euiFormControlInvalidStyles(euiThemeContext), ";};label:hasError;"),
30
33
  euiMarkdownEditorDropZone__input: _ref
31
34
  };
32
35
  };
@@ -72,13 +72,13 @@ describe('EuiProgress', function () {
72
72
  cy.checkAxe();
73
73
  });
74
74
  it('displays correct progress values and labels', function () {
75
- cy.get('div[data-test-subj="cy-progress-1"] span.euiProgress__valueText').contains('0');
76
- cy.get('div[data-test-subj="cy-progress-2"] span.euiProgress__valueText').contains('33');
77
- cy.get('div[data-test-subj="cy-progress-3"] span.euiProgress__valueText').contains('66');
78
- cy.get('div[data-test-subj="cy-progress-4"] span.euiProgress__valueText').contains('100');
79
- cy.get('div[data-test-subj="cy-progress-5"] span.euiProgress__label').contains('Basic percentage');
80
- cy.get('div[data-test-subj="cy-progress-5"] span.euiProgress__valueText').contains('100');
81
- cy.get('div[data-test-subj="cy-progress-infinite"] span.euiProgress__valueText').should('not.exist');
75
+ cy.get('div[data-test-subj="cy-progress-1"] div.euiProgress__valueText').contains('0');
76
+ cy.get('div[data-test-subj="cy-progress-2"] div.euiProgress__valueText').contains('33');
77
+ cy.get('div[data-test-subj="cy-progress-3"] div.euiProgress__valueText').contains('66');
78
+ cy.get('div[data-test-subj="cy-progress-4"] div.euiProgress__valueText').contains('100');
79
+ cy.get('div[data-test-subj="cy-progress-5"] div.euiProgress__label').contains('Basic percentage');
80
+ cy.get('div[data-test-subj="cy-progress-5"] div.euiProgress__valueText').contains('100');
81
+ cy.get('div[data-test-subj="cy-progress-infinite"] div.euiProgress__valueText').should('not.exist');
82
82
  });
83
83
  });
84
84
  });
@@ -13,7 +13,6 @@ var _excluded = ["className", "color", "size", "position", "max", "valueText", "
13
13
  import React, { useState, useRef, useEffect } from 'react';
14
14
  import classNames from 'classnames';
15
15
  import { EuiI18n } from '../i18n';
16
- import { EuiInnerText } from '../inner_text';
17
16
  import { isNil } from '../../services/predicate';
18
17
  import { useEuiTheme, makeHighContrastColor } from '../../services';
19
18
  import { EuiScreenReaderOnly } from '../accessibility';
@@ -92,34 +91,26 @@ export var EuiProgress = function EuiProgress(_ref) {
92
91
  return ___EmotionJSX(React.Fragment, null, label || valueText ? ___EmotionJSX("div", {
93
92
  css: dataCssStyles,
94
93
  className: "euiProgress__data"
95
- }, label && ___EmotionJSX(EuiInnerText, null, function (_ref2, innerText) {
96
- return ___EmotionJSX("span", _extends({
97
- title: innerText,
98
- ref: function ref(node) {
99
- labelRef.current = node;
100
- _ref2 === null || _ref2 === void 0 || _ref2(node);
101
- }
102
- }, labelProps, {
103
- className: labelClasses,
104
- css: labelCssStyles,
105
- "aria-hidden": "true"
106
- }), label);
107
- }), valueRender && ___EmotionJSX(EuiInnerText, null, function (_ref3, innerText) {
108
- return ___EmotionJSX("span", {
109
- title: innerText,
110
- ref: function ref(node) {
111
- valueTextRef.current = node;
112
- _ref3 === null || _ref3 === void 0 || _ref3(node);
113
- },
114
- style: customTextColorStyles,
115
- css: valueTextCssStyles,
116
- className: "euiProgress__valueText",
117
- "aria-hidden": "true"
118
- }, valueRender);
119
- })) : undefined, ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("div", {
94
+ }, label && ___EmotionJSX("div", _extends({
95
+ ref: function ref(node) {
96
+ labelRef.current = node;
97
+ }
98
+ }, labelProps, {
99
+ className: labelClasses,
100
+ css: labelCssStyles,
101
+ "aria-hidden": "true"
102
+ }), label), valueRender && ___EmotionJSX("div", {
103
+ ref: function ref(node) {
104
+ valueTextRef.current = node;
105
+ },
106
+ style: customTextColorStyles,
107
+ css: valueTextCssStyles,
108
+ className: "euiProgress__valueText",
109
+ "aria-hidden": "true"
110
+ }, valueRender)) : undefined, ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("div", {
120
111
  "aria-live": "polite",
121
112
  "aria-atomic": "true"
122
- }, ___EmotionJSX("span", null, label && "".concat(label, " "), valueRender || value))), ___EmotionJSX("progress", _extends({
113
+ }, ___EmotionJSX("span", null, label && ___EmotionJSX(React.Fragment, null, labelText, " "), valueRender || value))), ___EmotionJSX("progress", _extends({
123
114
  css: cssStyles,
124
115
  className: classes,
125
116
  style: customColorStyles,