@elastic/eui 68.0.0 → 70.0.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_charts_theme.js +5661 -5814
- package/dist/eui_charts_theme.js.map +1 -1
- package/dist/eui_theme_dark.css +0 -896
- package/dist/eui_theme_dark.json +0 -52
- package/dist/eui_theme_dark.json.d.ts +0 -52
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +0 -896
- package/dist/eui_theme_light.json +0 -52
- package/dist/eui_theme_light.json.d.ts +0 -52
- package/dist/eui_theme_light.min.css +1 -1
- 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 +15 -3
- package/es/components/breadcrumbs/breadcrumb.js +9 -5
- package/es/components/breadcrumbs/breadcrumbs.js +7 -4
- package/es/components/button/_button_content_deprecated.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/code/code.js +7 -3
- package/es/components/code/code.styles.js +32 -0
- package/es/components/code/code_block.js +72 -315
- package/es/components/code/code_block.styles.js +153 -0
- package/es/components/code/code_block_controls.js +29 -0
- package/es/components/code/code_block_controls.styles.js +43 -0
- package/es/components/code/code_block_copy.js +65 -0
- package/es/components/code/code_block_full_screen.js +90 -0
- package/es/components/code/code_block_line.styles.js +49 -0
- package/es/components/code/code_block_overflow.js +78 -0
- package/es/components/code/code_block_virtualized.js +59 -0
- package/es/components/code/code_syntax.styles.js +43 -0
- package/es/components/code/utils.js +43 -37
- package/es/components/collapsible_nav/collapsible_nav.js +0 -5
- package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/es/components/color_picker/color_palette_picker/color_palette_picker.js +18 -0
- package/es/components/combo_box/combo_box.js +52 -11
- package/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +14 -6
- package/es/components/combo_box/matching_options.js +60 -11
- 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_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/flex/flex_grid.js +30 -40
- package/es/components/flex/flex_grid.styles.js +137 -0
- package/es/components/flex/flex_group.js +16 -42
- package/es/components/flex/flex_group.styles.js +202 -0
- package/es/components/flex/flex_item.js +17 -16
- package/es/components/flex/flex_item.styles.js +148 -0
- package/es/components/flyout/flyout_body.js +2 -3
- package/es/components/flyout/flyout_footer.js +2 -3
- package/es/components/flyout/flyout_header.js +2 -3
- package/es/components/form/described_form_group/described_form_group.js +28 -23
- package/es/components/form/eui_form_context.js +14 -0
- package/es/components/form/field_number/field_number.js +38 -23
- package/es/components/form/field_password/field_password.js +31 -20
- package/es/components/form/field_search/field_search.js +14 -2
- package/es/components/form/field_text/field_text.js +30 -20
- package/es/components/form/file_picker/file_picker.js +13 -1
- package/es/components/form/form.js +21 -3
- package/es/components/form/form_control_layout/form_control_layout.js +19 -3
- 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/form/form_row/form_row.js +22 -4
- package/es/components/form/range/dual_range.js +14 -2
- package/es/components/form/range/range.js +14 -2
- package/es/components/form/range/range_wrapper.js +16 -6
- package/es/components/form/select/select.js +41 -25
- package/es/components/form/super_select/super_select.js +18 -0
- package/es/components/form/super_select/super_select_control.js +26 -22
- package/es/components/form/text_area/text_area.js +26 -15
- 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.js +1 -1
- package/es/components/icon/assets/filter.js +1 -2
- package/es/components/icon/assets/filterExclude.js +43 -0
- package/es/components/icon/assets/filterIgnore.js +38 -0
- package/es/components/icon/assets/filterInclude.js +38 -0
- package/es/components/icon/assets/indexTemporary.js +40 -0
- package/es/components/icon/assets/infinity.js +38 -0
- package/es/components/icon/assets/sortAscending.js +38 -0
- package/es/components/icon/assets/sortDescending.js +38 -0
- package/es/components/icon/icon.js +1 -1
- package/es/components/icon/icon_map.js +7 -0
- package/es/components/image/image_fullscreen_wrapper.js +3 -3
- 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 +2 -2
- 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/overlay_mask/overlay_mask.js +8 -14
- package/es/components/overlay_mask/overlay_mask.styles.js +4 -14
- package/es/components/overlay_mask/overlay_mask_body.styles.js +18 -0
- package/es/components/page/page_header/page_header_content.js +1 -1
- package/es/components/page/page_section/page_section.js +4 -3
- package/es/components/pagination/pagination.js +4 -4
- package/es/components/pagination/pagination_button.js +1 -1
- package/es/components/provider/provider.js +1 -5
- package/es/components/resizable_container/helpers.js +2 -2
- package/es/components/resizable_container/resizable_container.js +83 -25
- package/es/components/resizable_container/resizable_container.styles.js +28 -0
- package/es/components/resizable_container/resizable_panel.js +25 -48
- package/es/components/resizable_container/resizable_panel.styles.js +69 -0
- package/es/components/search_bar/query/ast.js +14 -3
- package/es/components/search_bar/search_bar.js +6 -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/text.js +1 -0
- package/es/components/timeline/timeline_item_icon.js +1 -1
- package/es/components/toast/global_toast_list.js +1 -1
- package/es/components/toast/toast.js +1 -1
- package/es/components/tool_tip/icon_tip.js +1 -1
- package/es/components/tool_tip/tool_tip.js +3 -2
- package/es/components/tool_tip/tool_tip.styles.js +17 -22
- package/es/components/tool_tip/tool_tip_anchor.js +2 -2
- package/es/components/tool_tip/tool_tip_arrow.js +17 -3
- package/es/components/tool_tip/tool_tip_popover.js +7 -7
- package/es/components/tour/tour.styles.js +4 -3
- package/es/components/tour/tour_step.js +7 -5
- package/es/global_styling/functions/logicals.js +5 -3
- package/es/global_styling/functions/math.js +37 -19
- package/es/global_styling/mixins/_padding.js +13 -9
- package/eui.d.ts +664 -122
- package/i18ntokens.json +60 -60
- 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 +15 -3
- package/lib/components/breadcrumbs/breadcrumb.js +9 -5
- package/lib/components/breadcrumbs/breadcrumbs.js +7 -4
- package/lib/components/button/_button_content_deprecated.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/code/code.js +9 -3
- package/lib/components/code/code.styles.js +35 -0
- package/lib/components/code/code_block.js +72 -320
- package/lib/components/code/code_block.styles.js +154 -0
- package/lib/components/code/code_block_controls.js +48 -0
- package/lib/components/code/code_block_controls.styles.js +39 -0
- package/lib/components/code/code_block_copy.js +78 -0
- package/lib/components/code/code_block_full_screen.js +108 -0
- package/lib/components/code/code_block_line.styles.js +45 -0
- package/lib/components/code/code_block_overflow.js +82 -0
- package/lib/components/code/code_block_virtualized.js +72 -0
- package/lib/components/code/code_syntax.styles.js +57 -0
- package/lib/components/code/utils.js +40 -39
- package/lib/components/collapsible_nav/collapsible_nav.js +0 -5
- package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/lib/components/color_picker/color_palette_picker/color_palette_picker.js +18 -0
- package/lib/components/combo_box/combo_box.js +51 -10
- package/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +14 -6
- package/lib/components/combo_box/matching_options.js +64 -12
- 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_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/flex/flex_grid.js +33 -42
- package/lib/components/flex/flex_grid.styles.js +140 -0
- package/lib/components/flex/flex_group.js +17 -42
- package/lib/components/flex/flex_group.styles.js +205 -0
- package/lib/components/flex/flex_item.js +20 -19
- package/lib/components/flex/flex_item.styles.js +150 -0
- package/lib/components/flyout/flyout_body.js +2 -3
- package/lib/components/flyout/flyout_footer.js +2 -3
- package/lib/components/flyout/flyout_header.js +2 -3
- package/lib/components/form/described_form_group/described_form_group.js +29 -23
- package/lib/components/form/eui_form_context.js +28 -0
- package/lib/components/form/field_number/field_number.js +39 -23
- package/lib/components/form/field_password/field_password.js +32 -20
- package/lib/components/form/field_search/field_search.js +15 -2
- package/lib/components/form/field_text/field_text.js +31 -20
- package/lib/components/form/file_picker/file_picker.js +14 -1
- package/lib/components/form/form.js +23 -3
- package/lib/components/form/form_control_layout/form_control_layout.js +20 -3
- 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/form/form_row/form_row.js +23 -4
- package/lib/components/form/range/dual_range.js +15 -2
- package/lib/components/form/range/range.js +15 -2
- package/lib/components/form/range/range_wrapper.js +17 -6
- package/lib/components/form/select/select.js +42 -25
- package/lib/components/form/super_select/super_select.js +18 -0
- package/lib/components/form/super_select/super_select_control.js +27 -22
- package/lib/components/form/text_area/text_area.js +27 -15
- 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.js +1 -1
- package/lib/components/icon/assets/filter.js +1 -2
- package/lib/components/icon/assets/filterExclude.js +50 -0
- package/lib/components/icon/assets/filterIgnore.js +45 -0
- package/lib/components/icon/assets/filterInclude.js +45 -0
- package/lib/components/icon/assets/indexTemporary.js +47 -0
- package/lib/components/icon/assets/infinity.js +45 -0
- package/lib/components/icon/assets/sortAscending.js +45 -0
- package/lib/components/icon/assets/sortDescending.js +45 -0
- package/lib/components/icon/icon.js +1 -1
- package/lib/components/icon/icon_map.js +7 -0
- package/lib/components/icon/svgs/filter.svg +1 -1
- package/lib/components/icon/svgs/filterExclude.svg +5 -0
- package/lib/components/icon/svgs/filterIgnore.svg +4 -0
- package/lib/components/icon/svgs/filterInclude.svg +5 -0
- package/lib/components/icon/svgs/indexTemporary.svg +4 -0
- package/lib/components/icon/svgs/infinity.svg +3 -0
- package/lib/components/icon/svgs/sortAscending.svg +3 -0
- package/lib/components/icon/svgs/sortDescending.svg +3 -0
- package/lib/components/image/image_fullscreen_wrapper.js +3 -3
- 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 +2 -2
- 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/overlay_mask/overlay_mask.js +9 -14
- package/lib/components/overlay_mask/overlay_mask.styles.js +13 -17
- package/lib/components/overlay_mask/overlay_mask_body.styles.js +20 -0
- package/lib/components/page/page_header/page_header_content.js +1 -1
- package/lib/components/page/page_section/page_section.js +4 -3
- package/lib/components/pagination/pagination.js +4 -4
- package/lib/components/provider/provider.js +7 -12
- package/lib/components/resizable_container/helpers.js +2 -2
- package/lib/components/resizable_container/resizable_container.js +84 -25
- package/lib/components/resizable_container/resizable_container.styles.js +31 -0
- package/lib/components/resizable_container/resizable_panel.js +28 -49
- package/lib/components/resizable_container/resizable_panel.styles.js +74 -0
- package/lib/components/search_bar/query/ast.js +14 -3
- package/lib/components/search_bar/search_bar.js +6 -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/text.js +1 -0
- package/lib/components/timeline/timeline_item_icon.js +1 -1
- package/lib/components/toast/global_toast_list.js +1 -1
- package/lib/components/toast/toast.js +1 -1
- package/lib/components/tool_tip/icon_tip.js +1 -1
- package/lib/components/tool_tip/tool_tip.js +3 -2
- package/lib/components/tool_tip/tool_tip.styles.js +18 -26
- package/lib/components/tool_tip/tool_tip_anchor.js +2 -2
- package/lib/components/tool_tip/tool_tip_arrow.js +19 -4
- package/lib/components/tool_tip/tool_tip_popover.js +6 -6
- package/lib/components/tour/tour.styles.js +3 -2
- package/lib/components/tour/tour_step.js +7 -5
- package/lib/global_styling/functions/logicals.js +5 -3
- package/lib/global_styling/functions/math.js +37 -19
- package/lib/global_styling/mixins/_padding.js +17 -10
- package/optimize/es/components/basic_table/in_memory_table.js +1 -1
- package/optimize/es/components/breadcrumbs/breadcrumb.js +3 -2
- package/optimize/es/components/breadcrumbs/breadcrumbs.js +7 -4
- package/optimize/es/components/code/code.js +7 -3
- package/optimize/es/components/code/code.styles.js +32 -0
- package/optimize/es/components/code/code_block.js +70 -299
- package/optimize/es/components/code/code_block.styles.js +153 -0
- package/optimize/es/components/code/code_block_controls.js +29 -0
- package/optimize/es/components/code/code_block_controls.styles.js +43 -0
- package/optimize/es/components/code/code_block_copy.js +55 -0
- package/optimize/es/components/code/code_block_full_screen.js +80 -0
- package/optimize/es/components/code/code_block_line.styles.js +49 -0
- package/optimize/es/components/code/code_block_overflow.js +67 -0
- package/optimize/es/components/code/code_block_virtualized.js +59 -0
- package/optimize/es/components/code/code_syntax.styles.js +43 -0
- package/optimize/es/components/code/utils.js +43 -37
- package/optimize/es/components/combo_box/combo_box.js +47 -11
- package/optimize/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +13 -6
- package/optimize/es/components/combo_box/matching_options.js +60 -11
- package/optimize/es/components/flex/flex_grid.js +18 -34
- package/optimize/es/components/flex/flex_grid.styles.js +137 -0
- package/optimize/es/components/flex/flex_group.js +12 -38
- package/optimize/es/components/flex/flex_group.styles.js +202 -0
- package/optimize/es/components/flex/flex_item.js +11 -14
- package/optimize/es/components/flex/flex_item.styles.js +148 -0
- package/optimize/es/components/flyout/flyout_body.js +2 -3
- package/optimize/es/components/flyout/flyout_footer.js +2 -3
- package/optimize/es/components/flyout/flyout_header.js +2 -3
- package/optimize/es/components/form/described_form_group/described_form_group.js +22 -22
- package/optimize/es/components/form/eui_form_context.js +14 -0
- package/optimize/es/components/form/field_number/field_number.js +26 -22
- package/optimize/es/components/form/field_password/field_password.js +24 -20
- package/optimize/es/components/form/field_search/field_search.js +8 -2
- package/optimize/es/components/form/field_text/field_text.js +22 -18
- package/optimize/es/components/form/file_picker/file_picker.js +7 -1
- package/optimize/es/components/form/form.js +11 -2
- package/optimize/es/components/form/form_control_layout/form_control_layout.js +10 -2
- package/optimize/es/components/form/form_row/form_row.js +10 -4
- package/optimize/es/components/form/range/dual_range.js +8 -2
- package/optimize/es/components/form/range/range.js +8 -2
- package/optimize/es/components/form/range/range_wrapper.js +11 -6
- package/optimize/es/components/form/select/select.js +28 -24
- package/optimize/es/components/form/super_select/super_select_control.js +26 -22
- package/optimize/es/components/form/text_area/text_area.js +19 -15
- package/optimize/es/components/icon/assets/filter.js +1 -2
- package/optimize/es/components/icon/assets/filterExclude.js +39 -0
- package/optimize/es/components/icon/assets/filterIgnore.js +34 -0
- package/optimize/es/components/icon/assets/filterInclude.js +34 -0
- package/optimize/es/components/icon/assets/indexTemporary.js +36 -0
- package/optimize/es/components/icon/assets/infinity.js +34 -0
- package/optimize/es/components/icon/assets/sortAscending.js +34 -0
- package/optimize/es/components/icon/assets/sortDescending.js +34 -0
- package/optimize/es/components/icon/icon_map.js +7 -0
- package/optimize/es/components/image/image_fullscreen_wrapper.js +3 -3
- package/optimize/es/components/overlay_mask/overlay_mask.js +8 -9
- package/optimize/es/components/overlay_mask/overlay_mask.styles.js +4 -14
- package/optimize/es/components/overlay_mask/overlay_mask_body.styles.js +18 -0
- package/optimize/es/components/page/page_section/page_section.js +4 -3
- package/optimize/es/components/pagination/pagination.js +4 -4
- package/optimize/es/components/provider/provider.js +1 -5
- package/optimize/es/components/resizable_container/helpers.js +2 -2
- package/optimize/es/components/resizable_container/resizable_container.js +73 -25
- package/optimize/es/components/resizable_container/resizable_container.styles.js +28 -0
- package/optimize/es/components/resizable_container/resizable_panel.js +25 -48
- package/optimize/es/components/resizable_container/resizable_panel.styles.js +69 -0
- package/optimize/es/components/search_bar/query/ast.js +14 -3
- package/optimize/es/components/tool_tip/tool_tip.js +3 -2
- package/optimize/es/components/tool_tip/tool_tip.styles.js +17 -22
- package/optimize/es/components/tool_tip/tool_tip_anchor.js +2 -2
- package/optimize/es/components/tool_tip/tool_tip_arrow.js +9 -3
- package/optimize/es/components/tool_tip/tool_tip_popover.js +7 -7
- package/optimize/es/components/tour/tour.styles.js +4 -3
- package/optimize/es/components/tour/tour_step.js +7 -5
- package/optimize/es/global_styling/functions/logicals.js +5 -3
- package/optimize/es/global_styling/functions/math.js +35 -17
- package/optimize/es/global_styling/mixins/_padding.js +13 -9
- package/optimize/lib/components/basic_table/in_memory_table.js +1 -1
- package/optimize/lib/components/breadcrumbs/breadcrumb.js +3 -2
- package/optimize/lib/components/breadcrumbs/breadcrumbs.js +7 -4
- package/optimize/lib/components/code/code.js +9 -3
- package/optimize/lib/components/code/code.styles.js +35 -0
- package/optimize/lib/components/code/code_block.js +71 -306
- package/optimize/lib/components/code/code_block.styles.js +156 -0
- package/optimize/lib/components/code/code_block_controls.js +48 -0
- package/optimize/lib/components/code/code_block_controls.styles.js +39 -0
- package/optimize/lib/components/code/code_block_copy.js +78 -0
- package/optimize/lib/components/code/code_block_full_screen.js +108 -0
- package/optimize/lib/components/code/code_block_line.styles.js +45 -0
- package/optimize/lib/components/code/code_block_overflow.js +82 -0
- package/optimize/lib/components/code/code_block_virtualized.js +81 -0
- package/optimize/lib/components/code/code_syntax.styles.js +57 -0
- package/optimize/lib/components/code/utils.js +40 -37
- package/optimize/lib/components/combo_box/combo_box.js +46 -10
- package/optimize/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +13 -6
- package/optimize/lib/components/combo_box/matching_options.js +64 -12
- package/optimize/lib/components/flex/flex_grid.js +21 -36
- package/optimize/lib/components/flex/flex_grid.styles.js +140 -0
- package/optimize/lib/components/flex/flex_group.js +13 -38
- package/optimize/lib/components/flex/flex_group.styles.js +205 -0
- package/optimize/lib/components/flex/flex_item.js +14 -17
- package/optimize/lib/components/flex/flex_item.styles.js +150 -0
- package/optimize/lib/components/flyout/flyout_body.js +2 -3
- package/optimize/lib/components/flyout/flyout_footer.js +2 -3
- package/optimize/lib/components/flyout/flyout_header.js +2 -3
- package/optimize/lib/components/form/described_form_group/described_form_group.js +23 -22
- package/optimize/lib/components/form/eui_form_context.js +28 -0
- package/optimize/lib/components/form/field_number/field_number.js +27 -22
- package/optimize/lib/components/form/field_password/field_password.js +24 -20
- package/optimize/lib/components/form/field_search/field_search.js +7 -2
- package/optimize/lib/components/form/field_text/field_text.js +23 -18
- package/optimize/lib/components/form/file_picker/file_picker.js +7 -1
- package/optimize/lib/components/form/form.js +14 -2
- package/optimize/lib/components/form/form_control_layout/form_control_layout.js +10 -2
- package/optimize/lib/components/form/form_row/form_row.js +9 -4
- package/optimize/lib/components/form/range/dual_range.js +7 -2
- package/optimize/lib/components/form/range/range.js +7 -2
- package/optimize/lib/components/form/range/range_wrapper.js +12 -6
- package/optimize/lib/components/form/select/select.js +29 -24
- package/optimize/lib/components/form/super_select/super_select_control.js +27 -22
- package/optimize/lib/components/form/text_area/text_area.js +20 -15
- package/optimize/lib/components/icon/assets/filter.js +1 -2
- package/optimize/lib/components/icon/assets/filterExclude.js +49 -0
- package/optimize/lib/components/icon/assets/filterIgnore.js +44 -0
- package/optimize/lib/components/icon/assets/filterInclude.js +44 -0
- package/optimize/lib/components/icon/assets/indexTemporary.js +46 -0
- package/optimize/lib/components/icon/assets/infinity.js +44 -0
- package/optimize/lib/components/icon/assets/sortAscending.js +44 -0
- package/optimize/lib/components/icon/assets/sortDescending.js +44 -0
- package/optimize/lib/components/icon/icon_map.js +7 -0
- package/optimize/lib/components/icon/svgs/filter.svg +1 -1
- package/optimize/lib/components/icon/svgs/filterExclude.svg +5 -0
- package/optimize/lib/components/icon/svgs/filterIgnore.svg +4 -0
- package/optimize/lib/components/icon/svgs/filterInclude.svg +5 -0
- package/optimize/lib/components/icon/svgs/indexTemporary.svg +4 -0
- package/optimize/lib/components/icon/svgs/infinity.svg +3 -0
- package/optimize/lib/components/icon/svgs/sortAscending.svg +3 -0
- package/optimize/lib/components/icon/svgs/sortDescending.svg +3 -0
- package/optimize/lib/components/image/image_fullscreen_wrapper.js +3 -3
- package/optimize/lib/components/overlay_mask/overlay_mask.js +9 -9
- package/optimize/lib/components/overlay_mask/overlay_mask.styles.js +13 -17
- package/optimize/lib/components/overlay_mask/overlay_mask_body.styles.js +20 -0
- package/optimize/lib/components/page/page_section/page_section.js +4 -3
- package/optimize/lib/components/pagination/pagination.js +4 -4
- package/optimize/lib/components/provider/provider.js +7 -12
- package/optimize/lib/components/resizable_container/helpers.js +2 -2
- package/optimize/lib/components/resizable_container/resizable_container.js +74 -25
- package/optimize/lib/components/resizable_container/resizable_container.styles.js +31 -0
- package/optimize/lib/components/resizable_container/resizable_panel.js +28 -49
- package/optimize/lib/components/resizable_container/resizable_panel.styles.js +76 -0
- package/optimize/lib/components/search_bar/query/ast.js +14 -3
- package/optimize/lib/components/tool_tip/tool_tip.js +3 -2
- package/optimize/lib/components/tool_tip/tool_tip.styles.js +18 -26
- package/optimize/lib/components/tool_tip/tool_tip_anchor.js +2 -2
- package/optimize/lib/components/tool_tip/tool_tip_arrow.js +10 -10
- package/optimize/lib/components/tool_tip/tool_tip_popover.js +6 -6
- package/optimize/lib/components/tour/tour.styles.js +3 -2
- package/optimize/lib/components/tour/tour_step.js +7 -5
- package/optimize/lib/global_styling/functions/logicals.js +4 -10
- package/optimize/lib/global_styling/functions/math.js +37 -19
- package/optimize/lib/global_styling/mixins/_padding.js +17 -10
- package/package.json +24 -21
- package/src/components/index.scss +0 -2
- package/src/components/resizable_container/_index.scss +0 -2
- package/src/global_styling/mixins/_header.scss +1 -1
- package/src/global_styling/variables/_index.scss +0 -1
- package/src/themes/amsterdam/overrides/_index.scss +0 -1
- 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 +15 -3
- package/test-env/components/breadcrumbs/breadcrumb.js +9 -5
- package/test-env/components/breadcrumbs/breadcrumbs.js +7 -4
- package/test-env/components/button/_button_content_deprecated.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/code/code.styles.js +35 -0
- package/test-env/components/code/code_block.styles.js +156 -0
- package/test-env/components/code/code_block_controls.js +48 -0
- package/test-env/components/code/code_block_controls.styles.js +39 -0
- package/test-env/components/code/code_block_copy.js +78 -0
- package/test-env/components/code/code_block_full_screen.js +108 -0
- package/test-env/components/code/code_block_line.styles.js +45 -0
- package/test-env/components/code/code_block_overflow.js +82 -0
- package/test-env/components/code/code_block_virtualized.js +81 -0
- package/test-env/components/code/code_syntax.styles.js +57 -0
- package/test-env/components/code/utils.js +40 -37
- package/test-env/components/collapsible_nav/collapsible_nav.js +0 -5
- package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/test-env/components/color_picker/color_palette_picker/color_palette_picker.js +18 -0
- package/test-env/components/combo_box/combo_box.js +51 -10
- package/test-env/components/combo_box/combo_box_options_list/combo_box_options_list.js +14 -6
- package/test-env/components/combo_box/matching_options.js +64 -12
- 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_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/flex/flex_grid.js +33 -42
- package/test-env/components/flex/flex_grid.styles.js +140 -0
- package/test-env/components/flex/flex_group.js +17 -42
- package/test-env/components/flex/flex_group.styles.js +205 -0
- package/test-env/components/flex/flex_item.js +20 -18
- package/test-env/components/flex/flex_item.styles.js +150 -0
- package/test-env/components/flyout/flyout_body.js +2 -3
- package/test-env/components/flyout/flyout_footer.js +2 -3
- package/test-env/components/flyout/flyout_header.js +2 -3
- package/test-env/components/form/described_form_group/described_form_group.js +29 -23
- package/test-env/components/form/eui_form_context.js +28 -0
- package/test-env/components/form/field_number/field_number.js +39 -23
- package/test-env/components/form/field_password/field_password.js +31 -20
- package/test-env/components/form/field_search/field_search.js +13 -2
- package/test-env/components/form/field_text/field_text.js +31 -20
- package/test-env/components/form/file_picker/file_picker.js +13 -1
- package/test-env/components/form/form.js +24 -3
- package/test-env/components/form/form_control_layout/form_control_layout.js +17 -3
- 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/form/form_row/form_row.js +21 -4
- package/test-env/components/form/range/dual_range.js +13 -2
- package/test-env/components/form/range/range.js +13 -2
- package/test-env/components/form/range/range_wrapper.js +17 -6
- package/test-env/components/form/select/select.js +41 -24
- package/test-env/components/form/super_select/super_select.js +18 -0
- package/test-env/components/form/super_select/super_select_control.js +27 -22
- package/test-env/components/form/text_area/text_area.js +27 -15
- 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.js +1 -1
- package/test-env/components/icon/assets/filter.js +1 -2
- package/test-env/components/icon/assets/filterExclude.js +49 -0
- package/test-env/components/icon/assets/filterIgnore.js +44 -0
- package/test-env/components/icon/assets/filterInclude.js +44 -0
- package/test-env/components/icon/assets/indexTemporary.js +46 -0
- package/test-env/components/icon/assets/infinity.js +44 -0
- package/test-env/components/icon/assets/sortAscending.js +44 -0
- package/test-env/components/icon/assets/sortDescending.js +44 -0
- package/test-env/components/icon/icon_map.js +7 -0
- package/test-env/components/image/image_fullscreen_wrapper.js +3 -3
- 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 +2 -2
- 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/overlay_mask/overlay_mask.js +9 -14
- package/test-env/components/overlay_mask/overlay_mask.styles.js +13 -17
- package/test-env/components/overlay_mask/overlay_mask_body.styles.js +20 -0
- package/test-env/components/page/page_header/page_header_content.js +1 -1
- package/test-env/components/page/page_section/page_section.js +4 -3
- package/test-env/components/pagination/pagination.js +4 -4
- package/test-env/components/provider/provider.js +7 -12
- package/test-env/components/resizable_container/helpers.js +2 -2
- package/test-env/components/resizable_container/resizable_container.js +84 -25
- package/test-env/components/resizable_container/resizable_container.styles.js +31 -0
- package/test-env/components/resizable_container/resizable_panel.js +28 -49
- package/test-env/components/resizable_container/resizable_panel.styles.js +76 -0
- package/test-env/components/search_bar/query/ast.js +14 -3
- package/test-env/components/search_bar/search_bar.js +6 -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/text.js +1 -0
- package/test-env/components/timeline/timeline_item_icon.js +1 -1
- package/test-env/components/toast/global_toast_list.js +1 -1
- package/test-env/components/toast/toast.js +1 -1
- package/test-env/components/tool_tip/icon_tip.js +1 -1
- package/test-env/components/tool_tip/tool_tip.js +3 -2
- package/test-env/components/tool_tip/tool_tip.styles.js +18 -26
- package/test-env/components/tool_tip/tool_tip_anchor.js +2 -2
- package/test-env/components/tool_tip/tool_tip_arrow.js +16 -11
- package/test-env/components/tool_tip/tool_tip_popover.js +6 -6
- package/test-env/components/tour/tour.styles.js +3 -2
- package/test-env/components/tour/tour_step.js +7 -5
- package/test-env/global_styling/functions/logicals.js +4 -10
- package/test-env/global_styling/functions/math.js +37 -19
- package/test-env/global_styling/mixins/_padding.js +17 -10
- package/src/components/code/_code.scss +0 -15
- package/src/components/code/_code_block.scss +0 -177
- package/src/components/code/_index.scss +0 -4
- package/src/components/code/_mixins.scss +0 -127
- package/src/components/code/_variables.scss +0 -5
- package/src/components/flex/_flex_grid.scss +0 -99
- package/src/components/flex/_flex_group.scss +0 -100
- package/src/components/flex/_flex_item.scss +0 -35
- package/src/components/flex/_index.scss +0 -3
- package/src/components/resizable_container/_resizable_container.scss +0 -8
- package/src/components/resizable_container/_resizable_panel.scss +0 -51
- package/src/global_styling/variables/_colors_code.scss +0 -23
- package/src/themes/amsterdam/overrides/_code.scss +0 -9
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
/*
|
|
4
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
5
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
6
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
7
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
8
|
+
* Side Public License, v 1.
|
|
9
|
+
*/
|
|
10
|
+
|
|
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
|
+
import { css } from '@emotion/react';
|
|
19
|
+
import { euiPaddingSize } from '../../global_styling';
|
|
20
|
+
import { euiCodeSyntaxColors } from './code_syntax.styles';
|
|
21
|
+
|
|
22
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
23
|
+
name: "to86kv-none",
|
|
24
|
+
styles: "inset-block-start:0;inset-inline-end:0;label:none;"
|
|
25
|
+
} : {
|
|
26
|
+
name: "to86kv-none",
|
|
27
|
+
styles: "inset-block-start:0;inset-inline-end:0;label:none;",
|
|
28
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export var euiCodeBlockControlsStyles = function euiCodeBlockControlsStyles(euiThemeContext) {
|
|
32
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
33
|
+
var euiCodeSyntax = euiCodeSyntaxColors(euiThemeContext);
|
|
34
|
+
return {
|
|
35
|
+
euiCodeBlock__controls: /*#__PURE__*/css("position:absolute;display:flex;flex-direction:column;gap:", euiTheme.size.xs, ";background:", euiCodeSyntax.backgroundColor, ";;label:euiCodeBlock__controls;"),
|
|
36
|
+
offset: {
|
|
37
|
+
none: _ref,
|
|
38
|
+
s: /*#__PURE__*/css("inset-block-start:", euiPaddingSize(euiThemeContext, 's'), ";inset-inline-end:", euiPaddingSize(euiThemeContext, 's'), ";;label:s;"),
|
|
39
|
+
m: /*#__PURE__*/css("inset-block-start:", euiPaddingSize(euiThemeContext, 'm'), ";inset-inline-end:", euiPaddingSize(euiThemeContext, 'm'), ";;label:m;"),
|
|
40
|
+
l: /*#__PURE__*/css("inset-block-start:", euiPaddingSize(euiThemeContext, 'l'), ";inset-inline-end:", euiPaddingSize(euiThemeContext, 'l'), ";;label:l;")
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
|
|
3
|
+
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."); }
|
|
4
|
+
|
|
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
|
+
|
|
7
|
+
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; }
|
|
8
|
+
|
|
9
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10
|
+
|
|
11
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
+
|
|
13
|
+
/*
|
|
14
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
15
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
16
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
17
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
18
|
+
* Side Public License, v 1.
|
|
19
|
+
*/
|
|
20
|
+
import React, { useMemo } from 'react';
|
|
21
|
+
import { useInnerText } from '../inner_text';
|
|
22
|
+
import { EuiCopy } from '../copy';
|
|
23
|
+
import { useEuiI18n } from '../i18n';
|
|
24
|
+
import { EuiButtonIcon } from '../button';
|
|
25
|
+
/**
|
|
26
|
+
* Hook that returns copy-related state/logic/utils
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
30
|
+
export var useCopy = function useCopy(_ref) {
|
|
31
|
+
var isCopyable = _ref.isCopyable,
|
|
32
|
+
isVirtualized = _ref.isVirtualized,
|
|
33
|
+
children = _ref.children;
|
|
34
|
+
|
|
35
|
+
var _useInnerText = useInnerText(''),
|
|
36
|
+
_useInnerText2 = _slicedToArray(_useInnerText, 2),
|
|
37
|
+
innerTextRef = _useInnerText2[0],
|
|
38
|
+
_innerText = _useInnerText2[1];
|
|
39
|
+
|
|
40
|
+
var innerText = useMemo(function () {
|
|
41
|
+
return (_innerText === null || _innerText === void 0 ? void 0 : _innerText.replace(/[\r\n?]{2}|\n\n/g, '\n')) || '';
|
|
42
|
+
}, [_innerText]);
|
|
43
|
+
var textToCopy = isVirtualized ? "".concat(children) : innerText; // Virtualized code blocks do not have inner text
|
|
44
|
+
|
|
45
|
+
var showCopyButton = isCopyable && textToCopy;
|
|
46
|
+
var copyAriaLabel = useEuiI18n('euiCodeBlockCopy.copy', 'Copy');
|
|
47
|
+
var copyButton = useMemo(function () {
|
|
48
|
+
return showCopyButton ? ___EmotionJSX("div", {
|
|
49
|
+
className: "euiCodeBlock__copyButton"
|
|
50
|
+
}, ___EmotionJSX(EuiCopy, {
|
|
51
|
+
textToCopy: textToCopy
|
|
52
|
+
}, function (copy) {
|
|
53
|
+
return ___EmotionJSX(EuiButtonIcon, {
|
|
54
|
+
onClick: copy,
|
|
55
|
+
iconType: "copyClipboard",
|
|
56
|
+
color: "text",
|
|
57
|
+
"aria-label": copyAriaLabel
|
|
58
|
+
});
|
|
59
|
+
})) : null;
|
|
60
|
+
}, [showCopyButton, textToCopy, copyAriaLabel]);
|
|
61
|
+
return {
|
|
62
|
+
innerTextRef: innerTextRef,
|
|
63
|
+
copyButton: copyButton
|
|
64
|
+
};
|
|
65
|
+
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
|
|
3
|
+
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."); }
|
|
4
|
+
|
|
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
|
+
|
|
7
|
+
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; }
|
|
8
|
+
|
|
9
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10
|
+
|
|
11
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
+
|
|
13
|
+
/*
|
|
14
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
15
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
16
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
17
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
18
|
+
* Side Public License, v 1.
|
|
19
|
+
*/
|
|
20
|
+
import React, { useState, useCallback, useMemo } from 'react';
|
|
21
|
+
import { keys, useEuiTheme } from '../../services';
|
|
22
|
+
import { useEuiI18n } from '../i18n';
|
|
23
|
+
import { EuiButtonIcon } from '../button';
|
|
24
|
+
import { EuiFocusTrap } from '../focus_trap';
|
|
25
|
+
import { EuiOverlayMask } from '../overlay_mask';
|
|
26
|
+
import { euiCodeBlockStyles } from './code_block.styles';
|
|
27
|
+
/**
|
|
28
|
+
* Hook that returns fullscreen-related state/logic/utils
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
32
|
+
export var useFullScreen = function useFullScreen(_ref) {
|
|
33
|
+
var overflowHeight = _ref.overflowHeight;
|
|
34
|
+
var showFullScreenButton = !!overflowHeight;
|
|
35
|
+
|
|
36
|
+
var _useState = useState(false),
|
|
37
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
38
|
+
isFullScreen = _useState2[0],
|
|
39
|
+
setIsFullScreen = _useState2[1];
|
|
40
|
+
|
|
41
|
+
var toggleFullScreen = useCallback(function () {
|
|
42
|
+
setIsFullScreen(function (isFullScreen) {
|
|
43
|
+
return !isFullScreen;
|
|
44
|
+
});
|
|
45
|
+
}, []);
|
|
46
|
+
var onKeyDown = useCallback(function (event) {
|
|
47
|
+
if (event.key === keys.ESCAPE) {
|
|
48
|
+
event.preventDefault();
|
|
49
|
+
event.stopPropagation();
|
|
50
|
+
setIsFullScreen(false);
|
|
51
|
+
}
|
|
52
|
+
}, []);
|
|
53
|
+
|
|
54
|
+
var _useEuiI18n = useEuiI18n(['euiCodeBlockFullScreen.fullscreenCollapse', 'euiCodeBlockFullScreen.fullscreenExpand'], ['Collapse', 'Expand']),
|
|
55
|
+
_useEuiI18n2 = _slicedToArray(_useEuiI18n, 2),
|
|
56
|
+
fullscreenCollapse = _useEuiI18n2[0],
|
|
57
|
+
fullscreenExpand = _useEuiI18n2[1];
|
|
58
|
+
|
|
59
|
+
var fullScreenButton = useMemo(function () {
|
|
60
|
+
return showFullScreenButton ? ___EmotionJSX(EuiButtonIcon, {
|
|
61
|
+
className: "euiCodeBlock__fullScreenButton",
|
|
62
|
+
onClick: toggleFullScreen,
|
|
63
|
+
iconType: isFullScreen ? 'fullScreenExit' : 'fullScreen',
|
|
64
|
+
color: "text",
|
|
65
|
+
"aria-label": isFullScreen ? fullscreenCollapse : fullscreenExpand
|
|
66
|
+
}) : null;
|
|
67
|
+
}, [showFullScreenButton, toggleFullScreen, isFullScreen, fullscreenCollapse, fullscreenExpand]);
|
|
68
|
+
return {
|
|
69
|
+
fullScreenButton: fullScreenButton,
|
|
70
|
+
isFullScreen: isFullScreen,
|
|
71
|
+
onKeyDown: onKeyDown
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Portalled full screen wrapper
|
|
76
|
+
*/
|
|
77
|
+
|
|
78
|
+
export var EuiCodeBlockFullScreenWrapper = function EuiCodeBlockFullScreenWrapper(_ref2) {
|
|
79
|
+
var children = _ref2.children;
|
|
80
|
+
var euiThemeContext = useEuiTheme();
|
|
81
|
+
var styles = euiCodeBlockStyles(euiThemeContext);
|
|
82
|
+
var cssStyles = [styles.euiCodeBlock, styles.l, // Force fullscreen to use large font
|
|
83
|
+
styles.isFullScreen];
|
|
84
|
+
return ___EmotionJSX(EuiOverlayMask, null, ___EmotionJSX(EuiFocusTrap, {
|
|
85
|
+
clickOutsideDisables: true
|
|
86
|
+
}, ___EmotionJSX("div", {
|
|
87
|
+
className: "euiCodeBlockFullScreen",
|
|
88
|
+
css: cssStyles
|
|
89
|
+
}, children)));
|
|
90
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
/*
|
|
4
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
5
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
6
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
7
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
8
|
+
* Side Public License, v 1.
|
|
9
|
+
*/
|
|
10
|
+
|
|
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
|
+
import { css } from '@emotion/css';
|
|
19
|
+
import { euiBackgroundColor } from '../../global_styling';
|
|
20
|
+
// Note: These styles must be in a separate file due to using `css` from `@emotion/css`
|
|
21
|
+
// (i.e., applying styles in vanilla JS / directly to DOM nodes instead of React)
|
|
22
|
+
export var euiCodeBlockLineStyles = function euiCodeBlockLineStyles(euiThemeContext) {
|
|
23
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
24
|
+
return {
|
|
25
|
+
euiCodeBlock__line: /*#__PURE__*/css(process.env.NODE_ENV === "production" ? {
|
|
26
|
+
name: "yn676d-euiCodeBlock__line",
|
|
27
|
+
styles: "display:block;label:euiCodeBlock__line;"
|
|
28
|
+
} : {
|
|
29
|
+
name: "yn676d-euiCodeBlock__line",
|
|
30
|
+
styles: "display:block;label:euiCodeBlock__line;",
|
|
31
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
32
|
+
}),
|
|
33
|
+
hasLineNumbers: /*#__PURE__*/css(process.env.NODE_ENV === "production" ? {
|
|
34
|
+
name: "156gjef-hasLineNumbers",
|
|
35
|
+
styles: "display:flex;user-select:none;label:hasLineNumbers;"
|
|
36
|
+
} : {
|
|
37
|
+
name: "156gjef-hasLineNumbers",
|
|
38
|
+
styles: "display:flex;user-select:none;label:hasLineNumbers;",
|
|
39
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
40
|
+
}),
|
|
41
|
+
lineText: {
|
|
42
|
+
euiCodeBlock__lineText: /*#__PURE__*/css("flex-grow:1;display:inline-block;padding-inline-start:", euiTheme.size.s, ";border-inline-start:", euiTheme.border.thin, ";user-select:text;;label:euiCodeBlock__lineText;"),
|
|
43
|
+
isHighlighted: /*#__PURE__*/css("background:", euiBackgroundColor(euiThemeContext, 'primary'), ";border-inline-start:", euiTheme.border.width.thick, " solid ", euiTheme.colors.primary, ";;label:isHighlighted;")
|
|
44
|
+
},
|
|
45
|
+
lineNumber: {
|
|
46
|
+
euiCodeBlock__lineNumber: /*#__PURE__*/css("flex-grow:0;flex-shrink:0;user-select:none;padding-inline-end:", euiTheme.size.s, ";box-sizing:content-box;&:before{content:attr(data-line-number);color:", euiTheme.colors.subduedText, ";text-align:end;display:block;};label:euiCodeBlock__lineNumber;")
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
+
|
|
3
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
|
+
|
|
5
|
+
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."); }
|
|
6
|
+
|
|
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
|
+
|
|
9
|
+
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; }
|
|
10
|
+
|
|
11
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
12
|
+
|
|
13
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
|
+
|
|
15
|
+
/*
|
|
16
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
17
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
18
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
19
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
20
|
+
* Side Public License, v 1.
|
|
21
|
+
*/
|
|
22
|
+
import { useEffect, useState, useMemo } from 'react';
|
|
23
|
+
import { useMutationObserver } from '../observer/mutation_observer';
|
|
24
|
+
import { useResizeObserver } from '../observer/resize_observer';
|
|
25
|
+
/**
|
|
26
|
+
* Overflow logic - returns overflow-related state/logic/utils
|
|
27
|
+
*
|
|
28
|
+
* Detects whether the code block overflows and returns a tabIndex of 0 if so,
|
|
29
|
+
* which allows keyboard users to use the up/down arrow keys to scroll through
|
|
30
|
+
* the container.
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
export var useOverflow = function useOverflow(_ref) {
|
|
34
|
+
var overflowHeight = _ref.overflowHeight;
|
|
35
|
+
|
|
36
|
+
var _useState = useState(null),
|
|
37
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
38
|
+
wrapperRef = _useState2[0],
|
|
39
|
+
setWrapperRef = _useState2[1];
|
|
40
|
+
|
|
41
|
+
var _useState3 = useState(-1),
|
|
42
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
43
|
+
tabIndex = _useState4[0],
|
|
44
|
+
setTabIndex = _useState4[1];
|
|
45
|
+
|
|
46
|
+
var _useResizeObserver = useResizeObserver(wrapperRef),
|
|
47
|
+
width = _useResizeObserver.width,
|
|
48
|
+
height = _useResizeObserver.height;
|
|
49
|
+
|
|
50
|
+
var doesOverflow = function doesOverflow() {
|
|
51
|
+
if (!wrapperRef) return;
|
|
52
|
+
var clientWidth = wrapperRef.clientWidth,
|
|
53
|
+
clientHeight = wrapperRef.clientHeight,
|
|
54
|
+
scrollWidth = wrapperRef.scrollWidth,
|
|
55
|
+
scrollHeight = wrapperRef.scrollHeight;
|
|
56
|
+
var doesOverflow = scrollHeight > clientHeight || scrollWidth > clientWidth;
|
|
57
|
+
setTabIndex(doesOverflow ? 0 : -1);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
useMutationObserver(wrapperRef, doesOverflow, {
|
|
61
|
+
subtree: true,
|
|
62
|
+
childList: true
|
|
63
|
+
});
|
|
64
|
+
useEffect(doesOverflow, [width, height, wrapperRef]);
|
|
65
|
+
var overflowHeightStyles = useMemo(function () {
|
|
66
|
+
if (overflowHeight) {
|
|
67
|
+
var property = typeof overflowHeight === 'string' ? 'blockSize' : 'maxBlockSize';
|
|
68
|
+
return _defineProperty({}, property, overflowHeight);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return {};
|
|
72
|
+
}, [overflowHeight]);
|
|
73
|
+
return {
|
|
74
|
+
setWrapperRef: setWrapperRef,
|
|
75
|
+
tabIndex: tabIndex,
|
|
76
|
+
overflowHeightStyles: overflowHeightStyles
|
|
77
|
+
};
|
|
78
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
5
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
6
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
7
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
8
|
+
* Side Public License, v 1.
|
|
9
|
+
*/
|
|
10
|
+
import React, { forwardRef, useMemo } from 'react';
|
|
11
|
+
import { FixedSizeList } from 'react-window';
|
|
12
|
+
import { EuiAutoSizer } from '../auto_sizer';
|
|
13
|
+
import { nodeToHtml } from './utils';
|
|
14
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
15
|
+
export var EuiCodeBlockVirtualized = function EuiCodeBlockVirtualized(_ref) {
|
|
16
|
+
var data = _ref.data,
|
|
17
|
+
rowHeight = _ref.rowHeight,
|
|
18
|
+
overflowHeight = _ref.overflowHeight,
|
|
19
|
+
preProps = _ref.preProps,
|
|
20
|
+
codeProps = _ref.codeProps;
|
|
21
|
+
var VirtualizedOuterElement = useMemo(function () {
|
|
22
|
+
return /*#__PURE__*/forwardRef(function (props, ref) {
|
|
23
|
+
return ___EmotionJSX("pre", _extends({}, props, {
|
|
24
|
+
ref: ref
|
|
25
|
+
}, preProps));
|
|
26
|
+
});
|
|
27
|
+
}, [preProps]);
|
|
28
|
+
var VirtualizedInnerElement = useMemo(function () {
|
|
29
|
+
return /*#__PURE__*/forwardRef(function (props, ref) {
|
|
30
|
+
return ___EmotionJSX("code", _extends({}, props, {
|
|
31
|
+
ref: ref
|
|
32
|
+
}, codeProps));
|
|
33
|
+
});
|
|
34
|
+
}, [codeProps]);
|
|
35
|
+
return ___EmotionJSX(EuiAutoSizer, {
|
|
36
|
+
disableHeight: typeof overflowHeight === 'number'
|
|
37
|
+
}, function (_ref2) {
|
|
38
|
+
var height = _ref2.height,
|
|
39
|
+
width = _ref2.width;
|
|
40
|
+
return ___EmotionJSX(FixedSizeList, {
|
|
41
|
+
height: height !== null && height !== void 0 ? height : overflowHeight,
|
|
42
|
+
width: width,
|
|
43
|
+
itemData: data,
|
|
44
|
+
itemSize: rowHeight,
|
|
45
|
+
itemCount: data.length,
|
|
46
|
+
outerElementType: VirtualizedOuterElement,
|
|
47
|
+
innerElementType: VirtualizedInnerElement
|
|
48
|
+
}, ListRow);
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
var ListRow = function ListRow(_ref3) {
|
|
53
|
+
var data = _ref3.data,
|
|
54
|
+
index = _ref3.index,
|
|
55
|
+
style = _ref3.style;
|
|
56
|
+
var row = data[index];
|
|
57
|
+
row.properties.style = style;
|
|
58
|
+
return nodeToHtml(row, index, data, 0);
|
|
59
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
import { makeHighContrastColor, euiPaletteColorBlind } from '../../services';
|
|
9
|
+
var visColors = euiPaletteColorBlind();
|
|
10
|
+
export var euiCodeSyntaxColors = function euiCodeSyntaxColors(euiThemeContext) {
|
|
11
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
12
|
+
var backgroundColor = euiTheme.colors.lightestShade;
|
|
13
|
+
return {
|
|
14
|
+
backgroundColor: backgroundColor,
|
|
15
|
+
color: makeHighContrastColor(euiTheme.colors.text)(backgroundColor),
|
|
16
|
+
inlineCodeColor: makeHighContrastColor(visColors[3])(backgroundColor),
|
|
17
|
+
selectedBackgroundColor: 'inherit',
|
|
18
|
+
commentColor: makeHighContrastColor(euiTheme.colors.subduedText)(backgroundColor),
|
|
19
|
+
selectorTagColor: 'inherit',
|
|
20
|
+
stringColor: makeHighContrastColor(visColors[2])(backgroundColor),
|
|
21
|
+
tagColor: makeHighContrastColor(visColors[1])(backgroundColor),
|
|
22
|
+
nameColor: makeHighContrastColor(visColors[1])(backgroundColor),
|
|
23
|
+
numberColor: makeHighContrastColor(visColors[0])(backgroundColor),
|
|
24
|
+
keywordColor: makeHighContrastColor(visColors[3])(backgroundColor),
|
|
25
|
+
functionTitleColor: 'inherit',
|
|
26
|
+
typeColor: makeHighContrastColor(visColors[1])(backgroundColor),
|
|
27
|
+
attributeColor: 'inherit',
|
|
28
|
+
symbolColor: makeHighContrastColor(visColors[9])(backgroundColor),
|
|
29
|
+
paramsColor: 'inherit',
|
|
30
|
+
metaColor: makeHighContrastColor(euiTheme.colors.subduedText)(backgroundColor),
|
|
31
|
+
titleColor: makeHighContrastColor(visColors[7])(backgroundColor),
|
|
32
|
+
sectionColor: makeHighContrastColor(visColors[9])(backgroundColor),
|
|
33
|
+
additionColor: makeHighContrastColor(visColors[0])(backgroundColor),
|
|
34
|
+
deletionColor: makeHighContrastColor(euiTheme.colors.danger)(backgroundColor),
|
|
35
|
+
selectorClassColor: 'inherit',
|
|
36
|
+
selectorIdColor: 'inherit'
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export var euiCodeSyntaxTokens = function euiCodeSyntaxTokens(euiThemeContext) {
|
|
40
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
41
|
+
var euiCodeBlock = euiCodeSyntaxColors(euiThemeContext);
|
|
42
|
+
return "\n .token.punctuation:not(.interpolation-punctuation):not([class*='attr-']) {\n opacity: .7;\n }\n \n .token.comment,\n .token.prolog,\n .token.doctype,\n .token.cdata,\n .token.coord,\n .token.blockquote {\n color: ".concat(euiCodeBlock.commentColor, ";\n font-style: italic;\n }\n \n .token.selector {\n color: ").concat(euiCodeBlock.selectorTagColor, ";\n }\n \n .token.string,\n .token.interpolation,\n .token.interpolation-punctuation,\n .token.doc-comment .token.keyword,\n .token.attr-value,\n .token.url .token.content {\n color: ").concat(euiCodeBlock.stringColor, ";\n }\n \n .token.number,\n .token.boolean,\n .token.keyword.nil,\n .token.regex,\n .token.variable,\n .token.unit,\n .token.hexcode,\n .token.attr-name,\n .token.attr-equals {\n color: ").concat(euiCodeBlock.numberColor, ";\n }\n \n .token.atrule .token.rule,\n .token.keyword {\n color: ").concat(euiCodeBlock.keywordColor, ";\n }\n \n .token.function {\n color: ").concat(euiCodeBlock.functionTitleColor, ";\n }\n \n .token.tag {\n color: ").concat(euiCodeBlock.tagColor, ";\n }\n \n .token.class-name {\n color: ").concat(euiCodeBlock.typeColor, ";\n }\n \n .token.property {\n color: ").concat(euiCodeBlock.attributeColor, ";\n }\n \n .token.console,\n .token.list-punctuation,\n .token.url-reference,\n .token.url .token.url {\n color: ").concat(euiCodeBlock.symbolColor, ";\n }\n \n .token.paramater {\n color: ").concat(euiCodeBlock.paramsColor, ";\n }\n \n .token.meta,\n .token.important {\n color: ").concat(euiCodeBlock.metaColor, ";\n }\n \n .token.title {\n color: ").concat(euiCodeBlock.titleColor, ";\n }\n \n .token.section {\n color: ").concat(euiCodeBlock.sectionColor, ";\n }\n \n .token.prefix.inserted,\n .token.prefix.deleted {\n padding-inline-start: -").concat(euiTheme.size.xs, ";\n margin-inline-start: -").concat(euiTheme.size.xs, ";\n }\n \n .token.prefix.inserted {\n box-shadow: -").concat(euiTheme.size.xs, " 0 ").concat(euiCodeBlock.additionColor, ";\n color: ").concat(euiCodeBlock.additionColor, ";\n }\n \n .token.prefix.deleted {\n box-shadow: -").concat(euiTheme.size.xs, " 0 ").concat(euiCodeBlock.deletionColor, ";\n color: ").concat(euiCodeBlock.deletionColor, ";\n }\n \n .token.selector .token.class {\n color: ").concat(euiCodeBlock.selectorClassColor, ";\n }\n \n .token.selector .token.id {\n color: ").concat(euiCodeBlock.selectorIdColor, ";\n }\n \n .token.italic {\n font-style: italic;\n }\n \n .token.important,\n .token.bold {\n font-weight: $euiCodeFontWeightBold;\n }\n \n .token.url-reference,\n .token.url .token.url {\n text-decoration: underline;\n }\n \n .token.entity {\n cursor: help;\n }\n ");
|
|
43
|
+
};
|
|
@@ -13,7 +13,12 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
13
13
|
*/
|
|
14
14
|
import React, { createElement } from 'react';
|
|
15
15
|
import { listLanguages, highlight } from 'refractor';
|
|
16
|
-
import
|
|
16
|
+
import { cx } from '@emotion/css';
|
|
17
|
+
import { euiCodeBlockLineStyles } from './code_block_line.styles';
|
|
18
|
+
/**
|
|
19
|
+
* Utils shared between EuiCode and EuiCodeBlock
|
|
20
|
+
*/
|
|
21
|
+
|
|
17
22
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
18
23
|
export var SUPPORTED_LANGUAGES = listLanguages();
|
|
19
24
|
export var DEFAULT_LANGUAGE = 'text';
|
|
@@ -40,7 +45,7 @@ export var nodeToHtml = function nodeToHtml(node, idx, nodes) {
|
|
|
40
45
|
children = node.children;
|
|
41
46
|
return /*#__PURE__*/createElement(tagName, _objectSpread(_objectSpread({}, properties), {}, {
|
|
42
47
|
key: key,
|
|
43
|
-
className:
|
|
48
|
+
className: cx(properties.className)
|
|
44
49
|
}), children && children.map(function (el, i) {
|
|
45
50
|
return nodeToHtml(el, i, nodes, depth + 1);
|
|
46
51
|
}));
|
|
@@ -55,8 +60,7 @@ export var nodeToHtml = function nodeToHtml(node, idx, nodes) {
|
|
|
55
60
|
*/
|
|
56
61
|
|
|
57
62
|
// Approximate width of a single digit/character
|
|
58
|
-
var CHAR_SIZE = 8;
|
|
59
|
-
var $euiSizeS = 8; // Creates an array of numbers from comma-separeated
|
|
63
|
+
var CHAR_SIZE = 8; // Creates an array of numbers from comma-separeated
|
|
60
64
|
// string of numbers or number ranges using `-`
|
|
61
65
|
// (e.g., "1, 3-10, 15")
|
|
62
66
|
|
|
@@ -129,8 +133,7 @@ var addLineData = function addLineData(nodes, data) {
|
|
|
129
133
|
}, []);
|
|
130
134
|
};
|
|
131
135
|
|
|
132
|
-
function wrapLines(nodes, options) {
|
|
133
|
-
var highlights = options.highlight ? parseLineRanges(options.highlight) : [];
|
|
136
|
+
function wrapLines(nodes, options, euiTheme) {
|
|
134
137
|
var grouped = [];
|
|
135
138
|
nodes.forEach(function (node) {
|
|
136
139
|
var lineStart = node.lineStart - 1;
|
|
@@ -142,41 +145,44 @@ function wrapLines(nodes, options) {
|
|
|
142
145
|
}
|
|
143
146
|
});
|
|
144
147
|
var wrapped = [];
|
|
145
|
-
var digits = grouped.length.toString().length;
|
|
146
|
-
var width = digits * CHAR_SIZE;
|
|
147
148
|
grouped.forEach(function (node, i) {
|
|
148
|
-
var
|
|
149
|
-
|
|
150
|
-
var
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
149
|
+
var children = node;
|
|
150
|
+
var styles = euiCodeBlockLineStyles(euiTheme);
|
|
151
|
+
var lineStyles = cx([styles.euiCodeBlock__line, options.showLineNumbers && styles.hasLineNumbers]);
|
|
152
|
+
|
|
153
|
+
if (options.showLineNumbers) {
|
|
154
|
+
var _properties;
|
|
155
|
+
|
|
156
|
+
var lineNumber = i + 1;
|
|
157
|
+
var digits = grouped.length.toString().length;
|
|
158
|
+
var width = digits * CHAR_SIZE;
|
|
159
|
+
var highlights = options.highlight ? parseLineRanges(options.highlight) : [];
|
|
160
|
+
var lineTextStyles = cx([styles.lineText.euiCodeBlock__lineText, highlights.includes(lineNumber) && styles.lineText.isHighlighted]);
|
|
161
|
+
var lineNumberStyles = cx(styles.lineNumber.euiCodeBlock__lineNumber);
|
|
162
|
+
children = [{
|
|
163
|
+
type: 'element',
|
|
164
|
+
tagName: 'span',
|
|
165
|
+
properties: (_properties = {
|
|
166
|
+
style: {
|
|
167
|
+
inlineSize: width
|
|
168
|
+
}
|
|
169
|
+
}, _defineProperty(_properties, 'data-line-number', lineNumber), _defineProperty(_properties, 'aria-hidden', true), _defineProperty(_properties, "className", ['euiCodeBlock__lineNumber', lineNumberStyles]), _properties),
|
|
170
|
+
children: []
|
|
171
|
+
}, {
|
|
172
|
+
type: 'element',
|
|
173
|
+
tagName: 'span',
|
|
174
|
+
properties: {
|
|
175
|
+
className: ['euiCodeBlock__lineText', lineTextStyles]
|
|
170
176
|
},
|
|
171
|
-
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
|
|
177
|
+
children: node
|
|
178
|
+
}];
|
|
179
|
+
}
|
|
180
|
+
|
|
175
181
|
wrapped.push({
|
|
176
182
|
type: 'element',
|
|
177
183
|
tagName: 'span',
|
|
178
184
|
properties: {
|
|
179
|
-
className: [
|
|
185
|
+
className: ['euiCodeBlock__line', lineStyles]
|
|
180
186
|
},
|
|
181
187
|
children: children
|
|
182
188
|
});
|
|
@@ -184,11 +190,11 @@ function wrapLines(nodes, options) {
|
|
|
184
190
|
return wrapped;
|
|
185
191
|
}
|
|
186
192
|
|
|
187
|
-
export var highlightByLine = function highlightByLine(children, language, data) {
|
|
193
|
+
export var highlightByLine = function highlightByLine(children, language, data, euiTheme) {
|
|
188
194
|
return wrapLines(addLineData(highlight(children, language), {
|
|
189
195
|
lineNumber: data.start
|
|
190
196
|
}), {
|
|
191
197
|
showLineNumbers: data.show,
|
|
192
198
|
highlight: data.highlight
|
|
193
|
-
});
|
|
199
|
+
}, euiTheme);
|
|
194
200
|
};
|
|
@@ -187,11 +187,6 @@ EuiCollapsibleNav.propTypes = {
|
|
|
187
187
|
* Adjustments to the EuiOverlayMask that is added when `ownFocus = true`
|
|
188
188
|
*/
|
|
189
189
|
maskProps: PropTypes.shape({
|
|
190
|
-
className: PropTypes.string,
|
|
191
|
-
"aria-label": PropTypes.string,
|
|
192
|
-
"data-test-subj": PropTypes.string,
|
|
193
|
-
css: PropTypes.any,
|
|
194
|
-
|
|
195
190
|
/**
|
|
196
191
|
* ReactNode to render as this component's content
|
|
197
192
|
*/
|
|
@@ -115,7 +115,7 @@ EuiCollapsibleNavGroup.propTypes = {
|
|
|
115
115
|
/**
|
|
116
116
|
* Sits left of the `title` and only when `title` is present
|
|
117
117
|
*/
|
|
118
|
-
iconType: PropTypes.oneOfType([PropTypes.oneOf(["accessibility", "addDataApp", "advancedSettingsApp", "agentApp", "aggregate", "alert", "analyzeEvent", "annotation", "apmApp", "apmTrace", "appSearchApp", "apps", "arrowDown", "arrowLeft", "arrowRight", "arrowUp", "arrowStart", "arrowEnd", "asterisk", "auditbeatApp", "beaker", "bell", "bellSlash", "beta", "bolt", "boxesHorizontal", "boxesVertical", "branch", "branchUser", "broom", "brush", "bug", "bullseye", "calendar", "canvasApp", "casesApp", "check", "checkInCircleFilled", "cheer", "classificationJob", "clock", "cloudDrizzle", "cloudStormy", "cloudSunny", "cluster", "codeApp", "color", "compute", "console", "consoleApp", "container", "continuityAbove", "continuityAboveBelow", "continuityBelow", "continuityWithin", "controlsHorizontal", "controlsVertical", "copy", "copyClipboard", "createAdvancedJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crossInACircleFilled", "crosshairs", "currency", "cut", "dashboardApp", "dataVisualizer", "database", "desktop", "devToolsApp", "discoverApp", "document", "documentEdit", "documentation", "documents", "dot", "doubleArrowLeft", "doubleArrowRight", "download", "editorAlignCenter", "editorAlignLeft", "editorAlignRight", "editorBold", "editorChecklist", "editorCodeBlock", "editorComment", "editorDistributeHorizontal", "editorDistributeVertical", "editorHeading", "editorItalic", "editorItemAlignBottom", "editorItemAlignCenter", "editorItemAlignLeft", "editorItemAlignMiddle", "editorItemAlignRight", "editorItemAlignTop", "editorLink", "editorOrderedList", "editorPositionBottomLeft", "editorPositionBottomRight", "editorPositionTopLeft", "editorPositionTopRight", "editorRedo", "editorStrike", "editorTable", "editorUnderline", "editorUndo", "editorUnorderedList", "email", "empty", "emsApp", "eql", "eraser", "exit", "expand", "expandMini", "exportAction", "eye", "eyeClosed", "faceHappy", "faceNeutral", "faceSad", "filebeatApp", "filter", "flag", "fleetApp", "fold", "folderCheck", "folderClosed", "folderExclamation", "folderOpen", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "function", "gear", "gisApp", "glasses", "globe", "grab", "grabHorizontal", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "heatmap", "help", "home", "iInCircle", "image", "importAction", "indexClose", "indexEdit", "indexFlush", "indexManagementApp", "indexMapping", "indexOpen", "indexPatternApp", "indexRollupApp", "indexRuntime", "indexSettings", "inputOutput", "inspect", "invert", "ip", "keyboard", "kqlField", "kqlFunction", "kqlOperand", "kqlSelector", "kqlValue", "kubernetesNode", "kubernetesPod", "launch", "layers", "lensApp", "lettering", "lineDashed", "lineDotted", "lineSolid", "link", "list", "listAdd", "lock", "lockOpen", "logoAWS", "logoAWSMono", "logoAerospike", "logoApache", "logoAppSearch", "logoAzure", "logoAzureMono", "logoBeats", "logoBusinessAnalytics", "logoCeph", "logoCloud", "logoCloudEnterprise", "logoCode", "logoCodesandbox", "logoCouchbase", "logoDocker", "logoDropwizard", "logoElastic", "logoElasticStack", "logoElasticsearch", "logoEnterpriseSearch", "logoEtcd", "logoGCP", "logoGCPMono", "logoGithub", "logoGmail", "logoGolang", "logoGoogleG", "logoHAproxy", "logoIBM", "logoIBMMono", "logoKafka", "logoKibana", "logoKubernetes", "logoLogging", "logoLogstash", "logoMaps", "logoMemcached", "logoMetrics", "logoMongodb", "logoMySQL", "logoNginx", "logoObservability", "logoOsquery", "logoPhp", "logoPostgres", "logoPrometheus", "logoRabbitmq", "logoRedis", "logoSecurity", "logoSiteSearch", "logoSketch", "logoSlack", "logoUptime", "logoWebhook", "logoWindows", "logoWorkplaceSearch", "logsApp", "logstashFilter", "logstashIf", "logstashInput", "logstashOutput", "logstashQueue", "machineLearningApp", "magnet", "magnifyWithExclamation", "magnifyWithMinus", "magnifyWithPlus", "managementApp", "mapMarker", "memory", "menu", "menuDown", "menuLeft", "menuRight", "menuUp", "merge", "metricbeatApp", "metricsApp", "minimize", "minus", "minusInCircle", "minusInCircleFilled", "mobile", "monitoringApp", "moon", "namespace", "nested", "node", "notebookApp", "number", "offline", "online", "outlierDetectionJob", "package", "packetbeatApp", "pageSelect", "pagesSelect", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFilled", "pipelineApp", "play", "playFilled", "plus", "plusInCircle", "plusInCircleFilled", "popout", "push", "questionInCircle", "quote", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "returnKey", "save", "savedObjectsApp", "scale", "search", "searchProfilerApp", "securityAnalyticsApp", "securityApp", "securitySignal", "securitySignalDetected", "securitySignalResolved", "sessionViewer", "shard", "share", "snowflake", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spaces", "spacesApp", "sqlApp", "starEmpty", "starEmptySpace", "starFilled", "starFilledSpace", "starMinusEmpty", "starMinusFilled", "starPlusEmpty", "starPlusFilled", "stats", "stop", "stopFilled", "stopSlash", "storage", "string", "submodule", "sun", "swatchInput", "symlink", "tableDensityCompact", "tableDensityExpanded", "tableDensityNormal", "tableOfContents", "tag", "tear", "temperature", "timeline", "timelionApp", "timeRefresh", "timeslider", "training", "trash", "unfold", "unlink", "upgradeAssistantApp", "uptimeApp", "user", "userAvatar", "users", "usersRolesApp", "vector", "videoPlayer", "visArea", "visAreaStacked", "visBarHorizontal", "visBarHorizontalStacked", "visBarVertical", "visBarVerticalStacked", "visGauge", "visGoal", "visLine", "visMapCoordinate", "visMapRegion", "visMetric", "visPie", "visTable", "visTagCloud", "visText", "visTimelion", "visVega", "visVisualBuilder", "visualizeApp", "watchesApp", "wordWrap", "wordWrapDisabled", "workplaceSearchApp", "wrench", "tokenAlias", "tokenAnnotation", "tokenArray", "tokenBinary", "tokenBoolean", "tokenClass", "tokenCompletionSuggester", "tokenConstant", "tokenDate", "tokenDenseVector", "tokenElement", "tokenEnum", "tokenEnumMember", "tokenEvent", "tokenException", "tokenField", "tokenFile", "tokenFlattened", "tokenFunction", "tokenGeo", "tokenHistogram", "tokenInterface", "tokenIP", "tokenJoin", "tokenKey", "tokenKeyword", "tokenMethod", "tokenMetricCounter", "tokenMetricGauge", "tokenModule", "tokenNamespace", "tokenNested", "tokenNull", "tokenNumber", "tokenObject", "tokenOperator", "tokenPackage", "tokenParameter", "tokenPercolator", "tokenProperty", "tokenRange", "tokenRankFeature", "tokenRankFeatures", "tokenRepo", "tokenSearchType", "tokenShape", "tokenString", "tokenStruct", "tokenSymbol", "tokenTag", "tokenText", "tokenTokenCount", "tokenVariable"]).isRequired, PropTypes.string.isRequired, PropTypes.elementType.isRequired]),
|
|
118
|
+
iconType: PropTypes.oneOfType([PropTypes.oneOf(["accessibility", "addDataApp", "advancedSettingsApp", "agentApp", "aggregate", "alert", "analyzeEvent", "annotation", "apmApp", "apmTrace", "appSearchApp", "apps", "arrowDown", "arrowLeft", "arrowRight", "arrowUp", "arrowStart", "arrowEnd", "asterisk", "auditbeatApp", "beaker", "bell", "bellSlash", "beta", "bolt", "boxesHorizontal", "boxesVertical", "branch", "branchUser", "broom", "brush", "bug", "bullseye", "calendar", "canvasApp", "casesApp", "check", "checkInCircleFilled", "cheer", "classificationJob", "clock", "cloudDrizzle", "cloudStormy", "cloudSunny", "cluster", "codeApp", "color", "compute", "console", "consoleApp", "container", "continuityAbove", "continuityAboveBelow", "continuityBelow", "continuityWithin", "controlsHorizontal", "controlsVertical", "copy", "copyClipboard", "createAdvancedJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crossInACircleFilled", "crosshairs", "currency", "cut", "dashboardApp", "dataVisualizer", "database", "desktop", "devToolsApp", "discoverApp", "document", "documentEdit", "documentation", "documents", "dot", "doubleArrowLeft", "doubleArrowRight", "download", "editorAlignCenter", "editorAlignLeft", "editorAlignRight", "editorBold", "editorChecklist", "editorCodeBlock", "editorComment", "editorDistributeHorizontal", "editorDistributeVertical", "editorHeading", "editorItalic", "editorItemAlignBottom", "editorItemAlignCenter", "editorItemAlignLeft", "editorItemAlignMiddle", "editorItemAlignRight", "editorItemAlignTop", "editorLink", "editorOrderedList", "editorPositionBottomLeft", "editorPositionBottomRight", "editorPositionTopLeft", "editorPositionTopRight", "editorRedo", "editorStrike", "editorTable", "editorUnderline", "editorUndo", "editorUnorderedList", "email", "empty", "emsApp", "eql", "eraser", "exit", "expand", "expandMini", "exportAction", "eye", "eyeClosed", "faceHappy", "faceNeutral", "faceSad", "filebeatApp", "filter", "filterExclude", "filterIgnore", "filterInclude", "flag", "fleetApp", "fold", "folderCheck", "folderClosed", "folderExclamation", "folderOpen", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "function", "gear", "gisApp", "glasses", "globe", "grab", "grabHorizontal", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "heatmap", "help", "home", "iInCircle", "image", "importAction", "indexClose", "indexEdit", "indexFlush", "indexManagementApp", "indexMapping", "indexOpen", "indexPatternApp", "indexRollupApp", "indexRuntime", "indexSettings", "indexTemporary", "infinity", "inputOutput", "inspect", "invert", "ip", "keyboard", "kqlField", "kqlFunction", "kqlOperand", "kqlSelector", "kqlValue", "kubernetesNode", "kubernetesPod", "launch", "layers", "lensApp", "lettering", "lineDashed", "lineDotted", "lineSolid", "link", "list", "listAdd", "lock", "lockOpen", "logoAWS", "logoAWSMono", "logoAerospike", "logoApache", "logoAppSearch", "logoAzure", "logoAzureMono", "logoBeats", "logoBusinessAnalytics", "logoCeph", "logoCloud", "logoCloudEnterprise", "logoCode", "logoCodesandbox", "logoCouchbase", "logoDocker", "logoDropwizard", "logoElastic", "logoElasticStack", "logoElasticsearch", "logoEnterpriseSearch", "logoEtcd", "logoGCP", "logoGCPMono", "logoGithub", "logoGmail", "logoGolang", "logoGoogleG", "logoHAproxy", "logoIBM", "logoIBMMono", "logoKafka", "logoKibana", "logoKubernetes", "logoLogging", "logoLogstash", "logoMaps", "logoMemcached", "logoMetrics", "logoMongodb", "logoMySQL", "logoNginx", "logoObservability", "logoOsquery", "logoPhp", "logoPostgres", "logoPrometheus", "logoRabbitmq", "logoRedis", "logoSecurity", "logoSiteSearch", "logoSketch", "logoSlack", "logoUptime", "logoWebhook", "logoWindows", "logoWorkplaceSearch", "logsApp", "logstashFilter", "logstashIf", "logstashInput", "logstashOutput", "logstashQueue", "machineLearningApp", "magnet", "magnifyWithExclamation", "magnifyWithMinus", "magnifyWithPlus", "managementApp", "mapMarker", "memory", "menu", "menuDown", "menuLeft", "menuRight", "menuUp", "merge", "metricbeatApp", "metricsApp", "minimize", "minus", "minusInCircle", "minusInCircleFilled", "mobile", "monitoringApp", "moon", "namespace", "nested", "node", "notebookApp", "number", "offline", "online", "outlierDetectionJob", "package", "packetbeatApp", "pageSelect", "pagesSelect", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFilled", "pipelineApp", "play", "playFilled", "plus", "plusInCircle", "plusInCircleFilled", "popout", "push", "questionInCircle", "quote", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "returnKey", "save", "savedObjectsApp", "scale", "search", "searchProfilerApp", "securityAnalyticsApp", "securityApp", "securitySignal", "securitySignalDetected", "securitySignalResolved", "sessionViewer", "shard", "share", "snowflake", "sortAscending", "sortDescending", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spaces", "spacesApp", "sqlApp", "starEmpty", "starEmptySpace", "starFilled", "starFilledSpace", "starMinusEmpty", "starMinusFilled", "starPlusEmpty", "starPlusFilled", "stats", "stop", "stopFilled", "stopSlash", "storage", "string", "submodule", "sun", "swatchInput", "symlink", "tableDensityCompact", "tableDensityExpanded", "tableDensityNormal", "tableOfContents", "tag", "tear", "temperature", "timeline", "timelionApp", "timeRefresh", "timeslider", "training", "trash", "unfold", "unlink", "upgradeAssistantApp", "uptimeApp", "user", "userAvatar", "users", "usersRolesApp", "vector", "videoPlayer", "visArea", "visAreaStacked", "visBarHorizontal", "visBarHorizontalStacked", "visBarVertical", "visBarVerticalStacked", "visGauge", "visGoal", "visLine", "visMapCoordinate", "visMapRegion", "visMetric", "visPie", "visTable", "visTagCloud", "visText", "visTimelion", "visVega", "visVisualBuilder", "visualizeApp", "watchesApp", "wordWrap", "wordWrapDisabled", "workplaceSearchApp", "wrench", "tokenAlias", "tokenAnnotation", "tokenArray", "tokenBinary", "tokenBoolean", "tokenClass", "tokenCompletionSuggester", "tokenConstant", "tokenDate", "tokenDenseVector", "tokenElement", "tokenEnum", "tokenEnumMember", "tokenEvent", "tokenException", "tokenField", "tokenFile", "tokenFlattened", "tokenFunction", "tokenGeo", "tokenHistogram", "tokenInterface", "tokenIP", "tokenJoin", "tokenKey", "tokenKeyword", "tokenMethod", "tokenMetricCounter", "tokenMetricGauge", "tokenModule", "tokenNamespace", "tokenNested", "tokenNull", "tokenNumber", "tokenObject", "tokenOperator", "tokenPackage", "tokenParameter", "tokenPercolator", "tokenProperty", "tokenRange", "tokenRankFeature", "tokenRankFeatures", "tokenRepo", "tokenSearchType", "tokenShape", "tokenString", "tokenStruct", "tokenSymbol", "tokenTag", "tokenText", "tokenTokenCount", "tokenVariable"]).isRequired, PropTypes.string.isRequired, PropTypes.elementType.isRequired]),
|
|
119
119
|
|
|
120
120
|
/**
|
|
121
121
|
* Change the size of the icon in the `title`
|