@elastic/eui 105.0.0 → 106.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eui_theme_amsterdam_dark.json +2 -0
- package/dist/eui_theme_amsterdam_dark.json.d.ts +2 -0
- package/dist/eui_theme_amsterdam_light.json +2 -0
- package/dist/eui_theme_amsterdam_light.json.d.ts +2 -0
- package/dist/eui_theme_borealis_dark.json +2 -0
- package/dist/eui_theme_borealis_dark.json.d.ts +2 -0
- package/dist/eui_theme_borealis_light.json +10 -8
- package/dist/eui_theme_borealis_light.json.d.ts +2 -0
- package/es/components/combo_box/combo_box_input/combo_box_input.js +65 -61
- package/es/components/combo_box/combo_box_input/combo_box_input.styles.js +6 -4
- package/es/components/date_picker/date_picker.styles.js +4 -1
- package/es/components/date_picker/date_picker_range.js +3 -2
- package/es/components/date_picker/date_picker_range.styles.js +11 -4
- package/es/components/date_picker/super_date_picker/super_date_picker.styles.js +23 -14
- package/es/components/flyout/_flyout_close_button.styles.js +10 -1
- package/es/components/flyout/flyout_child.js +8 -3
- package/es/components/flyout/flyout_child.styles.js +3 -2
- package/es/components/flyout/sessions/flyout_provider.js +7 -21
- package/es/components/flyout/sessions/flyout_reducer.js +5 -26
- package/es/components/flyout/sessions/use_eui_flyout.js +21 -10
- package/es/components/form/field_number/field_number.styles.js +4 -1
- package/es/components/form/field_text/field_text.styles.js +4 -1
- package/es/components/form/file_picker/file_picker.js +107 -101
- package/es/components/form/file_picker/file_picker.styles.js +18 -17
- package/es/components/form/form.styles.js +72 -22
- package/es/components/form/form_control_layout/form_control_layout.styles.js +28 -17
- package/es/components/form/form_control_layout/form_control_layout_clear_button.styles.js +7 -7
- package/es/components/form/form_control_layout/form_control_layout_delimited.js +10 -7
- package/es/components/form/form_control_layout/form_control_layout_delimited.styles.js +34 -29
- package/es/components/form/form_control_layout/form_control_layout_icons.js +35 -20
- package/es/components/form/form_control_layout/form_control_layout_icons.styles.js +6 -6
- package/es/components/form/form_error_text/form_error_text.styles.js +3 -1
- package/es/components/form/form_label/form_label.styles.js +4 -2
- package/es/components/header/header.styles.js +5 -3
- package/es/components/markdown_editor/markdown_editor_drop_zone.styles.js +6 -3
- package/es/components/progress/progress.a11y.js +7 -7
- package/es/components/progress/progress.js +18 -27
- package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +59 -23
- package/es/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +8 -2
- package/es/components/selectable/selectable_templates/selectable_template_sitewide_popover.js +63 -0
- package/es/global_styling/mixins/_button.js +1 -1
- package/es/services/color/eui_palettes.js +26 -0
- package/es/services/color/vis_color_store.js +1 -1
- package/es/services/color/visualization_colors.js +4 -0
- package/es/services/theme/provider.js +13 -6
- package/es/themes/amsterdam/global_styling/variables/_colors.js +8 -3
- package/es/themes/amsterdam/global_styling/variables/_forms.js +96 -53
- package/es/themes/amsterdam/theme.js +2 -1
- package/es/themes/json/eui_theme_amsterdam_dark.json +2 -0
- package/es/themes/json/eui_theme_amsterdam_light.json +2 -0
- package/es/themes/json/eui_theme_borealis_dark.json +2 -0
- package/es/themes/json/eui_theme_borealis_light.json +10 -8
- package/eui.d.ts +461 -376
- package/i18ntokens.json +3595 -3523
- package/lib/components/combo_box/combo_box_input/combo_box_input.js +64 -60
- package/lib/components/combo_box/combo_box_input/combo_box_input.styles.js +6 -4
- package/lib/components/date_picker/date_picker.styles.js +4 -1
- package/lib/components/date_picker/date_picker_range.js +3 -2
- package/lib/components/date_picker/date_picker_range.styles.js +11 -4
- package/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +21 -12
- package/lib/components/flyout/_flyout_close_button.styles.js +10 -3
- package/lib/components/flyout/flyout_child.js +8 -3
- package/lib/components/flyout/flyout_child.styles.js +3 -2
- package/lib/components/flyout/sessions/flyout_provider.js +7 -21
- package/lib/components/flyout/sessions/flyout_reducer.js +5 -26
- package/lib/components/flyout/sessions/use_eui_flyout.js +21 -10
- package/lib/components/form/field_number/field_number.styles.js +4 -1
- package/lib/components/form/field_text/field_text.styles.js +4 -1
- package/lib/components/form/file_picker/file_picker.js +106 -100
- package/lib/components/form/file_picker/file_picker.styles.js +16 -15
- package/lib/components/form/form.styles.js +72 -22
- package/lib/components/form/form_control_layout/form_control_layout.styles.js +28 -17
- package/lib/components/form/form_control_layout/form_control_layout_clear_button.styles.js +7 -7
- package/lib/components/form/form_control_layout/form_control_layout_delimited.js +9 -6
- package/lib/components/form/form_control_layout/form_control_layout_delimited.styles.js +34 -27
- package/lib/components/form/form_control_layout/form_control_layout_icons.js +34 -19
- package/lib/components/form/form_control_layout/form_control_layout_icons.styles.js +6 -6
- package/lib/components/form/form_error_text/form_error_text.styles.js +3 -1
- package/lib/components/form/form_label/form_label.styles.js +4 -2
- package/lib/components/header/header.styles.js +4 -2
- package/lib/components/markdown_editor/markdown_editor_drop_zone.styles.js +6 -3
- package/lib/components/progress/progress.a11y.js +7 -7
- package/lib/components/progress/progress.js +18 -27
- package/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +57 -21
- package/lib/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +9 -3
- package/lib/components/selectable/selectable_templates/selectable_template_sitewide_popover.js +69 -0
- package/lib/global_styling/mixins/_button.js +1 -1
- package/lib/services/color/eui_palettes.js +26 -0
- package/lib/services/color/vis_color_store.js +1 -1
- package/lib/services/color/visualization_colors.js +3 -0
- package/lib/services/theme/provider.js +13 -6
- package/lib/themes/amsterdam/global_styling/variables/_colors.js +8 -3
- package/lib/themes/amsterdam/global_styling/variables/_forms.js +96 -53
- package/lib/themes/amsterdam/theme.js +2 -1
- package/lib/themes/json/eui_theme_amsterdam_dark.json +2 -0
- package/lib/themes/json/eui_theme_amsterdam_light.json +2 -0
- package/lib/themes/json/eui_theme_borealis_dark.json +2 -0
- package/lib/themes/json/eui_theme_borealis_light.json +10 -8
- package/optimize/es/components/combo_box/combo_box_input/combo_box_input.js +65 -61
- package/optimize/es/components/combo_box/combo_box_input/combo_box_input.styles.js +6 -4
- package/optimize/es/components/date_picker/date_picker.styles.js +4 -1
- package/optimize/es/components/date_picker/date_picker_range.js +3 -2
- package/optimize/es/components/date_picker/date_picker_range.styles.js +11 -4
- package/optimize/es/components/date_picker/super_date_picker/super_date_picker.styles.js +23 -14
- package/optimize/es/components/flyout/_flyout_close_button.styles.js +10 -1
- package/optimize/es/components/flyout/flyout_child.js +4 -3
- package/optimize/es/components/flyout/flyout_child.styles.js +3 -2
- package/optimize/es/components/flyout/sessions/flyout_provider.js +7 -21
- package/optimize/es/components/flyout/sessions/flyout_reducer.js +5 -26
- package/optimize/es/components/flyout/sessions/use_eui_flyout.js +21 -10
- package/optimize/es/components/form/field_number/field_number.styles.js +4 -1
- package/optimize/es/components/form/field_text/field_text.styles.js +4 -1
- package/optimize/es/components/form/file_picker/file_picker.js +107 -101
- package/optimize/es/components/form/file_picker/file_picker.styles.js +18 -17
- package/optimize/es/components/form/form.styles.js +72 -22
- package/optimize/es/components/form/form_control_layout/form_control_layout.styles.js +28 -17
- package/optimize/es/components/form/form_control_layout/form_control_layout_clear_button.styles.js +7 -7
- package/optimize/es/components/form/form_control_layout/form_control_layout_delimited.js +10 -7
- package/optimize/es/components/form/form_control_layout/form_control_layout_delimited.styles.js +34 -29
- package/optimize/es/components/form/form_control_layout/form_control_layout_icons.js +35 -20
- package/optimize/es/components/form/form_control_layout/form_control_layout_icons.styles.js +6 -6
- package/optimize/es/components/form/form_error_text/form_error_text.styles.js +3 -1
- package/optimize/es/components/form/form_label/form_label.styles.js +4 -2
- package/optimize/es/components/header/header.styles.js +5 -3
- package/optimize/es/components/markdown_editor/markdown_editor_drop_zone.styles.js +6 -3
- package/optimize/es/components/progress/progress.a11y.js +7 -7
- package/optimize/es/components/progress/progress.js +18 -27
- package/optimize/es/components/selectable/selectable_templates/selectable_template_sitewide.js +47 -22
- package/optimize/es/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +8 -2
- package/optimize/es/components/selectable/selectable_templates/selectable_template_sitewide_popover.js +52 -0
- package/optimize/es/global_styling/mixins/_button.js +1 -1
- package/optimize/es/services/color/eui_palettes.js +26 -0
- package/optimize/es/services/color/vis_color_store.js +1 -1
- package/optimize/es/services/color/visualization_colors.js +4 -0
- package/optimize/es/services/theme/provider.js +13 -6
- package/optimize/es/themes/amsterdam/global_styling/variables/_colors.js +8 -3
- package/optimize/es/themes/amsterdam/global_styling/variables/_forms.js +96 -53
- package/optimize/es/themes/amsterdam/theme.js +2 -1
- package/optimize/es/themes/json/eui_theme_amsterdam_dark.json +2 -0
- package/optimize/es/themes/json/eui_theme_amsterdam_light.json +2 -0
- package/optimize/es/themes/json/eui_theme_borealis_dark.json +2 -0
- package/optimize/es/themes/json/eui_theme_borealis_light.json +10 -8
- package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.js +64 -60
- package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.styles.js +6 -4
- package/optimize/lib/components/date_picker/date_picker.styles.js +4 -1
- package/optimize/lib/components/date_picker/date_picker_range.js +3 -2
- package/optimize/lib/components/date_picker/date_picker_range.styles.js +11 -4
- package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +21 -12
- package/optimize/lib/components/flyout/_flyout_close_button.styles.js +10 -3
- package/optimize/lib/components/flyout/flyout_child.js +4 -3
- package/optimize/lib/components/flyout/flyout_child.styles.js +3 -2
- package/optimize/lib/components/flyout/sessions/flyout_provider.js +7 -21
- package/optimize/lib/components/flyout/sessions/flyout_reducer.js +5 -26
- package/optimize/lib/components/flyout/sessions/use_eui_flyout.js +21 -10
- package/optimize/lib/components/form/field_number/field_number.styles.js +4 -1
- package/optimize/lib/components/form/field_text/field_text.styles.js +4 -1
- package/optimize/lib/components/form/file_picker/file_picker.js +106 -100
- package/optimize/lib/components/form/file_picker/file_picker.styles.js +16 -15
- package/optimize/lib/components/form/form.styles.js +72 -22
- package/optimize/lib/components/form/form_control_layout/form_control_layout.styles.js +28 -17
- package/optimize/lib/components/form/form_control_layout/form_control_layout_clear_button.styles.js +7 -7
- package/optimize/lib/components/form/form_control_layout/form_control_layout_delimited.js +9 -6
- package/optimize/lib/components/form/form_control_layout/form_control_layout_delimited.styles.js +34 -27
- package/optimize/lib/components/form/form_control_layout/form_control_layout_icons.js +34 -19
- package/optimize/lib/components/form/form_control_layout/form_control_layout_icons.styles.js +6 -6
- package/optimize/lib/components/form/form_error_text/form_error_text.styles.js +3 -1
- package/optimize/lib/components/form/form_label/form_label.styles.js +4 -2
- package/optimize/lib/components/header/header.styles.js +4 -2
- package/optimize/lib/components/markdown_editor/markdown_editor_drop_zone.styles.js +6 -3
- package/optimize/lib/components/progress/progress.a11y.js +7 -7
- package/optimize/lib/components/progress/progress.js +18 -27
- package/optimize/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +45 -20
- package/optimize/lib/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +9 -3
- package/optimize/lib/components/selectable/selectable_templates/selectable_template_sitewide_popover.js +58 -0
- package/optimize/lib/global_styling/mixins/_button.js +1 -1
- package/optimize/lib/services/color/eui_palettes.js +26 -0
- package/optimize/lib/services/color/vis_color_store.js +1 -1
- package/optimize/lib/services/color/visualization_colors.js +3 -0
- package/optimize/lib/services/theme/provider.js +13 -6
- package/optimize/lib/themes/amsterdam/global_styling/variables/_colors.js +8 -3
- package/optimize/lib/themes/amsterdam/global_styling/variables/_forms.js +96 -53
- package/optimize/lib/themes/amsterdam/theme.js +2 -1
- package/optimize/lib/themes/json/eui_theme_amsterdam_dark.json +2 -0
- package/optimize/lib/themes/json/eui_theme_amsterdam_light.json +2 -0
- package/optimize/lib/themes/json/eui_theme_borealis_dark.json +2 -0
- package/optimize/lib/themes/json/eui_theme_borealis_light.json +10 -8
- package/package.json +12 -10
- package/src/themes/amsterdam/_colors_dark.scss +3 -0
- package/src/themes/amsterdam/_colors_light.scss +3 -0
- package/test-env/components/combo_box/combo_box_input/combo_box_input.js +64 -60
- package/test-env/components/combo_box/combo_box_input/combo_box_input.styles.js +6 -4
- package/test-env/components/date_picker/date_picker.styles.js +4 -1
- package/test-env/components/date_picker/date_picker_range.js +3 -2
- package/test-env/components/date_picker/date_picker_range.styles.js +11 -4
- package/test-env/components/date_picker/super_date_picker/super_date_picker.styles.js +21 -12
- package/test-env/components/flyout/_flyout_close_button.styles.js +10 -3
- package/test-env/components/flyout/flyout_child.js +8 -3
- package/test-env/components/flyout/flyout_child.styles.js +3 -2
- package/test-env/components/flyout/sessions/flyout_provider.js +7 -21
- package/test-env/components/flyout/sessions/flyout_reducer.js +5 -26
- package/test-env/components/flyout/sessions/use_eui_flyout.js +21 -10
- package/test-env/components/form/field_number/field_number.styles.js +4 -1
- package/test-env/components/form/field_text/field_text.styles.js +4 -1
- package/test-env/components/form/file_picker/file_picker.js +106 -100
- package/test-env/components/form/file_picker/file_picker.styles.js +16 -15
- package/test-env/components/form/form.styles.js +72 -22
- package/test-env/components/form/form_control_layout/form_control_layout.styles.js +28 -17
- package/test-env/components/form/form_control_layout/form_control_layout_clear_button.styles.js +7 -7
- package/test-env/components/form/form_control_layout/form_control_layout_delimited.js +9 -6
- package/test-env/components/form/form_control_layout/form_control_layout_delimited.styles.js +34 -27
- package/test-env/components/form/form_control_layout/form_control_layout_icons.js +34 -19
- package/test-env/components/form/form_control_layout/form_control_layout_icons.styles.js +6 -6
- package/test-env/components/form/form_error_text/form_error_text.styles.js +3 -1
- package/test-env/components/form/form_label/form_label.styles.js +4 -2
- package/test-env/components/header/header.styles.js +4 -2
- package/test-env/components/markdown_editor/markdown_editor_drop_zone.styles.js +6 -3
- package/test-env/components/progress/progress.a11y.js +7 -7
- package/test-env/components/progress/progress.js +18 -27
- package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.js +57 -21
- package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +9 -3
- package/test-env/components/selectable/selectable_templates/selectable_template_sitewide_popover.js +68 -0
- package/test-env/global_styling/mixins/_button.js +1 -1
- package/test-env/services/color/eui_palettes.js +26 -0
- package/test-env/services/color/vis_color_store.js +1 -1
- package/test-env/services/color/visualization_colors.js +3 -0
- package/test-env/services/theme/provider.js +13 -6
- package/test-env/themes/amsterdam/global_styling/variables/_colors.js +8 -3
- package/test-env/themes/amsterdam/global_styling/variables/_forms.js +96 -53
- package/test-env/themes/amsterdam/theme.js +2 -1
- package/test-env/themes/json/eui_theme_amsterdam_dark.json +2 -0
- package/test-env/themes/json/eui_theme_amsterdam_light.json +2 -0
- package/test-env/themes/json/eui_theme_borealis_dark.json +2 -0
- package/test-env/themes/json/eui_theme_borealis_light.json +10 -8
|
@@ -413,6 +413,8 @@
|
|
|
413
413
|
"euiColorBorderBaseFloating": "#2B394F",
|
|
414
414
|
"euiColorBorderBaseFormsColorSwatch": "rgba(255,255,255, 0.32)",
|
|
415
415
|
"euiColorBorderBaseFormsControl": "#6A7FA0",
|
|
416
|
+
"euiColorBorderInteractiveFormsHoverPlain": "#5A6D8C",
|
|
417
|
+
"euiColorBorderInteractiveFormsHoverDanger": "#EE4C48",
|
|
416
418
|
"euiColorBorderStrongPrimary": "#61A2FF",
|
|
417
419
|
"euiColorBorderStrongAccent": "#EE72A6",
|
|
418
420
|
"euiColorBorderStrongAccentSecondary": "#16C5C0",
|
|
@@ -413,13 +413,15 @@
|
|
|
413
413
|
"euiColorBorderBaseFloating": "transparent",
|
|
414
414
|
"euiColorBorderBaseFormsColorSwatch": "rgba(72,89,117, 0.24)",
|
|
415
415
|
"euiColorBorderBaseFormsControl": "#8E9FBC",
|
|
416
|
-
"
|
|
417
|
-
"
|
|
418
|
-
"
|
|
419
|
-
"
|
|
420
|
-
"
|
|
421
|
-
"
|
|
422
|
-
"
|
|
423
|
-
"
|
|
416
|
+
"euiColorBorderInteractiveFormsHoverPlain": "#B4C1D5",
|
|
417
|
+
"euiColorBorderInteractiveFormsHoverDanger": "#DA3737",
|
|
418
|
+
"euiColorBorderStrongPrimary": "#0B64DD",
|
|
419
|
+
"euiColorBorderStrongAccent": "#BC1E70",
|
|
420
|
+
"euiColorBorderStrongAccentSecondary": "#008B87",
|
|
421
|
+
"euiColorBorderStrongNeutral": "#19799F",
|
|
422
|
+
"euiColorBorderStrongSuccess": "#008A5E",
|
|
423
|
+
"euiColorBorderStrongWarning": "#966B03",
|
|
424
|
+
"euiColorBorderStrongRisk": "#C24411",
|
|
425
|
+
"euiColorBorderStrongDanger": "#C61E25",
|
|
424
426
|
"euiColorBorderStrongText": "#5A6D8C"
|
|
425
427
|
}
|
|
@@ -244,66 +244,70 @@ var EuiComboBoxInput = exports.EuiComboBoxInput = /*#__PURE__*/function (_Compon
|
|
|
244
244
|
var wrapClasses = (0, _classnames.default)('euiComboBox__inputWrap', {
|
|
245
245
|
'euiComboBox__inputWrap--plainText': this.asPlainText
|
|
246
246
|
});
|
|
247
|
-
return (0, _react2.jsx)(_services.
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
247
|
+
return (0, _react2.jsx)(_services.RenderWithEuiTheme, null, function (euiThemeContext) {
|
|
248
|
+
return (0, _react2.jsx)(_services.RenderWithEuiStylesMemoizer, null, function (stylesMemoizer) {
|
|
249
|
+
var styles = stylesMemoizer(_combo_box_input.euiComboBoxInputStyles);
|
|
250
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
251
|
+
var stateCss = isRefreshVariant ? isListOpen ? styles.open : isInvalid ? styles.invalid : undefined : isInvalid ? styles.invalid : isListOpen ? styles.open : undefined;
|
|
252
|
+
var cssStyles = [styles.euiComboBoxInputWrapper, !singleSelection && styles.multiSelect, compressed ? styles.compressed : styles.uncompressed].concat((0, _toConsumableArray2.default)(_this2.asPlainText || showPlaceholder ? [styles.plainText.plainText, compressed ? styles.plainText.compressed : styles.plainText.uncompressed] : []), [isDisabled ? styles.disabled : stateCss, isInGroup && styles.inGroup]);
|
|
253
|
+
var formLayoutStyles = [styles.formLayout.euiComboBox__formControlLayout, !singleSelection && styles.formLayout.multiSelect];
|
|
254
|
+
return (0, _react2.jsx)(_form_control_layout.EuiFormControlLayout, (0, _extends2.default)({
|
|
255
|
+
icon: icon
|
|
256
|
+
}, clickProps, {
|
|
257
|
+
inputId: id,
|
|
258
|
+
isLoading: isLoading,
|
|
259
|
+
isInvalid: isInvalid,
|
|
260
|
+
isDisabled: isDisabled,
|
|
261
|
+
compressed: compressed,
|
|
262
|
+
fullWidth: fullWidth,
|
|
263
|
+
prepend: prepend,
|
|
264
|
+
append: append,
|
|
265
|
+
css: formLayoutStyles
|
|
266
|
+
}), (0, _react2.jsx)("div", {
|
|
267
|
+
css: cssStyles,
|
|
268
|
+
className: wrapClasses,
|
|
269
|
+
"data-test-subj": "comboBoxInput",
|
|
270
|
+
onClick: onClick,
|
|
271
|
+
tabIndex: -1 // becomes onBlur event's relatedTarget, otherwise relatedTarget is null when clicking on this div
|
|
272
|
+
}, _this2.renderPills(), (0, _react2.jsx)(_utils.EuiComboBoxOptionAppendPrepend, {
|
|
273
|
+
option: _this2.asPlainText ? selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions[0] : undefined,
|
|
274
|
+
classNamePrefix: "euiComboBoxPlainTextSelection",
|
|
275
|
+
marginSize: "xxs"
|
|
276
|
+
}, (0, _react2.jsx)("input", {
|
|
277
|
+
"aria-activedescendant": focusedOptionId,
|
|
278
|
+
"aria-autocomplete": "list",
|
|
279
|
+
"aria-controls": isListOpen ? rootId('listbox') : '',
|
|
280
|
+
"aria-expanded": isListOpen,
|
|
281
|
+
"aria-label": ariaLabel,
|
|
282
|
+
"aria-labelledby": ariaLabelledby,
|
|
283
|
+
"aria-describedby": ariaDescribedby,
|
|
284
|
+
"aria-invalid": isInvalid,
|
|
285
|
+
"aria-haspopup": "listbox",
|
|
286
|
+
css: styles.euiComboBoxInput,
|
|
287
|
+
className: "euiComboBox__input",
|
|
288
|
+
"data-test-subj": "comboBoxSearchInput",
|
|
289
|
+
disabled: isDisabled,
|
|
290
|
+
id: id,
|
|
291
|
+
onBlur: _this2.onBlur,
|
|
292
|
+
onChange: function onChange(event) {
|
|
293
|
+
return _onChange(event.target.value);
|
|
294
|
+
},
|
|
295
|
+
onFocus: _this2.onFocus,
|
|
296
|
+
onKeyDown: _this2.onKeyDown,
|
|
297
|
+
ref: _this2.inputRefCallback,
|
|
298
|
+
role: "combobox",
|
|
299
|
+
style: {
|
|
300
|
+
inlineSize: _this2.asPlainText || showPlaceholder ? '100%' : _this2.state.inputWidth
|
|
301
|
+
},
|
|
302
|
+
placeholder: showPlaceholder ? placeholder : undefined,
|
|
303
|
+
value: _this2.searchValue,
|
|
304
|
+
autoFocus: autoFocus,
|
|
305
|
+
autoComplete: "off"
|
|
306
|
+
// Force the menu to re-open on every input click - only necessary when plain text
|
|
307
|
+
,
|
|
308
|
+
onClick: _this2.asPlainText ? onFocus : undefined // Type shenanigans - event should be mostly the same
|
|
309
|
+
})), removeOptionMessage));
|
|
310
|
+
});
|
|
307
311
|
});
|
|
308
312
|
}
|
|
309
313
|
}]);
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.euiComboBoxInputStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
|
+
var _services = require("../../../services");
|
|
8
9
|
var _global_styling = require("../../../global_styling");
|
|
9
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)."; } /*
|
|
@@ -32,12 +33,13 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
32
33
|
};
|
|
33
34
|
var euiComboBoxInputStyles = exports.euiComboBoxInputStyles = function euiComboBoxInputStyles(euiThemeContext) {
|
|
34
35
|
var euiTheme = euiThemeContext.euiTheme;
|
|
36
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
35
37
|
var formStyles = (0, _form.euiFormControlStyles)(euiThemeContext);
|
|
36
38
|
return {
|
|
37
39
|
// Wrapper which visually mimics a form control
|
|
38
|
-
euiComboBoxInputWrapper: /*#__PURE__*/(0, _react.css)((0, _form.euiFormControlDefaultShadow)(euiThemeContext), " display:flex;;label:euiComboBoxInputWrapper;"),
|
|
40
|
+
euiComboBoxInputWrapper: /*#__PURE__*/(0, _react.css)((0, _form.euiFormControlDefaultShadow)(euiThemeContext), " display:flex;", isRefreshVariant && "\n &:focus-within {\n ".concat(formStyles.focus, "\n }\n "), ";;label:euiComboBoxInputWrapper;"),
|
|
39
41
|
multiSelect: _ref2,
|
|
40
|
-
uncompressed: "\n ".concat(formStyles.uncompressed, "\n ").concat((0, _global_styling.logicalCSS)('height', 'auto'), "\n ").concat((0, _global_styling.logicalCSS)('padding-vertical', euiTheme.size.s), "\n ").concat((0, _global_styling.logicalCSS)('padding-left', euiTheme.size.s), "\n column-gap: ").concat(euiTheme.size.s, ";\n row-gap: ").concat(euiTheme.size.xs, ";\n "),
|
|
42
|
+
uncompressed: "\n ".concat(formStyles.uncompressed, "\n ").concat((0, _global_styling.logicalCSS)('height', 'auto'), "\n ").concat((0, _global_styling.logicalCSS)('padding-vertical', euiTheme.size.s), "\n ").concat((0, _global_styling.logicalCSS)('padding-left', isRefreshVariant ? euiTheme.size.m : euiTheme.size.s), "\n column-gap: ").concat(euiTheme.size.s, ";\n row-gap: ").concat(euiTheme.size.xs, ";\n "),
|
|
41
43
|
compressed: /*#__PURE__*/(0, _react.css)(formStyles.compressed, " ", (0, _global_styling.logicalCSS)('height', 'auto'), " ", (0, _global_styling.logicalCSS)('padding-vertical', euiTheme.size.xs), " ", (0, _global_styling.logicalCSS)('padding-left', euiTheme.size.xs), " column-gap:", euiTheme.size.xs, ";row-gap:", euiTheme.size.xxs, ";;label:compressed;"),
|
|
42
44
|
plainText: {
|
|
43
45
|
plainText: _ref,
|
|
@@ -46,10 +48,10 @@ var euiComboBoxInputStyles = exports.euiComboBoxInputStyles = function euiComboB
|
|
|
46
48
|
},
|
|
47
49
|
invalid: /*#__PURE__*/(0, _react.css)(formStyles.invalid, ";label:invalid;"),
|
|
48
50
|
disabled: /*#__PURE__*/(0, _react.css)(formStyles.disabled, ";label:disabled;"),
|
|
49
|
-
open: /*#__PURE__*/(0, _react.css)(formStyles.focus, "
|
|
51
|
+
open: /*#__PURE__*/(0, _react.css)(formStyles.focus, ";;label:open;"),
|
|
50
52
|
inGroup: /*#__PURE__*/(0, _react.css)(formStyles.inGroup, ";label:inGroup;"),
|
|
51
53
|
// Actual input element, which has variable width depending on its value
|
|
52
|
-
euiComboBoxInput: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', euiTheme.size.l), " ", (0, _global_styling.logicalCSS)('min-width', '2px'), " ", (0, _global_styling.logicalCSS)('max-width', '100%'), (0, _form.euiFormControlText)(euiThemeContext), " background:transparent;&:disabled{color:", euiTheme.colors.
|
|
54
|
+
euiComboBoxInput: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', euiTheme.size.l), " ", (0, _global_styling.logicalCSS)('min-width', '2px'), " ", (0, _global_styling.logicalCSS)('max-width', '100%'), (0, _form.euiFormControlText)(euiThemeContext), " background:transparent;&:disabled{color:", euiTheme.colors.textDisabled, ";}appearance:none!important;border:none!important;box-shadow:none!important;outline:none!important;;label:euiComboBoxInput;"),
|
|
53
55
|
// EuiFormControlLayout overrides
|
|
54
56
|
formLayout: {
|
|
55
57
|
euiComboBox__formControlLayout: /*#__PURE__*/(0, _react.css)(";label:euiComboBox__formControlLayout;"),
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.euiDatePickerStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _euiThemeCommon = require("@elastic/eui-theme-common");
|
|
9
|
+
var _services = require("../../services");
|
|
9
10
|
var _global_styling = require("../../global_styling");
|
|
10
11
|
var _form = require("../form/form.styles");
|
|
11
12
|
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)."; } /*
|
|
@@ -25,10 +26,12 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
25
26
|
};
|
|
26
27
|
var euiDatePickerStyles = exports.euiDatePickerStyles = function euiDatePickerStyles(euiThemeContext) {
|
|
27
28
|
var euiTheme = euiThemeContext.euiTheme;
|
|
29
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
30
|
+
var inlineStyles = "\n /* removes form layout border */\n &::after {\n display: none;\n }\n ";
|
|
28
31
|
return {
|
|
29
32
|
euiDatePicker: _ref,
|
|
30
33
|
inline: {
|
|
31
|
-
inline: /*#__PURE__*/(0, _react.css)(".euiFormControlLayout{", (0, _global_styling.logicalCSS)('height', 'auto'), " ", (0, _global_styling.logicalCSS)('width', 'fit-content'), " border:none;padding:0;}.euiFormControlLayout__childrenWrapper{flex-direction:column;}.euiFormControlLayoutIcons{justify-content:center;", (0, _global_styling.logicalCSS)('padding-bottom', euiTheme.size.s), ";};label:inline;"),
|
|
34
|
+
inline: /*#__PURE__*/(0, _react.css)(".euiFormControlLayout{", (0, _global_styling.logicalCSS)('height', 'auto'), " ", (0, _global_styling.logicalCSS)('width', 'fit-content'), " border:none;padding:0;", isRefreshVariant && inlineStyles, ";}.euiFormControlLayout__childrenWrapper{flex-direction:column;}.euiFormControlLayoutIcons{justify-content:center;", (0, _global_styling.logicalCSS)('padding-bottom', euiTheme.size.s), ";};label:inline;"),
|
|
32
35
|
// Skip css`` to avoid generating an Emotion className
|
|
33
36
|
noShadow: "\n .euiFormControlLayout {\n background-color: transparent;\n }\n ",
|
|
34
37
|
shadow: /*#__PURE__*/(0, _react.css)(".euiFormControlLayout{background-color:", euiTheme.colors.emptyShade, ";", (0, _euiThemeCommon.euiShadowMedium)(euiThemeContext, {
|
|
@@ -51,8 +51,9 @@ var EuiDatePickerRange = exports.EuiDatePickerRange = function EuiDatePickerRang
|
|
|
51
51
|
var fullWidth = _fullWidth && !inline;
|
|
52
52
|
var compressed = _compressed && !inline;
|
|
53
53
|
var classes = (0, _classnames.default)('euiDatePickerRange', className);
|
|
54
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_date_picker_range.euiDatePickerRangeStyles);
|
|
54
55
|
var inlineStyles = (0, _services.useEuiMemoizedStyles)(_date_picker_range.euiDatePickerRangeInlineStyles);
|
|
55
|
-
var cssStyles = !inline ?
|
|
56
|
+
var cssStyles = !inline ? styles.euiDatePickerRange : [inlineStyles.euiDatePickerRangeInline,
|
|
56
57
|
// Determine the inline container query to use based on the width of the react-datepicker
|
|
57
58
|
startDateControl !== null && startDateControl !== void 0 && startDateControl.props.showTimeSelect || endDateControl !== null && endDateControl !== void 0 && endDateControl.props.showTimeSelect ? inlineStyles.responsiveWithTimeSelect : inlineStyles.responsive, shadow && inlineStyles.shadow];
|
|
58
59
|
var startControl = startDateControl;
|
|
@@ -108,7 +109,7 @@ var EuiDatePickerRange = exports.EuiDatePickerRange = function EuiDatePickerRang
|
|
|
108
109
|
if (iconType === true) return 'calendar';
|
|
109
110
|
return iconType;
|
|
110
111
|
}, [iconType, inline]);
|
|
111
|
-
return (0, _react2.jsx)("
|
|
112
|
+
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
112
113
|
className: classes,
|
|
113
114
|
css: cssStyles
|
|
114
115
|
}, rest), (0, _react2.jsx)(_form.EuiFormControlLayoutDelimited, {
|
|
@@ -7,6 +7,8 @@ exports.euiDatePickerRangeStyles = exports.euiDatePickerRangeInlineStyles = void
|
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _euiThemeCommon = require("@elastic/eui-theme-common");
|
|
9
9
|
var _global_styling = require("../../global_styling");
|
|
10
|
+
var _services = require("../../services");
|
|
11
|
+
var _form = require("../form/form.styles");
|
|
10
12
|
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
13
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
12
14
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -14,8 +16,12 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
14
16
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
15
17
|
* Side Public License, v 1.
|
|
16
18
|
*/
|
|
17
|
-
var euiDatePickerRangeStyles = exports.euiDatePickerRangeStyles = {
|
|
18
|
-
|
|
19
|
+
var euiDatePickerRangeStyles = exports.euiDatePickerRangeStyles = function euiDatePickerRangeStyles(euiThemeContext) {
|
|
20
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
21
|
+
var refreshStyles = "\n .euiPopover:last-child {\n ".concat((0, _global_styling.logicalCSS)('border-top-right-radius', 'inherit'), "\n ").concat((0, _global_styling.logicalCSS)('border-bottom-right-radius', 'inherit'), "\n\n * {\n ").concat((0, _global_styling.logicalCSS)('border-top-right-radius', 'inherit'), "\n ").concat((0, _global_styling.logicalCSS)('border-bottom-right-radius', 'inherit'), "\n }\n }\n ");
|
|
22
|
+
return {
|
|
23
|
+
euiDatePickerRange: /*#__PURE__*/(0, _react.css)(".euiPopover,.react-datepicker__input-container,.euiDatePicker{", (0, _global_styling.logicalCSS)('height', '100%'), ";}.euiPopover{flex:1;}", isRefreshVariant && refreshStyles, ";;label:euiDatePickerRange;")
|
|
24
|
+
};
|
|
19
25
|
};
|
|
20
26
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
21
27
|
name: "bicgs9-noShadow",
|
|
@@ -27,6 +33,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
27
33
|
};
|
|
28
34
|
var euiDatePickerRangeInlineStyles = exports.euiDatePickerRangeInlineStyles = function euiDatePickerRangeInlineStyles(euiThemeContext) {
|
|
29
35
|
var euiTheme = euiThemeContext.euiTheme;
|
|
36
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
30
37
|
|
|
31
38
|
// Use a container query to stack date pickers vertically if the container is
|
|
32
39
|
// not wide enough to fit both. We need a fn for this to render two width queries,
|
|
@@ -36,12 +43,12 @@ var euiDatePickerRangeInlineStyles = exports.euiDatePickerRangeInlineStyles = fu
|
|
|
36
43
|
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 }");
|
|
37
44
|
};
|
|
38
45
|
return {
|
|
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%'), " border: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;"),
|
|
46
|
+
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%'), " border:none;padding:0;", isRefreshVariant && "\n &::after {\n display: none;\n }\n ", ";.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;"),
|
|
40
47
|
responsive: /*#__PURE__*/(0, _react.css)(containerQuery(268), ";;label:responsive;"),
|
|
41
48
|
responsiveWithTimeSelect: /*#__PURE__*/(0, _react.css)(containerQuery(374), ";;label:responsiveWithTimeSelect;"),
|
|
42
49
|
shadow: /*#__PURE__*/(0, _react.css)(".euiFormControlLayoutDelimited{", (0, _euiThemeCommon.euiShadowMedium)(euiThemeContext, {
|
|
43
50
|
borderAllInHighContrastMode: true
|
|
44
|
-
}), ";};label:shadow;"),
|
|
51
|
+
}), " ", isRefreshVariant && "\n /* the form layout is not part of the interactive behavior but rather a container in this variant */\n ".concat((0, _form.disableFormControlHoverStyles)(), "\n\n .euiFormControlLayout__childrenWrapper {\n box-shadow: none;\n ").concat((0, _form.disableFormControlHoverStyles)(), "\n }\n "), ";};label:shadow;"),
|
|
45
52
|
// Applied directly to EuiFormControlLayout so we can check if `disabled`
|
|
46
53
|
// and allow the disabled background-color to take precedence
|
|
47
54
|
formLayout: {
|
|
@@ -26,6 +26,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
26
26
|
};
|
|
27
27
|
var euiSuperDatePickerStyles = exports.euiSuperDatePickerStyles = function euiSuperDatePickerStyles(euiThemeContext) {
|
|
28
28
|
var euiTheme = euiThemeContext.euiTheme;
|
|
29
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
29
30
|
var forms = (0, _form.euiFormVariables)(euiThemeContext);
|
|
30
31
|
var inputWidth = euiTheme.base * 30;
|
|
31
32
|
var buttonWidth = euiTheme.base * 7; // @see _button_display.styles.ts
|
|
@@ -45,6 +46,18 @@ var euiSuperDatePickerStyles = exports.euiSuperDatePickerStyles = function euiSu
|
|
|
45
46
|
// Needs updating colors
|
|
46
47
|
var needsUpdatingBackgroundColor = euiTheme.components.superDatePickerBackgroundSuccees;
|
|
47
48
|
var needsUpdatingTextColor = (0, _services.makeHighContrastColor)(euiTheme.colors.success)(needsUpdatingBackgroundColor);
|
|
49
|
+
var formLayoutStyles = "\n /* using wrapper hover styles instead */\n .euiDatePopoverButton:not(.euiDatePopoverButton-isSelected):hover {\n outline: none;\n }\n\n .euiPopover {\n /* mimic input border-radius */\n border-radius: ".concat(forms.controlBorderRadius, ";\n\n &:first-child {\n ").concat((0, _global_styling.logicalCSS)('border-top-left-radius', 'inherit'), "\n ").concat((0, _global_styling.logicalCSS)('border-bottom-left-radius', 'inherit'), "\n }\n\n &:last-child {\n ").concat((0, _global_styling.logicalCSS)('border-top-right-radius', 'inherit'), "\n ").concat((0, _global_styling.logicalCSS)('border-bottom-right-radius', 'inherit'), "\n }\n }\n\n .euiDatePopoverButton {\n background-color: transparent;\n border-radius: inherit;\n }\n ");
|
|
50
|
+
var popoverButtonFocusStyles = isRefreshVariant ? "\n ".concat((0, _form.euiFormControlFocusStyles)(euiThemeContext), "\n ") : "\n --euiFormControlStateColor: ".concat(euiTheme.colors.primary, ";\n ").concat((0, _form.euiFormControlShowBackgroundLine)(euiThemeContext, euiTheme.colors.primary), "\n ");
|
|
51
|
+
var invalidStyles = isRefreshVariant ? "\n &:has(.euiPopover-isOpen, .euiDatePopoverButton:focus) {\n --euiFormControlStateColor: ".concat(forms.borderColor, ";\n --euiFormControlStateHoverColor: ").concat(forms.borderHovered, ";\n }\n\n &:not(:has(.euiPopover-isOpen, .euiDatePopoverButton:focus)) {\n ").concat((0, _form.euiFormControlInvalidStyles)(euiThemeContext), "\n }\n\n .euiDatePopoverButton:focus,\n .euiPopover-isOpen .euiDatePopoverButton {\n ").concat((0, _form.euiFormControlFocusStyles)(euiThemeContext), "\n }\n ") : "\n ".concat((0, _form.euiFormControlInvalidStyles)(euiThemeContext), "\n ");
|
|
52
|
+
var needsUpdatingStyles = "\n --euiFormControlStateColor: ".concat(euiTheme.colors.success, ";\n --euiFormControlStateHoverColor: ").concat(euiTheme.colors.success, ";\n --euiFormControlStateWidth: ").concat(euiTheme.border.width.thin, ";\n ").concat(_form.euiFormControlHighlightBorderStyles, "\n \n &:has(.euiPopover-isOpen),\n &:focus-within {\n --euiFormControlStateColor: ").concat(forms.borderColor, ";\n --euiFormControlStateHoverColor: ").concat(forms.borderHovered, ";\n }\n ");
|
|
53
|
+
var needsUpdatingPopoverButtonFocusStyles = isRefreshVariant ? "\n ".concat((0, _form.euiFormControlFocusStyles)(euiThemeContext), "\n ") : "\n --euiFormControlStateColor: ".concat(euiTheme.colors.success, ";\n ").concat((0, _form.euiFormControlShowBackgroundLine)(euiThemeContext, euiTheme.colors.success), "\n\n ").concat((0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
|
|
54
|
+
// Force the fill color of all icons/svgs to give a bit more indication of state,
|
|
55
|
+
// since Windows high contrast themes otherwise override background/text color
|
|
56
|
+
forced: "\n svg,\n & + * svg {\n fill: ".concat(euiTheme.colors.success, ";\n }\n ")
|
|
57
|
+
}), "\n ");
|
|
58
|
+
var prettyFormatStyles = "\n --euiFormControlStateHoverColor: ".concat(forms.borderHovered, ";\n ").concat((0, _form.euiFormControlDefaultShadow)(euiThemeContext), "\n \n ").concat((0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
|
|
59
|
+
preferred: "\n border: none;\n "
|
|
60
|
+
}), "\n\n &:focus {\n ").concat((0, _form.euiFormControlFocusStyles)(euiThemeContext), "\n }\n ");
|
|
48
61
|
return {
|
|
49
62
|
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
63
|
widths: {
|
|
@@ -69,27 +82,23 @@ var euiSuperDatePickerStyles = exports.euiSuperDatePickerStyles = function euiSu
|
|
|
69
82
|
isQuickSelectOnly: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('min-width', 0), ".euiFormControlLayout__prepend{", (0, _global_styling.logicalCSS)('max-width', 'none'), ";};label:isQuickSelectOnly;"),
|
|
70
83
|
euiSuperDatePicker__range: _ref,
|
|
71
84
|
euiSuperDatePicker__rangeInput: /*#__PURE__*/(0, _react.css)("flex-grow:1;", (0, _global_styling.logicalCSS)('width', 'auto'), " overflow:hidden;;label:euiSuperDatePicker__rangeInput;"),
|
|
72
|
-
euiSuperDatePicker__prettyFormat: /*#__PURE__*/(0, _react.css)(_buttonStyles(euiThemeContext), " text-align:start;;label:euiSuperDatePicker__prettyFormat;"),
|
|
85
|
+
euiSuperDatePicker__prettyFormat: /*#__PURE__*/(0, _react.css)(_buttonStyles(euiThemeContext), " text-align:start;", isRefreshVariant && prettyFormatStyles, ";;label:euiSuperDatePicker__prettyFormat;"),
|
|
73
86
|
// Form states
|
|
74
87
|
states: {
|
|
75
|
-
euiSuperDatePicker__formControlLayout: /*#__PURE__*/(0, _react.css)(".euiFormControlLayout__childrenWrapper{", (0, _form.euiFormControlDefaultShadow)(euiThemeContext), " ", (0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
|
|
88
|
+
euiSuperDatePicker__formControlLayout: /*#__PURE__*/(0, _react.css)(".euiFormControlLayout__childrenWrapper{--euiFormControlStateHoverColor:", forms.borderHovered, ";", (0, _form.euiFormControlDefaultShadow)(euiThemeContext), " ", (0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
|
|
76
89
|
none: 'box-shadow: none;',
|
|
77
90
|
preferred: 'border: none;'
|
|
78
|
-
}), ";};label:euiSuperDatePicker__formControlLayout;"),
|
|
79
|
-
default: /*#__PURE__*/(0, _react.css)(".euiFormControlLayout__childrenWrapper{color:", forms.textColor, ";background-color:", forms.backgroundColor, ";}.euiDatePopoverButton{", (0, _form.euiFormControlDefaultShadow)(euiThemeContext, {
|
|
91
|
+
}), " ", isRefreshVariant && formLayoutStyles, ";};label:euiSuperDatePicker__formControlLayout;"),
|
|
92
|
+
default: /*#__PURE__*/(0, _react.css)(".euiFormControlLayout__childrenWrapper{color:", forms.textColor, ";background-color:", forms.backgroundColor, ";}.euiDatePopoverButton{--euiFormControlStateHoverColor:", forms.borderHovered, ";", !isRefreshVariant && (0, _form.euiFormControlDefaultShadow)(euiThemeContext, {
|
|
80
93
|
withBorder: false,
|
|
81
94
|
withBackgroundColor: false
|
|
82
|
-
}), ";}.euiDatePopoverButton:focus,.euiPopover-isOpen .euiDatePopoverButton{
|
|
95
|
+
}), " box-shadow:none;}.euiDatePopoverButton:focus,.euiPopover-isOpen .euiDatePopoverButton{", popoverButtonFocusStyles, ";};label:default;"),
|
|
83
96
|
disabled: /*#__PURE__*/(0, _react.css)(".euiFormControlLayout__childrenWrapper{", (0, _form.euiFormControlDisabledStyles)(euiThemeContext), ";};label:disabled;"),
|
|
84
|
-
invalid: /*#__PURE__*/(0, _react.css)(".euiFormControlLayout__childrenWrapper{color:", euiTheme.colors.textDanger, ";background-color:", forms.backgroundColor, ";",
|
|
85
|
-
needsUpdating: /*#__PURE__*/(0, _react.css)(".euiFormControlLayout__childrenWrapper{color:", needsUpdatingTextColor, ";background-color:", needsUpdatingBackgroundColor, ";}.euiFormControlLayoutDelimited__delimiter{color:inherit;}.euiDatePopoverButton{", (0, _form.euiFormControlDefaultShadow)(euiThemeContext, {
|
|
97
|
+
invalid: /*#__PURE__*/(0, _react.css)(".euiFormControlLayout__childrenWrapper{color:", euiTheme.colors.textDanger, ";background-color:", forms.backgroundColor, ";", invalidStyles, ";};label:invalid;"),
|
|
98
|
+
needsUpdating: /*#__PURE__*/(0, _react.css)(".euiFormControlLayout__childrenWrapper{color:", needsUpdatingTextColor, ";background-color:", needsUpdatingBackgroundColor, ";", isRefreshVariant && needsUpdatingStyles, ";}.euiFormControlLayoutDelimited__delimiter{color:inherit;}.euiDatePopoverButton{", (0, _form.euiFormControlDefaultShadow)(euiThemeContext, {
|
|
86
99
|
withBorder: false,
|
|
87
100
|
withBackgroundColor: false
|
|
88
|
-
}), ";}.euiDatePopoverButton:focus,.euiPopover-isOpen .euiDatePopoverButton{
|
|
89
|
-
// Force the fill color of all icons/svgs to give a bit more indication of state,
|
|
90
|
-
// since Windows high contrast themes otherwise override background/text color
|
|
91
|
-
forced: "\n svg,\n & + * svg {\n fill: ".concat(euiTheme.colors.success, ";\n }\n ")
|
|
92
|
-
}), ";;label:needsUpdating;")
|
|
101
|
+
}), " background-color:inherit;box-shadow:none;}.euiDatePopoverButton:focus,.euiPopover-isOpen .euiDatePopoverButton{", needsUpdatingPopoverButtonFocusStyles, ";};label:needsUpdating;")
|
|
93
102
|
}
|
|
94
103
|
};
|
|
95
104
|
};
|
|
@@ -8,19 +8,26 @@ var _react = require("@emotion/react");
|
|
|
8
8
|
var _euiThemeCommon = require("@elastic/eui-theme-common");
|
|
9
9
|
var _global_styling = require("../../global_styling");
|
|
10
10
|
var _flyout = require("./flyout.styles");
|
|
11
|
-
/*
|
|
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)."; } /*
|
|
12
12
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
13
13
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
14
14
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
15
15
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
16
16
|
* Side Public License, v 1.
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
19
|
+
name: "1ffeobd-inside",
|
|
20
|
+
styles: "background-color:transparent;label:inside;"
|
|
21
|
+
} : {
|
|
22
|
+
name: "1ffeobd-inside",
|
|
23
|
+
styles: "background-color:transparent;label:inside;",
|
|
24
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
25
|
+
};
|
|
19
26
|
var euiFlyoutCloseButtonStyles = exports.euiFlyoutCloseButtonStyles = function euiFlyoutCloseButtonStyles(euiThemeContext) {
|
|
20
27
|
var euiTheme = euiThemeContext.euiTheme;
|
|
21
28
|
return {
|
|
22
29
|
euiFlyout__closeButton: /*#__PURE__*/(0, _react.css)("position:absolute;", (0, _global_styling.logicalCSS)('right', euiTheme.size.s), " ", (0, _global_styling.logicalCSS)('top', euiTheme.size.s), " z-index:3;;label:euiFlyout__closeButton;"),
|
|
23
|
-
inside:
|
|
30
|
+
inside: _ref,
|
|
24
31
|
outside: /*#__PURE__*/(0, _react.css)((0, _euiThemeCommon.euiShadowXLarge)(euiThemeContext, {
|
|
25
32
|
borderAllInHighContrastMode: true
|
|
26
33
|
}), "animation:none!important;;label:outside;"),
|
|
@@ -17,7 +17,7 @@ var _flyout_context = require("./flyout_context");
|
|
|
17
17
|
var _flyout_body = require("./flyout_body");
|
|
18
18
|
var _focus_trap = require("../focus_trap");
|
|
19
19
|
var _react2 = require("@emotion/react");
|
|
20
|
-
var _excluded = ["children", "className", "banner", "hideCloseButton", "onClose", "scrollableTabIndex", "size"];
|
|
20
|
+
var _excluded = ["children", "backgroundStyle", "className", "banner", "hideCloseButton", "onClose", "scrollableTabIndex", "size"];
|
|
21
21
|
/*
|
|
22
22
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
23
23
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -36,6 +36,8 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
36
36
|
*/
|
|
37
37
|
var EuiFlyoutChild = exports.EuiFlyoutChild = function EuiFlyoutChild(_ref) {
|
|
38
38
|
var children = _ref.children,
|
|
39
|
+
_ref$backgroundStyle = _ref.backgroundStyle,
|
|
40
|
+
backgroundStyle = _ref$backgroundStyle === void 0 ? 'default' : _ref$backgroundStyle,
|
|
39
41
|
className = _ref.className,
|
|
40
42
|
banner = _ref.banner,
|
|
41
43
|
_ref$hideCloseButton = _ref.hideCloseButton,
|
|
@@ -128,7 +130,7 @@ var EuiFlyoutChild = exports.EuiFlyoutChild = function EuiFlyoutChild(_ref) {
|
|
|
128
130
|
var styles = (0, _services.useEuiMemoizedStyles)(_flyout_child.euiFlyoutChildStyles);
|
|
129
131
|
var childLayoutMode = flyoutContext.childLayoutMode,
|
|
130
132
|
parentFlyoutRef = flyoutContext.parentFlyoutRef;
|
|
131
|
-
var flyoutChildCss = [styles.euiFlyoutChild, size === 's' ? styles.s : styles.m, childLayoutMode === 'side-by-side' ? styles.sidePosition : styles.stackedPosition];
|
|
133
|
+
var flyoutChildCss = [styles.euiFlyoutChild, backgroundStyle === 'shaded' ? styles.backgroundShaded : styles.backgroundDefault, size === 's' ? styles.s : styles.m, childLayoutMode === 'side-by-side' ? styles.sidePosition : styles.stackedPosition];
|
|
132
134
|
return (0, _react2.jsx)(_focus_trap.EuiFocusTrap, {
|
|
133
135
|
returnFocus: function returnFocus() {
|
|
134
136
|
if (parentFlyoutRef !== null && parentFlyoutRef !== void 0 && parentFlyoutRef.current) {
|
|
@@ -155,7 +157,6 @@ var EuiFlyoutChild = exports.EuiFlyoutChild = function EuiFlyoutChild(_ref) {
|
|
|
155
157
|
className: "euiScreenReaderOnly"
|
|
156
158
|
}, flyoutTitleText), !hideCloseButton && (0, _react2.jsx)(_flyout_close_button.EuiFlyoutCloseButton, {
|
|
157
159
|
className: "euiFlyoutChild__closeButton",
|
|
158
|
-
css: styles.closeButton,
|
|
159
160
|
onClose: handleClose,
|
|
160
161
|
side: "right",
|
|
161
162
|
closeButtonPosition: "inside",
|
|
@@ -19,13 +19,14 @@ var euiFlyoutChildStyles = exports.euiFlyoutChildStyles = function euiFlyoutChil
|
|
|
19
19
|
var euiTheme = euiThemeContext.euiTheme;
|
|
20
20
|
return {
|
|
21
21
|
// Base styles for the child flyout
|
|
22
|
-
euiFlyoutChild: /*#__PURE__*/(0, _react.css)("position:absolute;inset-block-start:0;inset-inline-start:0;block-size:100%;
|
|
22
|
+
euiFlyoutChild: /*#__PURE__*/(0, _react.css)("position:absolute;inset-block-start:0;inset-inline-start:0;block-size:100%;display:flex;flex-direction:column;", (0, _global_styling.logicalCSSWithFallback)('overflow-y', 'hidden'), " ", (0, _global_styling.logicalCSS)('height', '100%'), " z-index:", Number(euiTheme.levels.flyout) + 1, ";border-inline-start:", euiTheme.border.thin, ";", (0, _flyout.maxedFlyoutWidth)(euiThemeContext), ";;label:euiFlyoutChild;"),
|
|
23
|
+
backgroundDefault: /*#__PURE__*/(0, _react.css)("background:", euiTheme.colors.backgroundBasePlain, ";;label:backgroundDefault;"),
|
|
24
|
+
backgroundShaded: /*#__PURE__*/(0, _react.css)("background:", euiTheme.colors.backgroundBaseSubdued, ";;label:backgroundShaded;"),
|
|
23
25
|
// Position variants based on screen size
|
|
24
26
|
sidePosition: /*#__PURE__*/(0, _react.css)("transform:translateX(-100%);border-inline-end:", euiTheme.border.thin, ";;label:sidePosition;"),
|
|
25
27
|
stackedPosition: /*#__PURE__*/(0, _react.css)("inset-inline-end:0;inline-size:100%;border-block-end:", euiTheme.border.thin, ";;label:stackedPosition;"),
|
|
26
28
|
s: /*#__PURE__*/(0, _react.css)((0, _flyout.composeFlyoutSizing)(euiThemeContext, 's'), ";;label:s;"),
|
|
27
29
|
m: /*#__PURE__*/(0, _react.css)((0, _flyout.composeFlyoutSizing)(euiThemeContext, 'm'), ";;label:m;"),
|
|
28
|
-
closeButton: /*#__PURE__*/(0, _react.css)("position:absolute;inset-block-start:", euiTheme.size.s, ";inset-inline-end:", euiTheme.size.s, ";z-index:1;;label:closeButton;"),
|
|
29
30
|
overflow: {
|
|
30
31
|
overflow: /*#__PURE__*/(0, _react.css)("flex-grow:1;display:flex;flex-direction:column;", (0, _global_styling.euiYScroll)(euiThemeContext), ";;label:overflow;"),
|
|
31
32
|
wrapper: /*#__PURE__*/(0, _react.css)("display:flex;flex-direction:column;flex-grow:1;", (0, _global_styling.logicalCSS)('overflow-x', 'auto'), ";;label:wrapper;")
|
|
@@ -49,7 +49,8 @@ var useEuiFlyoutSessionContext = exports.useEuiFlyoutSessionContext = function u
|
|
|
49
49
|
var EuiFlyoutSessionProvider = exports.EuiFlyoutSessionProvider = function EuiFlyoutSessionProvider(_ref) {
|
|
50
50
|
var children = _ref.children,
|
|
51
51
|
renderMainFlyoutContent = _ref.renderMainFlyoutContent,
|
|
52
|
-
renderChildFlyoutContent = _ref.renderChildFlyoutContent
|
|
52
|
+
renderChildFlyoutContent = _ref.renderChildFlyoutContent,
|
|
53
|
+
onUnmount = _ref.onUnmount;
|
|
53
54
|
var _useReducer = (0, _react.useReducer)(_flyout_reducer.flyoutReducer, _flyout_reducer.initialFlyoutState),
|
|
54
55
|
_useReducer2 = (0, _slicedToArray2.default)(_useReducer, 2),
|
|
55
56
|
state = _useReducer2[0],
|
|
@@ -68,29 +69,13 @@ var EuiFlyoutSessionProvider = exports.EuiFlyoutSessionProvider = function EuiFl
|
|
|
68
69
|
var mainFlyoutContentNode = null;
|
|
69
70
|
var childFlyoutContentNode = null;
|
|
70
71
|
if (activeFlyoutGroup) {
|
|
71
|
-
var
|
|
72
|
-
flyoutProps: activeFlyoutGroup.config.mainFlyoutProps || {},
|
|
73
|
-
flyoutSize: activeFlyoutGroup.config.mainSize,
|
|
74
|
-
flyoutType: 'main',
|
|
75
|
-
dispatch: dispatch,
|
|
72
|
+
var renderContext = {
|
|
76
73
|
activeFlyoutGroup: activeFlyoutGroup,
|
|
77
|
-
onCloseFlyout: handleClose,
|
|
78
|
-
onCloseChildFlyout: handleCloseChild,
|
|
79
74
|
meta: activeFlyoutGroup.meta
|
|
80
75
|
};
|
|
81
|
-
mainFlyoutContentNode = renderMainFlyoutContent(
|
|
76
|
+
mainFlyoutContentNode = renderMainFlyoutContent(renderContext);
|
|
82
77
|
if (activeFlyoutGroup.isChildOpen && renderChildFlyoutContent) {
|
|
83
|
-
|
|
84
|
-
flyoutProps: activeFlyoutGroup.config.childFlyoutProps || {},
|
|
85
|
-
flyoutSize: activeFlyoutGroup.config.childSize,
|
|
86
|
-
flyoutType: 'child',
|
|
87
|
-
dispatch: dispatch,
|
|
88
|
-
activeFlyoutGroup: activeFlyoutGroup,
|
|
89
|
-
onCloseFlyout: handleClose,
|
|
90
|
-
onCloseChildFlyout: handleCloseChild,
|
|
91
|
-
meta: activeFlyoutGroup.meta
|
|
92
|
-
};
|
|
93
|
-
childFlyoutContentNode = renderChildFlyoutContent(childRenderContext);
|
|
78
|
+
childFlyoutContentNode = renderChildFlyoutContent(renderContext);
|
|
94
79
|
} else if (activeFlyoutGroup.isChildOpen && !renderChildFlyoutContent) {
|
|
95
80
|
console.warn('EuiFlyoutSessionProvider: A child flyout is open, but renderChildFlyoutContent was not provided.');
|
|
96
81
|
}
|
|
@@ -101,7 +86,8 @@ var EuiFlyoutSessionProvider = exports.EuiFlyoutSessionProvider = function EuiFl
|
|
|
101
86
|
return (0, _react2.jsx)(EuiFlyoutSessionContext.Provider, {
|
|
102
87
|
value: {
|
|
103
88
|
state: state,
|
|
104
|
-
dispatch: dispatch
|
|
89
|
+
dispatch: dispatch,
|
|
90
|
+
onUnmount: onUnmount
|
|
105
91
|
}
|
|
106
92
|
}, children, (activeFlyoutGroup === null || activeFlyoutGroup === void 0 ? void 0 : activeFlyoutGroup.isMainOpen) && (0, _react2.jsx)(_index.EuiFlyout, (0, _extends2.default)({
|
|
107
93
|
onClose: handleClose,
|