@elastic/eui 67.0.0 → 67.1.1

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 (283) hide show
  1. package/dist/eui_theme_dark.css +0 -390
  2. package/dist/eui_theme_dark.json +0 -24
  3. package/dist/eui_theme_dark.json.d.ts +0 -24
  4. package/dist/eui_theme_dark.min.css +1 -1
  5. package/dist/eui_theme_light.css +0 -390
  6. package/dist/eui_theme_light.json +0 -24
  7. package/dist/eui_theme_light.json.d.ts +0 -24
  8. package/dist/eui_theme_light.min.css +1 -1
  9. package/es/components/accordion/accordion.js +5 -4
  10. package/es/components/accordion/accordion.styles.js +1 -1
  11. package/es/components/badge/badge.js +84 -78
  12. package/es/components/badge/badge.styles.js +62 -0
  13. package/es/components/basic_table/in_memory_table.js +8 -0
  14. package/es/components/breadcrumbs/breadcrumb.styles.js +4 -2
  15. package/es/components/button/button.js +0 -1
  16. package/es/components/button/button_display/_button_display.js +10 -5
  17. package/es/components/button/button_display/_button_display.styles.js +2 -2
  18. package/es/components/button/button_display/_button_display_content.js +5 -3
  19. package/es/components/button/button_display/_button_display_content.styles.js +4 -1
  20. package/es/components/button/button_icon/button_icon.js +11 -7
  21. package/es/components/card/card.js +2 -2
  22. package/es/components/card/card.styles.js +5 -2
  23. package/es/components/collapsible_nav/collapsible_nav.js +8 -0
  24. package/es/components/expression/expression.styles.js +4 -2
  25. package/es/components/flyout/flyout.js +27 -48
  26. package/es/components/flyout/flyout.styles.js +111 -0
  27. package/es/components/flyout/flyout_body.js +14 -6
  28. package/es/components/flyout/flyout_body.styles.js +21 -0
  29. package/es/components/flyout/flyout_footer.js +8 -1
  30. package/es/components/flyout/flyout_footer.styles.js +14 -0
  31. package/es/components/flyout/flyout_header.js +9 -4
  32. package/es/components/flyout/flyout_header.styles.js +28 -0
  33. package/es/components/image/image_wrapper.js +3 -3
  34. package/es/components/markdown_editor/markdown_format.styles.js +11 -6
  35. package/es/components/notification/notification_event.js +1 -1
  36. package/es/components/notification/notification_event_meta.js +1 -1
  37. package/es/components/page/page_header/page_header_content.js +1 -1
  38. package/es/components/page/page_section/page_section.js +3 -4
  39. package/es/components/pagination/pagination_button.styles.js +5 -3
  40. package/es/components/popover/popover_title.js +2 -2
  41. package/es/components/popover/popover_title.styles.js +18 -6
  42. package/es/components/progress/progress.js +2 -2
  43. package/es/components/search_bar/filters/custom_component_filter.js +16 -0
  44. package/es/components/search_bar/filters/filters.js +6 -0
  45. package/es/components/search_bar/query/ast.js +12 -0
  46. package/es/components/search_bar/query/ast_to_es_query_dsl.js +15 -10
  47. package/es/components/search_bar/query/query.js +17 -0
  48. package/es/components/search_bar/search_bar.js +4 -0
  49. package/es/components/search_bar/search_filters.js +4 -0
  50. package/es/components/selectable/selectable_list/selectable_list.js +2 -2
  51. package/es/components/selectable/selectable_list/selectable_list_item.js +2 -2
  52. package/es/components/text/text.styles.js +6 -3
  53. package/es/components/tool_tip/tool_tip.styles.js +7 -6
  54. package/es/components/tour/tour.styles.js +11 -6
  55. package/es/global_styling/functions/index.js +1 -0
  56. package/es/global_styling/functions/math.js +46 -0
  57. package/es/global_styling/mixins/_helpers.js +5 -2
  58. package/es/services/color/contrast.js +2 -0
  59. package/es/services/index.js +1 -1
  60. package/es/services/theme/context.js +2 -1
  61. package/es/services/theme/hooks.js +27 -1
  62. package/es/services/theme/index.js +1 -1
  63. package/es/services/theme/provider.js +15 -1
  64. package/eui.d.ts +199 -35
  65. package/i18ntokens.json +2 -2
  66. package/lib/components/accordion/accordion.js +5 -4
  67. package/lib/components/accordion/accordion.styles.js +1 -1
  68. package/lib/components/badge/badge.js +92 -80
  69. package/lib/components/badge/badge.styles.js +67 -0
  70. package/lib/components/basic_table/in_memory_table.js +8 -0
  71. package/lib/components/breadcrumbs/breadcrumb.styles.js +3 -1
  72. package/lib/components/button/button.js +0 -1
  73. package/lib/components/button/button_display/_button_display.js +10 -5
  74. package/lib/components/button/button_display/_button_display.styles.js +2 -2
  75. package/lib/components/button/button_display/_button_display_content.js +9 -4
  76. package/lib/components/button/button_display/_button_display_content.styles.js +4 -1
  77. package/lib/components/button/button_icon/button_icon.js +11 -7
  78. package/lib/components/card/card.js +2 -2
  79. package/lib/components/card/card.styles.js +5 -2
  80. package/lib/components/collapsible_nav/collapsible_nav.js +8 -0
  81. package/lib/components/expression/expression.styles.js +3 -1
  82. package/lib/components/flyout/flyout.js +27 -47
  83. package/lib/components/flyout/flyout.styles.js +122 -0
  84. package/lib/components/flyout/flyout_body.js +16 -6
  85. package/lib/components/flyout/flyout_body.styles.js +32 -0
  86. package/lib/components/flyout/flyout_footer.js +10 -1
  87. package/lib/components/flyout/flyout_footer.styles.js +24 -0
  88. package/lib/components/flyout/flyout_header.js +11 -4
  89. package/lib/components/flyout/flyout_header.styles.js +31 -0
  90. package/lib/components/image/image_wrapper.js +3 -3
  91. package/lib/components/markdown_editor/markdown_format.styles.js +10 -5
  92. package/lib/components/notification/notification_event.js +1 -1
  93. package/lib/components/notification/notification_event_meta.js +1 -1
  94. package/lib/components/page/page_header/page_header_content.js +1 -1
  95. package/lib/components/page/page_section/page_section.js +3 -4
  96. package/lib/components/pagination/pagination_button.styles.js +4 -2
  97. package/lib/components/popover/popover_title.js +2 -2
  98. package/lib/components/popover/popover_title.styles.js +19 -7
  99. package/lib/components/progress/progress.js +2 -2
  100. package/lib/components/search_bar/filters/custom_component_filter.js +29 -0
  101. package/lib/components/search_bar/filters/filters.js +7 -0
  102. package/lib/components/search_bar/query/ast.js +12 -0
  103. package/lib/components/search_bar/query/ast_to_es_query_dsl.js +16 -11
  104. package/lib/components/search_bar/query/query.js +17 -0
  105. package/lib/components/search_bar/search_bar.js +4 -0
  106. package/lib/components/search_bar/search_filters.js +4 -0
  107. package/lib/components/selectable/selectable_list/selectable_list.js +2 -2
  108. package/lib/components/selectable/selectable_list/selectable_list_item.js +2 -2
  109. package/lib/components/text/text.styles.js +5 -2
  110. package/lib/components/tool_tip/tool_tip.styles.js +6 -5
  111. package/lib/components/tour/tour.styles.js +10 -5
  112. package/lib/global_styling/functions/index.js +13 -0
  113. package/lib/global_styling/functions/math.js +55 -0
  114. package/lib/global_styling/mixins/_helpers.js +5 -2
  115. package/lib/services/color/contrast.js +6 -1
  116. package/lib/services/index.js +7 -0
  117. package/lib/services/theme/context.js +4 -2
  118. package/lib/services/theme/hooks.js +28 -0
  119. package/lib/services/theme/index.js +12 -0
  120. package/lib/services/theme/provider.js +23 -2
  121. package/optimize/es/components/accordion/accordion.js +5 -4
  122. package/optimize/es/components/accordion/accordion.styles.js +1 -1
  123. package/optimize/es/components/badge/badge.js +82 -76
  124. package/optimize/es/components/badge/badge.styles.js +62 -0
  125. package/optimize/es/components/basic_table/in_memory_table.js +4 -0
  126. package/optimize/es/components/breadcrumbs/breadcrumb.styles.js +4 -2
  127. package/optimize/es/components/button/button.js +0 -1
  128. package/optimize/es/components/button/button_display/_button_display.js +8 -3
  129. package/optimize/es/components/button/button_display/_button_display.styles.js +2 -2
  130. package/optimize/es/components/button/button_display/_button_display_content.js +3 -1
  131. package/optimize/es/components/button/button_display/_button_display_content.styles.js +4 -1
  132. package/optimize/es/components/button/button_icon/button_icon.js +11 -7
  133. package/optimize/es/components/card/card.js +2 -2
  134. package/optimize/es/components/card/card.styles.js +5 -2
  135. package/optimize/es/components/expression/expression.styles.js +4 -2
  136. package/optimize/es/components/flyout/flyout.js +27 -48
  137. package/optimize/es/components/flyout/flyout.styles.js +111 -0
  138. package/optimize/es/components/flyout/flyout_body.js +14 -6
  139. package/optimize/es/components/flyout/flyout_body.styles.js +21 -0
  140. package/optimize/es/components/flyout/flyout_footer.js +8 -1
  141. package/optimize/es/components/flyout/flyout_footer.styles.js +14 -0
  142. package/optimize/es/components/flyout/flyout_header.js +9 -4
  143. package/optimize/es/components/flyout/flyout_header.styles.js +28 -0
  144. package/optimize/es/components/image/image_wrapper.js +3 -3
  145. package/optimize/es/components/markdown_editor/markdown_format.styles.js +11 -6
  146. package/optimize/es/components/page/page_header/page_header_content.js +1 -1
  147. package/optimize/es/components/page/page_section/page_section.js +3 -4
  148. package/optimize/es/components/pagination/pagination_button.styles.js +5 -3
  149. package/optimize/es/components/popover/popover_title.js +2 -2
  150. package/optimize/es/components/popover/popover_title.styles.js +18 -6
  151. package/optimize/es/components/progress/progress.js +2 -2
  152. package/optimize/es/components/search_bar/filters/custom_component_filter.js +16 -0
  153. package/optimize/es/components/search_bar/filters/filters.js +6 -0
  154. package/optimize/es/components/search_bar/query/ast.js +12 -0
  155. package/optimize/es/components/search_bar/query/ast_to_es_query_dsl.js +14 -9
  156. package/optimize/es/components/search_bar/query/query.js +17 -0
  157. package/optimize/es/components/text/text.styles.js +6 -3
  158. package/optimize/es/components/tool_tip/tool_tip.styles.js +7 -6
  159. package/optimize/es/components/tour/tour.styles.js +11 -6
  160. package/optimize/es/global_styling/functions/index.js +1 -0
  161. package/optimize/es/global_styling/functions/math.js +44 -0
  162. package/optimize/es/global_styling/mixins/_helpers.js +5 -2
  163. package/optimize/es/services/color/contrast.js +2 -0
  164. package/optimize/es/services/index.js +1 -1
  165. package/optimize/es/services/theme/context.js +2 -1
  166. package/optimize/es/services/theme/hooks.js +27 -1
  167. package/optimize/es/services/theme/index.js +1 -1
  168. package/optimize/es/services/theme/provider.js +14 -1
  169. package/optimize/lib/components/accordion/accordion.js +5 -4
  170. package/optimize/lib/components/accordion/accordion.styles.js +1 -1
  171. package/optimize/lib/components/badge/badge.js +90 -78
  172. package/optimize/lib/components/badge/badge.styles.js +67 -0
  173. package/optimize/lib/components/basic_table/in_memory_table.js +4 -0
  174. package/optimize/lib/components/breadcrumbs/breadcrumb.styles.js +3 -1
  175. package/optimize/lib/components/button/button.js +0 -1
  176. package/optimize/lib/components/button/button_display/_button_display.js +8 -3
  177. package/optimize/lib/components/button/button_display/_button_display.styles.js +2 -2
  178. package/optimize/lib/components/button/button_display/_button_display_content.js +6 -2
  179. package/optimize/lib/components/button/button_display/_button_display_content.styles.js +4 -1
  180. package/optimize/lib/components/button/button_icon/button_icon.js +11 -7
  181. package/optimize/lib/components/card/card.js +2 -2
  182. package/optimize/lib/components/card/card.styles.js +5 -2
  183. package/optimize/lib/components/expression/expression.styles.js +3 -1
  184. package/optimize/lib/components/flyout/flyout.js +27 -47
  185. package/optimize/lib/components/flyout/flyout.styles.js +124 -0
  186. package/optimize/lib/components/flyout/flyout_body.js +16 -6
  187. package/optimize/lib/components/flyout/flyout_body.styles.js +32 -0
  188. package/optimize/lib/components/flyout/flyout_footer.js +10 -1
  189. package/optimize/lib/components/flyout/flyout_footer.styles.js +24 -0
  190. package/optimize/lib/components/flyout/flyout_header.js +11 -4
  191. package/optimize/lib/components/flyout/flyout_header.styles.js +31 -0
  192. package/optimize/lib/components/image/image_wrapper.js +3 -3
  193. package/optimize/lib/components/markdown_editor/markdown_format.styles.js +10 -5
  194. package/optimize/lib/components/page/page_header/page_header_content.js +1 -1
  195. package/optimize/lib/components/page/page_section/page_section.js +3 -4
  196. package/optimize/lib/components/pagination/pagination_button.styles.js +4 -2
  197. package/optimize/lib/components/popover/popover_title.js +2 -2
  198. package/optimize/lib/components/popover/popover_title.styles.js +19 -7
  199. package/optimize/lib/components/progress/progress.js +2 -2
  200. package/optimize/lib/components/search_bar/filters/custom_component_filter.js +29 -0
  201. package/optimize/lib/components/search_bar/filters/filters.js +7 -0
  202. package/optimize/lib/components/search_bar/query/ast.js +12 -0
  203. package/optimize/lib/components/search_bar/query/ast_to_es_query_dsl.js +16 -11
  204. package/optimize/lib/components/search_bar/query/query.js +17 -0
  205. package/optimize/lib/components/text/text.styles.js +5 -2
  206. package/optimize/lib/components/tool_tip/tool_tip.styles.js +6 -5
  207. package/optimize/lib/components/tour/tour.styles.js +10 -5
  208. package/optimize/lib/global_styling/functions/index.js +13 -0
  209. package/optimize/lib/global_styling/functions/math.js +57 -0
  210. package/optimize/lib/global_styling/mixins/_helpers.js +5 -2
  211. package/optimize/lib/services/color/contrast.js +5 -1
  212. package/optimize/lib/services/index.js +7 -0
  213. package/optimize/lib/services/theme/context.js +4 -2
  214. package/optimize/lib/services/theme/hooks.js +28 -0
  215. package/optimize/lib/services/theme/index.js +12 -0
  216. package/optimize/lib/services/theme/provider.js +23 -9
  217. package/package.json +5 -5
  218. package/src/components/badge/_index.scss +0 -1
  219. package/src/components/index.scss +0 -1
  220. package/src/themes/amsterdam/global_styling/variables/_index.scss +0 -1
  221. package/test-env/components/accordion/accordion.js +5 -4
  222. package/test-env/components/accordion/accordion.styles.js +1 -1
  223. package/test-env/components/badge/badge.js +92 -80
  224. package/test-env/components/badge/badge.styles.js +67 -0
  225. package/test-env/components/basic_table/in_memory_table.js +8 -0
  226. package/test-env/components/breadcrumbs/breadcrumb.styles.js +3 -1
  227. package/test-env/components/button/button.js +0 -1
  228. package/test-env/components/button/button_display/_button_display.js +10 -5
  229. package/test-env/components/button/button_display/_button_display.styles.js +2 -2
  230. package/test-env/components/button/button_display/_button_display_content.js +8 -4
  231. package/test-env/components/button/button_display/_button_display_content.styles.js +4 -1
  232. package/test-env/components/button/button_icon/button_icon.js +11 -7
  233. package/test-env/components/card/card.js +2 -2
  234. package/test-env/components/card/card.styles.js +5 -2
  235. package/test-env/components/collapsible_nav/collapsible_nav.js +8 -0
  236. package/test-env/components/expression/expression.styles.js +3 -1
  237. package/test-env/components/flyout/flyout.styles.js +124 -0
  238. package/test-env/components/flyout/flyout_body.js +16 -6
  239. package/test-env/components/flyout/flyout_body.styles.js +32 -0
  240. package/test-env/components/flyout/flyout_footer.js +10 -1
  241. package/test-env/components/flyout/flyout_footer.styles.js +24 -0
  242. package/test-env/components/flyout/flyout_header.js +11 -4
  243. package/test-env/components/flyout/flyout_header.styles.js +31 -0
  244. package/test-env/components/image/image_wrapper.js +3 -3
  245. package/test-env/components/markdown_editor/markdown_format.styles.js +10 -5
  246. package/test-env/components/notification/notification_event.js +1 -1
  247. package/test-env/components/notification/notification_event_meta.js +1 -1
  248. package/test-env/components/page/page_header/page_header_content.js +1 -1
  249. package/test-env/components/page/page_section/page_section.js +3 -4
  250. package/test-env/components/pagination/pagination_button.styles.js +4 -2
  251. package/test-env/components/popover/popover_title.js +2 -2
  252. package/test-env/components/popover/popover_title.styles.js +19 -7
  253. package/test-env/components/progress/progress.js +2 -2
  254. package/test-env/components/search_bar/filters/custom_component_filter.js +29 -0
  255. package/test-env/components/search_bar/filters/filters.js +7 -0
  256. package/test-env/components/search_bar/query/ast.js +12 -0
  257. package/test-env/components/search_bar/query/ast_to_es_query_dsl.js +16 -11
  258. package/test-env/components/search_bar/query/query.js +17 -0
  259. package/test-env/components/search_bar/search_bar.js +4 -0
  260. package/test-env/components/search_bar/search_filters.js +4 -0
  261. package/test-env/components/selectable/selectable_list/selectable_list.js +2 -2
  262. package/test-env/components/selectable/selectable_list/selectable_list_item.js +2 -2
  263. package/test-env/components/text/text.styles.js +5 -2
  264. package/test-env/components/tool_tip/tool_tip.styles.js +6 -5
  265. package/test-env/components/tour/tour.styles.js +10 -5
  266. package/test-env/global_styling/functions/index.js +13 -0
  267. package/test-env/global_styling/functions/math.js +57 -0
  268. package/test-env/global_styling/mixins/_helpers.js +5 -2
  269. package/test-env/services/color/contrast.js +5 -1
  270. package/test-env/services/index.js +7 -0
  271. package/test-env/services/theme/context.js +4 -2
  272. package/test-env/services/theme/hooks.js +28 -0
  273. package/test-env/services/theme/index.js +12 -0
  274. package/test-env/services/theme/provider.js +23 -9
  275. package/src/components/badge/_badge.scss +0 -133
  276. package/src/components/flyout/_flyout.scss +0 -196
  277. package/src/components/flyout/_flyout_body.scss +0 -18
  278. package/src/components/flyout/_flyout_footer.scss +0 -4
  279. package/src/components/flyout/_flyout_header.scss +0 -7
  280. package/src/components/flyout/_index.scss +0 -7
  281. package/src/components/flyout/_mixins.scss +0 -18
  282. package/src/components/flyout/_variables.scss +0 -8
  283. package/src/themes/amsterdam/global_styling/variables/_flyout.scss +0 -1
@@ -138,6 +138,7 @@ EuiCollapsibleNav.propTypes = {
138
138
  /**
139
139
  * Defines the width of the panel.
140
140
  * Pass a predefined size of `s | m | l`, or pass any number/string compatible with the CSS `width` attribute
141
+ * @default m
141
142
  */
142
143
  size: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.any.isRequired]),
143
144
 
@@ -147,21 +148,25 @@ EuiCollapsibleNav.propTypes = {
147
148
  * set to `false` to not restrict the width,
148
149
  * set to a number for a custom width in px,
149
150
  * set to a string for a custom width in custom measurement.
151
+ * @default false
150
152
  */
151
153
  maxWidth: PropTypes.oneOfType([PropTypes.bool.isRequired, PropTypes.number.isRequired, PropTypes.string.isRequired]),
152
154
 
153
155
  /**
154
156
  * Customize the padding around the content of the flyout header, body and footer
157
+ * @default l
155
158
  */
156
159
  paddingSize: PropTypes.any,
157
160
 
158
161
  /**
159
162
  * Adds an EuiOverlayMask and wraps in an EuiPortal
163
+ * @default true
160
164
  */
161
165
  ownFocus: PropTypes.bool,
162
166
 
163
167
  /**
164
168
  * Hides the default close button. You must provide another close button somewhere within the flyout.
169
+ * @default false
165
170
  */
166
171
  hideCloseButton: PropTypes.bool,
167
172
 
@@ -174,6 +179,7 @@ EuiCollapsibleNav.propTypes = {
174
179
  * Position of close button.
175
180
  * `inside`: Floating to just inside the flyout, always top right;
176
181
  * `outside`: Floating just outside the flyout near the top (side dependent on `side`). Helpful when the close button may cover other interactable content.
182
+ * @default inside
177
183
  */
178
184
  closeButtonPosition: PropTypes.oneOf(["inside", "outside"]),
179
185
 
@@ -211,12 +217,14 @@ EuiCollapsibleNav.propTypes = {
211
217
  /**
212
218
  * Which side of the window to attach to.
213
219
  * The `left` option should only be used for navigation.
220
+ * @default right
214
221
  */
215
222
  side: PropTypes.any,
216
223
 
217
224
  /**
218
225
  * Defaults to `dialog` which is best for most cases of the flyout.
219
226
  * Otherwise pass in your own, aria-role, or `null` to remove it and use the semantic `as` element instead
227
+ * @default dialog
220
228
  */
221
229
  role: PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.string.isRequired]),
222
230
 
@@ -10,7 +10,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
10
10
  * Side Public License, v 1.
11
11
  */
12
12
  import { css } from '@emotion/react';
13
- import { euiFontSize, logicalCSS, logicalTextAlignCSS, euiTextBreakWord, euiTextTruncate } from '../../global_styling';
13
+ import { euiFontSize, logicalCSS, logicalTextAlignCSS, euiTextBreakWord, euiTextTruncate, mathWithUnits } from '../../global_styling';
14
14
  import { transparentize } from '../../services/color';
15
15
 
16
16
  var _colorCSS = function _colorCSS(color) {
@@ -20,7 +20,9 @@ var _colorCSS = function _colorCSS(color) {
20
20
  export var euiExpressionStyles = function euiExpressionStyles(euiThemeContext) {
21
21
  var euiTheme = euiThemeContext.euiTheme;
22
22
  return {
23
- euiExpression: /*#__PURE__*/css(euiTextBreakWord(), ";display:inline-block;font-family:", euiTheme.font.familyCode, ";", logicalCSS('border-bottom', "".concat(euiTheme.border.width.thick, " solid transparent")), " ", euiFontSize(euiThemeContext, 's'), ";", logicalTextAlignCSS('left'), " padding:", parseFloat(euiTheme.size.s) / 2, "px 0;color:", euiTheme.colors.text, ";&:focus{", logicalCSS('border-bottom-style', 'solid'), ";}&+.euiExpression{", logicalCSS('margin-left', euiTheme.size.s), ";};label:euiExpression;"),
23
+ euiExpression: /*#__PURE__*/css(euiTextBreakWord(), ";display:inline-block;font-family:", euiTheme.font.familyCode, ";", logicalCSS('border-bottom', "".concat(euiTheme.border.width.thick, " solid transparent")), " ", euiFontSize(euiThemeContext, 's'), ";", logicalTextAlignCSS('left'), " padding:", mathWithUnits(euiTheme.size.s, function (x) {
24
+ return x / 2;
25
+ }), " 0;color:", euiTheme.colors.text, ";&:focus{", logicalCSS('border-bottom-style', 'solid'), ";}&+.euiExpression{", logicalCSS('margin-left', euiTheme.size.s), ";};label:euiExpression;"),
24
26
  // Variants
25
27
  columns: /*#__PURE__*/css("border-color:transparent;", logicalCSS('border-bottom-style', 'solid'), " ", logicalCSS('margin-bottom', euiTheme.size.xs), " ", logicalCSS('width', '100%'), " display:flex;padding:", euiTheme.size.xs, ";border-radius:", euiTheme.size.xs, ";;label:columns;"),
26
28
  truncate: /*#__PURE__*/css(logicalCSS('max-width', '100%'), ";;label:truncate;"),
@@ -33,31 +33,19 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
33
33
  */
34
34
  import React, { useEffect, useRef, useState, forwardRef, Fragment } from 'react';
35
35
  import classnames from 'classnames';
36
- import { keys, EuiWindowEvent, useCombinedRefs, useIsWithinMinBreakpoint } from '../../services';
37
- import { keysOf } from '../common';
36
+ import { keys, EuiWindowEvent, useCombinedRefs, useIsWithinMinBreakpoint, useEuiTheme } from '../../services';
37
+ import { logicalStyle } from '../../global_styling';
38
38
  import { EuiFocusTrap } from '../focus_trap';
39
39
  import { EuiOverlayMask } from '../overlay_mask';
40
40
  import { EuiButtonIcon } from '../button';
41
41
  import { EuiI18n } from '../i18n';
42
42
  import { useResizeObserver } from '../observer/resize_observer';
43
43
  import { EuiPortal } from '../portal';
44
+ import { euiFlyoutStyles, euiFlyoutCloseButtonStyles } from './flyout.styles';
44
45
  import { jsx as ___EmotionJSX } from "@emotion/react";
45
- var typeToClassNameMap = {
46
- push: 'euiFlyout--push',
47
- overlay: null
48
- };
49
- export var TYPES = keysOf(typeToClassNameMap);
50
- var sideToClassNameMap = {
51
- left: 'euiFlyout--left',
52
- right: null
53
- };
54
- export var SIDES = keysOf(sideToClassNameMap);
55
- var sizeToClassNameMap = {
56
- s: 'euiFlyout--small',
57
- m: 'euiFlyout--medium',
58
- l: 'euiFlyout--large'
59
- };
60
- export var SIZES = keysOf(sizeToClassNameMap);
46
+ export var TYPES = ['push', 'overlay'];
47
+ export var SIDES = ['left', 'right'];
48
+ export var SIZES = ['s', 'm', 'l'];
61
49
 
62
50
  /**
63
51
  * Custom type checker for named flyout sizes since the prop
@@ -67,13 +55,7 @@ function isEuiFlyoutSizeNamed(value) {
67
55
  return SIZES.includes(value);
68
56
  }
69
57
 
70
- var paddingSizeToClassNameMap = {
71
- none: 'euiFlyout--paddingNone',
72
- s: 'euiFlyout--paddingSmall',
73
- m: 'euiFlyout--paddingMedium',
74
- l: 'euiFlyout--paddingLarge'
75
- };
76
- export var PADDING_SIZES = keysOf(paddingSizeToClassNameMap);
58
+ export var PADDING_SIZES = ['none', 's', 'm', 'l'];
77
59
  var defaultElement = 'div';
78
60
  export var EuiFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
79
61
  var className = _ref.className,
@@ -164,41 +146,37 @@ export var EuiFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
164
146
  onClose(event);
165
147
  }
166
148
  };
149
+ /**
150
+ * Set inline styles
151
+ */
167
152
 
168
- var newStyle;
169
- var widthClassName;
170
- var sizeClassName; // Setting max-width
171
153
 
172
- if (maxWidth === true) {
173
- widthClassName = 'euiFlyout--maxWidth-default';
174
- } else if (maxWidth !== false) {
175
- var value = typeof maxWidth === 'number' ? "".concat(maxWidth, "px") : maxWidth;
176
- newStyle = _objectSpread(_objectSpread({}, style), {}, {
177
- maxWidth: value
178
- });
179
- } // Setting size
154
+ var newStyle = style;
180
155
 
156
+ if (typeof maxWidth !== 'boolean') {
157
+ newStyle = _objectSpread(_objectSpread({}, newStyle), logicalStyle('max-width', maxWidth));
158
+ }
181
159
 
182
- if (isEuiFlyoutSizeNamed(size)) {
183
- sizeClassName = sizeToClassNameMap[size];
184
- } else if (newStyle) {
185
- newStyle.width = size;
186
- } else {
187
- newStyle = _objectSpread(_objectSpread({}, style), {}, {
188
- width: size
189
- });
160
+ if (!isEuiFlyoutSizeNamed(size)) {
161
+ newStyle = _objectSpread(_objectSpread({}, newStyle), logicalStyle('width', size));
190
162
  }
191
163
 
192
- var classes = classnames('euiFlyout', typeToClassNameMap[type], sideToClassNameMap[side], sizeClassName, paddingSizeToClassNameMap[paddingSize], widthClassName, className);
164
+ var euiTheme = useEuiTheme();
165
+ var styles = euiFlyoutStyles(euiTheme);
166
+ var cssStyles = [styles.euiFlyout, styles.paddingSizes[paddingSize], isEuiFlyoutSizeNamed(size) && styles[size], maxWidth === false && styles.noMaxWidth, styles[type], type === 'push' && styles.pushSide[side], styles[side]];
167
+ var classes = classnames('euiFlyout', className);
193
168
  var closeButton;
194
169
 
195
170
  if (onClose && !hideCloseButton) {
196
- var closeButtonClasses = classnames('euiFlyout__closeButton', "euiFlyout__closeButton--".concat(closeButtonPosition), closeButtonProps === null || closeButtonProps === void 0 ? void 0 : closeButtonProps.className);
171
+ var closeButtonClasses = classnames('euiFlyout__closeButton', closeButtonProps === null || closeButtonProps === void 0 ? void 0 : closeButtonProps.className);
172
+ var closeButtonStyles = euiFlyoutCloseButtonStyles(euiTheme);
173
+ var closeButtonCssStyles = [closeButtonStyles.euiFlyout__closeButton, closeButtonStyles[closeButtonPosition], closeButtonPosition === 'outside' && closeButtonStyles.outsideSide[side]];
197
174
  closeButton = ___EmotionJSX(EuiI18n, {
198
175
  token: "euiFlyout.closeAriaLabel",
199
176
  default: "Close this dialog"
200
177
  }, function (closeAriaLabel) {
201
178
  return ___EmotionJSX(EuiButtonIcon, _extends({
179
+ css: closeButtonCssStyles,
202
180
  display: closeButtonPosition === 'outside' ? 'fill' : 'empty',
203
181
  iconType: "cross",
204
182
  color: "text",
@@ -255,8 +233,9 @@ export var EuiFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
255
233
  role: role,
256
234
  className: classes,
257
235
  tabIndex: -1,
258
- style: newStyle || style,
259
- ref: setRef
236
+ style: newStyle,
237
+ ref: setRef,
238
+ css: cssStyles
260
239
  }), closeButton, children)); // If ownFocus is set, wrap with an overlay and allow the user to click it to close it.
261
240
 
262
241
 
@@ -0,0 +1,111 @@
1
+ var _templateObject, _templateObject2;
2
+
3
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
4
+
5
+ /*
6
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
7
+ * or more contributor license agreements. Licensed under the Elastic License
8
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
9
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
10
+ * Side Public License, v 1.
11
+ */
12
+ import { css, keyframes } from '@emotion/react';
13
+ import { euiCanAnimate, euiBreakpoint, logicalCSS, mathWithUnits } from '../../global_styling';
14
+ import { euiShadowXLarge } from '../../themes/amsterdam/global_styling/mixins';
15
+ import { transparentize } from '../../services/color';
16
+ import { euiFormMaxWidth } from '../form/form.styles';
17
+ var euiFlyoutSlideInRight = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n opacity: 0;\n transform: translateX(100%);\n }\n 75% {\n opacity: 1;\n transform: translateX(0%);\n }\n"])));
18
+ var euiFlyoutSlideInLeft = keyframes(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n 0% {\n opacity: 0;\n transform: translateX(-100%);\n }\n 75% {\n opacity: 1;\n transform: translateX(0%);\n}\n"])));
19
+ export var euiFlyoutCloseButtonStyles = function euiFlyoutCloseButtonStyles(euiThemeContext) {
20
+ var euiTheme = euiThemeContext.euiTheme;
21
+ return {
22
+ euiFlyout__closeButton: /*#__PURE__*/css("position:absolute;", logicalCSS('right', euiTheme.size.s), " ", logicalCSS('top', euiTheme.size.s), " z-index:3;;label:euiFlyout__closeButton;"),
23
+ inside: /*#__PURE__*/css("background-color:", transparentize(euiTheme.colors.emptyShade, 0.9), ";;label:inside;"),
24
+ outside: /*#__PURE__*/css(euiShadowXLarge(euiThemeContext), ";animation:none!important;;label:outside;"),
25
+ outsideSide: {
26
+ // `transforms` pull in close buttons a little
27
+ // `!important` is necessary here to override the hover/focus transitions of buttons
28
+ right: /*#__PURE__*/css(logicalCSS('left', 0), " ", euiBreakpoint(euiThemeContext, ['m', 'xl']), "{transform:translateX(calc(-100% - ", euiTheme.size.l, "))!important;}", euiBreakpoint(euiThemeContext, ['xs', 's']), "{transform:translateX(calc(-100% - ", euiTheme.size.xs, "))!important;};label:right;"),
29
+ left: /*#__PURE__*/css(logicalCSS('right', 0), " ", euiBreakpoint(euiThemeContext, ['m', 'xl']), "{transform:translateX(calc(100% + ", euiTheme.size.l, "))!important;}", euiBreakpoint(euiThemeContext, ['xs', 's']), "{transform:translateX(calc(100% + ", euiTheme.size.xs, "))!important;};label:left;")
30
+ }
31
+ };
32
+ };
33
+ export var euiFlyoutStyles = function euiFlyoutStyles(euiThemeContext) {
34
+ var euiTheme = euiThemeContext.euiTheme;
35
+ return {
36
+ euiFlyout: /*#__PURE__*/css("position:fixed;", logicalCSS('top', 0), " ", logicalCSS('bottom', 0), " ", logicalCSS('height', '100%'), " z-index:", euiTheme.levels.flyout, ";background:", euiTheme.colors.emptyShade, ";display:flex;flex-direction:column;align-items:stretch;&:focus{outline:none;}", euiBreakpoint(euiThemeContext, ['xs', 's']), "{", logicalCSS('max-width', '90vw !important'), ";};label:euiFlyout;"),
37
+ // Flyout sizes
38
+ s: /*#__PURE__*/css(composeFlyoutSizing(euiThemeContext, 's'), ";;label:s;"),
39
+ m: /*#__PURE__*/css(composeFlyoutSizing(euiThemeContext, 'm'), ";;label:m;"),
40
+ l: /*#__PURE__*/css(composeFlyoutSizing(euiThemeContext, 'l'), ";;label:l;"),
41
+ noMaxWidth: /*#__PURE__*/css(logicalCSS('max-width', 'none'), ";;label:noMaxWidth;"),
42
+ // Side
43
+ right: /*#__PURE__*/css("clip-path:polygon(-50% 0, 100% 0, 100% 100%, -50% 100%);", logicalCSS('right', 0), " ", euiCanAnimate, "{animation:", euiFlyoutSlideInRight, " ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ";};label:right;"),
44
+ // Left-side flyouts should only be used for navigation
45
+ left: /*#__PURE__*/css(logicalCSS('left', 0), " clip-path:polygon(0 0, 150% 0, 150% 100%, 0 100%);", euiCanAnimate, "{animation:", euiFlyoutSlideInLeft, ";};label:left;"),
46
+ // Type
47
+ overlay: /*#__PURE__*/css(euiShadowXLarge(euiThemeContext), ";;label:overlay;"),
48
+ push: /*#__PURE__*/css("clip-path:none;animation-duration:0s!important;z-index:", Number(euiTheme.levels.flyout) - 1, ";;label:push;"),
49
+ pushSide: {
50
+ right: /*#__PURE__*/css(logicalCSS('border-left', euiTheme.border.thick), ";;label:right;"),
51
+ left: /*#__PURE__*/css(logicalCSS('border-right', euiTheme.border.thick), ";;label:left;")
52
+ },
53
+ // Padding
54
+ paddingSizes: {
55
+ none: /*#__PURE__*/css(composeFlyoutPadding(euiThemeContext, 'none'), ";;label:none;"),
56
+ s: /*#__PURE__*/css(composeFlyoutPadding(euiThemeContext, 's'), ";;label:s;"),
57
+ m: /*#__PURE__*/css(composeFlyoutPadding(euiThemeContext, 'm'), ";;label:m;"),
58
+ l: /*#__PURE__*/css(composeFlyoutPadding(euiThemeContext, 'l'), ";;label:l;")
59
+ }
60
+ };
61
+ };
62
+
63
+ var composeFlyoutSizing = function composeFlyoutSizing(euiThemeContext, size) {
64
+ var euiTheme = euiThemeContext.euiTheme; // 1. Calculating the minimum width based on the screen takeover breakpoint
65
+
66
+ var flyoutSizes = {
67
+ s: {
68
+ min: "".concat(Math.round(euiTheme.breakpoint.m * 0.5), "px"),
69
+ // 1.
70
+ width: '25vw',
71
+ max: "".concat(Math.round(euiTheme.breakpoint.s * 0.7), "px")
72
+ },
73
+ m: {
74
+ // Calculated for forms plus padding
75
+ min: "".concat(mathWithUnits(euiFormMaxWidth(euiThemeContext), function (x) {
76
+ return x + 24;
77
+ })),
78
+ width: '50vw',
79
+ max: "".concat(euiTheme.breakpoint.m, "px")
80
+ },
81
+ l: {
82
+ min: "".concat(Math.round(euiTheme.breakpoint.m * 0.9), "px"),
83
+ // 1.
84
+ width: '75vw',
85
+ max: "".concat(euiTheme.breakpoint.l, "px")
86
+ }
87
+ };
88
+ return "\n ".concat(logicalCSS('max-width', flyoutSizes[size].max), "\n\n ").concat(euiBreakpoint(euiThemeContext, ['m', 'xl']), " {\n ").concat(logicalCSS('min-width', flyoutSizes[size].min), "\n ").concat(logicalCSS('width', flyoutSizes[size].width), "\n }\n ").concat(euiBreakpoint(euiThemeContext, ['xs', 's']), " {\n ").concat(logicalCSS('min-width', 0), "\n ").concat(logicalCSS('width', flyoutSizes[size].min), "\n }\n ");
89
+ };
90
+
91
+ var composeFlyoutPadding = function composeFlyoutPadding(euiThemeContext, paddingSize) {
92
+ var euiTheme = euiThemeContext.euiTheme;
93
+ var paddingModifierMap = {
94
+ none: 0,
95
+ s: euiTheme.size.s,
96
+ m: euiTheme.size.base,
97
+ l: euiTheme.size.l
98
+ }; // Footer padding
99
+
100
+ var footerPaddingSizes = {
101
+ none: 0,
102
+ s: euiTheme.size.s,
103
+ m: "".concat(mathWithUnits(euiTheme.size.base, function (x) {
104
+ return x * 0.75;
105
+ }), " ").concat(euiTheme.size.base, ";"),
106
+ l: "".concat(mathWithUnits(euiTheme.size.l, function (x) {
107
+ return x / 1.5;
108
+ }), " ").concat(euiTheme.size.l, ";")
109
+ };
110
+ return "\n .euiFlyoutHeader {\n ".concat(logicalCSS('padding-horizontal', paddingModifierMap[paddingSize]), "\n ").concat(logicalCSS('padding-top', paddingModifierMap[paddingSize]), "\n }\n\n [class*='euiFlyoutHeader-hasBorder'] {\n ").concat(logicalCSS('padding-bottom', paddingModifierMap[paddingSize]), "\n }\n\n .euiFlyoutBody__overflowContent {\n padding: ").concat(paddingModifierMap[paddingSize], ";\n }\n\n .euiFlyoutBody__banner .euiCallOut {\n ").concat(logicalCSS('padding-horizontal', paddingModifierMap[paddingSize]), "\n }\n\n .euiFlyoutFooter {\n padding: ").concat(footerPaddingSizes[paddingSize], ";\n }\n ");
111
+ };
@@ -16,6 +16,8 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
16
16
  import React from 'react';
17
17
  import PropTypes from "prop-types";
18
18
  import classNames from 'classnames';
19
+ import { useEuiTheme } from '../../services';
20
+ import { euiFlyoutBodyStyles } from './flyout_body.styles';
19
21
  import { jsx as ___EmotionJSX } from "@emotion/react";
20
22
  export var EuiFlyoutBody = function EuiFlyoutBody(_ref) {
21
23
  var children = _ref.children,
@@ -24,16 +26,22 @@ export var EuiFlyoutBody = function EuiFlyoutBody(_ref) {
24
26
  rest = _objectWithoutProperties(_ref, _excluded);
25
27
 
26
28
  var classes = classNames('euiFlyoutBody', className);
27
- var overflowClasses = classNames('euiFlyoutBody__overflow', {
28
- 'euiFlyoutBody__overflow--hasBanner': banner
29
- });
29
+ var euiTheme = useEuiTheme();
30
+ var styles = euiFlyoutBodyStyles(euiTheme);
31
+ var cssStyles = [styles.euiFlyoutBody];
32
+ var bannerCssStyles = [banner && styles.euiFlyoutBody__banner];
33
+ var overflowCssStyles = [banner ? styles.euiFlyoutBody__overflow.hasBanner : styles.euiFlyoutBody__overflow.noBanner];
30
34
  return ___EmotionJSX("div", _extends({
31
35
  className: classes
32
- }, rest), ___EmotionJSX("div", {
36
+ }, rest, {
37
+ css: cssStyles
38
+ }), ___EmotionJSX("div", {
33
39
  tabIndex: 0,
34
- className: overflowClasses
40
+ className: "euiFlyoutBody__overflow",
41
+ css: overflowCssStyles
35
42
  }, banner && ___EmotionJSX("div", {
36
- className: "euiFlyoutBody__banner"
43
+ className: "euiFlyoutBody__banner",
44
+ css: bannerCssStyles
37
45
  }, banner), ___EmotionJSX("div", {
38
46
  className: "euiFlyoutBody__overflowContent"
39
47
  }, children)));
@@ -0,0 +1,21 @@
1
+ /*
2
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
+ * or more contributor license agreements. Licensed under the Elastic License
4
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
5
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
6
+ * Side Public License, v 1.
7
+ */
8
+ import { css } from '@emotion/react';
9
+ import { logicalCSS, logicalCSSWithFallback, euiYScrollWithShadows } from '../../global_styling';
10
+ export var euiFlyoutBodyStyles = function euiFlyoutBodyStyles(euiThemeContext) {
11
+ return {
12
+ euiFlyoutBody: /*#__PURE__*/css(logicalCSSWithFallback('overflow-y', 'hidden'), " ", logicalCSS('height', '100%'), ";;label:euiFlyoutBody;"),
13
+ euiFlyoutBody__overflow: {
14
+ noBanner: /*#__PURE__*/css(euiYScrollWithShadows(euiThemeContext), ";;label:noBanner;"),
15
+ hasBanner: /*#__PURE__*/css(euiYScrollWithShadows(euiThemeContext, {
16
+ side: 'end'
17
+ }), ";;label:hasBanner;")
18
+ },
19
+ euiFlyoutBody__banner: /*#__PURE__*/css(logicalCSSWithFallback('overflow-x', 'hidden'), ";;label:euiFlyoutBody__banner;")
20
+ };
21
+ };
@@ -16,6 +16,8 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
16
16
  import React from 'react';
17
17
  import PropTypes from "prop-types";
18
18
  import classNames from 'classnames';
19
+ import { useEuiTheme } from '../../services';
20
+ import { euiFlyoutFooterStyles } from './flyout_footer.styles';
19
21
  import { jsx as ___EmotionJSX } from "@emotion/react";
20
22
  export var EuiFlyoutFooter = function EuiFlyoutFooter(_ref) {
21
23
  var children = _ref.children,
@@ -23,9 +25,14 @@ export var EuiFlyoutFooter = function EuiFlyoutFooter(_ref) {
23
25
  rest = _objectWithoutProperties(_ref, _excluded);
24
26
 
25
27
  var classes = classNames('euiFlyoutFooter', className);
28
+ var euiTheme = useEuiTheme();
29
+ var styles = euiFlyoutFooterStyles(euiTheme);
30
+ var cssStyles = [styles.euiFlyoutFooter];
26
31
  return ___EmotionJSX("div", _extends({
27
32
  className: classes
28
- }, rest), children);
33
+ }, rest, {
34
+ css: cssStyles
35
+ }), children);
29
36
  };
30
37
  EuiFlyoutFooter.propTypes = {
31
38
  className: PropTypes.string,
@@ -0,0 +1,14 @@
1
+ /*
2
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
+ * or more contributor license agreements. Licensed under the Elastic License
4
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
5
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
6
+ * Side Public License, v 1.
7
+ */
8
+ import { css } from '@emotion/react';
9
+ export var euiFlyoutFooterStyles = function euiFlyoutFooterStyles(euiThemeContext) {
10
+ var euiTheme = euiThemeContext.euiTheme;
11
+ return {
12
+ euiFlyoutFooter: /*#__PURE__*/css("background-color:", euiTheme.colors.lightestShade, ";flex-grow:0;;label:euiFlyoutFooter;")
13
+ };
14
+ };
@@ -16,6 +16,8 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
16
16
  import React from 'react';
17
17
  import PropTypes from "prop-types";
18
18
  import classNames from 'classnames';
19
+ import { useEuiTheme } from '../../services';
20
+ import { euiFlyoutHeaderStyles } from './flyout_header.styles';
19
21
  import { jsx as ___EmotionJSX } from "@emotion/react";
20
22
  export var EuiFlyoutHeader = function EuiFlyoutHeader(_ref) {
21
23
  var children = _ref.children,
@@ -24,12 +26,15 @@ export var EuiFlyoutHeader = function EuiFlyoutHeader(_ref) {
24
26
  hasBorder = _ref$hasBorder === void 0 ? false : _ref$hasBorder,
25
27
  rest = _objectWithoutProperties(_ref, _excluded);
26
28
 
27
- var classes = classNames('euiFlyoutHeader', {
28
- 'euiFlyoutHeader--hasBorder': hasBorder
29
- }, className);
29
+ var classes = classNames('euiFlyoutHeader', className);
30
+ var euiTheme = useEuiTheme();
31
+ var styles = euiFlyoutHeaderStyles(euiTheme);
32
+ var cssStyles = [styles.euiFlyoutHeader, hasBorder && styles.hasBorder];
30
33
  return ___EmotionJSX("div", _extends({
31
34
  className: classes
32
- }, rest), children);
35
+ }, rest, {
36
+ css: cssStyles
37
+ }), children);
33
38
  };
34
39
  EuiFlyoutHeader.propTypes = {
35
40
  className: PropTypes.string,
@@ -0,0 +1,28 @@
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
+
3
+ /*
4
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
5
+ * or more contributor license agreements. Licensed under the Elastic License
6
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
7
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
8
+ * Side Public License, v 1.
9
+ */
10
+ import { css } from '@emotion/react';
11
+ import { logicalCSS } from '../../global_styling';
12
+
13
+ var _ref = process.env.NODE_ENV === "production" ? {
14
+ name: "1hivny1-euiFlyoutHeader",
15
+ styles: "flex-grow:0;label:euiFlyoutHeader;"
16
+ } : {
17
+ name: "1hivny1-euiFlyoutHeader",
18
+ styles: "flex-grow:0;label:euiFlyoutHeader;",
19
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
20
+ };
21
+
22
+ export var euiFlyoutHeaderStyles = function euiFlyoutHeaderStyles(euiThemeContext) {
23
+ var euiTheme = euiThemeContext.euiTheme;
24
+ return {
25
+ euiFlyoutHeader: _ref,
26
+ hasBorder: /*#__PURE__*/css(logicalCSS('border-bottom', euiTheme.border.thin), ";;label:hasBorder;")
27
+ };
28
+ };
@@ -56,10 +56,10 @@ export var EuiImageWrapper = function EuiImageWrapper(_ref) {
56
56
  optionalCaptionText = _useInnerText2[1];
57
57
 
58
58
  return ___EmotionJSX("figure", _extends({
59
- "aria-label": optionalCaptionText
60
- }, wrapperProps, {
61
- className: classes,
59
+ "aria-label": optionalCaptionText,
62
60
  css: cssFigureStyles
61
+ }, wrapperProps, {
62
+ className: classes
63
63
  }), allowFullScreen ? ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiImageButton, {
64
64
  hasAlt: !!alt,
65
65
  hasShadow: hasShadow,
@@ -6,7 +6,7 @@
6
6
  * Side Public License, v 1.
7
7
  */
8
8
  import { css } from '@emotion/react';
9
- import { logicalCSS, euiFontSize } from '../../global_styling';
9
+ import { logicalCSS, euiFontSize, mathWithUnits } from '../../global_styling';
10
10
  /**
11
11
  * Mixins
12
12
  */
@@ -20,11 +20,16 @@ var euiScaleMarkdownFormatText = function euiScaleMarkdownFormatText(euiTheme, o
20
20
  var measurement = options.measurement;
21
21
  var lineHeightSize = measurement === 'em' ? "".concat(lineHeight, "em") : lineHeight; // Custom scales
22
22
 
23
- var fontSizeNumeric = parseFloat(String(fontSize));
24
- var blockQuoteBorderWidth = fontSizeNumeric / 4;
25
- var tablePaddingVertical = fontSizeNumeric / 4;
26
- var tablePaddingHorizontal = fontSizeNumeric / 2;
27
- return "\n .euiMarkdownFormat__blockquote {\n padding: 0 ".concat(fontSize, ";\n ").concat(logicalCSS('border-left-width', "".concat(blockQuoteBorderWidth).concat(measurement)), "\n ").concat(logicalCSS('margin-bottom', fontSize), "\n }\n\n .euiCheckbox .euiCheckbox__input ~ .euiCheckbox__label { // Extra specificity necessary to override default checkbox CSS\n font-size: ").concat(fontSize, ";\n ").concat(logicalCSS('padding-left', lineHeightSize), "\n line-height: ").concat(lineHeight, ";\n }\n\n .euiCheckbox + *:not(.euiCheckbox) {\n ").concat(logicalCSS('margin-top', fontSize), "\n }\n\n .euiMarkdownFormat__codeblockWrapper {\n ").concat(logicalCSS('margin-bottom', fontSize), "\n }\n\n .euiMarkdownFormat__table {\n ").concat(logicalCSS('margin-bottom', fontSize), "\n }\n\n .euiMarkdownFormat__table th,\n .euiMarkdownFormat__table td {\n ").concat(logicalCSS('padding-vertical', "".concat(tablePaddingVertical).concat(measurement)), "\n ").concat(logicalCSS('padding-horizontal', "".concat(tablePaddingHorizontal).concat(measurement)), "\n }\n ");
23
+ var blockQuoteBorderWidth = mathWithUnits(fontSize, function (x) {
24
+ return x / 4;
25
+ });
26
+ var tablePaddingVertical = mathWithUnits(fontSize, function (x) {
27
+ return x / 4;
28
+ });
29
+ var tablePaddingHorizontal = mathWithUnits(fontSize, function (x) {
30
+ return x / 2;
31
+ });
32
+ return "\n .euiMarkdownFormat__blockquote {\n padding: 0 ".concat(fontSize, ";\n ").concat(logicalCSS('border-left-width', blockQuoteBorderWidth), "\n ").concat(logicalCSS('margin-bottom', fontSize), "\n }\n\n .euiCheckbox .euiCheckbox__input ~ .euiCheckbox__label { // Extra specificity necessary to override default checkbox CSS\n font-size: ").concat(fontSize, ";\n ").concat(logicalCSS('padding-left', lineHeightSize), "\n line-height: ").concat(lineHeight, ";\n }\n\n .euiCheckbox + *:not(.euiCheckbox) {\n ").concat(logicalCSS('margin-top', fontSize), "\n }\n\n .euiMarkdownFormat__codeblockWrapper {\n ").concat(logicalCSS('margin-bottom', fontSize), "\n }\n\n .euiMarkdownFormat__table {\n ").concat(logicalCSS('margin-bottom', fontSize), "\n }\n\n .euiMarkdownFormat__table th,\n .euiMarkdownFormat__table td {\n ").concat(logicalCSS('padding-vertical', tablePaddingVertical), "\n ").concat(logicalCSS('padding-horizontal', tablePaddingHorizontal), "\n }\n ");
28
33
  };
29
34
  /**
30
35
  * Styles
@@ -123,7 +123,7 @@ EuiNotificationEvent.propTypes = {
123
123
  /**
124
124
  * Accepts either our palette colors (primary, success ..etc) or a hex value `#FFFFFF`, `#000`.
125
125
  */
126
- badgeColor: PropTypes.oneOfType([PropTypes.string.isRequired, PropTypes.any.isRequired]),
126
+ badgeColor: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.string.isRequired]),
127
127
 
128
128
  /**
129
129
  * The icon used to visually represent this data type. Accepts any `EuiIcon IconType`.
@@ -144,7 +144,7 @@ EuiNotificationEventMeta.propTypes = {
144
144
  /**
145
145
  * Accepts either our palette colors (primary, success ..etc) or a hex value `#FFFFFF`, `#000`.
146
146
  */
147
- badgeColor: PropTypes.oneOfType([PropTypes.string.isRequired, PropTypes.any.isRequired]),
147
+ badgeColor: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.string.isRequired]),
148
148
 
149
149
  /**
150
150
  * The icon used to visually represent this data type. Accepts any `EuiIcon IconType`.
@@ -59,7 +59,7 @@ export var EuiPageHeaderContent = function EuiPageHeaderContent(_ref) {
59
59
 
60
60
  var isResponsiveBreakpoint = useIsWithinBreakpoints(['xs', 's'], !!responsive);
61
61
  var useTheme = useEuiTheme();
62
- var classes = classNames('euiPageHeaderContent');
62
+ var classes = classNames('euiPageHeaderContent', className);
63
63
  var pageHeaderStyles = euiPageHeaderStyles(useTheme);
64
64
  var contentStyles = euiPageHeaderContentStyles(useTheme);
65
65
  var styles = setStyleForRestrictedPageWidth(restrictWidth, style);
@@ -47,12 +47,11 @@ export var EuiPageSection = function EuiPageSection(_ref) {
47
47
  var colors = useEuiBackgroundColorCSS();
48
48
  var cssStyles = [styles.euiPageSection, grow && styles.grow, inlinePadding[paddingSize], bottomBorder === 'extended' && styles.border, alignment && styles[alignment], colors[color]];
49
49
  var contentStyles = euiPageSectionContentStyles();
50
- var cssContentStyles = [contentStyles.euiPageSection__content, blockPadding[paddingSize], bottomBorder === true && styles.border, alignment.toLowerCase().includes('center') && contentStyles.center, restrictWidth && contentStyles.restrictWidth];
50
+ var cssContentStyles = [contentStyles.euiPageSection__content, blockPadding[paddingSize], bottomBorder === true && styles.border, alignment.toLowerCase().includes('center') && contentStyles.center, restrictWidth && contentStyles.restrictWidth, (contentProps === null || contentProps === void 0 ? void 0 : contentProps.css) && contentProps.css];
51
51
  return ___EmotionJSX(Component, _extends({
52
52
  css: cssStyles
53
- }, rest), ___EmotionJSX("div", _extends({
54
- css: cssContentStyles
55
- }, contentProps, {
53
+ }, rest), ___EmotionJSX("div", _extends({}, contentProps, {
54
+ css: cssContentStyles,
56
55
  style: widthStyles
57
56
  }), children));
58
57
  };
@@ -6,12 +6,14 @@
6
6
  * Side Public License, v 1.
7
7
  */
8
8
  import { css } from '@emotion/react';
9
- import { logicalCSS, logicalTextAlignCSS, euiFontSize } from '../../global_styling';
9
+ import { logicalCSS, logicalTextAlignCSS, mathWithUnits, euiFontSize } from '../../global_styling';
10
10
  import { euiButtonEmptyColor } from '../../themes/amsterdam/global_styling/mixins';
11
11
  export var euiPaginationButtonStyles = function euiPaginationButtonStyles(euiThemeContext) {
12
12
  var euiTheme = euiThemeContext.euiTheme;
13
13
  var fontSizeS = euiFontSize(euiThemeContext, 's');
14
- var halfSizeM = parseInt(euiTheme.size.m.replace('px', '')) / 2;
14
+ var halfSizeM = mathWithUnits(euiTheme.size.m, function (x) {
15
+ return x / 2;
16
+ });
15
17
  var disabled = euiButtonEmptyColor(euiThemeContext, 'disabled'); // && to increase specificity. Can likely be removed once EuiButtonEmpty has been converted.
16
18
 
17
19
  return {
@@ -19,7 +21,7 @@ export var euiPaginationButtonStyles = function euiPaginationButtonStyles(euiThe
19
21
  euiPaginationButton: /*#__PURE__*/css("&&{", fontSizeS, ";padding:0;", logicalTextAlignCSS('center'), " border-radius:", euiTheme.border.radius.medium, ";outline-offset:-", euiTheme.focus.width, ";};label:euiPaginationButton;"),
20
22
  // States
21
23
  isActive: /*#__PURE__*/css("&&{font-weight:", euiTheme.font.weight.bold, ";color:", euiTheme.colors.primary, ";.euiButtonEmpty__content{cursor:default;}&&,&&:hover{text-decoration:underline;}};label:isActive;"),
22
- isPlaceholder: /*#__PURE__*/css("&&{align-items:baseline;color:", disabled.color, ";", fontSizeS, ";", logicalCSS('padding-top', "".concat(halfSizeM, "px")), ";", logicalCSS('padding-bottom', 0), ";", logicalCSS('padding-horizontal', euiTheme.size.s), ";", logicalCSS('height', euiTheme.size.l), ";};label:isPlaceholder;")
24
+ isPlaceholder: /*#__PURE__*/css("&&{align-items:baseline;color:", disabled.color, ";", fontSizeS, ";", logicalCSS('padding-top', halfSizeM), ";", logicalCSS('padding-bottom', 0), ";", logicalCSS('padding-horizontal', euiTheme.size.s), ";", logicalCSS('height', euiTheme.size.l), ";};label:isPlaceholder;")
23
25
  };
24
26
  };
25
27
  export var euiPaginationButtonArrowStyles = function euiPaginationButtonArrowStyles(_ref) {
@@ -31,9 +31,9 @@ export var EuiPopoverTitle = function EuiPopoverTitle(_ref) {
31
31
  panelPadding = _useContext.paddingSize;
32
32
 
33
33
  var euiTheme = useEuiTheme();
34
- var styles = euiPopoverTitleStyles(euiTheme, panelPadding);
34
+ var styles = euiPopoverTitleStyles(euiTheme);
35
35
  var paddingStyles = useEuiPaddingCSS();
36
- var cssStyles = [styles.euiPopoverTitle, // If a paddingSize is not directly provided, inherit from the EuiPopoverPanel
36
+ var cssStyles = [styles.euiPopoverTitle, styles.panelPaddingSizes[panelPadding], // If a paddingSize is not directly provided, inherit from the EuiPopoverPanel
37
37
  paddingStyles[paddingSize || panelPadding]];
38
38
  var classes = classNames('euiPopoverTitle', className);
39
39
  return ___EmotionJSX("div", _extends({