@elastic/eui 64.0.1 → 65.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eui_charts_theme.js +330 -330
- package/dist/eui_charts_theme.js.map +1 -1
- package/dist/eui_theme_dark.css +164 -1249
- package/dist/eui_theme_dark.json +0 -32
- package/dist/eui_theme_dark.json.d.ts +0 -32
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +136 -1221
- package/dist/eui_theme_light.json +0 -32
- package/dist/eui_theme_light.json.d.ts +0 -32
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/accessibility/screen_reader_only/screen_reader_only.styles.js +2 -1
- package/es/components/accessibility/skip_link/skip_link.js +4 -54
- package/es/components/accordion/accordion.js +2 -1
- package/es/components/accordion/accordion.styles.js +17 -27
- package/es/components/badge/beta_badge/beta_badge.js +16 -3
- package/es/components/basic_table/basic_table.js +1 -1
- package/es/components/basic_table/collapsed_item_actions.js +1 -1
- package/es/components/basic_table/in_memory_table.js +1 -1
- package/es/components/beacon/beacon.styles.js +2 -2
- package/es/components/button/button.js +112 -215
- package/es/components/button/button_display/_button_display.js +90 -40
- package/es/components/button/button_display/_button_display.styles.js +7 -16
- package/es/components/button/button_display/_button_display_content.js +6 -3
- package/es/components/button/button_display/_button_display_content.styles.js +7 -17
- package/es/components/button/button_empty/button_empty.js +63 -53
- package/es/components/button/button_empty/index.js +1 -1
- package/es/components/button/button_group/button_group.js +4 -12
- package/es/components/button/button_group/button_group_button.js +14 -4
- package/es/components/button/button_icon/button_icon.js +61 -42
- package/es/components/call_out/call_out.styles.js +2 -1
- package/es/components/card/card.js +173 -89
- package/es/components/card/card.styles.js +136 -0
- package/es/components/card/card_select/card_select.js +133 -0
- package/es/components/card/card_select/card_select.styles.js +25 -0
- package/es/components/card/card_select/index.js +8 -0
- package/es/components/card/checkable_card/checkable_card.js +14 -9
- package/es/components/card/checkable_card/checkable_card.styles.js +22 -0
- package/es/components/comment_list/comment_event.styles.js +1 -1
- package/es/components/datagrid/body/data_grid_body.js +7 -6
- package/es/components/datagrid/body/data_grid_cell.js +13 -12
- package/es/components/datagrid/body/header/data_grid_header_cell.js +7 -6
- package/es/components/datagrid/body/header/data_grid_header_row.js +7 -6
- package/es/components/datagrid/data_grid.js +7 -6
- package/es/components/datagrid/utils/in_memory.js +7 -6
- package/es/components/date_picker/auto_refresh/auto_refresh.js +3 -2
- package/es/components/date_picker/react-datepicker/original.package.json +124 -0
- package/es/components/date_picker/super_date_picker/super_date_picker.js +17 -1
- package/es/components/date_picker/super_date_picker/super_update_button.js +11 -1
- package/es/components/description_list/description_list_title.js +1 -1
- package/es/components/expression/expression.styles.js +13 -31
- package/es/components/facet/facet_button.js +5 -4
- package/es/components/header/header_links/header_link.js +5 -3
- package/es/components/icon/icon.js +2 -1
- package/es/components/image/image_button.styles.js +1 -1
- package/es/components/image/image_wrapper.styles.js +3 -3
- package/es/components/link/link.styles.js +2 -2
- package/es/components/list_group/list_group.js +2 -1
- package/es/components/list_group/list_group_item.js +2 -1
- package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +3 -2
- package/es/components/loading/loading_chart.styles.js +16 -26
- package/es/components/loading/loading_content.styles.js +2 -2
- package/es/components/loading/loading_logo.styles.js +4 -4
- package/es/components/loading/loading_spinner.styles.js +6 -6
- package/es/components/markdown_editor/markdown_editor_toolbar.js +2 -0
- package/es/components/modal/confirm_modal.js +1 -1
- package/es/components/notification/notification_event.js +5 -3
- package/es/components/notification/notification_event_read_button.js +2 -1
- package/es/components/page/page_template.js +2 -2
- package/es/components/page_template/inner/page_inner.styles.js +2 -2
- package/es/components/page_template/outer/page_outer.styles.js +3 -1
- package/es/components/pagination/pagination_button.js +5 -3
- package/es/components/panel/panel.js +1 -1
- package/es/components/panel/{panel.style.js → panel.styles.js} +2 -2
- package/es/components/progress/progress.styles.js +2 -2
- package/es/components/title/title.styles.js +2 -2
- package/es/components/toast/toast.styles.js +4 -4
- package/es/components/tool_tip/icon_tip.js +11 -1
- package/es/components/tool_tip/tool_tip.js +18 -6
- package/es/global_styling/functions/logicals.js +2 -72
- package/es/global_styling/functions/logicals.json +56 -0
- package/es/global_styling/functions/typography.js +2 -1
- package/es/global_styling/mixins/_color.js +1 -1
- package/es/global_styling/mixins/_helpers.js +7 -1
- package/es/global_styling/reset/global_styles.js +2 -1
- package/es/themes/amsterdam/global_styling/mixins/button.js +165 -16
- package/eui.d.ts +1062 -936
- package/i18ntokens.json +15 -15
- package/lib/components/accessibility/screen_reader_only/screen_reader_only.styles.js +3 -1
- package/lib/components/accessibility/skip_link/skip_link.js +4 -54
- package/lib/components/accordion/accordion.js +3 -1
- package/lib/components/accordion/accordion.styles.js +17 -26
- package/lib/components/badge/beta_badge/beta_badge.js +16 -3
- package/lib/components/basic_table/basic_table.js +1 -1
- package/lib/components/basic_table/collapsed_item_actions.js +1 -1
- package/lib/components/basic_table/in_memory_table.js +1 -1
- package/lib/components/beacon/beacon.styles.js +1 -1
- package/lib/components/button/button.js +124 -229
- package/lib/components/button/button_display/_button_display.js +94 -33
- package/lib/components/button/button_display/_button_display.styles.js +7 -16
- package/lib/components/button/button_display/_button_display_content.js +7 -3
- package/lib/components/button/button_display/_button_display_content.styles.js +7 -17
- package/lib/components/button/button_empty/button_empty.js +64 -54
- package/lib/components/button/button_empty/index.js +0 -6
- package/lib/components/button/button_group/button_group.js +4 -12
- package/lib/components/button/button_group/button_group_button.js +15 -4
- package/lib/components/button/button_icon/button_icon.js +61 -43
- package/lib/components/call_out/call_out.styles.js +2 -1
- package/lib/components/card/card.js +174 -88
- package/lib/components/card/card.styles.js +146 -0
- package/lib/components/card/card_select/card_select.js +144 -0
- package/lib/components/card/card_select/card_select.styles.js +27 -0
- package/lib/components/card/card_select/index.js +19 -0
- package/lib/components/card/checkable_card/checkable_card.js +16 -9
- package/lib/components/card/checkable_card/checkable_card.styles.js +33 -0
- package/lib/components/comment_list/comment_event.styles.js +1 -1
- package/lib/components/datagrid/body/data_grid_body.js +7 -6
- package/lib/components/datagrid/body/data_grid_cell.js +13 -12
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +7 -6
- package/lib/components/datagrid/body/header/data_grid_header_row.js +7 -6
- package/lib/components/datagrid/data_grid.js +7 -6
- package/lib/components/datagrid/utils/in_memory.js +7 -6
- package/lib/components/date_picker/auto_refresh/auto_refresh.js +3 -2
- package/lib/components/date_picker/react-datepicker/original.package.json +124 -0
- package/lib/components/date_picker/super_date_picker/super_date_picker.js +17 -1
- package/lib/components/date_picker/super_date_picker/super_update_button.js +11 -1
- package/lib/components/description_list/description_list_title.js +1 -1
- package/lib/components/expression/expression.styles.js +12 -30
- package/lib/components/facet/facet_button.js +4 -3
- package/lib/components/header/header_links/header_link.js +5 -3
- package/lib/components/icon/icon.js +2 -1
- package/lib/components/image/image_button.styles.js +1 -1
- package/lib/components/image/image_wrapper.styles.js +2 -2
- package/lib/components/link/link.styles.js +1 -1
- package/lib/components/list_group/list_group.js +2 -1
- package/lib/components/list_group/list_group_item.js +2 -1
- package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +3 -2
- package/lib/components/loading/loading_chart.styles.js +16 -25
- package/lib/components/loading/loading_content.styles.js +1 -1
- package/lib/components/loading/loading_logo.styles.js +4 -4
- package/lib/components/loading/loading_spinner.styles.js +5 -5
- package/lib/components/markdown_editor/markdown_editor_toolbar.js +2 -0
- package/lib/components/modal/confirm_modal.js +1 -1
- package/lib/components/notification/notification_event.js +5 -3
- package/lib/components/notification/notification_event_read_button.js +2 -1
- package/lib/components/page/page_template.js +1 -1
- package/lib/components/page_template/inner/page_inner.styles.js +2 -2
- package/lib/components/page_template/outer/page_outer.styles.js +4 -1
- package/lib/components/panel/panel.js +1 -1
- package/{optimize/lib/components/panel/panel.style.js → lib/components/panel/panel.styles.js} +1 -1
- package/lib/components/progress/progress.styles.js +2 -2
- package/lib/components/title/title.styles.js +1 -1
- package/lib/components/toast/toast.styles.js +4 -4
- package/lib/components/tool_tip/icon_tip.js +11 -1
- package/lib/components/tool_tip/tool_tip.js +18 -6
- package/lib/global_styling/functions/logicals.js +3 -72
- package/lib/global_styling/functions/logicals.json +56 -0
- package/lib/global_styling/functions/typography.js +3 -1
- package/lib/global_styling/mixins/_color.js +1 -1
- package/lib/global_styling/mixins/_helpers.js +9 -2
- package/lib/global_styling/reset/global_styles.js +3 -1
- package/lib/themes/amsterdam/global_styling/mixins/button.js +178 -24
- package/optimize/es/components/accessibility/screen_reader_only/screen_reader_only.styles.js +2 -1
- package/optimize/es/components/accordion/accordion.js +2 -1
- package/optimize/es/components/accordion/accordion.styles.js +17 -27
- package/optimize/es/components/badge/beta_badge/beta_badge.js +6 -3
- package/optimize/es/components/beacon/beacon.styles.js +2 -2
- package/optimize/es/components/button/button.js +88 -100
- package/optimize/es/components/button/button_display/_button_display.js +67 -32
- package/optimize/es/components/button/button_display/_button_display.styles.js +7 -16
- package/optimize/es/components/button/button_display/_button_display_content.js +5 -2
- package/optimize/es/components/button/button_display/_button_display_content.styles.js +7 -17
- package/optimize/es/components/button/button_empty/button_empty.js +55 -47
- package/optimize/es/components/button/button_empty/index.js +1 -1
- package/optimize/es/components/button/button_group/button_group.js +2 -10
- package/optimize/es/components/button/button_group/button_group_button.js +13 -3
- package/optimize/es/components/button/button_icon/button_icon.js +54 -41
- package/optimize/es/components/call_out/call_out.styles.js +2 -1
- package/optimize/es/components/card/card.js +97 -31
- package/optimize/es/components/card/card.styles.js +136 -0
- package/optimize/es/components/card/{card_select.js → card_select/card_select.js} +16 -14
- package/optimize/es/components/card/card_select/card_select.styles.js +25 -0
- package/optimize/es/components/card/card_select/index.js +8 -0
- package/optimize/es/components/card/checkable_card/checkable_card.js +14 -9
- package/optimize/es/components/card/checkable_card/checkable_card.styles.js +22 -0
- package/optimize/es/components/comment_list/comment_event.styles.js +1 -1
- package/optimize/es/components/date_picker/react-datepicker/original.package.json +124 -0
- package/optimize/es/components/description_list/description_list_title.js +1 -1
- package/optimize/es/components/expression/expression.styles.js +13 -31
- package/optimize/es/components/facet/facet_button.js +5 -3
- package/optimize/es/components/icon/icon.js +2 -1
- package/optimize/es/components/image/image_button.styles.js +1 -1
- package/optimize/es/components/image/image_wrapper.styles.js +3 -3
- package/optimize/es/components/link/link.styles.js +2 -2
- package/optimize/es/components/loading/loading_chart.styles.js +16 -26
- package/optimize/es/components/loading/loading_content.styles.js +2 -2
- package/optimize/es/components/loading/loading_logo.styles.js +4 -4
- package/optimize/es/components/loading/loading_spinner.styles.js +6 -6
- package/optimize/es/components/markdown_editor/markdown_editor_toolbar.js +2 -0
- package/optimize/es/components/page/page_template.js +2 -2
- package/optimize/es/components/page_template/inner/page_inner.styles.js +2 -2
- package/optimize/es/components/page_template/outer/page_outer.styles.js +3 -1
- package/optimize/es/components/panel/panel.js +1 -1
- package/optimize/es/components/panel/{panel.style.js → panel.styles.js} +2 -2
- package/optimize/es/components/progress/progress.styles.js +2 -2
- package/optimize/es/components/title/title.styles.js +2 -2
- package/optimize/es/components/toast/toast.styles.js +4 -4
- package/optimize/es/components/tool_tip/tool_tip.js +7 -5
- package/optimize/es/global_styling/functions/logicals.js +2 -72
- package/optimize/es/global_styling/functions/logicals.json +56 -0
- package/optimize/es/global_styling/functions/typography.js +2 -1
- package/optimize/es/global_styling/mixins/_color.js +1 -1
- package/optimize/es/global_styling/mixins/_helpers.js +7 -1
- package/optimize/es/global_styling/reset/global_styles.js +2 -1
- package/optimize/es/themes/amsterdam/global_styling/mixins/button.js +155 -16
- package/optimize/lib/components/accessibility/screen_reader_only/screen_reader_only.styles.js +3 -1
- package/optimize/lib/components/accordion/accordion.js +3 -1
- package/optimize/lib/components/accordion/accordion.styles.js +17 -26
- package/optimize/lib/components/badge/beta_badge/beta_badge.js +6 -3
- package/optimize/lib/components/beacon/beacon.styles.js +1 -1
- package/optimize/lib/components/button/button.js +92 -103
- package/optimize/lib/components/button/button_display/_button_display.js +71 -25
- package/optimize/lib/components/button/button_display/_button_display.styles.js +7 -16
- package/optimize/lib/components/button/button_display/_button_display_content.js +6 -2
- package/optimize/lib/components/button/button_display/_button_display_content.styles.js +7 -17
- package/optimize/lib/components/button/button_empty/button_empty.js +59 -50
- package/optimize/lib/components/button/button_empty/index.js +0 -6
- package/optimize/lib/components/button/button_group/button_group.js +2 -10
- package/optimize/lib/components/button/button_group/button_group_button.js +15 -3
- package/optimize/lib/components/button/button_icon/button_icon.js +54 -41
- package/optimize/lib/components/call_out/call_out.styles.js +2 -1
- package/optimize/lib/components/card/card.js +97 -30
- package/optimize/lib/components/card/card.styles.js +146 -0
- package/optimize/lib/components/card/{card_select.js → card_select/card_select.js} +16 -14
- package/optimize/lib/components/card/card_select/card_select.styles.js +27 -0
- package/optimize/lib/components/card/card_select/index.js +19 -0
- package/optimize/lib/components/card/checkable_card/checkable_card.js +16 -9
- package/optimize/lib/components/card/checkable_card/checkable_card.styles.js +33 -0
- package/optimize/lib/components/comment_list/comment_event.styles.js +1 -1
- package/optimize/lib/components/date_picker/react-datepicker/original.package.json +124 -0
- package/optimize/lib/components/description_list/description_list_title.js +1 -1
- package/optimize/lib/components/expression/expression.styles.js +12 -30
- package/optimize/lib/components/facet/facet_button.js +4 -2
- package/optimize/lib/components/icon/icon.js +2 -1
- package/optimize/lib/components/image/image_button.styles.js +1 -1
- package/optimize/lib/components/image/image_wrapper.styles.js +2 -2
- package/optimize/lib/components/link/link.styles.js +1 -1
- package/optimize/lib/components/loading/loading_chart.styles.js +16 -25
- package/optimize/lib/components/loading/loading_content.styles.js +1 -1
- package/optimize/lib/components/loading/loading_logo.styles.js +4 -4
- package/optimize/lib/components/loading/loading_spinner.styles.js +5 -5
- package/optimize/lib/components/markdown_editor/markdown_editor_toolbar.js +2 -0
- package/optimize/lib/components/page/page_template.js +1 -1
- package/optimize/lib/components/page_template/inner/page_inner.styles.js +2 -2
- package/optimize/lib/components/page_template/outer/page_outer.styles.js +4 -1
- package/optimize/lib/components/panel/panel.js +1 -1
- package/{test-env/components/panel/panel.style.js → optimize/lib/components/panel/panel.styles.js} +1 -1
- package/optimize/lib/components/progress/progress.styles.js +2 -2
- package/optimize/lib/components/title/title.styles.js +1 -1
- package/optimize/lib/components/toast/toast.styles.js +4 -4
- package/optimize/lib/components/tool_tip/tool_tip.js +7 -5
- package/optimize/lib/global_styling/functions/logicals.js +10 -73
- package/optimize/lib/global_styling/functions/logicals.json +56 -0
- package/optimize/lib/global_styling/functions/typography.js +3 -1
- package/optimize/lib/global_styling/mixins/_color.js +1 -1
- package/optimize/lib/global_styling/mixins/_helpers.js +9 -2
- package/optimize/lib/global_styling/reset/global_styles.js +3 -1
- package/optimize/lib/themes/amsterdam/global_styling/mixins/button.js +170 -17
- package/package.json +2 -2
- package/src/components/badge/beta_badge/_beta_badge.scss +5 -1
- package/src/components/button/_index.scss +0 -1
- package/src/components/button/button_empty/_button_empty.scss +4 -48
- package/src/components/button/button_group/_button_group.scss +0 -1
- package/src/components/button/button_group/_button_group_button.scss +55 -83
- package/src/components/button/button_icon/_button_icon.scss +3 -103
- package/src/components/control_bar/_control_bar.scss +2 -6
- package/src/components/datagrid/_data_grid_data_row.scss +7 -0
- package/src/components/flyout/_flyout.scss +4 -1
- package/src/components/index.scss +0 -1
- package/src/global_styling/mixins/_button.scss +55 -11
- package/src/global_styling/mixins/_index.scss +0 -1
- package/src/themes/amsterdam/global_styling/mixins/_index.scss +0 -2
- package/src/themes/amsterdam/overrides/_header.scss +0 -2
- package/src/themes/amsterdam/overrides/_index.scss +0 -4
- package/test-env/components/accessibility/screen_reader_only/screen_reader_only.styles.js +3 -1
- package/test-env/components/accessibility/skip_link/skip_link.js +4 -54
- package/test-env/components/accordion/accordion.js +3 -1
- package/test-env/components/accordion/accordion.styles.js +17 -26
- package/test-env/components/badge/beta_badge/beta_badge.js +16 -3
- package/test-env/components/basic_table/basic_table.js +1 -1
- package/test-env/components/basic_table/collapsed_item_actions.js +1 -1
- package/test-env/components/basic_table/in_memory_table.js +1 -1
- package/test-env/components/beacon/beacon.styles.js +1 -1
- package/test-env/components/button/button.js +111 -225
- package/test-env/components/button/button_display/_button_display.js +93 -32
- package/test-env/components/button/button_display/_button_display.styles.js +7 -16
- package/test-env/components/button/button_display/_button_display_content.js +7 -3
- package/test-env/components/button/button_display/_button_display_content.styles.js +7 -17
- package/test-env/components/button/button_empty/button_empty.js +64 -53
- package/test-env/components/button/button_empty/index.js +0 -6
- package/test-env/components/button/button_group/button_group.js +4 -12
- package/test-env/components/button/button_group/button_group_button.js +16 -4
- package/test-env/components/button/button_icon/button_icon.js +61 -42
- package/test-env/components/call_out/call_out.styles.js +2 -1
- package/test-env/components/card/card.js +172 -88
- package/test-env/components/card/card.styles.js +146 -0
- package/test-env/components/card/card_select/card_select.js +141 -0
- package/test-env/components/card/card_select/card_select.styles.js +27 -0
- package/test-env/components/card/card_select/index.js +19 -0
- package/test-env/components/card/checkable_card/checkable_card.js +16 -9
- package/test-env/components/card/checkable_card/checkable_card.styles.js +33 -0
- package/test-env/components/comment_list/comment_event.styles.js +1 -1
- package/test-env/components/datagrid/body/data_grid_body.js +7 -6
- package/test-env/components/datagrid/body/data_grid_cell.js +13 -12
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +7 -6
- package/test-env/components/datagrid/body/header/data_grid_header_row.js +7 -6
- package/test-env/components/datagrid/data_grid.js +7 -6
- package/test-env/components/datagrid/utils/in_memory.js +7 -6
- package/test-env/components/date_picker/auto_refresh/auto_refresh.js +3 -2
- package/test-env/components/date_picker/react-datepicker/original.package.json +124 -0
- package/test-env/components/date_picker/super_date_picker/super_date_picker.js +17 -1
- package/test-env/components/date_picker/super_date_picker/super_update_button.js +11 -1
- package/test-env/components/description_list/description_list_title.js +1 -1
- package/test-env/components/expression/expression.styles.js +12 -30
- package/test-env/components/facet/facet_button.js +4 -3
- package/test-env/components/header/header_links/header_link.js +5 -3
- package/test-env/components/image/image_button.styles.js +1 -1
- package/test-env/components/image/image_wrapper.styles.js +2 -2
- package/test-env/components/link/link.styles.js +1 -1
- package/test-env/components/list_group/list_group.js +2 -1
- package/test-env/components/list_group/list_group_item.js +2 -1
- package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +3 -2
- package/test-env/components/loading/loading_chart.styles.js +16 -25
- package/test-env/components/loading/loading_content.styles.js +1 -1
- package/test-env/components/loading/loading_logo.styles.js +4 -4
- package/test-env/components/loading/loading_spinner.styles.js +5 -5
- package/test-env/components/markdown_editor/markdown_editor_toolbar.js +2 -0
- package/test-env/components/modal/confirm_modal.js +1 -1
- package/test-env/components/notification/notification_event.js +5 -3
- package/test-env/components/notification/notification_event_read_button.js +2 -1
- package/test-env/components/page/page_template.js +1 -1
- package/test-env/components/page_template/inner/page_inner.styles.js +2 -2
- package/test-env/components/page_template/outer/page_outer.styles.js +4 -1
- package/test-env/components/panel/panel.js +1 -1
- package/{lib/components/panel/panel.style.js → test-env/components/panel/panel.styles.js} +1 -1
- package/test-env/components/progress/progress.styles.js +2 -2
- package/test-env/components/title/title.styles.js +1 -1
- package/test-env/components/toast/toast.styles.js +4 -4
- package/test-env/components/tool_tip/icon_tip.js +11 -1
- package/test-env/components/tool_tip/tool_tip.js +18 -6
- package/test-env/global_styling/functions/logicals.js +10 -73
- package/test-env/global_styling/functions/logicals.json +56 -0
- package/test-env/global_styling/functions/typography.js +3 -1
- package/test-env/global_styling/mixins/_color.js +1 -1
- package/test-env/global_styling/mixins/_helpers.js +9 -2
- package/test-env/global_styling/reset/global_styles.js +3 -1
- package/test-env/themes/amsterdam/global_styling/mixins/button.js +170 -17
- package/es/components/card/card_select.js +0 -176
- package/lib/components/card/card_select.js +0 -187
- package/src/components/button/_button.scss +0 -143
- package/src/components/button/button_icon/_variables.scss +0 -11
- package/src/components/card/_card.scss +0 -239
- package/src/components/card/_card_select.scss +0 -21
- package/src/components/card/_index.scss +0 -5
- package/src/components/card/_mixins.scss +0 -11
- package/src/components/card/_variables.scss +0 -25
- package/src/components/card/checkable_card/_checkable_card.scss +0 -29
- package/src/components/card/checkable_card/_index.scss +0 -1
- package/src/global_styling/mixins/_beta_badge.scss +0 -30
- package/src/themes/amsterdam/global_styling/mixins/_button.scss +0 -60
- package/src/themes/amsterdam/overrides/_button.scss +0 -119
- package/src/themes/amsterdam/overrides/_button_empty.scss +0 -20
- package/src/themes/amsterdam/overrides/_button_group.scss +0 -91
- package/src/themes/amsterdam/overrides/_card.scss +0 -6
- package/test-env/components/card/card_select.js +0 -184
|
@@ -20,20 +20,11 @@ var _buttonSize = function _buttonSize(size) {
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
23
|
-
name: "
|
|
24
|
-
styles: "
|
|
23
|
+
name: "vifhyf-isDisabled",
|
|
24
|
+
styles: "pointer-events:none;cursor:not-allowed;label:isDisabled;"
|
|
25
25
|
} : {
|
|
26
|
-
name: "
|
|
27
|
-
styles: "
|
|
28
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
32
|
-
name: "8595p9-isDisabled",
|
|
33
|
-
styles: "cursor:not-allowed;label:isDisabled;"
|
|
34
|
-
} : {
|
|
35
|
-
name: "8595p9-isDisabled",
|
|
36
|
-
styles: "cursor:not-allowed;label:isDisabled;",
|
|
26
|
+
name: "vifhyf-isDisabled",
|
|
27
|
+
styles: "pointer-events:none;cursor:not-allowed;label:isDisabled;",
|
|
37
28
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
38
29
|
};
|
|
39
30
|
|
|
@@ -41,10 +32,10 @@ export var euiButtonDisplayStyles = function euiButtonDisplayStyles(euiThemeCont
|
|
|
41
32
|
var euiTheme = euiThemeContext.euiTheme;
|
|
42
33
|
return {
|
|
43
34
|
// Base
|
|
44
|
-
euiButtonDisplay: /*#__PURE__*/css(euiButtonBaseCSS(), ";", minWidth && logicalCSS('min-width', minWidth), "
|
|
35
|
+
euiButtonDisplay: /*#__PURE__*/css(euiButtonBaseCSS(), ";", minWidth && logicalCSS('min-width', minWidth), ";font-weight:", euiTheme.font.weight.medium, ";padding:0 ", euiTheme.size.m, ";&:hover:not(:disabled),&:focus{text-decoration:underline;};label:euiButtonDisplay;"),
|
|
45
36
|
// States
|
|
46
|
-
isDisabled:
|
|
47
|
-
fullWidth:
|
|
37
|
+
isDisabled: _ref,
|
|
38
|
+
fullWidth: /*#__PURE__*/css("display:block;", logicalCSS('width', '100%'), ";;label:fullWidth;"),
|
|
48
39
|
// Sizes
|
|
49
40
|
xs: /*#__PURE__*/css(_buttonSize(euiTheme.size.l), euiFontSize(euiThemeContext, 'xs'), ";label:xs;"),
|
|
50
41
|
s: /*#__PURE__*/css(_buttonSize(euiTheme.size.xl), euiFontSize(euiThemeContext, 's'), ";label:s;"),
|
|
@@ -19,6 +19,7 @@ import { useEuiTheme } from '../../../services';
|
|
|
19
19
|
import { EuiLoadingSpinner } from '../../loading';
|
|
20
20
|
import { EuiIcon } from '../../icon';
|
|
21
21
|
import { euiButtonDisplayContentStyles } from './_button_display_content.styles';
|
|
22
|
+
import classNames from 'classnames';
|
|
22
23
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
23
24
|
export var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
|
|
24
25
|
var children = _ref.children,
|
|
@@ -35,7 +36,7 @@ export var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
|
|
|
35
36
|
|
|
36
37
|
var theme = useEuiTheme();
|
|
37
38
|
var styles = euiButtonDisplayContentStyles(theme);
|
|
38
|
-
var cssStyles = [styles.euiButtonDisplayContent, iconSide && styles[iconSide]
|
|
39
|
+
var cssStyles = [styles.euiButtonDisplayContent, iconSide && styles[iconSide]];
|
|
39
40
|
var cssSpinnerStyles = [styles.euiButtonDisplayContent__spinner];
|
|
40
41
|
var cssIconStyles = [styles.euiButtonDisplayContent__icon]; // Add an icon to the button if one exists.
|
|
41
42
|
|
|
@@ -68,7 +69,9 @@ export var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
|
|
|
68
69
|
var isText = typeof children === 'string';
|
|
69
70
|
return ___EmotionJSX("span", _extends({}, contentProps, {
|
|
70
71
|
css: cssStyles
|
|
71
|
-
}), icon, isText ? ___EmotionJSX("span", textProps,
|
|
72
|
+
}), icon, isText ? ___EmotionJSX("span", _extends({}, textProps, {
|
|
73
|
+
className: classNames('eui-textTruncate', textProps === null || textProps === void 0 ? void 0 : textProps.className)
|
|
74
|
+
}), children) : children);
|
|
72
75
|
};
|
|
73
76
|
EuiButtonDisplayContent.propTypes = {
|
|
74
77
|
/**
|
|
@@ -94,7 +97,7 @@ EuiButtonDisplayContent.propTypes = {
|
|
|
94
97
|
"data-text": PropTypes.string
|
|
95
98
|
}),
|
|
96
99
|
iconSize: PropTypes.oneOf(["s", "m"]),
|
|
97
|
-
isDisabled: PropTypes.bool
|
|
100
|
+
isDisabled: PropTypes.bool,
|
|
98
101
|
className: PropTypes.string,
|
|
99
102
|
"aria-label": PropTypes.string,
|
|
100
103
|
"data-test-subj": PropTypes.string,
|
|
@@ -11,15 +11,6 @@ import { css } from '@emotion/react';
|
|
|
11
11
|
import { logicalCSS } from '../../../global_styling';
|
|
12
12
|
|
|
13
13
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
14
|
-
name: "ske5nx-isDisabled",
|
|
15
|
-
styles: "pointer-events:auto;cursor:not-allowed;label:isDisabled;"
|
|
16
|
-
} : {
|
|
17
|
-
name: "ske5nx-isDisabled",
|
|
18
|
-
styles: "pointer-events:auto;cursor:not-allowed;label:isDisabled;",
|
|
19
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
23
14
|
name: "gtg6j-euiButtonDisplayContent__icon",
|
|
24
15
|
styles: "flex-shrink:0;label:euiButtonDisplayContent__icon;"
|
|
25
16
|
} : {
|
|
@@ -28,7 +19,7 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
28
19
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
29
20
|
};
|
|
30
21
|
|
|
31
|
-
var
|
|
22
|
+
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
32
23
|
name: "10wlo76-euiButtonDisplayContent__spinner",
|
|
33
24
|
styles: "flex-shrink:0;label:euiButtonDisplayContent__spinner;"
|
|
34
25
|
} : {
|
|
@@ -37,7 +28,7 @@ var _ref3 = process.env.NODE_ENV === "production" ? {
|
|
|
37
28
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
38
29
|
};
|
|
39
30
|
|
|
40
|
-
var
|
|
31
|
+
var _ref3 = process.env.NODE_ENV === "production" ? {
|
|
41
32
|
name: "qfl6yj-right",
|
|
42
33
|
styles: "flex-direction:row-reverse;label:right;"
|
|
43
34
|
} : {
|
|
@@ -46,16 +37,15 @@ var _ref4 = process.env.NODE_ENV === "production" ? {
|
|
|
46
37
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
47
38
|
};
|
|
48
39
|
|
|
49
|
-
export var euiButtonDisplayContentStyles = function euiButtonDisplayContentStyles(
|
|
50
|
-
var euiTheme =
|
|
40
|
+
export var euiButtonDisplayContentStyles = function euiButtonDisplayContentStyles(_ref4) {
|
|
41
|
+
var euiTheme = _ref4.euiTheme;
|
|
51
42
|
return {
|
|
52
43
|
// Base
|
|
53
44
|
euiButtonDisplayContent: /*#__PURE__*/css(logicalCSS('height', '100%'), ";", logicalCSS('width', '100%'), ";display:flex;justify-content:center;align-items:center;vertical-align:middle;gap:", euiTheme.size.s, ";;label:euiButtonDisplayContent;"),
|
|
54
45
|
// Icon side
|
|
55
46
|
left: /*#__PURE__*/css(";label:left;"),
|
|
56
|
-
right:
|
|
57
|
-
euiButtonDisplayContent__spinner:
|
|
58
|
-
euiButtonDisplayContent__icon:
|
|
59
|
-
isDisabled: _ref
|
|
47
|
+
right: _ref3,
|
|
48
|
+
euiButtonDisplayContent__spinner: _ref2,
|
|
49
|
+
euiButtonDisplayContent__icon: _ref
|
|
60
50
|
};
|
|
61
51
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
var _excluded = ["children", "className", "iconType", "iconSide", "iconSize", "color", "size", "flush", "isDisabled", "disabled", "isLoading", "href", "target", "rel", "type", "buttonRef", "contentProps", "textProps", "isSelected"];
|
|
2
2
|
|
|
3
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
-
|
|
5
3
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
6
4
|
|
|
7
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
8
6
|
|
|
9
7
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
10
8
|
|
|
9
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
10
|
+
|
|
11
11
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
12
12
|
|
|
13
13
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -23,19 +23,11 @@ import React from 'react';
|
|
|
23
23
|
import PropTypes from "prop-types";
|
|
24
24
|
import classNames from 'classnames';
|
|
25
25
|
import { keysOf } from '../../common';
|
|
26
|
-
import { getSecureRelForTarget } from '../../../services';
|
|
26
|
+
import { EuiThemeProvider, getSecureRelForTarget } from '../../../services';
|
|
27
27
|
import { EuiButtonContentDeprecated as EuiButtonContent } from '../_button_content_deprecated';
|
|
28
|
-
import {
|
|
28
|
+
import { useEuiButtonColorCSS } from '../../../themes/amsterdam/global_styling/mixins/button';
|
|
29
|
+
import { isButtonDisabled } from '../button_display/_button_display';
|
|
29
30
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
30
|
-
var colorToClassNameMap = {
|
|
31
|
-
primary: 'euiButtonEmpty--primary',
|
|
32
|
-
danger: 'euiButtonEmpty--danger',
|
|
33
|
-
text: 'euiButtonEmpty--text',
|
|
34
|
-
ghost: 'euiButtonEmpty--ghost',
|
|
35
|
-
success: 'euiButtonEmpty--success',
|
|
36
|
-
warning: 'euiButtonEmpty--warning'
|
|
37
|
-
};
|
|
38
|
-
export var COLORS = keysOf(colorToClassNameMap);
|
|
39
31
|
var sizeToClassNameMap = {
|
|
40
32
|
xs: 'euiButtonEmpty--xSmall',
|
|
41
33
|
s: 'euiButtonEmpty--small',
|
|
@@ -53,43 +45,57 @@ export var FLUSH_TYPES = keysOf(flushTypeToClassNameMap);
|
|
|
53
45
|
* `iconType`, `iconSide`, and `textProps`
|
|
54
46
|
*/
|
|
55
47
|
|
|
56
|
-
export var EuiButtonEmpty = function EuiButtonEmpty(
|
|
57
|
-
var children =
|
|
58
|
-
className =
|
|
59
|
-
iconType =
|
|
60
|
-
|
|
61
|
-
iconSide =
|
|
62
|
-
|
|
63
|
-
iconSize =
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
size =
|
|
68
|
-
flush =
|
|
69
|
-
_isDisabled =
|
|
70
|
-
|
|
71
|
-
isLoading =
|
|
72
|
-
href =
|
|
73
|
-
target =
|
|
74
|
-
rel =
|
|
75
|
-
|
|
76
|
-
type =
|
|
77
|
-
buttonRef =
|
|
78
|
-
contentProps =
|
|
79
|
-
textProps =
|
|
80
|
-
isSelected =
|
|
81
|
-
rest = _objectWithoutProperties(
|
|
82
|
-
|
|
83
|
-
var
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
48
|
+
export var EuiButtonEmpty = function EuiButtonEmpty(props) {
|
|
49
|
+
var children = props.children,
|
|
50
|
+
className = props.className,
|
|
51
|
+
iconType = props.iconType,
|
|
52
|
+
_props$iconSide = props.iconSide,
|
|
53
|
+
iconSide = _props$iconSide === void 0 ? 'left' : _props$iconSide,
|
|
54
|
+
_props$iconSize = props.iconSize,
|
|
55
|
+
iconSize = _props$iconSize === void 0 ? 'm' : _props$iconSize,
|
|
56
|
+
_props$color = props.color,
|
|
57
|
+
_color = _props$color === void 0 ? 'primary' : _props$color,
|
|
58
|
+
_props$size = props.size,
|
|
59
|
+
size = _props$size === void 0 ? 'm' : _props$size,
|
|
60
|
+
flush = props.flush,
|
|
61
|
+
_isDisabled = props.isDisabled,
|
|
62
|
+
disabled = props.disabled,
|
|
63
|
+
isLoading = props.isLoading,
|
|
64
|
+
href = props.href,
|
|
65
|
+
target = props.target,
|
|
66
|
+
rel = props.rel,
|
|
67
|
+
_props$type = props.type,
|
|
68
|
+
type = _props$type === void 0 ? 'button' : _props$type,
|
|
69
|
+
buttonRef = props.buttonRef,
|
|
70
|
+
contentProps = props.contentProps,
|
|
71
|
+
textProps = props.textProps,
|
|
72
|
+
isSelected = props.isSelected,
|
|
73
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
74
|
+
|
|
75
|
+
var isDisabled = isButtonDisabled({
|
|
76
|
+
isDisabled: _isDisabled || disabled,
|
|
77
|
+
href: href,
|
|
78
|
+
isLoading: isLoading
|
|
79
|
+
}); // eslint-disable-next-line no-nested-ternary
|
|
80
|
+
|
|
81
|
+
var color = isDisabled ? 'disabled' : _color === 'ghost' ? 'text' : _color;
|
|
82
|
+
var buttonColorStyles = useEuiButtonColorCSS({
|
|
83
|
+
display: 'empty'
|
|
84
|
+
})[color];
|
|
85
|
+
|
|
86
|
+
if (_color === 'ghost') {
|
|
87
|
+
// INCEPTION: If `ghost`, re-implement with a wrapping dark mode theme provider
|
|
88
|
+
return ___EmotionJSX(EuiThemeProvider, {
|
|
89
|
+
colorMode: "dark"
|
|
90
|
+
}, ___EmotionJSX(EuiButtonEmpty, _extends({}, props, {
|
|
91
|
+
color: "text"
|
|
92
|
+
})));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
var classes = classNames('euiButtonEmpty', size ? sizeToClassNameMap[size] : null, flush ? flushTypeToClassNameMap[flush] : null, className);
|
|
91
96
|
var contentClassNames = classNames('euiButtonEmpty__content', contentProps && contentProps.className);
|
|
92
97
|
var textClassNames = classNames('euiButtonEmpty__text', textProps && textProps.className);
|
|
98
|
+
var cssStyles = [buttonColorStyles];
|
|
93
99
|
|
|
94
100
|
var innerNode = ___EmotionJSX(EuiButtonContent, _extends({
|
|
95
101
|
isLoading: isLoading,
|
|
@@ -106,7 +112,7 @@ export var EuiButtonEmpty = function EuiButtonEmpty(_ref) {
|
|
|
106
112
|
// this is a button and piggyback off its disabled styles.
|
|
107
113
|
|
|
108
114
|
|
|
109
|
-
if (href && !
|
|
115
|
+
if (href && !isDisabled) {
|
|
110
116
|
var secureRel = getSecureRelForTarget({
|
|
111
117
|
href: href,
|
|
112
118
|
target: target,
|
|
@@ -114,6 +120,7 @@ export var EuiButtonEmpty = function EuiButtonEmpty(_ref) {
|
|
|
114
120
|
});
|
|
115
121
|
return ___EmotionJSX("a", _extends({
|
|
116
122
|
className: classes,
|
|
123
|
+
css: cssStyles,
|
|
117
124
|
href: href,
|
|
118
125
|
target: target,
|
|
119
126
|
rel: secureRel,
|
|
@@ -122,8 +129,9 @@ export var EuiButtonEmpty = function EuiButtonEmpty(_ref) {
|
|
|
122
129
|
}
|
|
123
130
|
|
|
124
131
|
return ___EmotionJSX("button", _extends({
|
|
125
|
-
disabled:
|
|
132
|
+
disabled: isDisabled,
|
|
126
133
|
className: classes,
|
|
134
|
+
css: cssStyles,
|
|
127
135
|
type: type,
|
|
128
136
|
ref: buttonRef,
|
|
129
137
|
"aria-pressed": isSelected
|
|
@@ -134,13 +142,15 @@ EuiButtonEmpty.propTypes = {
|
|
|
134
142
|
onClick: PropTypes.func,
|
|
135
143
|
|
|
136
144
|
/**
|
|
137
|
-
* Any of
|
|
145
|
+
* Any of the named color palette options.
|
|
146
|
+
* **`'ghost'` is set for deprecation. Use EuiThemeProvide.colorMode = 'dark' instead.**
|
|
138
147
|
*/
|
|
139
148
|
|
|
140
149
|
/**
|
|
141
|
-
* Any of
|
|
150
|
+
* Any of the named color palette options.
|
|
151
|
+
* **`'ghost'` is set for deprecation. Use EuiThemeProvide.colorMode = 'dark' instead.**
|
|
142
152
|
*/
|
|
143
|
-
color: PropTypes.
|
|
153
|
+
color: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.oneOf(["ghost"])]),
|
|
144
154
|
size: PropTypes.oneOf(["xs", "s", "m"]),
|
|
145
155
|
|
|
146
156
|
/**
|
|
@@ -51,15 +51,7 @@ export var EuiButtonGroup = function EuiButtonGroup(_ref) {
|
|
|
51
51
|
type = _ref$type === void 0 ? 'single' : _ref$type,
|
|
52
52
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
var badColorCombo = buttonSize === 'compressed' && color === 'ghost';
|
|
56
|
-
var resolvedColor = badColorCombo ? 'text' : color;
|
|
57
|
-
|
|
58
|
-
if (badColorCombo) {
|
|
59
|
-
console.warn('EuiButtonGroup of compressed size does not support the ghost color. It will render as text instead.');
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
var classes = classNames('euiButtonGroup', "euiButtonGroup".concat(groupSizeToClassNameMap[buttonSize]), "euiButtonGroup".concat(colorToClassNameMap[resolvedColor]), {
|
|
54
|
+
var classes = classNames('euiButtonGroup', "euiButtonGroup".concat(groupSizeToClassNameMap[buttonSize]), "euiButtonGroup".concat(colorToClassNameMap[color]), {
|
|
63
55
|
'euiButtonGroup--fullWidth': isFullWidth,
|
|
64
56
|
'euiButtonGroup--isDisabled': isDisabled
|
|
65
57
|
}, className);
|
|
@@ -81,7 +73,7 @@ export var EuiButtonGroup = function EuiButtonGroup(_ref) {
|
|
|
81
73
|
}, option, {
|
|
82
74
|
element: typeIsSingle ? 'label' : 'button',
|
|
83
75
|
isSelected: typeIsSingle ? option.id === idSelected : idToSelectedMap[option.id],
|
|
84
|
-
color:
|
|
76
|
+
color: color,
|
|
85
77
|
size: buttonSize,
|
|
86
78
|
isIconOnly: isIconOnly,
|
|
87
79
|
onChange: onChange
|
|
@@ -118,9 +110,9 @@ EuiButtonGroup.propTypes = {
|
|
|
118
110
|
legend: PropTypes.string.isRequired,
|
|
119
111
|
|
|
120
112
|
/**
|
|
121
|
-
*
|
|
113
|
+
* Any of the named color palette options.
|
|
122
114
|
*/
|
|
123
|
-
color: PropTypes.
|
|
115
|
+
color: PropTypes.any,
|
|
124
116
|
|
|
125
117
|
/**
|
|
126
118
|
* Default for `type` is single so it can also be excluded
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["className", "id", "isDisabled", "isIconOnly", "isSelected", "label", "name", "onChange", "size", "value", "element", "type"];
|
|
1
|
+
var _excluded = ["className", "id", "isDisabled", "isIconOnly", "isSelected", "label", "name", "onChange", "size", "value", "color", "element", "type"];
|
|
2
2
|
|
|
3
3
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
@@ -37,6 +37,7 @@ import React from 'react';
|
|
|
37
37
|
import { EuiButtonDisplayDeprecated as EuiButtonDisplay } from '../button';
|
|
38
38
|
import { useInnerText } from '../../inner_text';
|
|
39
39
|
import { useGeneratedHtmlId } from '../../../services';
|
|
40
|
+
import { useEuiButtonColorCSS } from '../../../themes/amsterdam/global_styling/mixins/button';
|
|
40
41
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
41
42
|
export var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
|
|
42
43
|
var className = _ref.className,
|
|
@@ -50,6 +51,8 @@ export var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
|
|
|
50
51
|
_onChange = _ref.onChange,
|
|
51
52
|
size = _ref.size,
|
|
52
53
|
value = _ref.value,
|
|
54
|
+
_ref$color = _ref.color,
|
|
55
|
+
_color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
53
56
|
_ref$element = _ref.element,
|
|
54
57
|
element = _ref$element === void 0 ? 'button' : _ref$element,
|
|
55
58
|
_ref$type = _ref.type,
|
|
@@ -89,8 +92,15 @@ export var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
|
|
|
89
92
|
return _onChange(id);
|
|
90
93
|
}
|
|
91
94
|
});
|
|
92
|
-
}
|
|
95
|
+
} // eslint-disable-next-line no-nested-ternary
|
|
93
96
|
|
|
97
|
+
|
|
98
|
+
var color = isDisabled ? 'disabled' : _color; // eslint-disable-next-line no-nested-ternary
|
|
99
|
+
|
|
100
|
+
var display = isSelected ? 'fill' : size === 'compressed' ? 'empty' : 'base';
|
|
101
|
+
var buttonColorStyles = useEuiButtonColorCSS({
|
|
102
|
+
display: display
|
|
103
|
+
})[color];
|
|
94
104
|
var buttonClasses = classNames({
|
|
95
105
|
'euiButtonGroupButton-isSelected': isSelected,
|
|
96
106
|
'euiButtonGroupButton-isIconOnly': isIconOnly
|
|
@@ -107,10 +117,10 @@ export var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
|
|
|
107
117
|
innerText = _useInnerText2[1];
|
|
108
118
|
|
|
109
119
|
return ___EmotionJSX(EuiButtonDisplay, _extends({
|
|
120
|
+
css: [buttonColorStyles, ";label:EuiButtonGroupButton;"],
|
|
110
121
|
baseClassName: "euiButtonGroupButton",
|
|
111
122
|
className: buttonClasses,
|
|
112
123
|
element: el,
|
|
113
|
-
fill: size !== 'compressed' && isSelected,
|
|
114
124
|
isDisabled: isDisabled,
|
|
115
125
|
size: size === 'compressed' ? 's' : size,
|
|
116
126
|
textProps: {
|
|
@@ -194,7 +204,7 @@ EuiButtonGroupButton.propTypes = {
|
|
|
194
204
|
/**
|
|
195
205
|
* Inherit from EuiButtonGroup
|
|
196
206
|
*/
|
|
197
|
-
color: PropTypes.
|
|
207
|
+
color: PropTypes.any.isRequired,
|
|
198
208
|
|
|
199
209
|
/**
|
|
200
210
|
* Inherit from EuiButtonGroup
|
|
@@ -16,11 +16,13 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
16
16
|
import React from 'react';
|
|
17
17
|
import PropTypes from "prop-types";
|
|
18
18
|
import classNames from 'classnames';
|
|
19
|
-
import { getSecureRelForTarget } from '../../../services';
|
|
19
|
+
import { EuiThemeProvider, getSecureRelForTarget, useEuiTheme } from '../../../services';
|
|
20
20
|
import { keysOf } from '../../common';
|
|
21
21
|
import { EuiIcon } from '../../icon';
|
|
22
22
|
import { EuiLoadingSpinner } from '../../loading';
|
|
23
|
-
import {
|
|
23
|
+
import { euiButtonEmptyColor, useEuiButtonColorCSS } from '../../../themes/amsterdam/global_styling/mixins/button';
|
|
24
|
+
import { isButtonDisabled } from '../button_display/_button_display';
|
|
25
|
+
import { css } from '@emotion/react';
|
|
24
26
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
25
27
|
var displayToClassNameMap = {
|
|
26
28
|
base: null,
|
|
@@ -28,57 +30,66 @@ var displayToClassNameMap = {
|
|
|
28
30
|
fill: 'euiButtonIcon--fill'
|
|
29
31
|
};
|
|
30
32
|
export var DISPLAYS = keysOf(displayToClassNameMap);
|
|
31
|
-
var colorToClassNameMap = {
|
|
32
|
-
accent: 'euiButtonIcon--accent',
|
|
33
|
-
danger: 'euiButtonIcon--danger',
|
|
34
|
-
ghost: 'euiButtonIcon--ghost',
|
|
35
|
-
primary: 'euiButtonIcon--primary',
|
|
36
|
-
success: 'euiButtonIcon--success',
|
|
37
|
-
text: 'euiButtonIcon--text',
|
|
38
|
-
warning: 'euiButtonIcon--warning'
|
|
39
|
-
};
|
|
40
|
-
export var COLORS = keysOf(colorToClassNameMap);
|
|
41
33
|
var sizeToClassNameMap = {
|
|
42
34
|
xs: 'euiButtonIcon--xSmall',
|
|
43
35
|
s: 'euiButtonIcon--small',
|
|
44
36
|
m: 'euiButtonIcon--medium'
|
|
45
37
|
};
|
|
46
38
|
export var SIZES = keysOf(sizeToClassNameMap);
|
|
47
|
-
export var EuiButtonIcon = function EuiButtonIcon(
|
|
48
|
-
var className =
|
|
49
|
-
iconType =
|
|
50
|
-
|
|
51
|
-
iconSize =
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
_isDisabled =
|
|
55
|
-
disabled =
|
|
56
|
-
href =
|
|
57
|
-
|
|
58
|
-
type =
|
|
59
|
-
|
|
60
|
-
display =
|
|
61
|
-
target =
|
|
62
|
-
rel =
|
|
63
|
-
|
|
64
|
-
size =
|
|
65
|
-
buttonRef =
|
|
66
|
-
isSelected =
|
|
67
|
-
isLoading =
|
|
68
|
-
rest = _objectWithoutProperties(
|
|
69
|
-
|
|
70
|
-
var
|
|
71
|
-
var isDisabled =
|
|
39
|
+
export var EuiButtonIcon = function EuiButtonIcon(props) {
|
|
40
|
+
var className = props.className,
|
|
41
|
+
iconType = props.iconType,
|
|
42
|
+
_props$iconSize = props.iconSize,
|
|
43
|
+
iconSize = _props$iconSize === void 0 ? 'm' : _props$iconSize,
|
|
44
|
+
_props$color = props.color,
|
|
45
|
+
_color = _props$color === void 0 ? 'primary' : _props$color,
|
|
46
|
+
_isDisabled = props.isDisabled,
|
|
47
|
+
disabled = props.disabled,
|
|
48
|
+
href = props.href,
|
|
49
|
+
_props$type = props.type,
|
|
50
|
+
type = _props$type === void 0 ? 'button' : _props$type,
|
|
51
|
+
_props$display = props.display,
|
|
52
|
+
display = _props$display === void 0 ? 'empty' : _props$display,
|
|
53
|
+
target = props.target,
|
|
54
|
+
rel = props.rel,
|
|
55
|
+
_props$size = props.size,
|
|
56
|
+
size = _props$size === void 0 ? 'xs' : _props$size,
|
|
57
|
+
buttonRef = props.buttonRef,
|
|
58
|
+
isSelected = props.isSelected,
|
|
59
|
+
isLoading = props.isLoading,
|
|
60
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
61
|
+
|
|
62
|
+
var euiThemeContext = useEuiTheme();
|
|
63
|
+
var isDisabled = isButtonDisabled({
|
|
64
|
+
isDisabled: _isDisabled || disabled,
|
|
65
|
+
href: href,
|
|
66
|
+
isLoading: isLoading
|
|
67
|
+
});
|
|
72
68
|
var ariaHidden = rest['aria-hidden'];
|
|
73
69
|
var isAriaHidden = ariaHidden === 'true' || ariaHidden === true;
|
|
74
70
|
|
|
75
71
|
if (!rest['aria-label'] && !rest['aria-labelledby'] && !isAriaHidden) {
|
|
76
72
|
console.warn("EuiButtonIcon requires aria-label or aria-labelledby to be specified because icon-only\n buttons are screen-reader-inaccessible without them.");
|
|
77
|
-
}
|
|
73
|
+
} // eslint-disable-next-line no-nested-ternary
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
var color = isDisabled ? 'disabled' : _color === 'ghost' ? 'text' : _color;
|
|
77
|
+
var buttonColorStyles = useEuiButtonColorCSS({
|
|
78
|
+
display: display
|
|
79
|
+
})[color]; // Temporary extra style for empty `:hover` state until we decide how to handle universally
|
|
80
|
+
|
|
81
|
+
var hoverStyles = display === 'empty' ? /*#__PURE__*/css("&:hover{background-color:", euiButtonEmptyColor(euiThemeContext, color).backgroundColor, ";};label:hoverStyles;") : /*#__PURE__*/css(";label:hoverStyles;");
|
|
82
|
+
var classes = classNames('euiButtonIcon', size && sizeToClassNameMap[size], className);
|
|
83
|
+
|
|
84
|
+
if (_color === 'ghost') {
|
|
85
|
+
// INCEPTION: If `ghost`, re-implement with a wrapping dark mode theme provider
|
|
86
|
+
return ___EmotionJSX(EuiThemeProvider, {
|
|
87
|
+
colorMode: "dark"
|
|
88
|
+
}, ___EmotionJSX(EuiButtonIcon, _extends({}, props, {
|
|
89
|
+
color: "text"
|
|
90
|
+
})));
|
|
91
|
+
} // Add an icon to the button if one exists.
|
|
78
92
|
|
|
79
|
-
var classes = classNames('euiButtonIcon', {
|
|
80
|
-
'euiButtonIcon-isDisabled': isDisabled
|
|
81
|
-
}, colorToClassNameMap[color], display && displayToClassNameMap[display], size && sizeToClassNameMap[size], className); // Add an icon to the button if one exists.
|
|
82
93
|
|
|
83
94
|
var buttonIcon;
|
|
84
95
|
|
|
@@ -113,6 +124,7 @@ export var EuiButtonIcon = function EuiButtonIcon(_ref) {
|
|
|
113
124
|
rel: rel
|
|
114
125
|
});
|
|
115
126
|
return ___EmotionJSX("a", _extends({
|
|
127
|
+
css: [buttonColorStyles, hoverStyles, ";label:EuiButtonIcon;"],
|
|
116
128
|
tabIndex: isAriaHidden ? -1 : undefined,
|
|
117
129
|
className: classes,
|
|
118
130
|
href: href,
|
|
@@ -124,6 +136,7 @@ export var EuiButtonIcon = function EuiButtonIcon(_ref) {
|
|
|
124
136
|
|
|
125
137
|
var buttonType;
|
|
126
138
|
return ___EmotionJSX("button", _extends({
|
|
139
|
+
css: [buttonColorStyles, hoverStyles, ";label:EuiButtonIcon;"],
|
|
127
140
|
tabIndex: isAriaHidden ? -1 : undefined,
|
|
128
141
|
disabled: isDisabled,
|
|
129
142
|
className: classes,
|
|
@@ -140,8 +153,14 @@ EuiButtonIcon.propTypes = {
|
|
|
140
153
|
|
|
141
154
|
/**
|
|
142
155
|
* Any of the named color palette options.
|
|
156
|
+
* **`'ghost'` is set for deprecation. Use EuiThemeProvide.colorMode = 'dark' instead.**
|
|
157
|
+
*/
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Any of the named color palette options.
|
|
161
|
+
* **`'ghost'` is set for deprecation. Use EuiThemeProvide.colorMode = 'dark' instead.**
|
|
143
162
|
*/
|
|
144
|
-
color: PropTypes.
|
|
163
|
+
color: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.oneOf(["ghost"])]),
|
|
145
164
|
"aria-label": PropTypes.string,
|
|
146
165
|
"aria-labelledby": PropTypes.string,
|
|
147
166
|
isDisabled: PropTypes.bool,
|
|
@@ -18,7 +18,8 @@ export var euiCallOutStyles = function euiCallOutStyles(_ref) {
|
|
|
18
18
|
export var euiCallOutHeadingStyles = function euiCallOutHeadingStyles(_ref2) {
|
|
19
19
|
var euiTheme = _ref2.euiTheme;
|
|
20
20
|
return {
|
|
21
|
-
euiCallOutHeader: /*#__PURE__*/css("font-weight:", euiTheme.font.weight.medium, ";margin-bottom
|
|
21
|
+
euiCallOutHeader: /*#__PURE__*/css("font-weight:", euiTheme.font.weight.medium, ";", logicalCSS('margin-bottom', '0 !important' // In case it's nested inside EuiText
|
|
22
|
+
), ";;label:euiCallOutHeader;"),
|
|
22
23
|
primary: /*#__PURE__*/css("color:", euiTheme.colors.primaryText, ";;label:primary;"),
|
|
23
24
|
success: /*#__PURE__*/css("color:", euiTheme.colors.successText, ";;label:success;"),
|
|
24
25
|
warning: /*#__PURE__*/css("color:", euiTheme.colors.warningText, ";;label:warning;"),
|