@elastic/eui 112.3.0 → 113.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/es/components/badge/beta_badge/beta_badge.styles.js +1 -1
- package/es/components/badge/color_utils.js +1 -1
- package/es/components/badge/notification_badge/badge_notification.styles.js +1 -1
- package/es/components/button/button_display/_button_display.js +1 -0
- package/es/components/button/button_display/_button_display.styles.js +3 -3
- package/es/components/button/button_display/_button_display_content.js +6 -1
- package/es/components/button/button_display/_button_display_content.styles.js +6 -1
- package/es/components/button/button_empty/button_empty.js +1 -0
- package/es/components/button/button_empty/button_empty.styles.js +3 -3
- package/es/components/button/button_group/button_group.js +4 -27
- package/es/components/button/button_group/button_group_button.js +4 -27
- package/es/components/code/code_block_annotations.js +1 -1
- package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +1 -1
- package/es/components/color_picker/color_picker.js +2 -1
- package/es/components/color_picker/color_picker.styles.js +1 -1
- package/es/components/color_picker/hue.styles.js +2 -2
- package/es/components/color_picker/saturation.styles.js +2 -2
- package/es/components/date_picker/auto_refresh/auto_refresh.js +8 -8
- package/es/components/date_picker/date_picker_range.js +12 -2
- package/es/components/date_picker/date_picker_range.styles.js +1 -1
- package/es/components/date_picker/super_date_picker/date_popover/date_popover_button.styles.js +6 -1
- package/es/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +9 -24
- package/es/components/date_picker/super_date_picker/super_date_picker.js +3 -1
- package/es/components/date_picker/super_date_picker/super_date_picker.styles.js +7 -13
- package/es/components/filter_group/filter_button.styles.js +1 -1
- package/es/components/flyout/flyout_body.js +10 -3
- package/es/components/flyout/manager/actions.js +11 -0
- package/es/components/flyout/manager/flyout_managed.js +4 -3
- package/es/components/flyout/manager/index.js +1 -1
- package/es/components/flyout/manager/reducer.js +19 -1
- package/es/components/flyout/manager/store.js +4 -1
- package/es/components/form/field_password/field_password.js +6 -3
- package/es/components/form/form.styles.js +18 -11
- package/es/components/form/form_control_button/form_control_button.js +30 -7
- package/es/components/form/form_control_button/form_control_button.styles.js +5 -2
- package/es/components/form/form_control_layout/append_prepend/form_append_prepend.js +149 -0
- package/es/components/form/form_control_layout/append_prepend/form_append_prepend.styles.js +28 -0
- package/es/components/form/form_control_layout/append_prepend/index.js +9 -0
- package/es/components/form/form_control_layout/form_control_layout.js +55 -24
- package/es/components/form/form_control_layout/form_control_layout.styles.js +46 -27
- package/es/components/form/form_control_layout/form_control_layout_context.js +21 -0
- package/es/components/form/form_control_layout/form_control_layout_delimited.styles.js +5 -12
- package/es/components/form/form_control_layout/index.js +2 -1
- package/es/components/form/form_label/form_label.js +17 -3
- package/es/components/form/range/range_levels.styles.js +1 -1
- package/es/components/form/range/range_tooltip.styles.js +1 -1
- package/es/components/header/header.styles.js +1 -1
- package/es/components/header/header_links/header_link.js +7 -0
- package/es/components/header/header_section/header_section_item_button.js +7 -0
- package/es/components/icon/icon.styles.js +1 -1
- package/es/components/image/image_caption.styles.js +1 -1
- package/es/components/link/link.styles.js +1 -1
- package/es/components/list_group/list_group_item.styles.js +1 -1
- package/es/components/markdown_editor/markdown_format.styles.js +1 -1
- package/es/components/pagination/pagination_button.js +7 -0
- package/es/components/pagination/pagination_button.styles.js +1 -1
- package/es/components/text/text_color.styles.js +1 -1
- package/es/components/token/token.styles.js +1 -1
- package/es/components/tool_tip/tool_tip.styles.js +1 -1
- package/es/global_styling/mixins/_button.js +7 -2
- package/eui.d.ts +180 -48
- package/lib/components/badge/beta_badge/beta_badge.styles.js +1 -1
- package/lib/components/badge/color_utils.js +1 -1
- package/lib/components/badge/notification_badge/badge_notification.styles.js +1 -1
- package/lib/components/button/button_display/_button_display.js +1 -0
- package/lib/components/button/button_display/_button_display.styles.js +2 -2
- package/lib/components/button/button_display/_button_display_content.js +6 -1
- package/lib/components/button/button_display/_button_display_content.styles.js +6 -1
- package/lib/components/button/button_empty/button_empty.js +2 -1
- package/lib/components/button/button_empty/button_empty.styles.js +2 -2
- package/lib/components/button/button_group/button_group.js +5 -28
- package/lib/components/button/button_group/button_group_button.js +4 -27
- package/lib/components/code/code_block_annotations.js +1 -1
- package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +1 -1
- package/lib/components/color_picker/color_picker.js +2 -1
- package/lib/components/color_picker/color_picker.styles.js +1 -1
- package/lib/components/color_picker/hue.styles.js +2 -2
- package/lib/components/color_picker/saturation.styles.js +2 -2
- package/lib/components/date_picker/auto_refresh/auto_refresh.js +8 -8
- package/lib/components/date_picker/date_picker_range.js +12 -2
- package/lib/components/date_picker/date_picker_range.styles.js +1 -1
- package/lib/components/date_picker/super_date_picker/date_popover/date_popover_button.styles.js +8 -3
- package/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +9 -23
- package/lib/components/date_picker/super_date_picker/super_date_picker.js +3 -1
- package/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +7 -13
- package/lib/components/filter_group/filter_button.styles.js +1 -1
- package/lib/components/flyout/flyout_body.js +10 -3
- package/lib/components/flyout/manager/actions.js +12 -1
- package/lib/components/flyout/manager/flyout_managed.js +4 -3
- package/lib/components/flyout/manager/index.js +6 -0
- package/lib/components/flyout/manager/reducer.js +18 -0
- package/lib/components/flyout/manager/store.js +3 -0
- package/lib/components/form/field_password/field_password.js +6 -3
- package/lib/components/form/form.styles.js +19 -12
- package/lib/components/form/form_control_button/form_control_button.js +29 -6
- package/lib/components/form/form_control_button/form_control_button.styles.js +3 -0
- package/lib/components/form/form_control_layout/append_prepend/form_append_prepend.js +158 -0
- package/lib/components/form/form_control_layout/append_prepend/form_append_prepend.styles.js +34 -0
- package/lib/components/form/form_control_layout/append_prepend/index.js +18 -0
- package/lib/components/form/form_control_layout/form_control_layout.js +55 -24
- package/lib/components/form/form_control_layout/form_control_layout.styles.js +45 -26
- package/lib/components/form/form_control_layout/form_control_layout_context.js +27 -0
- package/lib/components/form/form_control_layout/form_control_layout_delimited.styles.js +4 -11
- package/lib/components/form/form_control_layout/index.js +18 -1
- package/lib/components/form/form_label/form_label.js +17 -3
- package/lib/components/form/range/range_levels.styles.js +1 -1
- package/lib/components/form/range/range_tooltip.styles.js +1 -1
- package/lib/components/header/header.styles.js +1 -1
- package/lib/components/header/header_links/header_link.js +7 -0
- package/lib/components/header/header_section/header_section_item_button.js +7 -0
- package/lib/components/icon/icon.styles.js +1 -1
- package/lib/components/image/image_caption.styles.js +1 -1
- package/lib/components/inline_edit/inline_edit_form.js +1 -1
- package/lib/components/link/link.styles.js +1 -1
- package/lib/components/list_group/list_group_item.styles.js +1 -1
- package/lib/components/markdown_editor/markdown_format.styles.js +1 -1
- package/lib/components/pagination/pagination_button.js +7 -0
- package/lib/components/pagination/pagination_button.styles.js +1 -1
- package/lib/components/text/text_color.styles.js +1 -1
- package/lib/components/token/token.styles.js +1 -1
- package/lib/components/tool_tip/tool_tip.styles.js +1 -1
- package/lib/global_styling/mixins/_button.js +8 -3
- package/optimize/es/components/badge/beta_badge/beta_badge.styles.js +1 -1
- package/optimize/es/components/badge/color_utils.js +1 -1
- package/optimize/es/components/badge/notification_badge/badge_notification.styles.js +1 -1
- package/optimize/es/components/button/button_display/_button_display.js +1 -0
- package/optimize/es/components/button/button_display/_button_display.styles.js +3 -3
- package/optimize/es/components/button/button_display/_button_display_content.js +5 -1
- package/optimize/es/components/button/button_display/_button_display_content.styles.js +6 -1
- package/optimize/es/components/button/button_empty/button_empty.js +1 -0
- package/optimize/es/components/button/button_empty/button_empty.styles.js +3 -3
- package/optimize/es/components/code/code_block_annotations.js +1 -1
- package/optimize/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +1 -1
- package/optimize/es/components/color_picker/color_picker.js +2 -1
- package/optimize/es/components/color_picker/color_picker.styles.js +1 -1
- package/optimize/es/components/color_picker/hue.styles.js +2 -2
- package/optimize/es/components/color_picker/saturation.styles.js +2 -2
- package/optimize/es/components/date_picker/auto_refresh/auto_refresh.js +8 -8
- package/optimize/es/components/date_picker/date_picker_range.js +8 -2
- package/optimize/es/components/date_picker/date_picker_range.styles.js +1 -1
- package/optimize/es/components/date_picker/super_date_picker/date_popover/date_popover_button.styles.js +6 -1
- package/optimize/es/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +9 -21
- package/optimize/es/components/date_picker/super_date_picker/super_date_picker.js +3 -1
- package/optimize/es/components/date_picker/super_date_picker/super_date_picker.styles.js +7 -13
- package/optimize/es/components/filter_group/filter_button.styles.js +1 -1
- package/optimize/es/components/flyout/flyout_body.js +5 -2
- package/optimize/es/components/flyout/manager/actions.js +11 -0
- package/optimize/es/components/flyout/manager/flyout_managed.js +4 -3
- package/optimize/es/components/flyout/manager/index.js +1 -1
- package/optimize/es/components/flyout/manager/reducer.js +19 -1
- package/optimize/es/components/flyout/manager/store.js +4 -1
- package/optimize/es/components/form/field_password/field_password.js +6 -3
- package/optimize/es/components/form/form.styles.js +18 -11
- package/optimize/es/components/form/form_control_button/form_control_button.js +23 -7
- package/optimize/es/components/form/form_control_button/form_control_button.styles.js +5 -2
- package/optimize/es/components/form/form_control_layout/append_prepend/form_append_prepend.js +102 -0
- package/optimize/es/components/form/form_control_layout/append_prepend/form_append_prepend.styles.js +28 -0
- package/optimize/es/components/form/form_control_layout/append_prepend/index.js +9 -0
- package/optimize/es/components/form/form_control_layout/form_control_layout.js +52 -23
- package/optimize/es/components/form/form_control_layout/form_control_layout.styles.js +46 -27
- package/optimize/es/components/form/form_control_layout/form_control_layout_context.js +21 -0
- package/optimize/es/components/form/form_control_layout/form_control_layout_delimited.styles.js +5 -12
- package/optimize/es/components/form/form_control_layout/index.js +2 -1
- package/optimize/es/components/form/form_label/form_label.js +9 -2
- package/optimize/es/components/form/range/range_levels.styles.js +1 -1
- package/optimize/es/components/form/range/range_tooltip.styles.js +1 -1
- package/optimize/es/components/header/header.styles.js +1 -1
- package/optimize/es/components/icon/icon.styles.js +1 -1
- package/optimize/es/components/image/image_caption.styles.js +1 -1
- package/optimize/es/components/link/link.styles.js +1 -1
- package/optimize/es/components/list_group/list_group_item.styles.js +1 -1
- package/optimize/es/components/markdown_editor/markdown_format.styles.js +1 -1
- package/optimize/es/components/pagination/pagination_button.styles.js +1 -1
- package/optimize/es/components/text/text_color.styles.js +1 -1
- package/optimize/es/components/token/token.styles.js +1 -1
- package/optimize/es/components/tool_tip/tool_tip.styles.js +1 -1
- package/optimize/es/global_styling/mixins/_button.js +7 -2
- package/optimize/lib/components/badge/beta_badge/beta_badge.styles.js +1 -1
- package/optimize/lib/components/badge/color_utils.js +1 -1
- package/optimize/lib/components/badge/notification_badge/badge_notification.styles.js +1 -1
- package/optimize/lib/components/button/button_display/_button_display.js +1 -0
- package/optimize/lib/components/button/button_display/_button_display.styles.js +2 -2
- package/optimize/lib/components/button/button_display/_button_display_content.js +5 -1
- package/optimize/lib/components/button/button_display/_button_display_content.styles.js +6 -1
- package/optimize/lib/components/button/button_empty/button_empty.js +1 -0
- package/optimize/lib/components/button/button_empty/button_empty.styles.js +2 -2
- package/optimize/lib/components/code/code_block_annotations.js +1 -1
- package/optimize/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +1 -1
- package/optimize/lib/components/color_picker/color_picker.js +2 -1
- package/optimize/lib/components/color_picker/color_picker.styles.js +1 -1
- package/optimize/lib/components/color_picker/hue.styles.js +2 -2
- package/optimize/lib/components/color_picker/saturation.styles.js +2 -2
- package/optimize/lib/components/date_picker/auto_refresh/auto_refresh.js +7 -7
- package/optimize/lib/components/date_picker/date_picker_range.js +8 -2
- package/optimize/lib/components/date_picker/date_picker_range.styles.js +1 -1
- package/optimize/lib/components/date_picker/super_date_picker/date_popover/date_popover_button.styles.js +8 -3
- package/optimize/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +9 -21
- package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.js +3 -1
- package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +7 -13
- package/optimize/lib/components/filter_group/filter_button.styles.js +1 -1
- package/optimize/lib/components/flyout/flyout_body.js +5 -2
- package/optimize/lib/components/flyout/manager/actions.js +12 -1
- package/optimize/lib/components/flyout/manager/flyout_managed.js +4 -3
- package/optimize/lib/components/flyout/manager/index.js +6 -0
- package/optimize/lib/components/flyout/manager/reducer.js +18 -0
- package/optimize/lib/components/flyout/manager/store.js +3 -0
- package/optimize/lib/components/form/field_password/field_password.js +6 -3
- package/optimize/lib/components/form/form.styles.js +19 -12
- package/optimize/lib/components/form/form_control_button/form_control_button.js +22 -6
- package/optimize/lib/components/form/form_control_button/form_control_button.styles.js +3 -0
- package/optimize/lib/components/form/form_control_layout/append_prepend/form_append_prepend.js +111 -0
- package/optimize/lib/components/form/form_control_layout/append_prepend/form_append_prepend.styles.js +34 -0
- package/optimize/lib/components/form/form_control_layout/append_prepend/index.js +18 -0
- package/optimize/lib/components/form/form_control_layout/form_control_layout.js +52 -23
- package/optimize/lib/components/form/form_control_layout/form_control_layout.styles.js +45 -26
- package/optimize/lib/components/form/form_control_layout/form_control_layout_context.js +27 -0
- package/optimize/lib/components/form/form_control_layout/form_control_layout_delimited.styles.js +4 -11
- package/optimize/lib/components/form/form_control_layout/index.js +18 -1
- package/optimize/lib/components/form/form_label/form_label.js +9 -2
- package/optimize/lib/components/form/range/range_levels.styles.js +1 -1
- package/optimize/lib/components/form/range/range_tooltip.styles.js +1 -1
- package/optimize/lib/components/header/header.styles.js +1 -1
- package/optimize/lib/components/icon/icon.styles.js +1 -1
- package/optimize/lib/components/image/image_caption.styles.js +1 -1
- package/optimize/lib/components/link/link.styles.js +1 -1
- package/optimize/lib/components/list_group/list_group_item.styles.js +1 -1
- package/optimize/lib/components/markdown_editor/markdown_format.styles.js +1 -1
- package/optimize/lib/components/pagination/pagination_button.styles.js +1 -1
- package/optimize/lib/components/text/text_color.styles.js +1 -1
- package/optimize/lib/components/token/token.styles.js +1 -1
- package/optimize/lib/components/tool_tip/tool_tip.styles.js +1 -1
- package/optimize/lib/global_styling/mixins/_button.js +8 -3
- package/package.json +4 -4
- package/test-env/components/badge/beta_badge/beta_badge.styles.js +1 -1
- package/test-env/components/badge/color_utils.js +1 -1
- package/test-env/components/badge/notification_badge/badge_notification.styles.js +1 -1
- package/test-env/components/button/button_display/_button_display.js +1 -0
- package/test-env/components/button/button_display/_button_display.styles.js +2 -2
- package/test-env/components/button/button_display/_button_display_content.js +6 -1
- package/test-env/components/button/button_display/_button_display_content.styles.js +6 -1
- package/test-env/components/button/button_empty/button_empty.js +2 -1
- package/test-env/components/button/button_empty/button_empty.styles.js +2 -2
- package/test-env/components/button/button_group/button_group.js +5 -28
- package/test-env/components/button/button_group/button_group_button.js +4 -27
- package/test-env/components/code/code_block_annotations.js +1 -1
- package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +1 -1
- package/test-env/components/color_picker/color_picker.js +2 -1
- package/test-env/components/color_picker/color_picker.styles.js +1 -1
- package/test-env/components/color_picker/hue.styles.js +2 -2
- package/test-env/components/color_picker/saturation.styles.js +2 -2
- package/test-env/components/date_picker/auto_refresh/auto_refresh.js +8 -8
- package/test-env/components/date_picker/date_picker_range.js +12 -2
- package/test-env/components/date_picker/date_picker_range.styles.js +1 -1
- package/test-env/components/date_picker/super_date_picker/date_popover/date_popover_button.styles.js +8 -3
- package/test-env/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +9 -21
- package/test-env/components/date_picker/super_date_picker/super_date_picker.js +3 -1
- package/test-env/components/date_picker/super_date_picker/super_date_picker.styles.js +7 -13
- package/test-env/components/filter_group/filter_button.styles.js +1 -1
- package/test-env/components/flyout/flyout_body.js +10 -3
- package/test-env/components/flyout/manager/actions.js +12 -1
- package/test-env/components/flyout/manager/flyout_managed.js +4 -3
- package/test-env/components/flyout/manager/index.js +6 -0
- package/test-env/components/flyout/manager/reducer.js +18 -0
- package/test-env/components/flyout/manager/store.js +3 -0
- package/test-env/components/form/field_password/field_password.js +6 -3
- package/test-env/components/form/form.styles.js +19 -12
- package/test-env/components/form/form_control_button/form_control_button.js +29 -6
- package/test-env/components/form/form_control_button/form_control_button.styles.js +3 -0
- package/test-env/components/form/form_control_layout/append_prepend/form_append_prepend.js +157 -0
- package/test-env/components/form/form_control_layout/append_prepend/form_append_prepend.styles.js +34 -0
- package/test-env/components/form/form_control_layout/append_prepend/index.js +18 -0
- package/test-env/components/form/form_control_layout/form_control_layout.js +55 -24
- package/test-env/components/form/form_control_layout/form_control_layout.styles.js +45 -26
- package/test-env/components/form/form_control_layout/form_control_layout_context.js +27 -0
- package/test-env/components/form/form_control_layout/form_control_layout_delimited.styles.js +4 -11
- package/test-env/components/form/form_control_layout/index.js +18 -1
- package/test-env/components/form/form_label/form_label.js +17 -3
- package/test-env/components/form/range/range_levels.styles.js +1 -1
- package/test-env/components/form/range/range_tooltip.styles.js +1 -1
- package/test-env/components/header/header.styles.js +1 -1
- package/test-env/components/header/header_links/header_link.js +7 -0
- package/test-env/components/header/header_section/header_section_item_button.js +7 -0
- package/test-env/components/icon/icon.styles.js +1 -1
- package/test-env/components/image/image_caption.styles.js +1 -1
- package/test-env/components/inline_edit/inline_edit_form.js +1 -1
- package/test-env/components/link/link.styles.js +1 -1
- package/test-env/components/list_group/list_group_item.styles.js +1 -1
- package/test-env/components/markdown_editor/markdown_format.styles.js +1 -1
- package/test-env/components/pagination/pagination_button.js +7 -0
- package/test-env/components/pagination/pagination_button.styles.js +1 -1
- package/test-env/components/text/text_color.styles.js +1 -1
- package/test-env/components/token/token.styles.js +1 -1
- package/test-env/components/tool_tip/tool_tip.styles.js +1 -1
- package/test-env/global_styling/mixins/_button.js +8 -3
|
@@ -8,15 +8,18 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { css } from '@emotion/react';
|
|
11
|
-
import { euiTextTruncate, logicalCSS } from '../../../global_styling';
|
|
12
|
-
import {
|
|
13
|
-
|
|
11
|
+
import { euiButtonSizeMap, euiDisabledSelector, euiTextTruncate, highContrastModeStyles, logicalCSS, mathWithUnits } from '../../../global_styling';
|
|
12
|
+
import { euiFormControlFocusStyles, euiFormVariables } from '../form.styles';
|
|
13
|
+
export var buttonSelector = '*:is(.euiButton, .euiButtonEmpty, .euiButtonIcon, .euiFormAppend, .euiFormPrepend)';
|
|
14
|
+
var emptyButtonSelector = '*:is(.euiButtonEmpty, .euiButtonIcon:not([class*="fill"]))';
|
|
15
|
+
export var textSelector = '*:is(.euiFormLabel, .euiText)';
|
|
16
|
+
export var appendPrependSelector = '*:is(.euiFormAppend, .euiFormPrepend)';
|
|
14
17
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
15
|
-
name: "
|
|
16
|
-
styles: "position:relative;label:euiFormControlLayout__childrenWrapper;"
|
|
18
|
+
name: "1iumk9q-euiFormControlLayout__childrenWrapper",
|
|
19
|
+
styles: "position:relative;border-radius:inherit;label:euiFormControlLayout__childrenWrapper;"
|
|
17
20
|
} : {
|
|
18
|
-
name: "
|
|
19
|
-
styles: "position:relative;label:euiFormControlLayout__childrenWrapper;",
|
|
21
|
+
name: "1iumk9q-euiFormControlLayout__childrenWrapper",
|
|
22
|
+
styles: "position:relative;border-radius:inherit;label:euiFormControlLayout__childrenWrapper;",
|
|
20
23
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
21
24
|
};
|
|
22
25
|
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
@@ -28,7 +31,8 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
28
31
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
29
32
|
};
|
|
30
33
|
export var euiFormControlLayoutStyles = function euiFormControlLayoutStyles(euiThemeContext) {
|
|
31
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
34
|
+
var euiTheme = euiThemeContext.euiTheme,
|
|
35
|
+
highContrastMode = euiThemeContext.highContrastMode;
|
|
32
36
|
var form = euiFormVariables(euiThemeContext);
|
|
33
37
|
return {
|
|
34
38
|
euiFormControlLayout: _ref2,
|
|
@@ -39,37 +43,52 @@ export var euiFormControlLayoutStyles = function euiFormControlLayoutStyles(euiT
|
|
|
39
43
|
formWidth: "\n ".concat(logicalCSS('max-width', form.maxWidth), "\n ").concat(logicalCSS('width', '100%'), "\n "),
|
|
40
44
|
fullWidth: /*#__PURE__*/css(logicalCSS('max-width', '100%'), " ", logicalCSS('width', '100%'), ";;label:fullWidth;"),
|
|
41
45
|
group: {
|
|
42
|
-
group: /*#__PURE__*/css("position:relative;display:flex;align-items:stretch;border:none;background-color:", form.backgroundColor, ";overflow:hidden;&::after{content:'';position:absolute;inset:0;z-index:0;border:", euiTheme.border.width.thin, " solid ", form.borderColor, ";border-radius:inherit;pointer-events:none;}.euiFilterGroup{border-radius:0;", logicalCSS('padding-right', euiTheme.border.width.thin), " &::after{display:none;}}.euiFilterButton__wrapper:first-of-type::before,.euiFilterButton__wrapper::after{display:none;}
|
|
46
|
+
group: /*#__PURE__*/css("position:relative;display:flex;align-items:stretch;border:none;background-color:", form.backgroundColor, ";overflow:hidden;&::after{content:'';position:absolute;inset:0;z-index:0;border:", euiTheme.border.width.thin, " solid ", form.borderColor, ";border-radius:inherit;pointer-events:none;}&:where(:not(:has(*:is(", euiDisabledSelector, "), [readOnly])):hover){&::after{border:", highContrastMode ? euiTheme.border.width.thick : euiTheme.border.width.thin, " solid ", highContrastMode ? form.borderColor : form.borderHovered, ";}}&:has(:autofill){background:", form.backgroundAutoFilled, ";&:not(:hover)::after{border-color:", form.borderAutofilled, ";}*:-webkit-autofill,*:autofill{--euiFormControlStateAutofillColor:", form.backgroundAutoFilled, ";background-clip:content-box;&:hover,&:focus{--euiFormControlStateAutofillColor:", form.backgroundAutoFilled, ";}}}.euiFilterGroup{border-radius:0;", logicalCSS('padding-right', euiTheme.border.width.thin), " &::after{display:none;}}.euiFilterButton__wrapper:first-of-type::before,.euiFilterButton__wrapper::after{display:none;}>*{", logicalCSS('height', '100%'), ";};label:group;"),
|
|
43
47
|
// Skipping css`` to avoid repeated compressed/uncompressed classNames
|
|
44
48
|
uncompressed: "\n border-radius: ".concat(form.controlBorderRadius, ";\n "),
|
|
45
49
|
compressed: "\n border-radius: ".concat(form.controlCompressedBorderRadius, ";\n ")
|
|
46
50
|
},
|
|
47
51
|
children: {
|
|
48
52
|
euiFormControlLayout__childrenWrapper: _ref,
|
|
49
|
-
inGroup: /*#__PURE__*/css("flex-grow:1;overflow:hidden
|
|
50
|
-
|
|
51
|
-
|
|
53
|
+
inGroup: /*#__PURE__*/css("flex-grow:1;overflow:hidden;--euiFormControlStateColor:transparent;--euiFormControlStateHoverColor:transparent;.euiFormControlButton{box-shadow:none;", highContrastModeStyles(euiThemeContext, {
|
|
54
|
+
none: 'box-shadow: none;',
|
|
55
|
+
preferred: 'border: none;'
|
|
56
|
+
}), ";};label:inGroup;")
|
|
52
57
|
}
|
|
53
58
|
};
|
|
54
59
|
};
|
|
55
60
|
export var euiFormControlLayoutSideNodeStyles = function euiFormControlLayoutSideNodeStyles(euiThemeContext) {
|
|
56
61
|
var euiTheme = euiThemeContext.euiTheme;
|
|
57
62
|
var form = euiFormVariables(euiThemeContext);
|
|
58
|
-
var
|
|
59
|
-
var
|
|
60
|
-
|
|
61
|
-
|
|
63
|
+
var buttonSizes = euiButtonSizeMap(euiThemeContext);
|
|
64
|
+
var uncompressedHeight = mathWithUnits([form.controlHeight, euiTheme.size.s], function (x, y) {
|
|
65
|
+
return x - y;
|
|
66
|
+
});
|
|
67
|
+
var compressedHeight = mathWithUnits([form.controlCompressedHeight, euiTheme.size.s], function (x, y) {
|
|
68
|
+
return x - y;
|
|
69
|
+
});
|
|
70
|
+
var buttons = buttonSelector;
|
|
71
|
+
var text = textSelector;
|
|
72
|
+
var appendPrepend = appendPrependSelector;
|
|
73
|
+
var _buttonPadding = function _buttonPadding(size) {
|
|
74
|
+
return logicalCSS('padding-horizontal', buttonSizes[size].padding);
|
|
75
|
+
};
|
|
76
|
+
var dividerStyles = function dividerStyles(side, compressed) {
|
|
77
|
+
return "\n position: relative;\n ".concat("margin-inline-".concat(side), ": -", euiTheme.border.width.thin, ";\n\n &::before {\n content: '';\n position: absolute;\n inset-inline-").concat(side, ": 0;\n z-index: ").concat(side === 'end' ? 1 : 0, ";\n block-size: ").concat(compressed ? euiTheme.size.base : euiTheme.size.l, ";\n inline-size: ").concat(euiTheme.border.width.thin, ";\n pointer-events: none;\n border-inline-").concat(side, ": \n ").concat(euiTheme.border.width.thin, " solid ").concat(form.borderColor, ";\n }\n ");
|
|
78
|
+
};
|
|
62
79
|
return {
|
|
63
|
-
euiFormControlLayout__side: /*#__PURE__*/css(logicalCSS('height', '100%'), " ", euiTextTruncate('50%'), " flex-shrink:0;display:flex;align-items:center;gap:", euiTheme.size.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
80
|
+
euiFormControlLayout__side: /*#__PURE__*/css(logicalCSS('height', '100%'), " ", euiTextTruncate('50%'), " flex-shrink:0;display:flex;align-items:center;gap:", euiTheme.size.s, ";padding:", euiTheme.size.xs, ";", buttons, "{block-size:100%;border-radius:", form.controlLayoutInnerBorderRadius, ";transform:none!important;&:focus-visible{z-index:1;outline-offset:", euiTheme.focus.width, ";}}", text, "{cursor:default;overflow:hidden;text-overflow:ellipsis;}&:where(:has(", buttons, ":focus-visible):has(> *:only-child)){*:not(", appendPrepend, "){outline:none;}&::after{", euiFormControlFocusStyles(euiThemeContext), " content:'';position:absolute;inset:0;border-radius:", form.controlLayoutBorderRadius, ";pointer-events:none;}}:where(:not(:has(:disabled))) label{color:", form.labelColor, ";};label:euiFormControlLayout__side;"),
|
|
81
|
+
uncompressed: {
|
|
82
|
+
uncompressed: "\n &:not(:has(> ".concat(buttons, ":first-child, > *:first-child ").concat(buttons, ")) {\n ").concat(logicalCSS('padding-left', euiTheme.size.s), "\n }\n\n &:not(:has(> ").concat(buttons, ":last-child, > *:last-child ").concat(buttons, ")) {\n ").concat(logicalCSS('padding-right', euiTheme.size.s), "\n }\n\n ").concat(text, " {\n line-height: ").concat(uncompressedHeight, ";\n\n &:first-child {\n ").concat(logicalCSS('padding-left', euiTheme.size.xs), "\n }\n\n &:last-child {\n ").concat(logicalCSS('padding-right', euiTheme.size.xs), "\n }\n }\n\n ").concat(buttons, " {\n ").concat(logicalCSS('height', uncompressedHeight), "\n ").concat(_buttonPadding('s'), "\n }\n\n .euiButtonIcon {\n flex-shrink: 0;\n ").concat(logicalCSS('width', uncompressedHeight), "\n }\n "),
|
|
83
|
+
append: "\n ".concat(dividerStyles('start'), "\n "),
|
|
84
|
+
prepend: "\n ".concat(dividerStyles('end'), "\n ")
|
|
85
|
+
},
|
|
86
|
+
compressed: {
|
|
87
|
+
compressed: /*#__PURE__*/css("&:not(:has(", appendPrepend, ")):not(\n :has(> ", buttons, ":first-child, > *:first-child ", buttons, ")\n ){", logicalCSS('padding-left', euiTheme.size.s), ";}&:not(:has(", appendPrepend, ")):not(\n :has(> ", buttons, ":last-child, > *:last-child ", buttons, ")\n ){", logicalCSS('padding-right', euiTheme.size.s), ";}", text, "{line-height:", compressedHeight, ";&:first-child{", logicalCSS('padding-left', euiTheme.size.xxs), ";}&:last-child{", logicalCSS('padding-right', euiTheme.size.xxs), ";}}", buttons, "{", logicalCSS('height', compressedHeight), " &:where(:not(.euiButtonIcon)){", _buttonPadding('xs'), ";}}.euiButtonIcon{flex-shrink:0;", logicalCSS('width', compressedHeight), ";};label:compressed;"),
|
|
88
|
+
append: "\n ".concat(dividerStyles('start', true), "\n "),
|
|
89
|
+
prepend: "\n ".concat(dividerStyles('end', true), "\n ")
|
|
90
|
+
},
|
|
91
|
+
disabled: /*#__PURE__*/css("background-color:", form.backgroundDisabledColor, ";&:where(:not(:has(", appendPrepend, ", ", buttonSelector, ")))>*,&:where(:not(:has(", appendPrepend, "))) .euiFormLabel{color:", form.textColorDisabled, ";}", emptyButtonSelector, ":not(\n ", euiDisabledSelector, "\n ){background-color:", form.backgroundColor, ";};label:disabled;"),
|
|
92
|
+
readOnly: /*#__PURE__*/css("background-color:", form.backgroundDisabledColor, ";", emptyButtonSelector, ":not(\n ", euiDisabledSelector, "\n ){background-color:", form.backgroundColor, ";};label:readOnly;")
|
|
74
93
|
};
|
|
75
94
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { createContext } from 'react';
|
|
10
|
+
/**
|
|
11
|
+
* Context to share props between `EuiFormControlLayout` and passed children like e.g. EuiFormAppend/Prepend
|
|
12
|
+
*/
|
|
13
|
+
export var EuiFormControlLayoutContext = /*#__PURE__*/createContext({
|
|
14
|
+
compressed: false,
|
|
15
|
+
inputId: '',
|
|
16
|
+
isDisabled: false,
|
|
17
|
+
isInvalid: false,
|
|
18
|
+
isLoading: false,
|
|
19
|
+
readOnly: false
|
|
20
|
+
});
|
|
21
|
+
export var EuiFormControlLayoutContextProvider = EuiFormControlLayoutContext.Provider;
|
package/optimize/es/components/form/form_control_layout/form_control_layout_delimited.styles.js
CHANGED
|
@@ -8,14 +8,10 @@
|
|
|
8
8
|
|
|
9
9
|
import { css } from '@emotion/react';
|
|
10
10
|
import { logicalCSS, mathWithUnits } from '../../../global_styling';
|
|
11
|
-
import { euiFormControlDisabledStyles, euiFormControlReadOnlyStyles, euiFormControlDefaultShadow, euiFormControlInvalidStyles, euiFormControlHoverStyles
|
|
11
|
+
import { euiFormControlDisabledStyles, euiFormControlReadOnlyStyles, euiFormControlDefaultShadow, euiFormControlInvalidStyles, euiFormControlHoverStyles } from '../form.styles';
|
|
12
12
|
export var euiFormControlLayoutDelimitedStyles = function euiFormControlLayoutDelimitedStyles(euiThemeContext) {
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var delimitedStyles = "\n /* Transition smoothly between disabled/readOnly background color changes */\n ".concat(euiFormControlDefaultShadow(euiThemeContext, {
|
|
16
|
-
withBorder: !highContrastMode ? true : false,
|
|
17
|
-
withBackground: false
|
|
18
|
-
}), "\n ").trim();
|
|
13
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
14
|
+
var delimitedStyles = "\n border-radius: ".concat(euiTheme.border.radius.small, ";\n ").trim();
|
|
19
15
|
return {
|
|
20
16
|
// Appended onto existing `euiFormControlLayout` styles
|
|
21
17
|
delimited: /*#__PURE__*/css(delimitedStyles, ";label:delimited;"),
|
|
@@ -23,14 +19,11 @@ export var euiFormControlLayoutDelimitedStyles = function euiFormControlLayoutDe
|
|
|
23
19
|
readOnly: /*#__PURE__*/css(euiFormControlReadOnlyStyles(euiThemeContext), " & .euiFormControlLayoutDelimited__input{--euiFormControlStateColor:transparent;outline:none;box-shadow:none;};label:readOnly;"),
|
|
24
20
|
// Appended onto existing `euiFormControlLayout__childrenWrapper` styles
|
|
25
21
|
childrenWrapper: {
|
|
26
|
-
delimited: /*#__PURE__*/css("display:flex
|
|
27
|
-
withBorder: !highContrastMode,
|
|
28
|
-
withBackground: false
|
|
29
|
-
}), " &:hover{", euiFormControlHoverStyles(euiThemeContext), " box-shadow:none;.euiFormControlLayoutDelimited__input:not(:focus){outline:none;background-color:transparent;}}>:first-child{", logicalCSS('border-top-left-radius', 'inherit'), " ", logicalCSS('border-bottom-left-radius', 'inherit'), ";}>:last-child{", logicalCSS('border-top-right-radius', 'inherit'), " ", logicalCSS('border-bottom-right-radius', 'inherit'), ";};label:delimited;"),
|
|
22
|
+
delimited: /*#__PURE__*/css("display:flex;&:hover{", euiFormControlHoverStyles(euiThemeContext), " box-shadow:none;.euiFormControlLayoutDelimited__input:not(:focus){outline:none;background-color:transparent;}};label:delimited;"),
|
|
30
23
|
invalid: /*#__PURE__*/css(euiFormControlDefaultShadow(euiThemeContext, {
|
|
31
24
|
withBorder: false,
|
|
32
25
|
withBackgroundColor: false
|
|
33
|
-
}), "\n :not(.euiFormControlLayoutDelimited__input, .euiFormControlLayoutDelimited__delimiter) {\n ".concat(euiFormControlInvalidStyles(euiThemeContext), "\n }\n\n
|
|
26
|
+
}), "\n :not(.euiFormControlLayoutDelimited__input, .euiFormControlLayoutDelimited__delimiter) {\n ".concat(euiFormControlInvalidStyles(euiThemeContext), "\n }\n\n &:focus-within {\n --euiFormControlStateColor: transparent;\n --euiFormControlStateHoverColor: transparent;\n }\n\n .euiFormControlLayoutDelimited__input {\n background-color: transparent;\n }\n "), ";label:invalid;"),
|
|
34
27
|
readOnly: /*#__PURE__*/css(";label:readOnly;")
|
|
35
28
|
}
|
|
36
29
|
};
|
|
@@ -8,4 +8,5 @@
|
|
|
8
8
|
|
|
9
9
|
export { EuiFormControlLayout } from './form_control_layout';
|
|
10
10
|
export { EuiFormControlLayoutDelimited } from './form_control_layout_delimited';
|
|
11
|
-
export { EuiFormControlLayoutIcons } from './form_control_layout_icons';
|
|
11
|
+
export { EuiFormControlLayoutIcons } from './form_control_layout_icons';
|
|
12
|
+
export * from './append_prepend';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["type", "isFocused", "isInvalid", "isDisabled", "children", "className"];
|
|
3
|
+
var _excluded = ["type", "isFocused", "isInvalid", "isDisabled", "children", "className", "htmlFor"];
|
|
4
4
|
/*
|
|
5
5
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
6
6
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -22,6 +22,7 @@ export var EuiFormLabel = function EuiFormLabel(_ref) {
|
|
|
22
22
|
isDisabled = _ref.isDisabled,
|
|
23
23
|
children = _ref.children,
|
|
24
24
|
className = _ref.className,
|
|
25
|
+
htmlFor = _ref.htmlFor,
|
|
25
26
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
26
27
|
var styles = useEuiMemoizedStyles(euiFormLabelStyles);
|
|
27
28
|
var cssStyles = [styles.euiFormLabel, !isDisabled && styles.notDisabled, isInvalid && styles.invalid];
|
|
@@ -35,10 +36,16 @@ export var EuiFormLabel = function EuiFormLabel(_ref) {
|
|
|
35
36
|
css: cssStyles,
|
|
36
37
|
className: classes
|
|
37
38
|
}, rest), children);
|
|
39
|
+
} else if (type === 'span' || !htmlFor) {
|
|
40
|
+
return ___EmotionJSX("span", _extends({
|
|
41
|
+
css: cssStyles,
|
|
42
|
+
className: classes
|
|
43
|
+
}, rest), children);
|
|
38
44
|
} else {
|
|
39
45
|
return ___EmotionJSX("label", _extends({
|
|
40
46
|
css: cssStyles,
|
|
41
|
-
className: classes
|
|
47
|
+
className: classes,
|
|
48
|
+
htmlFor: htmlFor
|
|
42
49
|
}, rest), children);
|
|
43
50
|
}
|
|
44
51
|
};
|
|
@@ -16,7 +16,7 @@ export var euiRangeLevelsStyles = function euiRangeLevelsStyles(euiThemeContext)
|
|
|
16
16
|
colorMode = euiThemeContext.colorMode;
|
|
17
17
|
var range = euiRangeVariables(euiThemeContext);
|
|
18
18
|
var isColorDark = colorMode === 'DARK';
|
|
19
|
-
var stripeColor = isColorDark ? euiTheme.colors.
|
|
19
|
+
var stripeColor = isColorDark ? euiTheme.colors.plainDark : euiTheme.colors.plainLight;
|
|
20
20
|
var stripesBackground = "repeating-linear-gradient(\n -45deg,\n ".concat(transparentize(stripeColor, 0.5), ",\n ").concat(transparentize(stripeColor, 0.5), " 25%,\n ").concat(transparentize(stripeColor, 0.7), " 25%,\n ").concat(transparentize(stripeColor, 0.7), " 50%,\n ").concat(transparentize(stripeColor, 0.5), " 50%\n )");
|
|
21
21
|
return {
|
|
22
22
|
euiRangeLevels: /*#__PURE__*/css("display:flex;justify-content:stretch;position:absolute;inset-inline:0;inset-block-start:", range.trackTopPositionWithoutTicks, ";z-index:", range.levelsZIndex, ";", preventForcedColors(euiThemeContext), ";;label:euiRangeLevels;"),
|
|
@@ -32,7 +32,7 @@ export var euiRangeTooltipValueStyles = function euiRangeTooltipValueStyles(euiT
|
|
|
32
32
|
return {
|
|
33
33
|
euiRangeTooltip__value: /*#__PURE__*/css("position:absolute;inset-block-start:50%;max-inline-size:", mathWithUnits(euiTheme.size.base, function (x) {
|
|
34
34
|
return x * 16;
|
|
35
|
-
}), ";padding-block:", euiTheme.size.xxs, ";padding-inline:", euiTheme.size.s, ";transform:translateY(-50%);", euiFontSize(euiThemeContext, 's'), " color:", euiTheme.colors.
|
|
35
|
+
}), ";padding-block:", euiTheme.size.xxs, ";padding-inline:", euiTheme.size.s, ";transform:translateY(-50%);", euiFontSize(euiThemeContext, 's'), " color:", euiTheme.colors.textGhost, ";background-color:", toolTipBackgroundColor, ";border:", euiTheme.border.width.thin, " solid ", borderColor, ";border-radius:", euiTheme.border.radius.small, ";&::before{content:'';", arrowStyles._arrowStyles, " inset-block-start:50%;margin-block-start:", mathWithUnits(arrowSize, function (x) {
|
|
36
36
|
return x / -2;
|
|
37
37
|
}), ";background-color:inherit;border:inherit;};label:euiRangeTooltip__value;"),
|
|
38
38
|
left: /*#__PURE__*/css("margin-inline-end:", arrowOffset, ";&::before{", arrowStyles.positions.left, " inset-inline-start:100%;};label:left;"),
|
|
@@ -49,5 +49,5 @@ export var euiHeaderStyles = function euiHeaderStyles(euiThemeContext) {
|
|
|
49
49
|
var euiHeaderDarkStyles = function euiHeaderDarkStyles(euiThemeContext) {
|
|
50
50
|
var euiTheme = euiThemeContext.euiTheme;
|
|
51
51
|
var backgroundColor = euiTheme.components.headerDarkBackground;
|
|
52
|
-
return "\n background-color: ".concat(backgroundColor, ";\n\n .euiHeaderLogo__text,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n color: ").concat(euiTheme.colors.
|
|
52
|
+
return "\n background-color: ".concat(backgroundColor, ";\n\n .euiHeaderLogo__text,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n color: ").concat(euiTheme.colors.textGhost, ";\n }\n\n .euiHeaderLink-isActive {\n color: ").concat(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 ");
|
|
53
53
|
};
|
|
@@ -38,7 +38,7 @@ export var euiIconStyles = function euiIconStyles(_ref3) {
|
|
|
38
38
|
primary: /*#__PURE__*/css("color:", euiTheme.colors.textPrimary, ";;label:primary;"),
|
|
39
39
|
accent: /*#__PURE__*/css("color:", euiTheme.colors.textAccent, ";;label:accent;"),
|
|
40
40
|
accentSecondary: /*#__PURE__*/css("color:", euiTheme.colors.textAccentSecondary, ";;label:accentSecondary;"),
|
|
41
|
-
ghost: /*#__PURE__*/css("color:", euiTheme.colors.
|
|
41
|
+
ghost: /*#__PURE__*/css("color:", euiTheme.colors.textGhost, ";*[fill],.euiIcon__fillNegative{fill:currentColor!important;};label:ghost;"),
|
|
42
42
|
subdued: /*#__PURE__*/css("color:", euiTheme.colors.textSubdued, ";;label:subdued;"),
|
|
43
43
|
text: /*#__PURE__*/css("color:", euiTheme.colors.textHeading, ";*[fill],.euiIcon__fillNegative{fill:currentColor!important;};label:text;"),
|
|
44
44
|
neutral: /*#__PURE__*/css("color:", euiTheme.colors.textNeutral, ";;label:neutral;"),
|
|
@@ -14,6 +14,6 @@ export var euiImageCaptionStyles = function euiImageCaptionStyles(euiThemeContex
|
|
|
14
14
|
return {
|
|
15
15
|
// Base
|
|
16
16
|
euiImageCaption: /*#__PURE__*/css(euiFontSize(euiThemeContext, 's'), " ", logicalCSS('margin-top', euiTheme.size.xs), ";;label:euiImageCaption;"),
|
|
17
|
-
isOnOverlayMask: /*#__PURE__*/css("color:", euiTheme.colors.
|
|
17
|
+
isOnOverlayMask: /*#__PURE__*/css("color:", euiTheme.colors.textGhost, ";text-shadow:0 1px 2px ", transparentize(euiTheme.colors.plainDark, 0.6), ";[class*='euiLink']{color:", euiTheme.colors.textGhost, ";};label:isOnOverlayMask;")
|
|
18
18
|
};
|
|
19
19
|
};
|
|
@@ -33,7 +33,7 @@ export var euiLinkStyles = function euiLinkStyles(euiThemeContext) {
|
|
|
33
33
|
accent: /*#__PURE__*/css(_colorCSS(euiTheme.colors.textAccent), ";label:accent;"),
|
|
34
34
|
danger: /*#__PURE__*/css(_colorCSS(euiTheme.colors.textDanger), ";label:danger;"),
|
|
35
35
|
warning: /*#__PURE__*/css(_colorCSS(euiTheme.colors.textWarning), ";label:warning;"),
|
|
36
|
-
ghost: /*#__PURE__*/css(_colorCSS(euiTheme.colors.
|
|
36
|
+
ghost: /*#__PURE__*/css(_colorCSS(euiTheme.colors.textGhost), ";label:ghost;"),
|
|
37
37
|
text: /*#__PURE__*/css(_colorCSS(euiTheme.colors.textParagraph), ";label:text;")
|
|
38
38
|
};
|
|
39
39
|
};
|
|
@@ -61,7 +61,7 @@ export var euiListGroupItemInnerStyles = function euiListGroupItemInnerStyles(eu
|
|
|
61
61
|
primary: /*#__PURE__*/css("color:", euiButtonColor(euiThemeContext, 'primary').color, ";;label:primary;"),
|
|
62
62
|
text: /*#__PURE__*/css("color:", euiButtonColor(euiThemeContext, 'text').color, ";;label:text;"),
|
|
63
63
|
subdued: /*#__PURE__*/css("color:", euiTheme.colors.subduedText, ";;label:subdued;"),
|
|
64
|
-
ghost: /*#__PURE__*/css("color:", euiTheme.colors.
|
|
64
|
+
ghost: /*#__PURE__*/css("color:", euiTheme.colors.textGhost, ";;label:ghost;"),
|
|
65
65
|
// Variants
|
|
66
66
|
isDisabled: /*#__PURE__*/css("cursor:not-allowed;&,&:hover,&:focus{color:", euiButtonColor(euiThemeContext, 'disabled').color, ";cursor:not-allowed;background-color:transparent;text-decoration:none;};label:isDisabled;"),
|
|
67
67
|
isActive: /*#__PURE__*/css(";label:isActive;"),
|
|
@@ -63,7 +63,7 @@ export var euiMarkdownFormatStyles = function euiMarkdownFormatStyles(euiThemeCo
|
|
|
63
63
|
accentSecondary: /*#__PURE__*/css(euiMarkdownAdjustBorderColors(euiThemeContext, euiTheme.colors.accentSecondary), ";label:accentSecondary;"),
|
|
64
64
|
warning: /*#__PURE__*/css(euiMarkdownAdjustBorderColors(euiThemeContext, euiTheme.colors.warning), ";label:warning;"),
|
|
65
65
|
danger: /*#__PURE__*/css(euiMarkdownAdjustBorderColors(euiThemeContext, euiTheme.colors.danger), ";label:danger;"),
|
|
66
|
-
ghost: /*#__PURE__*/css(euiMarkdownAdjustBorderColors(euiThemeContext, euiTheme.colors.
|
|
66
|
+
ghost: /*#__PURE__*/css(euiMarkdownAdjustBorderColors(euiThemeContext, euiTheme.colors.plainLight), ";label:ghost;"),
|
|
67
67
|
inherit: /*#__PURE__*/css(euiMarkdownAdjustBorderColors(euiThemeContext, 'currentColor'), ";label:inherit;"),
|
|
68
68
|
custom: /*#__PURE__*/css(euiMarkdownAdjustBorderColors(euiThemeContext, 'currentColor'), ";label:custom;")
|
|
69
69
|
}
|
|
@@ -11,7 +11,7 @@ export var euiPaginationButtonStyles = function euiPaginationButtonStyles(euiThe
|
|
|
11
11
|
var euiTheme = euiThemeContext.euiTheme;
|
|
12
12
|
return {
|
|
13
13
|
// Base
|
|
14
|
-
euiPaginationButton: /*#__PURE__*/css("outline-offset:-", euiTheme.focus.width, "
|
|
14
|
+
euiPaginationButton: /*#__PURE__*/css("outline-offset:-", euiTheme.focus.width, ";.euiButtonEmpty__text{padding:0;};label:euiPaginationButton;"),
|
|
15
15
|
// States
|
|
16
16
|
isActive: /*#__PURE__*/css("font-weight:", euiTheme.font.weight.bold, ";color:", euiTheme.colors.primary, ";&,&:hover{cursor:default;text-decoration:underline;};label:isActive;")
|
|
17
17
|
};
|
|
@@ -27,7 +27,7 @@ export var euiTextColorStyles = function euiTextColorStyles(_ref2) {
|
|
|
27
27
|
accentSecondary: /*#__PURE__*/css("color:", euiTheme.colors.textAccentSecondary, ";;label:accentSecondary;"),
|
|
28
28
|
danger: /*#__PURE__*/css("color:", euiTheme.colors.textDanger, ";;label:danger;"),
|
|
29
29
|
warning: /*#__PURE__*/css("color:", euiTheme.colors.textWarning, ";;label:warning;"),
|
|
30
|
-
ghost: /*#__PURE__*/css("color:", euiTheme.colors.
|
|
30
|
+
ghost: /*#__PURE__*/css("color:", euiTheme.colors.textGhost, "!important;;label:ghost;"),
|
|
31
31
|
inherit: _ref,
|
|
32
32
|
customColor: /*#__PURE__*/css(";label:customColor;") // Handled by `style` tag - this is just here for a className hook
|
|
33
33
|
};
|
|
@@ -34,7 +34,7 @@ var getTokenColor = function getTokenColor(euiThemeContext, fill, color) {
|
|
|
34
34
|
};
|
|
35
35
|
var lightColor = isVizColor ? shade(getIconVisColor(euiTheme, color), 0.3) : iconColor;
|
|
36
36
|
var boxShadowColor = highContrastMode ? iconColor : isDarkMode ? shade(iconColor, 0.6) : tint(iconColor, 0.2);
|
|
37
|
-
var darkColor = isColorDark.apply(void 0, _toConsumableArray(chroma(backgroundDarkColor).rgb())) ? euiTheme.colors.
|
|
37
|
+
var darkColor = isColorDark.apply(void 0, _toConsumableArray(chroma(backgroundDarkColor).rgb())) ? euiTheme.colors.textGhost : euiTheme.colors.textInk;
|
|
38
38
|
switch (fill) {
|
|
39
39
|
case 'none':
|
|
40
40
|
return "\n // Without a background, the fill color should be the graphic color\n color: ".concat(iconColor, ";\n ");
|
|
@@ -35,7 +35,7 @@ export var euiToolTipStyles = function euiToolTipStyles(euiThemeContext) {
|
|
|
35
35
|
var arrowStyles = _popoverArrowStyles(euiThemeContext, arrowSize);
|
|
36
36
|
return {
|
|
37
37
|
// Base
|
|
38
|
-
euiToolTip: /*#__PURE__*/css(hasShadow ? euiShadow(euiThemeContext) : '', " border-radius:", euiTheme.border.radius.medium, ";background-color:", euiToolTipBackgroundColor(euiTheme), ";color:", euiTheme.colors.
|
|
38
|
+
euiToolTip: /*#__PURE__*/css(hasShadow ? euiShadow(euiThemeContext) : '', " border-radius:", euiTheme.border.radius.medium, ";background-color:", euiToolTipBackgroundColor(euiTheme), ";color:", euiTheme.colors.textGhost, ";z-index:", euiTheme.levels.toast, ";", logicalCSS('max-width', '256px'), " overflow-wrap:break-word;padding:", euiTheme.size.s, ";", euiFontSize(euiThemeContext, 's'), " position:absolute;", euiPanelBorderStyles(euiThemeContext), " [class*='euiHorizontalRule']{background-color:", euiToolTipBorderColor(euiTheme), ";};label:euiToolTip;"),
|
|
39
39
|
// Sizes
|
|
40
40
|
s: /*#__PURE__*/css(euiFontSize(euiThemeContext, 'xs'), ";;label:s;"),
|
|
41
41
|
// Positions
|
|
@@ -30,7 +30,7 @@ var getButtonVariantTokenValues = function getButtonVariantTokenValues(_ref, col
|
|
|
30
30
|
var textTokenName = getTokenName(textTokenBase, color);
|
|
31
31
|
var backgroundHoverTokenName = getTokenName(backgroundTokenBase, color, 'hover');
|
|
32
32
|
var backgroundActiveTokenName = getTokenName(backgroundTokenBase, color, 'active');
|
|
33
|
-
var highContrastForeground = ['warning', 'neutral', 'risk'].includes(color) ? euiTheme.colors.
|
|
33
|
+
var highContrastForeground = ['warning', 'neutral', 'risk'].includes(color) ? euiTheme.colors.textInk : color === 'disabled' ? euiTheme.components.buttons[textTokenName] : euiTheme.colors.textInverse;
|
|
34
34
|
var foreground = variant === 'filled' ? highContrastMode ? highContrastForeground : euiTheme.components.buttons[textTokenName] : euiTheme.components.buttons[textTokenName];
|
|
35
35
|
return {
|
|
36
36
|
color: foreground,
|
|
@@ -132,7 +132,7 @@ export var useEuiButtonColorCSS = function useEuiButtonColorCSS() {
|
|
|
132
132
|
var colorsDisplaysMap = useEuiMemoizedStyles(euiButtonDisplaysColors);
|
|
133
133
|
return colorsDisplaysMap[display];
|
|
134
134
|
};
|
|
135
|
-
var euiButtonDisplaysColors = function euiButtonDisplaysColors(euiThemeContext) {
|
|
135
|
+
export var euiButtonDisplaysColors = function euiButtonDisplaysColors(euiThemeContext) {
|
|
136
136
|
var euiTheme = euiThemeContext.euiTheme;
|
|
137
137
|
var COLORS = [].concat(_toConsumableArray(EXTENDED_BUTTON_COLORS), ['disabled']);
|
|
138
138
|
var displaysColorsMap = {};
|
|
@@ -198,18 +198,23 @@ export var euiButtonSizeMap = function euiButtonSizeMap(euiThemeContext) {
|
|
|
198
198
|
xs: {
|
|
199
199
|
minWidth: euiTheme.base * 6,
|
|
200
200
|
height: euiTheme.size.l,
|
|
201
|
+
padding: mathWithUnits(euiTheme.size.m, function (x) {
|
|
202
|
+
return x / 2;
|
|
203
|
+
}),
|
|
201
204
|
radius: euiTheme.border.radius.small,
|
|
202
205
|
fontScale: 'xs'
|
|
203
206
|
},
|
|
204
207
|
s: {
|
|
205
208
|
minWidth: euiTheme.base * 6,
|
|
206
209
|
height: euiTheme.size.xl,
|
|
210
|
+
padding: euiTheme.size.s,
|
|
207
211
|
radius: euiTheme.border.radius.small,
|
|
208
212
|
fontScale: 's'
|
|
209
213
|
},
|
|
210
214
|
m: {
|
|
211
215
|
minWidth: euiTheme.base * 7,
|
|
212
216
|
height: euiTheme.size.xxl,
|
|
217
|
+
padding: euiTheme.size.m,
|
|
213
218
|
radius: euiTheme.border.radius.small,
|
|
214
219
|
fontScale: 's'
|
|
215
220
|
}
|
|
@@ -50,7 +50,7 @@ var euiBetaBadgeStyles = exports.euiBetaBadgeStyles = function euiBetaBadgeStyle
|
|
|
50
50
|
};
|
|
51
51
|
return {
|
|
52
52
|
euiBetaBadge: /*#__PURE__*/(0, _react.css)("display:inline-block;border-radius:", euiTheme.size.l, ";border:", euiTheme.border.width.thin, " solid transparent;cursor:default;font-weight:", euiTheme.font.weight.semiBold, ";text-transform:uppercase;letter-spacing:0.05em;text-align:center;", (0, _global_styling.euiTextTruncate)(), " &:focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'outset', {
|
|
53
|
-
color: colorMode === 'DARK' ? euiTheme.colors.
|
|
53
|
+
color: colorMode === 'DARK' ? euiTheme.colors.plainLight : euiTheme.colors.plainDark
|
|
54
54
|
}), ";};label:euiBetaBadge;"),
|
|
55
55
|
// Colors
|
|
56
56
|
accent: /*#__PURE__*/(0, _react.css)(badgeColors.fill.accent, ";label:accent;"),
|
|
@@ -77,7 +77,7 @@ var getBadgeColors = exports.getBadgeColors = function getBadgeColors(euiThemeCo
|
|
|
77
77
|
};
|
|
78
78
|
var getTextColor = exports.getTextColor = function getTextColor(_ref, bgColor) {
|
|
79
79
|
var euiTheme = _ref.euiTheme;
|
|
80
|
-
var textColor = _services.isColorDark.apply(void 0, (0, _toConsumableArray2.default)((0, _chromaJs.default)(bgColor).rgb())) ? euiTheme.colors.
|
|
80
|
+
var textColor = _services.isColorDark.apply(void 0, (0, _toConsumableArray2.default)((0, _chromaJs.default)(bgColor).rgb())) ? euiTheme.colors.textGhost : euiTheme.colors.textInk;
|
|
81
81
|
return textColor;
|
|
82
82
|
};
|
|
83
83
|
var getIsValidColor = exports.getIsValidColor = function getIsValidColor(color) {
|
|
@@ -25,7 +25,7 @@ var euiNotificationBadgeStyles = exports.euiNotificationBadgeStyles = function e
|
|
|
25
25
|
return {
|
|
26
26
|
euiNotificationBadge: /*#__PURE__*/(0, _react.css)("flex-shrink:0;display:inline-flex;justify-content:center;align-items:center;vertical-align:middle;", (0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.xs), " border-radius:", borderRadius, ";", (0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
|
|
27
27
|
preferred: "\n border: ".concat(euiTheme.border.thin, ";\n overflow: hidden; /* Fix text clipping */\n ")
|
|
28
|
-
}), " cursor:default;font-size:", (0, _global_styling.euiFontSizeFromScale)('xs', euiTheme), ";font-weight:", euiTheme.font.weight.medium, ";", (0, _global_styling.euiNumberFormat)(euiThemeContext), " text-align:center;", _global_styling.euiCanAnimate, "{transition:all ", euiTheme.animation.fast, " ease-in;};label:euiNotificationBadge;"),
|
|
28
|
+
}), " cursor:default;-webkit-text-fill-color:currentColor;font-size:", (0, _global_styling.euiFontSizeFromScale)('xs', euiTheme), ";font-weight:", euiTheme.font.weight.medium, ";", (0, _global_styling.euiNumberFormat)(euiThemeContext), " text-align:center;", _global_styling.euiCanAnimate, "{transition:all ", euiTheme.animation.fast, " ease-in;};label:euiNotificationBadge;"),
|
|
29
29
|
// Sizes
|
|
30
30
|
s: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', euiTheme.size.base), " ", (0, _global_styling.logicalCSS)('min-width', euiTheme.size.base), ";;label:s;"),
|
|
31
31
|
m: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', (0, _global_styling.mathWithUnits)(euiTheme.size.xs, function (x) {
|
|
@@ -93,6 +93,7 @@ var EuiButtonDisplay = exports.EuiButtonDisplay = /*#__PURE__*/(0, _react.forwar
|
|
|
93
93
|
var styles = (0, _services.useEuiMemoizedStyles)(_button_display.euiButtonDisplayStyles);
|
|
94
94
|
var cssStyles = [styles.euiButtonDisplay, styles[size], fullWidth && styles.fullWidth, minWidth == null && [styles.defaultMinWidth.defaultMinWidth, styles.defaultMinWidth[size]], buttonIsDisabled && styles.isDisabled];
|
|
95
95
|
var innerNode = (0, _react2.jsx)(_button_display_content.EuiButtonDisplayContent, (0, _extends2.default)({
|
|
96
|
+
size: size,
|
|
96
97
|
isLoading: isLoading,
|
|
97
98
|
isDisabled: buttonIsDisabled,
|
|
98
99
|
iconType: iconType,
|
|
@@ -32,11 +32,11 @@ var euiButtonDisplayStyles = exports.euiButtonDisplayStyles = function euiButton
|
|
|
32
32
|
var sizes = (0, _mixins.euiButtonSizeMap)(euiThemeContext);
|
|
33
33
|
var _buttonSize = function _buttonSize(sizeKey) {
|
|
34
34
|
var size = sizes[sizeKey];
|
|
35
|
-
return /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', size.height), " line-height:", size.height, ";", (0, _global_styling.euiFontSize)(euiThemeContext, size.fontScale), " border-radius:", size.radius, ";");
|
|
35
|
+
return /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', size.height), " ", (0, _global_styling.logicalCSS)('padding-horizontal', size.padding), " line-height:", size.height, ";", (0, _global_styling.euiFontSize)(euiThemeContext, size.fontScale), " border-radius:", size.radius, ";");
|
|
36
36
|
};
|
|
37
37
|
return {
|
|
38
38
|
// Base
|
|
39
|
-
euiButtonDisplay: /*#__PURE__*/(0, _react.css)(euiButtonBaseCSS(), " font-weight:", euiTheme.font.weight.medium, "
|
|
39
|
+
euiButtonDisplay: /*#__PURE__*/(0, _react.css)(euiButtonBaseCSS(), " font-weight:", euiTheme.font.weight.medium, ";;label:euiButtonDisplay;"),
|
|
40
40
|
// States
|
|
41
41
|
isDisabled: _ref,
|
|
42
42
|
fullWidth: /*#__PURE__*/(0, _react.css)("display:block;", (0, _global_styling.logicalCSS)('width', '100%'), ";;label:fullWidth;"),
|
|
@@ -15,7 +15,7 @@ var _loading = require("../../loading");
|
|
|
15
15
|
var _icon = require("../../icon");
|
|
16
16
|
var _button_display_content = require("./_button_display_content.styles");
|
|
17
17
|
var _react2 = require("@emotion/react");
|
|
18
|
-
var _excluded = ["children", "textProps", "isLoading", "isDisabled", "iconType", "iconSize", "iconSide"];
|
|
18
|
+
var _excluded = ["children", "size", "textProps", "isLoading", "isDisabled", "iconType", "iconSize", "iconSide"];
|
|
19
19
|
/*
|
|
20
20
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
21
21
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -35,6 +35,8 @@ var ICON_SIDES = exports.ICON_SIDES = ['left', 'right'];
|
|
|
35
35
|
|
|
36
36
|
var EuiButtonDisplayContent = exports.EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
|
|
37
37
|
var children = _ref.children,
|
|
38
|
+
_ref$size = _ref.size,
|
|
39
|
+
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
38
40
|
textProps = _ref.textProps,
|
|
39
41
|
_ref$isLoading = _ref.isLoading,
|
|
40
42
|
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
|
|
@@ -75,9 +77,11 @@ var EuiButtonDisplayContent = exports.EuiButtonDisplayContent = function EuiButt
|
|
|
75
77
|
var isText = typeof children === 'string';
|
|
76
78
|
var doNotRenderTextWrapper = textProps === false;
|
|
77
79
|
var renderTextWrapper = (isText || textProps) && !doNotRenderTextWrapper;
|
|
80
|
+
var textWrapperCss = [styles.content[size], textProps && textProps.css];
|
|
78
81
|
return (0, _react2.jsx)("span", (0, _extends2.default)({
|
|
79
82
|
css: styles.euiButtonDisplayContent
|
|
80
83
|
}, contentProps), iconSide === 'left' && icon, renderTextWrapper ? (0, _react2.jsx)("span", (0, _extends2.default)({}, textProps, {
|
|
84
|
+
css: textWrapperCss,
|
|
81
85
|
className: (0, _classnames.default)('eui-textTruncate', textProps === null || textProps === void 0 ? void 0 : textProps.className)
|
|
82
86
|
}), children) : children, iconSide === 'right' && icon);
|
|
83
87
|
};
|
|
@@ -18,6 +18,11 @@ var euiButtonDisplayContentStyles = exports.euiButtonDisplayContentStyles = func
|
|
|
18
18
|
var euiTheme = euiThemeContext.euiTheme;
|
|
19
19
|
return {
|
|
20
20
|
// Base
|
|
21
|
-
euiButtonDisplayContent: /*#__PURE__*/(0, _react.css)("position:relative;", (0, _global_styling.logicalCSS)('height', '100%'), " ", (0, _global_styling.logicalCSS)('width', '100%'), " display:flex;justify-content:center;align-items:center;vertical-align:middle;gap:", euiTheme.size.
|
|
21
|
+
euiButtonDisplayContent: /*#__PURE__*/(0, _react.css)("position:relative;", (0, _global_styling.logicalCSS)('height', '100%'), " ", (0, _global_styling.logicalCSS)('width', '100%'), " display:flex;justify-content:center;align-items:center;vertical-align:middle;gap:", euiTheme.size.xs, ";;label:euiButtonDisplayContent;"),
|
|
22
|
+
content: {
|
|
23
|
+
xs: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.xxs), ";;label:xs;"),
|
|
24
|
+
s: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.xs), ";;label:s;"),
|
|
25
|
+
m: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.xs), ";;label:m;")
|
|
26
|
+
}
|
|
22
27
|
};
|
|
23
28
|
};
|
|
@@ -86,6 +86,7 @@ var EuiButtonEmpty = exports.EuiButtonEmpty = function EuiButtonEmpty(_ref) {
|
|
|
86
86
|
var contentClassNames = (0, _classnames.default)('euiButtonEmpty__content', contentProps === null || contentProps === void 0 ? void 0 : contentProps.className);
|
|
87
87
|
var textClassNames = (0, _classnames.default)('euiButtonEmpty__text', textProps && textProps.className);
|
|
88
88
|
var innerNode = (0, _react2.jsx)(_button_display_content.EuiButtonDisplayContent, (0, _extends2.default)({
|
|
89
|
+
size: size,
|
|
89
90
|
isDisabled: isDisabled,
|
|
90
91
|
isLoading: isLoading,
|
|
91
92
|
iconType: iconType,
|
|
@@ -23,7 +23,7 @@ var euiButtonEmptyStyles = exports.euiButtonEmptyStyles = function euiButtonEmpt
|
|
|
23
23
|
// of using the actual component - so we'll reuse its styles instead
|
|
24
24
|
var displayStyles = (0, _button_display.euiButtonDisplayStyles)(euiThemeContext);
|
|
25
25
|
return {
|
|
26
|
-
euiButtonEmpty: /*#__PURE__*/(0, _react.css)(displayStyles.euiButtonDisplay, " ", (0, _global_styling.logicalShorthandCSS)('padding', "0 ".concat(euiTheme.size.s)),
|
|
26
|
+
euiButtonEmpty: /*#__PURE__*/(0, _react.css)(displayStyles.euiButtonDisplay, " ", (0, _global_styling.logicalShorthandCSS)('padding', "0 ".concat(euiTheme.size.s)), ";;label:euiButtonEmpty;"),
|
|
27
27
|
isDisabled: displayStyles.isDisabled,
|
|
28
28
|
// Sizes
|
|
29
29
|
xs: displayStyles.xs,
|
|
@@ -33,7 +33,7 @@ var euiButtonEmptyStyles = exports.euiButtonEmptyStyles = function euiButtonEmpt
|
|
|
33
33
|
// Flush sides
|
|
34
34
|
flush: /*#__PURE__*/(0, _react.css)("padding-inline:0;&&:hover,&&:active{background-color:transparent;&::before{display:none;}}&:hover:not(:disabled),&:focus{text-decoration:underline;", (0, _global_styling.highContrastModeStyles)(euiThemeContext, {
|
|
35
35
|
forced: "\n /* hides HCM hover border, flush buttons use text-decoration */\n &::after {\n display: none;\n }\n "
|
|
36
|
-
}), ";};label:flush;"),
|
|
36
|
+
}), ";}.euiButtonEmpty__content{gap:", euiTheme.size.s, ";}.euiButtonEmpty__text{padding:0;};label:flush;"),
|
|
37
37
|
left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('margin-right', euiTheme.size.s), ";;label:left;"),
|
|
38
38
|
right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('margin-left', euiTheme.size.s), ";;label:right;"),
|
|
39
39
|
both: /*#__PURE__*/(0, _react.css)(";label:both;")
|
|
@@ -45,7 +45,7 @@ var EuiCodeBlockAnnotation = exports.EuiCodeBlockAnnotation = function EuiCodeBl
|
|
|
45
45
|
euiTheme = _useEuiTheme.euiTheme,
|
|
46
46
|
colorMode = _useEuiTheme.colorMode;
|
|
47
47
|
var isDarkMode = colorMode === 'DARK';
|
|
48
|
-
var iconColor = isDarkMode ? euiTheme.colors.
|
|
48
|
+
var iconColor = isDarkMode ? euiTheme.colors.textInk : 'ghost';
|
|
49
49
|
return (0, _react2.jsx)(_popover.EuiPopover, (0, _extends2.default)({
|
|
50
50
|
css: styles.euiCodeBlockAnnotation
|
|
51
51
|
}, rest, {
|
|
@@ -21,7 +21,7 @@ var euiCollapsibleNavGroupStyles = exports.euiCollapsibleNavGroupStyles = functi
|
|
|
21
21
|
// Background colors
|
|
22
22
|
none: /*#__PURE__*/(0, _react.css)(";label:none;"),
|
|
23
23
|
light: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.components.collapsibleNavGroupBackground, ";;label:light;"),
|
|
24
|
-
dark: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.components.collapsibleNavGroupBackgroundDark, ";.euiCollapsibleNavGroup__title,.euiCollapsibleNavGroup__heading,.euiAccordion__arrow{color:", euiTheme.colors.
|
|
24
|
+
dark: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.components.collapsibleNavGroupBackgroundDark, ";.euiCollapsibleNavGroup__title,.euiCollapsibleNavGroup__heading,.euiAccordion__arrow{color:", euiTheme.colors.textGhost, ";};label:dark;"),
|
|
25
25
|
// Header padding
|
|
26
26
|
isCollapsible: /*#__PURE__*/(0, _react.css)(".euiAccordion__triggerWrapper{padding:", euiTheme.size.base, ";};label:isCollapsible;"),
|
|
27
27
|
notCollapsible: /*#__PURE__*/(0, _react.css)(".euiCollapsibleNavGroup__heading{padding:", euiTheme.size.base, ";};label:notCollapsible;"),
|
|
@@ -416,7 +416,8 @@ var EuiColorPicker = exports.EuiColorPicker = function EuiColorPicker(_ref) {
|
|
|
416
416
|
append: append,
|
|
417
417
|
isInvalid: isInvalid,
|
|
418
418
|
isDisabled: disabled,
|
|
419
|
-
isDropdown: true
|
|
419
|
+
isDropdown: true,
|
|
420
|
+
inputId: id
|
|
420
421
|
}, (0, _react2.jsx)(_form.EuiFieldText, {
|
|
421
422
|
className: "euiColorPicker__input",
|
|
422
423
|
onClick: handleInputActivity,
|
|
@@ -26,7 +26,7 @@ var euiColorPickerStyles = exports.euiColorPickerStyles = function euiColorPicke
|
|
|
26
26
|
euiColorPicker: /*#__PURE__*/(0, _react.css)("position:relative;", (0, _global_styling.logicalCSS)('width', colorPickerWidth), "display:flex;flex-direction:column;gap:", euiTheme.size.s, ";;label:euiColorPicker;"),
|
|
27
27
|
euiColorPicker__swatches: /*#__PURE__*/(0, _react.css)("display:flex;flex-wrap:wrap;gap:", euiTheme.size.s, ";;label:euiColorPicker__swatches;"),
|
|
28
28
|
// `!important`s required to override default EuiFormControlLayout styles */
|
|
29
|
-
euiColorPicker__alphaRange: /*#__PURE__*/(0, _react.css)(".euiRangeInput{", (0, _global_styling.logicalCSS)('min-width', 0), " ", (0, _global_styling.logicalCSS)('width', "calc(3ch + ".concat(euiTheme.size.l, ") !important")), " padding-inline:", euiTheme.size.xs, ";}.
|
|
29
|
+
euiColorPicker__alphaRange: /*#__PURE__*/(0, _react.css)(".euiRangeInput{", (0, _global_styling.logicalCSS)('min-width', 0), " ", (0, _global_styling.logicalCSS)('width', "calc(3ch + ".concat(euiTheme.size.l, ") !important")), " padding-inline:", euiTheme.size.xs, ";}.euiFormAppend{padding-inline:0!important;}&>.euiFormControlLayout{flex-shrink:0;};label:euiColorPicker__alphaRange;"),
|
|
30
30
|
// Adds a stroke color for the swatchInput icon. Unlike most EuiIcons it has a stroke in the SVG
|
|
31
31
|
// Targets a custom className applied directly to the <svg> icon
|
|
32
32
|
euiColorPicker__swatchInputIcon: /*#__PURE__*/(0, _react.css)(".euiSwatchInput__stroke{fill:none;stroke:", highContrastMode ? euiTheme.colors.fullShade : euiTheme.colors.borderBaseFormsColorSwatch, ";};label:euiColorPicker__swatchInputIcon;")
|