From de997356c571fd47726beb2ee7cb4e2c107df3ea Mon Sep 17 00:00:00 2001 From: Tomasz Kajtoch Date: Wed, 6 Dec 2023 21:53:17 +0100 Subject: [PATCH 1/7] feat: setup new docs (#7386) Co-authored-by: Cee Chen <549407+cee-chen@users.noreply.github.com> --- .gitignore | 1 - website/.gitignore | 20 + website/README.md | 25 + website/babel.config.js | 3 + website/docs/components/combo_box.mdx | 25 + website/docs/guidelines/getting_started.mdx | 309 + website/docs/intro.md | 1 + website/docusaurus.config.ts | 82 + website/package.json | 46 + website/sidebars.ts | 31 + website/src/css/custom.css | 30 + website/src/pages/index.module.css | 23 + website/src/pages/index.tsx | 40 + website/static/favicon.ico | Bin 0 -> 15086 bytes website/static/images/eui_logo.svg | 7 + website/tsconfig.json | 7 + website/yarn.lock | 8563 +++++++++++++++++++ 17 files changed, 9212 insertions(+), 1 deletion(-) create mode 100644 website/.gitignore create mode 100644 website/README.md create mode 100644 website/babel.config.js create mode 100644 website/docs/components/combo_box.mdx create mode 100644 website/docs/guidelines/getting_started.mdx create mode 100644 website/docs/intro.md create mode 100644 website/docusaurus.config.ts create mode 100644 website/package.json create mode 100644 website/sidebars.ts create mode 100644 website/src/css/custom.css create mode 100644 website/src/pages/index.module.css create mode 100644 website/src/pages/index.tsx create mode 100644 website/static/favicon.ico create mode 100644 website/static/images/eui_logo.svg create mode 100644 website/tsconfig.json create mode 100644 website/yarn.lock diff --git a/.gitignore b/.gitignore index 3dad9362074..8ef0b049cd6 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,6 @@ coverage/ reports/ .nyc_output/ tmp/ -docs/ dist/ lib/ es/ diff --git a/website/.gitignore b/website/.gitignore new file mode 100644 index 00000000000..b2d6de30624 --- /dev/null +++ b/website/.gitignore @@ -0,0 +1,20 @@ +# Dependencies +/node_modules + +# Production +/build + +# Generated files +.docusaurus +.cache-loader + +# Misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/website/README.md b/website/README.md new file mode 100644 index 00000000000..07f432df8ef --- /dev/null +++ b/website/README.md @@ -0,0 +1,25 @@ +# Website + +This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator. + +### Installation + +``` +$ yarn +``` + +### Local Development + +``` +$ yarn start +``` + +This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. + +### Build + +``` +$ yarn build +``` + +This command generates static content into the `build` directory and can be served using any static contents hosting service. diff --git a/website/babel.config.js b/website/babel.config.js new file mode 100644 index 00000000000..e00595dae7d --- /dev/null +++ b/website/babel.config.js @@ -0,0 +1,3 @@ +module.exports = { + presets: [require.resolve('@docusaurus/core/lib/babel/preset')], +}; diff --git a/website/docs/components/combo_box.mdx b/website/docs/components/combo_box.mdx new file mode 100644 index 00000000000..d299ba1e0eb --- /dev/null +++ b/website/docs/components/combo_box.mdx @@ -0,0 +1,25 @@ +--- +title: EuiComboBox +slug: combo-box +--- + +Use a **EuiComboBox** when the input has so many options that the user needs to be able to search them, +the user needs to be able to select multiple options, and/or the user should have the ability to specify +a custom value in addition to selecting from a predetermined list. If you're unsure of which selection component +to use, see [EUI's in-depth guide to selection components](https://github.com/elastic/eui/discussions/7049) +for more information. + +:::info Accessibility +You must add an accessible label to each instance of EuiComboBox. + +Labels can be created by wrapping the combo box in an EuiFormRow with a label, adding an aria-label prop, +or passing a text node ID to the aria-labelledby prop. +::: + +