@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
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.euiFormVariables = exports.euiFormMaxWidth = exports.euiFormCustomControlVariables = exports.euiFormCustomControlStyles = exports.euiFormControlText = exports.euiFormControlStyles = exports.
|
|
7
|
+
exports.euiFormVariables = exports.euiFormMaxWidth = exports.euiFormCustomControlVariables = exports.euiFormCustomControlStyles = exports.euiFormControlText = exports.euiFormControlStyles = exports.euiFormControlShowBackgroundLine = exports.euiFormControlReadOnlyStyles = exports.euiFormControlInvalidStyles = exports.euiFormControlHoverStyles = exports.euiFormControlHighlightBorderStyles = exports.euiFormControlFocusStyles = exports.euiFormControlDisabledStyles = exports.euiFormControlDefaultShadow = exports.euiFormControlAutoFillStyles = exports.disableFormControlHoverStyles = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _services = require("../../services");
|
|
10
10
|
var _global_styling = require("../../global_styling");
|
|
@@ -27,6 +27,7 @@ var euiFormMaxWidth = exports.euiFormMaxWidth = function euiFormMaxWidth(_ref) {
|
|
|
27
27
|
var euiFormVariables = exports.euiFormVariables = function euiFormVariables(euiThemeContext) {
|
|
28
28
|
var euiTheme = euiThemeContext.euiTheme,
|
|
29
29
|
highContrastMode = euiThemeContext.highContrastMode;
|
|
30
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
30
31
|
var backgroundColor = highContrastMode ? euiTheme.colors.emptyShade : euiTheme.components.forms.background;
|
|
31
32
|
var controlHeight = euiTheme.size.xxl;
|
|
32
33
|
var controlCompressedHeight = euiTheme.size.xl;
|
|
@@ -36,12 +37,12 @@ var euiFormVariables = exports.euiFormVariables = function euiFormVariables(euiT
|
|
|
36
37
|
controlCompressedHeight: controlCompressedHeight,
|
|
37
38
|
controlPadding: euiTheme.size.m,
|
|
38
39
|
controlCompressedPadding: euiTheme.size.s,
|
|
39
|
-
controlBorderRadius: euiTheme.border.radius.medium,
|
|
40
|
+
controlBorderRadius: isRefreshVariant ? euiTheme.border.radius.small : euiTheme.border.radius.medium,
|
|
40
41
|
controlCompressedBorderRadius: euiTheme.border.radius.small,
|
|
41
42
|
iconAffordance: (0, _global_styling.mathWithUnits)(euiTheme.size.base, function (x) {
|
|
42
43
|
return x * 1.5;
|
|
43
44
|
}),
|
|
44
|
-
iconCompressedAffordance: (0, _global_styling.mathWithUnits)(euiTheme.size.m, function (x) {
|
|
45
|
+
iconCompressedAffordance: (0, _global_styling.mathWithUnits)(isRefreshVariant ? euiTheme.size.base : euiTheme.size.m, function (x) {
|
|
45
46
|
return x * 1.5;
|
|
46
47
|
}),
|
|
47
48
|
stateUnderlineHeight: highContrastMode ? (0, _global_styling.mathWithUnits)(euiTheme.border.width.thick, function (x) {
|
|
@@ -55,9 +56,13 @@ var euiFormVariables = exports.euiFormVariables = function euiFormVariables(euiT
|
|
|
55
56
|
backgroundDisabledColor: euiTheme.components.forms.backgroundDisabled,
|
|
56
57
|
backgroundReadOnlyColor: euiTheme.components.forms.backgroundReadOnly,
|
|
57
58
|
borderColor: highContrastMode ? euiTheme.border.color : euiTheme.components.forms.border,
|
|
59
|
+
borderHovered: euiTheme.components.forms.borderHovered,
|
|
60
|
+
borderFocused: euiTheme.components.forms.borderFocused,
|
|
61
|
+
borderInvalid: euiTheme.components.forms.borderInvalid,
|
|
62
|
+
borderInvalidHovered: euiTheme.components.forms.borderInvalidHovered,
|
|
58
63
|
controlDisabledColor: euiTheme.components.forms.controlBackgroundDisabled,
|
|
59
64
|
controlBoxShadow: '0 0 transparent',
|
|
60
|
-
controlPlaceholderText: (0, _services.makeHighContrastColor)(euiTheme.colors.textSubdued)(backgroundColor),
|
|
65
|
+
controlPlaceholderText: isRefreshVariant ? highContrastMode ? (0, _services.makeHighContrastColor)(euiTheme.components.forms.colorDisabled)(backgroundColor) : euiTheme.components.forms.colorDisabled : (0, _services.makeHighContrastColor)(euiTheme.colors.textSubdued)(backgroundColor),
|
|
61
66
|
appendPrependBackground: euiTheme.components.forms.prependBackground
|
|
62
67
|
};
|
|
63
68
|
var controlLayout = {
|
|
@@ -82,7 +87,9 @@ var euiFormVariables = exports.euiFormVariables = function euiFormVariables(euiT
|
|
|
82
87
|
animationTiming: "".concat(euiTheme.animation.fast, " ease-in")
|
|
83
88
|
});
|
|
84
89
|
};
|
|
90
|
+
var formControlLayoutWrapperSelector = '.euiFormControlLayout__childrenWrapper';
|
|
85
91
|
var euiFormControlStyles = exports.euiFormControlStyles = function euiFormControlStyles(euiThemeContext) {
|
|
92
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
86
93
|
var form = euiFormVariables(euiThemeContext);
|
|
87
94
|
return {
|
|
88
95
|
shared: "\n ".concat(euiFormControlText(euiThemeContext), "\n ").concat(euiFormControlDefaultShadow(euiThemeContext), "\n "),
|
|
@@ -93,7 +100,7 @@ var euiFormControlStyles = exports.euiFormControlStyles = function euiFormContro
|
|
|
93
100
|
inGroup: "\n ".concat((0, _global_styling.logicalCSS)('height', '100%'), "\n ").concat((0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
|
|
94
101
|
none: 'box-shadow: none;',
|
|
95
102
|
preferred: 'border: none;'
|
|
96
|
-
}), "\n border-radius: 0;\n "),
|
|
103
|
+
}), "\n border-radius: ").concat(isRefreshVariant ? 'inherit' : '0', ";\n "),
|
|
97
104
|
// Widths
|
|
98
105
|
formWidth: "\n ".concat((0, _global_styling.logicalCSS)('max-width', form.maxWidth), "\n ").concat((0, _global_styling.logicalCSS)('width', '100%'), "\n "),
|
|
99
106
|
fullWidth: "\n ".concat((0, _global_styling.logicalCSS)('max-width', '100%'), "\n ").concat((0, _global_styling.logicalCSS)('width', '100%'), "\n "),
|
|
@@ -123,44 +130,75 @@ var euiFormControlDefaultShadow = exports.euiFormControlDefaultShadow = function
|
|
|
123
130
|
_ref2$withBackgroundA = _ref2.withBackgroundAnimation,
|
|
124
131
|
withBackgroundAnimation = _ref2$withBackgroundA === void 0 ? withBackground : _ref2$withBackgroundA;
|
|
125
132
|
var euiTheme = euiThemeContext.euiTheme;
|
|
133
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
126
134
|
var form = euiFormVariables(euiThemeContext);
|
|
127
135
|
var border = (0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
|
|
128
136
|
// We use inset box-shadow instead of border to skip extra height calculations
|
|
129
|
-
none: "\n border: none;\n box-shadow: inset 0 0 0 ".concat(euiTheme.border.width.thin, " ").concat(form.borderColor, ";\n "),
|
|
137
|
+
none: isRefreshVariant ? "\n --euiFormControlStateColor: ".concat(form.borderColor, ";\n border: none;\n box-shadow: inset 0 0 0 ").concat(euiTheme.border.width.thin, " var(--euiFormControlStateColor);\n\n ").concat(euiFormControlHoverStyles(euiThemeContext), "\n ") : "\n border: none;\n box-shadow: inset 0 0 0 ".concat(euiTheme.border.width.thin, " ").concat(form.borderColor, ";\n "),
|
|
130
138
|
// In high contrast mode, this doesn't matter - we need to prioritize visibility
|
|
131
|
-
preferred: "\n border: ".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.border.color, ";\n ")
|
|
139
|
+
preferred: "\n border: ".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.border.color, ";\n\n ").concat(euiFormControlHoverStyles(euiThemeContext), "\n ")
|
|
132
140
|
});
|
|
133
141
|
var backgroundColor = "\n background-color: ".concat(form.backgroundColor, ";\n ").trim();
|
|
134
142
|
var backgroundGradient = (0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
|
|
135
|
-
none: "\n background-repeat: no-repeat;\n background-size: 0% 100%;\n background-image: linear-gradient(to top,\n var(--euiFormControlStateColor),\n var(--euiFormControlStateColor) ".concat(
|
|
143
|
+
none: !isRefreshVariant ? "\n background-repeat: no-repeat;\n background-size: 0% 100%;\n background-image: linear-gradient(to top,\n var(--euiFormControlStateColor),\n var(--euiFormControlStateColor) ".concat(isRefreshVariant ? (0, _global_styling.mathWithUnits)([euiTheme.border.width.thick, euiTheme.border.width.thin], function (x, y) {
|
|
144
|
+
return x + y;
|
|
145
|
+
} // account for pseudo element border
|
|
146
|
+
) : form.stateUnderlineHeight, ",\n transparent ").concat(form.stateUnderlineHeight, ",\n transparent 100%\n );\n ") : '',
|
|
136
147
|
// Windows high contrast mode overrides/hides background gradients - we'll need another approach
|
|
137
148
|
forced: "\n background-repeat: no-repeat;\n background-size: 0% ".concat(form.stateUnderlineHeight, ";\n background-position: bottom left;\n background-origin: border-box;\n ")
|
|
138
149
|
});
|
|
139
|
-
var backgroundAnimation = "\n ".concat(_global_styling.euiCanAnimate, " {\n transition:\n background-image ").concat(form.animationTiming, ",\n background-size ").concat(form.animationTiming, ",\n background-color ").concat(form.animationTiming, ";\n }\n ").trim();
|
|
150
|
+
var backgroundAnimation = !isRefreshVariant ? "\n ".concat(_global_styling.euiCanAnimate, " {\n transition:\n background-image ").concat(form.animationTiming, ",\n background-size ").concat(form.animationTiming, ",\n background-color ").concat(form.animationTiming, ";\n }\n ").trim() : '';
|
|
140
151
|
return "\n ".concat(withBorder ? border : '', "\n ").concat(withBackgroundColor ? backgroundColor : '', "\n ").concat(withBackground ? backgroundGradient : '', "\n ").concat(withBackgroundAnimation ? backgroundAnimation : '', "\n ");
|
|
141
152
|
};
|
|
153
|
+
var hoverSelector = '&:hover:not(:disabled, :focus, input[readonly], [class*="readOnly"])';
|
|
154
|
+
var disableFormControlHoverStyles = exports.disableFormControlHoverStyles = function disableFormControlHoverStyles() {
|
|
155
|
+
return "\n ".concat(hoverSelector, " {\n outline: none;\n }\n");
|
|
156
|
+
};
|
|
157
|
+
var euiFormControlHoverStyles = exports.euiFormControlHoverStyles = function euiFormControlHoverStyles(euiThemeContext) {
|
|
158
|
+
var euiTheme = euiThemeContext.euiTheme,
|
|
159
|
+
highContrastMode = euiThemeContext.highContrastMode;
|
|
160
|
+
var form = euiFormVariables(euiThemeContext);
|
|
161
|
+
return "\n ".concat(hoverSelector, " {\n --borderWidthBase: var(--euiFormControlStateWidth, ").concat(euiTheme.border.width.thin, ");\n --borderWidth: ").concat(highContrastMode ? euiTheme.border.width.thick : 'var(--borderWidthBase)', ";\n --borderColor: var(--euiFormControlStateHoverColor, ").concat(highContrastMode ? euiTheme.border.color : form.borderHovered, ");\n position: relative;\n z-index: 1;\n outline: var(--borderWidth) solid var(--borderColor);\n outline-offset: calc(-1 * var(--borderWidth));\n }\n ");
|
|
162
|
+
};
|
|
163
|
+
var euiFormControlHighlightBorderStyles = exports.euiFormControlHighlightBorderStyles = "\n position: relative;\n z-index: 1;\n box-shadow: none;\n outline: var(--euiFormControlStateWidth) solid var(--euiFormControlStateColor);\n outline-offset: calc(-1 * var(--euiFormControlStateWidth));\n";
|
|
142
164
|
var euiFormControlFocusStyles = exports.euiFormControlFocusStyles = function euiFormControlFocusStyles(euiThemeContext) {
|
|
143
165
|
var euiTheme = euiThemeContext.euiTheme;
|
|
166
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
167
|
+
var form = euiFormVariables(euiThemeContext);
|
|
144
168
|
var focusColor = euiTheme.colors.primary;
|
|
145
|
-
return "\n
|
|
169
|
+
return isRefreshVariant ? "\n --euiFormControlStateColor: ".concat(form.borderFocused, ";\n --euiFormControlStateHoverColor: ").concat(form.borderFocused, ";\n --euiFormControlStateWidth: ").concat(euiTheme.border.width.thick, ";\n ").concat(euiFormControlHighlightBorderStyles, "\n ").concat((0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
|
|
170
|
+
forced: "\n ".concat(euiFormControlShowBackgroundLine(euiThemeContext, focusColor), "\n ")
|
|
171
|
+
}), "\n ") : "\n --euiFormControlStateColor: ".concat(focusColor, ";\n background-color: ").concat(euiTheme.components.forms.backgroundFocused, ";\n ").concat(euiFormControlShowBackgroundLine(euiThemeContext, focusColor), "\n outline: none; /* Remove all outlines and rely on our own bottom border gradient */\n ");
|
|
146
172
|
};
|
|
147
173
|
var euiFormControlInvalidStyles = exports.euiFormControlInvalidStyles = function euiFormControlInvalidStyles(euiThemeContext) {
|
|
148
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
174
|
+
var euiTheme = euiThemeContext.euiTheme,
|
|
175
|
+
highContrastMode = euiThemeContext.highContrastMode;
|
|
176
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
177
|
+
var form = euiFormVariables(euiThemeContext);
|
|
149
178
|
var invalidColor = euiTheme.colors.danger;
|
|
150
|
-
return "\n --euiFormControlStateColor: ".concat(invalidColor, ";\n
|
|
179
|
+
return isRefreshVariant ? "\n --euiFormControlStateColor: ".concat(form.borderInvalid, ";\n --euiFormControlStateHoverColor: ").concat(form.borderInvalidHovered, ";\n --euiFormControlStateWidth: ").concat(highContrastMode === 'preferred' ? euiTheme.border.width.thick : euiTheme.border.width.thin, ";\n \n ").concat(euiFormControlHighlightBorderStyles, "\n ").concat(euiFormControlShowBackgroundLine(euiThemeContext, invalidColor), "\n ") : "\n --euiFormControlStateColor: ".concat(invalidColor, ";\n ").concat(euiFormControlShowBackgroundLine(euiThemeContext, invalidColor), "\n ");
|
|
151
180
|
};
|
|
152
181
|
var euiFormControlDisabledStyles = exports.euiFormControlDisabledStyles = function euiFormControlDisabledStyles(euiThemeContext) {
|
|
182
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
153
183
|
var form = euiFormVariables(euiThemeContext);
|
|
154
|
-
|
|
184
|
+
var refreshVariantStyles = "\n --euiFormControlStateHoverColor: transparent;\n --euiFormControlStateColor: ".concat(form.borderColor, ";\n ");
|
|
185
|
+
return "\n color: ".concat(form.textColorDisabled, ";\n /* Required for Safari */\n -webkit-text-fill-color: ").concat(form.textColorDisabled, ";\n background-color: ").concat(form.backgroundDisabledColor, ";\n cursor: not-allowed;\n --euiFormControlStateColor: transparent;\n\n ").concat(isRefreshVariant && refreshVariantStyles, "\n\n ").concat(euiPlaceholderPerBrowser("\n color: ".concat(form.textColorDisabled, ";\n opacity: 1;\n ")), "\n ");
|
|
155
186
|
};
|
|
156
187
|
var euiFormControlReadOnlyStyles = exports.euiFormControlReadOnlyStyles = function euiFormControlReadOnlyStyles(euiThemeContext) {
|
|
188
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
189
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
157
190
|
var form = euiFormVariables(euiThemeContext);
|
|
158
|
-
|
|
191
|
+
var styles = isRefreshVariant ? "\n --euiFormControlStateColor: ".concat(form.borderColor, ";\n --euiFormControlStateHoverColor: ").concat(form.borderColor, ";\n --euiFormControlStateWidth: ").concat(euiTheme.border.width.thin, ";\n /* keep the input below wrapper borders */\n position: relative;\n z-index: 0;\n outline: none;\n box-shadow: inset 0 0 0 var(--euiFormControlStateWidth) var(--euiFormControlStateColor);\n\n ").concat(formControlLayoutWrapperSelector, "[class*=inGroup] & {\n box-shadow: none;\n }\n ").concat((0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
|
|
192
|
+
preferred: 'box-shadow: none;'
|
|
193
|
+
}), "\n ") : "\n --euiFormControlStateColor: transparent;\n ".concat((0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
|
|
159
194
|
forced: 'background-image: none;'
|
|
160
|
-
}), "\n
|
|
195
|
+
}), "\n ");
|
|
196
|
+
return "\n background-color: ".concat(form.backgroundReadOnlyColor, ";\n cursor: default;\n color: ").concat(form.textColor, ";\n -webkit-text-fill-color: ").concat(form.textColor, "; /* Required for Safari */\n\n ").concat(styles, "\n ");
|
|
161
197
|
};
|
|
162
198
|
var euiFormControlAutoFillStyles = exports.euiFormControlAutoFillStyles = function euiFormControlAutoFillStyles(euiThemeContext) {
|
|
163
199
|
var euiTheme = euiThemeContext.euiTheme;
|
|
200
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
201
|
+
var form = euiFormVariables(euiThemeContext);
|
|
164
202
|
|
|
165
203
|
// Make the text color slightly less prominent than the default colors.text
|
|
166
204
|
var textColor = euiTheme.colors.darkestShade;
|
|
@@ -172,27 +210,39 @@ var euiFormControlAutoFillStyles = exports.euiFormControlAutoFillStyles = functi
|
|
|
172
210
|
// Re-create the border, since the above webkit box shadow overrides the default border box-shadow
|
|
173
211
|
// + change the border color to match states, since the underline background gradient no longer works
|
|
174
212
|
var borderColor = euiTheme.components.forms.borderAutofilled;
|
|
175
|
-
var
|
|
213
|
+
var borderHovered = euiTheme.components.forms.borderAutofilledHovered;
|
|
214
|
+
var borderInvalid = form.borderInvalid;
|
|
215
|
+
var borderInvalidHovered = form.borderInvalidHovered;
|
|
176
216
|
var borderShadow = function borderShadow(color) {
|
|
177
217
|
return "inset 0 0 0 ".concat(euiTheme.border.width.thin, " ").concat(color);
|
|
178
218
|
};
|
|
219
|
+
var interactiveStyles = isRefreshVariant ? "\n &:hover,\n &:focus {\n -webkit-box-shadow: ".concat(borderShadow(borderHovered), ", ").concat(backgroundShadow, ";\n }\n\n &:invalid {\n -webkit-box-shadow: ").concat(borderShadow(borderInvalid), ", ").concat(backgroundShadow, ";\n\n &:hover {\n -webkit-box-shadow: ").concat(borderShadow(borderInvalidHovered), ", ").concat(backgroundShadow, ";\n }\n }\n ") : "\n &:invalid {\n -webkit-box-shadow: ".concat(borderShadow(borderInvalid), ", ").concat(backgroundShadow, ";\n }\n ");
|
|
179
220
|
|
|
180
221
|
// These styles only apply/override Chrome/webkit browsers - Firefox does not set autofill styles
|
|
181
|
-
return "\n &:-webkit-autofill {\n -webkit-text-fill-color: ".concat(textColor, ";\n -webkit-box-shadow: ").concat(borderShadow(borderColor), ", ").concat(backgroundShadow, ";\n\n
|
|
222
|
+
return "\n &:-webkit-autofill {\n -webkit-text-fill-color: ".concat(textColor, ";\n -webkit-box-shadow: ").concat(borderShadow(borderColor), ", ").concat(backgroundShadow, ";\n\n ").concat(interactiveStyles, "\n }\n ");
|
|
182
223
|
};
|
|
183
|
-
var
|
|
184
|
-
|
|
224
|
+
var euiFormControlShowBackgroundLine = exports.euiFormControlShowBackgroundLine = function euiFormControlShowBackgroundLine(euiThemeContext, color) {
|
|
225
|
+
var euiTheme = euiThemeContext.euiTheme,
|
|
226
|
+
highContrastMode = euiThemeContext.highContrastMode;
|
|
227
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
228
|
+
if (highContrastMode !== 'forced') {
|
|
185
229
|
return 'background-size: 100% 100%;';
|
|
186
230
|
}
|
|
231
|
+
var _euiFormVariables = euiFormVariables(euiThemeContext),
|
|
232
|
+
stateUnderlineHeight = _euiFormVariables.stateUnderlineHeight;
|
|
187
233
|
|
|
188
234
|
// Windows high contrast themes ignore all background-images that aren't url-based,
|
|
189
235
|
// so to restore the linear-gradient that provides important visual information, we're
|
|
190
236
|
// using a static inline SVG workaround
|
|
191
237
|
var fill = encodeURIComponent(color);
|
|
238
|
+
var strokeWidth = stateUnderlineHeight !== null && stateUnderlineHeight !== void 0 ? stateUnderlineHeight : '4px';
|
|
192
239
|
var inlineSVG = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' fill='".concat(fill, "' /%3E%3C/svg%3E");
|
|
193
|
-
var
|
|
194
|
-
|
|
195
|
-
|
|
240
|
+
var refreshInlineSVG = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' style='fill:transparent;stroke-width:".concat(strokeWidth, ";stroke:").concat(fill, "' /%3E%3C/svg%3E");
|
|
241
|
+
return isRefreshVariant ? "\n background-size: calc(100% - ".concat((0, _global_styling.mathWithUnits)(strokeWidth, function (x) {
|
|
242
|
+
return x / 2;
|
|
243
|
+
}), ") calc(100% - ").concat((0, _global_styling.mathWithUnits)(strokeWidth, function (x) {
|
|
244
|
+
return x / 2;
|
|
245
|
+
}), ");\n background-position: ").concat(euiTheme.border.width.thin, ";\n background-image: url(\"").concat(refreshInlineSVG, "\");\n ") : "\n background-size: 100% ".concat(stateUnderlineHeight, ";\n background-image: url(\"").concat(inlineSVG, "\");\n ");
|
|
196
246
|
};
|
|
197
247
|
var euiPlaceholderPerBrowser = function euiPlaceholderPerBrowser(content) {
|
|
198
248
|
return "\n &::-webkit-input-placeholder { ".concat(content, " }\n &::-moz-placeholder { ").concat(content, " }\n &:-ms-input-placeholder { ").concat(content, " }\n &:-moz-placeholder { ").concat(content, " }\n &::placeholder { ").concat(content, " }\n");
|
|
@@ -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/optimize/lib/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;
|
|
@@ -36,6 +36,8 @@ var EuiFormControlLayoutDelimited = exports.EuiFormControlLayoutDelimited = func
|
|
|
36
36
|
className = _ref.className,
|
|
37
37
|
_fullWidth = _ref.fullWidth,
|
|
38
38
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
39
|
+
var euiThemeContext = (0, _services.useEuiTheme)();
|
|
40
|
+
var isRefreshVariant = (0, _services.useEuiThemeRefreshVariant)('formVariant');
|
|
39
41
|
var _useFormContext = (0, _eui_form_context.useFormContext)(),
|
|
40
42
|
defaultFullWidth = _useFormContext.defaultFullWidth;
|
|
41
43
|
var fullWidth = _fullWidth !== null && _fullWidth !== void 0 ? _fullWidth : defaultFullWidth;
|
|
@@ -48,7 +50,7 @@ var EuiFormControlLayoutDelimited = exports.EuiFormControlLayoutDelimited = func
|
|
|
48
50
|
});
|
|
49
51
|
var styles = (0, _services.useEuiMemoizedStyles)(_form_control_layout_delimited.euiFormControlLayoutDelimitedStyles);
|
|
50
52
|
var cssStyles = [styles.delimited, rest.isDisabled && styles.disabled, rest.readOnly && styles.readOnly];
|
|
51
|
-
var wrapperStyles = [styles.childrenWrapper.delimited, showInvalidState && styles.childrenWrapper.invalid, (_rest$wrapperProps = rest.wrapperProps) === null || _rest$wrapperProps === void 0 ? void 0 : _rest$wrapperProps.css];
|
|
53
|
+
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];
|
|
52
54
|
return (0, _react2.jsx)(_form_control_layout.EuiFormControlLayout, (0, _extends2.default)({
|
|
53
55
|
isDelimited: true,
|
|
54
56
|
css: cssStyles,
|
|
@@ -63,23 +65,24 @@ var EuiFormControlLayoutDelimited = exports.EuiFormControlLayoutDelimited = func
|
|
|
63
65
|
value: {
|
|
64
66
|
defaultFullWidth: fullWidth
|
|
65
67
|
}
|
|
66
|
-
}, startControl && addClassesToControl(startControl), (0, _react2.jsx)(EuiFormControlDelimiter, {
|
|
68
|
+
}, startControl && addClassesToControl(euiThemeContext, startControl), (0, _react2.jsx)(EuiFormControlDelimiter, {
|
|
67
69
|
delimiter: delimiter,
|
|
68
70
|
isInvalid: showInvalidState
|
|
69
|
-
}), endControl && addClassesToControl(endControl)));
|
|
71
|
+
}), endControl && addClassesToControl(euiThemeContext, endControl)));
|
|
70
72
|
};
|
|
71
|
-
var addClassesToControl = function addClassesToControl(control) {
|
|
73
|
+
var addClassesToControl = function addClassesToControl(euiThemeContext, control) {
|
|
72
74
|
return (0, _services.cloneElementWithCss)(control, {
|
|
73
|
-
css: _form_control_layout_delimited.euiFormControlLayoutDelimited__input,
|
|
75
|
+
css: (0, _form_control_layout_delimited.euiFormControlLayoutDelimited__input)(euiThemeContext),
|
|
74
76
|
className: (0, _classnames.default)(control.props.className, 'euiFormControlLayoutDelimited__input')
|
|
75
77
|
}, 'before');
|
|
76
78
|
};
|
|
77
79
|
var EuiFormControlDelimiter = function EuiFormControlDelimiter(_ref2) {
|
|
78
80
|
var delimiter = _ref2.delimiter,
|
|
79
81
|
isInvalid = _ref2.isInvalid;
|
|
82
|
+
var euiThemeContext = (0, _services.useEuiTheme)();
|
|
80
83
|
var defaultAriaLabel = (0, _i18n.useEuiI18n)('euiFormControlLayoutDelimited.delimiterLabel', 'to');
|
|
81
84
|
return (0, _react2.jsx)(_text.EuiText, {
|
|
82
|
-
css: _form_control_layout_delimited.euiFormControlLayoutDelimited__delimiter,
|
|
85
|
+
css: (0, _form_control_layout_delimited.euiFormControlLayoutDelimited__delimiter)(euiThemeContext),
|
|
83
86
|
className: "euiFormControlLayoutDelimited__delimiter",
|
|
84
87
|
size: "s",
|
|
85
88
|
color: isInvalid ? 'danger' : 'subdued'
|
package/optimize/lib/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
|
+
};
|
|
@@ -85,11 +85,14 @@ var EuiFormControlLayoutIcons = exports.EuiFormControlLayoutIcons = /*#__PURE__*
|
|
|
85
85
|
var iconRef = iconProps.ref,
|
|
86
86
|
side = iconProps.side,
|
|
87
87
|
iconRest = (0, _objectWithoutProperties2.default)(iconProps, _excluded);
|
|
88
|
-
return (0, _react2.jsx)(
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
88
|
+
return (0, _react2.jsx)(_services.RenderWithEuiTheme, null, function (euiThemeContext) {
|
|
89
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
90
|
+
return (0, _react2.jsx)(_form_control_layout_custom_icon.EuiFormControlLayoutCustomIcon, (0, _extends2.default)({
|
|
91
|
+
size: compressed && !isRefreshVariant ? 's' : 'm',
|
|
92
|
+
disabled: isDisabled,
|
|
93
|
+
iconRef: iconRef
|
|
94
|
+
}, iconRest));
|
|
95
|
+
});
|
|
93
96
|
}
|
|
94
97
|
}, {
|
|
95
98
|
key: "renderDropdownIcon",
|
|
@@ -101,10 +104,13 @@ var EuiFormControlLayoutIcons = exports.EuiFormControlLayoutIcons = /*#__PURE__*
|
|
|
101
104
|
if (!isDropdown) {
|
|
102
105
|
return null;
|
|
103
106
|
}
|
|
104
|
-
return (0, _react2.jsx)(
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
107
|
+
return (0, _react2.jsx)(_services.RenderWithEuiTheme, null, function (euiThemeContext) {
|
|
108
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
109
|
+
return (0, _react2.jsx)(_form_control_layout_custom_icon.EuiFormControlLayoutCustomIcon, {
|
|
110
|
+
size: compressed && !isRefreshVariant ? 's' : 'm',
|
|
111
|
+
disabled: isDisabled,
|
|
112
|
+
type: "arrowDown"
|
|
113
|
+
});
|
|
108
114
|
});
|
|
109
115
|
}
|
|
110
116
|
}, {
|
|
@@ -116,8 +122,11 @@ var EuiFormControlLayoutIcons = exports.EuiFormControlLayoutIcons = /*#__PURE__*
|
|
|
116
122
|
if (!isLoading) {
|
|
117
123
|
return null;
|
|
118
124
|
}
|
|
119
|
-
return (0, _react2.jsx)(
|
|
120
|
-
|
|
125
|
+
return (0, _react2.jsx)(_services.RenderWithEuiTheme, null, function (euiThemeContext) {
|
|
126
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
127
|
+
return (0, _react2.jsx)(_loading.EuiLoadingSpinner, {
|
|
128
|
+
size: compressed && !isRefreshVariant ? 's' : 'm'
|
|
129
|
+
});
|
|
121
130
|
});
|
|
122
131
|
}
|
|
123
132
|
}, {
|
|
@@ -130,10 +139,13 @@ var EuiFormControlLayoutIcons = exports.EuiFormControlLayoutIcons = /*#__PURE__*
|
|
|
130
139
|
if (!clear) {
|
|
131
140
|
return null;
|
|
132
141
|
}
|
|
133
|
-
return (0, _react2.jsx)(
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
142
|
+
return (0, _react2.jsx)(_services.RenderWithEuiTheme, null, function (euiThemeContext) {
|
|
143
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
144
|
+
return (0, _react2.jsx)(_form_control_layout_clear_button.EuiFormControlLayoutClearButton, (0, _extends2.default)({
|
|
145
|
+
size: compressed && !isRefreshVariant ? 's' : 'm',
|
|
146
|
+
disabled: isDisabled
|
|
147
|
+
}, clear));
|
|
148
|
+
});
|
|
137
149
|
}
|
|
138
150
|
}, {
|
|
139
151
|
key: "renderInvalidIcon",
|
|
@@ -144,10 +156,13 @@ var EuiFormControlLayoutIcons = exports.EuiFormControlLayoutIcons = /*#__PURE__*
|
|
|
144
156
|
if (!isInvalid) {
|
|
145
157
|
return null;
|
|
146
158
|
}
|
|
147
|
-
return (0, _react2.jsx)(
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
159
|
+
return (0, _react2.jsx)(_services.RenderWithEuiTheme, null, function (euiThemeContext) {
|
|
160
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
161
|
+
return (0, _react2.jsx)(_icon.EuiIcon, {
|
|
162
|
+
size: compressed && !isRefreshVariant ? 's' : 'm',
|
|
163
|
+
color: "danger",
|
|
164
|
+
type: "warning"
|
|
165
|
+
});
|
|
151
166
|
});
|
|
152
167
|
}
|
|
153
168
|
}]);
|