@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": "transparent",
|
|
414
414
|
"euiColorBorderBaseFormsColorSwatch": "rgba(255,255,255,0.1)",
|
|
415
415
|
"euiColorBorderBaseFormsControl": "#69696f",
|
|
416
|
+
"euiColorBorderInteractiveFormsHoverPlain": "transparent",
|
|
417
|
+
"euiColorBorderInteractiveFormsHoverDanger": "transparent",
|
|
416
418
|
"euiColorBorderStrongPrimary": "#36A2EF",
|
|
417
419
|
"euiColorBorderStrongAccent": "#F68FBE",
|
|
418
420
|
"euiColorBorderStrongAccentSecondary": "#7DDED8",
|
|
@@ -414,6 +414,8 @@ declare module '@elastic/eui/dist/eui_theme_amsterdam_dark.json' {
|
|
|
414
414
|
euiColorBorderBaseFloating: string;
|
|
415
415
|
euiColorBorderBaseFormsColorSwatch: string;
|
|
416
416
|
euiColorBorderBaseFormsControl: string;
|
|
417
|
+
euiColorBorderInteractiveFormsHoverPlain: string;
|
|
418
|
+
euiColorBorderInteractiveFormsHoverDanger: string;
|
|
417
419
|
euiColorBorderStrongPrimary: string;
|
|
418
420
|
euiColorBorderStrongAccent: string;
|
|
419
421
|
euiColorBorderStrongAccentSecondary: string;
|
|
@@ -413,6 +413,8 @@
|
|
|
413
413
|
"euiColorBorderBaseFloating": "transparent",
|
|
414
414
|
"euiColorBorderBaseFormsColorSwatch": "rgba(0,0,0,0.1)",
|
|
415
415
|
"euiColorBorderBaseFormsControl": "#919296",
|
|
416
|
+
"euiColorBorderInteractiveFormsHoverPlain": "transparent",
|
|
417
|
+
"euiColorBorderInteractiveFormsHoverDanger": "transparent",
|
|
416
418
|
"euiColorBorderStrongPrimary": "#0077CC",
|
|
417
419
|
"euiColorBorderStrongAccent": "#F04E98",
|
|
418
420
|
"euiColorBorderStrongAccentSecondary": "#00BFB3",
|
|
@@ -414,6 +414,8 @@ declare module '@elastic/eui/dist/eui_theme_amsterdam_light.json' {
|
|
|
414
414
|
euiColorBorderBaseFloating: string;
|
|
415
415
|
euiColorBorderBaseFormsColorSwatch: string;
|
|
416
416
|
euiColorBorderBaseFormsControl: string;
|
|
417
|
+
euiColorBorderInteractiveFormsHoverPlain: string;
|
|
418
|
+
euiColorBorderInteractiveFormsHoverDanger: string;
|
|
417
419
|
euiColorBorderStrongPrimary: string;
|
|
418
420
|
euiColorBorderStrongAccent: string;
|
|
419
421
|
euiColorBorderStrongAccentSecondary: string;
|
|
@@ -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",
|
|
@@ -414,6 +414,8 @@ declare module '@elastic/eui/dist/eui_theme_borealis_dark.json' {
|
|
|
414
414
|
euiColorBorderBaseFloating: string;
|
|
415
415
|
euiColorBorderBaseFormsColorSwatch: string;
|
|
416
416
|
euiColorBorderBaseFormsControl: string;
|
|
417
|
+
euiColorBorderInteractiveFormsHoverPlain: string;
|
|
418
|
+
euiColorBorderInteractiveFormsHoverDanger: string;
|
|
417
419
|
euiColorBorderStrongPrimary: string;
|
|
418
420
|
euiColorBorderStrongAccent: string;
|
|
419
421
|
euiColorBorderStrongAccentSecondary: string;
|
|
@@ -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
|
}
|
|
@@ -414,6 +414,8 @@ declare module '@elastic/eui/dist/eui_theme_borealis_light.json' {
|
|
|
414
414
|
euiColorBorderBaseFloating: string;
|
|
415
415
|
euiColorBorderBaseFormsColorSwatch: string;
|
|
416
416
|
euiColorBorderBaseFormsControl: string;
|
|
417
|
+
euiColorBorderInteractiveFormsHoverPlain: string;
|
|
418
|
+
euiColorBorderInteractiveFormsHoverDanger: string;
|
|
417
419
|
euiColorBorderStrongPrimary: string;
|
|
418
420
|
euiColorBorderStrongAccent: string;
|
|
419
421
|
euiColorBorderStrongAccentSecondary: string;
|
|
@@ -33,7 +33,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
33
33
|
import React, { Component } from 'react';
|
|
34
34
|
import PropTypes from "prop-types";
|
|
35
35
|
import classNames from 'classnames';
|
|
36
|
-
import { keys, CanvasTextUtils, RenderWithEuiStylesMemoizer } from '../../../services';
|
|
36
|
+
import { keys, CanvasTextUtils, RenderWithEuiStylesMemoizer, isEuiThemeRefreshVariant, RenderWithEuiTheme } from '../../../services';
|
|
37
37
|
import { EuiScreenReaderOnly } from '../../accessibility';
|
|
38
38
|
import { EuiFormControlLayout } from '../../form/form_control_layout';
|
|
39
39
|
import { EuiComboBoxOptionAppendPrepend } from '../utils';
|
|
@@ -248,66 +248,70 @@ export var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
|
|
|
248
248
|
var wrapClasses = classNames('euiComboBox__inputWrap', {
|
|
249
249
|
'euiComboBox__inputWrap--plainText': this.asPlainText
|
|
250
250
|
});
|
|
251
|
-
return ___EmotionJSX(
|
|
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
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
251
|
+
return ___EmotionJSX(RenderWithEuiTheme, null, function (euiThemeContext) {
|
|
252
|
+
return ___EmotionJSX(RenderWithEuiStylesMemoizer, null, function (stylesMemoizer) {
|
|
253
|
+
var styles = stylesMemoizer(euiComboBoxInputStyles);
|
|
254
|
+
var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'formVariant');
|
|
255
|
+
var stateCss = isRefreshVariant ? isListOpen ? styles.open : isInvalid ? styles.invalid : undefined : isInvalid ? styles.invalid : isListOpen ? styles.open : undefined;
|
|
256
|
+
var cssStyles = [styles.euiComboBoxInputWrapper, !singleSelection && styles.multiSelect, compressed ? styles.compressed : styles.uncompressed].concat(_toConsumableArray(_this2.asPlainText || showPlaceholder ? [styles.plainText.plainText, compressed ? styles.plainText.compressed : styles.plainText.uncompressed] : []), [isDisabled ? styles.disabled : stateCss, isInGroup && styles.inGroup]);
|
|
257
|
+
var formLayoutStyles = [styles.formLayout.euiComboBox__formControlLayout, !singleSelection && styles.formLayout.multiSelect];
|
|
258
|
+
return ___EmotionJSX(EuiFormControlLayout, _extends({
|
|
259
|
+
icon: icon
|
|
260
|
+
}, clickProps, {
|
|
261
|
+
inputId: id,
|
|
262
|
+
isLoading: isLoading,
|
|
263
|
+
isInvalid: isInvalid,
|
|
264
|
+
isDisabled: isDisabled,
|
|
265
|
+
compressed: compressed,
|
|
266
|
+
fullWidth: fullWidth,
|
|
267
|
+
prepend: prepend,
|
|
268
|
+
append: append,
|
|
269
|
+
css: formLayoutStyles
|
|
270
|
+
}), ___EmotionJSX("div", {
|
|
271
|
+
css: cssStyles,
|
|
272
|
+
className: wrapClasses,
|
|
273
|
+
"data-test-subj": "comboBoxInput",
|
|
274
|
+
onClick: onClick,
|
|
275
|
+
tabIndex: -1 // becomes onBlur event's relatedTarget, otherwise relatedTarget is null when clicking on this div
|
|
276
|
+
}, _this2.renderPills(), ___EmotionJSX(EuiComboBoxOptionAppendPrepend, {
|
|
277
|
+
option: _this2.asPlainText ? selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions[0] : undefined,
|
|
278
|
+
classNamePrefix: "euiComboBoxPlainTextSelection",
|
|
279
|
+
marginSize: "xxs"
|
|
280
|
+
}, ___EmotionJSX("input", {
|
|
281
|
+
"aria-activedescendant": focusedOptionId,
|
|
282
|
+
"aria-autocomplete": "list",
|
|
283
|
+
"aria-controls": isListOpen ? rootId('listbox') : '',
|
|
284
|
+
"aria-expanded": isListOpen,
|
|
285
|
+
"aria-label": ariaLabel,
|
|
286
|
+
"aria-labelledby": ariaLabelledby,
|
|
287
|
+
"aria-describedby": ariaDescribedby,
|
|
288
|
+
"aria-invalid": isInvalid,
|
|
289
|
+
"aria-haspopup": "listbox",
|
|
290
|
+
css: styles.euiComboBoxInput,
|
|
291
|
+
className: "euiComboBox__input",
|
|
292
|
+
"data-test-subj": "comboBoxSearchInput",
|
|
293
|
+
disabled: isDisabled,
|
|
294
|
+
id: id,
|
|
295
|
+
onBlur: _this2.onBlur,
|
|
296
|
+
onChange: function onChange(event) {
|
|
297
|
+
return _onChange(event.target.value);
|
|
298
|
+
},
|
|
299
|
+
onFocus: _this2.onFocus,
|
|
300
|
+
onKeyDown: _this2.onKeyDown,
|
|
301
|
+
ref: _this2.inputRefCallback,
|
|
302
|
+
role: "combobox",
|
|
303
|
+
style: {
|
|
304
|
+
inlineSize: _this2.asPlainText || showPlaceholder ? '100%' : _this2.state.inputWidth
|
|
305
|
+
},
|
|
306
|
+
placeholder: showPlaceholder ? placeholder : undefined,
|
|
307
|
+
value: _this2.searchValue,
|
|
308
|
+
autoFocus: autoFocus,
|
|
309
|
+
autoComplete: "off"
|
|
310
|
+
// Force the menu to re-open on every input click - only necessary when plain text
|
|
311
|
+
,
|
|
312
|
+
onClick: _this2.asPlainText ? onFocus : undefined // Type shenanigans - event should be mostly the same
|
|
313
|
+
})), removeOptionMessage));
|
|
314
|
+
});
|
|
311
315
|
});
|
|
312
316
|
}
|
|
313
317
|
}]);
|
|
@@ -8,6 +8,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { css } from '@emotion/react';
|
|
11
|
+
import { isEuiThemeRefreshVariant } from '../../../services';
|
|
11
12
|
import { logicalCSS } from '../../../global_styling';
|
|
12
13
|
import { euiFormControlStyles, euiFormControlDefaultShadow, euiFormControlText } from '../../form/form.styles';
|
|
13
14
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
@@ -28,12 +29,13 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
28
29
|
};
|
|
29
30
|
export var euiComboBoxInputStyles = function euiComboBoxInputStyles(euiThemeContext) {
|
|
30
31
|
var euiTheme = euiThemeContext.euiTheme;
|
|
32
|
+
var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'formVariant');
|
|
31
33
|
var formStyles = euiFormControlStyles(euiThemeContext);
|
|
32
34
|
return {
|
|
33
35
|
// Wrapper which visually mimics a form control
|
|
34
|
-
euiComboBoxInputWrapper: /*#__PURE__*/css(euiFormControlDefaultShadow(euiThemeContext), " display:flex;;label:euiComboBoxInputWrapper;"),
|
|
36
|
+
euiComboBoxInputWrapper: /*#__PURE__*/css(euiFormControlDefaultShadow(euiThemeContext), " display:flex;", isRefreshVariant && "\n &:focus-within {\n ".concat(formStyles.focus, "\n }\n "), ";;label:euiComboBoxInputWrapper;"),
|
|
35
37
|
multiSelect: _ref2,
|
|
36
|
-
uncompressed: "\n ".concat(formStyles.uncompressed, "\n ").concat(logicalCSS('height', 'auto'), "\n ").concat(logicalCSS('padding-vertical', euiTheme.size.s), "\n ").concat(logicalCSS('padding-left', euiTheme.size.s), "\n column-gap: ").concat(euiTheme.size.s, ";\n row-gap: ").concat(euiTheme.size.xs, ";\n "),
|
|
38
|
+
uncompressed: "\n ".concat(formStyles.uncompressed, "\n ").concat(logicalCSS('height', 'auto'), "\n ").concat(logicalCSS('padding-vertical', euiTheme.size.s), "\n ").concat(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 "),
|
|
37
39
|
compressed: /*#__PURE__*/css(formStyles.compressed, " ", logicalCSS('height', 'auto'), " ", logicalCSS('padding-vertical', euiTheme.size.xs), " ", logicalCSS('padding-left', euiTheme.size.xs), " column-gap:", euiTheme.size.xs, ";row-gap:", euiTheme.size.xxs, ";;label:compressed;"),
|
|
38
40
|
plainText: {
|
|
39
41
|
plainText: _ref,
|
|
@@ -42,10 +44,10 @@ export var euiComboBoxInputStyles = function euiComboBoxInputStyles(euiThemeCont
|
|
|
42
44
|
},
|
|
43
45
|
invalid: /*#__PURE__*/css(formStyles.invalid, ";label:invalid;"),
|
|
44
46
|
disabled: /*#__PURE__*/css(formStyles.disabled, ";label:disabled;"),
|
|
45
|
-
open: /*#__PURE__*/css(formStyles.focus, "
|
|
47
|
+
open: /*#__PURE__*/css(formStyles.focus, ";;label:open;"),
|
|
46
48
|
inGroup: /*#__PURE__*/css(formStyles.inGroup, ";label:inGroup;"),
|
|
47
49
|
// Actual input element, which has variable width depending on its value
|
|
48
|
-
euiComboBoxInput: /*#__PURE__*/css(logicalCSS('height', euiTheme.size.l), " ", logicalCSS('min-width', '2px'), " ", logicalCSS('max-width', '100%'), euiFormControlText(euiThemeContext), " background:transparent;&:disabled{color:", euiTheme.colors.
|
|
50
|
+
euiComboBoxInput: /*#__PURE__*/css(logicalCSS('height', euiTheme.size.l), " ", logicalCSS('min-width', '2px'), " ", logicalCSS('max-width', '100%'), euiFormControlText(euiThemeContext), " background:transparent;&:disabled{color:", euiTheme.colors.textDisabled, ";}appearance:none!important;border:none!important;box-shadow:none!important;outline:none!important;;label:euiComboBoxInput;"),
|
|
49
51
|
// EuiFormControlLayout overrides
|
|
50
52
|
formLayout: {
|
|
51
53
|
euiComboBox__formControlLayout: /*#__PURE__*/css(";label:euiComboBox__formControlLayout;"),
|
|
@@ -9,6 +9,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
9
9
|
|
|
10
10
|
import { css } from '@emotion/react';
|
|
11
11
|
import { euiShadowMedium } from '@elastic/eui-theme-common';
|
|
12
|
+
import { isEuiThemeRefreshVariant } from '../../services';
|
|
12
13
|
import { logicalCSS } from '../../global_styling';
|
|
13
14
|
import { euiFormControlDisabledStyles, euiFormControlReadOnlyStyles, euiFormControlDefaultShadow, euiFormControlInvalidStyles } from '../form/form.styles';
|
|
14
15
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
@@ -21,10 +22,12 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
21
22
|
};
|
|
22
23
|
export var euiDatePickerStyles = function euiDatePickerStyles(euiThemeContext) {
|
|
23
24
|
var euiTheme = euiThemeContext.euiTheme;
|
|
25
|
+
var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'formVariant');
|
|
26
|
+
var inlineStyles = "\n /* removes form layout border */\n &::after {\n display: none;\n }\n ";
|
|
24
27
|
return {
|
|
25
28
|
euiDatePicker: _ref,
|
|
26
29
|
inline: {
|
|
27
|
-
inline: /*#__PURE__*/css(".euiFormControlLayout{", logicalCSS('height', 'auto'), " ", logicalCSS('width', 'fit-content'), " border:none;padding:0;}.euiFormControlLayout__childrenWrapper{flex-direction:column;}.euiFormControlLayoutIcons{justify-content:center;", logicalCSS('padding-bottom', euiTheme.size.s), ";};label:inline;"),
|
|
30
|
+
inline: /*#__PURE__*/css(".euiFormControlLayout{", logicalCSS('height', 'auto'), " ", logicalCSS('width', 'fit-content'), " border:none;padding:0;", isRefreshVariant && inlineStyles, ";}.euiFormControlLayout__childrenWrapper{flex-direction:column;}.euiFormControlLayoutIcons{justify-content:center;", logicalCSS('padding-bottom', euiTheme.size.s), ";};label:inline;"),
|
|
28
31
|
// Skip css`` to avoid generating an Emotion className
|
|
29
32
|
noShadow: "\n .euiFormControlLayout {\n background-color: transparent;\n }\n ",
|
|
30
33
|
shadow: /*#__PURE__*/css(".euiFormControlLayout{background-color:", euiTheme.colors.emptyShade, ";", euiShadowMedium(euiThemeContext, {
|
|
@@ -15,7 +15,7 @@ import PropTypes from "prop-types";
|
|
|
15
15
|
import classNames from 'classnames';
|
|
16
16
|
import { EuiFormControlLayoutDelimited } from '../form';
|
|
17
17
|
import { useEuiMemoizedStyles } from '../../services';
|
|
18
|
-
import { euiDatePickerRangeStyles
|
|
18
|
+
import { euiDatePickerRangeStyles, euiDatePickerRangeInlineStyles } from './date_picker_range.styles';
|
|
19
19
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
20
20
|
export var EuiDatePickerRange = function EuiDatePickerRange(_ref) {
|
|
21
21
|
var children = _ref.children,
|
|
@@ -44,6 +44,7 @@ export var EuiDatePickerRange = function EuiDatePickerRange(_ref) {
|
|
|
44
44
|
var fullWidth = _fullWidth && !inline;
|
|
45
45
|
var compressed = _compressed && !inline;
|
|
46
46
|
var classes = classNames('euiDatePickerRange', className);
|
|
47
|
+
var styles = useEuiMemoizedStyles(euiDatePickerRangeStyles);
|
|
47
48
|
var inlineStyles = useEuiMemoizedStyles(euiDatePickerRangeInlineStyles);
|
|
48
49
|
var cssStyles = !inline ? styles.euiDatePickerRange : [inlineStyles.euiDatePickerRangeInline,
|
|
49
50
|
// Determine the inline container query to use based on the width of the react-datepicker
|
|
@@ -101,7 +102,7 @@ export var EuiDatePickerRange = function EuiDatePickerRange(_ref) {
|
|
|
101
102
|
if (iconType === true) return 'calendar';
|
|
102
103
|
return iconType;
|
|
103
104
|
}, [iconType, inline]);
|
|
104
|
-
return ___EmotionJSX("
|
|
105
|
+
return ___EmotionJSX("div", _extends({
|
|
105
106
|
className: classes,
|
|
106
107
|
css: cssStyles
|
|
107
108
|
}, rest), ___EmotionJSX(EuiFormControlLayoutDelimited, {
|
|
@@ -10,8 +10,14 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
10
10
|
import { css } from '@emotion/react';
|
|
11
11
|
import { euiShadowMedium } from '@elastic/eui-theme-common';
|
|
12
12
|
import { logicalCSS } from '../../global_styling';
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
import { isEuiThemeRefreshVariant } from '../../services';
|
|
14
|
+
import { disableFormControlHoverStyles } from '../form/form.styles';
|
|
15
|
+
export var euiDatePickerRangeStyles = function euiDatePickerRangeStyles(euiThemeContext) {
|
|
16
|
+
var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'formVariant');
|
|
17
|
+
var refreshStyles = "\n .euiPopover:last-child {\n ".concat(logicalCSS('border-top-right-radius', 'inherit'), "\n ").concat(logicalCSS('border-bottom-right-radius', 'inherit'), "\n\n * {\n ").concat(logicalCSS('border-top-right-radius', 'inherit'), "\n ").concat(logicalCSS('border-bottom-right-radius', 'inherit'), "\n }\n }\n ");
|
|
18
|
+
return {
|
|
19
|
+
euiDatePickerRange: /*#__PURE__*/css(".euiPopover,.react-datepicker__input-container,.euiDatePicker{", logicalCSS('height', '100%'), ";}.euiPopover{flex:1;}", isRefreshVariant && refreshStyles, ";;label:euiDatePickerRange;")
|
|
20
|
+
};
|
|
15
21
|
};
|
|
16
22
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
17
23
|
name: "bicgs9-noShadow",
|
|
@@ -23,6 +29,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
23
29
|
};
|
|
24
30
|
export var euiDatePickerRangeInlineStyles = function euiDatePickerRangeInlineStyles(euiThemeContext) {
|
|
25
31
|
var euiTheme = euiThemeContext.euiTheme;
|
|
32
|
+
var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'formVariant');
|
|
26
33
|
|
|
27
34
|
// Use a container query to stack date pickers vertically if the container is
|
|
28
35
|
// not wide enough to fit both. We need a fn for this to render two width queries,
|
|
@@ -32,12 +39,12 @@ export var euiDatePickerRangeInlineStyles = function euiDatePickerRangeInlineSty
|
|
|
32
39
|
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 }");
|
|
33
40
|
};
|
|
34
41
|
return {
|
|
35
|
-
euiDatePickerRangeInline: /*#__PURE__*/css(".euiFormControlLayoutDelimited{", logicalCSS('height', 'auto'), " ", logicalCSS('width', 'fit-content'), " ", 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;", logicalCSS('height', 'auto'), " ", logicalCSS('padding-bottom', euiTheme.size.s), ";}}.react-datepicker{position:relative;};label:euiDatePickerRangeInline;"),
|
|
42
|
+
euiDatePickerRangeInline: /*#__PURE__*/css(".euiFormControlLayoutDelimited{", logicalCSS('height', 'auto'), " ", logicalCSS('width', 'fit-content'), " ", 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;", logicalCSS('height', 'auto'), " ", logicalCSS('padding-bottom', euiTheme.size.s), ";}}.react-datepicker{position:relative;};label:euiDatePickerRangeInline;"),
|
|
36
43
|
responsive: /*#__PURE__*/css(containerQuery(268), ";;label:responsive;"),
|
|
37
44
|
responsiveWithTimeSelect: /*#__PURE__*/css(containerQuery(374), ";;label:responsiveWithTimeSelect;"),
|
|
38
45
|
shadow: /*#__PURE__*/css(".euiFormControlLayoutDelimited{", euiShadowMedium(euiThemeContext, {
|
|
39
46
|
borderAllInHighContrastMode: true
|
|
40
|
-
}), ";};label:shadow;"),
|
|
47
|
+
}), " ", isRefreshVariant && "\n /* the form layout is not part of the interactive behavior but rather a container in this variant */\n ".concat(disableFormControlHoverStyles(), "\n\n .euiFormControlLayout__childrenWrapper {\n box-shadow: none;\n ").concat(disableFormControlHoverStyles(), "\n }\n "), ";};label:shadow;"),
|
|
41
48
|
// Applied directly to EuiFormControlLayout so we can check if `disabled`
|
|
42
49
|
// and allow the disabled background-color to take precedence
|
|
43
50
|
formLayout: {
|
|
@@ -8,10 +8,10 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { css } from '@emotion/react';
|
|
11
|
-
import { makeHighContrastColor } from '../../../services';
|
|
11
|
+
import { isEuiThemeRefreshVariant, makeHighContrastColor } from '../../../services';
|
|
12
12
|
import { euiFontSize, euiMaxBreakpoint, logicalCSS, mathWithUnits } from '../../../global_styling';
|
|
13
13
|
import { highContrastModeStyles } from '../../../global_styling/functions/high_contrast';
|
|
14
|
-
import { euiFormVariables, euiFormControlDefaultShadow, euiFormControlInvalidStyles, euiFormControlDisabledStyles,
|
|
14
|
+
import { euiFormVariables, euiFormControlDefaultShadow, euiFormControlInvalidStyles, euiFormControlDisabledStyles, euiFormControlShowBackgroundLine, euiFormControlFocusStyles, euiFormControlHighlightBorderStyles } from '../../form/form.styles';
|
|
15
15
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
16
16
|
name: "1e4qgxg-euiSuperDatePicker__range",
|
|
17
17
|
styles: "flex-grow:1;overflow:hidden;label:euiSuperDatePicker__range;"
|
|
@@ -22,6 +22,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
22
22
|
};
|
|
23
23
|
export var euiSuperDatePickerStyles = function euiSuperDatePickerStyles(euiThemeContext) {
|
|
24
24
|
var euiTheme = euiThemeContext.euiTheme;
|
|
25
|
+
var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'formVariant');
|
|
25
26
|
var forms = euiFormVariables(euiThemeContext);
|
|
26
27
|
var inputWidth = euiTheme.base * 30;
|
|
27
28
|
var buttonWidth = euiTheme.base * 7; // @see _button_display.styles.ts
|
|
@@ -41,6 +42,18 @@ export var euiSuperDatePickerStyles = function euiSuperDatePickerStyles(euiTheme
|
|
|
41
42
|
// Needs updating colors
|
|
42
43
|
var needsUpdatingBackgroundColor = euiTheme.components.superDatePickerBackgroundSuccees;
|
|
43
44
|
var needsUpdatingTextColor = makeHighContrastColor(euiTheme.colors.success)(needsUpdatingBackgroundColor);
|
|
45
|
+
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(logicalCSS('border-top-left-radius', 'inherit'), "\n ").concat(logicalCSS('border-bottom-left-radius', 'inherit'), "\n }\n\n &:last-child {\n ").concat(logicalCSS('border-top-right-radius', 'inherit'), "\n ").concat(logicalCSS('border-bottom-right-radius', 'inherit'), "\n }\n }\n\n .euiDatePopoverButton {\n background-color: transparent;\n border-radius: inherit;\n }\n ");
|
|
46
|
+
var popoverButtonFocusStyles = isRefreshVariant ? "\n ".concat(euiFormControlFocusStyles(euiThemeContext), "\n ") : "\n --euiFormControlStateColor: ".concat(euiTheme.colors.primary, ";\n ").concat(euiFormControlShowBackgroundLine(euiThemeContext, euiTheme.colors.primary), "\n ");
|
|
47
|
+
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(euiFormControlInvalidStyles(euiThemeContext), "\n }\n\n .euiDatePopoverButton:focus,\n .euiPopover-isOpen .euiDatePopoverButton {\n ").concat(euiFormControlFocusStyles(euiThemeContext), "\n }\n ") : "\n ".concat(euiFormControlInvalidStyles(euiThemeContext), "\n ");
|
|
48
|
+
var needsUpdatingStyles = "\n --euiFormControlStateColor: ".concat(euiTheme.colors.success, ";\n --euiFormControlStateHoverColor: ").concat(euiTheme.colors.success, ";\n --euiFormControlStateWidth: ").concat(euiTheme.border.width.thin, ";\n ").concat(euiFormControlHighlightBorderStyles, "\n \n &:has(.euiPopover-isOpen),\n &:focus-within {\n --euiFormControlStateColor: ").concat(forms.borderColor, ";\n --euiFormControlStateHoverColor: ").concat(forms.borderHovered, ";\n }\n ");
|
|
49
|
+
var needsUpdatingPopoverButtonFocusStyles = isRefreshVariant ? "\n ".concat(euiFormControlFocusStyles(euiThemeContext), "\n ") : "\n --euiFormControlStateColor: ".concat(euiTheme.colors.success, ";\n ").concat(euiFormControlShowBackgroundLine(euiThemeContext, euiTheme.colors.success), "\n\n ").concat(highContrastModeStyles(euiThemeContext, {
|
|
50
|
+
// Force the fill color of all icons/svgs to give a bit more indication of state,
|
|
51
|
+
// since Windows high contrast themes otherwise override background/text color
|
|
52
|
+
forced: "\n svg,\n & + * svg {\n fill: ".concat(euiTheme.colors.success, ";\n }\n ")
|
|
53
|
+
}), "\n ");
|
|
54
|
+
var prettyFormatStyles = "\n --euiFormControlStateHoverColor: ".concat(forms.borderHovered, ";\n ").concat(euiFormControlDefaultShadow(euiThemeContext), "\n \n ").concat(highContrastModeStyles(euiThemeContext, {
|
|
55
|
+
preferred: "\n border: none;\n "
|
|
56
|
+
}), "\n\n &:focus {\n ").concat(euiFormControlFocusStyles(euiThemeContext), "\n }\n ");
|
|
44
57
|
return {
|
|
45
58
|
euiSuperDatePicker: /*#__PURE__*/css("display:flex;gap:", gap, ";", logicalCSS('max-width', '100%'), " ", euiMaxBreakpoint(euiThemeContext, 'm'), "{", logicalCSS('width', '100%'), ";};label:euiSuperDatePicker;"),
|
|
46
59
|
widths: {
|
|
@@ -65,27 +78,23 @@ export var euiSuperDatePickerStyles = function euiSuperDatePickerStyles(euiTheme
|
|
|
65
78
|
isQuickSelectOnly: /*#__PURE__*/css(logicalCSS('min-width', 0), ".euiFormControlLayout__prepend{", logicalCSS('max-width', 'none'), ";};label:isQuickSelectOnly;"),
|
|
66
79
|
euiSuperDatePicker__range: _ref,
|
|
67
80
|
euiSuperDatePicker__rangeInput: /*#__PURE__*/css("flex-grow:1;", logicalCSS('width', 'auto'), " overflow:hidden;;label:euiSuperDatePicker__rangeInput;"),
|
|
68
|
-
euiSuperDatePicker__prettyFormat: /*#__PURE__*/css(_buttonStyles(euiThemeContext), " text-align:start;;label:euiSuperDatePicker__prettyFormat;"),
|
|
81
|
+
euiSuperDatePicker__prettyFormat: /*#__PURE__*/css(_buttonStyles(euiThemeContext), " text-align:start;", isRefreshVariant && prettyFormatStyles, ";;label:euiSuperDatePicker__prettyFormat;"),
|
|
69
82
|
// Form states
|
|
70
83
|
states: {
|
|
71
|
-
euiSuperDatePicker__formControlLayout: /*#__PURE__*/css(".euiFormControlLayout__childrenWrapper{", euiFormControlDefaultShadow(euiThemeContext), " ", highContrastModeStyles(euiThemeContext, {
|
|
84
|
+
euiSuperDatePicker__formControlLayout: /*#__PURE__*/css(".euiFormControlLayout__childrenWrapper{--euiFormControlStateHoverColor:", forms.borderHovered, ";", euiFormControlDefaultShadow(euiThemeContext), " ", highContrastModeStyles(euiThemeContext, {
|
|
72
85
|
none: 'box-shadow: none;',
|
|
73
86
|
preferred: 'border: none;'
|
|
74
|
-
}), ";};label:euiSuperDatePicker__formControlLayout;"),
|
|
75
|
-
default: /*#__PURE__*/css(".euiFormControlLayout__childrenWrapper{color:", forms.textColor, ";background-color:", forms.backgroundColor, ";}.euiDatePopoverButton{", euiFormControlDefaultShadow(euiThemeContext, {
|
|
87
|
+
}), " ", isRefreshVariant && formLayoutStyles, ";};label:euiSuperDatePicker__formControlLayout;"),
|
|
88
|
+
default: /*#__PURE__*/css(".euiFormControlLayout__childrenWrapper{color:", forms.textColor, ";background-color:", forms.backgroundColor, ";}.euiDatePopoverButton{--euiFormControlStateHoverColor:", forms.borderHovered, ";", !isRefreshVariant && euiFormControlDefaultShadow(euiThemeContext, {
|
|
76
89
|
withBorder: false,
|
|
77
90
|
withBackgroundColor: false
|
|
78
|
-
}), ";}.euiDatePopoverButton:focus,.euiPopover-isOpen .euiDatePopoverButton{
|
|
91
|
+
}), " box-shadow:none;}.euiDatePopoverButton:focus,.euiPopover-isOpen .euiDatePopoverButton{", popoverButtonFocusStyles, ";};label:default;"),
|
|
79
92
|
disabled: /*#__PURE__*/css(".euiFormControlLayout__childrenWrapper{", euiFormControlDisabledStyles(euiThemeContext), ";};label:disabled;"),
|
|
80
|
-
invalid: /*#__PURE__*/css(".euiFormControlLayout__childrenWrapper{color:", euiTheme.colors.textDanger, ";background-color:", forms.backgroundColor, ";",
|
|
81
|
-
needsUpdating: /*#__PURE__*/css(".euiFormControlLayout__childrenWrapper{color:", needsUpdatingTextColor, ";background-color:", needsUpdatingBackgroundColor, ";}.euiFormControlLayoutDelimited__delimiter{color:inherit;}.euiDatePopoverButton{", euiFormControlDefaultShadow(euiThemeContext, {
|
|
93
|
+
invalid: /*#__PURE__*/css(".euiFormControlLayout__childrenWrapper{color:", euiTheme.colors.textDanger, ";background-color:", forms.backgroundColor, ";", invalidStyles, ";};label:invalid;"),
|
|
94
|
+
needsUpdating: /*#__PURE__*/css(".euiFormControlLayout__childrenWrapper{color:", needsUpdatingTextColor, ";background-color:", needsUpdatingBackgroundColor, ";", isRefreshVariant && needsUpdatingStyles, ";}.euiFormControlLayoutDelimited__delimiter{color:inherit;}.euiDatePopoverButton{", euiFormControlDefaultShadow(euiThemeContext, {
|
|
82
95
|
withBorder: false,
|
|
83
96
|
withBackgroundColor: false
|
|
84
|
-
}), ";}.euiDatePopoverButton:focus,.euiPopover-isOpen .euiDatePopoverButton{
|
|
85
|
-
// Force the fill color of all icons/svgs to give a bit more indication of state,
|
|
86
|
-
// since Windows high contrast themes otherwise override background/text color
|
|
87
|
-
forced: "\n svg,\n & + * svg {\n fill: ".concat(euiTheme.colors.success, ";\n }\n ")
|
|
88
|
-
}), ";;label:needsUpdating;")
|
|
97
|
+
}), " background-color:inherit;box-shadow:none;}.euiDatePopoverButton:focus,.euiPopover-isOpen .euiDatePopoverButton{", needsUpdatingPopoverButtonFocusStyles, ";};label:needsUpdating;")
|
|
89
98
|
}
|
|
90
99
|
};
|
|
91
100
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
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)."; }
|
|
1
2
|
/*
|
|
2
3
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
4
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -10,11 +11,19 @@ import { css } from '@emotion/react';
|
|
|
10
11
|
import { euiShadowXLarge } from '@elastic/eui-theme-common';
|
|
11
12
|
import { euiMaxBreakpoint, euiMinBreakpoint, logicalCSS } from '../../global_styling';
|
|
12
13
|
import { FLYOUT_BREAKPOINT } from './flyout.styles';
|
|
14
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
15
|
+
name: "1ffeobd-inside",
|
|
16
|
+
styles: "background-color:transparent;label:inside;"
|
|
17
|
+
} : {
|
|
18
|
+
name: "1ffeobd-inside",
|
|
19
|
+
styles: "background-color:transparent;label:inside;",
|
|
20
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
21
|
+
};
|
|
13
22
|
export var euiFlyoutCloseButtonStyles = function euiFlyoutCloseButtonStyles(euiThemeContext) {
|
|
14
23
|
var euiTheme = euiThemeContext.euiTheme;
|
|
15
24
|
return {
|
|
16
25
|
euiFlyout__closeButton: /*#__PURE__*/css("position:absolute;", logicalCSS('right', euiTheme.size.s), " ", logicalCSS('top', euiTheme.size.s), " z-index:3;;label:euiFlyout__closeButton;"),
|
|
17
|
-
inside:
|
|
26
|
+
inside: _ref,
|
|
18
27
|
outside: /*#__PURE__*/css(euiShadowXLarge(euiThemeContext, {
|
|
19
28
|
borderAllInHighContrastMode: true
|
|
20
29
|
}), "animation:none!important;;label:outside;"),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["children", "className", "banner", "hideCloseButton", "onClose", "scrollableTabIndex", "size"];
|
|
1
|
+
var _excluded = ["children", "backgroundStyle", "className", "banner", "hideCloseButton", "onClose", "scrollableTabIndex", "size"];
|
|
2
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
3
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
4
4
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
|
|
@@ -30,6 +30,8 @@ import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
|
30
30
|
*/
|
|
31
31
|
export var EuiFlyoutChild = function EuiFlyoutChild(_ref) {
|
|
32
32
|
var children = _ref.children,
|
|
33
|
+
_ref$backgroundStyle = _ref.backgroundStyle,
|
|
34
|
+
backgroundStyle = _ref$backgroundStyle === void 0 ? 'default' : _ref$backgroundStyle,
|
|
33
35
|
className = _ref.className,
|
|
34
36
|
banner = _ref.banner,
|
|
35
37
|
_ref$hideCloseButton = _ref.hideCloseButton,
|
|
@@ -122,7 +124,7 @@ export var EuiFlyoutChild = function EuiFlyoutChild(_ref) {
|
|
|
122
124
|
var styles = useEuiMemoizedStyles(euiFlyoutChildStyles);
|
|
123
125
|
var childLayoutMode = flyoutContext.childLayoutMode,
|
|
124
126
|
parentFlyoutRef = flyoutContext.parentFlyoutRef;
|
|
125
|
-
var flyoutChildCss = [styles.euiFlyoutChild, size === 's' ? styles.s : styles.m, childLayoutMode === 'side-by-side' ? styles.sidePosition : styles.stackedPosition];
|
|
127
|
+
var flyoutChildCss = [styles.euiFlyoutChild, backgroundStyle === 'shaded' ? styles.backgroundShaded : styles.backgroundDefault, size === 's' ? styles.s : styles.m, childLayoutMode === 'side-by-side' ? styles.sidePosition : styles.stackedPosition];
|
|
126
128
|
return ___EmotionJSX(EuiFocusTrap, {
|
|
127
129
|
returnFocus: function returnFocus() {
|
|
128
130
|
if (parentFlyoutRef !== null && parentFlyoutRef !== void 0 && parentFlyoutRef.current) {
|
|
@@ -149,7 +151,6 @@ export var EuiFlyoutChild = function EuiFlyoutChild(_ref) {
|
|
|
149
151
|
className: "euiScreenReaderOnly"
|
|
150
152
|
}, flyoutTitleText), !hideCloseButton && ___EmotionJSX(EuiFlyoutCloseButton, {
|
|
151
153
|
className: "euiFlyoutChild__closeButton",
|
|
152
|
-
css: styles.closeButton,
|
|
153
154
|
onClose: handleClose,
|
|
154
155
|
side: "right",
|
|
155
156
|
closeButtonPosition: "inside",
|
|
@@ -197,6 +198,10 @@ EuiFlyoutChild.propTypes = {
|
|
|
197
198
|
* @default 's'
|
|
198
199
|
*/
|
|
199
200
|
size: PropTypes.oneOf(["s", "m"]),
|
|
201
|
+
/*
|
|
202
|
+
* The background of the child flyout can be optionally shaded. Use `shaded` to add the shading.
|
|
203
|
+
*/
|
|
204
|
+
backgroundStyle: PropTypes.oneOf(["shaded", "default"]),
|
|
200
205
|
/**
|
|
201
206
|
* Children are implicitly part of FunctionComponent, but good to have if props type is standalone.
|
|
202
207
|
*/
|
|
@@ -13,13 +13,14 @@ export var euiFlyoutChildStyles = function euiFlyoutChildStyles(euiThemeContext)
|
|
|
13
13
|
var euiTheme = euiThemeContext.euiTheme;
|
|
14
14
|
return {
|
|
15
15
|
// Base styles for the child flyout
|
|
16
|
-
euiFlyoutChild: /*#__PURE__*/css("position:absolute;inset-block-start:0;inset-inline-start:0;block-size:100%;
|
|
16
|
+
euiFlyoutChild: /*#__PURE__*/css("position:absolute;inset-block-start:0;inset-inline-start:0;block-size:100%;display:flex;flex-direction:column;", logicalCSSWithFallback('overflow-y', 'hidden'), " ", logicalCSS('height', '100%'), " z-index:", Number(euiTheme.levels.flyout) + 1, ";border-inline-start:", euiTheme.border.thin, ";", maxedFlyoutWidth(euiThemeContext), ";;label:euiFlyoutChild;"),
|
|
17
|
+
backgroundDefault: /*#__PURE__*/css("background:", euiTheme.colors.backgroundBasePlain, ";;label:backgroundDefault;"),
|
|
18
|
+
backgroundShaded: /*#__PURE__*/css("background:", euiTheme.colors.backgroundBaseSubdued, ";;label:backgroundShaded;"),
|
|
17
19
|
// Position variants based on screen size
|
|
18
20
|
sidePosition: /*#__PURE__*/css("transform:translateX(-100%);border-inline-end:", euiTheme.border.thin, ";;label:sidePosition;"),
|
|
19
21
|
stackedPosition: /*#__PURE__*/css("inset-inline-end:0;inline-size:100%;border-block-end:", euiTheme.border.thin, ";;label:stackedPosition;"),
|
|
20
22
|
s: /*#__PURE__*/css(composeFlyoutSizing(euiThemeContext, 's'), ";;label:s;"),
|
|
21
23
|
m: /*#__PURE__*/css(composeFlyoutSizing(euiThemeContext, 'm'), ";;label:m;"),
|
|
22
|
-
closeButton: /*#__PURE__*/css("position:absolute;inset-block-start:", euiTheme.size.s, ";inset-inline-end:", euiTheme.size.s, ";z-index:1;;label:closeButton;"),
|
|
23
24
|
overflow: {
|
|
24
25
|
overflow: /*#__PURE__*/css("flex-grow:1;display:flex;flex-direction:column;", euiYScroll(euiThemeContext), ";;label:overflow;"),
|
|
25
26
|
wrapper: /*#__PURE__*/css("display:flex;flex-direction:column;flex-grow:1;", logicalCSS('overflow-x', 'auto'), ";;label:wrapper;")
|
|
@@ -44,7 +44,8 @@ export var useEuiFlyoutSessionContext = function useEuiFlyoutSessionContext() {
|
|
|
44
44
|
export var EuiFlyoutSessionProvider = function EuiFlyoutSessionProvider(_ref) {
|
|
45
45
|
var children = _ref.children,
|
|
46
46
|
renderMainFlyoutContent = _ref.renderMainFlyoutContent,
|
|
47
|
-
renderChildFlyoutContent = _ref.renderChildFlyoutContent
|
|
47
|
+
renderChildFlyoutContent = _ref.renderChildFlyoutContent,
|
|
48
|
+
onUnmount = _ref.onUnmount;
|
|
48
49
|
var _useReducer = useReducer(flyoutReducer, initialFlyoutState),
|
|
49
50
|
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
50
51
|
state = _useReducer2[0],
|
|
@@ -63,29 +64,13 @@ export var EuiFlyoutSessionProvider = function EuiFlyoutSessionProvider(_ref) {
|
|
|
63
64
|
var mainFlyoutContentNode = null;
|
|
64
65
|
var childFlyoutContentNode = null;
|
|
65
66
|
if (activeFlyoutGroup) {
|
|
66
|
-
var
|
|
67
|
-
flyoutProps: activeFlyoutGroup.config.mainFlyoutProps || {},
|
|
68
|
-
flyoutSize: activeFlyoutGroup.config.mainSize,
|
|
69
|
-
flyoutType: 'main',
|
|
70
|
-
dispatch: dispatch,
|
|
67
|
+
var renderContext = {
|
|
71
68
|
activeFlyoutGroup: activeFlyoutGroup,
|
|
72
|
-
onCloseFlyout: handleClose,
|
|
73
|
-
onCloseChildFlyout: handleCloseChild,
|
|
74
69
|
meta: activeFlyoutGroup.meta
|
|
75
70
|
};
|
|
76
|
-
mainFlyoutContentNode = renderMainFlyoutContent(
|
|
71
|
+
mainFlyoutContentNode = renderMainFlyoutContent(renderContext);
|
|
77
72
|
if (activeFlyoutGroup.isChildOpen && renderChildFlyoutContent) {
|
|
78
|
-
|
|
79
|
-
flyoutProps: activeFlyoutGroup.config.childFlyoutProps || {},
|
|
80
|
-
flyoutSize: activeFlyoutGroup.config.childSize,
|
|
81
|
-
flyoutType: 'child',
|
|
82
|
-
dispatch: dispatch,
|
|
83
|
-
activeFlyoutGroup: activeFlyoutGroup,
|
|
84
|
-
onCloseFlyout: handleClose,
|
|
85
|
-
onCloseChildFlyout: handleCloseChild,
|
|
86
|
-
meta: activeFlyoutGroup.meta
|
|
87
|
-
};
|
|
88
|
-
childFlyoutContentNode = renderChildFlyoutContent(childRenderContext);
|
|
73
|
+
childFlyoutContentNode = renderChildFlyoutContent(renderContext);
|
|
89
74
|
} else if (activeFlyoutGroup.isChildOpen && !renderChildFlyoutContent) {
|
|
90
75
|
console.warn('EuiFlyoutSessionProvider: A child flyout is open, but renderChildFlyoutContent was not provided.');
|
|
91
76
|
}
|
|
@@ -96,7 +81,8 @@ export var EuiFlyoutSessionProvider = function EuiFlyoutSessionProvider(_ref) {
|
|
|
96
81
|
return ___EmotionJSX(EuiFlyoutSessionContext.Provider, {
|
|
97
82
|
value: {
|
|
98
83
|
state: state,
|
|
99
|
-
dispatch: dispatch
|
|
84
|
+
dispatch: dispatch,
|
|
85
|
+
onUnmount: onUnmount
|
|
100
86
|
}
|
|
101
87
|
}, children, (activeFlyoutGroup === null || activeFlyoutGroup === void 0 ? void 0 : activeFlyoutGroup.isMainOpen) && ___EmotionJSX(EuiFlyout, _extends({
|
|
102
88
|
onClose: handleClose,
|