@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
|
@@ -3,55 +3,209 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.useEuiButtonColorCSS = exports.euiButtonColor = exports.BUTTON_COLORS = void 0;
|
|
6
|
+
exports.useEuiButtonRadiusCSS = exports.useEuiButtonFocusCSS = exports.useEuiButtonColorCSS = exports.euiButtonFillColor = exports.euiButtonEmptyColor = exports.euiButtonColor = exports.BUTTON_COLORS = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = require("@emotion/react");
|
|
9
9
|
|
|
10
|
+
var _global_styling = require("../../../../global_styling");
|
|
11
|
+
|
|
10
12
|
var _services = require("../../../../services");
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
15
|
+
|
|
16
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
17
|
+
|
|
18
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
19
|
+
|
|
20
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
21
|
+
|
|
22
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
23
|
+
|
|
24
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
25
|
+
|
|
26
|
+
var BUTTON_COLORS = ['text', 'accent', 'primary', 'success', 'warning', 'danger'];
|
|
20
27
|
exports.BUTTON_COLORS = BUTTON_COLORS;
|
|
21
28
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Creates the `base` version of button styles with proper text contrast.
|
|
31
|
+
* @param euiThemeContext
|
|
32
|
+
* @param color One of the named button colors or 'disabled'
|
|
33
|
+
* @returns Style object `{ backgroundColor, color }`
|
|
34
|
+
*/
|
|
35
|
+
var euiButtonColor = function euiButtonColor(euiThemeContext, color) {
|
|
36
|
+
var euiTheme = euiThemeContext.euiTheme,
|
|
37
|
+
colorMode = euiThemeContext.colorMode;
|
|
25
38
|
|
|
26
39
|
function tintOrShade(color) {
|
|
27
40
|
return colorMode === 'DARK' ? (0, _services.shade)(color, 0.7) : (0, _services.tint)(color, 0.8);
|
|
28
41
|
}
|
|
29
42
|
|
|
43
|
+
var foreground;
|
|
44
|
+
var background;
|
|
45
|
+
|
|
30
46
|
switch (color) {
|
|
31
47
|
case 'disabled':
|
|
32
|
-
return
|
|
48
|
+
return {
|
|
49
|
+
color: euiTheme.colors.disabledText,
|
|
50
|
+
backgroundColor: (0, _services.transparentize)(euiTheme.colors.lightShade, 0.15)
|
|
51
|
+
};
|
|
33
52
|
|
|
34
53
|
case 'text':
|
|
35
|
-
|
|
54
|
+
foreground = euiTheme.colors[color];
|
|
55
|
+
background = colorMode === 'DARK' ? (0, _services.shade)(euiTheme.colors.lightShade, 0.2) : (0, _services.tint)(euiTheme.colors.lightShade, 0.5);
|
|
56
|
+
break;
|
|
36
57
|
|
|
37
58
|
default:
|
|
38
|
-
|
|
59
|
+
foreground = euiTheme.colors["".concat(color, "Text")];
|
|
60
|
+
background = tintOrShade(euiTheme.colors[color]);
|
|
61
|
+
break;
|
|
39
62
|
}
|
|
63
|
+
|
|
64
|
+
return {
|
|
65
|
+
color: (0, _services.makeHighContrastColor)(foreground)(background),
|
|
66
|
+
backgroundColor: background
|
|
67
|
+
};
|
|
40
68
|
};
|
|
69
|
+
/**
|
|
70
|
+
* Creates the `fill` version of buttons styles with proper text contrast.
|
|
71
|
+
* @param euiThemeContext
|
|
72
|
+
* @param color One of the named button colors or 'disabled'
|
|
73
|
+
* @returns Style object `{ backgroundColor, color }`
|
|
74
|
+
*/
|
|
75
|
+
|
|
41
76
|
|
|
42
77
|
exports.euiButtonColor = euiButtonColor;
|
|
43
78
|
|
|
79
|
+
var euiButtonFillColor = function euiButtonFillColor(euiThemeContext, color) {
|
|
80
|
+
var euiTheme = euiThemeContext.euiTheme,
|
|
81
|
+
colorMode = euiThemeContext.colorMode;
|
|
82
|
+
var background;
|
|
83
|
+
var foreground;
|
|
84
|
+
|
|
85
|
+
switch (color) {
|
|
86
|
+
case 'disabled':
|
|
87
|
+
background = euiButtonColor(euiThemeContext, color).backgroundColor;
|
|
88
|
+
foreground = euiButtonColor(euiThemeContext, color).color;
|
|
89
|
+
break;
|
|
90
|
+
|
|
91
|
+
case 'text':
|
|
92
|
+
background = colorMode === 'DARK' ? euiTheme.colors.text : euiTheme.colors.darkShade;
|
|
93
|
+
foreground = _services.isColorDark.apply(void 0, _toConsumableArray((0, _services.hexToRgb)(background))) ? euiTheme.colors.ghost : euiTheme.colors.ink;
|
|
94
|
+
break;
|
|
95
|
+
|
|
96
|
+
default:
|
|
97
|
+
background = euiTheme.colors[color];
|
|
98
|
+
foreground = _services.isColorDark.apply(void 0, _toConsumableArray((0, _services.hexToRgb)(euiTheme.colors[color]))) ? euiTheme.colors.ghost : euiTheme.colors.ink;
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return {
|
|
103
|
+
color: foreground,
|
|
104
|
+
backgroundColor: background
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Creates the `empty` version of button styles using the text-variant and adding interactive styles.
|
|
109
|
+
* @param euiThemeContext
|
|
110
|
+
* @param color One of the named button colors or 'disabled'
|
|
111
|
+
* @returns Style object `{ backgroundColor, color }` where `background` is typically used for interactive states
|
|
112
|
+
*/
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
exports.euiButtonFillColor = euiButtonFillColor;
|
|
116
|
+
|
|
117
|
+
var euiButtonEmptyColor = function euiButtonEmptyColor(euiThemeContext, color) {
|
|
118
|
+
var foreground;
|
|
119
|
+
var background;
|
|
120
|
+
|
|
121
|
+
switch (color) {
|
|
122
|
+
case 'disabled':
|
|
123
|
+
foreground = euiButtonColor(euiThemeContext, color).color;
|
|
124
|
+
background = 'transparent';
|
|
125
|
+
break;
|
|
126
|
+
|
|
127
|
+
case 'text':
|
|
128
|
+
foreground = euiButtonColor(euiThemeContext, color).color;
|
|
129
|
+
background = (0, _global_styling.euiBackgroundColor)(euiThemeContext, 'subdued', {
|
|
130
|
+
method: 'transparent'
|
|
131
|
+
});
|
|
132
|
+
break;
|
|
133
|
+
|
|
134
|
+
default:
|
|
135
|
+
foreground = euiButtonColor(euiThemeContext, color).color;
|
|
136
|
+
background = (0, _global_styling.euiBackgroundColor)(euiThemeContext, color, {
|
|
137
|
+
method: 'transparent'
|
|
138
|
+
});
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
return {
|
|
143
|
+
color: foreground,
|
|
144
|
+
backgroundColor: background
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* Given the button display type, returns the Emotion based color keys.
|
|
149
|
+
* @param options Button display type
|
|
150
|
+
* @returns An object of `_EuiButtonColor` keys including `disabled`
|
|
151
|
+
*/
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
exports.euiButtonEmptyColor = euiButtonEmptyColor;
|
|
155
|
+
|
|
44
156
|
var useEuiButtonColorCSS = function useEuiButtonColorCSS() {
|
|
45
|
-
var
|
|
157
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
158
|
+
var euiThemeContext = (0, _services.useEuiTheme)();
|
|
159
|
+
|
|
160
|
+
function stylesByDisplay(color) {
|
|
161
|
+
return {
|
|
162
|
+
base: /*#__PURE__*/(0, _react.css)(euiButtonColor(euiThemeContext, color), ";;label:base;"),
|
|
163
|
+
fill: /*#__PURE__*/(0, _react.css)(euiButtonFillColor(euiThemeContext, color), "outline-color:", euiThemeContext.colorMode === 'DARK' && color === 'text' ? 'currentColor' : euiThemeContext.euiTheme.colors.fullShade, ";;label:fill;"),
|
|
164
|
+
empty: /*#__PURE__*/(0, _react.css)("color:", euiButtonEmptyColor(euiThemeContext, color).color, ";&:focus,&:active{background-color:", euiButtonEmptyColor(euiThemeContext, color).backgroundColor, ";};label:empty;")
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
return {
|
|
169
|
+
text: /*#__PURE__*/(0, _react.css)(stylesByDisplay('text')[options.display || 'base'], ";label:text;"),
|
|
170
|
+
accent: /*#__PURE__*/(0, _react.css)(stylesByDisplay('accent')[options.display || 'base'], ";label:accent;"),
|
|
171
|
+
primary: /*#__PURE__*/(0, _react.css)(stylesByDisplay('primary')[options.display || 'base'], ";label:primary;"),
|
|
172
|
+
success: /*#__PURE__*/(0, _react.css)(stylesByDisplay('success')[options.display || 'base'], ";label:success;"),
|
|
173
|
+
warning: /*#__PURE__*/(0, _react.css)(stylesByDisplay('warning')[options.display || 'base'], ";label:warning;"),
|
|
174
|
+
danger: /*#__PURE__*/(0, _react.css)(stylesByDisplay('danger')[options.display || 'base'], ";label:danger;"),
|
|
175
|
+
disabled: /*#__PURE__*/(0, _react.css)(stylesByDisplay('disabled')[options.display || 'base'], ";label:disabled;")
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* Based on the button size, creates the style properties.
|
|
180
|
+
* @returns An object of button size keys with Emption styles for `border-radius`
|
|
181
|
+
*/
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
exports.useEuiButtonColorCSS = useEuiButtonColorCSS;
|
|
185
|
+
|
|
186
|
+
var useEuiButtonRadiusCSS = function useEuiButtonRadiusCSS() {
|
|
187
|
+
var _useEuiTheme = (0, _services.useEuiTheme)(),
|
|
188
|
+
euiTheme = _useEuiTheme.euiTheme;
|
|
189
|
+
|
|
46
190
|
return {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
success: /*#__PURE__*/(0, _react.css)("background-color:", euiButtonColor('success', euiTheme), ";;label:success;"),
|
|
51
|
-
warning: /*#__PURE__*/(0, _react.css)("background-color:", euiButtonColor('warning', euiTheme), ";;label:warning;"),
|
|
52
|
-
danger: /*#__PURE__*/(0, _react.css)("background-color:", euiButtonColor('danger', euiTheme), ";;label:danger;"),
|
|
53
|
-
disabled: /*#__PURE__*/(0, _react.css)("background-color:", euiButtonColor('disabled', euiTheme), ";;label:disabled;")
|
|
191
|
+
xs: /*#__PURE__*/(0, _react.css)("border-radius:", euiTheme.border.radius.small, ";;label:xs;"),
|
|
192
|
+
s: /*#__PURE__*/(0, _react.css)("border-radius:", euiTheme.border.radius.small, ";;label:s;"),
|
|
193
|
+
m: /*#__PURE__*/(0, _react.css)("border-radius:", euiTheme.border.radius.medium, ";;label:m;")
|
|
54
194
|
};
|
|
55
195
|
};
|
|
196
|
+
/**
|
|
197
|
+
* Creates the translate animation when button is in focus.
|
|
198
|
+
* @returns string
|
|
199
|
+
*/
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
exports.useEuiButtonRadiusCSS = useEuiButtonRadiusCSS;
|
|
203
|
+
|
|
204
|
+
var useEuiButtonFocusCSS = function useEuiButtonFocusCSS() {
|
|
205
|
+
var _useEuiTheme2 = (0, _services.useEuiTheme)(),
|
|
206
|
+
euiTheme = _useEuiTheme2.euiTheme;
|
|
207
|
+
|
|
208
|
+
return "\n ".concat(_global_styling.euiCanAnimate, " {\n transition: transform ").concat(euiTheme.animation.normal, " ease-in-out,\n background-color ").concat(euiTheme.animation.normal, " ease-in-out;\n\n &:hover:not(:disabled) {\n transform: translateY(-1px);\n }\n\n &:focus {\n animation: euiButtonActive ").concat(euiTheme.animation.normal, "\n ").concat(euiTheme.animation.bounce, ";\n }\n\n &:active:not(:disabled) {\n transform: translateY(1px);\n }\n }\n ");
|
|
209
|
+
};
|
|
56
210
|
|
|
57
|
-
exports.
|
|
211
|
+
exports.useEuiButtonFocusCSS = useEuiButtonFocusCSS;
|
package/optimize/es/components/accessibility/screen_reader_only/screen_reader_only.styles.js
CHANGED
|
@@ -6,13 +6,14 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
import { css } from '@emotion/react';
|
|
9
|
+
import { logicalCSS, logicalSizeCSS } from '../../../global_styling';
|
|
9
10
|
/*
|
|
10
11
|
* Mixin that hides elements offscreen to only be read by screen reader
|
|
11
12
|
* See https://github.com/elastic/eui/pull/5130 and https://github.com/elastic/eui/pull/5152 for more info
|
|
12
13
|
*/
|
|
13
14
|
|
|
14
15
|
export var euiScreenReaderOnly = function euiScreenReaderOnly() {
|
|
15
|
-
return "\n // Take the element out of the layout\n position: absolute;\n // Keep it vertically inline\n top
|
|
16
|
+
return "\n // Take the element out of the layout\n position: absolute;\n // Keep it vertically inline\n ".concat(logicalCSS('top', 'auto'), "\n // Chrome requires a left value, and Selenium (used by Kibana's FTR) requires an off-screen position for its .getVisibleText() to not register SR-only text\n ").concat(logicalCSS('left', '-10000px'), "\n // The element must have a size (for some screen readers)\n ").concat(logicalSizeCSS('1px', '1px'), "\n // But reduce the visible size to nothing\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n // And ensure no overflows occur\n overflow: hidden;\n // Chrome requires the negative margin to not cause overflows of parent containers\n margin: -1px;\n");
|
|
16
17
|
};
|
|
17
18
|
/*
|
|
18
19
|
* Styles
|
|
@@ -30,6 +30,7 @@ import { EuiI18n } from '../i18n';
|
|
|
30
30
|
import { htmlIdGenerator, withEuiTheme } from '../../services';
|
|
31
31
|
import { EuiButtonIcon } from '../button';
|
|
32
32
|
import { euiAccordionButtonStyles, euiAccordionChildrenStyles, euiAccordionChildWrapperStyles, euiAccordionIconButtonStyles, euiAccordionOptionalActionStyles, euiAccordionSpinnerStyles, euiAccordionTriggerWrapperStyles } from './accordion.styles';
|
|
33
|
+
import { logicalCSS } from '../../global_styling';
|
|
33
34
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
34
35
|
var paddingSizeToClassNameMap = {
|
|
35
36
|
none: '',
|
|
@@ -68,7 +69,7 @@ export var EuiAccordionClass = /*#__PURE__*/function (_Component) {
|
|
|
68
69
|
var forceState = _this.props.forceState;
|
|
69
70
|
requestAnimationFrame(function () {
|
|
70
71
|
var height = _this.childContent && (forceState ? forceState === 'open' : _this.state.isOpen) ? _this.childContent.clientHeight : 0;
|
|
71
|
-
_this.childWrapper && _this.childWrapper.setAttribute('style',
|
|
72
|
+
_this.childWrapper && _this.childWrapper.setAttribute('style', logicalCSS('height', "".concat(height, "px")));
|
|
72
73
|
});
|
|
73
74
|
});
|
|
74
75
|
|
|
@@ -8,18 +8,18 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
8
8
|
* Side Public License, v 1.
|
|
9
9
|
*/
|
|
10
10
|
import { css } from '@emotion/react';
|
|
11
|
-
import { euiFontSize } from '../../global_styling
|
|
11
|
+
import { euiFontSize, logicals, logicalCSS, logicalTextAlignCSS } from '../../global_styling';
|
|
12
12
|
export var euiAccordionButtonStyles = function euiAccordionButtonStyles(euiThemeContext) {
|
|
13
13
|
var euiTheme = euiThemeContext.euiTheme;
|
|
14
14
|
return {
|
|
15
|
-
euiAccordion__button: /*#__PURE__*/css(euiFontSize(euiThemeContext, 's'), ";align-items:center;display:flex;flex-grow:1;line-height:", euiTheme.size.l, ";
|
|
15
|
+
euiAccordion__button: /*#__PURE__*/css(euiFontSize(euiThemeContext, 's'), ";align-items:center;display:flex;flex-grow:1;line-height:", euiTheme.size.l, ";", logicalTextAlignCSS('left'), " ", logicalCSS('width', '100%'), " &:hover,&:focus{cursor:pointer;text-decoration:underline;};label:euiAccordion__button;"),
|
|
16
16
|
// Triggering button needs separate `disabled` key because the element that renders may not support `:disabled`;
|
|
17
17
|
// Hover pseudo selector for specificity
|
|
18
18
|
disabled: /*#__PURE__*/css("&,&:hover{cursor:not-allowed;color:", euiTheme.colors.disabledText, ";text-decoration:none;};label:disabled;")
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _ref4 = process.env.NODE_ENV === "production" ? {
|
|
23
23
|
name: "1xvjonu-isLoading",
|
|
24
24
|
styles: "align-items:center;display:flex;label:isLoading;"
|
|
25
25
|
} : {
|
|
@@ -28,11 +28,11 @@ var _ref5 = process.env.NODE_ENV === "production" ? {
|
|
|
28
28
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
-
export var euiAccordionChildrenStyles = function euiAccordionChildrenStyles(
|
|
32
|
-
var euiTheme =
|
|
31
|
+
export var euiAccordionChildrenStyles = function euiAccordionChildrenStyles(_ref5) {
|
|
32
|
+
var euiTheme = _ref5.euiTheme;
|
|
33
33
|
return {
|
|
34
34
|
euiAccordion__children: /*#__PURE__*/css(";label:euiAccordion__children;"),
|
|
35
|
-
isLoading:
|
|
35
|
+
isLoading: _ref4,
|
|
36
36
|
xs: /*#__PURE__*/css("padding:", euiTheme.size.xs, ";;label:xs;"),
|
|
37
37
|
s: /*#__PURE__*/css("padding:", euiTheme.size.s, ";;label:s;"),
|
|
38
38
|
m: /*#__PURE__*/css("padding:", euiTheme.size.base, ";;label:m;"),
|
|
@@ -40,21 +40,11 @@ export var euiAccordionChildrenStyles = function euiAccordionChildrenStyles(_ref
|
|
|
40
40
|
xl: /*#__PURE__*/css("padding:", euiTheme.size.xl, ";;label:xl;")
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
|
-
|
|
44
|
-
var
|
|
45
|
-
name: "xodlxj-isOpen",
|
|
46
|
-
styles: "height:auto;opacity:1;visibility:visible;label:isOpen;"
|
|
47
|
-
} : {
|
|
48
|
-
name: "xodlxj-isOpen",
|
|
49
|
-
styles: "height:auto;opacity:1;visibility:visible;label:isOpen;",
|
|
50
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export var euiAccordionChildWrapperStyles = function euiAccordionChildWrapperStyles(_ref7) {
|
|
54
|
-
var euiTheme = _ref7.euiTheme;
|
|
43
|
+
export var euiAccordionChildWrapperStyles = function euiAccordionChildWrapperStyles(_ref6) {
|
|
44
|
+
var euiTheme = _ref6.euiTheme;
|
|
55
45
|
return {
|
|
56
|
-
euiAccordion__childWrapper: /*#__PURE__*/css(
|
|
57
|
-
isOpen:
|
|
46
|
+
euiAccordion__childWrapper: /*#__PURE__*/css(logicalCSS('height', 0), " opacity:0;overflow:hidden;transition:", logicals.height, " ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ",opacity ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ";visibility:hidden;will-change:opacity,visibility,", logicals.height, ";&:focus{outline:none;};label:euiAccordion__childWrapper;"),
|
|
47
|
+
isOpen: /*#__PURE__*/css(logicalCSS('height', 'auto'), " opacity:1;visibility:visible;;label:isOpen;")
|
|
58
48
|
};
|
|
59
49
|
};
|
|
60
50
|
|
|
@@ -67,12 +57,12 @@ var _ref3 = process.env.NODE_ENV === "production" ? {
|
|
|
67
57
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
68
58
|
};
|
|
69
59
|
|
|
70
|
-
export var euiAccordionIconButtonStyles = function euiAccordionIconButtonStyles(
|
|
71
|
-
var euiTheme =
|
|
60
|
+
export var euiAccordionIconButtonStyles = function euiAccordionIconButtonStyles(_ref7) {
|
|
61
|
+
var euiTheme = _ref7.euiTheme;
|
|
72
62
|
return {
|
|
73
|
-
euiAccordion__iconButton: /*#__PURE__*/css("flex-shrink:0;margin-
|
|
63
|
+
euiAccordion__iconButton: /*#__PURE__*/css("flex-shrink:0;", logicalCSS('margin-right', euiTheme.size.xs), " transform:rotate(0deg)!important;;label:euiAccordion__iconButton;"),
|
|
74
64
|
isOpen: _ref3,
|
|
75
|
-
arrowRight: /*#__PURE__*/css(
|
|
65
|
+
arrowRight: /*#__PURE__*/css(logicalCSS('margin-left', euiTheme.size.xs), " ", logicalCSS('margin-right', 0), ";;label:arrowRight;")
|
|
76
66
|
};
|
|
77
67
|
};
|
|
78
68
|
|
|
@@ -90,10 +80,10 @@ export var euiAccordionOptionalActionStyles = function euiAccordionOptionalActio
|
|
|
90
80
|
euiAccordion__optionalAction: _ref2
|
|
91
81
|
};
|
|
92
82
|
};
|
|
93
|
-
export var euiAccordionSpinnerStyles = function euiAccordionSpinnerStyles(
|
|
94
|
-
var euiTheme =
|
|
83
|
+
export var euiAccordionSpinnerStyles = function euiAccordionSpinnerStyles(_ref8) {
|
|
84
|
+
var euiTheme = _ref8.euiTheme;
|
|
95
85
|
return {
|
|
96
|
-
euiAccordion__spinner: /*#__PURE__*/css(
|
|
86
|
+
euiAccordion__spinner: /*#__PURE__*/css(logicalCSS('margin-right', euiTheme.size.xs), ";;label:euiAccordion__spinner;")
|
|
97
87
|
};
|
|
98
88
|
};
|
|
99
89
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["className", "label", "color", "tooltipContent", "tooltipPosition", "title", "iconType", "onClick", "onClickAriaLabel", "href", "rel", "target", "size"];
|
|
4
|
+
var _excluded = ["className", "label", "color", "tooltipContent", "tooltipPosition", "anchorProps", "title", "iconType", "onClick", "onClickAriaLabel", "href", "rel", "target", "size"];
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -36,6 +36,7 @@ export var EuiBetaBadge = function EuiBetaBadge(_ref) {
|
|
|
36
36
|
tooltipContent = _ref.tooltipContent,
|
|
37
37
|
_ref$tooltipPosition = _ref.tooltipPosition,
|
|
38
38
|
tooltipPosition = _ref$tooltipPosition === void 0 ? 'top' : _ref$tooltipPosition,
|
|
39
|
+
anchorProps = _ref.anchorProps,
|
|
39
40
|
title = _ref.title,
|
|
40
41
|
iconType = _ref.iconType,
|
|
41
42
|
onClick = _ref.onClick,
|
|
@@ -101,7 +102,8 @@ export var EuiBetaBadge = function EuiBetaBadge(_ref) {
|
|
|
101
102
|
return ___EmotionJSX(EuiToolTip, {
|
|
102
103
|
position: tooltipPosition,
|
|
103
104
|
content: tooltipContent,
|
|
104
|
-
title: title || label
|
|
105
|
+
title: title || label,
|
|
106
|
+
anchorProps: anchorProps
|
|
105
107
|
}, content);
|
|
106
108
|
} else {
|
|
107
109
|
return ___EmotionJSX(Fragment, null, content);
|
|
@@ -111,7 +113,8 @@ export var EuiBetaBadge = function EuiBetaBadge(_ref) {
|
|
|
111
113
|
return ___EmotionJSX(EuiToolTip, {
|
|
112
114
|
position: tooltipPosition,
|
|
113
115
|
content: tooltipContent,
|
|
114
|
-
title: title || label
|
|
116
|
+
title: title || label,
|
|
117
|
+
anchorProps: anchorProps
|
|
115
118
|
}, ___EmotionJSX("span", _extends({
|
|
116
119
|
tabIndex: 0,
|
|
117
120
|
className: classes,
|
|
@@ -11,13 +11,13 @@ var _templateObject, _templateObject2;
|
|
|
11
11
|
*/
|
|
12
12
|
import { keyframes, css } from '@emotion/react';
|
|
13
13
|
import { euiPaletteColorBlind } from '../../services';
|
|
14
|
-
import { euiCanAnimate } from '../../global_styling';
|
|
14
|
+
import { euiCanAnimate, logicalCSS, logicalSizeCSS } from '../../global_styling';
|
|
15
15
|
var visColors = euiPaletteColorBlind();
|
|
16
16
|
var euiBeaconPulseLarge = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n transform: scale(.1);\n opacity: 1;\n }\n\n 70% {\n transform: scale(3);\n opacity: 0;\n }\n\n 100% {\n opacity: 0;\n }\n"])));
|
|
17
17
|
var euiBeaconPulseSmall = keyframes(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n 0% {\n transform: scale(.1);\n opacity: 1;\n }\n\n 70% {\n transform: scale(2);\n opacity: 0;\n }\n\n 100% {\n opacity: 0;\n }\n"])));
|
|
18
18
|
export var euiBeaconStyles = function euiBeaconStyles() {
|
|
19
19
|
return {
|
|
20
20
|
// Base
|
|
21
|
-
euiBeacon: /*#__PURE__*/css("position:relative;background-color:", visColors[0], ";border-radius:50%;&:before,&:after{position:absolute;content:'';
|
|
21
|
+
euiBeacon: /*#__PURE__*/css("position:relative;background-color:", visColors[0], ";border-radius:50%;&:before,&:after{position:absolute;content:'';", logicalSizeCSS('100%', '100%'), " ", logicalCSS('left', 0), " ", logicalCSS('top', 0), " background-color:transparent;border-radius:50%;box-shadow:0 0 1px 1px ", visColors[0], ";}&:before{transform:scale(1.6);opacity:0.4;}&:after{opacity:0;}", euiCanAnimate, "{&:before{animation:", euiBeaconPulseLarge, " 2.5s infinite ease-out;}&:after{animation:", euiBeaconPulseSmall, " 2.5s infinite ease-out 0.25s;}};label:euiBeacon;")
|
|
22
22
|
};
|
|
23
23
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
5
|
+
var _excluded = ["buttonRef", "color", "fill"],
|
|
6
|
+
_excluded2 = ["element", "baseClassName", "children", "className", "iconType", "iconSide", "color", "size", "isDisabled", "isLoading", "isSelected", "contentProps", "textProps", "fullWidth", "minWidth", "style"];
|
|
6
7
|
|
|
7
8
|
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; }
|
|
8
9
|
|
|
@@ -17,87 +18,73 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
17
18
|
*/
|
|
18
19
|
import React, { forwardRef } from 'react';
|
|
19
20
|
import classNames from 'classnames';
|
|
20
|
-
import { keysOf } from '../common';
|
|
21
|
-
import { getSecureRelForTarget } from '../../services';
|
|
22
21
|
import { EuiButtonContentDeprecated as EuiButtonContent } from './_button_content_deprecated';
|
|
23
|
-
import {
|
|
22
|
+
import { BUTTON_COLORS, useEuiButtonColorCSS, useEuiButtonFocusCSS } from '../../themes/amsterdam/global_styling/mixins/button';
|
|
23
|
+
import { EuiButtonDisplay, isButtonDisabled } from './button_display/_button_display';
|
|
24
|
+
import { EuiThemeProvider } from '../../services';
|
|
24
25
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
25
|
-
export var
|
|
26
|
-
|
|
27
|
-
accent: '--accent',
|
|
28
|
-
success: '--success',
|
|
29
|
-
warning: '--warning',
|
|
30
|
-
danger: '--danger',
|
|
31
|
-
ghost: '--ghost',
|
|
32
|
-
text: '--text'
|
|
33
|
-
};
|
|
34
|
-
export var COLORS = keysOf(colorToClassNameMap);
|
|
35
|
-
export var sizeToClassNameMap = {
|
|
36
|
-
s: '--small',
|
|
37
|
-
m: null
|
|
38
|
-
};
|
|
39
|
-
export var SIZES = keysOf(sizeToClassNameMap);
|
|
40
|
-
/**
|
|
41
|
-
* Extends EuiButtonContentProps which provides
|
|
42
|
-
* `iconType`, `iconSide`, and `textProps`
|
|
43
|
-
*/
|
|
26
|
+
export var COLORS = [].concat(_toConsumableArray(BUTTON_COLORS), ['ghost']);
|
|
27
|
+
export var SIZES = ['s', 'm'];
|
|
44
28
|
|
|
45
29
|
/**
|
|
46
30
|
* EuiButton is largely responsible for providing relevant props
|
|
47
31
|
* and the logic for element-specific attributes
|
|
48
32
|
*/
|
|
49
|
-
export var EuiButton = function EuiButton(
|
|
50
|
-
var
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
var
|
|
63
|
-
var
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
var relObj = {};
|
|
78
|
-
|
|
79
|
-
if (href && !buttonIsDisabled) {
|
|
80
|
-
relObj.href = href;
|
|
81
|
-
relObj.rel = getSecureRelForTarget({
|
|
82
|
-
href: href,
|
|
83
|
-
target: target,
|
|
84
|
-
rel: rel
|
|
85
|
-
});
|
|
86
|
-
relObj.target = target;
|
|
87
|
-
} else {
|
|
88
|
-
relObj.type = type;
|
|
33
|
+
export var EuiButton = function EuiButton(props) {
|
|
34
|
+
var buttonRef = props.buttonRef,
|
|
35
|
+
_props$color = props.color,
|
|
36
|
+
_color = _props$color === void 0 ? 'primary' : _props$color,
|
|
37
|
+
fill = props.fill,
|
|
38
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
39
|
+
|
|
40
|
+
var buttonIsDisabled = isButtonDisabled({
|
|
41
|
+
href: rest.href,
|
|
42
|
+
isDisabled: rest.isDisabled || rest.disabled,
|
|
43
|
+
isLoading: rest.isLoading
|
|
44
|
+
}); // eslint-disable-next-line no-nested-ternary
|
|
45
|
+
|
|
46
|
+
var color = buttonIsDisabled ? 'disabled' : _color;
|
|
47
|
+
var buttonColorStyles = useEuiButtonColorCSS({
|
|
48
|
+
display: fill ? 'fill' : 'base'
|
|
49
|
+
})[color === 'ghost' ? 'text' : color];
|
|
50
|
+
var buttonFocusStyle = useEuiButtonFocusCSS();
|
|
51
|
+
var cssStyles = [buttonColorStyles, buttonFocusStyle];
|
|
52
|
+
|
|
53
|
+
if (_color === 'ghost') {
|
|
54
|
+
// INCEPTION: If `ghost`, re-implement with a wrapping dark mode theme provider
|
|
55
|
+
return ___EmotionJSX(EuiThemeProvider, {
|
|
56
|
+
colorMode: "dark"
|
|
57
|
+
}, ___EmotionJSX(EuiButton, _extends({}, props, {
|
|
58
|
+
color: "text"
|
|
59
|
+
})));
|
|
89
60
|
}
|
|
90
61
|
|
|
91
|
-
return (
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}, elementProps, relObj, rest))
|
|
97
|
-
);
|
|
62
|
+
return ___EmotionJSX(EuiButtonDisplay, _extends({
|
|
63
|
+
className: "euiButton",
|
|
64
|
+
ref: buttonRef,
|
|
65
|
+
css: cssStyles
|
|
66
|
+
}, rest));
|
|
98
67
|
};
|
|
99
|
-
EuiButton.displayName = 'EuiButton';
|
|
68
|
+
EuiButton.displayName = 'EuiButton'; // Use defaultProps for simple pass-through props
|
|
100
69
|
|
|
70
|
+
EuiButton.defaultProps = {
|
|
71
|
+
minWidth: 112,
|
|
72
|
+
size: 'm',
|
|
73
|
+
color: 'primary'
|
|
74
|
+
};
|
|
75
|
+
export var sizeToClassNameMap = {
|
|
76
|
+
s: '--small',
|
|
77
|
+
m: null
|
|
78
|
+
};
|
|
79
|
+
export var colorToClassNameMap = {
|
|
80
|
+
primary: '--primary',
|
|
81
|
+
accent: '--accent',
|
|
82
|
+
success: '--success',
|
|
83
|
+
warning: '--warning',
|
|
84
|
+
danger: '--danger',
|
|
85
|
+
ghost: '--ghost',
|
|
86
|
+
text: '--text'
|
|
87
|
+
};
|
|
101
88
|
/**
|
|
102
89
|
* *DEPRECATED*
|
|
103
90
|
* EuiButtonDisplay is an internal-only component used for displaying
|
|
@@ -108,33 +95,34 @@ EuiButton.displayName = 'EuiButton';
|
|
|
108
95
|
* This component has been deprecated in favor of the new EuiButtonDisplay
|
|
109
96
|
* that can be found in `src/components/button/button_display/_button_display.tsx`
|
|
110
97
|
*/
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
iconSide =
|
|
120
|
-
|
|
121
|
-
color =
|
|
122
|
-
|
|
123
|
-
size =
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
98
|
+
|
|
99
|
+
export var EuiButtonDisplayDeprecated = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
100
|
+
var _ref$element = _ref.element,
|
|
101
|
+
element = _ref$element === void 0 ? 'button' : _ref$element,
|
|
102
|
+
baseClassName = _ref.baseClassName,
|
|
103
|
+
children = _ref.children,
|
|
104
|
+
className = _ref.className,
|
|
105
|
+
iconType = _ref.iconType,
|
|
106
|
+
_ref$iconSide = _ref.iconSide,
|
|
107
|
+
iconSide = _ref$iconSide === void 0 ? 'left' : _ref$iconSide,
|
|
108
|
+
color = _ref.color,
|
|
109
|
+
_ref$size = _ref.size,
|
|
110
|
+
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
111
|
+
isDisabled = _ref.isDisabled,
|
|
112
|
+
isLoading = _ref.isLoading,
|
|
113
|
+
isSelected = _ref.isSelected,
|
|
114
|
+
contentProps = _ref.contentProps,
|
|
115
|
+
textProps = _ref.textProps,
|
|
116
|
+
fullWidth = _ref.fullWidth,
|
|
117
|
+
minWidth = _ref.minWidth,
|
|
118
|
+
style = _ref.style,
|
|
119
|
+
rest = _objectWithoutProperties(_ref, _excluded2);
|
|
120
|
+
|
|
121
|
+
var buttonIsDisabled = isButtonDisabled({
|
|
122
|
+
isLoading: isLoading,
|
|
123
|
+
isDisabled: isDisabled
|
|
124
|
+
});
|
|
125
|
+
var classes = classNames(baseClassName, color && colorToClassNameMap[color] ? "".concat(baseClassName).concat(colorToClassNameMap[color]) : undefined, size && sizeToClassNameMap[size] ? "".concat(baseClassName).concat(sizeToClassNameMap[size]) : null, fullWidth && "".concat(baseClassName, "--fullWidth"), className);
|
|
138
126
|
/**
|
|
139
127
|
* Not changing the content or text class names to match baseClassName yet,
|
|
140
128
|
* as it is a major breaking change.
|