@elastic/eui 107.0.0 → 108.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.js +1 -0
- package/es/components/badge/beta_badge/beta_badge.styles.js +1 -3
- package/es/components/badge/notification_badge/badge_notification.styles.js +2 -4
- package/es/components/basic_table/basic_table.styles.js +6 -4
- package/es/components/button/button_display/_button_display.styles.js +1 -4
- package/es/components/button/button_display/_button_display_content.styles.js +1 -4
- package/es/components/button/button_empty/button_empty.styles.js +4 -7
- package/es/components/button/button_group/button_group.styles.js +2 -12
- package/es/components/button/button_group/button_group_button.js +2 -4
- package/es/components/button/button_group/button_group_button.styles.js +22 -36
- package/es/components/button/button_icon/button_icon.js +3 -6
- package/es/components/code/code_syntax.styles.js +1 -1
- package/es/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +1 -1
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -4
- package/es/components/combo_box/combo_box_input/combo_box_input.js +62 -65
- package/es/components/combo_box/combo_box_input/combo_box_input.styles.js +2 -4
- package/es/components/datagrid/controls/column_selector.styles.js +1 -1
- package/es/components/datagrid/controls/column_sorting.styles.js +1 -1
- package/es/components/datagrid/controls/data_grid_toolbar_control.js +2 -15
- package/es/components/datagrid/data_grid.styles.js +0 -1
- package/es/components/date_picker/date_picker.styles.js +1 -4
- package/es/components/date_picker/date_picker_range.styles.js +4 -8
- package/es/components/date_picker/super_date_picker/super_date_picker.styles.js +12 -26
- package/es/components/filter_group/filter_button.js +7 -10
- package/es/components/filter_group/filter_button.styles.js +28 -39
- package/es/components/filter_group/filter_group.styles.js +8 -29
- package/es/components/form/field_number/field_number.styles.js +1 -4
- package/es/components/form/field_text/field_text.styles.js +1 -4
- package/es/components/form/file_picker/file_picker.js +102 -107
- package/es/components/form/file_picker/file_picker.styles.js +5 -7
- package/es/components/form/form.styles.js +17 -40
- package/es/components/form/form_control_layout/form_control_layout.styles.js +9 -22
- package/es/components/form/form_control_layout/form_control_layout_clear_button.styles.js +1 -3
- package/es/components/form/form_control_layout/form_control_layout_delimited.js +6 -8
- package/es/components/form/form_control_layout/form_control_layout_delimited.styles.js +12 -25
- package/es/components/form/form_control_layout/form_control_layout_icons.js +25 -47
- package/es/components/form/form_error_text/form_error_text.styles.js +1 -3
- package/es/components/form/form_label/form_label.js +1 -1
- package/es/components/form/form_label/form_label.styles.js +1 -5
- package/es/components/form/range/range_input.styles.js +1 -3
- package/es/components/header/header.styles.js +4 -19
- package/es/components/header/header_section/header_section_item_button.styles.js +4 -6
- package/es/components/icon/icon.js +31 -14
- package/es/components/icon/icon_map.js +1 -1
- package/es/components/key_pad_menu/key_pad_menu_item.styles.js +5 -9
- package/es/components/markdown_editor/markdown_editor_drop_zone.styles.js +3 -5
- package/es/components/modal/modal.js +23 -5
- package/es/components/panel/panel.styles.js +4 -12
- package/es/components/resizable_container/resizable_collapse_button.js +2 -3
- package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +4 -5
- package/es/components/table/table_row.styles.js +3 -3
- package/es/components/toast/toast.styles.js +1 -3
- package/es/components/token/token.js +1 -3
- package/es/components/token/token.styles.js +2 -3
- package/es/components/token/token_map.js +1 -231
- package/es/global_styling/mixins/_button.js +14 -24
- package/es/index.js +0 -1
- package/es/services/color/eui_palettes.js +7 -21
- package/es/services/color/eui_palettes_hooks.js +6 -10
- package/es/services/color/vis_color_store.js +2 -2
- package/es/services/theme/provider.js +4 -9
- package/eui.d.ts +20 -2103
- package/lib/components/badge/beta_badge/beta_badge.js +1 -0
- package/lib/components/badge/beta_badge/beta_badge.styles.js +1 -3
- package/lib/components/badge/notification_badge/badge_notification.styles.js +2 -4
- package/lib/components/basic_table/basic_table.styles.js +5 -3
- package/lib/components/button/button_display/_button_display.styles.js +1 -4
- package/lib/components/button/button_display/_button_display_content.styles.js +1 -4
- package/lib/components/button/button_empty/button_empty.styles.js +4 -7
- package/lib/components/button/button_group/button_group.styles.js +2 -12
- package/lib/components/button/button_group/button_group_button.js +1 -3
- package/lib/components/button/button_group/button_group_button.styles.js +21 -35
- package/lib/components/button/button_icon/button_icon.js +1 -4
- package/lib/components/code/code_syntax.styles.js +1 -1
- package/lib/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +2 -2
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -4
- package/lib/components/combo_box/combo_box_input/combo_box_input.js +61 -64
- package/lib/components/combo_box/combo_box_input/combo_box_input.styles.js +2 -4
- package/lib/components/datagrid/controls/column_selector.styles.js +2 -2
- package/lib/components/datagrid/controls/column_sorting.styles.js +2 -2
- package/lib/components/datagrid/controls/data_grid_toolbar_control.js +1 -14
- package/lib/components/datagrid/data_grid.styles.js +0 -1
- package/lib/components/date_picker/date_picker.styles.js +1 -4
- package/lib/components/date_picker/date_picker_range.styles.js +4 -8
- package/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +10 -24
- package/lib/components/filter_group/filter_button.js +6 -9
- package/lib/components/filter_group/filter_button.styles.js +27 -38
- package/lib/components/filter_group/filter_group.styles.js +8 -29
- package/lib/components/form/field_number/field_number.styles.js +1 -4
- package/lib/components/form/field_text/field_text.styles.js +1 -4
- package/lib/components/form/file_picker/file_picker.js +101 -106
- package/lib/components/form/file_picker/file_picker.styles.js +5 -7
- package/lib/components/form/form.styles.js +16 -39
- package/lib/components/form/form_control_layout/form_control_layout.styles.js +8 -21
- package/lib/components/form/form_control_layout/form_control_layout_clear_button.styles.js +1 -3
- package/lib/components/form/form_control_layout/form_control_layout_delimited.js +5 -7
- package/lib/components/form/form_control_layout/form_control_layout_delimited.styles.js +12 -25
- package/lib/components/form/form_control_layout/form_control_layout_icons.js +24 -46
- package/lib/components/form/form_error_text/form_error_text.styles.js +1 -3
- package/lib/components/form/form_label/form_label.js +1 -1
- package/lib/components/form/form_label/form_label.styles.js +1 -5
- package/lib/components/form/range/range_input.styles.js +1 -3
- package/lib/components/header/header.styles.js +2 -18
- package/lib/components/header/header_section/header_section_item_button.styles.js +4 -6
- package/lib/components/icon/icon.js +31 -14
- package/lib/components/icon/icon_map.js +1 -1
- package/lib/components/key_pad_menu/key_pad_menu_item.styles.js +5 -9
- package/lib/components/markdown_editor/markdown_editor_drop_zone.styles.js +3 -5
- package/lib/components/modal/modal.js +25 -5
- package/lib/components/panel/panel.styles.js +4 -12
- package/lib/components/resizable_container/resizable_collapse_button.js +1 -2
- package/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +3 -4
- package/lib/components/table/table_row.styles.js +3 -3
- package/lib/components/toast/toast.styles.js +1 -3
- package/lib/components/token/token.js +1 -3
- package/lib/components/token/token.styles.js +1 -2
- package/lib/components/token/token_map.js +2 -232
- package/lib/global_styling/mixins/_button.js +11 -21
- package/lib/index.js +0 -11
- package/lib/services/color/eui_palettes.js +7 -21
- package/lib/services/color/eui_palettes_hooks.js +6 -10
- package/lib/services/color/vis_color_store.js +2 -2
- package/lib/services/theme/provider.js +4 -9
- package/optimize/es/components/badge/beta_badge/beta_badge.js +1 -0
- package/optimize/es/components/badge/beta_badge/beta_badge.styles.js +1 -3
- package/optimize/es/components/badge/notification_badge/badge_notification.styles.js +2 -4
- package/optimize/es/components/basic_table/basic_table.styles.js +6 -4
- package/optimize/es/components/button/button_display/_button_display.styles.js +1 -4
- package/optimize/es/components/button/button_display/_button_display_content.styles.js +1 -4
- package/optimize/es/components/button/button_empty/button_empty.styles.js +4 -7
- package/optimize/es/components/button/button_group/button_group.styles.js +2 -12
- package/optimize/es/components/button/button_group/button_group_button.js +2 -4
- package/optimize/es/components/button/button_group/button_group_button.styles.js +22 -36
- package/optimize/es/components/button/button_icon/button_icon.js +3 -6
- package/optimize/es/components/code/code_syntax.styles.js +1 -1
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +1 -1
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -4
- package/optimize/es/components/combo_box/combo_box_input/combo_box_input.js +62 -65
- package/optimize/es/components/combo_box/combo_box_input/combo_box_input.styles.js +2 -4
- package/optimize/es/components/datagrid/controls/column_selector.styles.js +1 -1
- package/optimize/es/components/datagrid/controls/column_sorting.styles.js +1 -1
- package/optimize/es/components/datagrid/controls/data_grid_toolbar_control.js +2 -15
- package/optimize/es/components/datagrid/data_grid.styles.js +0 -1
- package/optimize/es/components/date_picker/date_picker.styles.js +1 -4
- package/optimize/es/components/date_picker/date_picker_range.styles.js +4 -8
- package/optimize/es/components/date_picker/super_date_picker/super_date_picker.styles.js +12 -26
- package/optimize/es/components/filter_group/filter_button.js +7 -10
- package/optimize/es/components/filter_group/filter_button.styles.js +28 -39
- package/optimize/es/components/filter_group/filter_group.styles.js +8 -29
- package/optimize/es/components/form/field_number/field_number.styles.js +1 -4
- package/optimize/es/components/form/field_text/field_text.styles.js +1 -4
- package/optimize/es/components/form/file_picker/file_picker.js +102 -107
- package/optimize/es/components/form/file_picker/file_picker.styles.js +5 -7
- package/optimize/es/components/form/form.styles.js +17 -40
- package/optimize/es/components/form/form_control_layout/form_control_layout.styles.js +9 -22
- package/optimize/es/components/form/form_control_layout/form_control_layout_clear_button.styles.js +1 -3
- package/optimize/es/components/form/form_control_layout/form_control_layout_delimited.js +6 -8
- package/optimize/es/components/form/form_control_layout/form_control_layout_delimited.styles.js +12 -25
- package/optimize/es/components/form/form_control_layout/form_control_layout_icons.js +25 -47
- package/optimize/es/components/form/form_error_text/form_error_text.styles.js +1 -3
- package/optimize/es/components/form/form_label/form_label.js +1 -1
- package/optimize/es/components/form/form_label/form_label.styles.js +1 -5
- package/optimize/es/components/form/range/range_input.styles.js +1 -3
- package/optimize/es/components/header/header.styles.js +4 -19
- package/optimize/es/components/header/header_section/header_section_item_button.styles.js +4 -6
- package/optimize/es/components/icon/icon.js +31 -14
- package/optimize/es/components/icon/icon_map.js +1 -1
- package/optimize/es/components/key_pad_menu/key_pad_menu_item.styles.js +5 -9
- package/optimize/es/components/markdown_editor/markdown_editor_drop_zone.styles.js +3 -5
- package/optimize/es/components/modal/modal.js +17 -4
- package/optimize/es/components/panel/panel.styles.js +4 -12
- package/optimize/es/components/resizable_container/resizable_collapse_button.js +2 -3
- package/optimize/es/components/selectable/selectable_templates/selectable_template_sitewide.js +4 -5
- package/optimize/es/components/table/table_row.styles.js +3 -3
- package/optimize/es/components/toast/toast.styles.js +1 -3
- package/optimize/es/components/token/token.js +1 -3
- package/optimize/es/components/token/token.styles.js +2 -3
- package/optimize/es/components/token/token_map.js +1 -231
- package/optimize/es/global_styling/mixins/_button.js +14 -24
- package/optimize/es/index.js +0 -1
- package/optimize/es/services/color/eui_palettes.js +7 -21
- package/optimize/es/services/color/eui_palettes_hooks.js +6 -10
- package/optimize/es/services/color/vis_color_store.js +2 -2
- package/optimize/es/services/theme/provider.js +4 -9
- package/optimize/lib/components/badge/beta_badge/beta_badge.js +1 -0
- package/optimize/lib/components/badge/beta_badge/beta_badge.styles.js +1 -3
- package/optimize/lib/components/badge/notification_badge/badge_notification.styles.js +2 -4
- package/optimize/lib/components/basic_table/basic_table.styles.js +5 -3
- package/optimize/lib/components/button/button_display/_button_display.styles.js +1 -4
- package/optimize/lib/components/button/button_display/_button_display_content.styles.js +1 -4
- package/optimize/lib/components/button/button_empty/button_empty.styles.js +4 -7
- package/optimize/lib/components/button/button_group/button_group.styles.js +2 -12
- package/optimize/lib/components/button/button_group/button_group_button.js +1 -3
- package/optimize/lib/components/button/button_group/button_group_button.styles.js +21 -35
- package/optimize/lib/components/button/button_icon/button_icon.js +1 -4
- package/optimize/lib/components/code/code_syntax.styles.js +1 -1
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +2 -2
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -4
- package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.js +61 -64
- package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.styles.js +2 -4
- package/optimize/lib/components/datagrid/controls/column_selector.styles.js +2 -2
- package/optimize/lib/components/datagrid/controls/column_sorting.styles.js +2 -2
- package/optimize/lib/components/datagrid/controls/data_grid_toolbar_control.js +1 -14
- package/optimize/lib/components/datagrid/data_grid.styles.js +0 -1
- package/optimize/lib/components/date_picker/date_picker.styles.js +1 -4
- package/optimize/lib/components/date_picker/date_picker_range.styles.js +4 -8
- package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +10 -24
- package/optimize/lib/components/filter_group/filter_button.js +6 -9
- package/optimize/lib/components/filter_group/filter_button.styles.js +27 -38
- package/optimize/lib/components/filter_group/filter_group.styles.js +8 -29
- package/optimize/lib/components/form/field_number/field_number.styles.js +1 -4
- package/optimize/lib/components/form/field_text/field_text.styles.js +1 -4
- package/optimize/lib/components/form/file_picker/file_picker.js +101 -106
- package/optimize/lib/components/form/file_picker/file_picker.styles.js +5 -7
- package/optimize/lib/components/form/form.styles.js +16 -39
- package/optimize/lib/components/form/form_control_layout/form_control_layout.styles.js +8 -21
- package/optimize/lib/components/form/form_control_layout/form_control_layout_clear_button.styles.js +1 -3
- package/optimize/lib/components/form/form_control_layout/form_control_layout_delimited.js +5 -7
- package/optimize/lib/components/form/form_control_layout/form_control_layout_delimited.styles.js +12 -25
- package/optimize/lib/components/form/form_control_layout/form_control_layout_icons.js +24 -46
- package/optimize/lib/components/form/form_error_text/form_error_text.styles.js +1 -3
- package/optimize/lib/components/form/form_label/form_label.js +1 -1
- package/optimize/lib/components/form/form_label/form_label.styles.js +1 -5
- package/optimize/lib/components/form/range/range_input.styles.js +1 -3
- package/optimize/lib/components/header/header.styles.js +2 -18
- package/optimize/lib/components/header/header_section/header_section_item_button.styles.js +4 -6
- package/optimize/lib/components/icon/icon.js +31 -14
- package/optimize/lib/components/icon/icon_map.js +1 -1
- package/optimize/lib/components/key_pad_menu/key_pad_menu_item.styles.js +5 -9
- package/optimize/lib/components/markdown_editor/markdown_editor_drop_zone.styles.js +3 -5
- package/optimize/lib/components/modal/modal.js +20 -4
- package/optimize/lib/components/panel/panel.styles.js +4 -12
- package/optimize/lib/components/resizable_container/resizable_collapse_button.js +1 -2
- package/optimize/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +3 -4
- package/optimize/lib/components/table/table_row.styles.js +3 -3
- package/optimize/lib/components/toast/toast.styles.js +1 -3
- package/optimize/lib/components/token/token.js +1 -3
- package/optimize/lib/components/token/token.styles.js +1 -2
- package/optimize/lib/components/token/token_map.js +2 -232
- package/optimize/lib/global_styling/mixins/_button.js +11 -21
- package/optimize/lib/index.js +0 -11
- package/optimize/lib/services/color/eui_palettes.js +7 -21
- package/optimize/lib/services/color/eui_palettes_hooks.js +6 -10
- package/optimize/lib/services/color/vis_color_store.js +2 -2
- package/optimize/lib/services/theme/provider.js +4 -9
- package/package.json +6 -7
- package/test-env/components/badge/beta_badge/beta_badge.js +1 -0
- package/test-env/components/badge/beta_badge/beta_badge.styles.js +1 -3
- package/test-env/components/badge/notification_badge/badge_notification.styles.js +2 -4
- package/test-env/components/basic_table/basic_table.styles.js +5 -3
- package/test-env/components/button/button_display/_button_display.styles.js +1 -4
- package/test-env/components/button/button_display/_button_display_content.styles.js +1 -4
- package/test-env/components/button/button_empty/button_empty.styles.js +4 -7
- package/test-env/components/button/button_group/button_group.styles.js +2 -12
- package/test-env/components/button/button_group/button_group_button.js +1 -3
- package/test-env/components/button/button_group/button_group_button.styles.js +21 -35
- package/test-env/components/button/button_icon/button_icon.js +1 -4
- package/test-env/components/code/code_syntax.styles.js +1 -1
- package/test-env/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +2 -2
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -4
- package/test-env/components/combo_box/combo_box_input/combo_box_input.js +61 -64
- package/test-env/components/combo_box/combo_box_input/combo_box_input.styles.js +2 -4
- package/test-env/components/datagrid/controls/column_selector.styles.js +2 -2
- package/test-env/components/datagrid/controls/column_sorting.styles.js +2 -2
- package/test-env/components/datagrid/controls/data_grid_toolbar_control.js +1 -14
- package/test-env/components/datagrid/data_grid.styles.js +0 -1
- package/test-env/components/date_picker/date_picker.styles.js +1 -4
- package/test-env/components/date_picker/date_picker_range.styles.js +4 -8
- package/test-env/components/date_picker/super_date_picker/super_date_picker.styles.js +10 -24
- package/test-env/components/filter_group/filter_button.js +6 -9
- package/test-env/components/filter_group/filter_button.styles.js +27 -38
- package/test-env/components/filter_group/filter_group.styles.js +8 -29
- package/test-env/components/form/field_number/field_number.styles.js +1 -4
- package/test-env/components/form/field_text/field_text.styles.js +1 -4
- package/test-env/components/form/file_picker/file_picker.js +101 -106
- package/test-env/components/form/file_picker/file_picker.styles.js +5 -7
- package/test-env/components/form/form.styles.js +16 -39
- package/test-env/components/form/form_control_layout/form_control_layout.styles.js +8 -21
- package/test-env/components/form/form_control_layout/form_control_layout_clear_button.styles.js +1 -3
- package/test-env/components/form/form_control_layout/form_control_layout_delimited.js +5 -7
- package/test-env/components/form/form_control_layout/form_control_layout_delimited.styles.js +12 -25
- package/test-env/components/form/form_control_layout/form_control_layout_icons.js +24 -46
- package/test-env/components/form/form_error_text/form_error_text.styles.js +1 -3
- package/test-env/components/form/form_label/form_label.js +1 -1
- package/test-env/components/form/form_label/form_label.styles.js +1 -5
- package/test-env/components/form/range/range_input.styles.js +1 -3
- package/test-env/components/header/header.styles.js +2 -18
- package/test-env/components/header/header_section/header_section_item_button.styles.js +4 -6
- package/test-env/components/icon/icon_map.js +1 -1
- package/test-env/components/key_pad_menu/key_pad_menu_item.styles.js +5 -9
- package/test-env/components/markdown_editor/markdown_editor_drop_zone.styles.js +3 -5
- package/test-env/components/modal/modal.js +26 -5
- package/test-env/components/panel/panel.styles.js +4 -12
- package/test-env/components/resizable_container/resizable_collapse_button.js +1 -2
- package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.js +3 -4
- package/test-env/components/table/table_row.styles.js +3 -3
- package/test-env/components/toast/toast.styles.js +1 -3
- package/test-env/components/token/token.js +1 -3
- package/test-env/components/token/token.styles.js +1 -2
- package/test-env/components/token/token_map.js +2 -232
- package/test-env/global_styling/mixins/_button.js +11 -21
- package/test-env/index.js +0 -11
- package/test-env/services/breakpoint/current_breakpoint_hook.js +1 -1
- package/test-env/services/color/eui_palettes.js +7 -21
- package/test-env/services/color/eui_palettes_hooks.js +6 -10
- package/test-env/services/color/vis_color_store.js +2 -2
- package/test-env/services/theme/provider.js +4 -9
- package/dist/eui_theme_amsterdam_dark.json +0 -463
- package/dist/eui_theme_amsterdam_dark.json.d.ts +0 -466
- package/dist/eui_theme_amsterdam_light.json +0 -463
- package/dist/eui_theme_amsterdam_light.json.d.ts +0 -466
- package/dist/eui_theme_borealis_dark.json +0 -463
- package/dist/eui_theme_borealis_dark.json.d.ts +0 -466
- package/dist/eui_theme_borealis_light.json +0 -463
- package/dist/eui_theme_borealis_light.json.d.ts +0 -466
- package/es/themes/amsterdam/global_styling/functions/index.js +0 -9
- package/es/themes/amsterdam/global_styling/functions/shadows.js +0 -9
- package/es/themes/amsterdam/global_styling/mixins/button.js +0 -9
- package/es/themes/amsterdam/global_styling/mixins/index.js +0 -10
- package/es/themes/amsterdam/global_styling/mixins/shadow.js +0 -9
- package/es/themes/amsterdam/global_styling/variables/_animation.js +0 -26
- package/es/themes/amsterdam/global_styling/variables/_borders.js +0 -49
- package/es/themes/amsterdam/global_styling/variables/_breakpoint.js +0 -9
- package/es/themes/amsterdam/global_styling/variables/_buttons.js +0 -529
- package/es/themes/amsterdam/global_styling/variables/_colors.js +0 -797
- package/es/themes/amsterdam/global_styling/variables/_colors_severity.js +0 -21
- package/es/themes/amsterdam/global_styling/variables/_colors_vis_dark.js +0 -33
- package/es/themes/amsterdam/global_styling/variables/_colors_vis_light.js +0 -125
- package/es/themes/amsterdam/global_styling/variables/_components.js +0 -724
- package/es/themes/amsterdam/global_styling/variables/_forms.js +0 -204
- package/es/themes/amsterdam/global_styling/variables/_levels.js +0 -19
- package/es/themes/amsterdam/global_styling/variables/_shadows.js +0 -439
- package/es/themes/amsterdam/global_styling/variables/_size.js +0 -23
- package/es/themes/amsterdam/global_styling/variables/_states.js +0 -26
- package/es/themes/amsterdam/global_styling/variables/_typography.js +0 -66
- package/es/themes/amsterdam/index.js +0 -10
- package/es/themes/amsterdam/theme.js +0 -41
- package/es/themes/index.js +0 -12
- package/es/themes/json/eui_theme_amsterdam_dark.json +0 -463
- package/es/themes/json/eui_theme_amsterdam_light.json +0 -463
- package/es/themes/json/eui_theme_borealis_dark.json +0 -463
- package/es/themes/json/eui_theme_borealis_light.json +0 -463
- package/es/themes/themes.js +0 -1
- package/lib/themes/amsterdam/global_styling/functions/index.js +0 -16
- package/lib/themes/amsterdam/global_styling/functions/shadows.js +0 -12
- package/lib/themes/amsterdam/global_styling/mixins/button.js +0 -54
- package/lib/themes/amsterdam/global_styling/mixins/index.js +0 -27
- package/lib/themes/amsterdam/global_styling/mixins/shadow.js +0 -16
- package/lib/themes/amsterdam/global_styling/variables/_animation.js +0 -32
- package/lib/themes/amsterdam/global_styling/variables/_borders.js +0 -53
- package/lib/themes/amsterdam/global_styling/variables/_breakpoint.js +0 -12
- package/lib/themes/amsterdam/global_styling/variables/_buttons.js +0 -533
- package/lib/themes/amsterdam/global_styling/variables/_colors.js +0 -800
- package/lib/themes/amsterdam/global_styling/variables/_colors_severity.js +0 -27
- package/lib/themes/amsterdam/global_styling/variables/_colors_vis_dark.js +0 -37
- package/lib/themes/amsterdam/global_styling/variables/_colors_vis_light.js +0 -130
- package/lib/themes/amsterdam/global_styling/variables/_components.js +0 -728
- package/lib/themes/amsterdam/global_styling/variables/_forms.js +0 -208
- package/lib/themes/amsterdam/global_styling/variables/_levels.js +0 -25
- package/lib/themes/amsterdam/global_styling/variables/_shadows.js +0 -442
- package/lib/themes/amsterdam/global_styling/variables/_size.js +0 -29
- package/lib/themes/amsterdam/global_styling/variables/_states.js +0 -32
- package/lib/themes/amsterdam/global_styling/variables/_typography.js +0 -70
- package/lib/themes/amsterdam/index.js +0 -16
- package/lib/themes/amsterdam/theme.js +0 -47
- package/lib/themes/index.js +0 -57
- package/lib/themes/json/eui_theme_amsterdam_dark.json +0 -463
- package/lib/themes/json/eui_theme_amsterdam_light.json +0 -463
- package/lib/themes/json/eui_theme_borealis_dark.json +0 -463
- package/lib/themes/json/eui_theme_borealis_light.json +0 -463
- package/lib/themes/themes.js +0 -5
- package/optimize/es/themes/amsterdam/global_styling/functions/index.js +0 -9
- package/optimize/es/themes/amsterdam/global_styling/functions/shadows.js +0 -9
- package/optimize/es/themes/amsterdam/global_styling/mixins/button.js +0 -9
- package/optimize/es/themes/amsterdam/global_styling/mixins/index.js +0 -10
- package/optimize/es/themes/amsterdam/global_styling/mixins/shadow.js +0 -9
- package/optimize/es/themes/amsterdam/global_styling/variables/_animation.js +0 -23
- package/optimize/es/themes/amsterdam/global_styling/variables/_borders.js +0 -44
- package/optimize/es/themes/amsterdam/global_styling/variables/_breakpoint.js +0 -9
- package/optimize/es/themes/amsterdam/global_styling/variables/_buttons.js +0 -518
- package/optimize/es/themes/amsterdam/global_styling/variables/_colors.js +0 -789
- package/optimize/es/themes/amsterdam/global_styling/variables/_colors_severity.js +0 -21
- package/optimize/es/themes/amsterdam/global_styling/variables/_colors_vis_dark.js +0 -30
- package/optimize/es/themes/amsterdam/global_styling/variables/_colors_vis_light.js +0 -125
- package/optimize/es/themes/amsterdam/global_styling/variables/_components.js +0 -716
- package/optimize/es/themes/amsterdam/global_styling/variables/_forms.js +0 -196
- package/optimize/es/themes/amsterdam/global_styling/variables/_levels.js +0 -19
- package/optimize/es/themes/amsterdam/global_styling/variables/_shadows.js +0 -436
- package/optimize/es/themes/amsterdam/global_styling/variables/_size.js +0 -23
- package/optimize/es/themes/amsterdam/global_styling/variables/_states.js +0 -26
- package/optimize/es/themes/amsterdam/global_styling/variables/_typography.js +0 -58
- package/optimize/es/themes/amsterdam/index.js +0 -10
- package/optimize/es/themes/amsterdam/theme.js +0 -41
- package/optimize/es/themes/index.js +0 -12
- package/optimize/es/themes/json/eui_theme_amsterdam_dark.json +0 -463
- package/optimize/es/themes/json/eui_theme_amsterdam_light.json +0 -463
- package/optimize/es/themes/json/eui_theme_borealis_dark.json +0 -463
- package/optimize/es/themes/json/eui_theme_borealis_light.json +0 -463
- package/optimize/es/themes/themes.js +0 -1
- package/optimize/lib/themes/amsterdam/global_styling/functions/index.js +0 -16
- package/optimize/lib/themes/amsterdam/global_styling/functions/shadows.js +0 -12
- package/optimize/lib/themes/amsterdam/global_styling/mixins/button.js +0 -54
- package/optimize/lib/themes/amsterdam/global_styling/mixins/index.js +0 -27
- package/optimize/lib/themes/amsterdam/global_styling/mixins/shadow.js +0 -16
- package/optimize/lib/themes/amsterdam/global_styling/variables/_animation.js +0 -30
- package/optimize/lib/themes/amsterdam/global_styling/variables/_borders.js +0 -51
- package/optimize/lib/themes/amsterdam/global_styling/variables/_breakpoint.js +0 -12
- package/optimize/lib/themes/amsterdam/global_styling/variables/_buttons.js +0 -523
- package/optimize/lib/themes/amsterdam/global_styling/variables/_colors.js +0 -793
- package/optimize/lib/themes/amsterdam/global_styling/variables/_colors_severity.js +0 -27
- package/optimize/lib/themes/amsterdam/global_styling/variables/_colors_vis_dark.js +0 -35
- package/optimize/lib/themes/amsterdam/global_styling/variables/_colors_vis_light.js +0 -130
- package/optimize/lib/themes/amsterdam/global_styling/variables/_components.js +0 -721
- package/optimize/lib/themes/amsterdam/global_styling/variables/_forms.js +0 -201
- package/optimize/lib/themes/amsterdam/global_styling/variables/_levels.js +0 -25
- package/optimize/lib/themes/amsterdam/global_styling/variables/_shadows.js +0 -440
- package/optimize/lib/themes/amsterdam/global_styling/variables/_size.js +0 -29
- package/optimize/lib/themes/amsterdam/global_styling/variables/_states.js +0 -32
- package/optimize/lib/themes/amsterdam/global_styling/variables/_typography.js +0 -63
- package/optimize/lib/themes/amsterdam/index.js +0 -16
- package/optimize/lib/themes/amsterdam/theme.js +0 -47
- package/optimize/lib/themes/index.js +0 -57
- package/optimize/lib/themes/json/eui_theme_amsterdam_dark.json +0 -463
- package/optimize/lib/themes/json/eui_theme_amsterdam_light.json +0 -463
- package/optimize/lib/themes/json/eui_theme_borealis_dark.json +0 -463
- package/optimize/lib/themes/json/eui_theme_borealis_light.json +0 -463
- package/optimize/lib/themes/themes.js +0 -5
- package/src/global_styling/functions/_colors.scss +0 -138
- package/src/global_styling/functions/_index.scss +0 -1
- package/src/global_styling/functions/_math.scss +0 -1
- package/src/global_styling/functions/_math_pow.scss +0 -82
- package/src/global_styling/index.scss +0 -3
- package/src/global_styling/mixins/_helpers.scss +0 -117
- package/src/global_styling/mixins/_index.scss +0 -8
- package/src/global_styling/mixins/_responsive.scss +0 -44
- package/src/global_styling/mixins/_shadow.scss +0 -100
- package/src/global_styling/mixins/_size.scss +0 -4
- package/src/global_styling/mixins/_states.scss +0 -17
- package/src/global_styling/mixins/_tool_tip.scss +0 -18
- package/src/global_styling/mixins/_typography.scss +0 -166
- package/src/global_styling/variables/_animations.scss +0 -6
- package/src/global_styling/variables/_borders.scss +0 -3
- package/src/global_styling/variables/_buttons.scss +0 -1
- package/src/global_styling/variables/_font_weight.scss +0 -4
- package/src/global_styling/variables/_form.scss +0 -2
- package/src/global_styling/variables/_index.scss +0 -22
- package/src/global_styling/variables/_responsive.scss +0 -1
- package/src/global_styling/variables/_shadows.scss +0 -2
- package/src/global_styling/variables/_size.scss +0 -1
- package/src/global_styling/variables/_states.scss +0 -1
- package/src/global_styling/variables/_typography.scss +0 -1
- package/src/global_styling/variables/_z_index.scss +0 -2
- package/src/themes/amsterdam/_colors_dark.scss +0 -139
- package/src/themes/amsterdam/_colors_light.scss +0 -139
- package/src/themes/amsterdam/_globals.scss +0 -11
- package/src/themes/amsterdam/global_styling/index.scss +0 -12
- package/src/themes/amsterdam/global_styling/mixins/_index.scss +0 -10
- package/src/themes/amsterdam/global_styling/mixins/_shadow.scss +0 -100
- package/src/themes/amsterdam/global_styling/mixins/_states.scss +0 -41
- package/src/themes/amsterdam/global_styling/mixins/_typography.scss +0 -81
- package/src/themes/amsterdam/global_styling/variables/_colors_severity.scss +0 -9
- package/src/themes/amsterdam/global_styling/variables/_colors_vis.scss +0 -72
- package/src/themes/amsterdam/global_styling/variables/_colors_vis_dark.scss +0 -14
- package/src/themes/amsterdam/global_styling/variables/_colors_vis_light.scss +0 -14
- package/src/themes/amsterdam/global_styling/variables/_forms.scss +0 -12
- package/src/themes/amsterdam/global_styling/variables/_index.scss +0 -8
- package/src/themes/amsterdam/global_styling/variables/_shadows.scss +0 -20
- package/src/themes/amsterdam/global_styling/variables/_states.scss +0 -11
- package/src/themes/amsterdam/global_styling/variables/_typography.scss +0 -64
- package/src/themes/amsterdam/theme_dark.scss +0 -5
- package/src/themes/amsterdam/theme_light.scss +0 -5
- package/test-env/themes/amsterdam/global_styling/functions/index.js +0 -16
- package/test-env/themes/amsterdam/global_styling/functions/shadows.js +0 -12
- package/test-env/themes/amsterdam/global_styling/mixins/button.js +0 -54
- package/test-env/themes/amsterdam/global_styling/mixins/index.js +0 -27
- package/test-env/themes/amsterdam/global_styling/mixins/shadow.js +0 -16
- package/test-env/themes/amsterdam/global_styling/variables/_animation.js +0 -30
- package/test-env/themes/amsterdam/global_styling/variables/_borders.js +0 -51
- package/test-env/themes/amsterdam/global_styling/variables/_breakpoint.js +0 -12
- package/test-env/themes/amsterdam/global_styling/variables/_buttons.js +0 -523
- package/test-env/themes/amsterdam/global_styling/variables/_colors.js +0 -793
- package/test-env/themes/amsterdam/global_styling/variables/_colors_severity.js +0 -27
- package/test-env/themes/amsterdam/global_styling/variables/_colors_vis_dark.js +0 -35
- package/test-env/themes/amsterdam/global_styling/variables/_colors_vis_light.js +0 -130
- package/test-env/themes/amsterdam/global_styling/variables/_components.js +0 -721
- package/test-env/themes/amsterdam/global_styling/variables/_forms.js +0 -201
- package/test-env/themes/amsterdam/global_styling/variables/_levels.js +0 -25
- package/test-env/themes/amsterdam/global_styling/variables/_shadows.js +0 -440
- package/test-env/themes/amsterdam/global_styling/variables/_size.js +0 -29
- package/test-env/themes/amsterdam/global_styling/variables/_states.js +0 -32
- package/test-env/themes/amsterdam/global_styling/variables/_typography.js +0 -63
- package/test-env/themes/amsterdam/index.js +0 -16
- package/test-env/themes/amsterdam/theme.js +0 -47
- package/test-env/themes/index.js +0 -57
- package/test-env/themes/json/eui_theme_amsterdam_dark.json +0 -463
- package/test-env/themes/json/eui_theme_amsterdam_light.json +0 -463
- package/test-env/themes/json/eui_theme_borealis_dark.json +0 -463
- package/test-env/themes/json/eui_theme_borealis_light.json +0 -463
- package/test-env/themes/themes.js +0 -5
|
@@ -121,117 +121,112 @@ var EuiFilePickerClass = exports.EuiFilePickerClass = /*#__PURE__*/function (_Co
|
|
|
121
121
|
var _this2 = this;
|
|
122
122
|
var _ref = this.context,
|
|
123
123
|
defaultFullWidth = _ref.defaultFullWidth;
|
|
124
|
-
return (0, _react2.jsx)(
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
124
|
+
return (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
125
|
+
token: "euiFilePicker.removeSelectedAriaLabel",
|
|
126
|
+
default: "Remove selected files"
|
|
127
|
+
}, function (removeSelectedAriaLabel) {
|
|
128
|
+
var _this2$props = _this2.props,
|
|
129
|
+
stylesMemoizer = _this2$props.stylesMemoizer,
|
|
130
|
+
id = _this2$props.id,
|
|
131
|
+
name = _this2$props.name,
|
|
132
|
+
initialPromptText = _this2$props.initialPromptText,
|
|
133
|
+
className = _this2$props.className,
|
|
134
|
+
disabled = _this2$props.disabled,
|
|
135
|
+
compressed = _this2$props.compressed,
|
|
136
|
+
onChange = _this2$props.onChange,
|
|
137
|
+
isInvalid = _this2$props.isInvalid,
|
|
138
|
+
_this2$props$fullWidt = _this2$props.fullWidth,
|
|
139
|
+
fullWidth = _this2$props$fullWidt === void 0 ? defaultFullWidth : _this2$props$fullWidt,
|
|
140
|
+
isLoading = _this2$props.isLoading,
|
|
141
|
+
display = _this2$props.display,
|
|
142
|
+
rest = _objectWithoutProperties(_this2$props, _excluded);
|
|
143
|
+
var promptId = "".concat(id || _this2.generatedId, "-filePicker__prompt");
|
|
144
|
+
var isOverridingInitialPrompt = _this2.state.promptText != null;
|
|
145
|
+
var normalFormControl = display === 'default';
|
|
146
|
+
var classes = (0, _classnames.default)('euiFilePicker', {
|
|
147
|
+
'euiFilePicker-isDroppingFile': _this2.state.isHoveringDrop,
|
|
148
|
+
'euiFilePicker-isInvalid': isInvalid,
|
|
149
|
+
'euiFilePicker-isLoading': isLoading,
|
|
150
|
+
'euiFilePicker-hasFiles': isOverridingInitialPrompt
|
|
151
|
+
}, className);
|
|
152
|
+
var styles = stylesMemoizer(_file_picker.euiFilePickerStyles);
|
|
153
|
+
var cssStyles = [styles.euiFilePicker, fullWidth ? styles.fullWidth : styles.formWidth, _this2.state.isHoveringDrop && styles.isDroppingFile, isInvalid && !disabled && styles.invalid, isOverridingInitialPrompt && !disabled && styles.hasFiles, isLoading && styles.loading];
|
|
154
|
+
var inputStyles = [styles.input.euiFilePicker__input, !normalFormControl && !disabled && styles.input.largeInteractive];
|
|
155
|
+
var promptStyles = [styles.euiFilePicker__prompt, disabled && styles.disabled].concat(_toConsumableArray(normalFormControl ? [compressed ? styles.compressed : styles.uncompressed] : [styles.large.large, compressed ? styles.large.compressed : styles.large.uncompressed]));
|
|
156
|
+
var iconStyles = [styles.icon.euiFilePicker__icon].concat(_toConsumableArray(normalFormControl ? [styles.icon.normal, compressed ? styles.icon.compresssed : styles.icon.uncompressed] : [styles.icon.large]));
|
|
157
|
+
var rightIconStyles = normalFormControl ? [styles.rightIcon.euiFilePicker__rightIcon, compressed ? styles.rightIcon.compressed : styles.rightIcon.uncompressed] : undefined;
|
|
158
|
+
var clearButton;
|
|
159
|
+
if (isLoading && normalFormControl) {
|
|
160
|
+
// Override clear button with loading spinner if it is in loading state
|
|
161
|
+
clearButton = (0, _react2.jsx)(_loading.EuiLoadingSpinner, {
|
|
162
|
+
css: rightIconStyles,
|
|
163
|
+
className: "euiFilePicker__loadingSpinner",
|
|
164
|
+
size: compressed ? 's' : 'm'
|
|
165
|
+
});
|
|
166
|
+
} else if (isOverridingInitialPrompt && !disabled) {
|
|
167
|
+
if (normalFormControl) {
|
|
168
|
+
clearButton = (0, _react2.jsx)(_form_control_layout_clear_button.EuiFormControlLayoutClearButton, {
|
|
169
|
+
"aria-label": removeSelectedAriaLabel,
|
|
170
|
+
css: [styles.euiFilePicker__clearButton, rightIconStyles, ";label:clearButton;"],
|
|
171
|
+
className: "euiFilePicker__clearButton",
|
|
172
|
+
onClick: _this2.removeFiles,
|
|
166
173
|
size: compressed ? 's' : 'm'
|
|
167
174
|
});
|
|
168
|
-
} else if (isOverridingInitialPrompt && !disabled) {
|
|
169
|
-
if (normalFormControl) {
|
|
170
|
-
clearButton = (0, _react2.jsx)(_form_control_layout_clear_button.EuiFormControlLayoutClearButton, {
|
|
171
|
-
"aria-label": removeSelectedAriaLabel,
|
|
172
|
-
css: [styles.euiFilePicker__clearButton, rightIconStyles, ";label:clearButton;"],
|
|
173
|
-
className: "euiFilePicker__clearButton",
|
|
174
|
-
onClick: _this2.removeFiles,
|
|
175
|
-
size: compressed ? 's' : 'm'
|
|
176
|
-
});
|
|
177
|
-
} else {
|
|
178
|
-
clearButton = (0, _react2.jsx)(_button.EuiButtonEmpty, {
|
|
179
|
-
"aria-label": removeSelectedAriaLabel,
|
|
180
|
-
css: styles.euiFilePicker__clearButton,
|
|
181
|
-
className: "euiFilePicker__clearButton",
|
|
182
|
-
size: "xs",
|
|
183
|
-
onClick: _this2.removeFiles
|
|
184
|
-
}, (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
185
|
-
token: "euiFilePicker.removeSelected",
|
|
186
|
-
default: "Remove"
|
|
187
|
-
}));
|
|
188
|
-
}
|
|
189
175
|
} else {
|
|
190
|
-
clearButton =
|
|
176
|
+
clearButton = (0, _react2.jsx)(_button.EuiButtonEmpty, {
|
|
177
|
+
"aria-label": removeSelectedAriaLabel,
|
|
178
|
+
css: styles.euiFilePicker__clearButton,
|
|
179
|
+
className: "euiFilePicker__clearButton",
|
|
180
|
+
size: "xs",
|
|
181
|
+
onClick: _this2.removeFiles
|
|
182
|
+
}, (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
183
|
+
token: "euiFilePicker.removeSelected",
|
|
184
|
+
default: "Remove"
|
|
185
|
+
}));
|
|
191
186
|
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
var iconColor = isInvalid ? 'danger' : disabled ? isRefreshVariant ? 'disabled' : 'subdued' : isRefreshVariant ? 'text' : 'primary';
|
|
200
|
-
return (0, _react2.jsx)("div", {
|
|
201
|
-
css: cssStyles,
|
|
202
|
-
className: classes
|
|
203
|
-
}, (0, _react2.jsx)(_validatable_control.EuiValidatableControl, {
|
|
204
|
-
isInvalid: isInvalid
|
|
205
|
-
}, (0, _react2.jsx)("input", _extends({
|
|
206
|
-
type: "file",
|
|
207
|
-
id: id,
|
|
208
|
-
name: name,
|
|
209
|
-
css: inputStyles,
|
|
210
|
-
className: "euiFilePicker__input",
|
|
211
|
-
onChange: _this2.handleChange,
|
|
212
|
-
ref: function ref(input) {
|
|
213
|
-
_this2.fileInput = input;
|
|
214
|
-
},
|
|
215
|
-
onDragOver: _this2.showDrop,
|
|
216
|
-
onDragLeave: _this2.hideDrop,
|
|
217
|
-
onDrop: _this2.hideDrop,
|
|
218
|
-
disabled: disabled,
|
|
219
|
-
"aria-describedby": promptId
|
|
220
|
-
}, rest))), (0, _react2.jsx)("div", {
|
|
221
|
-
css: promptStyles,
|
|
222
|
-
className: "euiFilePicker__prompt",
|
|
223
|
-
id: promptId
|
|
224
|
-
}, (0, _react2.jsx)(_icon.EuiIcon, {
|
|
225
|
-
css: iconStyles,
|
|
226
|
-
className: "euiFilePicker__icon",
|
|
227
|
-
color: iconColor,
|
|
228
|
-
type: isInvalid ? 'alert' : isRefreshVariant && disabled ? 'minusInCircle' : 'importAction',
|
|
229
|
-
size: normalFormControl ? 'm' : 'l',
|
|
230
|
-
"aria-hidden": "true"
|
|
231
|
-
}), (0, _react2.jsx)("span", {
|
|
232
|
-
className: "euiFilePicker__promptText"
|
|
233
|
-
}, _this2.state.promptText || initialPromptText), clearButton, loader));
|
|
187
|
+
} else {
|
|
188
|
+
clearButton = null;
|
|
189
|
+
}
|
|
190
|
+
var loader = !normalFormControl && isLoading && (0, _react2.jsx)(_progress.EuiProgress, {
|
|
191
|
+
size: "xs",
|
|
192
|
+
color: "accent",
|
|
193
|
+
position: "absolute"
|
|
234
194
|
});
|
|
195
|
+
var iconColor = isInvalid ? 'danger' : disabled ? 'disabled' : 'text';
|
|
196
|
+
return (0, _react2.jsx)("div", {
|
|
197
|
+
css: cssStyles,
|
|
198
|
+
className: classes
|
|
199
|
+
}, (0, _react2.jsx)(_validatable_control.EuiValidatableControl, {
|
|
200
|
+
isInvalid: isInvalid
|
|
201
|
+
}, (0, _react2.jsx)("input", _extends({
|
|
202
|
+
type: "file",
|
|
203
|
+
id: id,
|
|
204
|
+
name: name,
|
|
205
|
+
css: inputStyles,
|
|
206
|
+
className: "euiFilePicker__input",
|
|
207
|
+
onChange: _this2.handleChange,
|
|
208
|
+
ref: function ref(input) {
|
|
209
|
+
_this2.fileInput = input;
|
|
210
|
+
},
|
|
211
|
+
onDragOver: _this2.showDrop,
|
|
212
|
+
onDragLeave: _this2.hideDrop,
|
|
213
|
+
onDrop: _this2.hideDrop,
|
|
214
|
+
disabled: disabled,
|
|
215
|
+
"aria-describedby": promptId
|
|
216
|
+
}, rest))), (0, _react2.jsx)("div", {
|
|
217
|
+
css: promptStyles,
|
|
218
|
+
className: "euiFilePicker__prompt",
|
|
219
|
+
id: promptId
|
|
220
|
+
}, (0, _react2.jsx)(_icon.EuiIcon, {
|
|
221
|
+
css: iconStyles,
|
|
222
|
+
className: "euiFilePicker__icon",
|
|
223
|
+
color: iconColor,
|
|
224
|
+
type: isInvalid ? 'alert' : disabled ? 'minusInCircle' : 'importAction',
|
|
225
|
+
size: normalFormControl ? 'm' : 'l',
|
|
226
|
+
"aria-hidden": "true"
|
|
227
|
+
}), (0, _react2.jsx)("span", {
|
|
228
|
+
className: "euiFilePicker__promptText"
|
|
229
|
+
}, _this2.state.promptText || initialPromptText), clearButton, loader));
|
|
235
230
|
});
|
|
236
231
|
}
|
|
237
232
|
}]);
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.euiFilePickerStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
|
-
var _services = require("../../../services");
|
|
9
8
|
var _global_styling = require("../../../global_styling");
|
|
10
9
|
var _form = require("../form.styles");
|
|
11
10
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } /*
|
|
@@ -42,17 +41,16 @@ var _ref3 = process.env.NODE_ENV === "production" ? {
|
|
|
42
41
|
var euiFilePickerStyles = exports.euiFilePickerStyles = function euiFilePickerStyles(euiThemeContext) {
|
|
43
42
|
var euiTheme = euiThemeContext.euiTheme,
|
|
44
43
|
highContrastMode = euiThemeContext.highContrastMode;
|
|
45
|
-
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
46
44
|
var formStyles = (0, _form.euiFormControlStyles)(euiThemeContext);
|
|
47
45
|
var formVariables = (0, _form.euiFormVariables)(euiThemeContext);
|
|
48
46
|
var _euiFontSize = (0, _global_styling.euiFontSize)(euiThemeContext, 's'),
|
|
49
47
|
fontSize = _euiFontSize.fontSize,
|
|
50
48
|
lineHeight = _euiFontSize.lineHeight;
|
|
51
49
|
return {
|
|
52
|
-
euiFilePicker: /*#__PURE__*/(0, _react.css)("--euiFormControlLeftIconsCount:1;position:relative;border-radius:", formVariables.controlBorderRadius, ";&:has(input:focus){--euiFormControlStateColor:", formVariables.borderFocused, ";}&:hover{--euiFormControlStateColor:", highContrastMode ? euiTheme.border.color : formVariables.borderHovered, ";--euiFormControlStateStyle:
|
|
50
|
+
euiFilePicker: /*#__PURE__*/(0, _react.css)("--euiFormControlLeftIconsCount:1;position:relative;border-radius:", formVariables.controlBorderRadius, ";&:has(input:focus){--euiFormControlStateColor:", formVariables.borderFocused, ";}&:hover{--euiFormControlStateColor:", highContrastMode ? euiTheme.border.color : formVariables.borderHovered, ";--euiFormControlStateStyle:solid;}&:focus-within{", (0, _global_styling.highContrastModeStyles)(euiThemeContext, {
|
|
53
51
|
forced: "\n ".concat((0, _form.euiFormControlShowBackgroundLine)(euiThemeContext, formVariables.borderFocused), "\n ")
|
|
54
52
|
}), ";};label:euiFilePicker;"),
|
|
55
|
-
isDroppingFile: /*#__PURE__*/(0, _react.css)("--euiFormControlStateColor:",
|
|
53
|
+
isDroppingFile: /*#__PURE__*/(0, _react.css)("--euiFormControlStateColor:", euiTheme.colors.borderStrongSuccess, ";--euiFormControlStateStyle:", highContrastMode === 'forced' ? 'solid' : 'dashed', ";background-color:", euiTheme.components.forms.backgroundDropping, ";;label:isDroppingFile;"),
|
|
56
54
|
invalid: /*#__PURE__*/(0, _react.css)("--euiFormControlStateColor:", formVariables.borderInvalid, ";&:hover{--euiFormControlStateColor:", formVariables.borderInvalidHovered, ";}", (0, _global_styling.highContrastModeStyles)(euiThemeContext, {
|
|
57
55
|
forced: "\n ".concat((0, _form.euiFormControlShowBackgroundLine)(euiThemeContext, formVariables.borderInvalid), "\n ")
|
|
58
56
|
}), ";;label:invalid;"),
|
|
@@ -64,11 +62,11 @@ var euiFilePickerStyles = exports.euiFilePickerStyles = function euiFilePickerSt
|
|
|
64
62
|
// The input is an invisible dropzone / button
|
|
65
63
|
input: {
|
|
66
64
|
euiFilePicker__input: _ref3,
|
|
67
|
-
largeInteractive: /*#__PURE__*/(0, _react.css)("&:hover,&:focus,.euiFilePicker-isDroppingFile &{&+.euiFilePicker__prompt{.euiFilePicker__promptText{
|
|
65
|
+
largeInteractive: /*#__PURE__*/(0, _react.css)("&:hover,&:focus,.euiFilePicker-isDroppingFile &{&+.euiFilePicker__prompt{.euiFilePicker__promptText{", (0, _global_styling.highContrastModeStyles)(euiThemeContext, {
|
|
68
66
|
forced: "\n text-decoration: underline;\n "
|
|
69
|
-
}), ";}.euiFilePicker__icon{transform:scale(
|
|
67
|
+
}), ";}.euiFilePicker__icon{transform:scale(1.05);}}};label:largeInteractive;")
|
|
70
68
|
},
|
|
71
|
-
euiFilePicker__prompt: /*#__PURE__*/(0, _react.css)("pointer-events:none;font-size:", fontSize, ";line-height:1;", (0, _global_styling.euiTextTruncate)(), " color:", euiTheme.colors.textParagraph, ";border:",
|
|
69
|
+
euiFilePicker__prompt: /*#__PURE__*/(0, _react.css)("pointer-events:none;font-size:", fontSize, ";line-height:1;", (0, _global_styling.euiTextTruncate)(), " color:", euiTheme.colors.textParagraph, ";border:", euiTheme.border.width.thin, " var(--euiFormControlStateStyle, dashed) var(--euiFormControlStateColor, ", formVariables.borderColor, ");", _global_styling.euiCanAnimate, "{transition:border-color ", euiTheme.animation.fast, " ease-in,background-color ", euiTheme.animation.fast, " ease-in;};label:euiFilePicker__prompt;"),
|
|
72
70
|
disabled: /*#__PURE__*/(0, _react.css)(formStyles.disabled, ";label:disabled;"),
|
|
73
71
|
// Skip the css() on the default height to avoid generating a className
|
|
74
72
|
uncompressed: formStyles.uncompressed,
|
|
@@ -34,7 +34,6 @@ var euiFormPlaceholderStyles = exports.euiFormPlaceholderStyles = function euiFo
|
|
|
34
34
|
var euiFormVariables = exports.euiFormVariables = function euiFormVariables(euiThemeContext) {
|
|
35
35
|
var euiTheme = euiThemeContext.euiTheme,
|
|
36
36
|
highContrastMode = euiThemeContext.highContrastMode;
|
|
37
|
-
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
38
37
|
var backgroundColor = highContrastMode ? euiTheme.colors.emptyShade : euiTheme.components.forms.background;
|
|
39
38
|
var controlHeight = euiTheme.size.xxl;
|
|
40
39
|
var controlCompressedHeight = euiTheme.size.xl;
|
|
@@ -44,12 +43,12 @@ var euiFormVariables = exports.euiFormVariables = function euiFormVariables(euiT
|
|
|
44
43
|
controlCompressedHeight: controlCompressedHeight,
|
|
45
44
|
controlPadding: euiTheme.size.m,
|
|
46
45
|
controlCompressedPadding: euiTheme.size.s,
|
|
47
|
-
controlBorderRadius:
|
|
46
|
+
controlBorderRadius: euiTheme.border.radius.small,
|
|
48
47
|
controlCompressedBorderRadius: euiTheme.border.radius.small,
|
|
49
48
|
iconAffordance: (0, _global_styling.mathWithUnits)(euiTheme.size.base, function (x) {
|
|
50
49
|
return x * 1.5;
|
|
51
50
|
}),
|
|
52
|
-
iconCompressedAffordance: (0, _global_styling.mathWithUnits)(
|
|
51
|
+
iconCompressedAffordance: (0, _global_styling.mathWithUnits)(euiTheme.size.base, function (x) {
|
|
53
52
|
return x * 1.5;
|
|
54
53
|
}),
|
|
55
54
|
stateUnderlineHeight: highContrastMode ? (0, _global_styling.mathWithUnits)(euiTheme.border.width.thick, function (x) {
|
|
@@ -69,7 +68,7 @@ var euiFormVariables = exports.euiFormVariables = function euiFormVariables(euiT
|
|
|
69
68
|
borderInvalidHovered: euiTheme.components.forms.borderInvalidHovered,
|
|
70
69
|
controlDisabledColor: euiTheme.components.forms.controlBackgroundDisabled,
|
|
71
70
|
controlBoxShadow: '0 0 transparent',
|
|
72
|
-
controlPlaceholderText:
|
|
71
|
+
controlPlaceholderText: highContrastMode ? (0, _services.makeHighContrastColor)(euiTheme.components.forms.colorDisabled)(backgroundColor) : euiTheme.components.forms.colorDisabled,
|
|
73
72
|
appendPrependBackground: euiTheme.components.forms.prependBackground
|
|
74
73
|
};
|
|
75
74
|
var controlLayout = {
|
|
@@ -96,7 +95,6 @@ var euiFormVariables = exports.euiFormVariables = function euiFormVariables(euiT
|
|
|
96
95
|
};
|
|
97
96
|
var formControlLayoutWrapperSelector = '.euiFormControlLayout__childrenWrapper';
|
|
98
97
|
var euiFormControlStyles = exports.euiFormControlStyles = function euiFormControlStyles(euiThemeContext) {
|
|
99
|
-
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
100
98
|
var form = euiFormVariables(euiThemeContext);
|
|
101
99
|
return {
|
|
102
100
|
shared: "\n ".concat(euiFormControlText(euiThemeContext), "\n ").concat(euiFormControlDefaultShadow(euiThemeContext), "\n "),
|
|
@@ -107,7 +105,7 @@ var euiFormControlStyles = exports.euiFormControlStyles = function euiFormContro
|
|
|
107
105
|
inGroup: "\n ".concat((0, _global_styling.logicalCSS)('height', '100%'), "\n ").concat((0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
|
|
108
106
|
none: 'box-shadow: none;',
|
|
109
107
|
preferred: 'border: none;'
|
|
110
|
-
}), "\n border-radius:
|
|
108
|
+
}), "\n border-radius: inherit;\n "),
|
|
111
109
|
// Widths
|
|
112
110
|
formWidth: "\n ".concat((0, _global_styling.logicalCSS)('max-width', form.maxWidth), "\n ").concat((0, _global_styling.logicalCSS)('width', '100%'), "\n "),
|
|
113
111
|
fullWidth: "\n ".concat((0, _global_styling.logicalCSS)('max-width', '100%'), "\n ").concat((0, _global_styling.logicalCSS)('width', '100%'), "\n "),
|
|
@@ -133,29 +131,21 @@ var euiFormControlDefaultShadow = exports.euiFormControlDefaultShadow = function
|
|
|
133
131
|
_ref2$withBackground = _ref2.withBackground,
|
|
134
132
|
withBackground = _ref2$withBackground === void 0 ? true : _ref2$withBackground,
|
|
135
133
|
_ref2$withBackgroundC = _ref2.withBackgroundColor,
|
|
136
|
-
withBackgroundColor = _ref2$withBackgroundC === void 0 ? withBackground : _ref2$withBackgroundC
|
|
137
|
-
_ref2$withBackgroundA = _ref2.withBackgroundAnimation,
|
|
138
|
-
withBackgroundAnimation = _ref2$withBackgroundA === void 0 ? withBackground : _ref2$withBackgroundA;
|
|
134
|
+
withBackgroundColor = _ref2$withBackgroundC === void 0 ? withBackground : _ref2$withBackgroundC;
|
|
139
135
|
var euiTheme = euiThemeContext.euiTheme;
|
|
140
|
-
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
141
136
|
var form = euiFormVariables(euiThemeContext);
|
|
142
137
|
var border = (0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
|
|
143
138
|
// We use inset box-shadow instead of border to skip extra height calculations
|
|
144
|
-
none:
|
|
139
|
+
none: "\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 "),
|
|
145
140
|
// In high contrast mode, this doesn't matter - we need to prioritize visibility
|
|
146
141
|
preferred: "\n border: ".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.border.color, ";\n\n ").concat(euiFormControlHoverStyles(euiThemeContext), "\n ")
|
|
147
142
|
});
|
|
148
143
|
var backgroundColor = "\n background-color: ".concat(form.backgroundColor, ";\n ").trim();
|
|
149
144
|
var backgroundGradient = (0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
|
|
150
|
-
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) {
|
|
151
|
-
return x + y;
|
|
152
|
-
} // account for pseudo element border
|
|
153
|
-
) : form.stateUnderlineHeight, ",\n transparent ").concat(form.stateUnderlineHeight, ",\n transparent 100%\n );\n ") : '',
|
|
154
145
|
// Windows high contrast mode overrides/hides background gradients - we'll need another approach
|
|
155
146
|
forced: "\n background-repeat: no-repeat;\n background-size: 0% ".concat(form.stateUnderlineHeight, ";\n background-position: bottom left;\n background-origin: border-box;\n ")
|
|
156
147
|
});
|
|
157
|
-
|
|
158
|
-
return "\n ".concat(withBorder ? border : '', "\n ").concat(withBackgroundColor ? backgroundColor : '', "\n ").concat(withBackground ? backgroundGradient : '', "\n ").concat(withBackgroundAnimation ? backgroundAnimation : '', "\n ");
|
|
148
|
+
return "\n ".concat(withBorder ? border : '', "\n ").concat(withBackgroundColor ? backgroundColor : '', "\n ").concat(withBackground ? backgroundGradient : '', "\n ");
|
|
159
149
|
};
|
|
160
150
|
var hoverSelector = '&:hover:not(:disabled, :focus, input[readonly], [class*="readOnly"])';
|
|
161
151
|
var disableFormControlHoverStyles = exports.disableFormControlHoverStyles = function disableFormControlHoverStyles() {
|
|
@@ -170,43 +160,33 @@ var euiFormControlHoverStyles = exports.euiFormControlHoverStyles = function eui
|
|
|
170
160
|
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";
|
|
171
161
|
var euiFormControlFocusStyles = exports.euiFormControlFocusStyles = function euiFormControlFocusStyles(euiThemeContext) {
|
|
172
162
|
var euiTheme = euiThemeContext.euiTheme;
|
|
173
|
-
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
174
163
|
var form = euiFormVariables(euiThemeContext);
|
|
175
164
|
var focusColor = euiTheme.colors.primary;
|
|
176
|
-
return
|
|
165
|
+
return "\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, {
|
|
177
166
|
forced: "\n ".concat(euiFormControlShowBackgroundLine(euiThemeContext, focusColor), "\n ")
|
|
178
|
-
}), "\n ")
|
|
167
|
+
}), "\n ");
|
|
179
168
|
};
|
|
180
169
|
var euiFormControlInvalidStyles = exports.euiFormControlInvalidStyles = function euiFormControlInvalidStyles(euiThemeContext) {
|
|
181
170
|
var euiTheme = euiThemeContext.euiTheme,
|
|
182
171
|
highContrastMode = euiThemeContext.highContrastMode;
|
|
183
|
-
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
184
172
|
var form = euiFormVariables(euiThemeContext);
|
|
185
173
|
var invalidColor = euiTheme.colors.danger;
|
|
186
|
-
return
|
|
174
|
+
return "\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 ");
|
|
187
175
|
};
|
|
188
176
|
var euiFormControlDisabledStyles = exports.euiFormControlDisabledStyles = function euiFormControlDisabledStyles(euiThemeContext) {
|
|
189
|
-
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
190
177
|
var form = euiFormVariables(euiThemeContext);
|
|
191
|
-
|
|
192
|
-
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(euiFormPlaceholderStyles(euiThemeContext)), "\n ");
|
|
178
|
+
return "\n --euiFormControlStateColor: transparent;\n --euiFormControlStateHoverColor: transparent;\n --euiFormControlStateColor: ".concat(form.borderColor, ";\n\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 \n ").concat(euiPlaceholderPerBrowser(euiFormPlaceholderStyles(euiThemeContext)), "\n ");
|
|
193
179
|
};
|
|
194
180
|
var euiFormControlReadOnlyStyles = exports.euiFormControlReadOnlyStyles = function euiFormControlReadOnlyStyles(euiThemeContext) {
|
|
195
181
|
var euiTheme = euiThemeContext.euiTheme;
|
|
196
|
-
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
197
182
|
var form = euiFormVariables(euiThemeContext);
|
|
198
|
-
|
|
183
|
+
return "\n --euiFormControlStateColor: ".concat(form.borderColor, ";\n --euiFormControlStateHoverColor: ").concat(form.borderColor, ";\n --euiFormControlStateWidth: ").concat(euiTheme.border.width.thin, ";\n\n /* keep the input below wrapper borders */\n position: relative;\n z-index: 0;\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 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\n ").concat((0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
|
|
199
184
|
preferred: 'box-shadow: none;'
|
|
200
|
-
}), "\n
|
|
201
|
-
forced: 'background-image: none;'
|
|
202
|
-
}), "\n ");
|
|
203
|
-
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 ");
|
|
185
|
+
}), "\n ");
|
|
204
186
|
};
|
|
205
187
|
var euiFormControlAutoFillStyles = exports.euiFormControlAutoFillStyles = function euiFormControlAutoFillStyles(euiThemeContext) {
|
|
206
188
|
var euiTheme = euiThemeContext.euiTheme;
|
|
207
|
-
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
208
189
|
var form = euiFormVariables(euiThemeContext);
|
|
209
|
-
|
|
210
190
|
// Make the text color slightly less prominent than the default colors.text
|
|
211
191
|
var textColor = euiTheme.colors.darkestShade;
|
|
212
192
|
var tintedBackgroundColor = euiTheme.components.forms.backgroundAutofilled;
|
|
@@ -223,15 +203,13 @@ var euiFormControlAutoFillStyles = exports.euiFormControlAutoFillStyles = functi
|
|
|
223
203
|
var borderShadow = function borderShadow(color) {
|
|
224
204
|
return "inset 0 0 0 ".concat(euiTheme.border.width.thin, " ").concat(color);
|
|
225
205
|
};
|
|
226
|
-
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 ");
|
|
227
206
|
|
|
228
207
|
// These styles only apply/override Chrome/webkit browsers - Firefox does not set autofill styles
|
|
229
|
-
return "\n &:-webkit-autofill {\n -webkit-text-fill-color: ".concat(textColor, ";\n -webkit-box-shadow: ").concat(borderShadow(borderColor), ", ").concat(backgroundShadow, ";\n\n ").concat(
|
|
208
|
+
return "\n &:-webkit-autofill {\n -webkit-text-fill-color: ".concat(textColor, ";\n -webkit-box-shadow: ").concat(borderShadow(borderColor), ", ").concat(backgroundShadow, ";\n\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 ");
|
|
230
209
|
};
|
|
231
210
|
var euiFormControlShowBackgroundLine = exports.euiFormControlShowBackgroundLine = function euiFormControlShowBackgroundLine(euiThemeContext, color) {
|
|
232
211
|
var euiTheme = euiThemeContext.euiTheme,
|
|
233
212
|
highContrastMode = euiThemeContext.highContrastMode;
|
|
234
|
-
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
235
213
|
if (highContrastMode !== 'forced') {
|
|
236
214
|
return 'background-size: 100% 100%;';
|
|
237
215
|
}
|
|
@@ -243,13 +221,12 @@ var euiFormControlShowBackgroundLine = exports.euiFormControlShowBackgroundLine
|
|
|
243
221
|
// using a static inline SVG workaround
|
|
244
222
|
var fill = encodeURIComponent(color);
|
|
245
223
|
var strokeWidth = stateUnderlineHeight !== null && stateUnderlineHeight !== void 0 ? stateUnderlineHeight : '4px';
|
|
246
|
-
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");
|
|
247
224
|
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");
|
|
248
|
-
return
|
|
225
|
+
return "\n background-size: calc(100% - ".concat((0, _global_styling.mathWithUnits)(strokeWidth, function (x) {
|
|
249
226
|
return x / 2;
|
|
250
227
|
}), ") calc(100% - ").concat((0, _global_styling.mathWithUnits)(strokeWidth, function (x) {
|
|
251
228
|
return x / 2;
|
|
252
|
-
}), ");\n background-position: ").concat(euiTheme.border.width.thin, ";\n background-image: url(\"").concat(refreshInlineSVG, "\");\n ")
|
|
229
|
+
}), ");\n background-position: ").concat(euiTheme.border.width.thin, ";\n background-image: url(\"").concat(refreshInlineSVG, "\");\n ");
|
|
253
230
|
};
|
|
254
231
|
var euiPlaceholderPerBrowser = function euiPlaceholderPerBrowser(content) {
|
|
255
232
|
return "\n &::-webkit-input-placeholder { ".concat(content, " }\n &::-moz-placeholder { ").concat(content, " }\n &:-moz-placeholder { ").concat(content, " }\n &::placeholder { ").concat(content, " }\n");
|
|
@@ -5,7 +5,6 @@ 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");
|
|
9
8
|
var _global_styling = require("../../../global_styling");
|
|
10
9
|
var _high_contrast = require("../../../global_styling/functions/high_contrast");
|
|
11
10
|
var _form = require("../form.styles");
|
|
@@ -34,12 +33,7 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
34
33
|
};
|
|
35
34
|
var euiFormControlLayoutStyles = exports.euiFormControlLayoutStyles = function euiFormControlLayoutStyles(euiThemeContext) {
|
|
36
35
|
var euiTheme = euiThemeContext.euiTheme;
|
|
37
|
-
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
38
36
|
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 border-radius: inherit;\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 border-radius: inherit;\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 ");
|
|
43
37
|
return {
|
|
44
38
|
euiFormControlLayout: _ref2,
|
|
45
39
|
// Skip the css`` on the default height to avoid generating a className
|
|
@@ -49,41 +43,34 @@ var euiFormControlLayoutStyles = exports.euiFormControlLayoutStyles = function e
|
|
|
49
43
|
formWidth: "\n ".concat((0, _global_styling.logicalCSS)('max-width', form.maxWidth), "\n ").concat((0, _global_styling.logicalCSS)('width', '100%'), "\n "),
|
|
50
44
|
fullWidth: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-width', '100%'), " ", (0, _global_styling.logicalCSS)('width', '100%'), ";;label:fullWidth;"),
|
|
51
45
|
group: {
|
|
52
|
-
group: /*#__PURE__*/(0, _react.css)("position:relative;display:flex;align-items:stretch;border:",
|
|
46
|
+
group: /*#__PURE__*/(0, _react.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;", (0, _global_styling.logicalCSS)('padding-right', euiTheme.border.width.thin), " &::after{display:none;}}.euiFilterButton__wrapper:first-of-type::before,.euiFilterButton__wrapper::after{display:none;}.euiFormControlButton{border-radius:inherit;box-shadow:none;}>*{", (0, _global_styling.logicalCSS)('height', '100%'), ";};label:group;"),
|
|
53
47
|
// Skipping css`` to avoid repeated compressed/uncompressed classNames
|
|
54
48
|
uncompressed: "\n border-radius: ".concat(form.controlBorderRadius, ";\n "),
|
|
55
49
|
compressed: "\n border-radius: ".concat(form.controlCompressedBorderRadius, ";\n ")
|
|
56
50
|
},
|
|
57
51
|
children: {
|
|
58
52
|
euiFormControlLayout__childrenWrapper: _ref,
|
|
59
|
-
inGroup: /*#__PURE__*/(0, _react.css)("flex-grow:1;overflow:hidden;",
|
|
60
|
-
prependOnly: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top-right-radius', 'inherit'), " ", (0, _global_styling.logicalCSS)('border-bottom-right-radius', 'inherit'), " ",
|
|
61
|
-
appendOnly: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top-left-radius', 'inherit'), " ", (0, _global_styling.logicalCSS)('border-bottom-left-radius', 'inherit'), " ",
|
|
53
|
+
inGroup: /*#__PURE__*/(0, _react.css)("flex-grow:1;overflow:hidden;>:first-child{border-radius:inherit;", (0, _global_styling.logicalCSS)('border-top-left-radius', '0'), " ", (0, _global_styling.logicalCSS)('border-bottom-left-radius', '0'), ";}>:last-child{border-radius:inherit;", (0, _global_styling.logicalCSS)('border-top-right-radius', '0'), " ", (0, _global_styling.logicalCSS)('border-bottom-right-radius', '0'), ";};label: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'), ">:last-child{", (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'), ">:first-child{", (0, _global_styling.logicalCSS)('border-top-left-radius', 'inherit'), " ", (0, _global_styling.logicalCSS)('border-bottom-left-radius', 'inherit'), ";};label:appendOnly;")
|
|
62
56
|
}
|
|
63
57
|
};
|
|
64
58
|
};
|
|
65
59
|
var euiFormControlLayoutSideNodeStyles = exports.euiFormControlLayoutSideNodeStyles = function euiFormControlLayoutSideNodeStyles(euiThemeContext) {
|
|
66
60
|
var euiTheme = euiThemeContext.euiTheme;
|
|
67
|
-
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
68
61
|
var form = (0, _form.euiFormVariables)(euiThemeContext);
|
|
69
|
-
var uncompressedHeight =
|
|
70
|
-
|
|
71
|
-
});
|
|
72
|
-
var compressedHeight = (0, _global_styling.mathWithUnits)([form.controlCompressedHeight, euiTheme.border.width.thin], function (x, y) {
|
|
73
|
-
return isRefreshVariant ? x : x - y * 2;
|
|
74
|
-
});
|
|
62
|
+
var uncompressedHeight = form.controlHeight;
|
|
63
|
+
var compressedHeight = form.controlCompressedHeight;
|
|
75
64
|
var buttons = '*:is(.euiButton, .euiButtonEmpty, .euiButtonIcon)';
|
|
76
65
|
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 ");
|
|
79
66
|
return {
|
|
80
67
|
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;"),
|
|
81
68
|
append: /*#__PURE__*/(0, _react.css)((0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
|
|
82
|
-
none: "\n ".concat(
|
|
69
|
+
none: "\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 "),
|
|
83
70
|
preferred: (0, _global_styling.logicalCSS)('border-left', euiTheme.border.thin)
|
|
84
71
|
}), ";label:append;"),
|
|
85
72
|
prepend: /*#__PURE__*/(0, _react.css)((0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
|
|
86
|
-
none: "\n ".concat(
|
|
73
|
+
none: "\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 "),
|
|
87
74
|
preferred: (0, _global_styling.logicalCSS)('border-right', euiTheme.border.thin)
|
|
88
75
|
}), ";label:prepend;"),
|
|
89
76
|
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 "),
|
|
@@ -6,7 +6,6 @@ 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");
|
|
10
9
|
/*
|
|
11
10
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
12
11
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -18,10 +17,9 @@ var _services = require("../../../services");
|
|
|
18
17
|
var EuiFormControlLayoutClearButtonStyles = exports.EuiFormControlLayoutClearButtonStyles = function EuiFormControlLayoutClearButtonStyles(euiThemeContext) {
|
|
19
18
|
var euiTheme = euiThemeContext.euiTheme,
|
|
20
19
|
highContrastMode = euiThemeContext.highContrastMode;
|
|
21
|
-
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'formVariant');
|
|
22
20
|
var backgroundColor = highContrastMode ? euiTheme.colors.darkShade : euiTheme.components.forms.clearButtonBackground;
|
|
23
21
|
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:",
|
|
22
|
+
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.backgroundBaseDisabled, ";};label:euiFormControlLayoutClearButton;"),
|
|
25
23
|
size: {
|
|
26
24
|
s: "\n ".concat((0, _global_styling.logicalSizeCSS)(euiTheme.size.m), "\n border-width: ").concat((0, _global_styling.mathWithUnits)(euiTheme.size.m, function (x) {
|
|
27
25
|
return x / 2;
|
|
@@ -41,8 +41,6 @@ var EuiFormControlLayoutDelimited = exports.EuiFormControlLayoutDelimited = func
|
|
|
41
41
|
className = _ref.className,
|
|
42
42
|
_fullWidth = _ref.fullWidth,
|
|
43
43
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
44
|
-
var euiThemeContext = (0, _services.useEuiTheme)();
|
|
45
|
-
var isRefreshVariant = (0, _services.useEuiThemeRefreshVariant)('formVariant');
|
|
46
44
|
var _useFormContext = (0, _eui_form_context.useFormContext)(),
|
|
47
45
|
defaultFullWidth = _useFormContext.defaultFullWidth;
|
|
48
46
|
var fullWidth = _fullWidth !== null && _fullWidth !== void 0 ? _fullWidth : defaultFullWidth;
|
|
@@ -55,7 +53,7 @@ var EuiFormControlLayoutDelimited = exports.EuiFormControlLayoutDelimited = func
|
|
|
55
53
|
});
|
|
56
54
|
var styles = (0, _services.useEuiMemoizedStyles)(_form_control_layout_delimited.euiFormControlLayoutDelimitedStyles);
|
|
57
55
|
var cssStyles = [styles.delimited, rest.isDisabled && styles.disabled, rest.readOnly && styles.readOnly];
|
|
58
|
-
var wrapperStyles = [styles.childrenWrapper.delimited, showInvalidState && styles.childrenWrapper.invalid, (_rest$wrapperProps = rest.wrapperProps) === null || _rest$wrapperProps === void 0 ? void 0 : _rest$wrapperProps.css,
|
|
56
|
+
var wrapperStyles = [styles.childrenWrapper.delimited, showInvalidState && styles.childrenWrapper.invalid, (_rest$wrapperProps = rest.wrapperProps) === null || _rest$wrapperProps === void 0 ? void 0 : _rest$wrapperProps.css, rest.readOnly && styles.childrenWrapper.readOnly];
|
|
59
57
|
return (0, _react2.jsx)(_form_control_layout.EuiFormControlLayout, _extends({
|
|
60
58
|
isDelimited: true,
|
|
61
59
|
css: cssStyles,
|
|
@@ -70,10 +68,10 @@ var EuiFormControlLayoutDelimited = exports.EuiFormControlLayoutDelimited = func
|
|
|
70
68
|
value: {
|
|
71
69
|
defaultFullWidth: fullWidth
|
|
72
70
|
}
|
|
73
|
-
}, startControl && addClassesToControl(
|
|
71
|
+
}, startControl && addClassesToControl(startControl), (0, _react2.jsx)(EuiFormControlDelimiter, {
|
|
74
72
|
delimiter: delimiter,
|
|
75
73
|
isInvalid: showInvalidState
|
|
76
|
-
}), endControl && addClassesToControl(
|
|
74
|
+
}), endControl && addClassesToControl(endControl)));
|
|
77
75
|
};
|
|
78
76
|
EuiFormControlLayoutDelimited.propTypes = {
|
|
79
77
|
/**
|
|
@@ -91,9 +89,9 @@ EuiFormControlLayoutDelimited.propTypes = {
|
|
|
91
89
|
delimiter: _propTypes.default.node,
|
|
92
90
|
className: _propTypes.default.string
|
|
93
91
|
};
|
|
94
|
-
var addClassesToControl = function addClassesToControl(
|
|
92
|
+
var addClassesToControl = function addClassesToControl(control) {
|
|
95
93
|
return (0, _services.cloneElementWithCss)(control, {
|
|
96
|
-
css:
|
|
94
|
+
css: _form_control_layout_delimited.euiFormControlLayoutDelimited__input,
|
|
97
95
|
className: (0, _classnames.default)(control.props.className, 'euiFormControlLayoutDelimited__input')
|
|
98
96
|
}, 'before');
|
|
99
97
|
};
|