@elastic/eui 108.0.0 → 109.1.0-snapshot.1763390960850
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/accessibility/skip_link/skip_link.js +10 -1
- package/es/components/basic_table/collapsed_item_actions.js +3 -1
- package/es/components/basic_table/default_item_action.js +7 -4
- package/es/components/bottom_bar/bottom_bar.js +12 -2
- package/es/components/button/button.js +20 -25
- package/es/components/button/button_display/_button_display.js +32 -30
- package/es/components/button/button_display/_button_display.styles.js +4 -4
- package/es/components/button/button_empty/button_empty.js +32 -14
- package/es/components/button/button_group/button_group.js +49 -31
- package/es/components/button/button_group/button_group_button.js +16 -5
- package/es/components/button/button_group/button_group_button.styles.js +12 -8
- package/es/components/button/button_icon/button_icon.js +30 -6
- package/es/components/card/card.js +20 -25
- package/es/components/card/card_select/card_select.js +20 -25
- package/es/components/code/code_block_virtualized.js +9 -7
- package/es/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +13 -1
- package/es/components/datagrid/body/cell/data_grid_cell.js +35 -12
- package/es/components/datagrid/body/data_grid_body.js +23 -6
- package/es/components/datagrid/body/data_grid_body_custom.js +23 -6
- package/es/components/datagrid/body/data_grid_body_virtualized.js +23 -6
- package/es/components/datagrid/body/header/column_actions.js +5 -21
- package/es/components/datagrid/body/header/data_grid_header_cell.js +29 -10
- package/es/components/datagrid/body/header/data_grid_header_cell.styles.js +8 -2
- package/es/components/datagrid/body/header/data_grid_header_cell_wrapper.js +5 -2
- package/es/components/datagrid/controls/column_selector.js +36 -19
- package/es/components/datagrid/controls/column_sorting.js +23 -6
- package/es/components/datagrid/controls/data_grid_toolbar_control.js +13 -7
- package/es/components/datagrid/data_grid.js +5 -1
- package/es/components/datagrid/utils/in_memory.js +25 -7
- package/es/components/date_picker/auto_refresh/auto_refresh.js +11 -2
- package/es/components/date_picker/super_date_picker/date_popover/absolute_tab.js +31 -5
- package/es/components/date_picker/super_date_picker/date_popover/date_popover_button.js +24 -3
- package/es/components/date_picker/super_date_picker/date_popover/date_popover_content.js +26 -4
- package/es/components/date_picker/super_date_picker/date_popover/relative_tab.js +29 -3
- package/es/components/date_picker/super_date_picker/date_popover/timezone_display.js +98 -0
- package/es/components/date_picker/super_date_picker/date_popover/timezone_display.styles.js +19 -0
- package/es/components/date_picker/super_date_picker/pretty_duration.js +1 -8
- package/es/components/date_picker/super_date_picker/relative_utils.js +8 -0
- package/es/components/date_picker/super_date_picker/super_date_picker.js +118 -26
- package/es/components/date_picker/super_date_picker/time_window_buttons.js +185 -0
- package/es/components/facet/facet_button.js +9 -19
- package/es/components/filter_group/filter_button.js +14 -1
- package/es/components/flyout/flyout.js +27 -10
- package/es/components/form/file_picker/file_picker.styles.js +3 -3
- package/es/components/form/form_control_button/form_control_button.js +13 -7
- package/es/components/header/header_links/header_link.js +13 -7
- package/es/components/header/header_section/header_section_item_button.js +13 -7
- package/es/components/icon/assets/boxes_vertical.js +1 -1
- package/es/components/icon/assets/checkInCircleFilled.js +1 -2
- package/es/components/icon/assets/errorFilled.js +1 -2
- package/es/components/icon/assets/paper_clip.js +1 -1
- package/es/components/icon/assets/streams_wired.js +3 -2
- package/es/components/icon/assets/warningFilled.js +1 -2
- package/es/components/icon/icon_map.js +3 -6
- package/es/components/list_group/list_group.js +13 -1
- package/es/components/list_group/list_group_item.js +13 -1
- package/es/components/list_group/list_group_item_extra_action.js +13 -1
- package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +15 -2
- package/es/components/overlay_mask/overlay_mask.styles.js +1 -1
- package/es/components/pagination/pagination_button.js +13 -7
- package/es/components/popover/popover.js +22 -16
- package/es/components/provider/component_defaults/component_defaults.js +22 -2
- package/es/components/table/table_row.styles.js +1 -1
- package/es/components/tool_tip/tool_tip.js +24 -24
- package/es/global_styling/index.js +2 -1
- package/es/global_styling/mixins/_button.js +1 -1
- package/es/global_styling/utility/selectors.js +9 -0
- package/es/services/focus_trap/focus_trap_pub_sub.js +74 -0
- package/es/services/focus_trap/index.js +9 -0
- package/es/services/hooks/index.js +2 -1
- package/es/services/hooks/useEuiDisabledElement.js +195 -0
- package/es/services/index.js +1 -0
- package/es/services/popover/reposition_on_scroll.js +61 -0
- package/es/services/theme/high_contrast_overrides.js +5 -1
- package/es/test/cypress/index.d.ts +12 -0
- package/es/test/cypress/index.js +9 -0
- package/es/test/cypress/matchers.d.ts +20 -0
- package/es/test/cypress/matchers.js +54 -0
- package/es/test/cypress/test_reposition_on_scroll.js +66 -0
- package/es/test/enzyme/enzyme_matchers.d.ts +36 -0
- package/es/test/enzyme/enzyme_matchers.js +43 -0
- package/es/test/enzyme/index.d.ts +14 -0
- package/es/test/enzyme/index.js +10 -0
- package/es/test/rtl/index.d.ts +9 -1
- package/es/test/rtl/index.js +2 -1
- package/es/test/rtl/matchers.d.ts +36 -0
- package/es/test/rtl/matchers.js +82 -0
- package/es/utils/element_can_be_disabled.js +16 -0
- package/es/utils/index.js +2 -1
- package/eui.d.ts +604 -183
- package/i18ntokens.json +1357 -1231
- package/lib/components/accessibility/skip_link/skip_link.js +10 -1
- package/lib/components/basic_table/collapsed_item_actions.js +3 -1
- package/lib/components/basic_table/default_item_action.js +7 -4
- package/lib/components/bottom_bar/bottom_bar.js +11 -1
- package/lib/components/button/button.js +21 -26
- package/lib/components/button/button_display/_button_display.js +31 -29
- package/lib/components/button/button_display/_button_display.styles.js +4 -4
- package/lib/components/button/button_empty/button_empty.js +31 -13
- package/lib/components/button/button_group/button_group.js +49 -31
- package/lib/components/button/button_group/button_group_button.js +16 -5
- package/lib/components/button/button_group/button_group_button.styles.js +10 -6
- package/lib/components/button/button_icon/button_icon.js +29 -5
- package/lib/components/card/card.js +21 -26
- package/lib/components/card/card_select/card_select.js +21 -26
- package/lib/components/code/code_block_virtualized.js +9 -7
- package/lib/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +13 -1
- package/lib/components/datagrid/body/cell/data_grid_cell.js +35 -12
- package/lib/components/datagrid/body/data_grid_body.js +23 -6
- package/lib/components/datagrid/body/data_grid_body_custom.js +23 -6
- package/lib/components/datagrid/body/data_grid_body_virtualized.js +23 -6
- package/lib/components/datagrid/body/header/column_actions.js +5 -21
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +29 -10
- package/lib/components/datagrid/body/header/data_grid_header_cell.styles.js +8 -1
- package/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.js +5 -2
- package/lib/components/datagrid/controls/column_selector.js +36 -19
- package/lib/components/datagrid/controls/column_sorting.js +23 -6
- package/lib/components/datagrid/controls/data_grid_toolbar_control.js +13 -7
- package/lib/components/datagrid/data_grid.js +5 -1
- package/lib/components/datagrid/utils/in_memory.js +25 -7
- package/lib/components/date_picker/auto_refresh/auto_refresh.js +12 -3
- package/lib/components/date_picker/super_date_picker/date_popover/absolute_tab.js +30 -4
- package/lib/components/date_picker/super_date_picker/date_popover/date_popover_button.js +24 -3
- package/lib/components/date_picker/super_date_picker/date_popover/date_popover_content.js +26 -4
- package/lib/components/date_picker/super_date_picker/date_popover/relative_tab.js +29 -3
- package/lib/components/date_picker/super_date_picker/date_popover/timezone_display.js +104 -0
- package/lib/components/date_picker/super_date_picker/date_popover/timezone_display.styles.js +25 -0
- package/lib/components/date_picker/super_date_picker/pretty_duration.js +2 -9
- package/lib/components/date_picker/super_date_picker/relative_utils.js +9 -0
- package/lib/components/date_picker/super_date_picker/super_date_picker.js +118 -26
- package/lib/components/date_picker/super_date_picker/time_window_buttons.js +193 -0
- package/lib/components/facet/facet_button.js +9 -19
- package/lib/components/filter_group/filter_button.js +14 -1
- package/lib/components/flyout/flyout.js +26 -9
- package/lib/components/form/file_picker/file_picker.styles.js +3 -3
- package/lib/components/form/form_control_button/form_control_button.js +13 -7
- package/lib/components/header/header_links/header_link.js +13 -7
- package/lib/components/header/header_section/header_section_item_button.js +13 -7
- package/lib/components/icon/assets/boxes_vertical.js +1 -1
- package/lib/components/icon/assets/checkInCircleFilled.js +1 -2
- package/lib/components/icon/assets/errorFilled.js +1 -2
- package/lib/components/icon/assets/paper_clip.js +1 -1
- package/lib/components/icon/assets/streams_wired.js +3 -2
- package/lib/components/icon/assets/warningFilled.js +1 -2
- package/lib/components/icon/icon_map.js +3 -6
- package/lib/components/icon/svgs/boxes_vertical.svg +1 -1
- package/lib/components/icon/svgs/checkInCircleFilled.svg +1 -1
- package/lib/components/icon/svgs/errorFilled.svg +1 -1
- package/lib/components/icon/svgs/paper_clip.svg +3 -3
- package/lib/components/icon/svgs/warningFilled.svg +1 -1
- package/lib/components/list_group/list_group.js +13 -1
- package/lib/components/list_group/list_group_item.js +13 -1
- package/lib/components/list_group/list_group_item_extra_action.js +13 -1
- package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +15 -2
- package/lib/components/overlay_mask/overlay_mask.styles.js +1 -1
- package/lib/components/pagination/pagination_button.js +13 -7
- package/lib/components/popover/popover.js +21 -15
- package/lib/components/provider/component_defaults/component_defaults.js +22 -2
- package/lib/components/table/table_row.styles.js +1 -1
- package/lib/components/tool_tip/tool_tip.js +24 -24
- package/lib/global_styling/index.js +16 -1
- package/lib/global_styling/mixins/_button.js +1 -1
- package/lib/global_styling/utility/selectors.js +15 -0
- package/lib/services/focus_trap/focus_trap_pub_sub.js +80 -0
- package/lib/services/focus_trap/index.js +12 -0
- package/lib/services/hooks/index.js +18 -1
- package/lib/services/hooks/useEuiDisabledElement.js +199 -0
- package/lib/services/index.js +8 -0
- package/lib/services/popover/reposition_on_scroll.js +67 -0
- package/lib/services/theme/high_contrast_overrides.js +5 -1
- package/lib/test/cypress/index.d.ts +12 -0
- package/lib/test/cypress/index.js +18 -0
- package/lib/test/cypress/matchers.d.ts +20 -0
- package/lib/test/cypress/matchers.js +61 -0
- package/lib/test/cypress/test_reposition_on_scroll.js +69 -0
- package/lib/test/enzyme/enzyme_matchers.d.ts +36 -0
- package/lib/test/enzyme/enzyme_matchers.js +49 -0
- package/lib/test/enzyme/index.d.ts +14 -0
- package/lib/test/enzyme/index.js +24 -0
- package/lib/test/rtl/index.d.ts +9 -1
- package/lib/test/rtl/index.js +24 -2
- package/lib/test/rtl/matchers.d.ts +36 -0
- package/lib/test/rtl/matchers.js +86 -0
- package/lib/utils/element_can_be_disabled.js +22 -0
- package/lib/utils/index.js +14 -1
- package/optimize/es/components/basic_table/collapsed_item_actions.js +3 -1
- package/optimize/es/components/basic_table/default_item_action.js +7 -4
- package/optimize/es/components/bottom_bar/bottom_bar.js +12 -2
- package/optimize/es/components/button/button_display/_button_display.js +24 -12
- package/optimize/es/components/button/button_display/_button_display.styles.js +4 -4
- package/optimize/es/components/button/button_empty/button_empty.js +18 -6
- package/optimize/es/components/button/button_group/button_group.js +10 -5
- package/optimize/es/components/button/button_group/button_group_button.js +2 -3
- package/optimize/es/components/button/button_group/button_group_button.styles.js +12 -8
- package/optimize/es/components/button/button_icon/button_icon.js +17 -5
- package/optimize/es/components/code/code_block_virtualized.js +9 -7
- package/optimize/es/components/datagrid/body/header/column_actions.js +5 -21
- package/optimize/es/components/datagrid/body/header/data_grid_header_cell.js +6 -4
- package/optimize/es/components/datagrid/body/header/data_grid_header_cell.styles.js +8 -2
- package/optimize/es/components/datagrid/body/header/data_grid_header_cell_wrapper.js +4 -2
- package/optimize/es/components/datagrid/controls/column_selector.js +36 -19
- package/optimize/es/components/datagrid/data_grid.js +5 -1
- package/optimize/es/components/datagrid/utils/in_memory.js +2 -1
- package/optimize/es/components/date_picker/super_date_picker/date_popover/absolute_tab.js +12 -4
- package/optimize/es/components/date_picker/super_date_picker/date_popover/date_popover_button.js +5 -2
- package/optimize/es/components/date_picker/super_date_picker/date_popover/date_popover_content.js +7 -3
- package/optimize/es/components/date_picker/super_date_picker/date_popover/relative_tab.js +10 -2
- package/optimize/es/components/date_picker/super_date_picker/date_popover/timezone_display.js +97 -0
- package/optimize/es/components/date_picker/super_date_picker/date_popover/timezone_display.styles.js +19 -0
- package/optimize/es/components/date_picker/super_date_picker/pretty_duration.js +1 -8
- package/optimize/es/components/date_picker/super_date_picker/relative_utils.js +8 -0
- package/optimize/es/components/date_picker/super_date_picker/super_date_picker.js +49 -25
- package/optimize/es/components/date_picker/super_date_picker/time_window_buttons.js +185 -0
- package/optimize/es/components/flyout/flyout.js +27 -10
- package/optimize/es/components/form/file_picker/file_picker.styles.js +3 -3
- package/optimize/es/components/icon/assets/boxes_vertical.js +1 -1
- package/optimize/es/components/icon/assets/checkInCircleFilled.js +1 -2
- package/optimize/es/components/icon/assets/errorFilled.js +1 -2
- package/optimize/es/components/icon/assets/paper_clip.js +1 -1
- package/optimize/es/components/icon/assets/streams_wired.js +3 -2
- package/optimize/es/components/icon/assets/warningFilled.js +1 -2
- package/optimize/es/components/icon/icon_map.js +3 -6
- package/optimize/es/components/overlay_mask/overlay_mask.styles.js +1 -1
- package/optimize/es/components/popover/popover.js +22 -16
- package/optimize/es/components/table/table_row.styles.js +1 -1
- package/optimize/es/components/tool_tip/tool_tip.js +24 -24
- package/optimize/es/global_styling/index.js +2 -1
- package/optimize/es/global_styling/mixins/_button.js +1 -1
- package/optimize/es/global_styling/utility/selectors.js +9 -0
- package/optimize/es/services/focus_trap/focus_trap_pub_sub.js +74 -0
- package/optimize/es/services/focus_trap/index.js +9 -0
- package/optimize/es/services/hooks/index.js +2 -1
- package/optimize/es/services/hooks/useEuiDisabledElement.js +192 -0
- package/optimize/es/services/index.js +1 -0
- package/optimize/es/services/popover/reposition_on_scroll.js +61 -0
- package/optimize/es/services/theme/high_contrast_overrides.js +5 -1
- package/optimize/es/test/cypress/index.d.ts +12 -0
- package/optimize/es/test/cypress/index.js +9 -0
- package/optimize/es/test/cypress/matchers.d.ts +20 -0
- package/optimize/es/test/cypress/matchers.js +54 -0
- package/optimize/es/test/cypress/test_reposition_on_scroll.js +63 -0
- package/optimize/es/test/enzyme/enzyme_matchers.d.ts +36 -0
- package/optimize/es/test/enzyme/enzyme_matchers.js +43 -0
- package/optimize/es/test/enzyme/index.d.ts +14 -0
- package/optimize/es/test/enzyme/index.js +10 -0
- package/optimize/es/test/rtl/index.d.ts +9 -1
- package/optimize/es/test/rtl/index.js +2 -1
- package/optimize/es/test/rtl/matchers.d.ts +36 -0
- package/optimize/es/test/rtl/matchers.js +82 -0
- package/optimize/es/utils/element_can_be_disabled.js +16 -0
- package/optimize/es/utils/index.js +2 -1
- package/optimize/lib/components/basic_table/collapsed_item_actions.js +3 -1
- package/optimize/lib/components/basic_table/default_item_action.js +7 -4
- package/optimize/lib/components/bottom_bar/bottom_bar.js +11 -1
- package/optimize/lib/components/button/button_display/_button_display.js +23 -11
- package/optimize/lib/components/button/button_display/_button_display.styles.js +4 -4
- package/optimize/lib/components/button/button_empty/button_empty.js +17 -5
- package/optimize/lib/components/button/button_group/button_group.js +10 -5
- package/optimize/lib/components/button/button_group/button_group_button.js +2 -3
- package/optimize/lib/components/button/button_group/button_group_button.styles.js +10 -6
- package/optimize/lib/components/button/button_icon/button_icon.js +16 -4
- package/optimize/lib/components/code/code_block_virtualized.js +9 -7
- package/optimize/lib/components/datagrid/body/header/column_actions.js +5 -21
- package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.js +6 -4
- package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.styles.js +8 -1
- package/optimize/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.js +4 -2
- package/optimize/lib/components/datagrid/controls/column_selector.js +36 -19
- package/optimize/lib/components/datagrid/data_grid.js +5 -1
- package/optimize/lib/components/datagrid/utils/in_memory.js +2 -1
- package/optimize/lib/components/date_picker/super_date_picker/date_popover/absolute_tab.js +11 -3
- package/optimize/lib/components/date_picker/super_date_picker/date_popover/date_popover_button.js +5 -2
- package/optimize/lib/components/date_picker/super_date_picker/date_popover/date_popover_content.js +7 -3
- package/optimize/lib/components/date_picker/super_date_picker/date_popover/relative_tab.js +10 -2
- package/optimize/lib/components/date_picker/super_date_picker/date_popover/timezone_display.js +103 -0
- package/optimize/lib/components/date_picker/super_date_picker/date_popover/timezone_display.styles.js +25 -0
- package/optimize/lib/components/date_picker/super_date_picker/pretty_duration.js +2 -9
- package/optimize/lib/components/date_picker/super_date_picker/relative_utils.js +9 -0
- package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.js +49 -25
- package/optimize/lib/components/date_picker/super_date_picker/time_window_buttons.js +193 -0
- package/optimize/lib/components/flyout/flyout.js +26 -9
- package/optimize/lib/components/form/file_picker/file_picker.styles.js +3 -3
- package/optimize/lib/components/icon/assets/boxes_vertical.js +1 -1
- package/optimize/lib/components/icon/assets/checkInCircleFilled.js +1 -2
- package/optimize/lib/components/icon/assets/errorFilled.js +1 -2
- package/optimize/lib/components/icon/assets/paper_clip.js +1 -1
- package/optimize/lib/components/icon/assets/streams_wired.js +3 -2
- package/optimize/lib/components/icon/assets/warningFilled.js +1 -2
- package/optimize/lib/components/icon/icon_map.js +3 -6
- package/optimize/lib/components/icon/svgs/boxes_vertical.svg +1 -1
- package/optimize/lib/components/icon/svgs/checkInCircleFilled.svg +1 -1
- package/optimize/lib/components/icon/svgs/errorFilled.svg +1 -1
- package/optimize/lib/components/icon/svgs/paper_clip.svg +3 -3
- package/optimize/lib/components/icon/svgs/warningFilled.svg +1 -1
- package/optimize/lib/components/overlay_mask/overlay_mask.styles.js +1 -1
- package/optimize/lib/components/popover/popover.js +21 -15
- package/optimize/lib/components/table/table_row.styles.js +1 -1
- package/optimize/lib/components/tool_tip/tool_tip.js +24 -24
- package/optimize/lib/global_styling/index.js +16 -1
- package/optimize/lib/global_styling/mixins/_button.js +1 -1
- package/optimize/lib/global_styling/utility/selectors.js +15 -0
- package/optimize/lib/services/focus_trap/focus_trap_pub_sub.js +80 -0
- package/optimize/lib/services/focus_trap/index.js +12 -0
- package/optimize/lib/services/hooks/index.js +18 -1
- package/optimize/lib/services/hooks/useEuiDisabledElement.js +197 -0
- package/optimize/lib/services/index.js +8 -0
- package/optimize/lib/services/popover/reposition_on_scroll.js +67 -0
- package/optimize/lib/services/theme/high_contrast_overrides.js +5 -1
- package/optimize/lib/test/cypress/index.d.ts +12 -0
- package/optimize/lib/test/cypress/index.js +18 -0
- package/optimize/lib/test/cypress/matchers.d.ts +20 -0
- package/optimize/lib/test/cypress/matchers.js +61 -0
- package/optimize/lib/test/cypress/test_reposition_on_scroll.js +70 -0
- package/optimize/lib/test/enzyme/enzyme_matchers.d.ts +36 -0
- package/optimize/lib/test/enzyme/enzyme_matchers.js +50 -0
- package/optimize/lib/test/enzyme/index.d.ts +14 -0
- package/optimize/lib/test/enzyme/index.js +24 -0
- package/optimize/lib/test/rtl/index.d.ts +9 -1
- package/optimize/lib/test/rtl/index.js +24 -2
- package/optimize/lib/test/rtl/matchers.d.ts +36 -0
- package/optimize/lib/test/rtl/matchers.js +86 -0
- package/optimize/lib/utils/element_can_be_disabled.js +22 -0
- package/optimize/lib/utils/index.js +14 -1
- package/package.json +6 -5
- package/test-env/components/accessibility/skip_link/skip_link.js +10 -1
- package/test-env/components/basic_table/collapsed_item_actions.js +3 -1
- package/test-env/components/basic_table/default_item_action.js +7 -4
- package/test-env/components/bottom_bar/bottom_bar.js +11 -1
- package/test-env/components/button/button.js +21 -26
- package/test-env/components/button/button_display/_button_display.js +31 -29
- package/test-env/components/button/button_display/_button_display.styles.js +4 -4
- package/test-env/components/button/button_empty/button_empty.js +31 -13
- package/test-env/components/button/button_group/button_group.js +49 -31
- package/test-env/components/button/button_group/button_group_button.js +16 -5
- package/test-env/components/button/button_group/button_group_button.styles.js +10 -6
- package/test-env/components/button/button_icon/button_icon.js +29 -5
- package/test-env/components/card/card.js +21 -26
- package/test-env/components/card/card_select/card_select.js +21 -26
- package/test-env/components/code/code_block_virtualized.js +9 -7
- package/test-env/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +13 -1
- package/test-env/components/datagrid/body/cell/data_grid_cell.js +35 -12
- package/test-env/components/datagrid/body/data_grid_body.js +23 -6
- package/test-env/components/datagrid/body/data_grid_body_custom.js +23 -6
- package/test-env/components/datagrid/body/data_grid_body_virtualized.js +23 -6
- package/test-env/components/datagrid/body/header/column_actions.js +5 -21
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +29 -10
- package/test-env/components/datagrid/body/header/data_grid_header_cell.styles.js +8 -1
- package/test-env/components/datagrid/body/header/data_grid_header_cell_wrapper.js +5 -2
- package/test-env/components/datagrid/controls/column_selector.js +36 -19
- package/test-env/components/datagrid/controls/column_sorting.js +23 -6
- package/test-env/components/datagrid/controls/data_grid_toolbar_control.js +13 -7
- package/test-env/components/datagrid/data_grid.js +5 -1
- package/test-env/components/datagrid/utils/in_memory.js +25 -7
- package/test-env/components/date_picker/auto_refresh/auto_refresh.js +12 -3
- package/test-env/components/date_picker/super_date_picker/date_popover/absolute_tab.js +30 -4
- package/test-env/components/date_picker/super_date_picker/date_popover/date_popover_button.js +24 -3
- package/test-env/components/date_picker/super_date_picker/date_popover/date_popover_content.js +26 -4
- package/test-env/components/date_picker/super_date_picker/date_popover/relative_tab.js +29 -3
- package/test-env/components/date_picker/super_date_picker/date_popover/timezone_display.js +103 -0
- package/test-env/components/date_picker/super_date_picker/date_popover/timezone_display.styles.js +25 -0
- package/test-env/components/date_picker/super_date_picker/pretty_duration.js +2 -9
- package/test-env/components/date_picker/super_date_picker/relative_utils.js +9 -0
- package/test-env/components/date_picker/super_date_picker/super_date_picker.js +118 -26
- package/test-env/components/date_picker/super_date_picker/time_window_buttons.js +193 -0
- package/test-env/components/facet/facet_button.js +9 -19
- package/test-env/components/filter_group/filter_button.js +14 -1
- package/test-env/components/form/file_picker/file_picker.styles.js +3 -3
- package/test-env/components/form/form_control_button/form_control_button.js +13 -7
- package/test-env/components/header/header_links/header_link.js +13 -7
- package/test-env/components/header/header_section/header_section_item_button.js +13 -7
- package/test-env/components/icon/assets/boxes_vertical.js +1 -1
- package/test-env/components/icon/assets/checkInCircleFilled.js +1 -2
- package/test-env/components/icon/assets/errorFilled.js +1 -2
- package/test-env/components/icon/assets/paper_clip.js +1 -1
- package/test-env/components/icon/assets/streams_wired.js +3 -2
- package/test-env/components/icon/assets/warningFilled.js +1 -2
- package/test-env/components/icon/icon_map.js +3 -6
- package/test-env/components/list_group/list_group.js +13 -1
- package/test-env/components/list_group/list_group_item.js +13 -1
- package/test-env/components/list_group/list_group_item_extra_action.js +13 -1
- package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +15 -2
- package/test-env/components/overlay_mask/overlay_mask.styles.js +1 -1
- package/test-env/components/pagination/pagination_button.js +13 -7
- package/test-env/components/popover/popover.js +21 -15
- package/test-env/components/provider/component_defaults/component_defaults.js +22 -2
- package/test-env/components/table/table_row.styles.js +1 -1
- package/test-env/components/tool_tip/tool_tip.js +24 -24
- package/test-env/global_styling/index.js +16 -1
- package/test-env/global_styling/mixins/_button.js +1 -1
- package/test-env/global_styling/utility/selectors.js +15 -0
- package/test-env/services/focus_trap/focus_trap_pub_sub.js +80 -0
- package/test-env/services/focus_trap/index.js +12 -0
- package/test-env/services/hooks/index.js +18 -1
- package/test-env/services/hooks/useEuiDisabledElement.js +197 -0
- package/test-env/services/index.js +8 -0
- package/test-env/services/popover/reposition_on_scroll.js +67 -0
- package/test-env/services/theme/high_contrast_overrides.js +5 -1
- package/test-env/test/cypress/index.js +18 -0
- package/test-env/test/cypress/matchers.js +61 -0
- package/test-env/test/cypress/test_reposition_on_scroll.js +70 -0
- package/test-env/test/enzyme/enzyme_matchers.js +50 -0
- package/test-env/test/enzyme/index.js +24 -0
- package/test-env/test/rtl/index.js +24 -2
- package/test-env/test/rtl/matchers.js +86 -0
- package/test-env/utils/element_can_be_disabled.js +22 -0
- package/test-env/utils/index.js +14 -1
|
@@ -12,12 +12,14 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
14
14
|
var _services = require("../../../services");
|
|
15
|
-
var
|
|
15
|
+
var _useEuiDisabledElement = require("../../../services/hooks/useEuiDisabledElement");
|
|
16
16
|
var _button = require("../../../global_styling/mixins/_button");
|
|
17
|
+
var _button_display_content = require("../button_display/_button_display_content");
|
|
17
18
|
var _button_display = require("../button_display/_button_display");
|
|
18
19
|
var _button_empty = require("./button_empty.styles");
|
|
19
20
|
var _react2 = require("@emotion/react");
|
|
20
|
-
var _excluded = ["children", "className", "iconType", "iconSide", "iconSize", "color", "size", "flush", "isDisabled", "disabled", "isLoading", "href", "target", "rel", "type", "buttonRef", "contentProps", "textProps", "isSelected"]
|
|
21
|
+
var _excluded = ["children", "className", "iconType", "iconSide", "iconSize", "color", "size", "flush", "isDisabled", "disabled", "hasAriaDisabled", "isLoading", "href", "target", "rel", "type", "buttonRef", "contentProps", "textProps", "isSelected"],
|
|
22
|
+
_excluded2 = ["ref"];
|
|
21
23
|
/*
|
|
22
24
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
23
25
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -50,6 +52,8 @@ var EuiButtonEmpty = exports.EuiButtonEmpty = function EuiButtonEmpty(_ref) {
|
|
|
50
52
|
flush = _ref.flush,
|
|
51
53
|
_isDisabled = _ref.isDisabled,
|
|
52
54
|
disabled = _ref.disabled,
|
|
55
|
+
_ref$hasAriaDisabled = _ref.hasAriaDisabled,
|
|
56
|
+
hasAriaDisabled = _ref$hasAriaDisabled === void 0 ? false : _ref$hasAriaDisabled,
|
|
53
57
|
isLoading = _ref.isLoading,
|
|
54
58
|
href = _ref.href,
|
|
55
59
|
target = _ref.target,
|
|
@@ -66,6 +70,14 @@ var EuiButtonEmpty = exports.EuiButtonEmpty = function EuiButtonEmpty(_ref) {
|
|
|
66
70
|
href: href,
|
|
67
71
|
isLoading: isLoading
|
|
68
72
|
});
|
|
73
|
+
var _useEuiDisabledElemen = (0, _useEuiDisabledElement.useEuiDisabledElement)({
|
|
74
|
+
isDisabled: isDisabled,
|
|
75
|
+
hasAriaDisabled: hasAriaDisabled,
|
|
76
|
+
onKeyDown: rest.onKeyDown
|
|
77
|
+
}),
|
|
78
|
+
disabledRef = _useEuiDisabledElemen.ref,
|
|
79
|
+
disabledButtonProps = (0, _objectWithoutProperties2.default)(_useEuiDisabledElemen, _excluded2);
|
|
80
|
+
var setCombinedRef = (0, _services.useCombinedRefs)([disabledRef, buttonRef]);
|
|
69
81
|
var buttonColorStyles = (0, _button.useEuiButtonColorCSS)({
|
|
70
82
|
display: 'empty'
|
|
71
83
|
});
|
|
@@ -101,7 +113,7 @@ var EuiButtonEmpty = exports.EuiButtonEmpty = function EuiButtonEmpty(_ref) {
|
|
|
101
113
|
href: href,
|
|
102
114
|
target: target,
|
|
103
115
|
rel: secureRel,
|
|
104
|
-
ref:
|
|
116
|
+
ref: setCombinedRef
|
|
105
117
|
}, rest), innerNode);
|
|
106
118
|
}
|
|
107
119
|
return (0, _react2.jsx)("button", (0, _extends2.default)({
|
|
@@ -109,9 +121,9 @@ var EuiButtonEmpty = exports.EuiButtonEmpty = function EuiButtonEmpty(_ref) {
|
|
|
109
121
|
className: classes,
|
|
110
122
|
css: cssStyles,
|
|
111
123
|
type: type,
|
|
112
|
-
ref:
|
|
124
|
+
ref: setCombinedRef,
|
|
113
125
|
"aria-pressed": isSelected
|
|
114
|
-
}, rest), innerNode);
|
|
126
|
+
}, rest, disabledButtonProps), innerNode);
|
|
115
127
|
};
|
|
116
128
|
EuiButtonEmpty.propTypes = {
|
|
117
129
|
href: _propTypes.default.string,
|
|
@@ -135,13 +147,6 @@ EuiButtonEmpty.propTypes = {
|
|
|
135
147
|
* Ensure the text of the button sits flush to the left, right, or both sides of its container
|
|
136
148
|
*/
|
|
137
149
|
flush: _propTypes.default.any,
|
|
138
|
-
/**
|
|
139
|
-
* `disabled` is also allowed
|
|
140
|
-
*/
|
|
141
|
-
/**
|
|
142
|
-
* `disabled` is also allowed
|
|
143
|
-
*/
|
|
144
|
-
isDisabled: _propTypes.default.bool,
|
|
145
150
|
/**
|
|
146
151
|
* Force disables the button and changes the icon to a loading spinner
|
|
147
152
|
*/
|
|
@@ -196,8 +201,21 @@ EuiButtonEmpty.propTypes = {
|
|
|
196
201
|
"data-text": _propTypes.default.string
|
|
197
202
|
}).isRequired, _propTypes.default.oneOf([false])]),
|
|
198
203
|
iconSize: _propTypes.default.any,
|
|
204
|
+
/**
|
|
205
|
+
* Controls the disabled behavior via the native `disabled` attribute.
|
|
206
|
+
*/
|
|
207
|
+
isDisabled: _propTypes.default.bool,
|
|
199
208
|
className: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.string]),
|
|
200
209
|
"aria-label": _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.string]),
|
|
201
210
|
"data-test-subj": _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.string]),
|
|
202
|
-
css: _propTypes.default.oneOfType([_propTypes.default.any, _propTypes.default.any])
|
|
211
|
+
css: _propTypes.default.oneOfType([_propTypes.default.any, _propTypes.default.any]),
|
|
212
|
+
/**
|
|
213
|
+
* NOTE: Beta feature, may be changed or removed in the future
|
|
214
|
+
*
|
|
215
|
+
* Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
|
|
216
|
+
* This results in a semantically disabled button without the default browser handling of the disabled state.
|
|
217
|
+
*
|
|
218
|
+
* Use e.g. when a disabled button should have a tooltip.
|
|
219
|
+
*/
|
|
220
|
+
hasAriaDisabled: _propTypes.default.bool
|
|
203
221
|
};
|
|
@@ -15,7 +15,7 @@ var _accessibility = require("../../accessibility");
|
|
|
15
15
|
var _button_group_button = require("./button_group_button");
|
|
16
16
|
var _button_group = require("./button_group.styles");
|
|
17
17
|
var _react2 = require("@emotion/react");
|
|
18
|
-
var _excluded = ["className", "buttonSize", "color", "idSelected", "idToSelectedMap", "isDisabled", "isFullWidth", "isIconOnly", "legend", "name", "onChange", "options", "type"];
|
|
18
|
+
var _excluded = ["className", "buttonSize", "color", "idSelected", "idToSelectedMap", "isDisabled", "hasAriaDisabled", "isFullWidth", "isIconOnly", "legend", "name", "onChange", "options", "type"];
|
|
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 EuiButtonGroup = exports.EuiButtonGroup = function EuiButtonGroup(_ref) {
|
|
|
35
35
|
idToSelectedMap = _ref$idToSelectedMap === void 0 ? {} : _ref$idToSelectedMap,
|
|
36
36
|
_ref$isDisabled = _ref.isDisabled,
|
|
37
37
|
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
38
|
+
_ref$hasAriaDisabled = _ref.hasAriaDisabled,
|
|
39
|
+
hasAriaDisabled = _ref$hasAriaDisabled === void 0 ? false : _ref$hasAriaDisabled,
|
|
38
40
|
_ref$isFullWidth = _ref.isFullWidth,
|
|
39
41
|
isFullWidth = _ref$isFullWidth === void 0 ? false : _ref$isFullWidth,
|
|
40
42
|
_ref$isIconOnly = _ref.isIconOnly,
|
|
@@ -54,18 +56,21 @@ var EuiButtonGroup = exports.EuiButtonGroup = function EuiButtonGroup(_ref) {
|
|
|
54
56
|
'euiButtonGroup-isDisabled': isDisabled
|
|
55
57
|
}, className);
|
|
56
58
|
var typeIsSingle = type === 'single';
|
|
59
|
+
var groupDisabledProps = {
|
|
60
|
+
disabled: hasAriaDisabled ? undefined : isDisabled,
|
|
61
|
+
'aria-disabled': hasAriaDisabled ? isDisabled : undefined
|
|
62
|
+
};
|
|
57
63
|
return (0, _react2.jsx)("fieldset", (0, _extends2.default)({
|
|
58
64
|
css: wrapperCssStyles,
|
|
59
65
|
className: classes
|
|
60
|
-
}, rest, {
|
|
61
|
-
disabled: isDisabled
|
|
62
|
-
}), (0, _react2.jsx)(_accessibility.EuiScreenReaderOnly, null, (0, _react2.jsx)("legend", null, legend)), (0, _react2.jsx)("div", {
|
|
66
|
+
}, rest, groupDisabledProps), (0, _react2.jsx)(_accessibility.EuiScreenReaderOnly, null, (0, _react2.jsx)("legend", null, legend)), (0, _react2.jsx)("div", {
|
|
63
67
|
css: cssStyles,
|
|
64
68
|
className: "euiButtonGroup__buttons"
|
|
65
69
|
}, options.map(function (option) {
|
|
66
70
|
return (0, _react2.jsx)(_button_group_button.EuiButtonGroupButton, (0, _extends2.default)({
|
|
67
71
|
key: option.id,
|
|
68
|
-
isDisabled: isDisabled
|
|
72
|
+
isDisabled: isDisabled,
|
|
73
|
+
hasAriaDisabled: hasAriaDisabled
|
|
69
74
|
}, option, {
|
|
70
75
|
onClick: typeIsSingle ? function () {
|
|
71
76
|
return onChange(option.id, option.value);
|
|
@@ -85,46 +90,50 @@ EuiButtonGroup.propTypes = {
|
|
|
85
90
|
"data-test-subj": _propTypes.default.string,
|
|
86
91
|
css: _propTypes.default.any,
|
|
87
92
|
/**
|
|
88
|
-
*
|
|
89
|
-
* `compressed` is meant to be used alongside and within compressed forms.
|
|
93
|
+
* Controls the disabled behavior via the native `disabled` attribute.
|
|
90
94
|
*/
|
|
91
|
-
buttonSize: _propTypes.default.oneOf(["s", "m", "compressed"]),
|
|
92
95
|
isDisabled: _propTypes.default.bool,
|
|
96
|
+
hasAriaDisabled: _propTypes.default.bool,
|
|
93
97
|
/**
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
98
|
+
* Typical sizing is `s`. Medium `m` size should be reserved for major features.
|
|
99
|
+
* `compressed` is meant to be used alongside and within compressed forms.
|
|
100
|
+
*/
|
|
101
|
+
buttonSize: _propTypes.default.oneOf(["s", "m", "compressed"]),
|
|
102
|
+
/**
|
|
103
|
+
* Expands the whole group to the full width of the container.
|
|
104
|
+
* Each button gets equal widths no matter the content
|
|
105
|
+
*/
|
|
97
106
|
isFullWidth: _propTypes.default.bool,
|
|
98
107
|
/**
|
|
99
|
-
|
|
100
|
-
|
|
108
|
+
* Hides the label to only show the `iconType` provided by the `option`
|
|
109
|
+
*/
|
|
101
110
|
isIconOnly: _propTypes.default.bool,
|
|
102
111
|
/**
|
|
103
|
-
|
|
104
|
-
|
|
112
|
+
* A hidden group title (required for accessibility)
|
|
113
|
+
*/
|
|
105
114
|
legend: _propTypes.default.string.isRequired,
|
|
106
115
|
/**
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
116
|
+
* Any of the named color palette options.
|
|
117
|
+
*
|
|
118
|
+
* Do not use the following colors for standalone buttons directly,
|
|
119
|
+
* they exist to serve other components:
|
|
120
|
+
* - accent
|
|
121
|
+
* - warning
|
|
122
|
+
*/
|
|
114
123
|
color: _propTypes.default.any,
|
|
115
124
|
/**
|
|
116
125
|
* Default for `type` is single so it can also be excluded
|
|
117
126
|
*/
|
|
118
127
|
/**
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
128
|
+
* Actual type is `'single' | 'multi'`.
|
|
129
|
+
* Determines how the selection of the group should be handled.
|
|
130
|
+
* With `'single'` only one option can be selected at a time (similar to radio group).
|
|
131
|
+
* With `'multi'` multiple options selected (similar to checkbox group).
|
|
132
|
+
*/
|
|
124
133
|
type: _propTypes.default.oneOfType([_propTypes.default.oneOfType([_propTypes.default.oneOf(["single", "multi"]), _propTypes.default.oneOf(["single"])]), _propTypes.default.oneOf(["multi"])]),
|
|
125
134
|
/**
|
|
126
|
-
|
|
127
|
-
|
|
135
|
+
* An array of {@link EuiButtonGroupOptionProps}
|
|
136
|
+
*/
|
|
128
137
|
options: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
129
138
|
/**
|
|
130
139
|
* Each option must have a unique `id` for maintaining selection
|
|
@@ -134,7 +143,6 @@ EuiButtonGroup.propTypes = {
|
|
|
134
143
|
* Each option must have a `label` even for icons which will be applied as the `aria-label`
|
|
135
144
|
*/
|
|
136
145
|
label: _propTypes.default.node.isRequired,
|
|
137
|
-
isDisabled: _propTypes.default.bool,
|
|
138
146
|
/**
|
|
139
147
|
* The value of the radio input.
|
|
140
148
|
*/
|
|
@@ -180,10 +188,20 @@ EuiButtonGroup.propTypes = {
|
|
|
180
188
|
"data-text": _propTypes.default.string
|
|
181
189
|
}).isRequired, _propTypes.default.oneOf([false])]),
|
|
182
190
|
iconSize: _propTypes.default.any,
|
|
191
|
+
isDisabled: _propTypes.default.bool,
|
|
183
192
|
className: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.string]),
|
|
184
193
|
"aria-label": _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.string]),
|
|
185
194
|
"data-test-subj": _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.string]),
|
|
186
|
-
css: _propTypes.default.oneOfType([_propTypes.default.any, _propTypes.default.any])
|
|
195
|
+
css: _propTypes.default.oneOfType([_propTypes.default.any, _propTypes.default.any]),
|
|
196
|
+
/**
|
|
197
|
+
* NOTE: Beta feature, may be changed or removed in the future
|
|
198
|
+
*
|
|
199
|
+
* Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
|
|
200
|
+
* This results in a semantically disabled button without the default browser handling of the disabled state.
|
|
201
|
+
*
|
|
202
|
+
* Use e.g. when a disabled button should have a tooltip.
|
|
203
|
+
*/
|
|
204
|
+
hasAriaDisabled: _propTypes.default.bool
|
|
187
205
|
}).isRequired).isRequired,
|
|
188
206
|
/**
|
|
189
207
|
* @deprecated No longer needed. You can safely remove this prop entirely
|
|
@@ -34,8 +34,7 @@ var EuiButtonGroupButton = exports.EuiButtonGroupButton = function EuiButtonGrou
|
|
|
34
34
|
id = _ref.id,
|
|
35
35
|
isDisabled = _ref.isDisabled,
|
|
36
36
|
isIconOnly = _ref.isIconOnly,
|
|
37
|
-
|
|
38
|
-
isSelected = _ref$isSelected === void 0 ? false : _ref$isSelected,
|
|
37
|
+
isSelected = _ref.isSelected,
|
|
39
38
|
label = _ref.label,
|
|
40
39
|
value = _ref.value,
|
|
41
40
|
size = _ref.size,
|
|
@@ -55,7 +54,7 @@ var EuiButtonGroupButton = exports.EuiButtonGroupButton = function EuiButtonGrou
|
|
|
55
54
|
var buttonColorStyles = (0, _button.useEuiButtonColorCSS)({
|
|
56
55
|
display: display
|
|
57
56
|
})[color];
|
|
58
|
-
var cssStyles = [styles.euiButtonGroupButton, isIconOnly && styles.iconOnly, !isCompressed && (hasToolTip ? styles.uncompressed.hasToolTip : styles.uncompressed[size]), isCompressed ? styles.compressed : styles.uncompressed.uncompressed, isDisabled && isSelected ? styles.disabledAndSelected : buttonColorStyles, !isDisabled && isCompressed && focusColorStyles[color], hasBorder && styles.hasBorder];
|
|
57
|
+
var cssStyles = [styles.euiButtonGroupButton, isIconOnly && styles.iconOnly.iconOnly, isIconOnly && styles.iconOnly[size], !isCompressed && (hasToolTip ? styles.uncompressed.hasToolTip : styles.uncompressed[size]), isCompressed ? styles.compressed : styles.uncompressed.uncompressed, isDisabled && isSelected ? styles.disabledAndSelected : buttonColorStyles, !isDisabled && isCompressed && focusColorStyles[color], hasBorder && styles.hasBorder];
|
|
59
58
|
var tooltipWrapperStyles = [styles.tooltipWrapper, !isCompressed && styles.uncompressed[size]];
|
|
60
59
|
var contentStyles = [styles.content.euiButtonGroupButton__content, isCompressed && styles.content.compressed];
|
|
61
60
|
var textStyles = [isIconOnly ? styles.text.euiButtonGroupButton__iconOnly : styles.text.euiButtonGroupButton__text];
|
|
@@ -105,7 +104,6 @@ EuiButtonGroupButton.propTypes = {
|
|
|
105
104
|
* Each option must have a `label` even for icons which will be applied as the `aria-label`
|
|
106
105
|
*/
|
|
107
106
|
label: _propTypes.default.node.isRequired,
|
|
108
|
-
isDisabled: _propTypes.default.bool,
|
|
109
107
|
/**
|
|
110
108
|
* The value of the radio input.
|
|
111
109
|
*/
|
|
@@ -151,10 +149,23 @@ EuiButtonGroupButton.propTypes = {
|
|
|
151
149
|
"data-text": _propTypes.default.string
|
|
152
150
|
}).isRequired, _propTypes.default.oneOf([false])]),
|
|
153
151
|
iconSize: _propTypes.default.any,
|
|
152
|
+
/**
|
|
153
|
+
* Controls the disabled behavior via the native `disabled` attribute.
|
|
154
|
+
*/
|
|
155
|
+
isDisabled: _propTypes.default.bool,
|
|
154
156
|
className: _propTypes.default.string,
|
|
155
157
|
"aria-label": _propTypes.default.string,
|
|
156
158
|
"data-test-subj": _propTypes.default.string,
|
|
157
159
|
css: _propTypes.default.any,
|
|
160
|
+
/**
|
|
161
|
+
* NOTE: Beta feature, may be changed or removed in the future
|
|
162
|
+
*
|
|
163
|
+
* Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
|
|
164
|
+
* This results in a semantically disabled button without the default browser handling of the disabled state.
|
|
165
|
+
*
|
|
166
|
+
* Use e.g. when a disabled button should have a tooltip.
|
|
167
|
+
*/
|
|
168
|
+
hasAriaDisabled: _propTypes.default.bool,
|
|
158
169
|
/**
|
|
159
170
|
* Styles the selected button to look selected (usually with `fill`)
|
|
160
171
|
*/
|
|
@@ -204,5 +215,5 @@ var EuiButtonGroupButtonWithToolTip = function EuiButtonGroupButtonWithToolTip(_
|
|
|
204
215
|
EuiButtonGroupButtonWithToolTip.propTypes = {
|
|
205
216
|
children: _propTypes.default.element.isRequired,
|
|
206
217
|
wrapperCss: _propTypes.default.any.isRequired,
|
|
207
|
-
isSelected: _propTypes.default.bool
|
|
218
|
+
isSelected: _propTypes.default.bool
|
|
208
219
|
};
|
|
@@ -11,7 +11,6 @@ var _react = require("@emotion/react");
|
|
|
11
11
|
var _global_styling = require("../../../global_styling");
|
|
12
12
|
var _button = require("../../../global_styling/mixins/_button");
|
|
13
13
|
var _accessibility = require("../../accessibility");
|
|
14
|
-
var _form = require("../../form/form.styles");
|
|
15
14
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16
15
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17
16
|
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)."; } /*
|
|
@@ -40,9 +39,8 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
40
39
|
var euiButtonGroupButtonStyles = exports.euiButtonGroupButtonStyles = function euiButtonGroupButtonStyles(euiThemeContext) {
|
|
41
40
|
var euiTheme = euiThemeContext.euiTheme,
|
|
42
41
|
highContrastMode = euiThemeContext.highContrastMode;
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
var compressedButtonHeight = (0, _global_styling.mathWithUnits)([controlCompressedHeight, euiTheme.border.width.thin], function (x, y) {
|
|
42
|
+
var buttonSizes = (0, _button.euiButtonSizeMap)(euiThemeContext);
|
|
43
|
+
var compressedButtonHeight = (0, _global_styling.mathWithUnits)([buttonSizes.s.height, euiTheme.border.width.thin], function (x, y) {
|
|
46
44
|
return x - y * 6;
|
|
47
45
|
});
|
|
48
46
|
var selectedSelectors = '.euiButtonGroupButton-isSelected, .euiButtonGroup__tooltipWrapper-isSelected';
|
|
@@ -54,10 +52,16 @@ var euiButtonGroupButtonStyles = exports.euiButtonGroupButtonStyles = function e
|
|
|
54
52
|
euiButtonGroupButton: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('min-width', 0), " flex-shrink:1;flex-grow:0;z-index:0;&:focus-visible{z-index:2;}", _global_styling.euiCanAnimate, "{transition:background-color ", euiTheme.animation.normal, " ease-in-out,color ", euiTheme.animation.normal, " ease-in-out;}&:is(", selectedSelectors, "){", (0, _global_styling.highContrastModeStyles)(euiThemeContext, {
|
|
55
53
|
forced: "\n --highContrastHoverIndicatorColor: ".concat(euiTheme.colors.textInverse, ";\n border: none;\n\n /* styles the content manually instead of the button itself to preserve the system\n focus style, as otherwise preventForcedColors() would require manual styling */\n > [class*=\"euiButtonDisplayContent\"] {\n ").concat((0, _global_styling.preventForcedColors)(euiThemeContext), "\n color: ").concat(euiTheme.colors.emptyShade, ";\n border: none;\n }\n ")
|
|
56
54
|
}), ";};label:euiButtonGroupButton;"),
|
|
57
|
-
iconOnly:
|
|
55
|
+
iconOnly: {
|
|
56
|
+
// used only as classname, sizes are added separately
|
|
57
|
+
iconOnly: /*#__PURE__*/(0, _react.css)(";label:iconOnly;"),
|
|
58
|
+
s: "\n ".concat((0, _global_styling.logicalCSS)('width', buttonSizes.s.height), "\n "),
|
|
59
|
+
m: "\n ".concat((0, _global_styling.logicalCSS)('width', buttonSizes.m.height), "\n "),
|
|
60
|
+
compressed: "\n ".concat((0, _global_styling.logicalCSS)('width', compressedButtonHeight), "\n ")
|
|
61
|
+
},
|
|
58
62
|
// Sizes
|
|
59
63
|
uncompressed: {
|
|
60
|
-
uncompressed: /*#__PURE__*/(0, _react.css)("&:focus-visible{", (0, _global_styling.euiOutline)(euiThemeContext, 'inset', euiTheme.components.buttonGroupFocusColor), ";}&:is(", selectedSelectors, "):not(
|
|
64
|
+
uncompressed: /*#__PURE__*/(0, _react.css)("&:focus-visible{", (0, _global_styling.euiOutline)(euiThemeContext, 'inset', euiTheme.components.buttonGroupFocusColor), ";}&:is(", selectedSelectors, "):not(", _global_styling.euiDisabledSelector, "){z-index:1;border:", euiTheme.border.width.thin, " solid transparent;", (0, _global_styling.highContrastModeStyles)(euiThemeContext, {
|
|
61
65
|
forced: "\n /* use inset focus outline to ensure visibility, same as custom hover.\n NOTE: temp solution - this will be revisited once we handle global focus styles */\n &:focus-visible {\n outline-color: ".concat(euiTheme.colors.textInverse, ";\n /* has to be inset due to overflow: hidden */\n outline-offset: -").concat((0, _global_styling.mathWithUnits)(euiTheme.border.width.thin, function (x) {
|
|
62
66
|
return x * 4;
|
|
63
67
|
}), ";\n }\n ")
|
|
@@ -11,13 +11,15 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
var _services = require("../../../services");
|
|
14
|
+
var _useEuiDisabledElement = require("../../../services/hooks/useEuiDisabledElement");
|
|
14
15
|
var _icon = require("../../icon");
|
|
15
16
|
var _loading = require("../../loading");
|
|
16
17
|
var _button = require("../../../global_styling/mixins/_button");
|
|
17
18
|
var _button_display = require("../button_display/_button_display");
|
|
18
19
|
var _button_icon = require("./button_icon.styles");
|
|
19
20
|
var _react2 = require("@emotion/react");
|
|
20
|
-
var _excluded = ["className", "iconType", "iconSize", "color", "isDisabled", "disabled", "href", "type", "display", "target", "rel", "size", "buttonRef", "isSelected", "isLoading"]
|
|
21
|
+
var _excluded = ["className", "iconType", "iconSize", "color", "isDisabled", "disabled", "hasAriaDisabled", "href", "type", "display", "target", "rel", "size", "buttonRef", "isSelected", "isLoading"],
|
|
22
|
+
_excluded2 = ["ref"];
|
|
21
23
|
/*
|
|
22
24
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
23
25
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -36,6 +38,8 @@ var EuiButtonIcon = exports.EuiButtonIcon = function EuiButtonIcon(_ref) {
|
|
|
36
38
|
color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
37
39
|
_isDisabled = _ref.isDisabled,
|
|
38
40
|
disabled = _ref.disabled,
|
|
41
|
+
_ref$hasAriaDisabled = _ref.hasAriaDisabled,
|
|
42
|
+
hasAriaDisabled = _ref$hasAriaDisabled === void 0 ? false : _ref$hasAriaDisabled,
|
|
39
43
|
href = _ref.href,
|
|
40
44
|
_ref$type = _ref.type,
|
|
41
45
|
type = _ref$type === void 0 ? 'button' : _ref$type,
|
|
@@ -54,6 +58,14 @@ var EuiButtonIcon = exports.EuiButtonIcon = function EuiButtonIcon(_ref) {
|
|
|
54
58
|
href: href,
|
|
55
59
|
isLoading: isLoading
|
|
56
60
|
});
|
|
61
|
+
var _useEuiDisabledElemen = (0, _useEuiDisabledElement.useEuiDisabledElement)({
|
|
62
|
+
isDisabled: isDisabled,
|
|
63
|
+
hasAriaDisabled: hasAriaDisabled,
|
|
64
|
+
onKeyDown: rest.onKeyDown
|
|
65
|
+
}),
|
|
66
|
+
disabledRef = _useEuiDisabledElemen.ref,
|
|
67
|
+
disabledButtonProps = (0, _objectWithoutProperties2.default)(_useEuiDisabledElemen, _excluded2);
|
|
68
|
+
var setCombinedRef = (0, _services.useCombinedRefs)([disabledRef, buttonRef]);
|
|
57
69
|
var ariaHidden = rest['aria-hidden'];
|
|
58
70
|
var isAriaHidden = ariaHidden === 'true' || ariaHidden === true;
|
|
59
71
|
if (!rest['aria-label'] && !rest['aria-labelledby'] && !isAriaHidden) {
|
|
@@ -113,7 +125,7 @@ var EuiButtonIcon = exports.EuiButtonIcon = function EuiButtonIcon(_ref) {
|
|
|
113
125
|
href: href,
|
|
114
126
|
target: target,
|
|
115
127
|
rel: secureRel,
|
|
116
|
-
ref:
|
|
128
|
+
ref: setCombinedRef
|
|
117
129
|
}, rest), buttonIcon);
|
|
118
130
|
}
|
|
119
131
|
var buttonType;
|
|
@@ -124,8 +136,8 @@ var EuiButtonIcon = exports.EuiButtonIcon = function EuiButtonIcon(_ref) {
|
|
|
124
136
|
className: classes,
|
|
125
137
|
"aria-pressed": isSelected,
|
|
126
138
|
type: type,
|
|
127
|
-
ref:
|
|
128
|
-
}, rest), buttonIcon);
|
|
139
|
+
ref: setCombinedRef
|
|
140
|
+
}, rest, disabledButtonProps), buttonIcon);
|
|
129
141
|
};
|
|
130
142
|
EuiButtonIcon.propTypes = {
|
|
131
143
|
type: _propTypes.default.any,
|
|
@@ -145,7 +157,6 @@ EuiButtonIcon.propTypes = {
|
|
|
145
157
|
color: _propTypes.default.any,
|
|
146
158
|
"aria-label": _propTypes.default.string,
|
|
147
159
|
"aria-labelledby": _propTypes.default.string,
|
|
148
|
-
isDisabled: _propTypes.default.bool,
|
|
149
160
|
/**
|
|
150
161
|
* Overall size of button.
|
|
151
162
|
* Matches the sizes of other EuiButtons
|
|
@@ -192,5 +203,18 @@ EuiButtonIcon.propTypes = {
|
|
|
192
203
|
className: _propTypes.default.string,
|
|
193
204
|
"data-test-subj": _propTypes.default.string,
|
|
194
205
|
css: _propTypes.default.any,
|
|
206
|
+
/**
|
|
207
|
+
* Controls the disabled behavior via the native `disabled` attribute.
|
|
208
|
+
*/
|
|
209
|
+
isDisabled: _propTypes.default.bool,
|
|
210
|
+
/**
|
|
211
|
+
* NOTE: Beta feature, may be changed or removed in the future
|
|
212
|
+
*
|
|
213
|
+
* Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
|
|
214
|
+
* This results in a semantically disabled button without the default browser handling of the disabled state.
|
|
215
|
+
*
|
|
216
|
+
* Use e.g. when a disabled button should have a tooltip.
|
|
217
|
+
*/
|
|
218
|
+
hasAriaDisabled: _propTypes.default.bool,
|
|
195
219
|
buttonRef: _propTypes.default.any
|
|
196
220
|
};
|
|
@@ -438,12 +438,29 @@ EuiCard.propTypes = {
|
|
|
438
438
|
*/
|
|
439
439
|
size: _propTypes.default.any,
|
|
440
440
|
/**
|
|
441
|
-
* `disabled`
|
|
441
|
+
* Controls the disabled behavior via the native `disabled` attribute.
|
|
442
442
|
*/
|
|
443
443
|
/**
|
|
444
|
-
* `disabled`
|
|
444
|
+
* Controls the disabled behavior via the native `disabled` attribute.
|
|
445
445
|
*/
|
|
446
|
-
isDisabled: _propTypes.default.
|
|
446
|
+
isDisabled: _propTypes.default.bool,
|
|
447
|
+
/**
|
|
448
|
+
* NOTE: Beta feature, may be changed or removed in the future
|
|
449
|
+
*
|
|
450
|
+
* Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
|
|
451
|
+
* This results in a semantically disabled button without the default browser handling of the disabled state.
|
|
452
|
+
*
|
|
453
|
+
* Use e.g. when a disabled button should have a tooltip.
|
|
454
|
+
*/
|
|
455
|
+
/**
|
|
456
|
+
* NOTE: Beta feature, may be changed or removed in the future
|
|
457
|
+
*
|
|
458
|
+
* Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
|
|
459
|
+
* This results in a semantically disabled button without the default browser handling of the disabled state.
|
|
460
|
+
*
|
|
461
|
+
* Use e.g. when a disabled button should have a tooltip.
|
|
462
|
+
*/
|
|
463
|
+
hasAriaDisabled: _propTypes.default.bool,
|
|
447
464
|
className: _propTypes.default.string,
|
|
448
465
|
"aria-label": _propTypes.default.string,
|
|
449
466
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -477,29 +494,7 @@ EuiCard.propTypes = {
|
|
|
477
494
|
css: _propTypes.default.any
|
|
478
495
|
}),
|
|
479
496
|
style: _propTypes.default.any,
|
|
480
|
-
type: _propTypes.default.any
|
|
481
|
-
/**
|
|
482
|
-
* Any `type` accepted by EuiIcon
|
|
483
|
-
*/
|
|
484
|
-
iconType: _propTypes.default.oneOfType([_propTypes.default.oneOf(["accessibility", "addDataApp", "advancedSettingsApp", "agentApp", "aggregate", "alert", "analyzeEvent", "annotation", "anomalyChart", "anomalySwimLane", "apmApp", "apmTrace", "appSearchApp", "apps", "arrowDown", "arrowLeft", "arrowRight", "arrowUp", "arrowStart", "arrowEnd", "article", "asterisk", "at", "auditbeatApp", "backgroundTask", "beaker", "bell", "bellSlash", "beta", "bolt", "boxesHorizontal", "boxesVertical", "branch", "branchUser", "broom", "brush", "bug", "bullseye", "calendar", "canvasApp", "casesApp", "changePointDetection", "check", "checkCircle", "checkInCircleFilled", "cheer", "classificationJob", "clickLeft", "clickRight", "clock", "clockCounter", "cloudDrizzle", "cloudStormy", "cloudSunny", "cluster", "code", "codeApp", "color", "comment", "compute", "console", "consoleApp", "container", "continuityAbove", "continuityAboveBelow", "continuityBelow", "continuityWithin", "contrast", "contrastHigh", "controls", "controlsHorizontal", "controlsVertical", "copy", "copyClipboard", "createAdvancedJob", "createGenericJob", "createGeoJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crossInCircle", "crosshairs", "currency", "cut", "dashboardApp", "dataVisualizer", "database", "desktop", "devToolsApp", "diff", "discoverApp", "discuss", "document", "documentEdit", "documentation", "documents", "dot", "dotInCircle", "doubleArrowLeft", "doubleArrowRight", "download", "editorAlignCenter", "editorAlignLeft", "editorAlignRight", "editorBold", "editorChecklist", "editorCodeBlock", "editorComment", "editorDistributeHorizontal", "editorDistributeVertical", "editorHeading", "editorItalic", "editorItemAlignBottom", "editorItemAlignCenter", "editorItemAlignLeft", "editorItemAlignMiddle", "editorItemAlignRight", "editorItemAlignTop", "editorLink", "editorOrderedList", "editorPositionBottomLeft", "editorPositionBottomRight", "editorPositionTopLeft", "editorPositionTopRight", "editorRedo", "editorStrike", "editorTable", "editorUnderline", "editorUndo", "editorUnorderedList", "email", "empty", "emsApp", "endpoint", "eql", "eraser", "error", "errorFilled", "esqlVis", "exit", "expand", "expandMini", "export", "exportAction", "eye", "eyeClosed", "faceHappy", "faceNeutral", "faceSad", "fieldStatistics", "filebeatApp", "filter", "filterExclude", "filterIgnore", "filterInclude", "filterInCircle", "flask", "flag", "fleetApp", "fold", "folderCheck", "folderClosed", "folderExclamation", "folderOpen", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "function", "gear", "gisApp", "glasses", "globe", "grab", "grabHorizontal", "grabOmnidirectional", "gradient", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "heatmap", "help", "home", "info", "image", "importAction", "index", "indexClose", "indexEdit", "indexFlush", "indexManagementApp", "indexMapping", "indexOpen", "indexPatternApp", "indexRollupApp", "indexRuntime", "indexSettings", "indexTemporary", "infinity", "inputOutput", "inspect", "invert", "ip", "key", "keyboard", "kqlField", "kqlFunction", "kqlOperand", "kqlSelector", "kqlValue", "kubernetesNode", "kubernetesPod", "launch", "layers", "lensApp", "lettering", "lineDashed", "lineDotted", "lineSolid", "link", "list", "listAdd", "lock", "lockOpen", "logPatternAnalysis", "logRateAnalysis", "logoAWS", "logoAWSMono", "logoAerospike", "logoApache", "logoAppSearch", "logoAzure", "logoAzureMono", "logoBeats", "logoBusinessAnalytics", "logoCeph", "logoCloud", "logoCloudEnterprise", "logoCode", "logoCodesandbox", "logoCouchbase", "logoDocker", "logoDropwizard", "logoElastic", "logoElasticStack", "logoElasticsearch", "logoEnterpriseSearch", "logoEtcd", "logoGCP", "logoGCPMono", "logoGithub", "logoGmail", "logoGolang", "logoGoogleG", "logoHAproxy", "logoIBM", "logoIBMMono", "logoKafka", "logoKibana", "logoKubernetes", "logoLogging", "logoLogstash", "logoMaps", "logoMemcached", "logoMetrics", "logoMongodb", "logoMySQL", "logoNginx", "logoObservability", "logoOsquery", "logoPhp", "logoPostgres", "logoPrometheus", "logoRabbitmq", "logoRedis", "logoSecurity", "logoSiteSearch", "logoSketch", "logoSlack", "logoUptime", "logoVulnerabilityManagement", "logoWebhook", "logoWindows", "logoWorkplaceSearch", "logsApp", "logstashFilter", "logstashIf", "logstashInput", "logstashOutput", "logstashQueue", "machineLearningApp", "magnet", "magnifyWithExclamation", "magnifyWithMinus", "magnifyWithPlus", "managementApp", "mapMarker", "memory", "menu", "menuDown", "menuLeft", "menuRight", "menuUp", "merge", "metricbeatApp", "metricsApp", "minimize", "minus", "minusInCircle", "minusInCircleFilled", "minusInSquare", "mobile", "monitoringApp", "moon", "move", "namespace", "nested", "newChat", "node", "notebookApp", "number", "offline", "online", "outlierDetectionJob", "package", "packetbeatApp", "pageSelect", "pagesSelect", "palette", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFilled", "pipeBreaks", "pipelineApp", "pipeNoBreaks", "pivot", "play", "playFilled", "plugs", "plus", "plusInCircle", "plusInCircleFilled", "plusInSquare", "popout", "push", "question", "quote", "readOnly", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "returnKey", "save", "savedObjectsApp", "scale", "search", "searchProfilerApp", "section", "securityAnalyticsApp", "securityApp", "securitySignal", "securitySignalDetected", "securitySignalResolved", "sessionViewer", "shard", "share", "singleMetricViewer", "snowflake", "sortAscending", "sortDescending", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spaces", "spacesApp", "sparkles", "sqlApp", "starEmpty", "starEmptySpace", "starFilled", "starFilledSpace", "starMinusEmpty", "starMinusFilled", "starPlusEmpty", "starPlusFilled", "stats", "stop", "stopFilled", "stopSlash", "storage", "streamsClassic", "streamsWired", "string", "submodule", "sun", "swatchInput", "symlink", "tableDensityCompact", "tableDensityExpanded", "tableDensityNormal", "tableOfContents", "tag", "tear", "temperature", "thumbDown", "thumbUp", "timeline", "timelineWithArrow", "timelionApp", "timeRefresh", "timeslider", "training", "transitionLeftIn", "transitionLeftOut", "transitionTopIn", "transitionTopOut", "trash", "unfold", "unlink", "upgradeAssistantApp", "uptimeApp", "user", "userAvatar", "users", "usersRolesApp", "vector", "videoPlayer", "visArea", "visAreaStacked", "visBarHorizontal", "visBarHorizontalStacked", "visBarVertical", "visBarVerticalStacked", "visGauge", "visGoal", "visLine", "visMapCoordinate", "visMapRegion", "visMetric", "visPie", "visTable", "visTagCloud", "visText", "visTimelion", "visVega", "visVisualBuilder", "visualizeApp", "vulnerabilityManagementApp", "warning", "warningFilled", "watchesApp", "web", "wordWrap", "wordWrapDisabled", "workflowsApp", "workplaceSearchApp", "wrench", "tokenAlias", "tokenAnnotation", "tokenArray", "tokenBinary", "tokenBoolean", "tokenClass", "tokenCompletionSuggester", "tokenConstant", "tokenDate", "tokenDimension", "tokenElement", "tokenEnum", "tokenEnumMember", "tokenEvent", "tokenException", "tokenField", "tokenFile", "tokenFlattened", "tokenFunction", "tokenGeo", "tokenHistogram", "tokenInterface", "tokenIP", "tokenJoin", "tokenKey", "tokenKeyword", "tokenMethod", "tokenMetricCounter", "tokenMetricGauge", "tokenModule", "tokenNamespace", "tokenNested", "tokenNull", "tokenNumber", "tokenObject", "tokenOperator", "tokenPackage", "tokenParameter", "tokenPercolator", "tokenProperty", "tokenRange", "tokenRankFeature", "tokenRankFeatures", "tokenRepo", "tokenSearchType", "tokenSemanticText", "tokenShape", "tokenString", "tokenStruct", "tokenSymbol", "tokenTag", "tokenText", "tokenTokenCount", "tokenVariable", "tokenVectorDense", "tokenDenseVector", "tokenVectorSparse"]).isRequired, _propTypes.default.string.isRequired, _propTypes.default.elementType.isRequired]),
|
|
485
|
-
/**
|
|
486
|
-
* Can only be one side `left` or `right`
|
|
487
|
-
*/
|
|
488
|
-
iconSide: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.oneOf([undefined])]),
|
|
489
|
-
/**
|
|
490
|
-
* Object of props passed to the `<span>` wrapping the content's text/children only (not icon)
|
|
491
|
-
*
|
|
492
|
-
* This span wrapper can be removed by passing `textProps={false}`.
|
|
493
|
-
*/
|
|
494
|
-
textProps: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
495
|
-
className: _propTypes.default.string,
|
|
496
|
-
"aria-label": _propTypes.default.string,
|
|
497
|
-
"data-test-subj": _propTypes.default.string,
|
|
498
|
-
css: _propTypes.default.any,
|
|
499
|
-
ref: _propTypes.default.any,
|
|
500
|
-
"data-text": _propTypes.default.string
|
|
501
|
-
}).isRequired, _propTypes.default.oneOf([false])]),
|
|
502
|
-
iconSize: _propTypes.default.any
|
|
497
|
+
type: _propTypes.default.any
|
|
503
498
|
}),
|
|
504
499
|
/**
|
|
505
500
|
* Use a border style of card instead of shadow
|
|
@@ -74,12 +74,29 @@ EuiCardSelect.propTypes = {
|
|
|
74
74
|
*/
|
|
75
75
|
size: _propTypes.default.any,
|
|
76
76
|
/**
|
|
77
|
-
* `disabled`
|
|
77
|
+
* Controls the disabled behavior via the native `disabled` attribute.
|
|
78
78
|
*/
|
|
79
79
|
/**
|
|
80
|
-
* `disabled`
|
|
80
|
+
* Controls the disabled behavior via the native `disabled` attribute.
|
|
81
81
|
*/
|
|
82
|
-
isDisabled: _propTypes.default.
|
|
82
|
+
isDisabled: _propTypes.default.bool,
|
|
83
|
+
/**
|
|
84
|
+
* NOTE: Beta feature, may be changed or removed in the future
|
|
85
|
+
*
|
|
86
|
+
* Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
|
|
87
|
+
* This results in a semantically disabled button without the default browser handling of the disabled state.
|
|
88
|
+
*
|
|
89
|
+
* Use e.g. when a disabled button should have a tooltip.
|
|
90
|
+
*/
|
|
91
|
+
/**
|
|
92
|
+
* NOTE: Beta feature, may be changed or removed in the future
|
|
93
|
+
*
|
|
94
|
+
* Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
|
|
95
|
+
* This results in a semantically disabled button without the default browser handling of the disabled state.
|
|
96
|
+
*
|
|
97
|
+
* Use e.g. when a disabled button should have a tooltip.
|
|
98
|
+
*/
|
|
99
|
+
hasAriaDisabled: _propTypes.default.bool,
|
|
83
100
|
className: _propTypes.default.string,
|
|
84
101
|
"aria-label": _propTypes.default.string,
|
|
85
102
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -113,29 +130,7 @@ EuiCardSelect.propTypes = {
|
|
|
113
130
|
css: _propTypes.default.any
|
|
114
131
|
}),
|
|
115
132
|
style: _propTypes.default.any,
|
|
116
|
-
type: _propTypes.default.any
|
|
117
|
-
/**
|
|
118
|
-
* Any `type` accepted by EuiIcon
|
|
119
|
-
*/
|
|
120
|
-
iconType: _propTypes.default.oneOfType([_propTypes.default.oneOf(["accessibility", "addDataApp", "advancedSettingsApp", "agentApp", "aggregate", "alert", "analyzeEvent", "annotation", "anomalyChart", "anomalySwimLane", "apmApp", "apmTrace", "appSearchApp", "apps", "arrowDown", "arrowLeft", "arrowRight", "arrowUp", "arrowStart", "arrowEnd", "article", "asterisk", "at", "auditbeatApp", "backgroundTask", "beaker", "bell", "bellSlash", "beta", "bolt", "boxesHorizontal", "boxesVertical", "branch", "branchUser", "broom", "brush", "bug", "bullseye", "calendar", "canvasApp", "casesApp", "changePointDetection", "check", "checkCircle", "checkInCircleFilled", "cheer", "classificationJob", "clickLeft", "clickRight", "clock", "clockCounter", "cloudDrizzle", "cloudStormy", "cloudSunny", "cluster", "code", "codeApp", "color", "comment", "compute", "console", "consoleApp", "container", "continuityAbove", "continuityAboveBelow", "continuityBelow", "continuityWithin", "contrast", "contrastHigh", "controls", "controlsHorizontal", "controlsVertical", "copy", "copyClipboard", "createAdvancedJob", "createGenericJob", "createGeoJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crossInCircle", "crosshairs", "currency", "cut", "dashboardApp", "dataVisualizer", "database", "desktop", "devToolsApp", "diff", "discoverApp", "discuss", "document", "documentEdit", "documentation", "documents", "dot", "dotInCircle", "doubleArrowLeft", "doubleArrowRight", "download", "editorAlignCenter", "editorAlignLeft", "editorAlignRight", "editorBold", "editorChecklist", "editorCodeBlock", "editorComment", "editorDistributeHorizontal", "editorDistributeVertical", "editorHeading", "editorItalic", "editorItemAlignBottom", "editorItemAlignCenter", "editorItemAlignLeft", "editorItemAlignMiddle", "editorItemAlignRight", "editorItemAlignTop", "editorLink", "editorOrderedList", "editorPositionBottomLeft", "editorPositionBottomRight", "editorPositionTopLeft", "editorPositionTopRight", "editorRedo", "editorStrike", "editorTable", "editorUnderline", "editorUndo", "editorUnorderedList", "email", "empty", "emsApp", "endpoint", "eql", "eraser", "error", "errorFilled", "esqlVis", "exit", "expand", "expandMini", "export", "exportAction", "eye", "eyeClosed", "faceHappy", "faceNeutral", "faceSad", "fieldStatistics", "filebeatApp", "filter", "filterExclude", "filterIgnore", "filterInclude", "filterInCircle", "flask", "flag", "fleetApp", "fold", "folderCheck", "folderClosed", "folderExclamation", "folderOpen", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "function", "gear", "gisApp", "glasses", "globe", "grab", "grabHorizontal", "grabOmnidirectional", "gradient", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "heatmap", "help", "home", "info", "image", "importAction", "index", "indexClose", "indexEdit", "indexFlush", "indexManagementApp", "indexMapping", "indexOpen", "indexPatternApp", "indexRollupApp", "indexRuntime", "indexSettings", "indexTemporary", "infinity", "inputOutput", "inspect", "invert", "ip", "key", "keyboard", "kqlField", "kqlFunction", "kqlOperand", "kqlSelector", "kqlValue", "kubernetesNode", "kubernetesPod", "launch", "layers", "lensApp", "lettering", "lineDashed", "lineDotted", "lineSolid", "link", "list", "listAdd", "lock", "lockOpen", "logPatternAnalysis", "logRateAnalysis", "logoAWS", "logoAWSMono", "logoAerospike", "logoApache", "logoAppSearch", "logoAzure", "logoAzureMono", "logoBeats", "logoBusinessAnalytics", "logoCeph", "logoCloud", "logoCloudEnterprise", "logoCode", "logoCodesandbox", "logoCouchbase", "logoDocker", "logoDropwizard", "logoElastic", "logoElasticStack", "logoElasticsearch", "logoEnterpriseSearch", "logoEtcd", "logoGCP", "logoGCPMono", "logoGithub", "logoGmail", "logoGolang", "logoGoogleG", "logoHAproxy", "logoIBM", "logoIBMMono", "logoKafka", "logoKibana", "logoKubernetes", "logoLogging", "logoLogstash", "logoMaps", "logoMemcached", "logoMetrics", "logoMongodb", "logoMySQL", "logoNginx", "logoObservability", "logoOsquery", "logoPhp", "logoPostgres", "logoPrometheus", "logoRabbitmq", "logoRedis", "logoSecurity", "logoSiteSearch", "logoSketch", "logoSlack", "logoUptime", "logoVulnerabilityManagement", "logoWebhook", "logoWindows", "logoWorkplaceSearch", "logsApp", "logstashFilter", "logstashIf", "logstashInput", "logstashOutput", "logstashQueue", "machineLearningApp", "magnet", "magnifyWithExclamation", "magnifyWithMinus", "magnifyWithPlus", "managementApp", "mapMarker", "memory", "menu", "menuDown", "menuLeft", "menuRight", "menuUp", "merge", "metricbeatApp", "metricsApp", "minimize", "minus", "minusInCircle", "minusInCircleFilled", "minusInSquare", "mobile", "monitoringApp", "moon", "move", "namespace", "nested", "newChat", "node", "notebookApp", "number", "offline", "online", "outlierDetectionJob", "package", "packetbeatApp", "pageSelect", "pagesSelect", "palette", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFilled", "pipeBreaks", "pipelineApp", "pipeNoBreaks", "pivot", "play", "playFilled", "plugs", "plus", "plusInCircle", "plusInCircleFilled", "plusInSquare", "popout", "push", "question", "quote", "readOnly", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "returnKey", "save", "savedObjectsApp", "scale", "search", "searchProfilerApp", "section", "securityAnalyticsApp", "securityApp", "securitySignal", "securitySignalDetected", "securitySignalResolved", "sessionViewer", "shard", "share", "singleMetricViewer", "snowflake", "sortAscending", "sortDescending", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spaces", "spacesApp", "sparkles", "sqlApp", "starEmpty", "starEmptySpace", "starFilled", "starFilledSpace", "starMinusEmpty", "starMinusFilled", "starPlusEmpty", "starPlusFilled", "stats", "stop", "stopFilled", "stopSlash", "storage", "streamsClassic", "streamsWired", "string", "submodule", "sun", "swatchInput", "symlink", "tableDensityCompact", "tableDensityExpanded", "tableDensityNormal", "tableOfContents", "tag", "tear", "temperature", "thumbDown", "thumbUp", "timeline", "timelineWithArrow", "timelionApp", "timeRefresh", "timeslider", "training", "transitionLeftIn", "transitionLeftOut", "transitionTopIn", "transitionTopOut", "trash", "unfold", "unlink", "upgradeAssistantApp", "uptimeApp", "user", "userAvatar", "users", "usersRolesApp", "vector", "videoPlayer", "visArea", "visAreaStacked", "visBarHorizontal", "visBarHorizontalStacked", "visBarVertical", "visBarVerticalStacked", "visGauge", "visGoal", "visLine", "visMapCoordinate", "visMapRegion", "visMetric", "visPie", "visTable", "visTagCloud", "visText", "visTimelion", "visVega", "visVisualBuilder", "visualizeApp", "vulnerabilityManagementApp", "warning", "warningFilled", "watchesApp", "web", "wordWrap", "wordWrapDisabled", "workflowsApp", "workplaceSearchApp", "wrench", "tokenAlias", "tokenAnnotation", "tokenArray", "tokenBinary", "tokenBoolean", "tokenClass", "tokenCompletionSuggester", "tokenConstant", "tokenDate", "tokenDimension", "tokenElement", "tokenEnum", "tokenEnumMember", "tokenEvent", "tokenException", "tokenField", "tokenFile", "tokenFlattened", "tokenFunction", "tokenGeo", "tokenHistogram", "tokenInterface", "tokenIP", "tokenJoin", "tokenKey", "tokenKeyword", "tokenMethod", "tokenMetricCounter", "tokenMetricGauge", "tokenModule", "tokenNamespace", "tokenNested", "tokenNull", "tokenNumber", "tokenObject", "tokenOperator", "tokenPackage", "tokenParameter", "tokenPercolator", "tokenProperty", "tokenRange", "tokenRankFeature", "tokenRankFeatures", "tokenRepo", "tokenSearchType", "tokenSemanticText", "tokenShape", "tokenString", "tokenStruct", "tokenSymbol", "tokenTag", "tokenText", "tokenTokenCount", "tokenVariable", "tokenVectorDense", "tokenDenseVector", "tokenVectorSparse"]).isRequired, _propTypes.default.string.isRequired, _propTypes.default.elementType.isRequired]),
|
|
121
|
-
/**
|
|
122
|
-
* Can only be one side `left` or `right`
|
|
123
|
-
*/
|
|
124
|
-
iconSide: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.oneOf([undefined])]),
|
|
125
|
-
/**
|
|
126
|
-
* Object of props passed to the `<span>` wrapping the content's text/children only (not icon)
|
|
127
|
-
*
|
|
128
|
-
* This span wrapper can be removed by passing `textProps={false}`.
|
|
129
|
-
*/
|
|
130
|
-
textProps: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
131
|
-
className: _propTypes.default.string,
|
|
132
|
-
"aria-label": _propTypes.default.string,
|
|
133
|
-
"data-test-subj": _propTypes.default.string,
|
|
134
|
-
css: _propTypes.default.any,
|
|
135
|
-
ref: _propTypes.default.any,
|
|
136
|
-
"data-text": _propTypes.default.string
|
|
137
|
-
}).isRequired, _propTypes.default.oneOf([false])]),
|
|
138
|
-
iconSize: _propTypes.default.any
|
|
133
|
+
type: _propTypes.default.any
|
|
139
134
|
};
|
|
140
135
|
function euiCardSelectableText(isSelected, isDisabled, children) {
|
|
141
136
|
if (children) {
|