From eb39e4d19a47a937a98e442e5000a17c02011a9c Mon Sep 17 00:00:00 2001 From: Dave Snider Date: Sun, 1 Nov 2020 21:36:57 -0800 Subject: [PATCH 1/2] Remove KUI from Kibana --- .eslintignore | 1 - .eslintrc.js | 4 - package.json | 5 - packages/kbn-ui-framework/Gruntfile.js | 239 -- packages/kbn-ui-framework/README.md | 24 - packages/kbn-ui-framework/components/index.js | 20 - packages/kbn-ui-framework/dist/kui_dark.css | 2470 ----------------- packages/kbn-ui-framework/dist/kui_light.css | 2470 ----------------- .../doc_site/build/index.html | 13 - .../doc_site/src/actions/action_types.js | 34 - .../src/actions/code_viewer_actions.js | 30 - .../src/actions/example_nav_actions.js | 31 - .../doc_site/src/actions/index.js | 24 - .../doc_site/src/actions/sandbox_actions.js | 28 - .../doc_site/src/components/guide/_guide.scss | 108 - .../components/guide_code/_guide_code.scss | 6 - .../src/components/guide_code/guide_code.js | 22 - .../guide_code_viewer/_guide_code_viewer.scss | 113 - .../guide_code_viewer/guide_code_viewer.js | 89 - .../src/components/guide_components.scss | 62 - .../components/guide_demo/_guide_demo.scss | 23 - .../src/components/guide_demo/guide_demo.js | 91 - .../components/guide_link/_guide_link.scss | 9 - .../src/components/guide_link/guide_link.js | 26 - .../src/components/guide_nav/_guide_nav.scss | 204 -- .../src/components/guide_nav/guide_nav.js | 212 -- .../components/guide_page/_guide_page.scss | 42 - .../src/components/guide_page/guide_page.js | 79 - .../guide_page/guide_page_container.js | 28 - .../_guide_page_side_nav.scss | 44 - .../guide_page_side_nav.js | 36 - .../guide_page_side_nav_item.js | 49 - .../guide_sandbox/_guide_sandbox.scss | 10 - .../components/guide_sandbox/guide_sandbox.js | 63 - .../guide_sandbox_code_toggle.js | 49 - .../guide_sandbox_code_toggle_container.js | 27 - .../guide_section/_guide_section.scss | 39 - .../components/guide_section/guide_section.js | 70 - .../guide_section/guide_section_container.js | 29 - .../guide_section/guide_section_types.js | 23 - .../components/guide_text/_guide_text.scss | 16 - .../src/components/guide_text/guide_text.js | 22 - .../doc_site/src/components/index.js | 32 - .../doc_site/src/images/elastic-logo.svg | 3 - .../doc_site/src/images/hint-arrow.svg | 25 - .../doc_site/src/images/react-logo.svg | 15 - .../kbn-ui-framework/doc_site/src/index.js | 88 - .../kbn-ui-framework/doc_site/src/main.scss | 7 - .../src/services/example/create_example.js | 35 - .../doc_site/src/services/index.js | 28 - .../src/services/js_injector/js_injector.js | 37 - .../doc_site/src/services/routes/routes.js | 175 -- .../src/services/string/render_to_html.js | 44 - .../doc_site/src/services/string/slugify.js | 45 - .../doc_site/src/store/configure_store.js | 49 - .../doc_site/src/store/index.js | 38 - .../src/store/reducers/code_viewer_reducer.js | 68 - .../src/store/reducers/sandbox_reducer.js | 47 - .../src/store/reducers/sections_reducer.js | 57 - .../doc_site/src/views/app_container.js | 51 - .../doc_site/src/views/app_view.js | 141 - .../doc_site/src/views/bar/bar.js | 36 - .../doc_site/src/views/bar/bar_example.js | 115 - .../doc_site/src/views/bar/bar_one_section.js | 33 - .../src/views/bar/bar_three_sections.js | 48 - .../doc_site/src/views/button/button_basic.js | 37 - .../src/views/button/button_danger.js | 35 - .../src/views/button/button_elements.js | 66 - .../src/views/button/button_example.js | 332 --- .../doc_site/src/views/button/button_group.js | 40 - .../src/views/button/button_group_united.js | 46 - .../src/views/button/button_hollow.js | 35 - .../src/views/button/button_loading.js | 74 - .../src/views/button/button_primary.js | 35 - .../src/views/button/button_secondary.js | 35 - .../src/views/button/button_sizes.html | 55 - .../src/views/button/button_warning.js | 35 - .../src/views/button/button_with_icon.js | 67 - .../views/collapse_button/collapse_button.js | 31 - .../collapse_button/collapse_button_aria.js | 59 - .../collapse_button_example.js | 108 - .../empty_table_prompt/empty_table_prompt.js | 41 - .../empty_table_prompt_example.js | 80 - .../table_with_empty_prompt.js | 80 - .../src/views/form/assisted_input.html | 14 - .../doc_site/src/views/form/check_box.js | 64 - .../doc_site/src/views/form/form_example.js | 233 -- .../doc_site/src/views/form/label.js | 27 - .../doc_site/src/views/form/search_input.html | 41 - .../doc_site/src/views/form/select.js | 84 - .../doc_site/src/views/form/static_input.html | 6 - .../doc_site/src/views/form/text_area.js | 81 - .../src/views/form/text_area_non_resizable.js | 43 - .../doc_site/src/views/form/text_input.js | 82 - .../src/views/form_layout/field_group.js | 106 - .../views/form_layout/form_layout_example.js | 51 - .../doc_site/src/views/home/home_view.js | 34 - .../doc_site/src/views/icon/icon.html | 1 - .../doc_site/src/views/icon/icon_basic.html | 1 - .../doc_site/src/views/icon/icon_error.html | 1 - .../doc_site/src/views/icon/icon_example.js | 169 -- .../src/views/icon/icon_inactive.html | 1 - .../doc_site/src/views/icon/icon_info.html | 1 - .../doc_site/src/views/icon/icon_spinner.html | 23 - .../doc_site/src/views/icon/icon_spinner.js | 19 - .../doc_site/src/views/icon/icon_success.html | 1 - .../doc_site/src/views/icon/icon_warning.html | 1 - .../views/info_panel/info_panel_error.html | 18 - .../views/info_panel/info_panel_example.js | 91 - .../src/views/info_panel/info_panel_info.html | 22 - .../views/info_panel/info_panel_success.html | 18 - .../views/info_panel/info_panel_warning.html | 18 - .../doc_site/src/views/link/link.html | 4 - .../doc_site/src/views/link/link_example.js | 40 - .../views/local_nav/local_nav_breadcrumbs.js | 54 - .../local_nav/local_nav_date_picker.html | 375 --- .../src/views/local_nav/local_nav_dropdown.js | 125 - .../local_nav/local_nav_dropdown_panels.js | 97 - .../src/views/local_nav/local_nav_example.js | 242 -- .../local_nav/local_nav_menu_item_states.js | 67 - .../src/views/local_nav/local_nav_search.js | 92 - .../views/local_nav/local_nav_search_error.js | 67 - .../src/views/local_nav/local_nav_simple.js | 50 - .../src/views/local_nav/local_nav_tabs.js | 71 - .../src/views/not_found/not_found_view.js | 44 - .../doc_site/src/views/pager/pager_buttons.js | 62 - .../doc_site/src/views/pager/pager_example.js | 77 - .../src/views/pager/tool_bar_pager.js | 40 - .../doc_site/src/views/panel/panel.html | 5 - .../doc_site/src/views/panel/panel_example.js | 73 - .../panel/panel_with_header_sections.html | 19 - .../src/views/panel/panel_with_toolbar.html | 10 - .../src/views/status_text/status_text.html | 37 - .../views/status_text/status_text_error.html | 6 - .../views/status_text/status_text_example.js | 92 - .../views/status_text/status_text_info.html | 6 - .../status_text/status_text_success.html | 6 - .../status_text/status_text_warning.html | 6 - .../doc_site/src/views/table/fluid_table.js | 126 - .../doc_site/src/views/table/listing_table.js | 158 -- .../table/listing_table_loading_items.js | 90 - .../table/listing_table_with_empty_prompt.js | 100 - .../table/listing_table_with_no_items.js | 74 - .../doc_site/src/views/table/table.js | 224 -- .../doc_site/src/views/table/table_example.js | 189 -- .../views/table/table_with_menu_buttons.js | 58 - .../doc_site/src/views/tabs/tabs.js | 75 - .../doc_site/src/views/tabs/tabs_example.js | 63 - .../doc_site/src/views/tool_bar/tool_bar.js | 65 - .../src/views/tool_bar/tool_bar_example.js | 83 - .../src/views/tool_bar/tool_bar_footer.js | 43 - .../src/views/typography/sub_text.html | 3 - .../src/views/typography/sub_title.html | 3 - .../src/views/typography/subdued_type.html | 11 - .../doc_site/src/views/typography/text.html | 3 - .../src/views/typography/text_title.html | 3 - .../doc_site/src/views/typography/title.html | 3 - .../views/typography/typography_example.js | 130 - .../vertical_rhythm/vertical_rhythm.html | 8 - .../vertical_rhythm_as_wrapper.html | 41 - .../vertical_rhythm_example.js | 93 - .../vertical_rhythm_on_component.html | 35 - .../vertical_rhythm_small.html | 8 - .../doc_site/src/views/view/view_sandbox.html | 15 - .../doc_site/src/views/view/view_sandbox.js | 45 - .../doc_site/webpack.config.js | 72 - .../generator-kui/app/component.js | 52 - .../generator-kui/app/documentation.js | 56 - .../generator-kui/component/index.js | 156 -- .../component/templates/_component.scss | 3 - .../component/templates/_index.scss | 1 - .../component/templates/component.js | 35 - .../component/templates/index.js | 3 - .../component/templates/stateless_function.js | 25 - .../generator-kui/component/templates/test.js | 16 - .../generator-kui/documentation/index.js | 238 -- .../templates/documentation_page.js | 41 - .../templates/documentation_page_demo.js | 11 - .../templates/documentation_sandbox.html | 1 - .../templates/documentation_sandbox.js | 27 - .../kbn-ui-framework/generator-kui/utils.js | 56 - packages/kbn-ui-framework/package.json | 75 - .../bar/__snapshots__/bar.test.js.snap | 11 - .../__snapshots__/bar_section.test.js.snap | 11 - .../src/components/bar/_bar.scss | 3 - .../src/components/bar/_bar_section.scss | 3 - .../src/components/bar/_index.scss | 2 - .../src/components/bar/bar.js | 35 - .../src/components/bar/bar.test.js | 29 - .../src/components/bar/bar_section.js | 35 - .../src/components/bar/bar_section.test.js | 29 - .../src/components/bar/index.js | 21 - .../button/__snapshots__/button.test.js.snap | 181 -- .../__snapshots__/link_button.test.js.snap | 182 -- .../__snapshots__/submit_button.test.js.snap | 68 - .../src/components/button/_button.scss | 189 -- .../src/components/button/_index.scss | 45 - .../src/components/button/button.js | 188 -- .../src/components/button/button.test.js | 129 - .../__snapshots__/button_group.test.js.snap | 24 - .../button/button_group/_button_group.scss | 51 - .../button/button_group/button_group.js | 42 - .../button/button_group/button_group.test.js | 51 - .../__snapshots__/button_icon.test.js.snap | 64 - .../button/button_icon/button_icon.js | 53 - .../button/button_icon/button_icon.test.js | 54 - .../src/components/button/index.js | 22 - .../src/components/button/link_button.test.js | 112 - .../components/button/submit_button.test.js | 88 - .../collapse_button.test.js.snap | 53 - .../collapse_button/_collapse_button.scss | 3 - .../components/collapse_button/_index.scss | 1 - .../collapse_button/collapse_button.js | 49 - .../collapse_button/collapse_button.test.js | 60 - .../src/components/collapse_button/index.js | 20 - .../empty_table_prompt.test.js.snap | 37 - .../empty_table_prompt_actions.test.js.snap | 11 - .../empty_table_prompt_message.test.js.snap | 11 - .../empty_table_prompt_panel.test.js.snap | 11 - .../_empty_table_prompt.scss | 16 - .../components/empty_table_prompt/_index.scss | 1 - .../empty_table_prompt/empty_table_prompt.js | 41 - .../empty_table_prompt.test.js | 47 - .../empty_table_prompt_actions.js | 35 - .../empty_table_prompt_actions.test.js | 31 - .../empty_table_prompt_message.js | 35 - .../empty_table_prompt_message.test.js | 31 - .../empty_table_prompt_panel.js | 35 - .../empty_table_prompt_panel.test.js | 31 - .../components/empty_table_prompt/index.js | 22 - .../src/components/form/_index.scss | 8 - .../form/assisted_input/_assisted_input.scss | 17 - .../form/assisted_input/_index.scss | 1 - .../__snapshots__/check_box.test.js.snap | 40 - .../check_box_label.test.js.snap | 91 - .../components/form/check_box/_check_box.scss | 61 - .../src/components/form/check_box/_index.scss | 8 - .../components/form/check_box/check_box.js | 49 - .../form/check_box/check_box.test.js | 74 - .../form/check_box/check_box_label.js | 47 - .../form/check_box/check_box_label.test.js | 80 - .../src/components/form/check_box/index.js | 21 - .../src/components/form/index.js | 24 - .../label/__snapshots__/label.test.js.snap | 11 - .../src/components/form/label/_index.scss | 1 - .../src/components/form/label/_label.scss | 9 - .../src/components/form/label/index.js | 20 - .../src/components/form/label/label.js | 37 - .../src/components/form/label/label.test.js | 32 - .../components/form/search_input/_index.scss | 3 - .../form/search_input/_search_input.scss | 39 - .../select/__snapshots__/select.test.js.snap | 81 - .../src/components/form/select/_index.scss | 1 - .../src/components/form/select/_select.scss | 27 - .../src/components/form/select/index.js | 20 - .../src/components/form/select/select.js | 70 - .../src/components/form/select/select.test.js | 105 - .../components/form/static_input/_index.scss | 1 - .../form/static_input/_static_input.scss | 9 - .../__snapshots__/text_area.test.js.snap | 81 - .../src/components/form/text_area/_index.scss | 1 - .../components/form/text_area/_text_area.scss | 26 - .../src/components/form/text_area/index.js | 20 - .../components/form/text_area/text_area.js | 68 - .../form/text_area/text_area.test.js | 110 - .../__snapshots__/text_input.test.js.snap | 77 - .../components/form/text_input/_index.scss | 1 - .../form/text_input/_text_input.scss | 17 - .../src/components/form/text_input/index.js | 20 - .../components/form/text_input/text_input.js | 59 - .../form/text_input/text_input.test.js | 128 - .../__snapshots__/field_group.test.js.snap | 21 - .../field_group_section.test.js.snap | 21 - .../components/form_layout/_field_group.scss | 27 - .../src/components/form_layout/_index.scss | 1 - .../src/components/form_layout/field_group.js | 43 - .../form_layout/field_group.test.js | 38 - .../form_layout/field_group_section.js | 43 - .../form_layout/field_group_section.test.js | 38 - .../src/components/form_layout/index.js | 21 - .../src/components/icon/_icon.scss | 36 - .../src/components/icon/_index.scss | 3 - .../kbn-ui-framework/src/components/index.js | 81 - .../src/components/index.scss | 34 - .../src/components/info_panel/_index.scss | 3 - .../components/info_panel/_info_panel.scss | 66 - .../src/components/link/_index.scss | 1 - .../src/components/link/_link.scss | 3 - .../__snapshots__/local_nav.test.js.snap | 11 - .../__snapshots__/local_nav_row.test.js.snap | 21 - .../local_nav_row_section.test.js.snap | 11 - .../__snapshots__/local_tab.test.js.snap | 31 - .../__snapshots__/local_tabs.test.js.snap | 11 - .../__snapshots__/local_title.test.js.snap | 11 - .../src/components/local_nav/_index.scss | 44 - .../local_nav/_local_breadcrumbs.scss | 43 - .../local_nav/_local_date_picker.scss | 117 - .../components/local_nav/_local_dropdown.scss | 122 - .../src/components/local_nav/_local_menu.scss | 49 - .../src/components/local_nav/_local_nav.scss | 40 - .../components/local_nav/_local_search.scss | 73 - .../src/components/local_nav/_local_tabs.scss | 46 - .../components/local_nav/_local_title.scss | 16 - .../src/components/local_nav/index.js | 25 - .../src/components/local_nav/local_nav.js | 36 - .../components/local_nav/local_nav.test.js | 29 - .../src/components/local_nav/local_nav_row.js | 43 - .../local_nav/local_nav_row.test.js | 40 - .../local_nav/local_nav_row_section.js | 36 - .../local_nav/local_nav_row_section.test.js | 29 - .../src/components/local_nav/local_tab.js | 46 - .../components/local_nav/local_tab.test.js | 51 - .../src/components/local_nav/local_tabs.js | 36 - .../components/local_nav/local_tabs.test.js | 29 - .../src/components/local_nav/local_title.js | 36 - .../components/local_nav/local_title.test.js | 29 - .../pager/__snapshots__/pager.test.js.snap | 141 - .../pager_button_group.test.js.snap | 37 - .../src/components/pager/_index.scss | 1 - .../src/components/pager/_pager.scss | 18 - .../src/components/pager/index.js | 21 - .../src/components/pager/pager.js | 64 - .../src/components/pager/pager.test.js | 125 - .../components/pager/pager_button_group.js | 61 - .../pager/pager_button_group.test.js | 146 - .../src/components/panel/_index.scss | 4 - .../src/components/panel/_panel.scss | 70 - .../src/components/status_text/_index.scss | 3 - .../components/status_text/_status_text.scss | 30 - .../controlled_table.test.js.snap | 11 - .../table/__snapshots__/table.test.js.snap | 62 - .../table_header_cell.test.js.snap | 16 - .../table_header_check_box_cell.test.js.snap | 20 - .../__snapshots__/table_info.test.js.snap | 11 - .../__snapshots__/table_row.test.js.snap | 19 - .../__snapshots__/table_row_cell.test.js.snap | 13 - .../table_row_check_box_cell.test.js.snap | 19 - .../components/table/_controlled_table.scss | 18 - .../src/components/table/_index.scss | 8 - .../src/components/table/_table.scss | 175 -- .../src/components/table/controlled_table.js | 35 - .../components/table/controlled_table.test.js | 29 - .../src/components/table/index.js | 36 - .../__snapshots__/listing_table.test.js.snap | 192 -- .../components/table/listing_table/index.js | 24 - .../table/listing_table/listing_table.js | 174 -- .../table/listing_table/listing_table.test.js | 78 - .../listing_table_create_button.js | 38 - .../listing_table_delete_button.js | 38 - .../listing_table_loading_prompt.js | 30 - .../listing_table_no_matches_prompt.js | 30 - .../table/listing_table/listing_table_row.js | 82 - .../listing_table/listing_table_tool_bar.js | 52 - .../listing_table_tool_bar_footer.js | 54 - .../src/components/table/table.js | 41 - .../src/components/table/table.test.js | 49 - .../src/components/table/table_body.js | 33 - .../src/components/table/table_header.js | 33 - .../src/components/table/table_header_cell.js | 87 - .../table/table_header_cell.test.js | 29 - .../table/table_header_check_box_cell.js | 43 - .../table/table_header_check_box_cell.test.js | 31 - .../src/components/table/table_info.js | 35 - .../src/components/table/table_info.test.js | 29 - .../src/components/table/table_row.js | 35 - .../src/components/table/table_row.test.js | 35 - .../src/components/table/table_row_cell.js | 52 - .../components/table/table_row_cell.test.js | 29 - .../table/table_row_check_box_cell.js | 43 - .../table/table_row_check_box_cell.test.js | 29 - .../src/components/table_info/_index.scss | 1 - .../components/table_info/_table_info.scss | 6 - .../tabs/__snapshots__/tab.test.js.snap | 25 - .../tabs/__snapshots__/tabs.test.js.snap | 10 - .../src/components/tabs/_index.scss | 4 - .../src/components/tabs/_tabs.scss | 59 - .../src/components/tabs/index.js | 21 - .../src/components/tabs/tab.js | 45 - .../src/components/tabs/tab.test.js | 59 - .../src/components/tabs/tabs.js | 37 - .../src/components/tabs/tabs.test.js | 32 - .../__snapshots__/tool_bar.test.js.snap | 11 - .../tool_bar_footer.test.js.snap | 11 - .../tool_bar_footer_section.test.js.snap | 11 - .../tool_bar_search_box.test.js.snap | 64 - .../tool_bar_section.test.js.snap | 11 - .../__snapshots__/tool_bar_text.test.js.snap | 11 - .../src/components/tool_bar/_index.scss | 4 - .../src/components/tool_bar/_tool_bar.scss | 23 - .../components/tool_bar/_tool_bar_footer.scss | 11 - .../components/tool_bar/_tool_bar_search.scss | 63 - .../components/tool_bar/_tool_bar_text.scss | 9 - .../src/components/tool_bar/index.js | 25 - .../src/components/tool_bar/tool_bar.js | 35 - .../src/components/tool_bar/tool_bar.test.js | 29 - .../components/tool_bar/tool_bar_footer.js | 35 - .../tool_bar/tool_bar_footer.test.js | 29 - .../tool_bar/tool_bar_footer_section.js | 35 - .../tool_bar/tool_bar_footer_section.test.js | 29 - .../tool_bar/tool_bar_search_box.js | 62 - .../tool_bar/tool_bar_search_box.test.js | 56 - .../components/tool_bar/tool_bar_section.js | 35 - .../tool_bar/tool_bar_section.test.js | 29 - .../src/components/tool_bar/tool_bar_text.js | 35 - .../components/tool_bar/tool_bar_text.test.js | 29 - .../__snapshots__/typography.test.js.snap | 37 - .../src/components/typography/_index.scss | 2 - .../components/typography/_typography.scss | 48 - .../src/components/typography/typography.js | 60 - .../components/typography/typography.test.js | 62 - .../components/vertical_rhythm/_index.scss | 6 - .../vertical_rhythm/_vertical_rhythm.scss | 23 - .../src/components/view/_index.scss | 4 - .../src/components/view/_view.scss | 22 - .../global_styling/mixins/_global_mixins.scss | 269 -- .../src/global_styling/mixins/_index.scss | 3 - .../global_styling/mixins/_responsive.scss | 9 - .../src/global_styling/mixins/_shadow.scss | 26 - .../src/global_styling/reset/_index.scss | 1 - .../src/global_styling/reset/_reset.scss | 6 - .../global_styling/variables/_animations.scss | 9 - .../global_styling/variables/_borders.scss | 6 - .../src/global_styling/variables/_colors.scss | 42 - .../src/global_styling/variables/_font.scss | 9 - .../src/global_styling/variables/_form.scss | 6 - .../src/global_styling/variables/_index.scss | 17 - .../src/global_styling/variables/_size.scss | 8 - .../src/global_styling/variables/_timing.scss | 3 - .../global_styling/variables/_tool_bar.scss | 4 - .../global_styling/variables/_z_index.scss | 19 - packages/kbn-ui-framework/src/kui_dark.scss | 15 - packages/kbn-ui-framework/src/kui_light.scss | 15 - .../accessibility/accessible_click_keys.js | 26 - .../accessibility/cascading_menu_key_codes.js | 39 - .../accessibility/combo_box_key_codes.js | 37 - .../accessibility/html_id_generator.js | 31 - .../accessibility/html_id_generator.test.js | 56 - .../src/services/accessibility/index.js | 23 - .../src/services/alignment.js | 21 - .../kbn-ui-framework/src/services/index.js | 33 - .../src/services/key_codes.js | 29 - .../src/services/sort/index.js | 20 - .../src/services/sort/sortable_properties.js | 117 - .../services/sort/sortable_properties.test.js | 138 - .../src/test/find_test_subject.js | 32 - packages/kbn-ui-framework/src/test/index.js | 22 - .../src/test/required_props.js | 26 - .../src/test/take_mounted_snapshot.js | 31 - packages/kbn-ui-framework/yarn.lock | 1 - .../tasks/extract_untracked_translations.ts | 1 - src/dev/jest/config.js | 1 - src/dev/precommit_hook/casing_check_config.js | 1 - src/legacy/ui/ui_render/ui_render_mixin.js | 2 - .../public/paginate/paginate_controls.html | 2 +- .../embeddable/disabled_lab_visualization.tsx | 28 +- test/functional/services/listing_table.ts | 2 +- x-pack/package.json | 1 - .../plugins/canvas/shareable_runtime/index.ts | 1 - .../canvas/storybook/webpack.dll.config.js | 1 - .../plugins/ml/public/application/_hacks.scss | 9 +- .../authorization/authorization_service.tsx | 1 - x-pack/test_utils/jest/config.js | 1 - yarn.lock | 1963 +------------ 463 files changed, 104 insertions(+), 27548 deletions(-) delete mode 100644 packages/kbn-ui-framework/Gruntfile.js delete mode 100644 packages/kbn-ui-framework/README.md delete mode 100644 packages/kbn-ui-framework/components/index.js delete mode 100644 packages/kbn-ui-framework/dist/kui_dark.css delete mode 100644 packages/kbn-ui-framework/dist/kui_light.css delete mode 100644 packages/kbn-ui-framework/doc_site/build/index.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/actions/action_types.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/actions/code_viewer_actions.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/actions/example_nav_actions.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/actions/index.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/actions/sandbox_actions.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/components/guide/_guide.scss delete mode 100644 packages/kbn-ui-framework/doc_site/src/components/guide_code/_guide_code.scss delete mode 100644 packages/kbn-ui-framework/doc_site/src/components/guide_code/guide_code.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/components/guide_code_viewer/_guide_code_viewer.scss delete mode 100644 packages/kbn-ui-framework/doc_site/src/components/guide_code_viewer/guide_code_viewer.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/components/guide_components.scss delete mode 100644 packages/kbn-ui-framework/doc_site/src/components/guide_demo/_guide_demo.scss delete mode 100644 packages/kbn-ui-framework/doc_site/src/components/guide_demo/guide_demo.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/components/guide_link/_guide_link.scss delete mode 100644 packages/kbn-ui-framework/doc_site/src/components/guide_link/guide_link.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/components/guide_nav/_guide_nav.scss delete mode 100644 packages/kbn-ui-framework/doc_site/src/components/guide_nav/guide_nav.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/components/guide_page/_guide_page.scss delete mode 100644 packages/kbn-ui-framework/doc_site/src/components/guide_page/guide_page.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/components/guide_page/guide_page_container.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/components/guide_page_side_nav/_guide_page_side_nav.scss delete mode 100644 packages/kbn-ui-framework/doc_site/src/components/guide_page_side_nav/guide_page_side_nav.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/components/guide_page_side_nav/guide_page_side_nav_item.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/components/guide_sandbox/_guide_sandbox.scss delete mode 100644 packages/kbn-ui-framework/doc_site/src/components/guide_sandbox/guide_sandbox.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/components/guide_sandbox/guide_sandbox_code_toggle.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/components/guide_sandbox/guide_sandbox_code_toggle_container.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/components/guide_section/_guide_section.scss delete mode 100644 packages/kbn-ui-framework/doc_site/src/components/guide_section/guide_section.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/components/guide_section/guide_section_container.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/components/guide_section/guide_section_types.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/components/guide_text/_guide_text.scss delete mode 100644 packages/kbn-ui-framework/doc_site/src/components/guide_text/guide_text.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/components/index.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/images/elastic-logo.svg delete mode 100644 packages/kbn-ui-framework/doc_site/src/images/hint-arrow.svg delete mode 100644 packages/kbn-ui-framework/doc_site/src/images/react-logo.svg delete mode 100644 packages/kbn-ui-framework/doc_site/src/index.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/main.scss delete mode 100644 packages/kbn-ui-framework/doc_site/src/services/example/create_example.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/services/index.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/services/js_injector/js_injector.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/services/routes/routes.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/services/string/render_to_html.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/services/string/slugify.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/store/configure_store.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/store/index.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/store/reducers/code_viewer_reducer.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/store/reducers/sandbox_reducer.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/store/reducers/sections_reducer.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/app_container.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/app_view.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/bar/bar.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/bar/bar_example.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/bar/bar_one_section.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/bar/bar_three_sections.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/button/button_basic.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/button/button_danger.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/button/button_elements.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/button/button_example.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/button/button_group.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/button/button_group_united.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/button/button_hollow.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/button/button_loading.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/button/button_primary.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/button/button_secondary.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/button/button_sizes.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/button/button_warning.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/button/button_with_icon.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/collapse_button/collapse_button.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/collapse_button/collapse_button_aria.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/collapse_button/collapse_button_example.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/empty_table_prompt/empty_table_prompt.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/empty_table_prompt/empty_table_prompt_example.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/empty_table_prompt/table_with_empty_prompt.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/form/assisted_input.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/form/check_box.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/form/form_example.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/form/label.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/form/search_input.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/form/select.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/form/static_input.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/form/text_area.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/form/text_area_non_resizable.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/form/text_input.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/form_layout/field_group.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/form_layout/form_layout_example.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/home/home_view.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/icon/icon.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/icon/icon_basic.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/icon/icon_error.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/icon/icon_example.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/icon/icon_inactive.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/icon/icon_info.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/icon/icon_spinner.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/icon/icon_spinner.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/icon/icon_success.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/icon/icon_warning.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/info_panel/info_panel_error.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/info_panel/info_panel_example.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/info_panel/info_panel_info.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/info_panel/info_panel_success.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/info_panel/info_panel_warning.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/link/link.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/link/link_example.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/local_nav/local_nav_breadcrumbs.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/local_nav/local_nav_date_picker.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/local_nav/local_nav_dropdown.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/local_nav/local_nav_dropdown_panels.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/local_nav/local_nav_example.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/local_nav/local_nav_menu_item_states.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/local_nav/local_nav_search.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/local_nav/local_nav_search_error.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/local_nav/local_nav_simple.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/local_nav/local_nav_tabs.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/not_found/not_found_view.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/pager/pager_buttons.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/pager/pager_example.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/pager/tool_bar_pager.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/panel/panel.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/panel/panel_example.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/panel/panel_with_header_sections.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/panel/panel_with_toolbar.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/status_text/status_text.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/status_text/status_text_error.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/status_text/status_text_example.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/status_text/status_text_info.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/status_text/status_text_success.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/status_text/status_text_warning.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/table/fluid_table.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/table/listing_table.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/table/listing_table_loading_items.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/table/listing_table_with_empty_prompt.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/table/listing_table_with_no_items.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/table/table.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/table/table_example.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/table/table_with_menu_buttons.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/tabs/tabs.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/tabs/tabs_example.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/tool_bar/tool_bar.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/tool_bar/tool_bar_example.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/tool_bar/tool_bar_footer.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/typography/sub_text.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/typography/sub_title.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/typography/subdued_type.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/typography/text.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/typography/text_title.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/typography/title.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/typography/typography_example.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/vertical_rhythm/vertical_rhythm.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/vertical_rhythm/vertical_rhythm_as_wrapper.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/vertical_rhythm/vertical_rhythm_example.js delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/vertical_rhythm/vertical_rhythm_on_component.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/vertical_rhythm/vertical_rhythm_small.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/view/view_sandbox.html delete mode 100644 packages/kbn-ui-framework/doc_site/src/views/view/view_sandbox.js delete mode 100644 packages/kbn-ui-framework/doc_site/webpack.config.js delete mode 100644 packages/kbn-ui-framework/generator-kui/app/component.js delete mode 100644 packages/kbn-ui-framework/generator-kui/app/documentation.js delete mode 100644 packages/kbn-ui-framework/generator-kui/component/index.js delete mode 100644 packages/kbn-ui-framework/generator-kui/component/templates/_component.scss delete mode 100644 packages/kbn-ui-framework/generator-kui/component/templates/_index.scss delete mode 100644 packages/kbn-ui-framework/generator-kui/component/templates/component.js delete mode 100644 packages/kbn-ui-framework/generator-kui/component/templates/index.js delete mode 100644 packages/kbn-ui-framework/generator-kui/component/templates/stateless_function.js delete mode 100644 packages/kbn-ui-framework/generator-kui/component/templates/test.js delete mode 100644 packages/kbn-ui-framework/generator-kui/documentation/index.js delete mode 100644 packages/kbn-ui-framework/generator-kui/documentation/templates/documentation_page.js delete mode 100644 packages/kbn-ui-framework/generator-kui/documentation/templates/documentation_page_demo.js delete mode 100644 packages/kbn-ui-framework/generator-kui/documentation/templates/documentation_sandbox.html delete mode 100644 packages/kbn-ui-framework/generator-kui/documentation/templates/documentation_sandbox.js delete mode 100644 packages/kbn-ui-framework/generator-kui/utils.js delete mode 100644 packages/kbn-ui-framework/package.json delete mode 100644 packages/kbn-ui-framework/src/components/bar/__snapshots__/bar.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/bar/__snapshots__/bar_section.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/bar/_bar.scss delete mode 100644 packages/kbn-ui-framework/src/components/bar/_bar_section.scss delete mode 100644 packages/kbn-ui-framework/src/components/bar/_index.scss delete mode 100644 packages/kbn-ui-framework/src/components/bar/bar.js delete mode 100644 packages/kbn-ui-framework/src/components/bar/bar.test.js delete mode 100644 packages/kbn-ui-framework/src/components/bar/bar_section.js delete mode 100644 packages/kbn-ui-framework/src/components/bar/bar_section.test.js delete mode 100644 packages/kbn-ui-framework/src/components/bar/index.js delete mode 100644 packages/kbn-ui-framework/src/components/button/__snapshots__/button.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/button/__snapshots__/link_button.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/button/__snapshots__/submit_button.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/button/_button.scss delete mode 100644 packages/kbn-ui-framework/src/components/button/_index.scss delete mode 100644 packages/kbn-ui-framework/src/components/button/button.js delete mode 100644 packages/kbn-ui-framework/src/components/button/button.test.js delete mode 100644 packages/kbn-ui-framework/src/components/button/button_group/__snapshots__/button_group.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/button/button_group/_button_group.scss delete mode 100644 packages/kbn-ui-framework/src/components/button/button_group/button_group.js delete mode 100644 packages/kbn-ui-framework/src/components/button/button_group/button_group.test.js delete mode 100644 packages/kbn-ui-framework/src/components/button/button_icon/__snapshots__/button_icon.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/button/button_icon/button_icon.js delete mode 100644 packages/kbn-ui-framework/src/components/button/button_icon/button_icon.test.js delete mode 100644 packages/kbn-ui-framework/src/components/button/index.js delete mode 100644 packages/kbn-ui-framework/src/components/button/link_button.test.js delete mode 100644 packages/kbn-ui-framework/src/components/button/submit_button.test.js delete mode 100644 packages/kbn-ui-framework/src/components/collapse_button/__snapshots__/collapse_button.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/collapse_button/_collapse_button.scss delete mode 100644 packages/kbn-ui-framework/src/components/collapse_button/_index.scss delete mode 100644 packages/kbn-ui-framework/src/components/collapse_button/collapse_button.js delete mode 100644 packages/kbn-ui-framework/src/components/collapse_button/collapse_button.test.js delete mode 100644 packages/kbn-ui-framework/src/components/collapse_button/index.js delete mode 100644 packages/kbn-ui-framework/src/components/empty_table_prompt/__snapshots__/empty_table_prompt.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/empty_table_prompt/__snapshots__/empty_table_prompt_actions.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/empty_table_prompt/__snapshots__/empty_table_prompt_message.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/empty_table_prompt/__snapshots__/empty_table_prompt_panel.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/empty_table_prompt/_empty_table_prompt.scss delete mode 100644 packages/kbn-ui-framework/src/components/empty_table_prompt/_index.scss delete mode 100644 packages/kbn-ui-framework/src/components/empty_table_prompt/empty_table_prompt.js delete mode 100644 packages/kbn-ui-framework/src/components/empty_table_prompt/empty_table_prompt.test.js delete mode 100644 packages/kbn-ui-framework/src/components/empty_table_prompt/empty_table_prompt_actions.js delete mode 100644 packages/kbn-ui-framework/src/components/empty_table_prompt/empty_table_prompt_actions.test.js delete mode 100644 packages/kbn-ui-framework/src/components/empty_table_prompt/empty_table_prompt_message.js delete mode 100644 packages/kbn-ui-framework/src/components/empty_table_prompt/empty_table_prompt_message.test.js delete mode 100644 packages/kbn-ui-framework/src/components/empty_table_prompt/empty_table_prompt_panel.js delete mode 100644 packages/kbn-ui-framework/src/components/empty_table_prompt/empty_table_prompt_panel.test.js delete mode 100644 packages/kbn-ui-framework/src/components/empty_table_prompt/index.js delete mode 100644 packages/kbn-ui-framework/src/components/form/_index.scss delete mode 100644 packages/kbn-ui-framework/src/components/form/assisted_input/_assisted_input.scss delete mode 100644 packages/kbn-ui-framework/src/components/form/assisted_input/_index.scss delete mode 100644 packages/kbn-ui-framework/src/components/form/check_box/__snapshots__/check_box.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/form/check_box/__snapshots__/check_box_label.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/form/check_box/_check_box.scss delete mode 100644 packages/kbn-ui-framework/src/components/form/check_box/_index.scss delete mode 100644 packages/kbn-ui-framework/src/components/form/check_box/check_box.js delete mode 100644 packages/kbn-ui-framework/src/components/form/check_box/check_box.test.js delete mode 100644 packages/kbn-ui-framework/src/components/form/check_box/check_box_label.js delete mode 100644 packages/kbn-ui-framework/src/components/form/check_box/check_box_label.test.js delete mode 100644 packages/kbn-ui-framework/src/components/form/check_box/index.js delete mode 100644 packages/kbn-ui-framework/src/components/form/index.js delete mode 100644 packages/kbn-ui-framework/src/components/form/label/__snapshots__/label.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/form/label/_index.scss delete mode 100644 packages/kbn-ui-framework/src/components/form/label/_label.scss delete mode 100644 packages/kbn-ui-framework/src/components/form/label/index.js delete mode 100644 packages/kbn-ui-framework/src/components/form/label/label.js delete mode 100644 packages/kbn-ui-framework/src/components/form/label/label.test.js delete mode 100644 packages/kbn-ui-framework/src/components/form/search_input/_index.scss delete mode 100644 packages/kbn-ui-framework/src/components/form/search_input/_search_input.scss delete mode 100644 packages/kbn-ui-framework/src/components/form/select/__snapshots__/select.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/form/select/_index.scss delete mode 100644 packages/kbn-ui-framework/src/components/form/select/_select.scss delete mode 100644 packages/kbn-ui-framework/src/components/form/select/index.js delete mode 100644 packages/kbn-ui-framework/src/components/form/select/select.js delete mode 100644 packages/kbn-ui-framework/src/components/form/select/select.test.js delete mode 100644 packages/kbn-ui-framework/src/components/form/static_input/_index.scss delete mode 100644 packages/kbn-ui-framework/src/components/form/static_input/_static_input.scss delete mode 100644 packages/kbn-ui-framework/src/components/form/text_area/__snapshots__/text_area.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/form/text_area/_index.scss delete mode 100644 packages/kbn-ui-framework/src/components/form/text_area/_text_area.scss delete mode 100644 packages/kbn-ui-framework/src/components/form/text_area/index.js delete mode 100644 packages/kbn-ui-framework/src/components/form/text_area/text_area.js delete mode 100644 packages/kbn-ui-framework/src/components/form/text_area/text_area.test.js delete mode 100644 packages/kbn-ui-framework/src/components/form/text_input/__snapshots__/text_input.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/form/text_input/_index.scss delete mode 100644 packages/kbn-ui-framework/src/components/form/text_input/_text_input.scss delete mode 100644 packages/kbn-ui-framework/src/components/form/text_input/index.js delete mode 100644 packages/kbn-ui-framework/src/components/form/text_input/text_input.js delete mode 100644 packages/kbn-ui-framework/src/components/form/text_input/text_input.test.js delete mode 100644 packages/kbn-ui-framework/src/components/form_layout/__snapshots__/field_group.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/form_layout/__snapshots__/field_group_section.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/form_layout/_field_group.scss delete mode 100644 packages/kbn-ui-framework/src/components/form_layout/_index.scss delete mode 100644 packages/kbn-ui-framework/src/components/form_layout/field_group.js delete mode 100644 packages/kbn-ui-framework/src/components/form_layout/field_group.test.js delete mode 100644 packages/kbn-ui-framework/src/components/form_layout/field_group_section.js delete mode 100644 packages/kbn-ui-framework/src/components/form_layout/field_group_section.test.js delete mode 100644 packages/kbn-ui-framework/src/components/form_layout/index.js delete mode 100644 packages/kbn-ui-framework/src/components/icon/_icon.scss delete mode 100644 packages/kbn-ui-framework/src/components/icon/_index.scss delete mode 100644 packages/kbn-ui-framework/src/components/index.js delete mode 100644 packages/kbn-ui-framework/src/components/index.scss delete mode 100644 packages/kbn-ui-framework/src/components/info_panel/_index.scss delete mode 100644 packages/kbn-ui-framework/src/components/info_panel/_info_panel.scss delete mode 100644 packages/kbn-ui-framework/src/components/link/_index.scss delete mode 100644 packages/kbn-ui-framework/src/components/link/_link.scss delete mode 100644 packages/kbn-ui-framework/src/components/local_nav/__snapshots__/local_nav.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/local_nav/__snapshots__/local_nav_row.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/local_nav/__snapshots__/local_nav_row_section.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/local_nav/__snapshots__/local_tab.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/local_nav/__snapshots__/local_tabs.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/local_nav/__snapshots__/local_title.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/local_nav/_index.scss delete mode 100644 packages/kbn-ui-framework/src/components/local_nav/_local_breadcrumbs.scss delete mode 100644 packages/kbn-ui-framework/src/components/local_nav/_local_date_picker.scss delete mode 100644 packages/kbn-ui-framework/src/components/local_nav/_local_dropdown.scss delete mode 100644 packages/kbn-ui-framework/src/components/local_nav/_local_menu.scss delete mode 100644 packages/kbn-ui-framework/src/components/local_nav/_local_nav.scss delete mode 100644 packages/kbn-ui-framework/src/components/local_nav/_local_search.scss delete mode 100644 packages/kbn-ui-framework/src/components/local_nav/_local_tabs.scss delete mode 100644 packages/kbn-ui-framework/src/components/local_nav/_local_title.scss delete mode 100644 packages/kbn-ui-framework/src/components/local_nav/index.js delete mode 100644 packages/kbn-ui-framework/src/components/local_nav/local_nav.js delete mode 100644 packages/kbn-ui-framework/src/components/local_nav/local_nav.test.js delete mode 100644 packages/kbn-ui-framework/src/components/local_nav/local_nav_row.js delete mode 100644 packages/kbn-ui-framework/src/components/local_nav/local_nav_row.test.js delete mode 100644 packages/kbn-ui-framework/src/components/local_nav/local_nav_row_section.js delete mode 100644 packages/kbn-ui-framework/src/components/local_nav/local_nav_row_section.test.js delete mode 100644 packages/kbn-ui-framework/src/components/local_nav/local_tab.js delete mode 100644 packages/kbn-ui-framework/src/components/local_nav/local_tab.test.js delete mode 100644 packages/kbn-ui-framework/src/components/local_nav/local_tabs.js delete mode 100644 packages/kbn-ui-framework/src/components/local_nav/local_tabs.test.js delete mode 100644 packages/kbn-ui-framework/src/components/local_nav/local_title.js delete mode 100644 packages/kbn-ui-framework/src/components/local_nav/local_title.test.js delete mode 100644 packages/kbn-ui-framework/src/components/pager/__snapshots__/pager.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/pager/__snapshots__/pager_button_group.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/pager/_index.scss delete mode 100644 packages/kbn-ui-framework/src/components/pager/_pager.scss delete mode 100644 packages/kbn-ui-framework/src/components/pager/index.js delete mode 100644 packages/kbn-ui-framework/src/components/pager/pager.js delete mode 100644 packages/kbn-ui-framework/src/components/pager/pager.test.js delete mode 100644 packages/kbn-ui-framework/src/components/pager/pager_button_group.js delete mode 100644 packages/kbn-ui-framework/src/components/pager/pager_button_group.test.js delete mode 100644 packages/kbn-ui-framework/src/components/panel/_index.scss delete mode 100644 packages/kbn-ui-framework/src/components/panel/_panel.scss delete mode 100644 packages/kbn-ui-framework/src/components/status_text/_index.scss delete mode 100644 packages/kbn-ui-framework/src/components/status_text/_status_text.scss delete mode 100644 packages/kbn-ui-framework/src/components/table/__snapshots__/controlled_table.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/table/__snapshots__/table.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/table/__snapshots__/table_header_cell.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/table/__snapshots__/table_header_check_box_cell.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/table/__snapshots__/table_info.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/table/__snapshots__/table_row.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/table/__snapshots__/table_row_cell.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/table/__snapshots__/table_row_check_box_cell.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/table/_controlled_table.scss delete mode 100644 packages/kbn-ui-framework/src/components/table/_index.scss delete mode 100644 packages/kbn-ui-framework/src/components/table/_table.scss delete mode 100644 packages/kbn-ui-framework/src/components/table/controlled_table.js delete mode 100644 packages/kbn-ui-framework/src/components/table/controlled_table.test.js delete mode 100644 packages/kbn-ui-framework/src/components/table/index.js delete mode 100644 packages/kbn-ui-framework/src/components/table/listing_table/__snapshots__/listing_table.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/table/listing_table/index.js delete mode 100644 packages/kbn-ui-framework/src/components/table/listing_table/listing_table.js delete mode 100644 packages/kbn-ui-framework/src/components/table/listing_table/listing_table.test.js delete mode 100644 packages/kbn-ui-framework/src/components/table/listing_table/listing_table_create_button.js delete mode 100644 packages/kbn-ui-framework/src/components/table/listing_table/listing_table_delete_button.js delete mode 100644 packages/kbn-ui-framework/src/components/table/listing_table/listing_table_loading_prompt.js delete mode 100644 packages/kbn-ui-framework/src/components/table/listing_table/listing_table_no_matches_prompt.js delete mode 100644 packages/kbn-ui-framework/src/components/table/listing_table/listing_table_row.js delete mode 100644 packages/kbn-ui-framework/src/components/table/listing_table/listing_table_tool_bar.js delete mode 100644 packages/kbn-ui-framework/src/components/table/listing_table/listing_table_tool_bar_footer.js delete mode 100644 packages/kbn-ui-framework/src/components/table/table.js delete mode 100644 packages/kbn-ui-framework/src/components/table/table.test.js delete mode 100644 packages/kbn-ui-framework/src/components/table/table_body.js delete mode 100644 packages/kbn-ui-framework/src/components/table/table_header.js delete mode 100644 packages/kbn-ui-framework/src/components/table/table_header_cell.js delete mode 100644 packages/kbn-ui-framework/src/components/table/table_header_cell.test.js delete mode 100644 packages/kbn-ui-framework/src/components/table/table_header_check_box_cell.js delete mode 100644 packages/kbn-ui-framework/src/components/table/table_header_check_box_cell.test.js delete mode 100644 packages/kbn-ui-framework/src/components/table/table_info.js delete mode 100644 packages/kbn-ui-framework/src/components/table/table_info.test.js delete mode 100644 packages/kbn-ui-framework/src/components/table/table_row.js delete mode 100644 packages/kbn-ui-framework/src/components/table/table_row.test.js delete mode 100644 packages/kbn-ui-framework/src/components/table/table_row_cell.js delete mode 100644 packages/kbn-ui-framework/src/components/table/table_row_cell.test.js delete mode 100644 packages/kbn-ui-framework/src/components/table/table_row_check_box_cell.js delete mode 100644 packages/kbn-ui-framework/src/components/table/table_row_check_box_cell.test.js delete mode 100644 packages/kbn-ui-framework/src/components/table_info/_index.scss delete mode 100644 packages/kbn-ui-framework/src/components/table_info/_table_info.scss delete mode 100644 packages/kbn-ui-framework/src/components/tabs/__snapshots__/tab.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/tabs/__snapshots__/tabs.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/tabs/_index.scss delete mode 100644 packages/kbn-ui-framework/src/components/tabs/_tabs.scss delete mode 100644 packages/kbn-ui-framework/src/components/tabs/index.js delete mode 100644 packages/kbn-ui-framework/src/components/tabs/tab.js delete mode 100644 packages/kbn-ui-framework/src/components/tabs/tab.test.js delete mode 100644 packages/kbn-ui-framework/src/components/tabs/tabs.js delete mode 100644 packages/kbn-ui-framework/src/components/tabs/tabs.test.js delete mode 100644 packages/kbn-ui-framework/src/components/tool_bar/__snapshots__/tool_bar.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/tool_bar/__snapshots__/tool_bar_footer.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/tool_bar/__snapshots__/tool_bar_footer_section.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/tool_bar/__snapshots__/tool_bar_search_box.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/tool_bar/__snapshots__/tool_bar_section.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/tool_bar/__snapshots__/tool_bar_text.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/tool_bar/_index.scss delete mode 100644 packages/kbn-ui-framework/src/components/tool_bar/_tool_bar.scss delete mode 100644 packages/kbn-ui-framework/src/components/tool_bar/_tool_bar_footer.scss delete mode 100644 packages/kbn-ui-framework/src/components/tool_bar/_tool_bar_search.scss delete mode 100644 packages/kbn-ui-framework/src/components/tool_bar/_tool_bar_text.scss delete mode 100644 packages/kbn-ui-framework/src/components/tool_bar/index.js delete mode 100644 packages/kbn-ui-framework/src/components/tool_bar/tool_bar.js delete mode 100644 packages/kbn-ui-framework/src/components/tool_bar/tool_bar.test.js delete mode 100644 packages/kbn-ui-framework/src/components/tool_bar/tool_bar_footer.js delete mode 100644 packages/kbn-ui-framework/src/components/tool_bar/tool_bar_footer.test.js delete mode 100644 packages/kbn-ui-framework/src/components/tool_bar/tool_bar_footer_section.js delete mode 100644 packages/kbn-ui-framework/src/components/tool_bar/tool_bar_footer_section.test.js delete mode 100644 packages/kbn-ui-framework/src/components/tool_bar/tool_bar_search_box.js delete mode 100644 packages/kbn-ui-framework/src/components/tool_bar/tool_bar_search_box.test.js delete mode 100644 packages/kbn-ui-framework/src/components/tool_bar/tool_bar_section.js delete mode 100644 packages/kbn-ui-framework/src/components/tool_bar/tool_bar_section.test.js delete mode 100644 packages/kbn-ui-framework/src/components/tool_bar/tool_bar_text.js delete mode 100644 packages/kbn-ui-framework/src/components/tool_bar/tool_bar_text.test.js delete mode 100644 packages/kbn-ui-framework/src/components/typography/__snapshots__/typography.test.js.snap delete mode 100644 packages/kbn-ui-framework/src/components/typography/_index.scss delete mode 100644 packages/kbn-ui-framework/src/components/typography/_typography.scss delete mode 100644 packages/kbn-ui-framework/src/components/typography/typography.js delete mode 100644 packages/kbn-ui-framework/src/components/typography/typography.test.js delete mode 100644 packages/kbn-ui-framework/src/components/vertical_rhythm/_index.scss delete mode 100644 packages/kbn-ui-framework/src/components/vertical_rhythm/_vertical_rhythm.scss delete mode 100644 packages/kbn-ui-framework/src/components/view/_index.scss delete mode 100644 packages/kbn-ui-framework/src/components/view/_view.scss delete mode 100644 packages/kbn-ui-framework/src/global_styling/mixins/_global_mixins.scss delete mode 100644 packages/kbn-ui-framework/src/global_styling/mixins/_index.scss delete mode 100644 packages/kbn-ui-framework/src/global_styling/mixins/_responsive.scss delete mode 100644 packages/kbn-ui-framework/src/global_styling/mixins/_shadow.scss delete mode 100644 packages/kbn-ui-framework/src/global_styling/reset/_index.scss delete mode 100644 packages/kbn-ui-framework/src/global_styling/reset/_reset.scss delete mode 100644 packages/kbn-ui-framework/src/global_styling/variables/_animations.scss delete mode 100644 packages/kbn-ui-framework/src/global_styling/variables/_borders.scss delete mode 100644 packages/kbn-ui-framework/src/global_styling/variables/_colors.scss delete mode 100644 packages/kbn-ui-framework/src/global_styling/variables/_font.scss delete mode 100644 packages/kbn-ui-framework/src/global_styling/variables/_form.scss delete mode 100644 packages/kbn-ui-framework/src/global_styling/variables/_index.scss delete mode 100644 packages/kbn-ui-framework/src/global_styling/variables/_size.scss delete mode 100644 packages/kbn-ui-framework/src/global_styling/variables/_timing.scss delete mode 100644 packages/kbn-ui-framework/src/global_styling/variables/_tool_bar.scss delete mode 100644 packages/kbn-ui-framework/src/global_styling/variables/_z_index.scss delete mode 100644 packages/kbn-ui-framework/src/kui_dark.scss delete mode 100644 packages/kbn-ui-framework/src/kui_light.scss delete mode 100644 packages/kbn-ui-framework/src/services/accessibility/accessible_click_keys.js delete mode 100644 packages/kbn-ui-framework/src/services/accessibility/cascading_menu_key_codes.js delete mode 100644 packages/kbn-ui-framework/src/services/accessibility/combo_box_key_codes.js delete mode 100644 packages/kbn-ui-framework/src/services/accessibility/html_id_generator.js delete mode 100644 packages/kbn-ui-framework/src/services/accessibility/html_id_generator.test.js delete mode 100644 packages/kbn-ui-framework/src/services/accessibility/index.js delete mode 100644 packages/kbn-ui-framework/src/services/alignment.js delete mode 100644 packages/kbn-ui-framework/src/services/index.js delete mode 100644 packages/kbn-ui-framework/src/services/key_codes.js delete mode 100644 packages/kbn-ui-framework/src/services/sort/index.js delete mode 100644 packages/kbn-ui-framework/src/services/sort/sortable_properties.js delete mode 100644 packages/kbn-ui-framework/src/services/sort/sortable_properties.test.js delete mode 100644 packages/kbn-ui-framework/src/test/find_test_subject.js delete mode 100644 packages/kbn-ui-framework/src/test/index.js delete mode 100644 packages/kbn-ui-framework/src/test/required_props.js delete mode 100644 packages/kbn-ui-framework/src/test/take_mounted_snapshot.js delete mode 120000 packages/kbn-ui-framework/yarn.lock diff --git a/.eslintignore b/.eslintignore index 7f3e3ef597cbbc..0643fbddabe577 100644 --- a/.eslintignore +++ b/.eslintignore @@ -42,5 +42,4 @@ target /packages/kbn-test/src/functional_test_runner/lib/config/__tests__/fixtures/ /packages/kbn-ui-framework/dist /packages/kbn-ui-framework/doc_site/build -/packages/kbn-ui-framework/generator-kui/*/templates/ /packages/kbn-ui-shared-deps/flot_charts diff --git a/.eslintrc.js b/.eslintrc.js index 24ae50791d91df..63d367966bc0e0 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -457,10 +457,6 @@ module.exports = { */ { files: [ - 'packages/kbn-ui-framework/**/*.test.js', - 'packages/kbn-ui-framework/doc_site/**/*.js', - 'packages/kbn-ui-framework/generator-kui/**/*.js', - 'packages/kbn-ui-framework/Gruntfile.js', 'packages/kbn-es/src/**/*.js', 'packages/kbn-interpreter/tasks/**/*.js', 'packages/kbn-interpreter/src/plugin/**/*.js', diff --git a/package.json b/package.json index 1d5c5059cd03e8..1d4eb811420b7e 100644 --- a/package.json +++ b/package.json @@ -58,10 +58,6 @@ "lint:es": "node scripts/eslint", "lint:sass": "node scripts/sasslint", "makelogs": "node scripts/makelogs", - "uiFramework:start": "cd packages/kbn-ui-framework && yarn docSiteStart", - "uiFramework:build": "cd packages/kbn-ui-framework && yarn docSiteBuild", - "uiFramework:createComponent": "cd packages/kbn-ui-framework && yarn createComponent", - "uiFramework:documentComponent": "cd packages/kbn-ui-framework && yarn documentComponent", "kbn:watch": "node scripts/kibana --dev --logging.json=false", "build:types": "rm -rf ./target/types && tsc --p tsconfig.types.json", "docs:acceptApiChanges": "node --max-old-space-size=6144 scripts/check_published_api_changes.js --accept", @@ -136,7 +132,6 @@ "@kbn/logging": "1.0.0", "@kbn/monaco": "1.0.0", "@kbn/std": "1.0.0", - "@kbn/ui-framework": "1.0.0", "@kbn/ui-shared-deps": "1.0.0", "@types/pdfmake": "^0.1.15", "@types/yauzl": "^2.9.1", diff --git a/packages/kbn-ui-framework/Gruntfile.js b/packages/kbn-ui-framework/Gruntfile.js deleted file mode 100644 index bb8e7b72cb7bd7..00000000000000 --- a/packages/kbn-ui-framework/Gruntfile.js +++ /dev/null @@ -1,239 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -const sass = require('node-sass'); -const postcss = require('postcss'); -const postcssConfig = require('@kbn/optimizer/postcss.config.js'); -const chokidar = require('chokidar'); -const { debounce } = require('lodash'); - -const platform = require('os').platform(); -const isPlatformWindows = /^win/.test(platform); - -module.exports = function (grunt) { - grunt.initConfig({ - clean: { - target: ['target'], - }, - copy: { - makeProdBuild: { - expand: true, - src: [ - 'components/**/*', - 'dist/**/*', - 'src/**/*', - 'package.json', - '!**/*.test.js', - '!**/__snapshots__/**/*', - ], - dest: 'target', - }, - }, - babel: { - prodBuild: { - expand: true, - src: ['target/components/**/*.js', 'target/src/**/*.js'], - dest: '.', - options: { - presets: [require.resolve('@kbn/babel-preset/webpack_preset')], - }, - }, - }, - }); - - grunt.loadNpmTasks('grunt-babel'); - grunt.loadNpmTasks('grunt-contrib-clean'); - grunt.loadNpmTasks('grunt-contrib-copy'); - grunt.registerTask('prodBuild', ['clean:target', 'copy:makeProdBuild', 'babel:prodBuild']); - - grunt.registerTask('docSiteBuild', function () { - const done = this.async(); - - const serverCmd = { - cmd: isPlatformWindows ? '.\\node_modules\\.bin\\webpack.cmd' : './node_modules/.bin/webpack', - args: [ - '-p', - '--config=doc_site/webpack.config.js', - '--devtool=null', // Prevent the source map from being generated - ], - opts: { stdio: 'inherit' }, - }; - - const uiFrameworkServerBuild = new Promise((resolve, reject) => { - grunt.util.spawn(serverCmd, (error, result, code) => { - if (error || code !== 0) { - const message = result.stderr || result.stdout; - - grunt.log.error(message); - - return reject(); - } - - grunt.log.writeln(result); - - resolve(); - }); - }); - - uiFrameworkServerBuild.then(done); - }); - - grunt.registerTask('docSiteStart', function () { - const done = this.async(); - Promise.all([uiFrameworkWatch(), uiFrameworkServerStart()]).then(done); - }); - - grunt.registerTask('compileCssLight', function () { - const done = this.async(); - uiFrameworkCompileLight().then(done); - }); - - grunt.registerTask('compileCssDark', function () { - const done = this.async(); - uiFrameworkCompileDark().then(done); - }); - - function uiFrameworkServerStart() { - const serverCmd = { - cmd: isPlatformWindows - ? '.\\node_modules\\.bin\\webpack-dev-server.cmd' - : './node_modules/.bin/webpack-dev-server', - args: [ - '--config=doc_site/webpack.config.js', - '--hot', - '--inline', - '--content-base=doc_site/build', - '--host=0.0.0.0', - '--port=8020', - ], - opts: { stdio: 'inherit' }, - }; - - return new Promise((resolve, reject) => { - grunt.util.spawn(serverCmd, (error, result, code) => { - if (error || code !== 0) { - const message = result.stderr || result.stdout; - - grunt.log.error(message); - - return reject(); - } - - grunt.log.writeln(result); - - resolve(); - }); - }); - } - - function uiFrameworkCompileLight() { - const src = 'src/kui_light.scss'; - const dest = 'dist/kui_light.css'; - - return new Promise((resolve) => { - sass.render( - { - file: src, - }, - function (error, result) { - if (error) { - grunt.log.error(error); - } - - postcss([postcssConfig]) - .process(result.css, { from: src, to: dest }) - .then((result) => { - grunt.file.write(dest, result.css); - - if (result.map) { - grunt.file.write(`${dest}.map`, result.map); - } - - resolve(); - }); - } - ); - }); - } - - function uiFrameworkCompileDark() { - const src = 'src/kui_dark.scss'; - const dest = 'dist/kui_dark.css'; - - return new Promise((resolve) => { - sass.render( - { - file: src, - }, - function (error, result) { - if (error) { - grunt.log.error(error); - } - - postcss([postcssConfig]) - .process(result.css, { from: src, to: dest }) - .then((result) => { - grunt.file.write(dest, result.css); - - if (result.map) { - grunt.file.write(`${dest}.map`, result.map); - } - - resolve(); - }); - } - ); - }); - } - - function uiFrameworkWatch() { - const debouncedCompile = debounce( - () => { - // Compile the SCSS in a separate process because node-sass throws a fatal error if it fails - // to compile. - grunt.util.spawn( - { - cmd: isPlatformWindows - ? '.\\node_modules\\.bin\\grunt.cmd' - : './node_modules/.bin/grunt', - args: ['compileCssLight', 'compileCssDark'], - }, - (error, result) => { - if (error) { - grunt.log.error(result.stdout); - } else { - grunt.log.writeln(result); - } - } - ); - }, - 400, - { leading: true } - ); - - return new Promise(() => { - debouncedCompile(); - - chokidar.watch('src', { ignoreInitial: true }).on('all', (event, path) => { - grunt.log.writeln(event, path); - debouncedCompile(); - }); - }); - } -}; diff --git a/packages/kbn-ui-framework/README.md b/packages/kbn-ui-framework/README.md deleted file mode 100644 index fe36d202c5fbe2..00000000000000 --- a/packages/kbn-ui-framework/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# Deprecation notice - -This package is set for deprecation and is actively being removed from Kibana. - -The Kibana UI framework is a collection of React elements and Sass styles used to build legacy layouts in Kibana. It was -primarily used during the 5.x and 6.x versions and is replaced by the [Elastic UI framework](https://elastic.github.io/eui/). -Portions of Kibana still utilize this package and until it is fully removed you can still compile and view the -documentation using the instructions below. - -## Compiling KUI and viewing the docs - -Compile the CSS with `./node_modules/grunt/bin/grunt uiFramework:compileCss` (OS X) or -`.\node_modules\grunt\bin\grunt uiFramework:compileCss` (Windows). - -You can view interactive documentation by running `yarn uiFramework:start` and then visiting -[http://localhost:8020/](http://localhost:8020/). This will also start watching the SCSS files, and will recompile the CSS -automatically for you when you make changes. - -You can run `node scripts/jest --watch` to watch for changes and run the tests as you code. - -You can run `node scripts/jest --coverage` to generate a code coverage report to see how -fully-tested the code is. - -See the documentation in [`scripts/jest.js`](../scripts/jest.js) for more options. \ No newline at end of file diff --git a/packages/kbn-ui-framework/components/index.js b/packages/kbn-ui-framework/components/index.js deleted file mode 100644 index bcd5bd6f65cdfc..00000000000000 --- a/packages/kbn-ui-framework/components/index.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -export * from '../src/components'; diff --git a/packages/kbn-ui-framework/dist/kui_dark.css b/packages/kbn-ui-framework/dist/kui_dark.css deleted file mode 100644 index aa16bcdb34d368..00000000000000 --- a/packages/kbn-ui-framework/dist/kui_dark.css +++ /dev/null @@ -1,2470 +0,0 @@ -/* 1 */ -/* 1 */ -/** - * 1. Extend beta badges to at least 40% of the container's width - * 2. Fix for IE to ensure badges are visible outside of a - ); - } - - return ( -
- {hideChromeButton} - {previousButton} - {nextButton} -
- ); - } - - render() { - const classes = classNames('guideNav', { - 'is-guide-nav-open': this.props.isNavOpen, - 'is-chrome-hidden': !this.props.isChromeVisible, - }); - - const buttonClasses = classNames('guideNav__menu fa fa-bars', { - 'is-menu-button-pinned': this.props.isNavOpen, - }); - - const componentNavItems = this.props.components - .filter((item) => item.name.toLowerCase().indexOf(this.state.search.toLowerCase()) !== -1) - .map((item, index) => { - const icon = item.hasReact ?
: undefined; - return ( -
- - {item.name} - - - {icon} -
- ); - }); - - const sandboxNavItems = this.props.sandboxes - .filter((item) => item.name.toLowerCase().indexOf(this.state.search.toLowerCase()) !== -1) - .map((item, index) => { - const icon = item.hasReact ?
: undefined; - return ( -
- - {item.name} - - - {icon} -
- ); - }); - - return ( -
-
-
- - Kibana UI Framework {this.props.version} - - - - {this.renderPagination()} -
- -
- -
- -
-
-
Components
- - {componentNavItems.length ? componentNavItems : this.renderNoItems('components')} - -
Sandboxes
- - {sandboxNavItems.length ? sandboxNavItems : this.renderNoItems('sandboxes')} -
-
- - -
- ); - } -} - -GuideNav.propTypes = { - isChromeVisible: PropTypes.bool, - isNavOpen: PropTypes.bool, - isSandbox: PropTypes.bool, - onToggleNav: PropTypes.func, - onHideChrome: PropTypes.func, - onShowChrome: PropTypes.func, - onClickNavItem: PropTypes.func, - version: PropTypes.string, - routes: PropTypes.array, - getNextRoute: PropTypes.func, - getPreviousRoute: PropTypes.func, - components: PropTypes.array, - sandboxes: PropTypes.array, -}; diff --git a/packages/kbn-ui-framework/doc_site/src/components/guide_page/_guide_page.scss b/packages/kbn-ui-framework/doc_site/src/components/guide_page/_guide_page.scss deleted file mode 100644 index 92b55359fdaacf..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/components/guide_page/_guide_page.scss +++ /dev/null @@ -1,42 +0,0 @@ -.guidePage { - display: flex; - flex: 1 0 auto; - padding-bottom: 20px; -} - -.guidePageBody { - $topMargin: 40px; - $leftMargin: 120px + $guideSideNavWidth; - $rightMargin: 80px; - $scrollBarWidth: 20px; - - background-color: $guidePanelBackgroundColor; - border: $euiBorderThin; - border-radius: 4px; - flex: 1 1 auto; - padding: 40px 60px; - margin: $topMargin $rightMargin 0 $leftMargin; - width: calc(100vw - #{$leftMargin + $rightMargin + $scrollBarWidth}); - - .is-code-viewer-open & { - width: calc(100vw - #{$leftMargin + $rightMargin + $scrollBarWidth + $guideCodeViewerWidth}); - } - - @include whenNarrowerThan($guideNormalBreakpoint) { - $leftMargin: 20px + $guideSideNavSmallWidth; - $rightMargin: 20px; - - margin: $topMargin $rightMargin 0 $leftMargin; - width: calc(100vw - #{$leftMargin + $rightMargin + $scrollBarWidth}); - - .is-code-viewer-open & { - width: calc(100vw - #{$leftMargin + $rightMargin + $scrollBarWidth + $guideCodeViewerSmallWidth}); - } - } -} - -.guidePageKillScreen { - background-color: tintOrShade($euiColorDanger, 90%, 70%); - padding: $euiSizeL; - margin-bottom: $euiSizeL; -} diff --git a/packages/kbn-ui-framework/doc_site/src/components/guide_page/guide_page.js b/packages/kbn-ui-framework/doc_site/src/components/guide_page/guide_page.js deleted file mode 100644 index 636a0c4bb084d0..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/components/guide_page/guide_page.js +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import PropTypes from 'prop-types'; -import React, { Component } from 'react'; - -import { GuidePageSideNav, GuidePageSideNavItem } from '../'; - -export class GuidePage extends Component { - constructor(props) { - super(props); - - this.onClickLink = this.onClickLink.bind(this); - } - - onClickLink(id) { - // Scroll to element. - // eslint-disable-next-line no-undef - $('html, body').animate( - { - scrollTop: $(`#${id}`).offset().top - 100, // eslint-disable-line no-undef - }, - 250 - ); - } - - renderSideNavMenu() { - // Traverse sections and build side nav from it. - return this.props.sections.map((section, index) => { - return ( - - {section.name} - - ); - }); - } - - render() { - return ( -
- {this.renderSideNavMenu()} - - -
- ); - } -} - -GuidePage.propTypes = { - children: PropTypes.any, - title: PropTypes.string, - sections: PropTypes.array, -}; diff --git a/packages/kbn-ui-framework/doc_site/src/components/guide_page/guide_page_container.js b/packages/kbn-ui-framework/doc_site/src/components/guide_page/guide_page_container.js deleted file mode 100644 index 0a7442fce47239..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/components/guide_page/guide_page_container.js +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { connect } from 'react-redux'; -import { getSections } from '../../store'; -import { GuidePage } from './guide_page'; - -const mapStateToProps = (state) => ({ - sections: getSections(state), -}); - -export const GuidePageContainer = connect(mapStateToProps)(GuidePage); diff --git a/packages/kbn-ui-framework/doc_site/src/components/guide_page_side_nav/_guide_page_side_nav.scss b/packages/kbn-ui-framework/doc_site/src/components/guide_page_side_nav/_guide_page_side_nav.scss deleted file mode 100644 index 747464719e8451..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/components/guide_page_side_nav/_guide_page_side_nav.scss +++ /dev/null @@ -1,44 +0,0 @@ -.guidePageSideNav { - position: fixed; - top: 70px; - left: 10px; - bottom: 10px; - width: $guideSideNavWidth; - overflow: auto; - z-index: 100; - padding: 12px 20px; - - @include scrollbar; - - @include whenNarrowerThan($guideNormalBreakpoint) { - width: $guideSideNavSmallWidth; - } -} - - .guidePageSideNav__title { - padding-bottom: 10px; - margin-bottom: 7px; - font-size: 22px; - line-height: $guideLineHeight; - opacity: 0.8; - } - - .guidePageSideNavMenu { - line-height: $guideLineHeight; - } - - .guidePageSideNavMenu__item { - & + & { - margin-top: 6px; - } - } - - .guidePageSideNavMenu__itemLink { - cursor: pointer; - color: $guideTextColor; - text-decoration: none; - - &:hover { - color: $guideLinkHoverColor; - } - } diff --git a/packages/kbn-ui-framework/doc_site/src/components/guide_page_side_nav/guide_page_side_nav.js b/packages/kbn-ui-framework/doc_site/src/components/guide_page_side_nav/guide_page_side_nav.js deleted file mode 100644 index 9aeca1b30e03da..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/components/guide_page_side_nav/guide_page_side_nav.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import PropTypes from 'prop-types'; -import React from 'react'; - -export const GuidePageSideNav = (props) => { - return ( -
-
{props.title}
- -
{props.children}
-
- ); -}; - -GuidePageSideNav.propTypes = { - title: PropTypes.string, - children: PropTypes.any, -}; diff --git a/packages/kbn-ui-framework/doc_site/src/components/guide_page_side_nav/guide_page_side_nav_item.js b/packages/kbn-ui-framework/doc_site/src/components/guide_page_side_nav/guide_page_side_nav_item.js deleted file mode 100644 index 1c59de73b47a84..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/components/guide_page_side_nav/guide_page_side_nav_item.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import PropTypes from 'prop-types'; -import React, { Component } from 'react'; - -export class GuidePageSideNavItem extends Component { - constructor(props) { - super(props); - - this.onClick = this.onClick.bind(this); - } - - onClick() { - this.props.onClick(this.props.id); - } - - render() { - return ( -
-
- {this.props.children} -
-
- ); - } -} - -GuidePageSideNavItem.propTypes = { - id: PropTypes.string, - children: PropTypes.any, - onClick: PropTypes.func, -}; diff --git a/packages/kbn-ui-framework/doc_site/src/components/guide_sandbox/_guide_sandbox.scss b/packages/kbn-ui-framework/doc_site/src/components/guide_sandbox/_guide_sandbox.scss deleted file mode 100644 index 9a13abd7e8e6e7..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/components/guide_sandbox/_guide_sandbox.scss +++ /dev/null @@ -1,10 +0,0 @@ -.guideSandbox { - width: 100%; - height: 100%; -} - -.guideSandboxCodeToggle { - position: fixed; - top: 70px; - right: 10px; -} diff --git a/packages/kbn-ui-framework/doc_site/src/components/guide_sandbox/guide_sandbox.js b/packages/kbn-ui-framework/doc_site/src/components/guide_sandbox/guide_sandbox.js deleted file mode 100644 index 4ae5f04da91b17..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/components/guide_sandbox/guide_sandbox.js +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React, { Component } from 'react'; -import PropTypes from 'prop-types'; -import { bindActionCreators } from 'redux'; -import { connect } from 'react-redux'; - -import { getIsSandbox } from '../../store'; - -import { openSandbox, closeSandbox } from '../../actions'; - -function mapStateToProps(state) { - return { - isSandbox: getIsSandbox(state), - }; -} - -function mapDispatchToProps(dispatch) { - const actions = { - openSandbox, - closeSandbox, - }; - - return bindActionCreators(actions, dispatch); -} - -class GuideSandboxComponent extends Component { - UNSAFE_componentWillMount() { - this.props.openSandbox(); - } - - componentWillUnmount() { - this.props.closeSandbox(); - } - - render() { - return
{this.props.children}
; - } -} - -GuideSandboxComponent.propTypes = { - openSandbox: PropTypes.func, - closeSandbox: PropTypes.func, -}; - -export const GuideSandbox = connect(mapStateToProps, mapDispatchToProps)(GuideSandboxComponent); diff --git a/packages/kbn-ui-framework/doc_site/src/components/guide_sandbox/guide_sandbox_code_toggle.js b/packages/kbn-ui-framework/doc_site/src/components/guide_sandbox/guide_sandbox_code_toggle.js deleted file mode 100644 index fdec7904121322..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/components/guide_sandbox/guide_sandbox_code_toggle.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import PropTypes from 'prop-types'; -import React, { Component } from 'react'; - -export class GuideSandboxCodeToggle extends Component { - constructor(props) { - super(props); - this.onClickSource = this.onClickSource.bind(this); - } - - onClickSource() { - this.props.openCodeViewer(this.props.source, this.props.title); - } - - render() { - return ( - - ); - } -} - -GuideSandboxCodeToggle.propTypes = { - source: PropTypes.array, - title: PropTypes.string, - openCodeViewer: PropTypes.func, -}; diff --git a/packages/kbn-ui-framework/doc_site/src/components/guide_sandbox/guide_sandbox_code_toggle_container.js b/packages/kbn-ui-framework/doc_site/src/components/guide_sandbox/guide_sandbox_code_toggle_container.js deleted file mode 100644 index ace860d293e41d..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/components/guide_sandbox/guide_sandbox_code_toggle_container.js +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { connect } from 'react-redux'; - -import { GuideSandboxCodeToggle } from './guide_sandbox_code_toggle'; -import { openCodeViewer } from '../../actions'; - -export const GuideSandboxCodeToggleContainer = connect(null, { - openCodeViewer, -})(GuideSandboxCodeToggle); diff --git a/packages/kbn-ui-framework/doc_site/src/components/guide_section/_guide_section.scss b/packages/kbn-ui-framework/doc_site/src/components/guide_section/_guide_section.scss deleted file mode 100644 index 62f3f1b1686e93..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/components/guide_section/_guide_section.scss +++ /dev/null @@ -1,39 +0,0 @@ -.guideSection { - margin-bottom: 40px; -} - - .guideSection__header { - display: flex; - justify-content: space-between; - align-items: center; - padding-bottom: 2px; - line-height: $guideLineHeight; - } - - .guideSection__title { - font-size: 18px; - font-weight: 700; - } - - .guideSection__sourceButton { - appearance: none; - border: none; - line-height: 10px; - padding: 4px 10px; - color: $guideLinkHoverColor; - background-color: $euiColorEmptyShade; - border: 1px solid $guideLinkHoverColor; - border-radius: 3px; - cursor: pointer; - transform: translateX(0); - transition: transform $guideChromeTransition; - - &:hover, - &:active { - background-color: $euiColorLightestShade; - } - - .is-chrome-hidden & { - transform: translateX(60px); - } - } diff --git a/packages/kbn-ui-framework/doc_site/src/components/guide_section/guide_section.js b/packages/kbn-ui-framework/doc_site/src/components/guide_section/guide_section.js deleted file mode 100644 index 5af0788dae8369..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/components/guide_section/guide_section.js +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import PropTypes from 'prop-types'; -import React, { Component } from 'react'; - -import Slugify from '../../services/string/slugify'; - -export class GuideSection extends Component { - constructor(props) { - super(props); - this.onClickSource = this.onClickSource.bind(this); - } - - getId() { - return Slugify.one(this.props.title); - } - - onClickSource() { - this.props.openCodeViewer(this.props.source, this.props.title); - } - - UNSAFE_componentWillMount() { - this.props.registerSection(this.getId(), this.props.title); - } - - componentWillUnmount() { - this.props.unregisterSection(this.getId()); - } - - render() { - return ( -
-
-
{this.props.title}
- -
- - {this.props.children} -
- ); - } -} - -GuideSection.propTypes = { - title: PropTypes.string, - source: PropTypes.array, - children: PropTypes.any, - openCodeViewer: PropTypes.func, - registerSection: PropTypes.func, - unregisterSection: PropTypes.func, -}; diff --git a/packages/kbn-ui-framework/doc_site/src/components/guide_section/guide_section_container.js b/packages/kbn-ui-framework/doc_site/src/components/guide_section/guide_section_container.js deleted file mode 100644 index 52b10cdbf138d6..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/components/guide_section/guide_section_container.js +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { connect } from 'react-redux'; - -import { GuideSection } from './guide_section'; -import { openCodeViewer, registerSection, unregisterSection } from '../../actions'; - -export const GuideSectionContainer = connect(null, { - openCodeViewer, - registerSection, - unregisterSection, -})(GuideSection); diff --git a/packages/kbn-ui-framework/doc_site/src/components/guide_section/guide_section_types.js b/packages/kbn-ui-framework/doc_site/src/components/guide_section/guide_section_types.js deleted file mode 100644 index 9df404fad572fe..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/components/guide_section/guide_section_types.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -export const GuideSectionTypes = { - JS: 'JavaScript', - HTML: 'HTML', -}; diff --git a/packages/kbn-ui-framework/doc_site/src/components/guide_text/_guide_text.scss b/packages/kbn-ui-framework/doc_site/src/components/guide_text/_guide_text.scss deleted file mode 100644 index 11c6be092180bd..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/components/guide_text/_guide_text.scss +++ /dev/null @@ -1,16 +0,0 @@ -.guideTitle { - font-weight: 700; - font-size: 22px; - line-height: 1.5; - margin: 0; -} - -.guideText { - font-size: 14px; - line-height: 1.5; - margin: $guideVerticalRhythm 0 0; -} - -.guideText--noMargin { - margin-top: 0; -} diff --git a/packages/kbn-ui-framework/doc_site/src/components/guide_text/guide_text.js b/packages/kbn-ui-framework/doc_site/src/components/guide_text/guide_text.js deleted file mode 100644 index 820e4728da86db..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/components/guide_text/guide_text.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React from 'react'; - -export const GuideText = (props) =>
{props.children}
; diff --git a/packages/kbn-ui-framework/doc_site/src/components/index.js b/packages/kbn-ui-framework/doc_site/src/components/index.js deleted file mode 100644 index eb24f1eeca2210..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/components/index.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -export { GuideCode } from './guide_code/guide_code'; -export { GuideCodeViewer } from './guide_code_viewer/guide_code_viewer'; -export { GuideDemo } from './guide_demo/guide_demo'; -export { GuideLink } from './guide_link/guide_link'; -export { GuideNav } from './guide_nav/guide_nav'; -export { GuidePageContainer as GuidePage } from './guide_page/guide_page_container'; -export { GuidePageSideNav } from './guide_page_side_nav/guide_page_side_nav'; -export { GuidePageSideNavItem } from './guide_page_side_nav/guide_page_side_nav_item'; -export { GuideSandbox } from './guide_sandbox/guide_sandbox'; -export { GuideSandboxCodeToggleContainer as GuideSandboxCodeToggle } from './guide_sandbox/guide_sandbox_code_toggle_container'; -export { GuideSectionContainer as GuideSection } from './guide_section/guide_section_container'; -export { GuideSectionTypes } from './guide_section/guide_section_types'; -export { GuideText } from './guide_text/guide_text'; diff --git a/packages/kbn-ui-framework/doc_site/src/images/elastic-logo.svg b/packages/kbn-ui-framework/doc_site/src/images/elastic-logo.svg deleted file mode 100644 index 343f620499f1f4..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/images/elastic-logo.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/packages/kbn-ui-framework/doc_site/src/images/hint-arrow.svg b/packages/kbn-ui-framework/doc_site/src/images/hint-arrow.svg deleted file mode 100644 index b78f16f4bef4bc..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/images/hint-arrow.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - arrow - Created with Sketch. - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/kbn-ui-framework/doc_site/src/images/react-logo.svg b/packages/kbn-ui-framework/doc_site/src/images/react-logo.svg deleted file mode 100644 index 360cb427c9e6d8..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/images/react-logo.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - react-logo - Created with Sketch. - - - - - \ No newline at end of file diff --git a/packages/kbn-ui-framework/doc_site/src/index.js b/packages/kbn-ui-framework/doc_site/src/index.js deleted file mode 100644 index f7f1df059a0416..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/index.js +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -require('./main.scss'); - -import 'core-js/stable'; -import 'regenerator-runtime/runtime'; -import React from 'react'; -import ReactDOM from 'react-dom'; -import { Provider } from 'react-redux'; -import { Router, hashHistory } from 'react-router'; // eslint-disable-line - -// Store. -import configureStore from './store/configure_store'; - -// Guide views. -import AppContainer from './views/app_container'; -import { HomeView } from './views/home/home_view'; -import { NotFoundView } from './views/not_found/not_found_view'; - -import { Routes } from './services'; - -const store = configureStore(); - -const childRoutes = [].concat(Routes.getAppRoutes()); -childRoutes.push({ - path: '*', - component: NotFoundView, - name: 'Page Not Found', -}); - -const routes = [ - { - path: '/', - component: AppContainer, - indexRoute: { - component: HomeView, - source: 'views/home/HomeView', - }, - childRoutes, - }, -]; - -// Update document title with route name. -const onRouteEnter = (route) => { - const leafRoute = route.routes[route.routes.length - 1]; - document.title = leafRoute.name - ? `Kibana UI Framework - ${leafRoute.name}` - : 'Kibana UI Framework'; -}; - -const syncTitleWithRoutes = (routesList) => { - if (!routesList) return; - routesList.forEach((route) => { - route.onEnter = onRouteEnter; // eslint-disable-line no-param-reassign - if (route.indexRoute) { - // Index routes have a weird relationship with their "parent" routes, - // so it seems we need to give their own onEnter hooks. - route.indexRoute.onEnter = onRouteEnter; // eslint-disable-line no-param-reassign - } - syncTitleWithRoutes(route.childRoutes); - }); -}; - -syncTitleWithRoutes(routes); - -ReactDOM.render( - - - , - document.getElementById('guide') -); diff --git a/packages/kbn-ui-framework/doc_site/src/main.scss b/packages/kbn-ui-framework/doc_site/src/main.scss deleted file mode 100644 index 266a9eb7a933e8..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/main.scss +++ /dev/null @@ -1,7 +0,0 @@ -@import '~@elastic/eui/src/themes/eui/eui_colors_dark'; -@import '~@elastic/eui/src/global_styling/functions/index'; -@import '~@elastic/eui/src/global_styling/variables/index'; -@import '~@elastic/eui/src/global_styling/mixins/index'; -@import '~@elastic/eui/src/global_styling/reset/index'; -@import '../../dist/kui_dark.css'; -@import './components/guide_components'; diff --git a/packages/kbn-ui-framework/doc_site/src/services/example/create_example.js b/packages/kbn-ui-framework/doc_site/src/services/example/create_example.js deleted file mode 100644 index cf13bbf9b54b77..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/services/example/create_example.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* eslint import/named: 0 */ -import { GuideExample } from '../../components'; - -export default function creatExample(examples) { - class Example extends GuideExample { - constructor(props) { - super(props, examples); - } - } - - Example.propTypes = { - ...GuideExample.propTypes, - }; - - return Example; -} diff --git a/packages/kbn-ui-framework/doc_site/src/services/index.js b/packages/kbn-ui-framework/doc_site/src/services/index.js deleted file mode 100644 index a53cde2d549227..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/services/index.js +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -export { renderToHtml } from './string/render_to_html'; - -export { default as createExample } from './example/create_example'; - -export { default as JsInjector } from './js_injector/js_injector'; - -export { default as Routes } from './routes/routes'; - -export { default as Slugify } from './string/slugify'; diff --git a/packages/kbn-ui-framework/doc_site/src/services/js_injector/js_injector.js b/packages/kbn-ui-framework/doc_site/src/services/js_injector/js_injector.js deleted file mode 100644 index 48d032a4bc9e38..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/services/js_injector/js_injector.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import $ from 'jquery'; - -const ID_ATTRIBUTE = 'injected-js-tag-id'; - -export default { - inject(js, id) { - if (id) { - $(`[${ID_ATTRIBUTE}=${id}]`).remove(); - } - - const script = $(``); - $('body').append(script); - }, - - remove(id) { - $(`[${ID_ATTRIBUTE}=${id}]`).remove(); - }, -}; diff --git a/packages/kbn-ui-framework/doc_site/src/services/routes/routes.js b/packages/kbn-ui-framework/doc_site/src/services/routes/routes.js deleted file mode 100644 index 510a7fea7a0266..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/services/routes/routes.js +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import Slugify from '../string/slugify'; - -import BarExample from '../../views/bar/bar_example'; - -import ButtonExample from '../../views/button/button_example'; - -import CollapseButtonExample from '../../views/collapse_button/collapse_button_example'; - -import FormExample from '../../views/form/form_example'; - -import FormLayoutExample from '../../views/form_layout/form_layout_example'; - -import IconExample from '../../views/icon/icon_example'; - -import InfoPanelExample from '../../views/info_panel/info_panel_example'; - -import LinkExample from '../../views/link/link_example'; - -import LocalNavExample from '../../views/local_nav/local_nav_example'; - -import PagerExample from '../../views/pager/pager_example'; - -import PanelExample from '../../views/panel/panel_example'; - -import EmptyTablePromptExample from '../../views/empty_table_prompt/empty_table_prompt_example'; - -import StatusTextExample from '../../views/status_text/status_text_example'; - -import TableExample from '../../views/table/table_example'; - -import TabsExample from '../../views/tabs/tabs_example'; - -import ToolBarExample from '../../views/tool_bar/tool_bar_example'; - -import TypographyExample from '../../views/typography/typography_example'; - -import VerticalRhythmExample from '../../views/vertical_rhythm/vertical_rhythm_example'; - -import ViewSandbox from '../../views/view/view_sandbox'; - -// Component route names should match the component name exactly. -const components = [ - { - name: 'Bar', - component: BarExample, - hasReact: true, - }, - { - name: 'Button', - component: ButtonExample, - hasReact: true, - }, - { - name: 'CollapseButton', - component: CollapseButtonExample, - hasReact: true, - }, - { - name: 'EmptyTablePrompt', - component: EmptyTablePromptExample, - hasReact: true, - }, - { - name: 'Form', - component: FormExample, - }, - { - name: 'FormLayout', - component: FormLayoutExample, - hasReact: true, - }, - { - name: 'Icon', - component: IconExample, - }, - { - name: 'InfoPanel', - component: InfoPanelExample, - }, - { - name: 'Link', - component: LinkExample, - }, - { - name: 'LocalNav', - component: LocalNavExample, - hasReact: true, - }, - { - name: 'Pager', - component: PagerExample, - hasReact: true, - }, - { - name: 'Panel', - component: PanelExample, - }, - { - name: 'StatusText', - component: StatusTextExample, - }, - { - name: 'Table', - component: TableExample, - hasReact: true, - }, - { - name: 'Tabs', - component: TabsExample, - hasReact: true, - }, - { - name: 'ToolBar', - component: ToolBarExample, - hasReact: true, - }, - { - name: 'Typography', - component: TypographyExample, - }, - { - name: 'VerticalRhythm', - component: VerticalRhythmExample, - }, -]; - -const sandboxes = [ - { - name: 'View', - component: ViewSandbox, - }, -]; - -const allRoutes = components.concat(sandboxes); - -export default { - components: Slugify.each(components, 'name', 'path'), - sandboxes: Slugify.each(sandboxes, 'name', 'path'), - getAppRoutes: function getAppRoutes() { - return allRoutes; - }, - getPreviousRoute: function getPreviousRoute(routeName) { - const index = allRoutes.findIndex((item) => { - return item.name === routeName; - }); - - return index >= 0 ? allRoutes[index - 1] : undefined; - }, - getNextRoute: function getNextRoute(routeName) { - const index = allRoutes.findIndex((item) => { - return item.name === routeName; - }); - - return index < allRoutes.length - 1 ? allRoutes[index + 1] : undefined; - }, -}; diff --git a/packages/kbn-ui-framework/doc_site/src/services/string/render_to_html.js b/packages/kbn-ui-framework/doc_site/src/services/string/render_to_html.js deleted file mode 100644 index 4f0d1e772fec09..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/services/string/render_to_html.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React from 'react'; - -import { render, configure } from 'enzyme'; - -import EnzymeAdapter from 'enzyme-adapter-react-16'; - -import html from 'html'; - -configure({ adapter: new EnzymeAdapter() }); - -export function renderToHtml(componentReference, props = {}) { - // If there's a failure, just return an empty string. The actual component itself should - // trip an error boundary in the UI when it fails. - try { - // Create the React element, render it and get its HTML, then format it prettily. - const element = React.createElement(componentReference, props); - const htmlString = render(element).html(); - return html.prettyPrint(htmlString, { - indent_size: 2, - unformatted: [], // Expand all tags, including spans - }); - } catch (e) { - return ''; - } -} diff --git a/packages/kbn-ui-framework/doc_site/src/services/string/slugify.js b/packages/kbn-ui-framework/doc_site/src/services/string/slugify.js deleted file mode 100644 index 2e0678f5697740..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/services/string/slugify.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/** - * Lowercases input and replaces spaces with hyphens: - * e.g. 'GridView Example' -> 'gridview-example' - */ -function one(str) { - const parts = str - .toLowerCase() - .replace(/[-]+/g, ' ') - .replace(/[^\w^\s]+/g, '') - .replace(/ +/g, ' ') - .split(' '); - return parts.join('-'); -} - -function each(items, src, dest) { - return items.map((item) => { - const _item = item; - _item[dest] = one(_item[src]); - return _item; - }); -} - -export default { - one, - each, -}; diff --git a/packages/kbn-ui-framework/doc_site/src/store/configure_store.js b/packages/kbn-ui-framework/doc_site/src/store/configure_store.js deleted file mode 100644 index e6f6be88df41d7..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/store/configure_store.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { applyMiddleware, createStore, compose } from 'redux'; -import thunk from 'redux-thunk'; -import { browserHistory } from 'react-router'; // eslint-disable-line -import { routerMiddleware, routerReducer } from 'react-router-redux'; - -import codeViewerReducer from './reducers/code_viewer_reducer'; -import sandboxReducer from './reducers/sandbox_reducer'; -import sectionsReducer from './reducers/sections_reducer'; - -/** - * @param {Object} initialState An object defining the application's initial - * state. - */ -export default function configureStore(initialState) { - function rootReducer(state = {}, action) { - return { - routing: routerReducer(state.routing, action), - codeViewer: codeViewerReducer(state.codeViewer, action), - sandbox: sandboxReducer(state.sandbox, action), - sections: sectionsReducer(state.sections, action), - }; - } - - const finalStore = compose(applyMiddleware(thunk, routerMiddleware(browserHistory)))(createStore)( - rootReducer, - initialState - ); - - return finalStore; -} diff --git a/packages/kbn-ui-framework/doc_site/src/store/index.js b/packages/kbn-ui-framework/doc_site/src/store/index.js deleted file mode 100644 index 511143e529c6cd..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/store/index.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -export function getIsCodeViewerOpen(state) { - return state.codeViewer.isOpen; -} - -export function getIsSandbox(state) { - return state.sandbox.isSandbox; -} - -export function getSections(state) { - return state.sections.sections; -} - -export function getSource(state) { - return state.codeViewer.source; -} - -export function getTitle(state) { - return state.codeViewer.title; -} diff --git a/packages/kbn-ui-framework/doc_site/src/store/reducers/code_viewer_reducer.js b/packages/kbn-ui-framework/doc_site/src/store/reducers/code_viewer_reducer.js deleted file mode 100644 index 71b15a159d3473..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/store/reducers/code_viewer_reducer.js +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { LOCATION_CHANGE } from 'react-router-redux'; - -import ActionTypes from '../../actions/action_types'; - -const defaultState = { - isOpen: false, - codesBySlug: {}, - source: undefined, - title: undefined, -}; - -export default function codeViewerReducer(state = defaultState, action) { - switch (action.type) { - case ActionTypes.OPEN_CODE_VIEWER: { - const { source, title } = action; - - if (state.code === source) { - // If we are opening the existing code, then close the viewer. - return { - ...state, - isOpen: false, - source: undefined, - title: undefined, - }; - } - - return { - ...state, - isOpen: true, - source, - title, - }; - } - - case LOCATION_CHANGE: // Close Code Viewer when we navigate somewhere. - case ActionTypes.CLOSE_CODE_VIEWER: { - return { - ...state, - isOpen: false, - source: undefined, - }; - } - - default: - break; - } - - return state; -} diff --git a/packages/kbn-ui-framework/doc_site/src/store/reducers/sandbox_reducer.js b/packages/kbn-ui-framework/doc_site/src/store/reducers/sandbox_reducer.js deleted file mode 100644 index d03dd40f30f2f4..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/store/reducers/sandbox_reducer.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import ActionTypes from '../../actions/action_types'; - -const defaultState = { - isSandbox: false, -}; - -export default function sandboxReducer(state = defaultState, action) { - switch (action.type) { - case ActionTypes.OPEN_SANDBOX: { - return { - ...state, - isSandbox: true, - }; - } - - case ActionTypes.CLOSE_SANDBOX: { - return { - ...state, - isSandbox: false, - }; - } - - default: - break; - } - - return state; -} diff --git a/packages/kbn-ui-framework/doc_site/src/store/reducers/sections_reducer.js b/packages/kbn-ui-framework/doc_site/src/store/reducers/sections_reducer.js deleted file mode 100644 index a86580903de686..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/store/reducers/sections_reducer.js +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import ActionTypes from '../../actions/action_types'; - -const defaultState = { - sections: [], -}; - -export default function sectionsReducer(state = defaultState, action) { - switch (action.type) { - case ActionTypes.REGISTER_SECTION: { - const sections = state.sections.slice(); - sections.push({ - id: action.id, - name: action.name, - }); - - return { - ...state, - sections: sections, - }; - } - - case ActionTypes.UNREGISTER_SECTION: { - const sections = state.sections.slice(); - const index = sections.findIndex((section) => section.id === action.id); - sections.splice(index, 1); - - return { - ...state, - sections: sections, - }; - } - - default: - break; - } - - return state; -} diff --git a/packages/kbn-ui-framework/doc_site/src/views/app_container.js b/packages/kbn-ui-framework/doc_site/src/views/app_container.js deleted file mode 100644 index a7887647455294..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/views/app_container.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { bindActionCreators } from 'redux'; -import { connect } from 'react-redux'; - -import { getIsCodeViewerOpen, getIsSandbox, getSections, getSource, getTitle } from '../store'; - -import { AppView } from './app_view'; - -import { openCodeViewer, closeCodeViewer, registerSection, unregisterSection } from '../actions'; - -function mapStateToProps(state, ownProps) { - return { - routes: ownProps.routes, - isCodeViewerOpen: getIsCodeViewerOpen(state), - isSandbox: getIsSandbox(state), - source: getSource(state), - title: getTitle(state), - sections: getSections(state), - }; -} - -function mapDispatchToProps(dispatch) { - const actions = { - openCodeViewer, - closeCodeViewer, - registerSection, - unregisterSection, - }; - - return bindActionCreators(actions, dispatch); -} - -export default connect(mapStateToProps, mapDispatchToProps)(AppView); diff --git a/packages/kbn-ui-framework/doc_site/src/views/app_view.js b/packages/kbn-ui-framework/doc_site/src/views/app_view.js deleted file mode 100644 index 4a8b1d944f6e95..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/views/app_view.js +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import PropTypes from 'prop-types'; -import React, { Component } from 'react'; - -import classNames from 'classnames'; - -import { Routes } from '../services'; - -import { GuideCodeViewer, GuideNav } from '../components'; - -// Inject version into header. -const pkg = require('../../../../../package.json'); - -export class AppView extends Component { - constructor(props) { - super(props); - - this.state = { - isNavOpen: false, - isChromeVisible: !props.isSandbox, - }; - - this.onClickNavItem = this.onClickNavItem.bind(this); - this.onToggleNav = this.onToggleNav.bind(this); - this.onCloseCodeViewer = this.onCloseCodeViewer.bind(this); - this.onHideChrome = this.onHideChrome.bind(this); - this.onShowChrome = this.onShowChrome.bind(this); - } - - onClickNavItem() { - this.setState({ - isNavOpen: false, - }); - } - - onCloseCodeViewer() { - this.props.closeCodeViewer(); - } - - onToggleNav() { - this.setState({ - isNavOpen: !this.state.isNavOpen, - }); - } - - onHideChrome() { - this.setState({ - isChromeVisible: false, - isNavOpen: false, - }); - - this.props.closeCodeViewer(); - } - - onShowChrome() { - this.setState({ - isChromeVisible: true, - }); - } - - UNSAFE_componentWillReceiveProps(nextProps) { - // Only force the chrome to be hidden if we're navigating from a non-sandbox to a sandbox. - if (!this.props.isSandbox && nextProps.isSandbox) { - this.setState({ - isChromeVisible: false, - }); - } - } - - render() { - const contentClasses = classNames('guideContent', { - 'is-code-viewer-open': this.props.isCodeViewerOpen, - 'is-chrome-hidden': !this.state.isChromeVisible, - }); - - return ( -
- - -
{this.props.children}
- - -
- ); - } -} - -AppView.propTypes = { - children: PropTypes.any, - routes: PropTypes.array.isRequired, - isSandbox: PropTypes.bool, - openCodeViewer: PropTypes.func, - closeCodeViewer: PropTypes.func, - isCodeViewerOpen: PropTypes.bool, - registerSection: PropTypes.func, - unregisterSection: PropTypes.func, - sections: PropTypes.array, - source: PropTypes.array, - title: PropTypes.string, -}; - -AppView.defaultProps = { - source: [], -}; diff --git a/packages/kbn-ui-framework/doc_site/src/views/bar/bar.js b/packages/kbn-ui-framework/doc_site/src/views/bar/bar.js deleted file mode 100644 index 2505df14a6b904..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/views/bar/bar.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React from 'react'; - -import { KuiBar, KuiBarSection } from '../../../../components'; - -export default () => ( - - -
The Great American Novel
-
- - - - -
pages
-
-
-); diff --git a/packages/kbn-ui-framework/doc_site/src/views/bar/bar_example.js b/packages/kbn-ui-framework/doc_site/src/views/bar/bar_example.js deleted file mode 100644 index 9f2f1dec560550..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/views/bar/bar_example.js +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* eslint-disable import/no-duplicates */ - -import React from 'react'; -import { renderToHtml } from '../../services'; - -import { GuideDemo, GuidePage, GuideSection, GuideSectionTypes, GuideText } from '../../components'; - -import Bar from './bar'; -import barSource from '!!raw-loader!./bar'; -const barHtml = renderToHtml(Bar); - -import BarOneSection from './bar_one_section'; -import barOneSectionSource from '!!raw-loader!./bar_one_section'; -const barOneSectionHtml = renderToHtml(BarOneSection); - -import BarThreeSections from './bar_three_sections'; -import barThreeSectionsSource from '!!raw-loader!./bar_three_sections'; -const barThreeSectionsHtml = renderToHtml(BarThreeSections); - -export default (props) => ( - - - - Use the Bar to organize controls in a horizontal layout. This is especially useful for - surfacing controls in the corners of a view. - - - - Note: Instead of using this component with a Table, try using the - ControlledTable, ToolBar, and ToolBarFooter components. - - - - - - - - - - A Bar with one section will align it to the right, by default. To align it to the left, just - add another section and leave it empty, or don’t use a Bar at all. - - - - - - - - - - Technically the Bar can contain three or more sections, but there’s no established - use-case for this. - - - - - - - -); diff --git a/packages/kbn-ui-framework/doc_site/src/views/bar/bar_one_section.js b/packages/kbn-ui-framework/doc_site/src/views/bar/bar_one_section.js deleted file mode 100644 index 590b977fcb426c..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/views/bar/bar_one_section.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React from 'react'; - -import { KuiBar, KuiBarSection, KuiButton } from '../../../../components'; - -export default () => ( - - -
- See previous 10 pages - See next 10 pages -
-
-
-); diff --git a/packages/kbn-ui-framework/doc_site/src/views/bar/bar_three_sections.js b/packages/kbn-ui-framework/doc_site/src/views/bar/bar_three_sections.js deleted file mode 100644 index 522f4856775e6f..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/views/bar/bar_three_sections.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React from 'react'; - -import { KuiBar, KuiBarSection, KuiButton, KuiButtonGroup } from '../../../../components'; - -export default () => ( - - -
The Great American Novel
-
- - - - Create new page - Clear all pages - - - - - - -
pages
- - - Undo - Redo - -
-
-); diff --git a/packages/kbn-ui-framework/doc_site/src/views/button/button_basic.js b/packages/kbn-ui-framework/doc_site/src/views/button/button_basic.js deleted file mode 100644 index 281ce918628076..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/views/button/button_basic.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React from 'react'; - -import { KuiButton } from '../../../../components'; - -export default () => ( -
- window.alert('Button clicked')}> - Basic button - - -
-
- - window.alert('Button clicked')} disabled> - Basic button, disabled - -
-); diff --git a/packages/kbn-ui-framework/doc_site/src/views/button/button_danger.js b/packages/kbn-ui-framework/doc_site/src/views/button/button_danger.js deleted file mode 100644 index 96aa07638e7b09..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/views/button/button_danger.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React from 'react'; - -import { KuiButton } from '../../../../components'; - -export default () => ( -
- Danger button - -
-
- - - Danger button, disabled - -
-); diff --git a/packages/kbn-ui-framework/doc_site/src/views/button/button_elements.js b/packages/kbn-ui-framework/doc_site/src/views/button/button_elements.js deleted file mode 100644 index 74239ab9004d36..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/views/button/button_elements.js +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React from 'react'; - -import { KuiButton, KuiLinkButton, KuiSubmitButton } from '../../../../components'; - -export default () => ( -
- Button element - -
-
- -
{ - e.preventDefault(); - window.alert('Submit'); - }} - > - Submit input element -
- -
- -
{ - e.preventDefault(); - window.alert('Submit'); - }} - > - - Submit input element, disabled - -
- -
- - - Anchor element - - -
-
- - - Anchor element, disabled - -
-); diff --git a/packages/kbn-ui-framework/doc_site/src/views/button/button_example.js b/packages/kbn-ui-framework/doc_site/src/views/button/button_example.js deleted file mode 100644 index 4943748ab1830c..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/views/button/button_example.js +++ /dev/null @@ -1,332 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* eslint-disable import/no-duplicates */ - -import React from 'react'; - -import { renderToHtml } from '../../services'; - -import { GuideDemo, GuidePage, GuideSection, GuideSectionTypes, GuideText } from '../../components'; - -import Basic from './button_basic'; -import basicSource from '!!raw-loader!./button_basic'; -const basicHtml = renderToHtml(Basic); - -import Hollow from './button_hollow'; -import hollowSource from '!!raw-loader!./button_hollow'; -const hollowHtml = renderToHtml(Hollow); - -import Primary from './button_primary'; -import primarySource from '!!raw-loader!./button_primary'; -const primaryHtml = renderToHtml(Primary); - -import Secondary from './button_secondary'; -import secondarySource from '!!raw-loader!./button_secondary'; -const secondaryHtml = renderToHtml(Secondary); - -import Danger from './button_danger'; -import dangerSource from '!!raw-loader!./button_danger'; -const dangerHtml = renderToHtml(Danger); - -import Warning from './button_warning'; -import warningSource from '!!raw-loader!./button_danger'; -const warningHtml = renderToHtml(Warning); - -import Loading from './button_loading'; -import loadingSource from '!!raw-loader!./button_loading'; -const loadingHtml = renderToHtml(Loading, { isLoading: true }); - -import WithIcon from './button_with_icon'; -import withIconSource from '!!raw-loader!./button_with_icon'; -const withIconHtml = renderToHtml(WithIcon); - -import ButtonGroup from './button_group'; -import buttonGroupSource from '!!raw-loader!./button_group'; -const buttonGroupHtml = renderToHtml(ButtonGroup); - -import ButtonGroupUnited from './button_group_united'; -import buttonGroupUnitedSource from '!!raw-loader!./button_group_united'; -const buttonGroupUnitedHtml = renderToHtml(ButtonGroupUnited); - -import Elements from './button_elements'; -import elementsSource from '!!raw-loader!./button_elements'; -const elementsHtml = renderToHtml(Elements); - -import sizesHtml from './button_sizes.html'; - -export default (props) => ( - - - - Use the basic button for navigation elements or controls that are not the primary focus of - the page (ex: pagination, toggles...etc). - - - - - - - - - - Use the hollow Button when presenting a neutral action, e.g. a “Cancel” button. - - - - - - - - - - Use the primary Button to represent the most common action. Generally, there won’t be - a need to present more than one of these at a time. - - - - - - - - - - Secondary buttons are usually used for actions (“do this”) that are optional - actions on a page. - - - - - - - - - Danger Buttons represent irreversible, potentially regrettable actions. - - - - - - - - Warning Buttons represent potentially notable actions. - - - - - - - - - - - - - - -

- You can toss an icon into a Button, with or without text. You can also use a predefined - icon or specify custom icon classes. If you have a button without textual content, make - sure you set the aria-label attribute with a textual representation for - screen readers (see last example below). -

-
- - - - -
- - - - - - - - - - Use the united version of the ButtonGroup to emphasize the close relationship within a set - of Buttons, and differentiate them from Buttons outside of the set. - - - - They support containing a single Button, so that Buttons can be dynamically added and - removed. - - - - - - - - - - You can create a Button using a button element, link, or input[type=“submit”]. - - - - - - - - - - -
-); diff --git a/packages/kbn-ui-framework/doc_site/src/views/button/button_group.js b/packages/kbn-ui-framework/doc_site/src/views/button/button_group.js deleted file mode 100644 index 6834d662798fcb..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/views/button/button_group.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React from 'react'; - -import { KuiButton, KuiButtonGroup } from '../../../../components'; - -export default () => ( -
- - Cancel - - Duplicate - - Save - - -
- - - Button group with one button - -
-); diff --git a/packages/kbn-ui-framework/doc_site/src/views/button/button_group_united.js b/packages/kbn-ui-framework/doc_site/src/views/button/button_group_united.js deleted file mode 100644 index 33a3a95e42bb44..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/views/button/button_group_united.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React from 'react'; - -import { KuiButton, KuiButtonGroup, KuiButtonIcon } from '../../../../components'; - -export default () => ( -
- - Option A - - Option B - - Option C - - -
- - - } - /> - - } /> - -
-); diff --git a/packages/kbn-ui-framework/doc_site/src/views/button/button_hollow.js b/packages/kbn-ui-framework/doc_site/src/views/button/button_hollow.js deleted file mode 100644 index edc99875268d98..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/views/button/button_hollow.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React from 'react'; - -import { KuiButton } from '../../../../components'; - -export default () => ( -
- Hollow button - -
-
- - - Hollow button, disabled - -
-); diff --git a/packages/kbn-ui-framework/doc_site/src/views/button/button_loading.js b/packages/kbn-ui-framework/doc_site/src/views/button/button_loading.js deleted file mode 100644 index 764adddd500e8a..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/views/button/button_loading.js +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React, { Component } from 'react'; - -import { KuiButtonIcon, KuiButton } from '../../../../components'; - -export default class LoadingButton extends Component { - constructor(props) { - super(); - - this.state = { - isLoading: props.isLoading || false, - }; - - this.onClick = this.onClick.bind(this); - } - - onClick() { - this.setState({ - isLoading: true, - }); - - setTimeout(() => { - this.setState({ - isLoading: false, - }); - }, 3000); - } - - render() { - return ( -
- - {this.state.isLoading ? 'Loading...' : 'Load more'} - - -
-
- - } - isLoading={this.state.isLoading} - disabled={this.state.isLoading} - > - {this.state.isLoading ? 'Creating...' : 'Create'} - -
- ); - } -} diff --git a/packages/kbn-ui-framework/doc_site/src/views/button/button_primary.js b/packages/kbn-ui-framework/doc_site/src/views/button/button_primary.js deleted file mode 100644 index 27b9d0a83edb5e..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/views/button/button_primary.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React from 'react'; - -import { KuiButton } from '../../../../components'; - -export default () => ( -
- Primary button - -
-
- - - Primary button, disabled - -
-); diff --git a/packages/kbn-ui-framework/doc_site/src/views/button/button_secondary.js b/packages/kbn-ui-framework/doc_site/src/views/button/button_secondary.js deleted file mode 100644 index d1c6bba0d3b832..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/views/button/button_secondary.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React from 'react'; - -import { KuiButton } from '../../../../components'; - -export default () => ( -
- Secondary button - -
-
- - - Secondary button, disabled - -
-); diff --git a/packages/kbn-ui-framework/doc_site/src/views/button/button_sizes.html b/packages/kbn-ui-framework/doc_site/src/views/button/button_sizes.html deleted file mode 100644 index 36a27c78a48ce2..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/views/button/button_sizes.html +++ /dev/null @@ -1,55 +0,0 @@ -
- Small button -
- -
- -
- Small button with icon -
- -
- -
- Full-width button -
- -
- -
- Full-width button with icon -
- -
- -
-
- Button A -
- -
- Button B -
- -
- Button C -
-
- -
- -
-
- Button A -
- -
- Button B -
- -
- Button C -
-
diff --git a/packages/kbn-ui-framework/doc_site/src/views/button/button_warning.js b/packages/kbn-ui-framework/doc_site/src/views/button/button_warning.js deleted file mode 100644 index 8bc839bc12fe3d..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/views/button/button_warning.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React from 'react'; - -import { KuiButton } from '../../../../components'; - -export default () => ( -
- Warning button - -
-
- - - Warning button, disabled - -
-); diff --git a/packages/kbn-ui-framework/doc_site/src/views/button/button_with_icon.js b/packages/kbn-ui-framework/doc_site/src/views/button/button_with_icon.js deleted file mode 100644 index 95dc138d49ac23..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/views/button/button_with_icon.js +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React from 'react'; - -import { KuiButton, KuiButtonIcon } from '../../../../components'; - -export default () => ( -
- }> - Create - - -
-
- - }> - Delete - - -
-
- - }> - Previous - - -
-
- - } iconPosition="right"> - Next - - -
-
- - }> - Loading - - -
-
- - } - /> -
-); diff --git a/packages/kbn-ui-framework/doc_site/src/views/collapse_button/collapse_button.js b/packages/kbn-ui-framework/doc_site/src/views/collapse_button/collapse_button.js deleted file mode 100644 index 0cb1643cf9ff4b..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/views/collapse_button/collapse_button.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React from 'react'; - -import { KuiCollapseButton } from '../../../../components'; - -export default () => ( -
- - - - -
-); diff --git a/packages/kbn-ui-framework/doc_site/src/views/collapse_button/collapse_button_aria.js b/packages/kbn-ui-framework/doc_site/src/views/collapse_button/collapse_button_aria.js deleted file mode 100644 index 929180f70fee49..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/views/collapse_button/collapse_button_aria.js +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React, { Component } from 'react'; - -import { KuiCollapseButton } from '../../../../components'; - -import { htmlIdGenerator } from '../../../../src/services'; - -export default class extends Component { - constructor(props) { - super(props); - this.state = { - isExpanded: false, - }; - } - - onToggleContent = (ev) => { - ev.preventDefault(); - this.setState((state) => ({ - isExpanded: !state.isExpanded, - })); - }; - - render() { - const { isExpanded } = this.state; - const idGen = htmlIdGenerator(); - return ( -
- -
- Here is some collapsible content. -
-
- ); - } -} diff --git a/packages/kbn-ui-framework/doc_site/src/views/collapse_button/collapse_button_example.js b/packages/kbn-ui-framework/doc_site/src/views/collapse_button/collapse_button_example.js deleted file mode 100644 index 52e8a91b17aa96..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/views/collapse_button/collapse_button_example.js +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* eslint-disable import/no-duplicates */ - -import React from 'react'; -import { renderToHtml } from '../../services'; - -import { GuideDemo, GuidePage, GuideSection, GuideSectionTypes, GuideText } from '../../components'; - -import CollapseButton from './collapse_button'; -import collapseButtonSource from '!!raw-loader!./collapse_button'; -const collapseButtonHtml = renderToHtml(CollapseButton); - -import CollapseButtonAria from './collapse_button_aria'; -import collapseButtonAriaSource from '!!raw-loader!./collapse_button_aria'; -const collapseButtonAriaHtml = renderToHtml(CollapseButtonAria); - -export default (props) => ( - - - - Use this button to collapse and expand panels, drawers, sidebars, legends, and other - containers. - - - - - - - - - - To make an expandable element properly accessible you should add the following - ARIA-attributes to it: -
-
- aria-expanded -
-
- should be true or false depending on the state of the - collapsable content. -
-
- aria-controls -
-
- should reference the id of the actual collapsable content element. -
-
- aria-label -
-
- should contain a label like "Toggle panel" or preferably more specific what it - toggles (e.g. "Toggle filter actions"). You don’t need to switch the - label when the state changes, since a screen reader will use aria-expanded{' '} - to read out the current state. -
-
- The following example demonstrate the usage of these attributes. -
- - - - -
-
-); diff --git a/packages/kbn-ui-framework/doc_site/src/views/empty_table_prompt/empty_table_prompt.js b/packages/kbn-ui-framework/doc_site/src/views/empty_table_prompt/empty_table_prompt.js deleted file mode 100644 index b16e3459310ef2..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/views/empty_table_prompt/empty_table_prompt.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React from 'react'; - -import { KuiEmptyTablePrompt, KuiLinkButton, KuiButtonIcon } from '../../../../components'; - -export function EmptyTablePrompt() { - return ( - } - aria-label="Add a new item" - data-test-subj="addNewPromptButton" - buttonType="primary" - href="#" - > - Add a new item - - } - message="Uh oh, You have no items!" - /> - ); -} diff --git a/packages/kbn-ui-framework/doc_site/src/views/empty_table_prompt/empty_table_prompt_example.js b/packages/kbn-ui-framework/doc_site/src/views/empty_table_prompt/empty_table_prompt_example.js deleted file mode 100644 index 005d57a1d65a08..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/views/empty_table_prompt/empty_table_prompt_example.js +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* eslint-disable import/no-duplicates */ - -import React from 'react'; -import { renderToHtml } from '../../services'; - -import { GuideDemo, GuidePage, GuideSection, GuideSectionTypes, GuideText } from '../../components'; - -import { EmptyTablePrompt } from './empty_table_prompt'; -import emptyTablePromptSource from '!!raw-loader!./empty_table_prompt'; // eslint-disable-line import/default -const emptyTablePromptHtml = renderToHtml(EmptyTablePrompt); - -import { ControlledTableWithEmptyPrompt } from './table_with_empty_prompt'; -import tableWithEmptyPromptSource from '!!raw-loader!./table_with_empty_prompt'; // eslint-disable-line import/default -const tableWithEmptyPromptHtml = renderToHtml(ControlledTableWithEmptyPrompt); - -export default (props) => ( - - - - Use this prompt when a table has no results. It helps create space and provides a place to - prompt the user to follow some next actions, such as creating an item. - - - - - - - - - Wrap in an EmptyTablePromptPanel when using with a controlled table. - - - - - - -); diff --git a/packages/kbn-ui-framework/doc_site/src/views/empty_table_prompt/table_with_empty_prompt.js b/packages/kbn-ui-framework/doc_site/src/views/empty_table_prompt/table_with_empty_prompt.js deleted file mode 100644 index c36fe9ce4ad9c4..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/views/empty_table_prompt/table_with_empty_prompt.js +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React from 'react'; - -import { - KuiEmptyTablePrompt, - KuiEmptyTablePromptPanel, - KuiToolBar, - KuiToolBarSearchBox, - KuiPager, - KuiLinkButton, - KuiButtonIcon, - KuiButtonGroup, -} from '../../../../components'; - -export function ControlledTableWithEmptyPrompt() { - return ( -
- - {}} /> -
- {}} - onPreviousPage={() => {}} - /> -
-
- - - } - aria-label="Add a new dashboard" - data-test-subj="addNewDashPromptButton" - buttonType="primary" - href="#" - > - Add a new dashboard - - - } - aria-label="Add a new visualization" - data-test-subj="addNewVizPromptButton" - buttonType="primary" - href="#" - > - Add a new visualization - - - } - message="You have no items. Would you like to add one?" - /> - -
- ); -} diff --git a/packages/kbn-ui-framework/doc_site/src/views/form/assisted_input.html b/packages/kbn-ui-framework/doc_site/src/views/form/assisted_input.html deleted file mode 100644 index d950f0e501190d..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/views/form/assisted_input.html +++ /dev/null @@ -1,14 +0,0 @@ -
- - -
-

- API docs -

-
-
diff --git a/packages/kbn-ui-framework/doc_site/src/views/form/check_box.js b/packages/kbn-ui-framework/doc_site/src/views/form/check_box.js deleted file mode 100644 index f8ada967229973..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/views/form/check_box.js +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React, { Component } from 'react'; -import { KuiCheckBox, KuiCheckBoxLabel } from '../../../../components'; - -class KuiCheckBoxExample extends Component { - state = { - value1: false, - value2: true, - value3: true, - value4: false, - }; - - handleChange = (event, key) => { - this.setState({ [key]: event.target.checked }); - }; - - render() { - return ( -
- this.handleChange(event, 'value1')} - /> -
- this.handleChange(event, 'value2')} - /> -
- this.handleChange(event, 'value3')} - isDisabled - /> -
- this.handleChange(event, 'value4')} - /> -
- ); - } -} - -export default KuiCheckBoxExample; diff --git a/packages/kbn-ui-framework/doc_site/src/views/form/form_example.js b/packages/kbn-ui-framework/doc_site/src/views/form/form_example.js deleted file mode 100644 index 88edfc5242564d..00000000000000 --- a/packages/kbn-ui-framework/doc_site/src/views/form/form_example.js +++ /dev/null @@ -1,233 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* eslint-disable import/no-duplicates */ - -import React from 'react'; -import { renderToHtml } from '../../services'; - -import { - GuideCode, - GuideDemo, - GuidePage, - GuideSection, - GuideSectionTypes, - GuideText, -} from '../../components'; - -import assistedInputHtml from './assisted_input.html'; -import searchInputHtml from './search_input.html'; -import staticInputHtml from './static_input.html'; - -import Label from './label'; -import labelSource from '!!raw-loader!./label'; -const labelHtml = renderToHtml(Label); - -import TextInput from './text_input'; -import textInputSource from '!!raw-loader!./text_input'; -const textInputHtml = renderToHtml(TextInput, { id: '1' }); - -import TextArea from './text_area'; -import textAreaSource from '!!raw-loader!./text_area'; -const textAreaHtml = renderToHtml(TextArea); - -import TextAreaNonResizable from './text_area_non_resizable'; -import textAreaNonResizableSource from '!!raw-loader!./text_area_non_resizable'; -const textAreaNonResizableHtml = renderToHtml(TextAreaNonResizable); - -import Select from './select'; -import selectSource from '!!raw-loader!./select'; -const selectHtml = renderToHtml(Select); - -import CheckBox from './check_box'; -import checkBoxSource from '!!raw-loader!./check_box'; -const checkBoxHtml = renderToHtml(CheckBox); - -export default (props) => ( - - - - Never forget to label every input element. You can either use a label{' '} - element with a for attribute referencing the{' '} - id of the input field, wrap the input field - within the label element or use aria-label or{' '} - aria-labelledby. - - - - For the sake of simplicity we haven’t labeled the input elements on this page - correctly. - - - - - - - - - - - - - - - Note: You have to specify right-side padding using a custom class or inline - style to keep the input text from overlapping with the assistance content. Use{' '} - em units for this padding so that it scales appropriately if the user - changes their root font-size. - - - - - - - - - - - - Use StaticInput to display dynamic content in a form which the user isn’t allowed to - edit. - - - - - - - - -`; - -exports[`KuiTextArea renders 1`] = ` - -`; diff --git a/packages/kbn-ui-framework/src/components/form/text_area/_index.scss b/packages/kbn-ui-framework/src/components/form/text_area/_index.scss deleted file mode 100644 index 9fc6d14dd7c09e..00000000000000 --- a/packages/kbn-ui-framework/src/components/form/text_area/_index.scss +++ /dev/null @@ -1 +0,0 @@ -@import "text_area"; diff --git a/packages/kbn-ui-framework/src/components/form/text_area/_text_area.scss b/packages/kbn-ui-framework/src/components/form/text_area/_text_area.scss deleted file mode 100644 index e60ee9b0597c64..00000000000000 --- a/packages/kbn-ui-framework/src/components/form/text_area/_text_area.scss +++ /dev/null @@ -1,26 +0,0 @@ -.kuiTextArea { - width: $kuiFormFieldDefaultWidth; - - @include formControl; - - &:focus { - box-shadow: none; - @include formControlFocus; - } - - &.kuiTextArea-isInvalid { - @include formControlInvalid; - } -} - -.kuiTextArea--nonResizable { - resize: none; -} - -.kuiTextArea--small { - width: $kuiFormFieldSmallWidth; -} - -.kuiTextArea--large { - width: $kuiFormFieldLargeWidth; -} diff --git a/packages/kbn-ui-framework/src/components/form/text_area/index.js b/packages/kbn-ui-framework/src/components/form/text_area/index.js deleted file mode 100644 index 0328c65b1a4c16..00000000000000 --- a/packages/kbn-ui-framework/src/components/form/text_area/index.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -export { KuiTextArea } from './text_area'; diff --git a/packages/kbn-ui-framework/src/components/form/text_area/text_area.js b/packages/kbn-ui-framework/src/components/form/text_area/text_area.js deleted file mode 100644 index 4e5d9cece83d3c..00000000000000 --- a/packages/kbn-ui-framework/src/components/form/text_area/text_area.js +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React from 'react'; -import PropTypes from 'prop-types'; -import classNames from 'classnames'; - -const sizeToClassNameMap = { - small: 'kuiTextArea--small', - medium: undefined, - large: 'kuiTextArea--large', -}; - -export const TEXTAREA_SIZE = Object.keys(sizeToClassNameMap); - -export const KuiTextArea = ({ - className, - onChange, - isInvalid, - isNonResizable, - isDisabled, - size, - ...rest -}) => { - const classes = classNames( - 'kuiTextArea', - className, - { - 'kuiTextArea-isInvalid': isInvalid, - 'kuiTextArea--nonResizable': isNonResizable, - }, - sizeToClassNameMap[size] - ); - - return