@elastic/eui 88.2.0 → 88.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eui_theme_dark.css +0 -25
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +0 -25
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/accordion/accordion.js +35 -208
- package/es/components/accordion/accordion.styles.js +3 -95
- package/es/components/accordion/accordion_children/accordion_children.js +101 -0
- package/es/components/accordion/accordion_children/accordion_children.styles.js +39 -0
- package/es/components/accordion/accordion_children/accordion_children_loading.js +31 -0
- package/es/components/accordion/accordion_children/index.js +9 -0
- package/es/components/accordion/accordion_trigger/accordion_arrow.js +41 -0
- package/es/components/accordion/accordion_trigger/accordion_arrow.styles.js +46 -0
- package/es/components/accordion/accordion_trigger/accordion_button.js +51 -0
- package/es/components/accordion/accordion_trigger/accordion_button.styles.js +26 -0
- package/es/components/accordion/accordion_trigger/accordion_trigger.js +87 -0
- package/es/components/accordion/accordion_trigger/index.js +9 -0
- package/es/components/avatar/avatar.js +1 -1
- package/es/components/badge/badge.js +1 -1
- package/es/components/badge/beta_badge/beta_badge.js +1 -1
- 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/button/button_display/_button_display.js +1 -1
- package/es/components/button/button_display/_button_display_content.js +1 -1
- package/es/components/button/button_empty/button_empty.js +1 -1
- package/es/components/button/button_group/button_group.js +1 -1
- package/es/components/button/button_group/button_group_button.js +1 -1
- package/es/components/button/button_icon/button_icon.js +1 -1
- package/es/components/call_out/call_out.js +1 -1
- package/es/components/card/card.js +1 -1
- package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +1 -1
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +2 -2
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +2 -2
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +3 -3
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +2 -2
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +1 -1
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +3 -3
- package/es/components/comment_list/comment.js +2 -2
- package/es/components/comment_list/comment_event.js +1 -1
- package/es/components/comment_list/comment_list.js +2 -2
- package/es/components/comment_list/comment_timeline.js +1 -1
- package/es/components/datagrid/body/data_grid_body.js +13 -13
- package/es/components/datagrid/body/data_grid_body_custom.js +13 -13
- package/es/components/datagrid/body/data_grid_body_virtualized.js +13 -13
- package/es/components/datagrid/body/data_grid_cell.js +24 -24
- package/es/components/datagrid/body/header/data_grid_header_cell.js +12 -12
- package/es/components/datagrid/body/header/data_grid_header_row.js +13 -13
- package/es/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/es/components/datagrid/data_grid.js +13 -13
- package/es/components/datagrid/utils/in_memory.js +12 -12
- package/es/components/date_picker/date_picker.js +2 -2
- package/es/components/date_picker/date_picker_range.js +1 -1
- package/es/components/empty_prompt/empty_prompt.js +1 -1
- package/es/components/facet/facet_button.js +1 -1
- package/es/components/form/field_number/field_number.js +1 -1
- package/es/components/form/field_text/field_text.js +2 -2
- package/es/components/form/form_control_layout/form_control_layout.js +2 -2
- package/es/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
- package/es/components/form/form_control_layout/form_control_layout_icons.js +2 -2
- package/es/components/header/header_links/header_link.js +1 -1
- package/es/components/header/header_links/header_links.js +1 -1
- package/es/components/header/header_logo/header_logo.js +1 -1
- package/es/components/header/header_section/header_section_item_button.js +1 -1
- package/es/components/icon/assets/grabOmnidirectional.js +33 -0
- package/es/components/icon/assets/transitionLeftIn.js +36 -0
- package/es/components/icon/assets/transitionLeftOut.js +36 -0
- package/es/components/icon/assets/transitionTopIn.js +36 -0
- package/es/components/icon/assets/transitionTopOut.js +36 -0
- package/es/components/icon/icon.js +1 -1
- package/es/components/icon/icon_map.js +5 -0
- package/es/components/inline_edit/inline_edit_form.js +49 -13
- package/es/components/inline_edit/inline_edit_text.js +22 -23
- package/es/components/inline_edit/inline_edit_title.js +22 -23
- package/es/components/key_pad_menu/key_pad_menu_item.js +1 -1
- package/es/components/list_group/list_group.js +2 -2
- package/es/components/list_group/list_group_item.js +3 -3
- package/es/components/list_group/list_group_item_extra_action.js +1 -1
- package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
- package/es/components/loading/loading_logo.js +1 -1
- package/es/components/markdown_editor/markdown_editor.js +1 -1
- package/es/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
- package/es/components/markdown_editor/markdown_editor_footer.js +1 -1
- package/es/components/markdown_editor/markdown_editor_toolbar.js +1 -1
- package/es/components/notification/notification_event.js +2 -2
- package/es/components/notification/notification_event_meta.js +1 -1
- package/es/components/page/page_header/page_header_content.js +1 -1
- package/es/components/pagination/pagination_button.js +1 -1
- package/es/components/panel/split_panel/split_panel.js +9 -7
- package/es/components/panel/split_panel/split_panel.styles.js +40 -0
- package/es/components/selectable/selectable_list/selectable_list.js +1 -1
- package/es/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
- package/es/components/suggest/suggest.js +1 -1
- package/es/components/suggest/suggest_item.js +1 -1
- package/es/components/table/table_header_button.js +1 -1
- package/es/components/text_truncate/utils.js +1 -1
- package/es/components/timeline/timeline_item_icon.js +1 -1
- package/es/components/toast/global_toast_list.js +51 -3
- package/es/components/toast/global_toast_list.styles.js +3 -2
- package/es/components/toast/toast.js +1 -1
- package/es/components/tool_tip/icon_tip.js +1 -1
- package/eui.d.ts +194 -44
- package/i18ntokens.json +60 -24
- package/lib/components/accordion/accordion.js +34 -207
- package/lib/components/accordion/accordion.styles.js +12 -109
- package/lib/components/accordion/accordion_children/accordion_children.js +111 -0
- package/lib/components/accordion/accordion_children/accordion_children.styles.js +45 -0
- package/lib/components/accordion/accordion_children/accordion_children_loading.js +38 -0
- package/lib/components/accordion/accordion_children/index.js +12 -0
- package/lib/components/accordion/accordion_trigger/accordion_arrow.js +48 -0
- package/lib/components/accordion/accordion_trigger/accordion_arrow.styles.js +51 -0
- package/lib/components/accordion/accordion_trigger/accordion_button.js +58 -0
- package/lib/components/accordion/accordion_trigger/accordion_button.styles.js +33 -0
- package/lib/components/accordion/accordion_trigger/accordion_trigger.js +93 -0
- package/lib/components/accordion/accordion_trigger/index.js +12 -0
- package/lib/components/avatar/avatar.js +1 -1
- package/lib/components/badge/badge.js +1 -1
- package/lib/components/badge/beta_badge/beta_badge.js +1 -1
- 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/button/button_display/_button_display.js +1 -1
- package/lib/components/button/button_display/_button_display_content.js +1 -1
- package/lib/components/button/button_empty/button_empty.js +1 -1
- package/lib/components/button/button_group/button_group.js +1 -1
- package/lib/components/button/button_group/button_group_button.js +1 -1
- package/lib/components/button/button_icon/button_icon.js +1 -1
- package/lib/components/call_out/call_out.js +1 -1
- package/lib/components/card/card.js +1 -1
- package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +1 -1
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +2 -2
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +2 -2
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +3 -3
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +2 -2
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +1 -1
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +3 -3
- package/lib/components/comment_list/comment.js +2 -2
- package/lib/components/comment_list/comment_event.js +1 -1
- package/lib/components/comment_list/comment_list.js +2 -2
- package/lib/components/comment_list/comment_timeline.js +1 -1
- package/lib/components/datagrid/body/data_grid_body.js +13 -13
- package/lib/components/datagrid/body/data_grid_body_custom.js +13 -13
- package/lib/components/datagrid/body/data_grid_body_virtualized.js +13 -13
- package/lib/components/datagrid/body/data_grid_cell.js +24 -24
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +12 -12
- package/lib/components/datagrid/body/header/data_grid_header_row.js +13 -13
- package/lib/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/lib/components/datagrid/data_grid.js +13 -13
- package/lib/components/datagrid/utils/in_memory.js +12 -12
- package/lib/components/date_picker/date_picker.js +2 -2
- package/lib/components/date_picker/date_picker_range.js +1 -1
- package/lib/components/empty_prompt/empty_prompt.js +1 -1
- package/lib/components/facet/facet_button.js +1 -1
- package/lib/components/form/field_number/field_number.js +1 -1
- package/lib/components/form/field_text/field_text.js +2 -2
- package/lib/components/form/form_control_layout/form_control_layout.js +2 -2
- package/lib/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
- package/lib/components/form/form_control_layout/form_control_layout_icons.js +2 -2
- package/lib/components/header/header_links/header_link.js +1 -1
- package/lib/components/header/header_links/header_links.js +1 -1
- package/lib/components/header/header_logo/header_logo.js +1 -1
- package/lib/components/header/header_section/header_section_item_button.js +1 -1
- package/lib/components/icon/assets/grabOmnidirectional.js +41 -0
- package/lib/components/icon/assets/transitionLeftIn.js +44 -0
- package/lib/components/icon/assets/transitionLeftOut.js +44 -0
- package/lib/components/icon/assets/transitionTopIn.js +44 -0
- package/lib/components/icon/assets/transitionTopOut.js +44 -0
- package/lib/components/icon/icon.js +1 -1
- package/lib/components/icon/icon_map.js +5 -0
- package/lib/components/icon/svgs/grabOmnidirectional.svg +3 -0
- package/lib/components/icon/svgs/transitionLeftIn.svg +4 -0
- package/lib/components/icon/svgs/transitionLeftOut.svg +4 -0
- package/lib/components/icon/svgs/transitionTopIn.svg +4 -0
- package/lib/components/icon/svgs/transitionTopOut.svg +4 -0
- package/lib/components/inline_edit/inline_edit_form.js +58 -20
- package/lib/components/inline_edit/inline_edit_text.js +22 -23
- package/lib/components/inline_edit/inline_edit_title.js +22 -23
- package/lib/components/key_pad_menu/key_pad_menu_item.js +1 -1
- package/lib/components/list_group/list_group.js +2 -2
- package/lib/components/list_group/list_group_item.js +3 -3
- package/lib/components/list_group/list_group_item_extra_action.js +1 -1
- package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
- package/lib/components/loading/loading_logo.js +1 -1
- package/lib/components/markdown_editor/markdown_editor.js +1 -1
- package/lib/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
- package/lib/components/markdown_editor/markdown_editor_footer.js +1 -1
- package/lib/components/markdown_editor/markdown_editor_toolbar.js +1 -1
- package/lib/components/notification/notification_event.js +2 -2
- package/lib/components/notification/notification_event_meta.js +1 -1
- package/lib/components/page/page_header/page_header_content.js +1 -1
- package/lib/components/panel/split_panel/split_panel.js +9 -7
- package/lib/components/panel/split_panel/split_panel.styles.js +46 -0
- package/lib/components/selectable/selectable_list/selectable_list.js +1 -1
- package/lib/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
- package/lib/components/suggest/suggest.js +1 -1
- package/lib/components/suggest/suggest_item.js +1 -1
- package/lib/components/table/table_header_button.js +1 -1
- package/lib/components/text_truncate/utils.js +1 -1
- package/lib/components/timeline/timeline_item_icon.js +1 -1
- package/lib/components/toast/global_toast_list.js +53 -4
- package/lib/components/toast/global_toast_list.styles.js +3 -2
- package/lib/components/toast/toast.js +1 -1
- package/lib/components/tool_tip/icon_tip.js +1 -1
- package/optimize/es/components/accordion/accordion.js +35 -203
- package/optimize/es/components/accordion/accordion.styles.js +3 -95
- package/optimize/es/components/accordion/accordion_children/accordion_children.js +91 -0
- package/optimize/es/components/accordion/accordion_children/accordion_children.styles.js +39 -0
- package/optimize/es/components/accordion/accordion_children/accordion_children_loading.js +31 -0
- package/optimize/es/components/accordion/accordion_children/index.js +9 -0
- package/optimize/es/components/accordion/accordion_trigger/accordion_arrow.js +36 -0
- package/optimize/es/components/accordion/accordion_trigger/accordion_arrow.styles.js +46 -0
- package/optimize/es/components/accordion/accordion_trigger/accordion_button.js +45 -0
- package/optimize/es/components/accordion/accordion_trigger/accordion_button.styles.js +26 -0
- package/optimize/es/components/accordion/accordion_trigger/accordion_trigger.js +80 -0
- package/optimize/es/components/accordion/accordion_trigger/index.js +9 -0
- package/optimize/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +1 -1
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +1 -1
- package/optimize/es/components/icon/assets/grabOmnidirectional.js +32 -0
- package/optimize/es/components/icon/assets/transitionLeftIn.js +35 -0
- package/optimize/es/components/icon/assets/transitionLeftOut.js +35 -0
- package/optimize/es/components/icon/assets/transitionTopIn.js +35 -0
- package/optimize/es/components/icon/assets/transitionTopOut.js +35 -0
- package/optimize/es/components/icon/icon_map.js +5 -0
- package/optimize/es/components/inline_edit/inline_edit_form.js +32 -12
- package/optimize/es/components/inline_edit/inline_edit_text.js +6 -22
- package/optimize/es/components/inline_edit/inline_edit_title.js +6 -22
- package/optimize/es/components/list_group/list_group_item.js +1 -1
- package/optimize/es/components/panel/split_panel/split_panel.js +9 -7
- package/optimize/es/components/panel/split_panel/split_panel.styles.js +40 -0
- package/optimize/es/components/text_truncate/utils.js +1 -1
- package/optimize/es/components/toast/global_toast_list.js +39 -2
- package/optimize/es/components/toast/global_toast_list.styles.js +3 -2
- package/optimize/lib/components/accordion/accordion.js +34 -202
- package/optimize/lib/components/accordion/accordion.styles.js +12 -109
- package/optimize/lib/components/accordion/accordion_children/accordion_children.js +101 -0
- package/optimize/lib/components/accordion/accordion_children/accordion_children.styles.js +45 -0
- package/optimize/lib/components/accordion/accordion_children/accordion_children_loading.js +38 -0
- package/optimize/lib/components/accordion/accordion_children/index.js +12 -0
- package/optimize/lib/components/accordion/accordion_trigger/accordion_arrow.js +43 -0
- package/optimize/lib/components/accordion/accordion_trigger/accordion_arrow.styles.js +51 -0
- package/optimize/lib/components/accordion/accordion_trigger/accordion_button.js +52 -0
- package/optimize/lib/components/accordion/accordion_trigger/accordion_button.styles.js +33 -0
- package/optimize/lib/components/accordion/accordion_trigger/accordion_trigger.js +86 -0
- package/optimize/lib/components/accordion/accordion_trigger/index.js +12 -0
- package/optimize/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +1 -1
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +1 -1
- package/optimize/lib/components/icon/assets/grabOmnidirectional.js +41 -0
- package/optimize/lib/components/icon/assets/transitionLeftIn.js +44 -0
- package/optimize/lib/components/icon/assets/transitionLeftOut.js +44 -0
- package/optimize/lib/components/icon/assets/transitionTopIn.js +44 -0
- package/optimize/lib/components/icon/assets/transitionTopOut.js +44 -0
- package/optimize/lib/components/icon/icon_map.js +5 -0
- package/optimize/lib/components/icon/svgs/grabOmnidirectional.svg +3 -0
- package/optimize/lib/components/icon/svgs/transitionLeftIn.svg +4 -0
- package/optimize/lib/components/icon/svgs/transitionLeftOut.svg +4 -0
- package/optimize/lib/components/icon/svgs/transitionTopIn.svg +4 -0
- package/optimize/lib/components/icon/svgs/transitionTopOut.svg +4 -0
- package/optimize/lib/components/inline_edit/inline_edit_form.js +33 -16
- package/optimize/lib/components/inline_edit/inline_edit_text.js +6 -22
- package/optimize/lib/components/inline_edit/inline_edit_title.js +6 -22
- package/optimize/lib/components/list_group/list_group_item.js +1 -1
- package/optimize/lib/components/panel/split_panel/split_panel.js +9 -7
- package/optimize/lib/components/panel/split_panel/split_panel.styles.js +46 -0
- package/optimize/lib/components/text_truncate/utils.js +1 -1
- package/optimize/lib/components/toast/global_toast_list.js +41 -3
- package/optimize/lib/components/toast/global_toast_list.styles.js +3 -2
- package/package.json +3 -3
- package/src/components/index.scss +0 -1
- package/test-env/components/accordion/accordion.js +34 -202
- package/test-env/components/accordion/accordion.styles.js +12 -109
- package/test-env/components/accordion/accordion_children/accordion_children.js +105 -0
- package/test-env/components/accordion/accordion_children/accordion_children.styles.js +45 -0
- package/test-env/components/accordion/accordion_children/accordion_children_loading.js +38 -0
- package/test-env/components/accordion/accordion_children/index.js +12 -0
- package/test-env/components/accordion/accordion_trigger/accordion_arrow.js +47 -0
- package/test-env/components/accordion/accordion_trigger/accordion_arrow.styles.js +51 -0
- package/test-env/components/accordion/accordion_trigger/accordion_button.js +52 -0
- package/test-env/components/accordion/accordion_trigger/accordion_button.styles.js +33 -0
- package/test-env/components/accordion/accordion_trigger/accordion_trigger.js +93 -0
- package/test-env/components/accordion/accordion_trigger/index.js +12 -0
- package/test-env/components/avatar/avatar.js +1 -1
- package/test-env/components/badge/badge.js +1 -1
- package/test-env/components/badge/beta_badge/beta_badge.js +1 -1
- 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/button/button_display/_button_display.js +1 -1
- package/test-env/components/button/button_display/_button_display_content.js +1 -1
- package/test-env/components/button/button_empty/button_empty.js +1 -1
- package/test-env/components/button/button_group/button_group.js +1 -1
- package/test-env/components/button/button_group/button_group_button.js +1 -1
- package/test-env/components/button/button_icon/button_icon.js +1 -1
- package/test-env/components/call_out/call_out.js +1 -1
- package/test-env/components/card/card.js +1 -1
- package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +1 -1
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +2 -2
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +2 -2
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +3 -3
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +2 -2
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +1 -1
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +3 -3
- package/test-env/components/comment_list/comment.js +2 -2
- package/test-env/components/comment_list/comment_event.js +1 -1
- package/test-env/components/comment_list/comment_list.js +2 -2
- package/test-env/components/comment_list/comment_timeline.js +1 -1
- package/test-env/components/datagrid/body/data_grid_body.js +13 -13
- package/test-env/components/datagrid/body/data_grid_body_custom.js +13 -13
- package/test-env/components/datagrid/body/data_grid_body_virtualized.js +13 -13
- package/test-env/components/datagrid/body/data_grid_cell.js +24 -24
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +12 -12
- package/test-env/components/datagrid/body/header/data_grid_header_row.js +13 -13
- package/test-env/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/test-env/components/datagrid/data_grid.js +13 -13
- package/test-env/components/datagrid/utils/in_memory.js +12 -12
- package/test-env/components/date_picker/date_picker.js +2 -2
- package/test-env/components/date_picker/date_picker_range.js +1 -1
- package/test-env/components/empty_prompt/empty_prompt.js +1 -1
- package/test-env/components/facet/facet_button.js +1 -1
- package/test-env/components/form/field_number/field_number.js +1 -1
- package/test-env/components/form/field_text/field_text.js +2 -2
- package/test-env/components/form/form_control_layout/form_control_layout.js +2 -2
- package/test-env/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
- package/test-env/components/form/form_control_layout/form_control_layout_icons.js +2 -2
- package/test-env/components/header/header_links/header_link.js +1 -1
- package/test-env/components/header/header_links/header_links.js +1 -1
- package/test-env/components/header/header_logo/header_logo.js +1 -1
- package/test-env/components/header/header_section/header_section_item_button.js +1 -1
- package/test-env/components/icon/assets/grabOmnidirectional.js +41 -0
- package/test-env/components/icon/assets/transitionLeftIn.js +44 -0
- package/test-env/components/icon/assets/transitionLeftOut.js +44 -0
- package/test-env/components/icon/assets/transitionTopIn.js +44 -0
- package/test-env/components/icon/assets/transitionTopOut.js +44 -0
- package/test-env/components/icon/icon_map.js +5 -0
- package/test-env/components/inline_edit/inline_edit_form.js +49 -17
- package/test-env/components/inline_edit/inline_edit_text.js +22 -23
- package/test-env/components/inline_edit/inline_edit_title.js +22 -23
- package/test-env/components/key_pad_menu/key_pad_menu_item.js +1 -1
- package/test-env/components/list_group/list_group.js +2 -2
- package/test-env/components/list_group/list_group_item.js +3 -3
- package/test-env/components/list_group/list_group_item_extra_action.js +1 -1
- package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
- package/test-env/components/loading/loading_logo.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor_footer.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor_toolbar.js +1 -1
- package/test-env/components/notification/notification_event.js +2 -2
- package/test-env/components/notification/notification_event_meta.js +1 -1
- package/test-env/components/page/page_header/page_header_content.js +1 -1
- package/test-env/components/panel/split_panel/split_panel.js +9 -7
- package/test-env/components/panel/split_panel/split_panel.styles.js +46 -0
- package/test-env/components/selectable/selectable_list/selectable_list.js +1 -1
- package/test-env/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
- package/test-env/components/suggest/suggest.js +1 -1
- package/test-env/components/suggest/suggest_item.js +1 -1
- package/test-env/components/table/table_header_button.js +1 -1
- package/test-env/components/text_truncate/utils.js +1 -1
- package/test-env/components/timeline/timeline_item_icon.js +1 -1
- package/test-env/components/toast/global_toast_list.js +53 -4
- package/test-env/components/toast/global_toast_list.styles.js +3 -2
- package/test-env/components/toast/toast.js +1 -1
- package/test-env/components/tool_tip/icon_tip.js +1 -1
- package/src/components/panel/_index.scss +0 -1
- package/src/components/panel/_panel.scss +0 -9
- package/src/components/panel/split_panel/_index.scss +0 -1
- package/src/components/panel/split_panel/_split_panel.scss +0 -21
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
var _excluded = ["children", "
|
|
2
|
-
_excluded2 = ["paddingSize", "className", "css"];
|
|
1
|
+
var _excluded = ["children", "className", "id", "element", "buttonElement", "buttonProps", "buttonClassName", "buttonContentClassName", "buttonContent", "arrowDisplay", "arrowProps", "extraAction", "paddingSize", "borders", "initialIsOpen", "forceState", "isLoading", "isLoadingMessage", "isDisabled", "theme"];
|
|
3
2
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
5
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
6
|
-
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."); }
|
|
7
|
-
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); }
|
|
8
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
9
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
10
|
-
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; }
|
|
11
4
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
12
5
|
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; }
|
|
13
6
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -34,15 +27,11 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
34
27
|
import React, { Component } from 'react';
|
|
35
28
|
import PropTypes from "prop-types";
|
|
36
29
|
import classNames from 'classnames';
|
|
37
|
-
import { tabbable } from 'tabbable';
|
|
38
|
-
import { EuiLoadingSpinner } from '../loading';
|
|
39
|
-
import { EuiResizeObserver } from '../observer/resize_observer';
|
|
40
|
-
import { EuiText } from '../text';
|
|
41
|
-
import { EuiI18n } from '../i18n';
|
|
42
30
|
import { htmlIdGenerator, withEuiTheme } from '../../services';
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
31
|
+
import { EuiLoadingSpinner } from '../loading';
|
|
32
|
+
import { EuiAccordionTrigger } from './accordion_trigger';
|
|
33
|
+
import { EuiAccordionChildren } from './accordion_children';
|
|
34
|
+
import { euiAccordionStyles } from './accordion.styles';
|
|
46
35
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
47
36
|
export var PADDING_SIZES = ['none', 'xs', 's', 'm', 'l', 'xl'];
|
|
48
37
|
export var EuiAccordionClass = /*#__PURE__*/function (_Component) {
|
|
@@ -55,18 +44,9 @@ export var EuiAccordionClass = /*#__PURE__*/function (_Component) {
|
|
|
55
44
|
args[_key] = arguments[_key];
|
|
56
45
|
}
|
|
57
46
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
58
|
-
_defineProperty(_assertThisInitialized(_this), "childContent", null);
|
|
59
|
-
_defineProperty(_assertThisInitialized(_this), "childWrapper", null);
|
|
60
|
-
_defineProperty(_assertThisInitialized(_this), "tabbableChildren", null);
|
|
61
47
|
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
62
48
|
isOpen: _this.props.forceState ? _this.props.forceState === 'open' : _this.props.initialIsOpen
|
|
63
49
|
});
|
|
64
|
-
_defineProperty(_assertThisInitialized(_this), "setChildContentHeight", function () {
|
|
65
|
-
requestAnimationFrame(function () {
|
|
66
|
-
var height = _this.childContent && _this.isOpen ? _this.childContent.clientHeight : 0;
|
|
67
|
-
_this.childWrapper && _this.childWrapper.setAttribute('style', logicalCSS('height', "".concat(height, "px")));
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
50
|
_defineProperty(_assertThisInitialized(_this), "onToggle", function () {
|
|
71
51
|
var forceState = _this.props.forceState;
|
|
72
52
|
if (forceState) {
|
|
@@ -79,57 +59,11 @@ export var EuiAccordionClass = /*#__PURE__*/function (_Component) {
|
|
|
79
59
|
};
|
|
80
60
|
}, function () {
|
|
81
61
|
var _this$props$onToggle2, _this$props2;
|
|
82
|
-
if (_this.state.isOpen && _this.childWrapper) {
|
|
83
|
-
_this.childWrapper.focus();
|
|
84
|
-
}
|
|
85
62
|
(_this$props$onToggle2 = (_this$props2 = _this.props).onToggle) === null || _this$props$onToggle2 === void 0 ? void 0 : _this$props$onToggle2.call(_this$props2, _this.state.isOpen);
|
|
86
63
|
});
|
|
87
64
|
}
|
|
88
65
|
});
|
|
89
|
-
// When accordions are closed, tabbable children should not be present in the tab order
|
|
90
|
-
_defineProperty(_assertThisInitialized(_this), "preventTabbing", function () {
|
|
91
|
-
if (_this.childContent) {
|
|
92
|
-
// Re-check for children on every close - content can change dynamically
|
|
93
|
-
_this.tabbableChildren = tabbable(_this.childContent);
|
|
94
|
-
_this.tabbableChildren.forEach(function (element) {
|
|
95
|
-
// If the element has an existing `tabIndex` set, make sure we can restore it
|
|
96
|
-
var originalTabIndex = element.getAttribute('tabIndex');
|
|
97
|
-
if (originalTabIndex) {
|
|
98
|
-
element.setAttribute('data-original-tabindex', originalTabIndex);
|
|
99
|
-
}
|
|
100
|
-
element.setAttribute('tabIndex', '-1');
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
_defineProperty(_assertThisInitialized(_this), "enableTabbing", function () {
|
|
105
|
-
// If no tabbable children were set, we don't need to re-enable anything
|
|
106
|
-
if (_this.tabbableChildren) {
|
|
107
|
-
_this.tabbableChildren.forEach(function (element) {
|
|
108
|
-
var originalTabIndex = element.getAttribute('data-original-tabindex');
|
|
109
|
-
if (originalTabIndex) {
|
|
110
|
-
// If the element originally had an existing `tabIndex` set, restore it
|
|
111
|
-
element.setAttribute('tabIndex', originalTabIndex);
|
|
112
|
-
element.removeAttribute('data-original-tabindex');
|
|
113
|
-
} else {
|
|
114
|
-
// If not, remove the tabIndex property
|
|
115
|
-
element.removeAttribute('tabIndex');
|
|
116
|
-
}
|
|
117
|
-
});
|
|
118
|
-
// Cleanup - unset the list of children
|
|
119
|
-
_this.tabbableChildren = null;
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
_defineProperty(_assertThisInitialized(_this), "setChildContentRef", function (node) {
|
|
123
|
-
_this.childContent = node;
|
|
124
|
-
});
|
|
125
66
|
_defineProperty(_assertThisInitialized(_this), "generatedId", htmlIdGenerator()());
|
|
126
|
-
// Storing resize/observer refs as an instance variable is a performance optimization
|
|
127
|
-
// and also resolves https://github.com/elastic/eui/issues/5903
|
|
128
|
-
_defineProperty(_assertThisInitialized(_this), "resizeRef", function () {});
|
|
129
|
-
_defineProperty(_assertThisInitialized(_this), "observerRef", function (ref) {
|
|
130
|
-
_this.setChildContentRef(ref);
|
|
131
|
-
_this.resizeRef(ref);
|
|
132
|
-
});
|
|
133
67
|
return _this;
|
|
134
68
|
}
|
|
135
69
|
_createClass(EuiAccordionClass, [{
|
|
@@ -137,173 +71,66 @@ export var EuiAccordionClass = /*#__PURE__*/function (_Component) {
|
|
|
137
71
|
get: function get() {
|
|
138
72
|
return this.props.forceState ? this.props.forceState === 'open' : this.state.isOpen;
|
|
139
73
|
}
|
|
140
|
-
}, {
|
|
141
|
-
key: "componentDidMount",
|
|
142
|
-
value: function componentDidMount() {
|
|
143
|
-
this.setChildContentHeight();
|
|
144
|
-
if (!this.isOpen) this.preventTabbing();
|
|
145
|
-
}
|
|
146
|
-
}, {
|
|
147
|
-
key: "componentDidUpdate",
|
|
148
|
-
value: function componentDidUpdate(prevProps, prevState) {
|
|
149
|
-
this.setChildContentHeight();
|
|
150
|
-
if (prevProps.forceState === 'open' && this.props.forceState === 'closed' || prevState.isOpen === true && this.state.isOpen === false) {
|
|
151
|
-
this.preventTabbing();
|
|
152
|
-
}
|
|
153
|
-
if (prevProps.forceState === 'closed' && this.props.forceState === 'open' || prevState.isOpen === false && this.state.isOpen === true) {
|
|
154
|
-
this.enableTabbing();
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
74
|
}, {
|
|
158
75
|
key: "render",
|
|
159
76
|
value: function render() {
|
|
160
|
-
var _buttonProps$id
|
|
161
|
-
_this2 = this;
|
|
77
|
+
var _buttonProps$id;
|
|
162
78
|
var _this$props3 = this.props,
|
|
163
79
|
children = _this$props3.children,
|
|
164
|
-
buttonContent = _this$props3.buttonContent,
|
|
165
80
|
className = _this$props3.className,
|
|
166
81
|
id = _this$props3.id,
|
|
167
82
|
_this$props3$element = _this$props3.element,
|
|
168
83
|
Element = _this$props3$element === void 0 ? 'div' : _this$props3$element,
|
|
84
|
+
buttonElement = _this$props3.buttonElement,
|
|
85
|
+
buttonProps = _this$props3.buttonProps,
|
|
169
86
|
buttonClassName = _this$props3.buttonClassName,
|
|
170
87
|
buttonContentClassName = _this$props3.buttonContentClassName,
|
|
88
|
+
buttonContent = _this$props3.buttonContent,
|
|
89
|
+
arrowDisplay = _this$props3.arrowDisplay,
|
|
90
|
+
arrowProps = _this$props3.arrowProps,
|
|
171
91
|
extraAction = _this$props3.extraAction,
|
|
172
92
|
paddingSize = _this$props3.paddingSize,
|
|
173
93
|
borders = _this$props3.borders,
|
|
174
94
|
initialIsOpen = _this$props3.initialIsOpen,
|
|
175
|
-
arrowDisplay = _this$props3.arrowDisplay,
|
|
176
95
|
forceState = _this$props3.forceState,
|
|
177
96
|
isLoading = _this$props3.isLoading,
|
|
178
97
|
isLoadingMessage = _this$props3.isLoadingMessage,
|
|
179
98
|
isDisabled = _this$props3.isDisabled,
|
|
180
|
-
_buttonProps = _this$props3.buttonProps,
|
|
181
|
-
_this$props3$buttonEl = _this$props3.buttonElement,
|
|
182
|
-
_ButtonElement = _this$props3$buttonEl === void 0 ? 'button' : _this$props3$buttonEl,
|
|
183
|
-
arrowProps = _this$props3.arrowProps,
|
|
184
99
|
theme = _this$props3.theme,
|
|
185
100
|
rest = _objectWithoutProperties(_this$props3, _excluded);
|
|
186
|
-
var _ref = _buttonProps || {},
|
|
187
|
-
buttonPaddingSize = _ref.paddingSize,
|
|
188
|
-
buttonPropsClassName = _ref.className,
|
|
189
|
-
buttonPropsCss = _ref.css,
|
|
190
|
-
buttonProps = _objectWithoutProperties(_ref, _excluded2);
|
|
191
|
-
|
|
192
|
-
// Force button element to be a legend if the element is a fieldset
|
|
193
|
-
var ButtonElement = Element === 'fieldset' ? 'legend' : _ButtonElement;
|
|
194
|
-
var buttonElementIsFocusable = ButtonElement === 'button';
|
|
195
|
-
|
|
196
|
-
// Force visibility of arrow button if button element is not focusable
|
|
197
|
-
var _arrowDisplay = arrowDisplay === 'none' && !buttonElementIsFocusable ? 'left' : arrowDisplay;
|
|
198
101
|
var classes = classNames('euiAccordion', {
|
|
199
102
|
'euiAccordion-isOpen': this.isOpen
|
|
200
103
|
}, className);
|
|
201
104
|
var styles = euiAccordionStyles(theme);
|
|
202
105
|
var cssStyles = [styles.euiAccordion, borders !== 'none' && styles.borders.borders, borders !== 'none' && styles.borders[borders]];
|
|
203
|
-
var
|
|
204
|
-
'euiAccordion__children-isLoading': isLoading
|
|
205
|
-
});
|
|
206
|
-
var buttonClasses = classNames('euiAccordion__button', buttonClassName, buttonPropsClassName);
|
|
207
|
-
var buttonContentClasses = classNames('euiAccordion__buttonContent', buttonContentClassName);
|
|
208
|
-
var iconButtonClasses = classNames('euiAccordion__iconButton', {
|
|
209
|
-
'euiAccordion__iconButton-isOpen': this.isOpen,
|
|
210
|
-
'euiAccordion__iconButton--right': _arrowDisplay === 'right'
|
|
211
|
-
}, arrowProps === null || arrowProps === void 0 ? void 0 : arrowProps.className);
|
|
212
|
-
|
|
213
|
-
// Emotion styles
|
|
214
|
-
var buttonStyles = euiAccordionButtonStyles(theme);
|
|
215
|
-
var cssButtonStyles = [buttonStyles.euiAccordion__button, isDisabled && buttonStyles.disabled].concat(_toConsumableArray(buttonPaddingSize ? [buttonStyles[buttonPaddingSize], arrowDisplay === 'left' && buttonStyles.arrowLeft, arrowDisplay === 'right' && buttonStyles.arrowRight] : []), [buttonPropsCss]);
|
|
216
|
-
var childrenStyles = euiAccordionChildrenStyles(theme);
|
|
217
|
-
var cssChildrenStyles = [childrenStyles.euiAccordion__children, isLoading && childrenStyles.isLoading, paddingSize && paddingSize !== 'none' && childrenStyles[paddingSize]];
|
|
218
|
-
var childWrapperStyles = euiAccordionChildWrapperStyles(theme);
|
|
219
|
-
var cssChildWrapperStyles = [childWrapperStyles.euiAccordion__childWrapper, this.isOpen && childWrapperStyles.isOpen];
|
|
220
|
-
var iconButtonStyles = euiAccordionIconButtonStyles(theme);
|
|
221
|
-
var cssIconButtonStyles = [iconButtonStyles.euiAccordion__iconButton, this.isOpen && iconButtonStyles.isOpen, _arrowDisplay === 'right' && iconButtonStyles.arrowRight, arrowProps === null || arrowProps === void 0 ? void 0 : arrowProps.css];
|
|
222
|
-
var optionalActionStyles = euiAccordionOptionalActionStyles();
|
|
223
|
-
var cssOptionalActionStyles = [optionalActionStyles.euiAccordion__optionalAction];
|
|
224
|
-
var spinnerStyles = euiAccordionSpinnerStyles(theme);
|
|
225
|
-
var cssSpinnerStyles = [spinnerStyles.euiAccordion__spinner];
|
|
226
|
-
var triggerWrapperStyles = euiAccordionTriggerWrapperStyles();
|
|
227
|
-
var cssTriggerWrapperStyles = [triggerWrapperStyles.euiAccordion__triggerWrapper];
|
|
228
|
-
var iconButton;
|
|
229
|
-
var buttonId = (_buttonProps$id = buttonProps.id) !== null && _buttonProps$id !== void 0 ? _buttonProps$id : this.generatedId;
|
|
230
|
-
if (_arrowDisplay !== 'none') {
|
|
231
|
-
iconButton = ___EmotionJSX(EuiButtonIcon, _extends({
|
|
232
|
-
color: "text"
|
|
233
|
-
}, arrowProps, {
|
|
234
|
-
className: iconButtonClasses,
|
|
235
|
-
css: cssIconButtonStyles,
|
|
236
|
-
iconType: "arrowRight",
|
|
237
|
-
onClick: this.onToggle,
|
|
238
|
-
"aria-controls": id,
|
|
239
|
-
"aria-expanded": this.isOpen,
|
|
240
|
-
"aria-labelledby": buttonId,
|
|
241
|
-
tabIndex: buttonElementIsFocusable ? -1 : 0,
|
|
242
|
-
isDisabled: isDisabled
|
|
243
|
-
}));
|
|
244
|
-
}
|
|
245
|
-
var optionalAction = null;
|
|
246
|
-
if (isLoading || extraAction) {
|
|
247
|
-
optionalAction = ___EmotionJSX("div", {
|
|
248
|
-
className: "euiAccordion__optionalAction",
|
|
249
|
-
css: cssOptionalActionStyles
|
|
250
|
-
}, isLoading ? ___EmotionJSX(EuiLoadingSpinner, null) : extraAction);
|
|
251
|
-
}
|
|
252
|
-
var childrenContent;
|
|
253
|
-
if (isLoading && isLoadingMessage) {
|
|
254
|
-
childrenContent = ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiLoadingSpinner, {
|
|
255
|
-
className: "euiAccordion__spinner",
|
|
256
|
-
css: cssSpinnerStyles
|
|
257
|
-
}), ___EmotionJSX(EuiText, {
|
|
258
|
-
size: "s"
|
|
259
|
-
}, ___EmotionJSX("p", null, isLoadingMessage !== true ? isLoadingMessage : ___EmotionJSX(EuiI18n, {
|
|
260
|
-
token: "euiAccordion.isLoading",
|
|
261
|
-
default: "Loading"
|
|
262
|
-
}))));
|
|
263
|
-
} else {
|
|
264
|
-
childrenContent = children;
|
|
265
|
-
}
|
|
266
|
-
var button = ___EmotionJSX(ButtonElement, _extends({}, buttonProps, {
|
|
267
|
-
id: buttonId,
|
|
268
|
-
className: buttonClasses,
|
|
269
|
-
css: cssButtonStyles,
|
|
270
|
-
"aria-controls": id
|
|
271
|
-
// `aria-expanded` is only a valid attribute on interactive controls - axe-core throws a violation otherwise
|
|
272
|
-
,
|
|
273
|
-
"aria-expanded": ButtonElement === 'button' ? this.isOpen : undefined,
|
|
274
|
-
onClick: isDisabled ? undefined : this.onToggle,
|
|
275
|
-
type: ButtonElement === 'button' ? 'button' : undefined,
|
|
276
|
-
disabled: ButtonElement === 'button' ? isDisabled : undefined
|
|
277
|
-
}), ___EmotionJSX("span", {
|
|
278
|
-
className: buttonContentClasses
|
|
279
|
-
}, buttonContent));
|
|
106
|
+
var buttonId = (_buttonProps$id = buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.id) !== null && _buttonProps$id !== void 0 ? _buttonProps$id : this.generatedId;
|
|
280
107
|
return ___EmotionJSX(Element, _extends({
|
|
281
108
|
className: classes,
|
|
282
109
|
css: cssStyles
|
|
283
|
-
}, rest), ___EmotionJSX(
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
110
|
+
}, rest), ___EmotionJSX(EuiAccordionTrigger, {
|
|
111
|
+
ariaControlsId: id,
|
|
112
|
+
buttonId: buttonId
|
|
113
|
+
// Force button element to be a legend if the element is a fieldset
|
|
114
|
+
,
|
|
115
|
+
buttonElement: Element === 'fieldset' ? 'legend' : buttonElement,
|
|
116
|
+
buttonClassName: buttonClassName,
|
|
117
|
+
buttonContent: buttonContent,
|
|
118
|
+
buttonContentClassName: buttonContentClassName,
|
|
119
|
+
buttonProps: buttonProps,
|
|
120
|
+
arrowProps: arrowProps,
|
|
121
|
+
arrowDisplay: arrowDisplay,
|
|
122
|
+
isDisabled: isDisabled,
|
|
123
|
+
isOpen: this.isOpen,
|
|
124
|
+
onToggle: this.onToggle,
|
|
125
|
+
extraAction: isLoading ? ___EmotionJSX(EuiLoadingSpinner, null) : extraAction
|
|
126
|
+
}), ___EmotionJSX(EuiAccordionChildren, {
|
|
127
|
+
id: id,
|
|
294
128
|
"aria-labelledby": buttonId,
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
return ___EmotionJSX("div", {
|
|
301
|
-
ref: _this2.observerRef
|
|
302
|
-
}, ___EmotionJSX("div", {
|
|
303
|
-
className: childrenClasses,
|
|
304
|
-
css: cssChildrenStyles
|
|
305
|
-
}, childrenContent));
|
|
306
|
-
})));
|
|
129
|
+
paddingSize: paddingSize,
|
|
130
|
+
isLoading: isLoading,
|
|
131
|
+
isLoadingMessage: isLoadingMessage,
|
|
132
|
+
isOpen: this.isOpen
|
|
133
|
+
}, children));
|
|
307
134
|
}
|
|
308
135
|
}]);
|
|
309
136
|
return EuiAccordionClass;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
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)."; }
|
|
2
1
|
/*
|
|
3
2
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
4
3
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -8,9 +7,9 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
8
7
|
*/
|
|
9
8
|
|
|
10
9
|
import { css } from '@emotion/react';
|
|
11
|
-
import {
|
|
12
|
-
export var euiAccordionStyles = function euiAccordionStyles(
|
|
13
|
-
var euiTheme =
|
|
10
|
+
import { logicalCSS } from '../../global_styling';
|
|
11
|
+
export var euiAccordionStyles = function euiAccordionStyles(_ref) {
|
|
12
|
+
var euiTheme = _ref.euiTheme;
|
|
14
13
|
return {
|
|
15
14
|
euiAccordion: /*#__PURE__*/css(";label:euiAccordion;"),
|
|
16
15
|
// Borders
|
|
@@ -21,95 +20,4 @@ export var euiAccordionStyles = function euiAccordionStyles(_ref5) {
|
|
|
21
20
|
all: /*#__PURE__*/css("border:", euiTheme.border.thin, ";;label:all;")
|
|
22
21
|
}
|
|
23
22
|
};
|
|
24
|
-
};
|
|
25
|
-
export var euiAccordionButtonStyles = function euiAccordionButtonStyles(euiThemeContext) {
|
|
26
|
-
var euiTheme = euiThemeContext.euiTheme;
|
|
27
|
-
return {
|
|
28
|
-
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;"),
|
|
29
|
-
// Triggering button needs separate `disabled` key because the element that renders may not support `:disabled`;
|
|
30
|
-
// Hover pseudo selector for specificity
|
|
31
|
-
disabled: /*#__PURE__*/css("&,&:hover{cursor:not-allowed;color:", euiTheme.colors.disabledText, ";text-decoration:none;};label:disabled;"),
|
|
32
|
-
// Optional padding sizes
|
|
33
|
-
s: /*#__PURE__*/css("padding:", euiTheme.size.s, ";;label:s;"),
|
|
34
|
-
m: /*#__PURE__*/css("padding:", euiTheme.size.base, ";;label:m;"),
|
|
35
|
-
l: /*#__PURE__*/css("padding:", euiTheme.size.l, ";;label:l;"),
|
|
36
|
-
// Remove padding from the accordion button on the side that the arrow is on
|
|
37
|
-
arrowLeft: /*#__PURE__*/css(logicalCSS('padding-left', 0), ";;label:arrowLeft;"),
|
|
38
|
-
arrowRight: /*#__PURE__*/css(logicalCSS('padding-left', 0), ";;label:arrowRight;")
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
var _ref4 = process.env.NODE_ENV === "production" ? {
|
|
42
|
-
name: "1xvjonu-isLoading",
|
|
43
|
-
styles: "align-items:center;display:flex;label:isLoading;"
|
|
44
|
-
} : {
|
|
45
|
-
name: "1xvjonu-isLoading",
|
|
46
|
-
styles: "align-items:center;display:flex;label:isLoading;",
|
|
47
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
48
|
-
};
|
|
49
|
-
export var euiAccordionChildrenStyles = function euiAccordionChildrenStyles(_ref6) {
|
|
50
|
-
var euiTheme = _ref6.euiTheme;
|
|
51
|
-
return {
|
|
52
|
-
euiAccordion__children: /*#__PURE__*/css(";label:euiAccordion__children;"),
|
|
53
|
-
isLoading: _ref4,
|
|
54
|
-
xs: /*#__PURE__*/css("padding:", euiTheme.size.xs, ";;label:xs;"),
|
|
55
|
-
s: /*#__PURE__*/css("padding:", euiTheme.size.s, ";;label:s;"),
|
|
56
|
-
m: /*#__PURE__*/css("padding:", euiTheme.size.base, ";;label:m;"),
|
|
57
|
-
l: /*#__PURE__*/css("padding:", euiTheme.size.l, ";;label:l;"),
|
|
58
|
-
xl: /*#__PURE__*/css("padding:", euiTheme.size.xl, ";;label:xl;")
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
export var euiAccordionChildWrapperStyles = function euiAccordionChildWrapperStyles(_ref7) {
|
|
62
|
-
var euiTheme = _ref7.euiTheme;
|
|
63
|
-
return {
|
|
64
|
-
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;&:focus{outline:none;};label:euiAccordion__childWrapper;"),
|
|
65
|
-
isOpen: /*#__PURE__*/css(logicalCSS('height', 'auto'), " opacity:1;visibility:visible;;label:isOpen;")
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
var _ref3 = process.env.NODE_ENV === "production" ? {
|
|
69
|
-
name: "1u3vcry-isOpen",
|
|
70
|
-
styles: "transform:rotate(\n 90deg\n )!important;label:isOpen;"
|
|
71
|
-
} : {
|
|
72
|
-
name: "1u3vcry-isOpen",
|
|
73
|
-
styles: "transform:rotate(\n 90deg\n )!important;label:isOpen;",
|
|
74
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
75
|
-
};
|
|
76
|
-
export var euiAccordionIconButtonStyles = function euiAccordionIconButtonStyles(_ref8) {
|
|
77
|
-
var euiTheme = _ref8.euiTheme;
|
|
78
|
-
return {
|
|
79
|
-
euiAccordion__iconButton: /*#__PURE__*/css("flex-shrink:0;", logicalCSS('margin-right', euiTheme.size.xs), " transform:rotate(\n 0deg\n )!important;;label:euiAccordion__iconButton;"),
|
|
80
|
-
isOpen: _ref3,
|
|
81
|
-
arrowRight: /*#__PURE__*/css(logicalCSS('margin-left', euiTheme.size.xs), " ", logicalCSS('margin-right', 0), ";;label:arrowRight;")
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
|
-
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
85
|
-
name: "iqfpv3-euiAccordion__optionalAction",
|
|
86
|
-
styles: "flex-shrink:0;label:euiAccordion__optionalAction;"
|
|
87
|
-
} : {
|
|
88
|
-
name: "iqfpv3-euiAccordion__optionalAction",
|
|
89
|
-
styles: "flex-shrink:0;label:euiAccordion__optionalAction;",
|
|
90
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
91
|
-
};
|
|
92
|
-
export var euiAccordionOptionalActionStyles = function euiAccordionOptionalActionStyles() {
|
|
93
|
-
return {
|
|
94
|
-
euiAccordion__optionalAction: _ref2
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
export var euiAccordionSpinnerStyles = function euiAccordionSpinnerStyles(_ref9) {
|
|
98
|
-
var euiTheme = _ref9.euiTheme;
|
|
99
|
-
return {
|
|
100
|
-
euiAccordion__spinner: /*#__PURE__*/css(logicalCSS('margin-right', euiTheme.size.xs), ";;label:euiAccordion__spinner;")
|
|
101
|
-
};
|
|
102
|
-
};
|
|
103
|
-
var _ref = process.env.NODE_ENV === "production" ? {
|
|
104
|
-
name: "1r6c0fv-euiAccordion__triggerWrapper",
|
|
105
|
-
styles: "align-items:center;display:flex;label:euiAccordion__triggerWrapper;"
|
|
106
|
-
} : {
|
|
107
|
-
name: "1r6c0fv-euiAccordion__triggerWrapper",
|
|
108
|
-
styles: "align-items:center;display:flex;label:euiAccordion__triggerWrapper;",
|
|
109
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
110
|
-
};
|
|
111
|
-
export var euiAccordionTriggerWrapperStyles = function euiAccordionTriggerWrapperStyles() {
|
|
112
|
-
return {
|
|
113
|
-
euiAccordion__triggerWrapper: _ref
|
|
114
|
-
};
|
|
115
23
|
};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
var _excluded = ["children", "paddingSize", "isLoading", "isLoadingMessage", "isOpen"];
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
3
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5
|
+
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); }
|
|
6
|
+
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; }
|
|
7
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
8
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
9
|
+
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; }
|
|
10
|
+
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; }
|
|
11
|
+
/*
|
|
12
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
13
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
14
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
15
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
16
|
+
* Side Public License, v 1.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import React, { useRef, useCallback, useMemo, useState } from 'react';
|
|
20
|
+
import PropTypes from "prop-types";
|
|
21
|
+
import classNames from 'classnames';
|
|
22
|
+
import { useEuiTheme, useUpdateEffect } from '../../../services';
|
|
23
|
+
import { EuiResizeObserver } from '../../observer/resize_observer';
|
|
24
|
+
import { EuiAccordionChildrenLoading } from './accordion_children_loading';
|
|
25
|
+
import { euiAccordionChildrenStyles, euiAccordionChildWrapperStyles } from './accordion_children.styles';
|
|
26
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
27
|
+
export var EuiAccordionChildren = function EuiAccordionChildren(_ref) {
|
|
28
|
+
var children = _ref.children,
|
|
29
|
+
paddingSize = _ref.paddingSize,
|
|
30
|
+
isLoading = _ref.isLoading,
|
|
31
|
+
isLoadingMessage = _ref.isLoadingMessage,
|
|
32
|
+
isOpen = _ref.isOpen,
|
|
33
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
34
|
+
/**
|
|
35
|
+
* Children
|
|
36
|
+
*/
|
|
37
|
+
var classes = classNames('euiAccordion__children', {
|
|
38
|
+
'euiAccordion__children-isLoading': isLoading
|
|
39
|
+
});
|
|
40
|
+
var euiTheme = useEuiTheme();
|
|
41
|
+
var styles = euiAccordionChildrenStyles(euiTheme);
|
|
42
|
+
var cssStyles = [styles.euiAccordion__children, isLoading && styles.isLoading, paddingSize && paddingSize !== 'none' && styles[paddingSize]];
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Wrapper
|
|
46
|
+
*/
|
|
47
|
+
var wrapperStyles = euiAccordionChildWrapperStyles(euiTheme);
|
|
48
|
+
var wrapperCssStyles = [wrapperStyles.euiAccordion__childWrapper, isOpen ? wrapperStyles.isOpen : wrapperStyles.isClosed];
|
|
49
|
+
var wrapperRef = useRef(null);
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Update the accordion wrapper height whenever the accordion opens, and also
|
|
53
|
+
* whenever the child content updates (which will change the height)
|
|
54
|
+
*/
|
|
55
|
+
var _useState = useState(0),
|
|
56
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
57
|
+
contentHeight = _useState2[0],
|
|
58
|
+
setContentHeight = _useState2[1];
|
|
59
|
+
var onResize = useCallback(function (_ref2) {
|
|
60
|
+
var height = _ref2.height;
|
|
61
|
+
return setContentHeight(Math.round(height));
|
|
62
|
+
}, []);
|
|
63
|
+
var heightInlineStyle = useMemo(function () {
|
|
64
|
+
return {
|
|
65
|
+
blockSize: isOpen ? contentHeight : 0
|
|
66
|
+
};
|
|
67
|
+
}, [isOpen, contentHeight]);
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Focus the children wrapper when the accordion is opened,
|
|
71
|
+
* but not if the accordion is initially open on mount
|
|
72
|
+
*/
|
|
73
|
+
useUpdateEffect(function () {
|
|
74
|
+
var _wrapperRef$current;
|
|
75
|
+
if (isOpen) (_wrapperRef$current = wrapperRef.current) === null || _wrapperRef$current === void 0 ? void 0 : _wrapperRef$current.focus();
|
|
76
|
+
}, [isOpen]);
|
|
77
|
+
return ___EmotionJSX("div", _extends({}, rest, {
|
|
78
|
+
className: "euiAccordion__childWrapper",
|
|
79
|
+
css: wrapperCssStyles,
|
|
80
|
+
style: heightInlineStyle,
|
|
81
|
+
ref: wrapperRef,
|
|
82
|
+
role: "region",
|
|
83
|
+
tabIndex: -1
|
|
84
|
+
// @ts-expect-error - inert property not yet available in React TS defs. TODO: Remove this once https://github.com/DefinitelyTyped/DefinitelyTyped/pull/60822 is merged
|
|
85
|
+
,
|
|
86
|
+
inert: !isOpen ? '' : undefined // Can't pass a boolean currently, Jest throws errors
|
|
87
|
+
}), ___EmotionJSX(EuiResizeObserver, {
|
|
88
|
+
onResize: onResize
|
|
89
|
+
}, function (resizeRef) {
|
|
90
|
+
return ___EmotionJSX("div", {
|
|
91
|
+
ref: resizeRef,
|
|
92
|
+
className: classes,
|
|
93
|
+
css: cssStyles
|
|
94
|
+
}, isLoading && isLoadingMessage ? ___EmotionJSX(EuiAccordionChildrenLoading, {
|
|
95
|
+
isLoadingMessage: isLoadingMessage
|
|
96
|
+
}) : children);
|
|
97
|
+
}));
|
|
98
|
+
};
|
|
99
|
+
EuiAccordionChildren.propTypes = {
|
|
100
|
+
isOpen: PropTypes.bool.isRequired
|
|
101
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
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)."; }
|
|
2
|
+
/*
|
|
3
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
4
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
5
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
6
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
7
|
+
* Side Public License, v 1.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { css } from '@emotion/react';
|
|
11
|
+
import { logicals, logicalCSS, euiCanAnimate, euiFocusRing } from '../../../global_styling';
|
|
12
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
13
|
+
name: "1xvjonu-isLoading",
|
|
14
|
+
styles: "align-items:center;display:flex;label:isLoading;"
|
|
15
|
+
} : {
|
|
16
|
+
name: "1xvjonu-isLoading",
|
|
17
|
+
styles: "align-items:center;display:flex;label:isLoading;",
|
|
18
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
19
|
+
};
|
|
20
|
+
export var euiAccordionChildrenStyles = function euiAccordionChildrenStyles(_ref2) {
|
|
21
|
+
var euiTheme = _ref2.euiTheme;
|
|
22
|
+
return {
|
|
23
|
+
euiAccordion__children: /*#__PURE__*/css(";label:euiAccordion__children;"),
|
|
24
|
+
isLoading: _ref,
|
|
25
|
+
xs: /*#__PURE__*/css("padding:", euiTheme.size.xs, ";;label:xs;"),
|
|
26
|
+
s: /*#__PURE__*/css("padding:", euiTheme.size.s, ";;label:s;"),
|
|
27
|
+
m: /*#__PURE__*/css("padding:", euiTheme.size.base, ";;label:m;"),
|
|
28
|
+
l: /*#__PURE__*/css("padding:", euiTheme.size.l, ";;label:l;"),
|
|
29
|
+
xl: /*#__PURE__*/css("padding:", euiTheme.size.xl, ";;label:xl;")
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export var euiAccordionChildWrapperStyles = function euiAccordionChildWrapperStyles(euiThemeContext) {
|
|
33
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
34
|
+
return {
|
|
35
|
+
euiAccordion__childWrapper: /*#__PURE__*/css("overflow:hidden;", euiCanAnimate, "{transition:", logicals.height, " ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ",opacity ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ";}", euiFocusRing(euiThemeContext), ";;label:euiAccordion__childWrapper;"),
|
|
36
|
+
isClosed: /*#__PURE__*/css(logicalCSS('height', 0), " opacity:0;;label:isClosed;"),
|
|
37
|
+
isOpen: /*#__PURE__*/css(logicalCSS('height', 'auto'), " opacity:1;;label:isOpen;")
|
|
38
|
+
};
|
|
39
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { css as _css } from "@emotion/react";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
4
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
5
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
6
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
7
|
+
* Side Public License, v 1.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import { useEuiTheme } from '../../../services';
|
|
12
|
+
import { EuiI18n } from '../../i18n';
|
|
13
|
+
import { EuiText } from '../../text';
|
|
14
|
+
import { EuiLoadingSpinner } from '../../loading';
|
|
15
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
16
|
+
export var EuiAccordionChildrenLoading = function EuiAccordionChildrenLoading(_ref) {
|
|
17
|
+
var isLoadingMessage = _ref.isLoadingMessage;
|
|
18
|
+
var _useEuiTheme = useEuiTheme(),
|
|
19
|
+
euiTheme = _useEuiTheme.euiTheme;
|
|
20
|
+
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiLoadingSpinner, {
|
|
21
|
+
className: "euiAccordion__spinner",
|
|
22
|
+
css: /*#__PURE__*/_css({
|
|
23
|
+
marginInlineEnd: euiTheme.size.xs
|
|
24
|
+
}, ";label:EuiAccordionChildrenLoading;")
|
|
25
|
+
}), ___EmotionJSX(EuiText, {
|
|
26
|
+
size: "s"
|
|
27
|
+
}, ___EmotionJSX("p", null, isLoadingMessage !== true ? isLoadingMessage : ___EmotionJSX(EuiI18n, {
|
|
28
|
+
token: "euiAccordionChildrenLoading.message",
|
|
29
|
+
default: "Loading"
|
|
30
|
+
}))));
|
|
31
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export { EuiAccordionChildren } from './accordion_children';
|