@elastic/eui 95.7.0 → 95.8.0-backport.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 (319) hide show
  1. package/dist/eui_theme_dark.css +0 -1163
  2. package/dist/eui_theme_dark.min.css +1 -1
  3. package/dist/eui_theme_light.css +0 -1163
  4. package/dist/eui_theme_light.min.css +1 -1
  5. package/es/components/combo_box/combo_box_input/combo_box_input.js +2 -1
  6. package/es/components/combo_box/combo_box_input/combo_box_input.styles.js +1 -5
  7. package/es/components/datagrid/controls/column_selector.js +1 -2
  8. package/es/components/datagrid/data_grid.a11y.js +2 -2
  9. package/es/components/date_picker/date_picker.js +11 -11
  10. package/es/components/date_picker/date_picker.styles.js +14 -2
  11. package/es/components/date_picker/date_picker_range.js +2 -1
  12. package/es/components/date_picker/date_picker_range.styles.js +17 -2
  13. package/es/components/date_picker/super_date_picker/super_date_picker.js +14 -2
  14. package/es/components/date_picker/super_date_picker/super_date_picker.styles.js +4 -4
  15. package/es/components/form/checkbox/checkbox.js +28 -25
  16. package/es/components/form/checkbox/checkbox.styles.js +62 -0
  17. package/es/components/form/described_form_group/described_form_group.js +17 -9
  18. package/es/components/form/described_form_group/described_form_group.styles.js +26 -0
  19. package/es/components/form/field_number/field_number.js +1 -0
  20. package/es/components/form/field_number/field_number.styles.js +2 -1
  21. package/es/components/form/field_password/field_password.js +6 -3
  22. package/es/components/form/field_search/field_search.js +39 -29
  23. package/es/components/form/field_text/field_text.js +1 -0
  24. package/es/components/form/form.js +7 -4
  25. package/es/components/form/form.styles.js +87 -39
  26. package/es/components/form/form_control_layout/_num_icons.js +7 -33
  27. package/es/components/form/form_control_layout/form_control_layout.js +67 -32
  28. package/es/components/form/form_control_layout/form_control_layout.styles.js +72 -0
  29. package/es/components/form/form_control_layout/form_control_layout_clear_button.js +20 -23
  30. package/es/components/form/form_control_layout/form_control_layout_clear_button.styles.js +22 -0
  31. package/es/components/form/form_control_layout/form_control_layout_custom_icon.js +30 -5
  32. package/es/components/form/form_control_layout/form_control_layout_delimited.js +37 -7
  33. package/es/components/form/form_control_layout/form_control_layout_delimited.styles.js +52 -0
  34. package/es/components/form/form_control_layout/form_control_layout_icons.js +33 -13
  35. package/es/components/form/form_control_layout/form_control_layout_icons.styles.js +54 -0
  36. package/es/components/form/form_error_text/form_error_text.js +4 -0
  37. package/es/components/form/form_error_text/form_error_text.styles.js +16 -0
  38. package/es/components/form/form_fieldset/form_legend.js +6 -2
  39. package/es/components/form/form_fieldset/form_legend.styles.js +20 -0
  40. package/es/components/form/form_help_text/form_help_text.js +4 -0
  41. package/es/components/form/form_help_text/form_help_text.styles.js +16 -0
  42. package/es/components/form/form_label/form_label.js +6 -0
  43. package/es/components/form/form_label/form_label.styles.js +38 -0
  44. package/es/components/form/form_row/form_row.js +156 -223
  45. package/es/components/form/form_row/form_row.styles.js +49 -0
  46. package/es/components/form/radio/radio.js +21 -14
  47. package/es/components/form/radio/radio.styles.js +34 -0
  48. package/es/components/form/range/range.styles.js +1 -1
  49. package/es/components/form/range/range_input.styles.js +1 -1
  50. package/es/components/form/range/range_slider.styles.js +1 -4
  51. package/es/components/form/range/range_thumb.styles.js +1 -4
  52. package/es/components/form/switch/switch.js +43 -24
  53. package/es/components/form/switch/switch.styles.js +226 -0
  54. package/es/components/form/text_area/text_area.js +1 -0
  55. package/es/components/form/text_area/text_area.styles.js +1 -1
  56. package/es/components/header/header_links/header_link.js +9 -13
  57. package/es/components/header/header_links/header_links.js +1 -1
  58. package/es/components/header/header_links/header_links.styles.js +1 -1
  59. package/es/services/emotion/clone_element.js +5 -3
  60. package/eui.d.ts +403 -112
  61. package/i18ntokens.json +48 -30
  62. package/lib/components/combo_box/combo_box_input/combo_box_input.js +2 -1
  63. package/lib/components/combo_box/combo_box_input/combo_box_input.styles.js +1 -5
  64. package/lib/components/datagrid/controls/column_selector.js +1 -2
  65. package/lib/components/datagrid/data_grid.a11y.js +2 -2
  66. package/lib/components/date_picker/date_picker.js +11 -11
  67. package/lib/components/date_picker/date_picker.styles.js +14 -2
  68. package/lib/components/date_picker/date_picker_range.js +2 -1
  69. package/lib/components/date_picker/date_picker_range.styles.js +17 -4
  70. package/lib/components/date_picker/super_date_picker/super_date_picker.js +14 -2
  71. package/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +4 -4
  72. package/lib/components/form/checkbox/checkbox.js +27 -23
  73. package/lib/components/form/checkbox/checkbox.styles.js +66 -0
  74. package/lib/components/form/described_form_group/described_form_group.js +17 -9
  75. package/lib/components/form/described_form_group/described_form_group.styles.js +32 -0
  76. package/lib/components/form/field_number/field_number.js +1 -0
  77. package/lib/components/form/field_number/field_number.styles.js +2 -1
  78. package/lib/components/form/field_password/field_password.js +6 -3
  79. package/lib/components/form/field_search/field_search.js +39 -29
  80. package/lib/components/form/field_text/field_text.js +1 -0
  81. package/lib/components/form/form.js +6 -3
  82. package/lib/components/form/form.styles.js +88 -40
  83. package/lib/components/form/form_control_layout/_num_icons.js +8 -33
  84. package/lib/components/form/form_control_layout/form_control_layout.js +65 -31
  85. package/lib/components/form/form_control_layout/form_control_layout.styles.js +76 -0
  86. package/lib/components/form/form_control_layout/form_control_layout_clear_button.js +20 -23
  87. package/lib/components/form/form_control_layout/form_control_layout_clear_button.styles.js +28 -0
  88. package/lib/components/form/form_control_layout/form_control_layout_custom_icon.js +34 -11
  89. package/lib/components/form/form_control_layout/form_control_layout_delimited.js +36 -9
  90. package/lib/components/form/form_control_layout/form_control_layout_delimited.styles.js +56 -0
  91. package/lib/components/form/form_control_layout/form_control_layout_icons.js +33 -13
  92. package/lib/components/form/form_control_layout/form_control_layout_icons.styles.js +58 -0
  93. package/lib/components/form/form_error_text/form_error_text.js +4 -0
  94. package/lib/components/form/form_error_text/form_error_text.styles.js +22 -0
  95. package/lib/components/form/form_fieldset/form_legend.js +6 -2
  96. package/lib/components/form/form_fieldset/form_legend.styles.js +26 -0
  97. package/lib/components/form/form_help_text/form_help_text.js +4 -0
  98. package/lib/components/form/form_help_text/form_help_text.styles.js +22 -0
  99. package/lib/components/form/form_label/form_label.js +6 -0
  100. package/lib/components/form/form_label/form_label.styles.js +43 -0
  101. package/lib/components/form/form_row/form_row.js +161 -226
  102. package/lib/components/form/form_row/form_row.styles.js +55 -0
  103. package/lib/components/form/radio/radio.js +21 -14
  104. package/lib/components/form/radio/radio.styles.js +40 -0
  105. package/lib/components/form/range/range.styles.js +1 -1
  106. package/lib/components/form/range/range_input.styles.js +1 -1
  107. package/lib/components/form/range/range_slider.styles.js +1 -4
  108. package/lib/components/form/range/range_thumb.styles.js +1 -4
  109. package/lib/components/form/switch/switch.js +46 -26
  110. package/lib/components/form/switch/switch.styles.js +230 -0
  111. package/lib/components/form/text_area/text_area.js +1 -0
  112. package/lib/components/form/text_area/text_area.styles.js +1 -1
  113. package/lib/components/header/header_links/header_link.js +9 -13
  114. package/lib/components/header/header_links/header_links.js +1 -1
  115. package/lib/components/header/header_links/header_links.styles.js +1 -1
  116. package/lib/services/emotion/clone_element.js +5 -3
  117. package/optimize/es/components/combo_box/combo_box_input/combo_box_input.js +2 -1
  118. package/optimize/es/components/combo_box/combo_box_input/combo_box_input.styles.js +1 -5
  119. package/optimize/es/components/datagrid/controls/column_selector.js +1 -2
  120. package/optimize/es/components/datagrid/data_grid.a11y.js +2 -2
  121. package/optimize/es/components/date_picker/date_picker.js +6 -9
  122. package/optimize/es/components/date_picker/date_picker.styles.js +14 -2
  123. package/optimize/es/components/date_picker/date_picker_range.js +2 -1
  124. package/optimize/es/components/date_picker/date_picker_range.styles.js +17 -2
  125. package/optimize/es/components/date_picker/super_date_picker/super_date_picker.js +13 -2
  126. package/optimize/es/components/date_picker/super_date_picker/super_date_picker.styles.js +4 -4
  127. package/optimize/es/components/form/checkbox/checkbox.js +28 -25
  128. package/optimize/es/components/form/checkbox/checkbox.styles.js +62 -0
  129. package/optimize/es/components/form/described_form_group/described_form_group.js +17 -9
  130. package/optimize/es/components/form/described_form_group/described_form_group.styles.js +26 -0
  131. package/optimize/es/components/form/field_number/field_number.js +1 -0
  132. package/optimize/es/components/form/field_number/field_number.styles.js +2 -1
  133. package/optimize/es/components/form/field_password/field_password.js +6 -3
  134. package/optimize/es/components/form/field_search/field_search.js +39 -29
  135. package/optimize/es/components/form/field_text/field_text.js +1 -0
  136. package/optimize/es/components/form/form.js +7 -4
  137. package/optimize/es/components/form/form.styles.js +87 -39
  138. package/optimize/es/components/form/form_control_layout/_num_icons.js +7 -33
  139. package/optimize/es/components/form/form_control_layout/form_control_layout.js +44 -29
  140. package/optimize/es/components/form/form_control_layout/form_control_layout.styles.js +72 -0
  141. package/optimize/es/components/form/form_control_layout/form_control_layout_clear_button.js +19 -22
  142. package/optimize/es/components/form/form_control_layout/form_control_layout_clear_button.styles.js +22 -0
  143. package/optimize/es/components/form/form_control_layout/form_control_layout_custom_icon.js +29 -4
  144. package/optimize/es/components/form/form_control_layout/form_control_layout_delimited.js +34 -7
  145. package/optimize/es/components/form/form_control_layout/form_control_layout_delimited.styles.js +52 -0
  146. package/optimize/es/components/form/form_control_layout/form_control_layout_icons.js +25 -11
  147. package/optimize/es/components/form/form_control_layout/form_control_layout_icons.styles.js +54 -0
  148. package/optimize/es/components/form/form_error_text/form_error_text.js +4 -0
  149. package/optimize/es/components/form/form_error_text/form_error_text.styles.js +16 -0
  150. package/optimize/es/components/form/form_fieldset/form_legend.js +6 -2
  151. package/optimize/es/components/form/form_fieldset/form_legend.styles.js +20 -0
  152. package/optimize/es/components/form/form_help_text/form_help_text.js +4 -0
  153. package/optimize/es/components/form/form_help_text/form_help_text.styles.js +16 -0
  154. package/optimize/es/components/form/form_label/form_label.js +6 -0
  155. package/optimize/es/components/form/form_label/form_label.styles.js +37 -0
  156. package/optimize/es/components/form/form_row/form_row.js +135 -201
  157. package/optimize/es/components/form/form_row/form_row.styles.js +49 -0
  158. package/optimize/es/components/form/radio/radio.js +21 -14
  159. package/optimize/es/components/form/radio/radio.styles.js +34 -0
  160. package/optimize/es/components/form/range/range.styles.js +1 -1
  161. package/optimize/es/components/form/range/range_input.styles.js +1 -1
  162. package/optimize/es/components/form/range/range_slider.styles.js +1 -4
  163. package/optimize/es/components/form/range/range_thumb.styles.js +1 -4
  164. package/optimize/es/components/form/switch/switch.js +29 -23
  165. package/optimize/es/components/form/switch/switch.styles.js +226 -0
  166. package/optimize/es/components/form/text_area/text_area.js +1 -0
  167. package/optimize/es/components/form/text_area/text_area.styles.js +1 -1
  168. package/optimize/es/components/header/header_links/header_link.js +9 -10
  169. package/optimize/es/components/header/header_links/header_links.js +1 -1
  170. package/optimize/es/components/header/header_links/header_links.styles.js +1 -1
  171. package/optimize/es/services/emotion/clone_element.js +5 -3
  172. package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.js +2 -1
  173. package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.styles.js +1 -5
  174. package/optimize/lib/components/datagrid/controls/column_selector.js +1 -2
  175. package/optimize/lib/components/datagrid/data_grid.a11y.js +2 -2
  176. package/optimize/lib/components/date_picker/date_picker.js +6 -9
  177. package/optimize/lib/components/date_picker/date_picker.styles.js +14 -2
  178. package/optimize/lib/components/date_picker/date_picker_range.js +2 -1
  179. package/optimize/lib/components/date_picker/date_picker_range.styles.js +17 -4
  180. package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.js +13 -2
  181. package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +4 -4
  182. package/optimize/lib/components/form/checkbox/checkbox.js +27 -23
  183. package/optimize/lib/components/form/checkbox/checkbox.styles.js +66 -0
  184. package/optimize/lib/components/form/described_form_group/described_form_group.js +17 -9
  185. package/optimize/lib/components/form/described_form_group/described_form_group.styles.js +32 -0
  186. package/optimize/lib/components/form/field_number/field_number.js +1 -0
  187. package/optimize/lib/components/form/field_number/field_number.styles.js +2 -1
  188. package/optimize/lib/components/form/field_password/field_password.js +6 -3
  189. package/optimize/lib/components/form/field_search/field_search.js +39 -29
  190. package/optimize/lib/components/form/field_text/field_text.js +1 -0
  191. package/optimize/lib/components/form/form.js +6 -3
  192. package/optimize/lib/components/form/form.styles.js +88 -40
  193. package/optimize/lib/components/form/form_control_layout/_num_icons.js +8 -33
  194. package/optimize/lib/components/form/form_control_layout/form_control_layout.js +43 -28
  195. package/optimize/lib/components/form/form_control_layout/form_control_layout.styles.js +76 -0
  196. package/optimize/lib/components/form/form_control_layout/form_control_layout_clear_button.js +19 -22
  197. package/optimize/lib/components/form/form_control_layout/form_control_layout_clear_button.styles.js +28 -0
  198. package/optimize/lib/components/form/form_control_layout/form_control_layout_custom_icon.js +29 -6
  199. package/optimize/lib/components/form/form_control_layout/form_control_layout_delimited.js +34 -10
  200. package/optimize/lib/components/form/form_control_layout/form_control_layout_delimited.styles.js +56 -0
  201. package/optimize/lib/components/form/form_control_layout/form_control_layout_icons.js +25 -11
  202. package/optimize/lib/components/form/form_control_layout/form_control_layout_icons.styles.js +58 -0
  203. package/optimize/lib/components/form/form_error_text/form_error_text.js +4 -0
  204. package/optimize/lib/components/form/form_error_text/form_error_text.styles.js +22 -0
  205. package/optimize/lib/components/form/form_fieldset/form_legend.js +6 -2
  206. package/optimize/lib/components/form/form_fieldset/form_legend.styles.js +26 -0
  207. package/optimize/lib/components/form/form_help_text/form_help_text.js +4 -0
  208. package/optimize/lib/components/form/form_help_text/form_help_text.styles.js +22 -0
  209. package/optimize/lib/components/form/form_label/form_label.js +6 -0
  210. package/optimize/lib/components/form/form_label/form_label.styles.js +43 -0
  211. package/optimize/lib/components/form/form_row/form_row.js +136 -201
  212. package/optimize/lib/components/form/form_row/form_row.styles.js +55 -0
  213. package/optimize/lib/components/form/radio/radio.js +21 -14
  214. package/optimize/lib/components/form/radio/radio.styles.js +40 -0
  215. package/optimize/lib/components/form/range/range.styles.js +1 -1
  216. package/optimize/lib/components/form/range/range_input.styles.js +1 -1
  217. package/optimize/lib/components/form/range/range_slider.styles.js +1 -4
  218. package/optimize/lib/components/form/range/range_thumb.styles.js +1 -4
  219. package/optimize/lib/components/form/switch/switch.js +32 -25
  220. package/optimize/lib/components/form/switch/switch.styles.js +230 -0
  221. package/optimize/lib/components/form/text_area/text_area.js +1 -0
  222. package/optimize/lib/components/form/text_area/text_area.styles.js +1 -1
  223. package/optimize/lib/components/header/header_links/header_link.js +9 -10
  224. package/optimize/lib/components/header/header_links/header_links.js +1 -1
  225. package/optimize/lib/components/header/header_links/header_links.styles.js +1 -1
  226. package/optimize/lib/services/emotion/clone_element.js +5 -3
  227. package/package.json +3 -2
  228. package/src/components/datagrid/controls/_data_grid_toolbar.scss +1 -1
  229. package/src/components/index.scss +0 -1
  230. package/src/global_styling/mixins/_form.scss +0 -99
  231. package/src/global_styling/mixins/_index.scss +0 -1
  232. package/src/global_styling/variables/_form.scss +0 -21
  233. package/src/themes/amsterdam/global_styling/mixins/_index.scss +0 -1
  234. package/src/themes/amsterdam/overrides/_index.scss +0 -3
  235. package/test-env/components/combo_box/combo_box_input/combo_box_input.js +2 -1
  236. package/test-env/components/combo_box/combo_box_input/combo_box_input.styles.js +1 -5
  237. package/test-env/components/datagrid/controls/column_selector.js +1 -2
  238. package/test-env/components/datagrid/data_grid.a11y.js +2 -2
  239. package/test-env/components/date_picker/date_picker.js +6 -9
  240. package/test-env/components/date_picker/date_picker.styles.js +14 -2
  241. package/test-env/components/date_picker/date_picker_range.js +2 -1
  242. package/test-env/components/date_picker/date_picker_range.styles.js +17 -4
  243. package/test-env/components/date_picker/super_date_picker/super_date_picker.js +13 -2
  244. package/test-env/components/date_picker/super_date_picker/super_date_picker.styles.js +4 -4
  245. package/test-env/components/form/checkbox/checkbox.js +27 -23
  246. package/test-env/components/form/checkbox/checkbox.styles.js +66 -0
  247. package/test-env/components/form/described_form_group/described_form_group.js +17 -9
  248. package/test-env/components/form/described_form_group/described_form_group.styles.js +32 -0
  249. package/test-env/components/form/field_number/field_number.js +1 -0
  250. package/test-env/components/form/field_number/field_number.styles.js +2 -1
  251. package/test-env/components/form/field_password/field_password.js +6 -3
  252. package/test-env/components/form/field_search/field_search.js +39 -29
  253. package/test-env/components/form/field_text/field_text.js +1 -0
  254. package/test-env/components/form/form.js +6 -3
  255. package/test-env/components/form/form.styles.js +88 -40
  256. package/test-env/components/form/form_control_layout/_num_icons.js +8 -33
  257. package/test-env/components/form/form_control_layout/form_control_layout.js +58 -31
  258. package/test-env/components/form/form_control_layout/form_control_layout.styles.js +76 -0
  259. package/test-env/components/form/form_control_layout/form_control_layout_clear_button.js +20 -23
  260. package/test-env/components/form/form_control_layout/form_control_layout_clear_button.styles.js +28 -0
  261. package/test-env/components/form/form_control_layout/form_control_layout_custom_icon.js +30 -7
  262. package/test-env/components/form/form_control_layout/form_control_layout_delimited.js +34 -10
  263. package/test-env/components/form/form_control_layout/form_control_layout_delimited.styles.js +56 -0
  264. package/test-env/components/form/form_control_layout/form_control_layout_icons.js +28 -13
  265. package/test-env/components/form/form_control_layout/form_control_layout_icons.styles.js +58 -0
  266. package/test-env/components/form/form_error_text/form_error_text.js +4 -0
  267. package/test-env/components/form/form_error_text/form_error_text.styles.js +22 -0
  268. package/test-env/components/form/form_fieldset/form_legend.js +6 -2
  269. package/test-env/components/form/form_fieldset/form_legend.styles.js +26 -0
  270. package/test-env/components/form/form_help_text/form_help_text.js +4 -0
  271. package/test-env/components/form/form_help_text/form_help_text.styles.js +22 -0
  272. package/test-env/components/form/form_label/form_label.js +6 -0
  273. package/test-env/components/form/form_label/form_label.styles.js +43 -0
  274. package/test-env/components/form/form_row/form_row.js +153 -216
  275. package/test-env/components/form/form_row/form_row.styles.js +55 -0
  276. package/test-env/components/form/radio/radio.js +21 -14
  277. package/test-env/components/form/radio/radio.styles.js +40 -0
  278. package/test-env/components/form/range/range.styles.js +1 -1
  279. package/test-env/components/form/range/range_input.styles.js +1 -1
  280. package/test-env/components/form/range/range_slider.styles.js +1 -4
  281. package/test-env/components/form/range/range_thumb.styles.js +1 -4
  282. package/test-env/components/form/switch/switch.js +41 -26
  283. package/test-env/components/form/switch/switch.styles.js +230 -0
  284. package/test-env/components/form/text_area/text_area.js +1 -0
  285. package/test-env/components/form/text_area/text_area.styles.js +1 -1
  286. package/test-env/components/header/header_links/header_link.js +9 -10
  287. package/test-env/components/header/header_links/header_links.js +1 -1
  288. package/test-env/components/header/header_links/header_links.styles.js +1 -1
  289. package/test-env/services/emotion/clone_element.js +5 -3
  290. package/src/components/form/_form.scss +0 -8
  291. package/src/components/form/_index.scss +0 -11
  292. package/src/components/form/checkbox/_checkbox.scss +0 -115
  293. package/src/components/form/checkbox/_index.scss +0 -1
  294. package/src/components/form/described_form_group/_described_form_group.scss +0 -34
  295. package/src/components/form/described_form_group/_index.scss +0 -1
  296. package/src/components/form/form_control_layout/_form_control_layout.scss +0 -203
  297. package/src/components/form/form_control_layout/_form_control_layout_clear_button.scss +0 -7
  298. package/src/components/form/form_control_layout/_form_control_layout_custom_icon.scss +0 -24
  299. package/src/components/form/form_control_layout/_form_control_layout_delimited.scss +0 -67
  300. package/src/components/form/form_control_layout/_form_control_layout_icons.scss +0 -54
  301. package/src/components/form/form_control_layout/_index.scss +0 -5
  302. package/src/components/form/form_error_text/_form_error_text.scss +0 -5
  303. package/src/components/form/form_error_text/_index.scss +0 -1
  304. package/src/components/form/form_fieldset/_form_legend.scss +0 -11
  305. package/src/components/form/form_fieldset/_index.scss +0 -1
  306. package/src/components/form/form_help_text/_form_help_text.scss +0 -5
  307. package/src/components/form/form_help_text/_index.scss +0 -1
  308. package/src/components/form/form_label/_form_label.scss +0 -25
  309. package/src/components/form/form_label/_index.scss +0 -1
  310. package/src/components/form/form_row/_form_row.scss +0 -102
  311. package/src/components/form/form_row/_index.scss +0 -1
  312. package/src/components/form/radio/_index.scss +0 -1
  313. package/src/components/form/radio/_radio.scss +0 -87
  314. package/src/components/form/switch/_index.scss +0 -1
  315. package/src/components/form/switch/_switch.scss +0 -212
  316. package/src/global_styling/mixins/_icons.scss +0 -17
  317. package/src/themes/amsterdam/overrides/_form_control_layout.scss +0 -112
  318. package/src/themes/amsterdam/overrides/_form_control_layout_delimited.scss +0 -42
  319. package/src/themes/amsterdam/overrides/_form_controls.scss +0 -19
package/i18ntokens.json CHANGED
@@ -1391,14 +1391,14 @@
1391
1391
  "highlighting": "string",
1392
1392
  "loc": {
1393
1393
  "start": {
1394
- "line": 281,
1394
+ "line": 280,
1395
1395
  "column": 18,
1396
- "index": 10032
1396
+ "index": 9968
1397
1397
  },
1398
1398
  "end": {
1399
- "line": 284,
1399
+ "line": 283,
1400
1400
  "column": 20,
1401
- "index": 10156
1401
+ "index": 10092
1402
1402
  }
1403
1403
  },
1404
1404
  "filepath": "src/components/datagrid/controls/column_selector.tsx"
@@ -1409,14 +1409,14 @@
1409
1409
  "highlighting": "string",
1410
1410
  "loc": {
1411
1411
  "start": {
1412
- "line": 294,
1412
+ "line": 293,
1413
1413
  "column": 18,
1414
- "index": 10516
1414
+ "index": 10452
1415
1415
  },
1416
1416
  "end": {
1417
- "line": 297,
1417
+ "line": 296,
1418
1418
  "column": 20,
1419
- "index": 10638
1419
+ "index": 10574
1420
1420
  }
1421
1421
  },
1422
1422
  "filepath": "src/components/datagrid/controls/column_selector.tsx"
@@ -4793,14 +4793,14 @@
4793
4793
  "highlighting": "string",
4794
4794
  "loc": {
4795
4795
  "start": {
4796
- "line": 104,
4796
+ "line": 105,
4797
4797
  "column": 49,
4798
- "index": 2946
4798
+ "index": 2960
4799
4799
  },
4800
4800
  "end": {
4801
- "line": 110,
4801
+ "line": 111,
4802
4802
  "column": 3,
4803
- "index": 3167
4803
+ "index": 3181
4804
4804
  }
4805
4805
  },
4806
4806
  "filepath": "src/components/form/field_password/field_password.tsx"
@@ -4811,18 +4811,36 @@
4811
4811
  "highlighting": "string",
4812
4812
  "loc": {
4813
4813
  "start": {
4814
- "line": 104,
4814
+ "line": 105,
4815
4815
  "column": 49,
4816
- "index": 2946
4816
+ "index": 2960
4817
4817
  },
4818
4818
  "end": {
4819
- "line": 110,
4819
+ "line": 111,
4820
4820
  "column": 3,
4821
- "index": 3167
4821
+ "index": 3181
4822
4822
  }
4823
4823
  },
4824
4824
  "filepath": "src/components/form/field_password/field_password.tsx"
4825
4825
  },
4826
+ {
4827
+ "token": "euiFieldSearch.clearSearchButtonLabel",
4828
+ "defString": "Clear search input",
4829
+ "highlighting": "string",
4830
+ "loc": {
4831
+ "start": {
4832
+ "line": 260,
4833
+ "column": 6,
4834
+ "index": 7437
4835
+ },
4836
+ "end": {
4837
+ "line": 263,
4838
+ "column": 7,
4839
+ "index": 7544
4840
+ }
4841
+ },
4842
+ "filepath": "src/components/form/field_search/field_search.tsx"
4843
+ },
4826
4844
  {
4827
4845
  "token": "euiFilePicker.promptText",
4828
4846
  "defString": "Select or drag and drop a file",
@@ -4901,14 +4919,14 @@
4901
4919
  "highlighting": "string",
4902
4920
  "loc": {
4903
4921
  "start": {
4904
- "line": 38,
4905
- "column": 4,
4906
- "index": 1180
4922
+ "line": 34,
4923
+ "column": 20,
4924
+ "index": 1321
4907
4925
  },
4908
4926
  "end": {
4909
- "line": 41,
4910
- "column": 5,
4911
- "index": 1274
4927
+ "line": 37,
4928
+ "column": 3,
4929
+ "index": 1399
4912
4930
  }
4913
4931
  },
4914
4932
  "filepath": "src/components/form/form_control_layout/form_control_layout_clear_button.tsx"
@@ -4919,14 +4937,14 @@
4919
4937
  "highlighting": "string",
4920
4938
  "loc": {
4921
4939
  "start": {
4922
- "line": 82,
4940
+ "line": 121,
4923
4941
  "column": 27,
4924
- "index": 2237
4942
+ "index": 3395
4925
4943
  },
4926
4944
  "end": {
4927
- "line": 85,
4945
+ "line": 124,
4928
4946
  "column": 3,
4929
- "index": 2313
4947
+ "index": 3471
4930
4948
  }
4931
4949
  },
4932
4950
  "filepath": "src/components/form/form_control_layout/form_control_layout_delimited.tsx"
@@ -4937,14 +4955,14 @@
4937
4955
  "highlighting": "string",
4938
4956
  "loc": {
4939
4957
  "start": {
4940
- "line": 94,
4958
+ "line": 97,
4941
4959
  "column": 8,
4942
- "index": 2536
4960
+ "index": 2581
4943
4961
  },
4944
4962
  "end": {
4945
- "line": 97,
4963
+ "line": 100,
4946
4964
  "column": 9,
4947
- "index": 2657
4965
+ "index": 2702
4948
4966
  }
4949
4967
  },
4950
4968
  "filepath": "src/components/form/form.tsx"
@@ -257,13 +257,14 @@ var EuiComboBoxInput = exports.EuiComboBoxInput = /*#__PURE__*/function (_Compon
257
257
  return (0, _react2.jsx)(_services.RenderWithEuiStylesMemoizer, null, function (stylesMemoizer) {
258
258
  var styles = stylesMemoizer(_combo_box_input.euiComboBoxInputStyles);
259
259
  var cssStyles = [styles.euiComboBoxInputWrapper, !singleSelection && styles.multiSelect, compressed ? styles.compressed : styles.uncompressed].concat(_toConsumableArray(_this2.asPlainText || showPlaceholder ? [styles.plainText.plainText, compressed ? styles.plainText.compressed : styles.plainText.uncompressed] : []), [isDisabled ? styles.disabled : isInvalid ? styles.invalid : isListOpen ? styles.open : undefined, isInGroup && styles.inGroup]);
260
- var formLayoutStyles = [styles.formLayout.euiComboBox__formControlLayout, !singleSelection && styles.formLayout.multiSelect, isInGroup && !append && styles.formLayout.prependOnly, isInGroup && !prepend && styles.formLayout.appendOnly];
260
+ var formLayoutStyles = [styles.formLayout.euiComboBox__formControlLayout, !singleSelection && styles.formLayout.multiSelect];
261
261
  return (0, _react2.jsx)(_form_control_layout.EuiFormControlLayout, _extends({
262
262
  icon: icon
263
263
  }, clickProps, {
264
264
  inputId: id,
265
265
  isLoading: isLoading,
266
266
  isInvalid: isInvalid,
267
+ isDisabled: isDisabled,
267
268
  compressed: compressed,
268
269
  fullWidth: fullWidth,
269
270
  prepend: prepend,
@@ -54,11 +54,7 @@ var euiComboBoxInputStyles = exports.euiComboBoxInputStyles = function euiComboB
54
54
  formLayout: {
55
55
  euiComboBox__formControlLayout: /*#__PURE__*/(0, _react.css)(";label:euiComboBox__formControlLayout;"),
56
56
  // Allow the form control to expand to any height to accommodate multiple rows of pills
57
- // TODO: Remove && specificity override once EuiFormControlLayout is on Emotion
58
- multiSelect: /*#__PURE__*/(0, _react.css)("&&{", (0, _global_styling.logicalCSS)('height', 'auto'), ";};label:multiSelect;"),
59
- // Fix overflowing input wrapper background
60
- prependOnly: /*#__PURE__*/(0, _react.css)(".euiFormControlLayout__childrenWrapper{", (0, _global_styling.logicalCSS)('border-top-right-radius', 'inherit'), " ", (0, _global_styling.logicalCSS)('border-bottom-right-radius', 'inherit'), ";};label:prependOnly;"),
61
- appendOnly: /*#__PURE__*/(0, _react.css)(".euiFormControlLayout__childrenWrapper{", (0, _global_styling.logicalCSS)('border-top-left-radius', 'inherit'), " ", (0, _global_styling.logicalCSS)('border-bottom-left-radius', 'inherit'), ";};label:appendOnly;")
57
+ multiSelect: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', 'auto'), ";;label:multiSelect;")
62
58
  }
63
59
  };
64
60
  };
@@ -167,8 +167,7 @@ var useDataGridColumnSelector = exports.useDataGridColumnSelector = function use
167
167
  label: displayValues[id] || id,
168
168
  showLabel: false,
169
169
  checked: visibleColumnIds.has(id),
170
- compressed: true,
171
- className: "euiSwitch--mini",
170
+ mini: true,
172
171
  onChange: function onChange(event) {
173
172
  var checked = event.target.checked;
174
173
  var nextVisibleColumns = sortedColumns.filter(function (columnId) {
@@ -183,7 +183,7 @@ describe('EuiDataGrid', function () {
183
183
  it('has zero violations when the columns reorder searchbox returns multiple results', function () {
184
184
  cy.get('button[data-test-subj="dataGridColumnSelectorButton"]').realClick();
185
185
  cy.get('input[data-test-subj="dataGridColumnSelectorSearch"]').type('a');
186
- cy.get('div.euiSwitch--compressed').should(function ($s) {
186
+ cy.get('.euiSwitch').should(function ($s) {
187
187
  expect($s).to.have.length(5);
188
188
  });
189
189
  cy.checkAxe();
@@ -191,7 +191,7 @@ describe('EuiDataGrid', function () {
191
191
  it('has zero violations when the columns reorder searchbox returns 1 result', function () {
192
192
  cy.get('button[data-test-subj="dataGridColumnSelectorButton"]').realClick();
193
193
  cy.get('input[data-test-subj="dataGridColumnSelectorSearch"]').type('favorite');
194
- cy.get('div.euiSwitch--compressed').should(function ($s) {
194
+ cy.get('.euiSwitch').should(function ($s) {
195
195
  expect($s).to.have.length(1);
196
196
  });
197
197
  cy.checkAxe();
@@ -29,10 +29,14 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
29
29
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
30
30
  function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
31
31
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
32
- function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
33
- function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
34
32
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
35
33
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
34
+ function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
35
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
36
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
37
+ function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
38
+ function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
39
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
36
40
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
37
41
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
38
42
  var euiDatePickerDefaultDateFormat = exports.euiDatePickerDefaultDateFormat = 'MM/DD/YYYY';
@@ -115,14 +119,13 @@ var EuiDatePicker = exports.EuiDatePicker = function EuiDatePicker(_ref) {
115
119
  timeFormat = _ref$timeFormat === void 0 ? euiDatePickerDefaultTimeFormat : _ref$timeFormat,
116
120
  utcOffset = _ref.utcOffset,
117
121
  rest = _objectWithoutProperties(_ref, _excluded);
122
+ // Check for whether the passed `selected` moment date is valid
123
+ var isInvalid = _isInvalid || ((selected === null || selected === void 0 ? void 0 : selected.isValid()) === false ? true : undefined);
118
124
  var styles = (0, _services.useEuiMemoizedStyles)(_date_picker.euiDatePickerStyles);
119
- var cssStyles = [styles.euiDatePicker, inline && styles.inline, inline && shadow && styles.shadow];
125
+ var cssStyles = [styles.euiDatePicker].concat(_toConsumableArray(inline ? [styles.inline.inline, isInvalid && !(disabled || readOnly) && styles.inline.invalid, shadow ? styles.inline.shadow : styles.inline.noShadow, disabled && styles.inline.disabled, readOnly && styles.inline.readOnly] : []));
120
126
  var calendarStyles = (0, _services.useEuiMemoizedStyles)(_react_date_picker.euiReactDatePickerStyles);
121
127
  var classes = (0, _classnames.default)('euiDatePicker', className);
122
128
 
123
- // Check for whether the passed `selected` moment date is valid
124
- var isInvalid = _isInvalid || ((selected === null || selected === void 0 ? void 0 : selected.isValid()) === false ? true : undefined);
125
-
126
129
  // Passed to the default EuiFieldText input, not passed to custom inputs
127
130
  var defaultInputProps = !inline && !customInput ? {
128
131
  compressed: compressed,
@@ -213,11 +216,8 @@ var EuiDatePicker = exports.EuiDatePicker = function EuiDatePicker(_ref) {
213
216
  isInvalid: isInvalid,
214
217
  isDisabled: disabled,
215
218
  readOnly: readOnly,
216
- className: (0, _classnames.default)({
217
- // Take advantage of `euiFormControlLayoutDelimited`'s replacement input styling
218
- euiFormControlLayoutDelimited: inline,
219
- 'euiFormControlLayoutDelimited--isInvalid': inline && isInvalid && !disabled && !readOnly
220
- }),
219
+ isDelimited: inline // Styling shortcut for inline calendars
220
+ ,
221
221
  iconsPosition: inline ? 'static' : undefined
222
222
  }, control));
223
223
  };
@@ -7,6 +7,7 @@ exports.euiDatePickerStyles = void 0;
7
7
  var _react = require("@emotion/react");
8
8
  var _global_styling = require("../../global_styling");
9
9
  var _mixins = require("../../themes/amsterdam/global_styling/mixins");
10
+ var _form = require("../form/form.styles");
10
11
  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
12
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
12
13
  * or more contributor license agreements. Licensed under the Elastic License
@@ -26,7 +27,18 @@ var euiDatePickerStyles = exports.euiDatePickerStyles = function euiDatePickerSt
26
27
  var euiTheme = euiThemeContext.euiTheme;
27
28
  return {
28
29
  euiDatePicker: _ref,
29
- inline: /*#__PURE__*/(0, _react.css)(".euiFormControlLayout{", (0, _global_styling.logicalCSS)('height', 'auto'), " ", (0, _global_styling.logicalCSS)('width', 'fit-content'), " background-color:transparent;box-shadow:none;padding:0;}.euiFormControlLayoutDelimited .euiFormControlLayout__childrenWrapper{background-color:transparent;flex-direction:column;}.euiFormControlLayoutIcons{justify-content:center;", (0, _global_styling.logicalCSS)('padding-bottom', euiTheme.size.s), ";};label:inline;"),
30
- shadow: /*#__PURE__*/(0, _react.css)(".euiFormControlLayout{", (0, _mixins.euiShadowMedium)(euiThemeContext), ";}.euiFormControlLayoutDelimited .euiFormControlLayout__childrenWrapper{background-color:", euiTheme.colors.emptyShade, ";};label:shadow;")
30
+ inline: {
31
+ inline: /*#__PURE__*/(0, _react.css)(".euiFormControlLayout{", (0, _global_styling.logicalCSS)('height', 'auto'), " ", (0, _global_styling.logicalCSS)('width', 'fit-content'), " box-shadow:none;padding:0;}.euiFormControlLayout__childrenWrapper{flex-direction:column;}.euiFormControlLayoutIcons{justify-content:center;", (0, _global_styling.logicalCSS)('padding-bottom', euiTheme.size.s), ";};label:inline;"),
32
+ // Skip css`` to avoid generating an Emotion className
33
+ noShadow: "\n .euiFormControlLayout {\n background-color: transparent;\n }\n ",
34
+ shadow: /*#__PURE__*/(0, _react.css)(".euiFormControlLayout{background-color:", euiTheme.colors.emptyShade, ";", (0, _mixins.euiShadowMedium)(euiThemeContext), ";};label:shadow;"),
35
+ // Needs to come before shadow CSS so that it doesn't override their background-colors
36
+ invalid: /*#__PURE__*/(0, _react.css)(".euiFormControlLayout{", (0, _form.euiFormControlDefaultShadow)(euiThemeContext, {
37
+ withBorder: false
38
+ }), " ", (0, _form.euiFormControlInvalidStyles)(euiThemeContext), ";};label:invalid;"),
39
+ // Should come after shadow CSS to override their background-colors
40
+ disabled: /*#__PURE__*/(0, _react.css)(".euiFormControlLayout{", (0, _form.euiFormControlDisabledStyles)(euiThemeContext), ";};label:disabled;"),
41
+ readOnly: /*#__PURE__*/(0, _react.css)(".euiFormControlLayout{", (0, _form.euiFormControlReadOnlyStyles)(euiThemeContext), ";};label:readOnly;")
42
+ }
31
43
  };
32
44
  };
@@ -123,7 +123,8 @@ var EuiDatePickerRange = exports.EuiDatePickerRange = function EuiDatePickerRang
123
123
  isInvalid: isInvalid,
124
124
  isLoading: isLoading,
125
125
  append: inline ? undefined : append,
126
- prepend: inline ? undefined : prepend
126
+ prepend: inline ? undefined : prepend,
127
+ css: inline && !disabled && (shadow ? inlineStyles.formLayout.shadow : inlineStyles.formLayout.noShadow)
127
128
  }));
128
129
  };
129
130
  EuiDatePickerRange.propTypes = {
@@ -7,17 +7,24 @@ exports.euiDatePickerRangeStyles = exports.euiDatePickerRangeInlineStyles = void
7
7
  var _react = require("@emotion/react");
8
8
  var _global_styling = require("../../global_styling");
9
9
  var _mixins = require("../../themes/amsterdam/global_styling/mixins");
10
- /*
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
11
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
12
12
  * or more contributor license agreements. Licensed under the Elastic License
13
13
  * 2.0 and the Server Side Public License, v 1; you may not use this file except
14
14
  * in compliance with, at your election, the Elastic License 2.0 or the Server
15
15
  * Side Public License, v 1.
16
16
  */
17
-
18
17
  var euiDatePickerRangeStyles = exports.euiDatePickerRangeStyles = {
19
18
  euiDatePickerRange: /*#__PURE__*/(0, _react.css)(".euiPopover,.react-datepicker__input-container,.euiDatePicker{", (0, _global_styling.logicalCSS)('height', '100%'), ";};label:euiDatePickerRange;")
20
19
  };
20
+ var _ref = process.env.NODE_ENV === "production" ? {
21
+ name: "bicgs9-noShadow",
22
+ styles: "background-color:transparent;label:noShadow;"
23
+ } : {
24
+ name: "bicgs9-noShadow",
25
+ styles: "background-color:transparent;label:noShadow;",
26
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
27
+ };
21
28
  var euiDatePickerRangeInlineStyles = exports.euiDatePickerRangeInlineStyles = function euiDatePickerRangeInlineStyles(euiThemeContext) {
22
29
  var euiTheme = euiThemeContext.euiTheme;
23
30
 
@@ -29,9 +36,15 @@ var euiDatePickerRangeInlineStyles = exports.euiDatePickerRangeInlineStyles = fu
29
36
  return "\n display: block;\n container-type: inline-size;\n\n .euiFormControlLayout__childrenWrapper {\n /* Use static px widths for now, since render behavior comes from a third party library */\n @container (max-width: ".concat(datePickerWidth * 2 + delimiterWidth, "px) {\n /* Unset grid display */\n display: block !important;\n\n /* Center and point the default delimiter arrow downwards */\n .euiFormControlLayoutDelimited__delimiter .euiIcon {\n transform: rotate(90deg);\n margin-inline: auto;\n }\n }\n }");
30
37
  };
31
38
  return {
32
- euiDatePickerRangeInline: /*#__PURE__*/(0, _react.css)(".euiFormControlLayoutDelimited{", (0, _global_styling.logicalCSS)('height', 'auto'), " ", (0, _global_styling.logicalCSS)('width', 'fit-content'), " ", (0, _global_styling.logicalCSS)('max-width', '100%'), " background-color:transparent;box-shadow:none;padding:0;.euiFormControlLayout__childrenWrapper{display:grid;grid-template-columns:1fr auto 1fr;grid-template-rows:auto;align-items:stretch;background-color:transparent;}&.euiFormControlLayout--group{&>*,.euiFormControlLayoutDelimited__delimiter{", (0, _global_styling.logicalCSS)('height', 'auto'), ";}}.euiFormControlLayoutIcons{justify-content:center;grid-column:1/span 3;", (0, _global_styling.logicalCSS)('height', 'auto'), " ", (0, _global_styling.logicalCSS)('padding-bottom', euiTheme.size.s), ";}}.react-datepicker{position:relative;};label:euiDatePickerRangeInline;"),
39
+ euiDatePickerRangeInline: /*#__PURE__*/(0, _react.css)(".euiFormControlLayoutDelimited{", (0, _global_styling.logicalCSS)('height', 'auto'), " ", (0, _global_styling.logicalCSS)('width', 'fit-content'), " ", (0, _global_styling.logicalCSS)('max-width', '100%'), " box-shadow:none;padding:0;.euiFormControlLayout__childrenWrapper{display:grid;grid-template-columns:1fr auto 1fr;grid-template-rows:auto;align-items:stretch;background-color:transparent;}.euiFormControlLayoutIcons{justify-content:center;grid-column:1/span 3;", (0, _global_styling.logicalCSS)('height', 'auto'), " ", (0, _global_styling.logicalCSS)('padding-bottom', euiTheme.size.s), ";}}.react-datepicker{position:relative;};label:euiDatePickerRangeInline;"),
33
40
  responsive: /*#__PURE__*/(0, _react.css)(containerQuery(268), ";;label:responsive;"),
34
41
  responsiveWithTimeSelect: /*#__PURE__*/(0, _react.css)(containerQuery(374), ";;label:responsiveWithTimeSelect;"),
35
- shadow: /*#__PURE__*/(0, _react.css)(".euiFormControlLayoutDelimited{", (0, _mixins.euiShadowMedium)(euiThemeContext), " .euiFormControlLayout__childrenWrapper{background-color:", euiTheme.colors.emptyShade, ";}};label:shadow;")
42
+ shadow: /*#__PURE__*/(0, _react.css)(".euiFormControlLayoutDelimited{", (0, _mixins.euiShadowMedium)(euiThemeContext), ";};label:shadow;"),
43
+ // Applied directly to EuiFormControlLayout so we can check if `disabled`
44
+ // and allow the disabled background-color to take precedence
45
+ formLayout: {
46
+ noShadow: _ref,
47
+ shadow: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.colors.emptyShade, ";;label:shadow;")
48
+ }
36
49
  };
37
50
  };
@@ -23,10 +23,15 @@ var _date_popover_button = require("./date_popover/date_popover_button");
23
23
  var _auto_refresh = require("../auto_refresh/auto_refresh");
24
24
  var _super_date_picker = require("./super_date_picker.styles");
25
25
  var _react2 = require("@emotion/react");
26
+ var _excluded = ["isDisabled"];
26
27
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
27
28
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
28
29
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
29
30
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
31
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
32
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
33
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
34
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
30
35
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
31
36
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
32
37
  function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
@@ -288,7 +293,7 @@ var EuiSuperDatePickerInternal = exports.EuiSuperDatePickerInternal = /*#__PURE_
288
293
  compressed: compressed,
289
294
  isInvalid: isInvalid,
290
295
  isLoading: isLoading && !showUpdateButton,
291
- disabled: !!isDisabled,
296
+ isDisabled: !!isDisabled,
292
297
  prepend: _this.renderQuickSelect(),
293
298
  append: autoRefreshAppend,
294
299
  fullWidth: true,
@@ -319,9 +324,16 @@ var EuiSuperDatePickerInternal = exports.EuiSuperDatePickerInternal = /*#__PURE_
319
324
  })));
320
325
  }
321
326
  var rangeCssStyles = [styles.euiSuperDatePicker__range, formControlLayoutProps.css];
327
+
328
+ // EuiFormControlLayout wants `isDisabled`, EuiDatePickerRange wants `disabled` :T
329
+ var _ = formControlLayoutProps.isDisabled,
330
+ _rangeProps = _objectWithoutProperties(formControlLayoutProps, _excluded);
331
+ var rangeProps = _objectSpread(_objectSpread({}, _rangeProps), {}, {
332
+ disabled: formControlLayoutProps.isDisabled
333
+ });
322
334
  return (0, _react2.jsx)(_context.EuiI18nConsumer, null, function (_ref4) {
323
335
  var contextLocale = _ref4.locale;
324
- return (0, _react2.jsx)(_date_picker_range.EuiDatePickerRange, _extends({}, formControlLayoutProps, {
336
+ return (0, _react2.jsx)(_date_picker_range.EuiDatePickerRange, _extends({}, rangeProps, {
325
337
  css: rangeCssStyles,
326
338
  isCustom: true,
327
339
  iconType: false,
@@ -46,7 +46,7 @@ var euiSuperDatePickerStyles = exports.euiSuperDatePickerStyles = function euiSu
46
46
  var needsUpdatingBackgroundColor = colorMode === 'DARK' ? (0, _services.shade)(euiTheme.colors.success, 0.7) : (0, _services.tint)(euiTheme.colors.success, 0.9);
47
47
  var needsUpdatingTextColor = (0, _services.makeHighContrastColor)(euiTheme.colors.success)(needsUpdatingBackgroundColor);
48
48
  return {
49
- euiSuperDatePicker: /*#__PURE__*/(0, _react.css)("display:flex;gap:", gap, ";", (0, _global_styling.logicalCSS)('max-width', '100%'), " ", (0, _global_styling.euiMaxBreakpoint)(euiThemeContext, 'm'), "{", (0, _global_styling.logicalCSS)('width', '100%'), ";}.euiFormControlLayout__childrenWrapper:last-child{", (0, _global_styling.logicalCSS)('border-top-right-radius', 'inherit'), " ", (0, _global_styling.logicalCSS)('border-bottom-right-radius', 'inherit'), ";};label:euiSuperDatePicker;"),
49
+ euiSuperDatePicker: /*#__PURE__*/(0, _react.css)("display:flex;gap:", gap, ";", (0, _global_styling.logicalCSS)('max-width', '100%'), " ", (0, _global_styling.euiMaxBreakpoint)(euiThemeContext, 'm'), "{", (0, _global_styling.logicalCSS)('width', '100%'), ";};label:euiSuperDatePicker;"),
50
50
  widths: {
51
51
  restricted: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', restrictedWidth), ";;label:restricted;"),
52
52
  full: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', '100%'), ";;label:full;"),
@@ -66,9 +66,9 @@ var euiSuperDatePickerStyles = exports.euiSuperDatePickerStyles = function euiSu
66
66
  full: "\n label: isAutoRefreshOnly;\n display: block;\n "
67
67
  },
68
68
  // isQuickSelectOnly forces `width` to be `auto`
69
- isQuickSelectOnly: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('min-width', 0), ";;label:isQuickSelectOnly;"),
69
+ isQuickSelectOnly: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('min-width', 0), ".euiFormControlLayout__prepend{", (0, _global_styling.logicalCSS)('max-width', 'none'), ";};label:isQuickSelectOnly;"),
70
70
  euiSuperDatePicker__range: _ref,
71
- euiSuperDatePicker__rangeInput: /*#__PURE__*/(0, _react.css)("flex-grow:1;", (0, _global_styling.logicalCSS)('width', 'auto !important'), ";;label:euiSuperDatePicker__rangeInput;"),
71
+ euiSuperDatePicker__rangeInput: /*#__PURE__*/(0, _react.css)("flex-grow:1;", (0, _global_styling.logicalCSS)('width', 'auto'), ";;label:euiSuperDatePicker__rangeInput;"),
72
72
  euiSuperDatePicker__prettyFormat: /*#__PURE__*/(0, _react.css)(_buttonStyles(euiThemeContext), " text-align:start;;label:euiSuperDatePicker__prettyFormat;"),
73
73
  // Form states
74
74
  states: {
@@ -76,7 +76,7 @@ var euiSuperDatePickerStyles = exports.euiSuperDatePickerStyles = function euiSu
76
76
  default: /*#__PURE__*/(0, _react.css)(".euiFormControlLayout__childrenWrapper{color:", forms.textColor, ";background-color:", forms.backgroundColor, ";}.euiDatePopoverButton{", (0, _form.euiFormControlDefaultShadow)(euiThemeContext), " box-shadow:none;}.euiDatePopoverButton:focus,.euiPopover-isOpen .euiDatePopoverButton{--euiFormControlStateColor:", euiTheme.colors.primary, ";background-size:100% 100%;};label:default;"),
77
77
  disabled: /*#__PURE__*/(0, _react.css)(".euiFormControlLayout__childrenWrapper{", (0, _form.euiFormControlDisabledStyles)(euiThemeContext), ";};label:disabled;"),
78
78
  invalid: /*#__PURE__*/(0, _react.css)(".euiFormControlLayout__childrenWrapper{color:", euiTheme.colors.dangerText, ";background-color:", forms.backgroundColor, ";", (0, _form.euiFormControlInvalidStyles)(euiThemeContext), ";};label:invalid;"),
79
- needsUpdating: /*#__PURE__*/(0, _react.css)(".euiFormControlLayoutDelimited .euiFormControlLayout__childrenWrapper{color:", needsUpdatingTextColor, ";background-color:", needsUpdatingBackgroundColor, ";}.euiFormControlLayoutDelimited__delimiter{color:inherit;}.euiDatePopoverButton{", (0, _form.euiFormControlDefaultShadow)(euiThemeContext), " background-color:inherit;box-shadow:none;}.euiDatePopoverButton:focus,.euiPopover-isOpen .euiDatePopoverButton{--euiFormControlStateColor:", euiTheme.colors.success, ";background-size:100% 100%;};label:needsUpdating;")
79
+ needsUpdating: /*#__PURE__*/(0, _react.css)(".euiFormControlLayout__childrenWrapper{color:", needsUpdatingTextColor, ";background-color:", needsUpdatingBackgroundColor, ";}.euiFormControlLayoutDelimited__delimiter{color:inherit;}.euiDatePopoverButton{", (0, _form.euiFormControlDefaultShadow)(euiThemeContext), " background-color:inherit;box-shadow:none;}.euiDatePopoverButton:focus,.euiPopover-isOpen .euiDatePopoverButton{--euiFormControlStateColor:", euiTheme.colors.success, ";background-size:100% 100%;};label:needsUpdating;")
80
80
  }
81
81
  };
82
82
  };
@@ -7,10 +7,12 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.EuiCheckbox = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
10
- var _react2 = require("@emotion/react");
11
10
  var _classnames = _interopRequireDefault(require("classnames"));
12
11
  var _services = require("../../../services");
13
- var _excluded = ["className", "css", "id", "checked", "label", "onChange", "type", "disabled", "indeterminate", "inputRef", "labelProps"];
12
+ var _icon = require("../../icon");
13
+ var _checkbox = require("./checkbox.styles");
14
+ var _react2 = require("@emotion/react");
15
+ var _excluded = ["className", "id", "checked", "label", "onChange", "type", "disabled", "readOnly", "indeterminate", "inputRef", "labelProps"];
14
16
  /*
15
17
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
16
18
  * or more contributor license agreements. Licensed under the Elastic License
@@ -26,7 +28,6 @@ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i
26
28
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
27
29
  var EuiCheckbox = exports.EuiCheckbox = function EuiCheckbox(_ref) {
28
30
  var className = _ref.className,
29
- customCss = _ref.css,
30
31
  id = _ref.id,
31
32
  _ref$checked = _ref.checked,
32
33
  checked = _ref$checked === void 0 ? false : _ref$checked,
@@ -35,26 +36,19 @@ var EuiCheckbox = exports.EuiCheckbox = function EuiCheckbox(_ref) {
35
36
  type = _ref.type,
36
37
  _ref$disabled = _ref.disabled,
37
38
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
39
+ _ref$readOnly = _ref.readOnly,
40
+ readOnly = _ref$readOnly === void 0 ? false : _ref$readOnly,
38
41
  _ref$indeterminate = _ref.indeterminate,
39
42
  indeterminate = _ref$indeterminate === void 0 ? false : _ref$indeterminate,
40
43
  inputRef = _ref.inputRef,
41
44
  labelProps = _ref.labelProps,
42
45
  rest = _objectWithoutProperties(_ref, _excluded);
43
- var classes = (0, _classnames.default)('euiCheckbox', {
44
- 'euiCheckbox--noLabel': !label
45
- }, className);
46
- var styles = {
47
- euiCheckbox: /*#__PURE__*/(0, _react2.css)(";label:euiCheckbox;")
48
- }; // TODO: Emotion conversion
49
- var cssStyles = [styles.euiCheckbox, customCss];
50
- var optionalLabel = (0, _react.useMemo)(function () {
51
- if (!label) return;
52
- var labelClasses = (0, _classnames.default)('euiCheckbox__label', labelProps === null || labelProps === void 0 ? void 0 : labelProps.className);
53
- return (0, _react2.jsx)("label", _extends({}, labelProps, {
54
- className: labelClasses,
55
- htmlFor: id
56
- }), label);
57
- }, [label, labelProps, id]);
46
+ var classes = (0, _classnames.default)('euiCheckbox', className);
47
+ var styles = (0, _services.useEuiMemoizedStyles)(_checkbox.euiCheckboxStyles);
48
+ var inputStyles = [styles.input.euiCheckbox__square, disabled ? checked || indeterminate ? styles.input.disabled.selected : styles.input.disabled.unselected : checked || indeterminate ? styles.input.enabled.selected : styles.input.enabled.unselected, readOnly && styles.input.readOnly];
49
+ var labelClasses = (0, _classnames.default)('euiCheckbox__label', labelProps === null || labelProps === void 0 ? void 0 : labelProps.className);
50
+ var labelStyles = [styles.label.euiCheckbox__label, disabled ? styles.label.disabled : styles.label.enabled, readOnly && styles.label.readOnly, labelProps === null || labelProps === void 0 ? void 0 : labelProps.css];
51
+ var iconStyles = [styles.input.icon.euiCheckbox__icon, indeterminate ? styles.input.icon.indeterminate : styles.input.icon.check];
58
52
 
59
53
  // @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#indeterminate_state_checkboxes
60
54
  var setIndeterminateState = (0, _react.useCallback)(function (input) {
@@ -62,19 +56,29 @@ var EuiCheckbox = exports.EuiCheckbox = function EuiCheckbox(_ref) {
62
56
  }, [indeterminate]);
63
57
  var refs = (0, _services.useCombinedRefs)([inputRef, setIndeterminateState]);
64
58
  return (0, _react2.jsx)("div", {
65
- css: cssStyles,
59
+ css: styles.euiCheckbox,
66
60
  className: classes
67
- }, (0, _react2.jsx)("input", _extends({
61
+ }, (0, _react2.jsx)("div", {
62
+ css: inputStyles,
63
+ className: "euiCheckbox__square"
64
+ }, (0, _react2.jsx)(_icon.EuiIcon, {
65
+ css: iconStyles,
66
+ type: indeterminate ? 'stopFilled' : checked ? 'check' : 'empty'
67
+ }), (0, _react2.jsx)("input", _extends({
68
+ css: styles.input.euiCheckbox__input,
68
69
  className: "euiCheckbox__input",
69
70
  type: "checkbox",
70
71
  id: id,
71
72
  checked: checked,
72
73
  onChange: onChange,
73
74
  disabled: disabled,
75
+ readOnly: readOnly,
74
76
  ref: refs
75
- }, rest)), (0, _react2.jsx)("div", {
76
- className: "euiCheckbox__square"
77
- }), optionalLabel);
77
+ }, rest))), label && (0, _react2.jsx)("label", _extends({}, labelProps, {
78
+ css: labelStyles,
79
+ className: labelClasses,
80
+ htmlFor: id
81
+ }), label));
78
82
  };
79
83
  EuiCheckbox.propTypes = {
80
84
  id: _propTypes.default.string.isRequired,
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.euiCheckboxStyles = void 0;
7
+ var _react = require("@emotion/react");
8
+ var _form = require("../form.styles");
9
+ 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)."; } /*
10
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
11
+ * or more contributor license agreements. Licensed under the Elastic License
12
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
13
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
14
+ * Side Public License, v 1.
15
+ */
16
+ var _ref = process.env.NODE_ENV === "production" ? {
17
+ name: "1m8ob9b-readOnly",
18
+ styles: "cursor:default;label:readOnly;"
19
+ } : {
20
+ name: "1m8ob9b-readOnly",
21
+ styles: "cursor:default;label:readOnly;",
22
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
23
+ };
24
+ var _ref2 = process.env.NODE_ENV === "production" ? {
25
+ name: "u54glv-indeterminate",
26
+ styles: "transform:scale(0.5);label:indeterminate;"
27
+ } : {
28
+ name: "u54glv-indeterminate",
29
+ styles: "transform:scale(0.5);label:indeterminate;",
30
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
31
+ };
32
+ var euiCheckboxStyles = exports.euiCheckboxStyles = function euiCheckboxStyles(euiThemeContext) {
33
+ var euiTheme = euiThemeContext.euiTheme;
34
+ var controlStyles = (0, _form.euiFormCustomControlStyles)(euiThemeContext);
35
+ var _euiFormCustomControl = (0, _form.euiFormCustomControlVariables)(euiThemeContext),
36
+ unselectedBorder = _euiFormCustomControl.colors.unselectedBorder;
37
+ return {
38
+ euiCheckbox: /*#__PURE__*/(0, _react.css)(controlStyles.wrapper, ";label:euiCheckbox;"),
39
+ input: {
40
+ euiCheckbox__square: /*#__PURE__*/(0, _react.css)(controlStyles.input.fauxInput, " border-radius:", euiTheme.border.radius.small, ";;label:euiCheckbox__square;"),
41
+ enabled: {
42
+ selected: /*#__PURE__*/(0, _react.css)(controlStyles.input.enabled.selected, ";label:selected;"),
43
+ unselected: /*#__PURE__*/(0, _react.css)(controlStyles.input.enabled.unselected, ";label:unselected;")
44
+ },
45
+ disabled: {
46
+ selected: /*#__PURE__*/(0, _react.css)(controlStyles.input.disabled.selected, ";label:selected;"),
47
+ unselected: /*#__PURE__*/(0, _react.css)(controlStyles.input.disabled.unselected, ";label:unselected;")
48
+ },
49
+ // Readonly checkboxes are used by EuiMarkdownEditor
50
+ // Maintain the initial color to enforce that clicks are not doing anything
51
+ readOnly: /*#__PURE__*/(0, _react.css)("&:has(input:focus-visible){outline:", euiTheme.focus.width, " solid ", unselectedBorder, ";}&:has(input:focus){border-color:", unselectedBorder, ";};label:readOnly;"),
52
+ icon: {
53
+ euiCheckbox__icon: /*#__PURE__*/(0, _react.css)(";label:euiCheckbox__icon;"),
54
+ check: /*#__PURE__*/(0, _react.css)(controlStyles.input.icon, " stroke:currentColor;;label:check;"),
55
+ indeterminate: _ref2
56
+ },
57
+ euiCheckbox__input: /*#__PURE__*/(0, _react.css)(controlStyles.input.hiddenInput, " &[readonly]{cursor:default;};label:euiCheckbox__input;")
58
+ },
59
+ label: {
60
+ euiCheckbox__label: /*#__PURE__*/(0, _react.css)(controlStyles.label.label, ";label:euiCheckbox__label;"),
61
+ enabled: controlStyles.label.enabled,
62
+ disabled: /*#__PURE__*/(0, _react.css)(controlStyles.label.disabled, ";label:disabled;"),
63
+ readOnly: _ref
64
+ }
65
+ };
66
+ };