@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
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.EuiButtonDisplay = void 0;
|
|
9
|
+
exports.isButtonDisabled = isButtonDisabled;
|
|
9
10
|
|
|
10
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
12
|
|
|
@@ -19,7 +20,11 @@ var _button_display = require("./_button_display.styles");
|
|
|
19
20
|
|
|
20
21
|
var _button_display_content = require("./_button_display_content");
|
|
21
22
|
|
|
22
|
-
var
|
|
23
|
+
var _href_validator = require("../../../services/security/href_validator");
|
|
24
|
+
|
|
25
|
+
var _mixins = require("../../../themes/amsterdam/global_styling/mixins");
|
|
26
|
+
|
|
27
|
+
var _excluded = ["children", "iconType", "iconSide", "size", "isDisabled", "disabled", "isLoading", "isSelected", "fullWidth", "minWidth", "contentProps", "textProps", "href", "target", "rel", "type"];
|
|
23
28
|
|
|
24
29
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
30
|
|
|
@@ -39,33 +44,52 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
39
44
|
|
|
40
45
|
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; }
|
|
41
46
|
|
|
47
|
+
var SIZES = ['xs', 's', 'm'];
|
|
48
|
+
|
|
49
|
+
function isButtonDisabled(_ref) {
|
|
50
|
+
var href = _ref.href,
|
|
51
|
+
isDisabled = _ref.isDisabled,
|
|
52
|
+
isLoading = _ref.isLoading;
|
|
53
|
+
var isHrefValid = !href || (0, _href_validator.validateHref)(href);
|
|
54
|
+
return isLoading || isDisabled || !isHrefValid;
|
|
55
|
+
}
|
|
42
56
|
/**
|
|
43
57
|
* EuiButtonDisplay is an internal-only component used for displaying
|
|
44
58
|
* any element as a button.
|
|
45
59
|
*/
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
iconType =
|
|
51
|
-
iconSide =
|
|
52
|
-
|
|
53
|
-
size =
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
isLoading =
|
|
57
|
-
isSelected =
|
|
58
|
-
fullWidth =
|
|
59
|
-
minWidth =
|
|
60
|
-
contentProps =
|
|
61
|
-
textProps =
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
|
|
63
|
+
var children = _ref2.children,
|
|
64
|
+
iconType = _ref2.iconType,
|
|
65
|
+
iconSide = _ref2.iconSide,
|
|
66
|
+
_ref2$size = _ref2.size,
|
|
67
|
+
size = _ref2$size === void 0 ? 'm' : _ref2$size,
|
|
68
|
+
isDisabled = _ref2.isDisabled,
|
|
69
|
+
disabled = _ref2.disabled,
|
|
70
|
+
isLoading = _ref2.isLoading,
|
|
71
|
+
isSelected = _ref2.isSelected,
|
|
72
|
+
fullWidth = _ref2.fullWidth,
|
|
73
|
+
minWidth = _ref2.minWidth,
|
|
74
|
+
contentProps = _ref2.contentProps,
|
|
75
|
+
textProps = _ref2.textProps,
|
|
76
|
+
href = _ref2.href,
|
|
77
|
+
target = _ref2.target,
|
|
78
|
+
rel = _ref2.rel,
|
|
79
|
+
_ref2$type = _ref2.type,
|
|
80
|
+
type = _ref2$type === void 0 ? 'button' : _ref2$type,
|
|
81
|
+
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
82
|
+
|
|
83
|
+
var buttonIsDisabled = isButtonDisabled({
|
|
84
|
+
href: href,
|
|
85
|
+
isDisabled: isDisabled || disabled,
|
|
86
|
+
isLoading: isLoading
|
|
87
|
+
});
|
|
88
|
+
var minWidthPx = typeof minWidth === 'number' ? "".concat(minWidth, "px") : minWidth;
|
|
66
89
|
var theme = (0, _services.useEuiTheme)();
|
|
67
90
|
var styles = (0, _button_display.euiButtonDisplayStyles)(theme, minWidthPx);
|
|
68
|
-
var
|
|
91
|
+
var buttonRadiusStyle = (0, _mixins.useEuiButtonRadiusCSS)()[size];
|
|
92
|
+
var cssStyles = [styles.euiButtonDisplay, styles[size], fullWidth && styles.fullWidth, buttonIsDisabled && styles.isDisabled, buttonRadiusStyle];
|
|
69
93
|
var innerNode = (0, _react2.jsx)(_button_display_content.EuiButtonDisplayContent, _extends({
|
|
70
94
|
isLoading: isLoading,
|
|
71
95
|
isDisabled: buttonIsDisabled,
|
|
@@ -73,17 +97,46 @@ var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
|
|
|
73
97
|
iconSide: iconSide,
|
|
74
98
|
textProps: _objectSpread({}, textProps)
|
|
75
99
|
}, contentProps), children);
|
|
76
|
-
|
|
100
|
+
var element = href && !buttonIsDisabled ? 'a' : 'button';
|
|
101
|
+
var elementProps = {}; // Element-specific attributes
|
|
102
|
+
|
|
103
|
+
if (element === 'button') {
|
|
104
|
+
elementProps = _objectSpread(_objectSpread({}, elementProps), {}, {
|
|
105
|
+
disabled: buttonIsDisabled,
|
|
106
|
+
'aria-pressed': isSelected
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
var relObj = {};
|
|
111
|
+
|
|
112
|
+
if (href && !buttonIsDisabled) {
|
|
113
|
+
relObj.href = href;
|
|
114
|
+
relObj.rel = (0, _services.getSecureRelForTarget)({
|
|
115
|
+
href: href,
|
|
116
|
+
target: target,
|
|
117
|
+
rel: rel
|
|
118
|
+
});
|
|
119
|
+
relObj.target = target;
|
|
120
|
+
} else {
|
|
121
|
+
relObj.type = type;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
return (0, _react2.createElement)(element, _objectSpread(_objectSpread(_objectSpread({
|
|
77
125
|
css: cssStyles,
|
|
78
|
-
disabled: element === 'button' && buttonIsDisabled,
|
|
79
|
-
'aria-pressed': element === 'button' ? isSelected : undefined,
|
|
80
126
|
ref: ref
|
|
81
|
-
}, rest), innerNode);
|
|
127
|
+
}, elementProps), relObj), rest), innerNode);
|
|
82
128
|
});
|
|
83
129
|
exports.EuiButtonDisplay = EuiButtonDisplay;
|
|
84
130
|
EuiButtonDisplay.propTypes = {
|
|
131
|
+
href: _propTypes.default.string,
|
|
132
|
+
onClick: _propTypes.default.func,
|
|
85
133
|
children: _propTypes.default.node,
|
|
86
|
-
size: _propTypes.default.
|
|
134
|
+
size: _propTypes.default.any,
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Applies the boolean state as the `aria-pressed` property to create a toggle button.
|
|
138
|
+
* *Only use when the readable text does not change between states.*
|
|
139
|
+
*/
|
|
87
140
|
|
|
88
141
|
/**
|
|
89
142
|
* Applies the boolean state as the `aria-pressed` property to create a toggle button.
|
|
@@ -91,16 +144,28 @@ EuiButtonDisplay.propTypes = {
|
|
|
91
144
|
*/
|
|
92
145
|
isSelected: _propTypes.default.bool,
|
|
93
146
|
|
|
147
|
+
/**
|
|
148
|
+
* Extends the button to 100% width
|
|
149
|
+
*/
|
|
150
|
+
|
|
94
151
|
/**
|
|
95
152
|
* Extends the button to 100% width
|
|
96
153
|
*/
|
|
97
154
|
fullWidth: _propTypes.default.bool,
|
|
98
155
|
|
|
156
|
+
/**
|
|
157
|
+
* Override the default minimum width
|
|
158
|
+
*/
|
|
159
|
+
|
|
99
160
|
/**
|
|
100
161
|
* Override the default minimum width
|
|
101
162
|
*/
|
|
102
163
|
minWidth: _propTypes.default.any,
|
|
103
164
|
|
|
165
|
+
/**
|
|
166
|
+
* Force disables the button and changes the icon to a loading spinner
|
|
167
|
+
*/
|
|
168
|
+
|
|
104
169
|
/**
|
|
105
170
|
* Force disables the button and changes the icon to a loading spinner
|
|
106
171
|
*/
|
|
@@ -134,15 +199,11 @@ EuiButtonDisplay.propTypes = {
|
|
|
134
199
|
"data-text": _propTypes.default.string
|
|
135
200
|
}),
|
|
136
201
|
iconSize: _propTypes.default.oneOf(["s", "m"]),
|
|
137
|
-
isDisabled: _propTypes.default.bool
|
|
202
|
+
isDisabled: _propTypes.default.bool,
|
|
138
203
|
className: _propTypes.default.string,
|
|
139
204
|
"aria-label": _propTypes.default.string,
|
|
140
205
|
"data-test-subj": _propTypes.default.string,
|
|
141
206
|
css: _propTypes.default.any,
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* Provide a valid element to render the element as
|
|
145
|
-
*/
|
|
146
|
-
element: _propTypes.default.oneOf(["a", "button", "span", "label"])
|
|
207
|
+
buttonRef: _propTypes.default.any
|
|
147
208
|
};
|
|
148
209
|
EuiButtonDisplay.displayName = 'EuiButtonDisplay';
|
|
@@ -24,20 +24,11 @@ var _buttonSize = function _buttonSize(size) {
|
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
27
|
-
name: "
|
|
28
|
-
styles: "
|
|
27
|
+
name: "vifhyf-isDisabled",
|
|
28
|
+
styles: "pointer-events:none;cursor:not-allowed;label:isDisabled;"
|
|
29
29
|
} : {
|
|
30
|
-
name: "
|
|
31
|
-
styles: "
|
|
32
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
36
|
-
name: "8595p9-isDisabled",
|
|
37
|
-
styles: "cursor:not-allowed;label:isDisabled;"
|
|
38
|
-
} : {
|
|
39
|
-
name: "8595p9-isDisabled",
|
|
40
|
-
styles: "cursor:not-allowed;label:isDisabled;",
|
|
30
|
+
name: "vifhyf-isDisabled",
|
|
31
|
+
styles: "pointer-events:none;cursor:not-allowed;label:isDisabled;",
|
|
41
32
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
42
33
|
};
|
|
43
34
|
|
|
@@ -45,10 +36,10 @@ var euiButtonDisplayStyles = function euiButtonDisplayStyles(euiThemeContext, mi
|
|
|
45
36
|
var euiTheme = euiThemeContext.euiTheme;
|
|
46
37
|
return {
|
|
47
38
|
// Base
|
|
48
|
-
euiButtonDisplay: /*#__PURE__*/(0, _react.css)(euiButtonBaseCSS(), ";", minWidth && (0, _global_styling.logicalCSS)('min-width', minWidth), "
|
|
39
|
+
euiButtonDisplay: /*#__PURE__*/(0, _react.css)(euiButtonBaseCSS(), ";", minWidth && (0, _global_styling.logicalCSS)('min-width', minWidth), ";font-weight:", euiTheme.font.weight.medium, ";padding:0 ", euiTheme.size.m, ";&:hover:not(:disabled),&:focus{text-decoration:underline;};label:euiButtonDisplay;"),
|
|
49
40
|
// States
|
|
50
|
-
isDisabled:
|
|
51
|
-
fullWidth:
|
|
41
|
+
isDisabled: _ref,
|
|
42
|
+
fullWidth: /*#__PURE__*/(0, _react.css)("display:block;", (0, _global_styling.logicalCSS)('width', '100%'), ";;label:fullWidth;"),
|
|
52
43
|
// Sizes
|
|
53
44
|
xs: /*#__PURE__*/(0, _react.css)(_buttonSize(euiTheme.size.l), (0, _global_styling.euiFontSize)(euiThemeContext, 'xs'), ";label:xs;"),
|
|
54
45
|
s: /*#__PURE__*/(0, _react.css)(_buttonSize(euiTheme.size.xl), (0, _global_styling.euiFontSize)(euiThemeContext, 's'), ";label:s;"),
|
|
@@ -17,6 +17,8 @@ var _icon = require("../../icon");
|
|
|
17
17
|
|
|
18
18
|
var _button_display_content = require("./_button_display_content.styles");
|
|
19
19
|
|
|
20
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
21
|
+
|
|
20
22
|
var _react2 = require("@emotion/react");
|
|
21
23
|
|
|
22
24
|
var _excluded = ["children", "textProps", "isLoading", "isDisabled", "iconType", "iconSize", "iconSide"];
|
|
@@ -44,7 +46,7 @@ var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
|
|
|
44
46
|
|
|
45
47
|
var theme = (0, _services.useEuiTheme)();
|
|
46
48
|
var styles = (0, _button_display_content.euiButtonDisplayContentStyles)(theme);
|
|
47
|
-
var cssStyles = [styles.euiButtonDisplayContent, iconSide && styles[iconSide]
|
|
49
|
+
var cssStyles = [styles.euiButtonDisplayContent, iconSide && styles[iconSide]];
|
|
48
50
|
var cssSpinnerStyles = [styles.euiButtonDisplayContent__spinner];
|
|
49
51
|
var cssIconStyles = [styles.euiButtonDisplayContent__icon]; // Add an icon to the button if one exists.
|
|
50
52
|
|
|
@@ -77,7 +79,9 @@ var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
|
|
|
77
79
|
var isText = typeof children === 'string';
|
|
78
80
|
return (0, _react2.jsx)("span", _extends({}, contentProps, {
|
|
79
81
|
css: cssStyles
|
|
80
|
-
}), icon, isText ? (0, _react2.jsx)("span", textProps,
|
|
82
|
+
}), icon, isText ? (0, _react2.jsx)("span", _extends({}, textProps, {
|
|
83
|
+
className: (0, _classnames.default)('eui-textTruncate', textProps === null || textProps === void 0 ? void 0 : textProps.className)
|
|
84
|
+
}), children) : children);
|
|
81
85
|
};
|
|
82
86
|
|
|
83
87
|
exports.EuiButtonDisplayContent = EuiButtonDisplayContent;
|
|
@@ -105,7 +109,7 @@ EuiButtonDisplayContent.propTypes = {
|
|
|
105
109
|
"data-text": _propTypes.default.string
|
|
106
110
|
}),
|
|
107
111
|
iconSize: _propTypes.default.oneOf(["s", "m"]),
|
|
108
|
-
isDisabled: _propTypes.default.bool
|
|
112
|
+
isDisabled: _propTypes.default.bool,
|
|
109
113
|
className: _propTypes.default.string,
|
|
110
114
|
"aria-label": _propTypes.default.string,
|
|
111
115
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -12,15 +12,6 @@ var _global_styling = require("../../../global_styling");
|
|
|
12
12
|
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)."; }
|
|
13
13
|
|
|
14
14
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
15
|
-
name: "ske5nx-isDisabled",
|
|
16
|
-
styles: "pointer-events:auto;cursor:not-allowed;label:isDisabled;"
|
|
17
|
-
} : {
|
|
18
|
-
name: "ske5nx-isDisabled",
|
|
19
|
-
styles: "pointer-events:auto;cursor:not-allowed;label:isDisabled;",
|
|
20
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
24
15
|
name: "gtg6j-euiButtonDisplayContent__icon",
|
|
25
16
|
styles: "flex-shrink:0;label:euiButtonDisplayContent__icon;"
|
|
26
17
|
} : {
|
|
@@ -29,7 +20,7 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
29
20
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
30
21
|
};
|
|
31
22
|
|
|
32
|
-
var
|
|
23
|
+
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
33
24
|
name: "10wlo76-euiButtonDisplayContent__spinner",
|
|
34
25
|
styles: "flex-shrink:0;label:euiButtonDisplayContent__spinner;"
|
|
35
26
|
} : {
|
|
@@ -38,7 +29,7 @@ var _ref3 = process.env.NODE_ENV === "production" ? {
|
|
|
38
29
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
39
30
|
};
|
|
40
31
|
|
|
41
|
-
var
|
|
32
|
+
var _ref3 = process.env.NODE_ENV === "production" ? {
|
|
42
33
|
name: "qfl6yj-right",
|
|
43
34
|
styles: "flex-direction:row-reverse;label:right;"
|
|
44
35
|
} : {
|
|
@@ -47,17 +38,16 @@ var _ref4 = process.env.NODE_ENV === "production" ? {
|
|
|
47
38
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
48
39
|
};
|
|
49
40
|
|
|
50
|
-
var euiButtonDisplayContentStyles = function euiButtonDisplayContentStyles(
|
|
51
|
-
var euiTheme =
|
|
41
|
+
var euiButtonDisplayContentStyles = function euiButtonDisplayContentStyles(_ref4) {
|
|
42
|
+
var euiTheme = _ref4.euiTheme;
|
|
52
43
|
return {
|
|
53
44
|
// Base
|
|
54
45
|
euiButtonDisplayContent: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', '100%'), ";", (0, _global_styling.logicalCSS)('width', '100%'), ";display:flex;justify-content:center;align-items:center;vertical-align:middle;gap:", euiTheme.size.s, ";;label:euiButtonDisplayContent;"),
|
|
55
46
|
// Icon side
|
|
56
47
|
left: /*#__PURE__*/(0, _react.css)(";label:left;"),
|
|
57
|
-
right:
|
|
58
|
-
euiButtonDisplayContent__spinner:
|
|
59
|
-
euiButtonDisplayContent__icon:
|
|
60
|
-
isDisabled: _ref
|
|
48
|
+
right: _ref3,
|
|
49
|
+
euiButtonDisplayContent__spinner: _ref2,
|
|
50
|
+
euiButtonDisplayContent__icon: _ref
|
|
61
51
|
};
|
|
62
52
|
};
|
|
63
53
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.SIZES = exports.FLUSH_TYPES = exports.EuiButtonEmpty =
|
|
6
|
+
exports.SIZES = exports.FLUSH_TYPES = exports.EuiButtonEmpty = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -17,7 +17,9 @@ var _services = require("../../../services");
|
|
|
17
17
|
|
|
18
18
|
var _button_content_deprecated = require("../_button_content_deprecated");
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _button = require("../../../themes/amsterdam/global_styling/mixins/button");
|
|
21
|
+
|
|
22
|
+
var _button_display = require("../button_display/_button_display");
|
|
21
23
|
|
|
22
24
|
var _react2 = require("@emotion/react");
|
|
23
25
|
|
|
@@ -25,28 +27,18 @@ var _excluded = ["children", "className", "iconType", "iconSide", "iconSize", "c
|
|
|
25
27
|
|
|
26
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
29
|
|
|
28
|
-
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); }
|
|
29
|
-
|
|
30
30
|
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; }
|
|
31
31
|
|
|
32
32
|
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; }
|
|
33
33
|
|
|
34
34
|
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; }
|
|
35
35
|
|
|
36
|
+
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); }
|
|
37
|
+
|
|
36
38
|
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; }
|
|
37
39
|
|
|
38
40
|
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; }
|
|
39
41
|
|
|
40
|
-
var colorToClassNameMap = {
|
|
41
|
-
primary: 'euiButtonEmpty--primary',
|
|
42
|
-
danger: 'euiButtonEmpty--danger',
|
|
43
|
-
text: 'euiButtonEmpty--text',
|
|
44
|
-
ghost: 'euiButtonEmpty--ghost',
|
|
45
|
-
success: 'euiButtonEmpty--success',
|
|
46
|
-
warning: 'euiButtonEmpty--warning'
|
|
47
|
-
};
|
|
48
|
-
var COLORS = (0, _common.keysOf)(colorToClassNameMap);
|
|
49
|
-
exports.COLORS = COLORS;
|
|
50
42
|
var sizeToClassNameMap = {
|
|
51
43
|
xs: 'euiButtonEmpty--xSmall',
|
|
52
44
|
s: 'euiButtonEmpty--small',
|
|
@@ -67,43 +59,57 @@ var FLUSH_TYPES = (0, _common.keysOf)(flushTypeToClassNameMap);
|
|
|
67
59
|
|
|
68
60
|
exports.FLUSH_TYPES = FLUSH_TYPES;
|
|
69
61
|
|
|
70
|
-
var EuiButtonEmpty = function EuiButtonEmpty(
|
|
71
|
-
var children =
|
|
72
|
-
className =
|
|
73
|
-
iconType =
|
|
74
|
-
|
|
75
|
-
iconSide =
|
|
76
|
-
|
|
77
|
-
iconSize =
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
size =
|
|
82
|
-
flush =
|
|
83
|
-
_isDisabled =
|
|
84
|
-
|
|
85
|
-
isLoading =
|
|
86
|
-
href =
|
|
87
|
-
target =
|
|
88
|
-
rel =
|
|
89
|
-
|
|
90
|
-
type =
|
|
91
|
-
buttonRef =
|
|
92
|
-
contentProps =
|
|
93
|
-
textProps =
|
|
94
|
-
isSelected =
|
|
95
|
-
rest = _objectWithoutProperties(
|
|
96
|
-
|
|
97
|
-
var
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
62
|
+
var EuiButtonEmpty = function EuiButtonEmpty(props) {
|
|
63
|
+
var children = props.children,
|
|
64
|
+
className = props.className,
|
|
65
|
+
iconType = props.iconType,
|
|
66
|
+
_props$iconSide = props.iconSide,
|
|
67
|
+
iconSide = _props$iconSide === void 0 ? 'left' : _props$iconSide,
|
|
68
|
+
_props$iconSize = props.iconSize,
|
|
69
|
+
iconSize = _props$iconSize === void 0 ? 'm' : _props$iconSize,
|
|
70
|
+
_props$color = props.color,
|
|
71
|
+
_color = _props$color === void 0 ? 'primary' : _props$color,
|
|
72
|
+
_props$size = props.size,
|
|
73
|
+
size = _props$size === void 0 ? 'm' : _props$size,
|
|
74
|
+
flush = props.flush,
|
|
75
|
+
_isDisabled = props.isDisabled,
|
|
76
|
+
disabled = props.disabled,
|
|
77
|
+
isLoading = props.isLoading,
|
|
78
|
+
href = props.href,
|
|
79
|
+
target = props.target,
|
|
80
|
+
rel = props.rel,
|
|
81
|
+
_props$type = props.type,
|
|
82
|
+
type = _props$type === void 0 ? 'button' : _props$type,
|
|
83
|
+
buttonRef = props.buttonRef,
|
|
84
|
+
contentProps = props.contentProps,
|
|
85
|
+
textProps = props.textProps,
|
|
86
|
+
isSelected = props.isSelected,
|
|
87
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
88
|
+
|
|
89
|
+
var isDisabled = (0, _button_display.isButtonDisabled)({
|
|
90
|
+
isDisabled: _isDisabled || disabled,
|
|
91
|
+
href: href,
|
|
92
|
+
isLoading: isLoading
|
|
93
|
+
}); // eslint-disable-next-line no-nested-ternary
|
|
94
|
+
|
|
95
|
+
var color = isDisabled ? 'disabled' : _color === 'ghost' ? 'text' : _color;
|
|
96
|
+
var buttonColorStyles = (0, _button.useEuiButtonColorCSS)({
|
|
97
|
+
display: 'empty'
|
|
98
|
+
})[color];
|
|
99
|
+
|
|
100
|
+
if (_color === 'ghost') {
|
|
101
|
+
// INCEPTION: If `ghost`, re-implement with a wrapping dark mode theme provider
|
|
102
|
+
return (0, _react2.jsx)(_services.EuiThemeProvider, {
|
|
103
|
+
colorMode: "dark"
|
|
104
|
+
}, (0, _react2.jsx)(EuiButtonEmpty, _extends({}, props, {
|
|
105
|
+
color: "text"
|
|
106
|
+
})));
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
var classes = (0, _classnames.default)('euiButtonEmpty', size ? sizeToClassNameMap[size] : null, flush ? flushTypeToClassNameMap[flush] : null, className);
|
|
105
110
|
var contentClassNames = (0, _classnames.default)('euiButtonEmpty__content', contentProps && contentProps.className);
|
|
106
111
|
var textClassNames = (0, _classnames.default)('euiButtonEmpty__text', textProps && textProps.className);
|
|
112
|
+
var cssStyles = [buttonColorStyles];
|
|
107
113
|
var innerNode = (0, _react2.jsx)(_button_content_deprecated.EuiButtonContentDeprecated, _extends({
|
|
108
114
|
isLoading: isLoading,
|
|
109
115
|
iconType: iconType,
|
|
@@ -118,7 +124,7 @@ var EuiButtonEmpty = function EuiButtonEmpty(_ref) {
|
|
|
118
124
|
}), children); // <a> elements don't respect the `disabled` attribute. So if we're disabled, we'll just pretend
|
|
119
125
|
// this is a button and piggyback off its disabled styles.
|
|
120
126
|
|
|
121
|
-
if (href && !
|
|
127
|
+
if (href && !isDisabled) {
|
|
122
128
|
var secureRel = (0, _services.getSecureRelForTarget)({
|
|
123
129
|
href: href,
|
|
124
130
|
target: target,
|
|
@@ -126,6 +132,7 @@ var EuiButtonEmpty = function EuiButtonEmpty(_ref) {
|
|
|
126
132
|
});
|
|
127
133
|
return (0, _react2.jsx)("a", _extends({
|
|
128
134
|
className: classes,
|
|
135
|
+
css: cssStyles,
|
|
129
136
|
href: href,
|
|
130
137
|
target: target,
|
|
131
138
|
rel: secureRel,
|
|
@@ -134,8 +141,9 @@ var EuiButtonEmpty = function EuiButtonEmpty(_ref) {
|
|
|
134
141
|
}
|
|
135
142
|
|
|
136
143
|
return (0, _react2.jsx)("button", _extends({
|
|
137
|
-
disabled:
|
|
144
|
+
disabled: isDisabled,
|
|
138
145
|
className: classes,
|
|
146
|
+
css: cssStyles,
|
|
139
147
|
type: type,
|
|
140
148
|
ref: buttonRef,
|
|
141
149
|
"aria-pressed": isSelected
|
|
@@ -148,13 +156,15 @@ EuiButtonEmpty.propTypes = {
|
|
|
148
156
|
onClick: _propTypes.default.func,
|
|
149
157
|
|
|
150
158
|
/**
|
|
151
|
-
* Any of
|
|
159
|
+
* Any of the named color palette options.
|
|
160
|
+
* **`'ghost'` is set for deprecation. Use EuiThemeProvide.colorMode = 'dark' instead.**
|
|
152
161
|
*/
|
|
153
162
|
|
|
154
163
|
/**
|
|
155
|
-
* Any of
|
|
164
|
+
* Any of the named color palette options.
|
|
165
|
+
* **`'ghost'` is set for deprecation. Use EuiThemeProvide.colorMode = 'dark' instead.**
|
|
156
166
|
*/
|
|
157
|
-
color: _propTypes.default.
|
|
167
|
+
color: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.oneOf(["ghost"])]),
|
|
158
168
|
size: _propTypes.default.oneOf(["xs", "s", "m"]),
|
|
159
169
|
|
|
160
170
|
/**
|
|
@@ -3,12 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
Object.defineProperty(exports, "COLORS", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _button_empty.COLORS;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
6
|
Object.defineProperty(exports, "EuiButtonEmpty", {
|
|
13
7
|
enumerable: true,
|
|
14
8
|
get: function get() {
|
|
@@ -62,15 +62,7 @@ var EuiButtonGroup = function EuiButtonGroup(_ref) {
|
|
|
62
62
|
type = _ref$type === void 0 ? 'single' : _ref$type,
|
|
63
63
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
64
64
|
|
|
65
|
-
|
|
66
|
-
var badColorCombo = buttonSize === 'compressed' && color === 'ghost';
|
|
67
|
-
var resolvedColor = badColorCombo ? 'text' : color;
|
|
68
|
-
|
|
69
|
-
if (badColorCombo) {
|
|
70
|
-
console.warn('EuiButtonGroup of compressed size does not support the ghost color. It will render as text instead.');
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
var classes = (0, _classnames.default)('euiButtonGroup', "euiButtonGroup".concat(groupSizeToClassNameMap[buttonSize]), "euiButtonGroup".concat(_button.colorToClassNameMap[resolvedColor]), {
|
|
65
|
+
var classes = (0, _classnames.default)('euiButtonGroup', "euiButtonGroup".concat(groupSizeToClassNameMap[buttonSize]), "euiButtonGroup".concat(_button.colorToClassNameMap[color]), {
|
|
74
66
|
'euiButtonGroup--fullWidth': isFullWidth,
|
|
75
67
|
'euiButtonGroup--isDisabled': isDisabled
|
|
76
68
|
}, className);
|
|
@@ -92,7 +84,7 @@ var EuiButtonGroup = function EuiButtonGroup(_ref) {
|
|
|
92
84
|
}, option, {
|
|
93
85
|
element: typeIsSingle ? 'label' : 'button',
|
|
94
86
|
isSelected: typeIsSingle ? option.id === idSelected : idToSelectedMap[option.id],
|
|
95
|
-
color:
|
|
87
|
+
color: color,
|
|
96
88
|
size: buttonSize,
|
|
97
89
|
isIconOnly: isIconOnly,
|
|
98
90
|
onChange: onChange
|
|
@@ -131,9 +123,9 @@ EuiButtonGroup.propTypes = {
|
|
|
131
123
|
legend: _propTypes.default.string.isRequired,
|
|
132
124
|
|
|
133
125
|
/**
|
|
134
|
-
*
|
|
126
|
+
* Any of the named color palette options.
|
|
135
127
|
*/
|
|
136
|
-
color: _propTypes.default.
|
|
128
|
+
color: _propTypes.default.any,
|
|
137
129
|
|
|
138
130
|
/**
|
|
139
131
|
* Default for `type` is single so it can also be excluded
|
|
@@ -17,9 +17,11 @@ var _inner_text = require("../../inner_text");
|
|
|
17
17
|
|
|
18
18
|
var _services = require("../../../services");
|
|
19
19
|
|
|
20
|
+
var _button2 = require("../../../themes/amsterdam/global_styling/mixins/button");
|
|
21
|
+
|
|
20
22
|
var _react2 = require("@emotion/react");
|
|
21
23
|
|
|
22
|
-
var _excluded = ["className", "id", "isDisabled", "isIconOnly", "isSelected", "label", "name", "onChange", "size", "value", "element", "type"];
|
|
24
|
+
var _excluded = ["className", "id", "isDisabled", "isIconOnly", "isSelected", "label", "name", "onChange", "size", "value", "color", "element", "type"];
|
|
23
25
|
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
27
|
|
|
@@ -59,6 +61,8 @@ var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
|
|
|
59
61
|
_onChange = _ref.onChange,
|
|
60
62
|
size = _ref.size,
|
|
61
63
|
value = _ref.value,
|
|
64
|
+
_ref$color = _ref.color,
|
|
65
|
+
_color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
62
66
|
_ref$element = _ref.element,
|
|
63
67
|
element = _ref$element === void 0 ? 'button' : _ref$element,
|
|
64
68
|
_ref$type = _ref.type,
|
|
@@ -98,8 +102,15 @@ var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
|
|
|
98
102
|
return _onChange(id);
|
|
99
103
|
}
|
|
100
104
|
});
|
|
101
|
-
}
|
|
105
|
+
} // eslint-disable-next-line no-nested-ternary
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
var color = isDisabled ? 'disabled' : _color; // eslint-disable-next-line no-nested-ternary
|
|
102
109
|
|
|
110
|
+
var display = isSelected ? 'fill' : size === 'compressed' ? 'empty' : 'base';
|
|
111
|
+
var buttonColorStyles = (0, _button2.useEuiButtonColorCSS)({
|
|
112
|
+
display: display
|
|
113
|
+
})[color];
|
|
103
114
|
var buttonClasses = (0, _classnames.default)({
|
|
104
115
|
'euiButtonGroupButton-isSelected': isSelected,
|
|
105
116
|
'euiButtonGroupButton-isIconOnly': isIconOnly
|
|
@@ -116,10 +127,10 @@ var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
|
|
|
116
127
|
innerText = _useInnerText2[1];
|
|
117
128
|
|
|
118
129
|
return (0, _react2.jsx)(_button.EuiButtonDisplayDeprecated, _extends({
|
|
130
|
+
css: [buttonColorStyles, ";label:EuiButtonGroupButton;"],
|
|
119
131
|
baseClassName: "euiButtonGroupButton",
|
|
120
132
|
className: buttonClasses,
|
|
121
133
|
element: el,
|
|
122
|
-
fill: size !== 'compressed' && isSelected,
|
|
123
134
|
isDisabled: isDisabled,
|
|
124
135
|
size: size === 'compressed' ? 's' : size,
|
|
125
136
|
textProps: {
|
|
@@ -205,7 +216,7 @@ EuiButtonGroupButton.propTypes = {
|
|
|
205
216
|
/**
|
|
206
217
|
* Inherit from EuiButtonGroup
|
|
207
218
|
*/
|
|
208
|
-
color: _propTypes.default.
|
|
219
|
+
color: _propTypes.default.any.isRequired,
|
|
209
220
|
|
|
210
221
|
/**
|
|
211
222
|
* Inherit from EuiButtonGroup
|