@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
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.euiFormControlLayoutStyles = exports.euiFormControlLayoutSideNodeStyles = 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 _high_contrast = require("../../../global_styling/functions/high_contrast");
|
|
10
11
|
var _form = require("../form.styles");
|
|
@@ -16,14 +17,6 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
16
17
|
* Side Public License, v 1.
|
|
17
18
|
*/
|
|
18
19
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
19
|
-
name: "1w10n1m-inGroup",
|
|
20
|
-
styles: "flex-grow:1;overflow:hidden;label:inGroup;"
|
|
21
|
-
} : {
|
|
22
|
-
name: "1w10n1m-inGroup",
|
|
23
|
-
styles: "flex-grow:1;overflow:hidden;label:inGroup;",
|
|
24
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
25
|
-
};
|
|
26
|
-
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
27
20
|
name: "1lbfa6m-euiFormControlLayout__childrenWrapper",
|
|
28
21
|
styles: "position:relative;label:euiFormControlLayout__childrenWrapper;"
|
|
29
22
|
} : {
|
|
@@ -31,11 +24,24 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
31
24
|
styles: "position:relative;label:euiFormControlLayout__childrenWrapper;",
|
|
32
25
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
33
26
|
};
|
|
27
|
+
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
28
|
+
name: "12dhv84-euiFormControlLayout",
|
|
29
|
+
styles: "position:relative;z-index:0;label:euiFormControlLayout;"
|
|
30
|
+
} : {
|
|
31
|
+
name: "12dhv84-euiFormControlLayout",
|
|
32
|
+
styles: "position:relative;z-index:0;label:euiFormControlLayout;",
|
|
33
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
34
|
+
};
|
|
34
35
|
var euiFormControlLayoutStyles = exports.euiFormControlLayoutStyles = function euiFormControlLayoutStyles(euiThemeContext) {
|
|
35
36
|
var euiTheme = euiThemeContext.euiTheme;
|
|
37
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
36
38
|
var form = (0, _form.euiFormVariables)(euiThemeContext);
|
|
39
|
+
var groupStyles = "\n /* use pseudo element for borders to prevent dimension changes and support nested elements better */\n &::after {\n content: '';\n position: absolute;\n inset: 0;\n z-index: 0;\n border: ".concat(euiTheme.border.width.thin, " solid ").concat(form.borderColor, ";\n border-radius: inherit;\n pointer-events: none;\n }\n\n /* the filter group will use the form layout border instead */\n .euiFilterGroup {\n border-radius: 0;\n /* creating extra space to prevent the focus indicator being cut off */\n ").concat((0, _global_styling.logicalCSS)('padding-right', euiTheme.border.width.thin), "\n\n &::after {\n display: none;\n }\n }\n\n .euiFilterButton__wrapper:first-of-type::before,\n .euiFilterButton__wrapper::after {\n display: none;\n }\n ");
|
|
40
|
+
var wrapperGroupStyles = "\n > :first-child {\n ".concat((0, _global_styling.logicalCSS)('border-top-left-radius', '0'), "\n ").concat((0, _global_styling.logicalCSS)('border-bottom-left-radius', '0'), "\n }\n\n > :last-child {\n ").concat((0, _global_styling.logicalCSS)('border-top-right-radius', '0'), "\n ").concat((0, _global_styling.logicalCSS)('border-bottom-right-radius', '0'), "\n }\n ");
|
|
41
|
+
var prependOnlyStyles = "\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 ");
|
|
42
|
+
var appendOnlyStyles = "\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 ");
|
|
37
43
|
return {
|
|
38
|
-
euiFormControlLayout:
|
|
44
|
+
euiFormControlLayout: _ref2,
|
|
39
45
|
// Skip the css`` on the default height to avoid generating a className
|
|
40
46
|
uncompressed: "\n ".concat((0, _global_styling.logicalCSS)('height', form.controlHeight), "\n "),
|
|
41
47
|
compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', form.controlCompressedHeight), ";;label:compressed;"),
|
|
@@ -43,36 +49,41 @@ var euiFormControlLayoutStyles = exports.euiFormControlLayoutStyles = function e
|
|
|
43
49
|
formWidth: "\n ".concat((0, _global_styling.logicalCSS)('max-width', form.maxWidth), "\n ").concat((0, _global_styling.logicalCSS)('width', '100%'), "\n "),
|
|
44
50
|
fullWidth: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-width', '100%'), " ", (0, _global_styling.logicalCSS)('width', '100%'), ";;label:fullWidth;"),
|
|
45
51
|
group: {
|
|
46
|
-
group: /*#__PURE__*/(0, _react.css)("display:flex;align-items:stretch;border:", euiTheme.border.width.thin, " solid "
|
|
52
|
+
group: /*#__PURE__*/(0, _react.css)("position:relative;display:flex;align-items:stretch;border:", isRefreshVariant ? 'none' : "".concat(euiTheme.border.width.thin, " solid ").concat(form.borderColor), ";background-color:", form.backgroundColor, ";overflow:hidden;", isRefreshVariant && groupStyles, ">*{", (0, _global_styling.logicalCSS)('height', '100%'), ";};label:group;"),
|
|
47
53
|
// Skipping css`` to avoid repeated compressed/uncompressed classNames
|
|
48
54
|
uncompressed: "\n border-radius: ".concat(form.controlBorderRadius, ";\n "),
|
|
49
55
|
compressed: "\n border-radius: ".concat(form.controlCompressedBorderRadius, ";\n ")
|
|
50
56
|
},
|
|
51
57
|
children: {
|
|
52
|
-
euiFormControlLayout__childrenWrapper:
|
|
53
|
-
inGroup:
|
|
54
|
-
prependOnly: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top-right-radius', 'inherit'), " ", (0, _global_styling.logicalCSS)('border-bottom-right-radius', 'inherit'), ";;label:prependOnly;"),
|
|
55
|
-
appendOnly: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top-left-radius', 'inherit'), " ", (0, _global_styling.logicalCSS)('border-bottom-left-radius', 'inherit'), ";;label:appendOnly;")
|
|
58
|
+
euiFormControlLayout__childrenWrapper: _ref,
|
|
59
|
+
inGroup: /*#__PURE__*/(0, _react.css)("flex-grow:1;overflow:hidden;", isRefreshVariant && wrapperGroupStyles, ";;label:inGroup;"),
|
|
60
|
+
prependOnly: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top-right-radius', 'inherit'), " ", (0, _global_styling.logicalCSS)('border-bottom-right-radius', 'inherit'), " ", isRefreshVariant && prependOnlyStyles, ";;label:prependOnly;"),
|
|
61
|
+
appendOnly: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top-left-radius', 'inherit'), " ", (0, _global_styling.logicalCSS)('border-bottom-left-radius', 'inherit'), " ", isRefreshVariant && appendOnlyStyles, ";;label:appendOnly;")
|
|
56
62
|
}
|
|
57
63
|
};
|
|
58
64
|
};
|
|
59
65
|
var euiFormControlLayoutSideNodeStyles = exports.euiFormControlLayoutSideNodeStyles = function euiFormControlLayoutSideNodeStyles(euiThemeContext) {
|
|
60
66
|
var euiTheme = euiThemeContext.euiTheme;
|
|
67
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
61
68
|
var form = (0, _form.euiFormVariables)(euiThemeContext);
|
|
62
69
|
var uncompressedHeight = (0, _global_styling.mathWithUnits)([form.controlHeight, euiTheme.border.width.thin], function (x, y) {
|
|
63
|
-
return x - y * 2;
|
|
70
|
+
return isRefreshVariant ? x : x - y * 2;
|
|
64
71
|
});
|
|
65
72
|
var compressedHeight = (0, _global_styling.mathWithUnits)([form.controlCompressedHeight, euiTheme.border.width.thin], function (x, y) {
|
|
66
|
-
return x - y * 2;
|
|
73
|
+
return isRefreshVariant ? x : x - y * 2;
|
|
67
74
|
});
|
|
68
75
|
var buttons = '*:is(.euiButton, .euiButtonEmpty, .euiButtonIcon)';
|
|
69
76
|
var text = '*:is(.euiFormLabel, .euiText)';
|
|
77
|
+
var appendStyles = "\n position: relative;\n ".concat((0, _global_styling.logicalCSS)('margin-left', "-".concat(euiTheme.border.width.thin)), "\n\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n pointer-events: none;\n border-inline-start: \n ").concat(euiTheme.border.width.thin, " solid ").concat(form.borderColor, ";\n }\n ");
|
|
78
|
+
var prependStyles = "\n position: relative;\n ".concat((0, _global_styling.logicalCSS)('margin-right', "-".concat(euiTheme.border.width.thin)), "\n\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n z-index: 1;\n pointer-events: none;\n border-inline-end: \n ").concat(euiTheme.border.width.thin, " solid ").concat(form.borderColor, ";\n }\n ");
|
|
70
79
|
return {
|
|
71
|
-
euiFormControlLayout__side: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', '100%'), " ", (0, _global_styling.euiTextTruncate)('50%'), " flex-shrink:0;display:flex;align-items:center;gap:", euiTheme.size.xs, ";background-color:", form.appendPrependBackground, ";", buttons, "{transform:none!important;&:focus-visible{outline-offset:-", euiTheme.focus.width, ";}}", text, "{cursor:default;overflow:hidden;text-overflow:ellipsis;}&:not(:has(> ", buttons, ":first-child, > *:first-child > ", buttons, ")){", (0, _global_styling.logicalCSS)('padding-left', euiTheme.size.s), ";}&:not(:has(> ", buttons, ":last-child, > *:last-child > ", buttons, ")){", (0, _global_styling.logicalCSS)('padding-right', euiTheme.size.s), ";};label:euiFormControlLayout__side;"),
|
|
80
|
+
euiFormControlLayout__side: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', '100%'), " ", (0, _global_styling.euiTextTruncate)('50%'), " flex-shrink:0;display:flex;align-items:center;gap:", euiTheme.size.xs, ";background-color:", form.appendPrependBackground, ";", buttons, "{transform:none!important;line-height:1;&:focus-visible{outline-offset:-", euiTheme.focus.width, ";}}", text, "{cursor:default;overflow:hidden;text-overflow:ellipsis;}&:not(:has(> ", buttons, ":first-child, > *:first-child > ", buttons, ")){", (0, _global_styling.logicalCSS)('padding-left', euiTheme.size.s), ";}&:not(:has(> ", buttons, ":last-child, > *:last-child > ", buttons, ")){", (0, _global_styling.logicalCSS)('padding-right', euiTheme.size.s), ";};label:euiFormControlLayout__side;"),
|
|
72
81
|
append: /*#__PURE__*/(0, _react.css)((0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
|
|
82
|
+
none: "\n ".concat(isRefreshVariant && appendStyles, "\n "),
|
|
73
83
|
preferred: (0, _global_styling.logicalCSS)('border-left', euiTheme.border.thin)
|
|
74
84
|
}), ";label:append;"),
|
|
75
85
|
prepend: /*#__PURE__*/(0, _react.css)((0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
|
|
86
|
+
none: "\n ".concat(isRefreshVariant && prependStyles, "\n "),
|
|
76
87
|
preferred: (0, _global_styling.logicalCSS)('border-right', euiTheme.border.thin)
|
|
77
88
|
}), ";label:prepend;"),
|
|
78
89
|
uncompressed: "\n ".concat(text, " {\n ").concat((0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.xs), "\n line-height: ").concat(uncompressedHeight, ";\n }\n\n ").concat(buttons, " {\n ").concat((0, _global_styling.logicalCSS)('height', uncompressedHeight), "\n }\n\n .euiButtonIcon {\n flex-shrink: 0;\n ").concat((0, _global_styling.logicalCSS)('width', euiTheme.size.xl), "\n }\n "),
|
package/test-env/components/form/form_control_layout/form_control_layout_clear_button.styles.js
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.EuiFormControlLayoutClearButtonStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _global_styling = require("../../../global_styling");
|
|
9
|
+
var _services = require("../../../services");
|
|
9
10
|
/*
|
|
10
11
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
11
12
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -14,14 +15,13 @@ var _global_styling = require("../../../global_styling");
|
|
|
14
15
|
* Side Public License, v 1.
|
|
15
16
|
*/
|
|
16
17
|
|
|
17
|
-
var EuiFormControlLayoutClearButtonStyles = exports.EuiFormControlLayoutClearButtonStyles = function EuiFormControlLayoutClearButtonStyles(
|
|
18
|
-
var euiTheme =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var backgroundColor =
|
|
22
|
-
? euiTheme.colors.darkShade : euiTheme.colors.mediumShade;
|
|
18
|
+
var EuiFormControlLayoutClearButtonStyles = exports.EuiFormControlLayoutClearButtonStyles = function EuiFormControlLayoutClearButtonStyles(euiThemeContext) {
|
|
19
|
+
var euiTheme = euiThemeContext.euiTheme,
|
|
20
|
+
highContrastMode = euiThemeContext.highContrastMode;
|
|
21
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
22
|
+
var backgroundColor = highContrastMode ? euiTheme.colors.darkShade : euiTheme.components.forms.clearButtonBackground;
|
|
23
23
|
return {
|
|
24
|
-
euiFormControlLayoutClearButton: /*#__PURE__*/(0, _react.css)("pointer-events:all;display:flex;justify-content:center;align-items:center;border-radius:50%;border-style:solid;border-color:", backgroundColor, ";&:disabled{cursor:not-allowed;background-color:", euiTheme.colors.disabled, ";};label:euiFormControlLayoutClearButton;"),
|
|
24
|
+
euiFormControlLayoutClearButton: /*#__PURE__*/(0, _react.css)("pointer-events:all;display:flex;justify-content:center;align-items:center;border-radius:50%;border-style:solid;border-color:", backgroundColor, ";&:disabled{cursor:not-allowed;background-color:", isRefreshVariant ? euiTheme.colors.backgroundBaseDisabled : euiTheme.colors.disabled, ";};label:euiFormControlLayoutClearButton;"),
|
|
25
25
|
size: {
|
|
26
26
|
s: "\n ".concat((0, _global_styling.logicalSizeCSS)(euiTheme.size.m), "\n border-width: ").concat((0, _global_styling.mathWithUnits)(euiTheme.size.m, function (x) {
|
|
27
27
|
return x / 2;
|
|
@@ -37,6 +37,8 @@ var EuiFormControlLayoutDelimited = exports.EuiFormControlLayoutDelimited = func
|
|
|
37
37
|
className = _ref.className,
|
|
38
38
|
_fullWidth = _ref.fullWidth,
|
|
39
39
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
40
|
+
var euiThemeContext = (0, _services.useEuiTheme)();
|
|
41
|
+
var isRefreshVariant = (0, _services.useEuiThemeRefreshVariant)('formVariant');
|
|
40
42
|
var _useFormContext = (0, _eui_form_context.useFormContext)(),
|
|
41
43
|
defaultFullWidth = _useFormContext.defaultFullWidth;
|
|
42
44
|
var fullWidth = _fullWidth !== null && _fullWidth !== void 0 ? _fullWidth : defaultFullWidth;
|
|
@@ -49,7 +51,7 @@ var EuiFormControlLayoutDelimited = exports.EuiFormControlLayoutDelimited = func
|
|
|
49
51
|
});
|
|
50
52
|
var styles = (0, _services.useEuiMemoizedStyles)(_form_control_layout_delimited.euiFormControlLayoutDelimitedStyles);
|
|
51
53
|
var cssStyles = [styles.delimited, rest.isDisabled && styles.disabled, rest.readOnly && styles.readOnly];
|
|
52
|
-
var wrapperStyles = [styles.childrenWrapper.delimited, showInvalidState && styles.childrenWrapper.invalid, (_rest$wrapperProps = rest.wrapperProps) === null || _rest$wrapperProps === void 0 ? void 0 : _rest$wrapperProps.css];
|
|
54
|
+
var wrapperStyles = [styles.childrenWrapper.delimited, showInvalidState && styles.childrenWrapper.invalid, (_rest$wrapperProps = rest.wrapperProps) === null || _rest$wrapperProps === void 0 ? void 0 : _rest$wrapperProps.css, isRefreshVariant && rest.readOnly && styles.childrenWrapper.readOnly];
|
|
53
55
|
return (0, _react2.jsx)(_form_control_layout.EuiFormControlLayout, (0, _extends2.default)({
|
|
54
56
|
isDelimited: true,
|
|
55
57
|
css: cssStyles,
|
|
@@ -64,10 +66,10 @@ var EuiFormControlLayoutDelimited = exports.EuiFormControlLayoutDelimited = func
|
|
|
64
66
|
value: {
|
|
65
67
|
defaultFullWidth: fullWidth
|
|
66
68
|
}
|
|
67
|
-
}, startControl && addClassesToControl(startControl), (0, _react2.jsx)(EuiFormControlDelimiter, {
|
|
69
|
+
}, startControl && addClassesToControl(euiThemeContext, startControl), (0, _react2.jsx)(EuiFormControlDelimiter, {
|
|
68
70
|
delimiter: delimiter,
|
|
69
71
|
isInvalid: showInvalidState
|
|
70
|
-
}), endControl && addClassesToControl(endControl)));
|
|
72
|
+
}), endControl && addClassesToControl(euiThemeContext, endControl)));
|
|
71
73
|
};
|
|
72
74
|
EuiFormControlLayoutDelimited.propTypes = {
|
|
73
75
|
/**
|
|
@@ -85,18 +87,19 @@ EuiFormControlLayoutDelimited.propTypes = {
|
|
|
85
87
|
delimiter: _propTypes.default.node,
|
|
86
88
|
className: _propTypes.default.string
|
|
87
89
|
};
|
|
88
|
-
var addClassesToControl = function addClassesToControl(control) {
|
|
90
|
+
var addClassesToControl = function addClassesToControl(euiThemeContext, control) {
|
|
89
91
|
return (0, _services.cloneElementWithCss)(control, {
|
|
90
|
-
css: _form_control_layout_delimited.euiFormControlLayoutDelimited__input,
|
|
92
|
+
css: (0, _form_control_layout_delimited.euiFormControlLayoutDelimited__input)(euiThemeContext),
|
|
91
93
|
className: (0, _classnames.default)(control.props.className, 'euiFormControlLayoutDelimited__input')
|
|
92
94
|
}, 'before');
|
|
93
95
|
};
|
|
94
96
|
var EuiFormControlDelimiter = function EuiFormControlDelimiter(_ref2) {
|
|
95
97
|
var delimiter = _ref2.delimiter,
|
|
96
98
|
isInvalid = _ref2.isInvalid;
|
|
99
|
+
var euiThemeContext = (0, _services.useEuiTheme)();
|
|
97
100
|
var defaultAriaLabel = (0, _i18n.useEuiI18n)('euiFormControlLayoutDelimited.delimiterLabel', 'to');
|
|
98
101
|
return (0, _react2.jsx)(_text.EuiText, {
|
|
99
|
-
css: _form_control_layout_delimited.euiFormControlLayoutDelimited__delimiter,
|
|
102
|
+
css: (0, _form_control_layout_delimited.euiFormControlLayoutDelimited__delimiter)(euiThemeContext),
|
|
100
103
|
className: "euiFormControlLayoutDelimited__delimiter",
|
|
101
104
|
size: "s",
|
|
102
105
|
color: isInvalid ? 'danger' : 'subdued'
|
package/test-env/components/form/form_control_layout/form_control_layout_delimited.styles.js
CHANGED
|
@@ -5,52 +5,59 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.euiFormControlLayoutDelimited__input = exports.euiFormControlLayoutDelimited__delimiter = exports.euiFormControlLayoutDelimitedStyles = 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.styles");
|
|
10
|
-
|
|
11
|
+
/*
|
|
11
12
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
12
13
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
13
14
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
14
15
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
15
16
|
* Side Public License, v 1.
|
|
16
17
|
*/
|
|
17
|
-
|
|
18
|
-
name: "1o1b8cl-delimited",
|
|
19
|
-
styles: "display:flex;label:delimited;"
|
|
20
|
-
} : {
|
|
21
|
-
name: "1o1b8cl-delimited",
|
|
22
|
-
styles: "display:flex;label:delimited;",
|
|
23
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
24
|
-
};
|
|
18
|
+
|
|
25
19
|
var euiFormControlLayoutDelimitedStyles = exports.euiFormControlLayoutDelimitedStyles = function euiFormControlLayoutDelimitedStyles(euiThemeContext) {
|
|
20
|
+
var highContrastMode = euiThemeContext.highContrastMode;
|
|
21
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
22
|
+
var form = (0, _form.euiFormVariables)(euiThemeContext);
|
|
23
|
+
var invalidStyles = isRefreshVariant ? "\n :not(.euiFormControlLayoutDelimited__input, .euiFormControlLayoutDelimited__delimiter) {\n ".concat((0, _form.euiFormControlInvalidStyles)(euiThemeContext), "\n }\n\n &:focus-within {\n --euiFormControlStateColor: ").concat(form.borderColor, ";\n --euiFormControlStateHoverColor: ").concat(form.borderHovered, ";\n }\n\n .euiFormControlLayoutDelimited__input {\n background-color: transparent;\n }\n ") : "\n ".concat((0, _form.euiFormControlInvalidStyles)(euiThemeContext), ";\n ");
|
|
24
|
+
var readOnlyStyles = "\n & .euiFormControlLayoutDelimited__input {\n outline: none; \n box-shadow: none;\n --euiFormControlStateColor: transparent;\n }\n ";
|
|
25
|
+
var delimitedStyles = "\n /* Transition smoothly between disabled/readOnly background color changes */\n ".concat((0, _form.euiFormControlDefaultShadow)(euiThemeContext, {
|
|
26
|
+
withBorder: isRefreshVariant && !highContrastMode ? true : false,
|
|
27
|
+
withBackground: false,
|
|
28
|
+
withBackgroundAnimation: isRefreshVariant ? false : true
|
|
29
|
+
}), "\n ").trim();
|
|
30
|
+
var delimitedWrapperStyles = "\n ".concat((0, _form.euiFormControlDefaultShadow)(euiThemeContext, {
|
|
31
|
+
withBorder: !highContrastMode,
|
|
32
|
+
withBackground: false,
|
|
33
|
+
withBackgroundAnimation: true
|
|
34
|
+
}), "\n \n &:hover {\n ").concat((0, _form.euiFormControlHoverStyles)(euiThemeContext), "\n box-shadow: none;\n\n /* using hover styling on wrapper instead of the children inputs */\n .euiFormControlLayoutDelimited__input:not(:focus) {\n outline: none;\n background-color: transparent;\n }\n }\n\n /* adjust for delimited behavior differing from default form layout */\n > :first-child {\n ").concat((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 ");
|
|
26
35
|
return {
|
|
27
36
|
// Appended onto existing `euiFormControlLayout` styles
|
|
28
|
-
delimited: /*#__PURE__*/(0, _react.css)(
|
|
29
|
-
// Transition smoothly between disabled/readOnly background color changes
|
|
30
|
-
(0, _form.euiFormControlDefaultShadow)(euiThemeContext, {
|
|
31
|
-
withBorder: false,
|
|
32
|
-
withBackground: false,
|
|
33
|
-
withBackgroundAnimation: true
|
|
34
|
-
}), ";label:delimited;"),
|
|
37
|
+
delimited: /*#__PURE__*/(0, _react.css)(delimitedStyles, ";label:delimited;"),
|
|
35
38
|
disabled: /*#__PURE__*/(0, _react.css)((0, _form.euiFormControlDisabledStyles)(euiThemeContext), ";label:disabled;"),
|
|
36
|
-
readOnly: /*#__PURE__*/(0, _react.css)((0, _form.euiFormControlReadOnlyStyles)(euiThemeContext), "
|
|
39
|
+
readOnly: /*#__PURE__*/(0, _react.css)((0, _form.euiFormControlReadOnlyStyles)(euiThemeContext), " ", isRefreshVariant && readOnlyStyles, ";;label:readOnly;"),
|
|
37
40
|
// Appended onto existing `euiFormControlLayout__childrenWrapper` styles
|
|
38
41
|
childrenWrapper: {
|
|
39
|
-
delimited:
|
|
42
|
+
delimited: /*#__PURE__*/(0, _react.css)("display:flex;", isRefreshVariant && delimitedWrapperStyles, ";;label:delimited;"),
|
|
40
43
|
invalid: /*#__PURE__*/(0, _react.css)((0, _form.euiFormControlDefaultShadow)(euiThemeContext, {
|
|
41
44
|
withBorder: false,
|
|
42
45
|
withBackgroundColor: false,
|
|
43
46
|
withBackgroundAnimation: false
|
|
44
|
-
}), (
|
|
47
|
+
}), "\n ".concat(invalidStyles, "\n "), ";label:invalid;"),
|
|
48
|
+
readOnly: /*#__PURE__*/(0, _react.css)(";label:readOnly;")
|
|
45
49
|
}
|
|
46
50
|
};
|
|
47
51
|
};
|
|
48
|
-
var euiFormControlLayoutDelimited__delimiter = exports.euiFormControlLayoutDelimited__delimiter =
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
var euiFormControlLayoutDelimited__delimiter = exports.euiFormControlLayoutDelimited__delimiter = function euiFormControlLayoutDelimited__delimiter(euiThemeContext) {
|
|
53
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
54
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
55
|
+
var experimentalStyles = isRefreshVariant && "\n ".concat((0, _global_styling.logicalCSS)('padding-horizontal', (0, _global_styling.mathWithUnits)([euiTheme.size.xs, euiTheme.size.xxs], function (x, y) {
|
|
56
|
+
return x + y;
|
|
57
|
+
})), "\n ");
|
|
58
|
+
return /*#__PURE__*/(0, _react.css)("display:flex;align-self:stretch;flex-grow:0;align-items:center;line-height:1;", experimentalStyles, ";;label:euiFormControlLayoutDelimited__delimiter;");
|
|
55
59
|
};
|
|
56
|
-
var euiFormControlLayoutDelimited__input = exports.euiFormControlLayoutDelimited__input =
|
|
60
|
+
var euiFormControlLayoutDelimited__input = exports.euiFormControlLayoutDelimited__input = function euiFormControlLayoutDelimited__input(euiThemeContext) {
|
|
61
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
62
|
+
return /*#__PURE__*/(0, _react.css)("box-shadow:none;border:none;border-radius:", isRefreshVariant ? '' : '0', ";text-align:center;", (0, _global_styling.logicalCSS)('height', '100%'), ";;label:euiFormControlLayoutDelimited__input;");
|
|
63
|
+
};
|
|
@@ -86,11 +86,14 @@ var EuiFormControlLayoutIcons = exports.EuiFormControlLayoutIcons = /*#__PURE__*
|
|
|
86
86
|
var iconRef = iconProps.ref,
|
|
87
87
|
side = iconProps.side,
|
|
88
88
|
iconRest = (0, _objectWithoutProperties2.default)(iconProps, _excluded);
|
|
89
|
-
return (0, _react2.jsx)(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
89
|
+
return (0, _react2.jsx)(_services.RenderWithEuiTheme, null, function (euiThemeContext) {
|
|
90
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
91
|
+
return (0, _react2.jsx)(_form_control_layout_custom_icon.EuiFormControlLayoutCustomIcon, (0, _extends2.default)({
|
|
92
|
+
size: compressed && !isRefreshVariant ? 's' : 'm',
|
|
93
|
+
disabled: isDisabled,
|
|
94
|
+
iconRef: iconRef
|
|
95
|
+
}, iconRest));
|
|
96
|
+
});
|
|
94
97
|
}
|
|
95
98
|
}, {
|
|
96
99
|
key: "renderDropdownIcon",
|
|
@@ -102,10 +105,13 @@ var EuiFormControlLayoutIcons = exports.EuiFormControlLayoutIcons = /*#__PURE__*
|
|
|
102
105
|
if (!isDropdown) {
|
|
103
106
|
return null;
|
|
104
107
|
}
|
|
105
|
-
return (0, _react2.jsx)(
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
return (0, _react2.jsx)(_services.RenderWithEuiTheme, null, function (euiThemeContext) {
|
|
109
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
110
|
+
return (0, _react2.jsx)(_form_control_layout_custom_icon.EuiFormControlLayoutCustomIcon, {
|
|
111
|
+
size: compressed && !isRefreshVariant ? 's' : 'm',
|
|
112
|
+
disabled: isDisabled,
|
|
113
|
+
type: "arrowDown"
|
|
114
|
+
});
|
|
109
115
|
});
|
|
110
116
|
}
|
|
111
117
|
}, {
|
|
@@ -117,8 +123,11 @@ var EuiFormControlLayoutIcons = exports.EuiFormControlLayoutIcons = /*#__PURE__*
|
|
|
117
123
|
if (!isLoading) {
|
|
118
124
|
return null;
|
|
119
125
|
}
|
|
120
|
-
return (0, _react2.jsx)(
|
|
121
|
-
|
|
126
|
+
return (0, _react2.jsx)(_services.RenderWithEuiTheme, null, function (euiThemeContext) {
|
|
127
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
128
|
+
return (0, _react2.jsx)(_loading.EuiLoadingSpinner, {
|
|
129
|
+
size: compressed && !isRefreshVariant ? 's' : 'm'
|
|
130
|
+
});
|
|
122
131
|
});
|
|
123
132
|
}
|
|
124
133
|
}, {
|
|
@@ -131,10 +140,13 @@ var EuiFormControlLayoutIcons = exports.EuiFormControlLayoutIcons = /*#__PURE__*
|
|
|
131
140
|
if (!clear) {
|
|
132
141
|
return null;
|
|
133
142
|
}
|
|
134
|
-
return (0, _react2.jsx)(
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
143
|
+
return (0, _react2.jsx)(_services.RenderWithEuiTheme, null, function (euiThemeContext) {
|
|
144
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
145
|
+
return (0, _react2.jsx)(_form_control_layout_clear_button.EuiFormControlLayoutClearButton, (0, _extends2.default)({
|
|
146
|
+
size: compressed && !isRefreshVariant ? 's' : 'm',
|
|
147
|
+
disabled: isDisabled
|
|
148
|
+
}, clear));
|
|
149
|
+
});
|
|
138
150
|
}
|
|
139
151
|
}, {
|
|
140
152
|
key: "renderInvalidIcon",
|
|
@@ -145,10 +157,13 @@ var EuiFormControlLayoutIcons = exports.EuiFormControlLayoutIcons = /*#__PURE__*
|
|
|
145
157
|
if (!isInvalid) {
|
|
146
158
|
return null;
|
|
147
159
|
}
|
|
148
|
-
return (0, _react2.jsx)(
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
160
|
+
return (0, _react2.jsx)(_services.RenderWithEuiTheme, null, function (euiThemeContext) {
|
|
161
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
162
|
+
return (0, _react2.jsx)(_icon.EuiIcon, {
|
|
163
|
+
size: compressed && !isRefreshVariant ? 's' : 'm',
|
|
164
|
+
color: "danger",
|
|
165
|
+
type: "warning"
|
|
166
|
+
});
|
|
152
167
|
});
|
|
153
168
|
}
|
|
154
169
|
}]);
|
|
@@ -15,11 +15,11 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
15
15
|
* Side Public License, v 1.
|
|
16
16
|
*/
|
|
17
17
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
18
|
-
name: "
|
|
19
|
-
styles: "
|
|
18
|
+
name: "oaqulw-euiFormControlLayoutIcons",
|
|
19
|
+
styles: "position:relative;z-index:1;display:flex;align-items:center;pointer-events:none;label:euiFormControlLayoutIcons;"
|
|
20
20
|
} : {
|
|
21
|
-
name: "
|
|
22
|
-
styles: "
|
|
21
|
+
name: "oaqulw-euiFormControlLayoutIcons",
|
|
22
|
+
styles: "position:relative;z-index:1;display:flex;align-items:center;pointer-events:none;label:euiFormControlLayoutIcons;",
|
|
23
23
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
24
24
|
};
|
|
25
25
|
var euiFormControlLayoutIconsStyles = exports.euiFormControlLayoutIconsStyles = function euiFormControlLayoutIconsStyles(euiThemeContext) {
|
|
@@ -42,11 +42,11 @@ var euiFormControlLayoutIconsStyles = exports.euiFormControlLayoutIconsStyles =
|
|
|
42
42
|
absolute: {
|
|
43
43
|
absolute: /*#__PURE__*/(0, _react.css)("position:absolute;", (0, _global_styling.logicalCSS)('vertical', 0), ";;label:absolute;"),
|
|
44
44
|
uncompressed: {
|
|
45
|
-
left: /*#__PURE__*/(0, _react.css)("z-index:
|
|
45
|
+
left: /*#__PURE__*/(0, _react.css)("z-index:2;", (0, _global_styling.logicalCSS)('left', controlPadding), ";;label:left;"),
|
|
46
46
|
right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('right', controlPadding), ";;label:right;")
|
|
47
47
|
},
|
|
48
48
|
compressed: {
|
|
49
|
-
left: /*#__PURE__*/(0, _react.css)("z-index:
|
|
49
|
+
left: /*#__PURE__*/(0, _react.css)("z-index:2;", (0, _global_styling.logicalCSS)('left', controlCompressedPadding), ";;label:left;"),
|
|
50
50
|
right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('right', controlCompressedPadding), ";;label:right;")
|
|
51
51
|
}
|
|
52
52
|
},
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.euiFormErrorTextStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
|
+
var _services = require("../../../services");
|
|
8
9
|
var _global_styling = require("../../../global_styling");
|
|
9
10
|
/*
|
|
10
11
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -16,7 +17,8 @@ var _global_styling = require("../../../global_styling");
|
|
|
16
17
|
|
|
17
18
|
var euiFormErrorTextStyles = exports.euiFormErrorTextStyles = function euiFormErrorTextStyles(euiThemeContext) {
|
|
18
19
|
var euiTheme = euiThemeContext.euiTheme;
|
|
20
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
19
21
|
return {
|
|
20
|
-
euiFormErrorText: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('padding-top', euiTheme.size.xs), " ", (0, _global_styling.euiFontSize)(euiThemeContext, 'xs'), " color:", euiTheme.colors.danger, ";;label:euiFormErrorText;")
|
|
22
|
+
euiFormErrorText: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('padding-top', euiTheme.size.xs), " ", (0, _global_styling.euiFontSize)(euiThemeContext, 'xs'), " color:", isRefreshVariant ? euiTheme.colors.textDanger : euiTheme.colors.danger, ";;label:euiFormErrorText;")
|
|
21
23
|
};
|
|
22
24
|
};
|
|
@@ -8,6 +8,7 @@ exports.euiFormLabelStyles = exports.euiFormLabel = void 0;
|
|
|
8
8
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _serialize = require("@emotion/serialize");
|
|
11
|
+
var _services = require("../../../services");
|
|
11
12
|
var _global_styling = require("../../../global_styling");
|
|
12
13
|
var _title = require("../../title/title.styles");
|
|
13
14
|
var _excluded = ["fontWeight"];
|
|
@@ -31,13 +32,14 @@ var euiFormLabel = exports.euiFormLabel = function euiFormLabel(euiThemeContext)
|
|
|
31
32
|
};
|
|
32
33
|
var euiFormLabelStyles = exports.euiFormLabelStyles = function euiFormLabelStyles(euiThemeContext) {
|
|
33
34
|
var euiTheme = euiThemeContext.euiTheme;
|
|
35
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
34
36
|
return {
|
|
35
37
|
euiFormLabel: /*#__PURE__*/(0, _react.css)(euiFormLabel(euiThemeContext), " display:inline-block;", _global_styling.euiCanAnimate, "{transition:color ", euiTheme.animation.fast, " ", euiTheme.animation.resistance, ";};label:euiFormLabel;"),
|
|
36
38
|
// Skip css`` to avoid generating an extra Emotion className
|
|
37
39
|
// Use :where to reduce specificity & make the CSS easier to override by prepend/append nodes
|
|
38
40
|
notDisabled: "\n &:where([for]) {\n cursor: pointer;\n }\n ",
|
|
39
|
-
invalid: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.danger, ";;label:invalid;"),
|
|
41
|
+
invalid: /*#__PURE__*/(0, _react.css)("color:", isRefreshVariant ? euiTheme.colors.textDanger : euiTheme.colors.danger, ";;label:invalid;"),
|
|
40
42
|
// Focused state should override invalid state
|
|
41
|
-
focused: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.primary, ";;label:focused;")
|
|
43
|
+
focused: /*#__PURE__*/(0, _react.css)("color:", isRefreshVariant ? '' : euiTheme.colors.primary, ";;label:focused;")
|
|
42
44
|
};
|
|
43
45
|
};
|
|
@@ -54,6 +54,7 @@ var euiHeaderStyles = exports.euiHeaderStyles = function euiHeaderStyles(euiThem
|
|
|
54
54
|
var euiHeaderDarkStyles = function euiHeaderDarkStyles(euiThemeContext) {
|
|
55
55
|
var euiTheme = euiThemeContext.euiTheme,
|
|
56
56
|
highContrastMode = euiThemeContext.highContrastMode;
|
|
57
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
57
58
|
var _euiFormVariables = (0, _form.euiFormVariables)(euiThemeContext),
|
|
58
59
|
controlPlaceholderText = _euiFormVariables.controlPlaceholderText;
|
|
59
60
|
var backgroundColor = euiTheme.components.headerDarkBackground;
|
|
@@ -64,8 +65,9 @@ var euiHeaderDarkStyles = function euiHeaderDarkStyles(euiThemeContext) {
|
|
|
64
65
|
borderColor: euiTheme.components.headerDarkSearchBorderColor,
|
|
65
66
|
placeholderColor: (0, _services.makeHighContrastColor)(controlPlaceholderText, 8)(backgroundColor)
|
|
66
67
|
};
|
|
67
|
-
|
|
68
|
+
var formLayoutStyles = "\n .euiSelectableTemplateSitewide .euiFormControlLayout {\n background-color: transparent;\n\n input {\n box-shadow: inset 0 0 0 ".concat(euiTheme.border.width.thin, " ").concat(selectableSitewide.borderColor, ";\n }\n\n &--group {\n border-color: ").concat(
|
|
68
69
|
// the header is in a faux dark mode, we can't rely on color
|
|
69
70
|
// switch tokens as they'd be in the wrong color mode
|
|
70
|
-
highContrastMode ? euiTheme.colors.plainLight : euiTheme.components.headerDarkSearchBorderColor, ";\n\n input {\n box-shadow: none;\n }\n }\n\n &__append {\n border-color: ").concat(highContrastMode ? euiTheme.colors.plainLight : '', "\n }\n\n &:not(:focus-within) {\n /* Increase contrast of filled text to be more than placeholder text */\n color: ").concat(selectableSitewide.color, ";\n\n input {\n /* Increase contrast of placeholder text */\n &::placeholder {\n color: ").concat(selectableSitewide.placeholderColor, ";\n }\n\n /* Inherit color from form control layout */\n color: inherit;\n background-color: transparent;\n }\n\n .euiFormControlLayout__append,\n .euiFormControlLayout__prepend {\n background-color: transparent;\n }\n\n .euiFormLabel {\n color: inherit;\n }\n }\n
|
|
71
|
+
highContrastMode ? euiTheme.colors.plainLight : euiTheme.components.headerDarkSearchBorderColor, ";\n\n input {\n box-shadow: none;\n }\n }\n\n &__append {\n border-color: ").concat(highContrastMode ? euiTheme.colors.plainLight : '', "\n }\n\n &:not(:focus-within) {\n /* Increase contrast of filled text to be more than placeholder text */\n color: ").concat(selectableSitewide.color, ";\n\n input {\n /* Increase contrast of placeholder text */\n &::placeholder {\n color: ").concat(selectableSitewide.placeholderColor, ";\n }\n\n /* Inherit color from form control layout */\n color: inherit;\n background-color: transparent;\n }\n\n .euiFormControlLayout__append,\n .euiFormControlLayout__prepend {\n background-color: transparent;\n }\n\n .euiFormLabel {\n color: inherit;\n }\n }\n }\n ");
|
|
72
|
+
return "\n background-color: ".concat(backgroundColor, ";\n\n .euiHeaderLogo__text,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n color: ").concat(euiTheme.colors.ghost, ";\n }\n\n .euiHeaderLink-isActive {\n color: ").concat((0, _services.makeHighContrastColor)(euiTheme.colors.primary)(backgroundColor), ";\n }\n\n .euiHeaderLogo,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n &:focus {\n background-color: ").concat(euiTheme.components.headerDarkSectionItemBackgroundFocus, ";\n }\n }\n\n .euiHeaderSectionItemButton__notification--badge {\n box-shadow: 0 0 0 ").concat(euiTheme.border.width.thin, " ").concat(backgroundColor, ";\n }\n\n .euiHeaderSectionItemButton__notification--dot {\n stroke: ").concat(backgroundColor, ";\n }\n\n ").concat(!isRefreshVariant && formLayoutStyles, " \n ");
|
|
71
73
|
};
|
|
@@ -5,8 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.euiMarkdownEditorDropZoneStyles = 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 _markdown_editor = require("./markdown_editor.styles");
|
|
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
|
|
@@ -24,13 +26,14 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
24
26
|
};
|
|
25
27
|
var euiMarkdownEditorDropZoneStyles = exports.euiMarkdownEditorDropZoneStyles = function euiMarkdownEditorDropZoneStyles(euiThemeContext) {
|
|
26
28
|
var euiTheme = euiThemeContext.euiTheme;
|
|
29
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
27
30
|
var _euiMarkdownEditorVar = (0, _markdown_editor.euiMarkdownEditorVariables)(euiThemeContext),
|
|
28
31
|
minHeight = _euiMarkdownEditorVar.minHeight;
|
|
29
32
|
return {
|
|
30
33
|
euiMarkdownEditorDropZone: /*#__PURE__*/(0, _react.css)("position:relative;display:flex;flex-direction:column;", (0, _global_styling.logicalCSS)('min-height', minHeight), ";;label:euiMarkdownEditorDropZone;"),
|
|
31
|
-
isDragging: /*#__PURE__*/(0, _react.css)(".euiMarkdownEditorFooter,.euiMarkdownEditorTextArea{background-color:", euiTheme.colors.backgroundTransparentPrimary, "!important;};label:isDragging;"),
|
|
32
|
-
isDraggingError: /*#__PURE__*/(0, _react.css)(".euiMarkdownEditorFooter,.euiMarkdownEditorTextArea{background-color:", euiTheme.colors.backgroundTransparentDanger, "!important;};label:isDraggingError;"),
|
|
33
|
-
hasError: /*#__PURE__*/(0, _react.css)(".euiMarkdownEditorTextArea{--euiFormControlStateColor:", euiTheme.colors.danger, "
|
|
34
|
+
isDragging: /*#__PURE__*/(0, _react.css)(".euiMarkdownEditorFooter,.euiMarkdownEditorTextArea{background-color:", isRefreshVariant ? euiTheme.colors.backgroundBasePrimary : euiTheme.colors.backgroundTransparentPrimary, "!important;};label:isDragging;"),
|
|
35
|
+
isDraggingError: /*#__PURE__*/(0, _react.css)(".euiMarkdownEditorFooter,.euiMarkdownEditorTextArea{background-color:", isRefreshVariant ? euiTheme.colors.backgroundBaseDanger : euiTheme.colors.backgroundTransparentDanger, "!important;};label:isDraggingError;"),
|
|
36
|
+
hasError: /*#__PURE__*/(0, _react.css)(".euiMarkdownEditorTextArea{--euiFormControlStateColor:", euiTheme.colors.danger, ";background-size:100% 100%;", isRefreshVariant && (0, _form.euiFormControlInvalidStyles)(euiThemeContext), ";};label:hasError;"),
|
|
34
37
|
euiMarkdownEditorDropZone__input: _ref
|
|
35
38
|
};
|
|
36
39
|
};
|
|
@@ -75,13 +75,13 @@ describe('EuiProgress', function () {
|
|
|
75
75
|
cy.checkAxe();
|
|
76
76
|
});
|
|
77
77
|
it('displays correct progress values and labels', function () {
|
|
78
|
-
cy.get('div[data-test-subj="cy-progress-1"]
|
|
79
|
-
cy.get('div[data-test-subj="cy-progress-2"]
|
|
80
|
-
cy.get('div[data-test-subj="cy-progress-3"]
|
|
81
|
-
cy.get('div[data-test-subj="cy-progress-4"]
|
|
82
|
-
cy.get('div[data-test-subj="cy-progress-5"]
|
|
83
|
-
cy.get('div[data-test-subj="cy-progress-5"]
|
|
84
|
-
cy.get('div[data-test-subj="cy-progress-infinite"]
|
|
78
|
+
cy.get('div[data-test-subj="cy-progress-1"] div.euiProgress__valueText').contains('0');
|
|
79
|
+
cy.get('div[data-test-subj="cy-progress-2"] div.euiProgress__valueText').contains('33');
|
|
80
|
+
cy.get('div[data-test-subj="cy-progress-3"] div.euiProgress__valueText').contains('66');
|
|
81
|
+
cy.get('div[data-test-subj="cy-progress-4"] div.euiProgress__valueText').contains('100');
|
|
82
|
+
cy.get('div[data-test-subj="cy-progress-5"] div.euiProgress__label').contains('Basic percentage');
|
|
83
|
+
cy.get('div[data-test-subj="cy-progress-5"] div.euiProgress__valueText').contains('100');
|
|
84
|
+
cy.get('div[data-test-subj="cy-progress-infinite"] div.euiProgress__valueText').should('not.exist');
|
|
85
85
|
});
|
|
86
86
|
});
|
|
87
87
|
});
|
|
@@ -13,7 +13,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
15
|
var _i18n = require("../i18n");
|
|
16
|
-
var _inner_text = require("../inner_text");
|
|
17
16
|
var _predicate = require("../../services/predicate");
|
|
18
17
|
var _services = require("../../services");
|
|
19
18
|
var _accessibility = require("../accessibility");
|
|
@@ -102,34 +101,26 @@ var EuiProgress = exports.EuiProgress = function EuiProgress(_ref) {
|
|
|
102
101
|
return (0, _react2.jsx)(_react.default.Fragment, null, label || valueText ? (0, _react2.jsx)("div", {
|
|
103
102
|
css: dataCssStyles,
|
|
104
103
|
className: "euiProgress__data"
|
|
105
|
-
}, label && (0, _react2.jsx)(
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
_ref3 === null || _ref3 === void 0 || _ref3(node);
|
|
123
|
-
},
|
|
124
|
-
style: customTextColorStyles,
|
|
125
|
-
css: valueTextCssStyles,
|
|
126
|
-
className: "euiProgress__valueText",
|
|
127
|
-
"aria-hidden": "true"
|
|
128
|
-
}, valueRender);
|
|
129
|
-
})) : undefined, (0, _react2.jsx)(_accessibility.EuiScreenReaderOnly, null, (0, _react2.jsx)("div", {
|
|
104
|
+
}, label && (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
105
|
+
ref: function ref(node) {
|
|
106
|
+
labelRef.current = node;
|
|
107
|
+
}
|
|
108
|
+
}, labelProps, {
|
|
109
|
+
className: labelClasses,
|
|
110
|
+
css: labelCssStyles,
|
|
111
|
+
"aria-hidden": "true"
|
|
112
|
+
}), label), valueRender && (0, _react2.jsx)("div", {
|
|
113
|
+
ref: function ref(node) {
|
|
114
|
+
valueTextRef.current = node;
|
|
115
|
+
},
|
|
116
|
+
style: customTextColorStyles,
|
|
117
|
+
css: valueTextCssStyles,
|
|
118
|
+
className: "euiProgress__valueText",
|
|
119
|
+
"aria-hidden": "true"
|
|
120
|
+
}, valueRender)) : undefined, (0, _react2.jsx)(_accessibility.EuiScreenReaderOnly, null, (0, _react2.jsx)("div", {
|
|
130
121
|
"aria-live": "polite",
|
|
131
122
|
"aria-atomic": "true"
|
|
132
|
-
}, (0, _react2.jsx)("span", null, label &&
|
|
123
|
+
}, (0, _react2.jsx)("span", null, label && (0, _react2.jsx)(_react.default.Fragment, null, labelText, " "), valueRender || value))), (0, _react2.jsx)("progress", (0, _extends2.default)({
|
|
133
124
|
css: cssStyles,
|
|
134
125
|
className: classes,
|
|
135
126
|
style: customColorStyles,
|