├── .eslintignore ├── .gitignore ├── .npmignore ├── .storybook ├── Select.story.tsx ├── main.js ├── manager-head.html ├── manager.js ├── preview.js ├── static │ ├── australia.svg │ ├── canada.svg │ ├── germany.svg │ ├── index.ts │ ├── japan.svg │ ├── logo.svg │ ├── options.mock.tsx │ ├── storybook.manager.css │ ├── storybook.preview.scss │ ├── sweden.svg │ ├── switzerland.svg │ ├── united_kingdom.svg │ └── united_states.svg └── templates │ ├── SelectMiltipleExample.tsx │ ├── SelectSingleExample.tsx │ ├── TemplateCustomOptions.tsx │ ├── TemplateCustomValue.tsx │ ├── TemplateMultiple.tsx │ ├── TemplateSingle.tsx │ └── index.ts ├── .vscode └── settings.json ├── CHANGELOG.md ├── LICENSE ├── README.md ├── babel.config.js ├── docs ├── 229.01997a2a8add2473116b.manager.bundle.js ├── 229.88a19c85.iframe.bundle.js ├── 295.223eb9bec083eddc34fe.manager.bundle.js ├── 51.6d936426.iframe.bundle.js ├── 51.6d936426.iframe.bundle.js.LICENSE.txt ├── 51.ed6f355dc48523569782.manager.bundle.js ├── 51.ed6f355dc48523569782.manager.bundle.js.LICENSE.txt ├── 551.13dd1811.iframe.bundle.js ├── 551.a6b072fedcf773ca497f.manager.bundle.js ├── 667.3b41f2fd.iframe.bundle.js ├── 667.3b41f2fd.iframe.bundle.js.LICENSE.txt ├── 701.ba29fb31.iframe.bundle.js ├── 745.ff01fbe3.iframe.bundle.js ├── 807.3f6e5527.iframe.bundle.js ├── 807.3f6e5527.iframe.bundle.js.LICENSE.txt ├── 807.79df300f37241c1d7fd3.manager.bundle.js ├── 807.79df300f37241c1d7fd3.manager.bundle.js.LICENSE.txt ├── 863.985396a1.iframe.bundle.js ├── 863.985396a1.iframe.bundle.js.LICENSE.txt ├── 897.4b7b5da4.iframe.bundle.js ├── 897.4b7b5da4.iframe.bundle.js.LICENSE.txt ├── 897.fb6b23057d54a49cd991.manager.bundle.js ├── 897.fb6b23057d54a49cd991.manager.bundle.js.LICENSE.txt ├── 935.0888ef1b976ca5eee32c.manager.bundle.js ├── 935.7fb34345.iframe.bundle.js ├── 991.f2f2eb3422c93b5c292f.manager.bundle.js ├── 991.f2f2eb3422c93b5c292f.manager.bundle.js.LICENSE.txt ├── favicon.ico ├── iframe.html ├── index.html ├── main.2d69bc10.iframe.bundle.js ├── main.b77887673a4132db2073.manager.bundle.js ├── project.json ├── runtime~main.20b0b20d1f298c057fdf.manager.bundle.js ├── runtime~main.3d1d13af.iframe.bundle.js └── static │ └── media │ ├── australia.17294a46.svg │ ├── canada.d6571367.svg │ ├── germany.06040a36.svg │ ├── japan.4b501c3b.svg │ ├── logo.15f45f33.svg │ ├── sweden.86348702.svg │ ├── switzerland.a197bc40.svg │ ├── united_kingdom.77926389.svg │ └── united_states.0138fef9.svg ├── package-lock.json ├── package.json ├── rollup.config.js ├── src ├── Select.spec.tsx ├── Select.tsx ├── Select.types.ts ├── components │ ├── dropdown │ │ ├── Dropdown.tsx │ │ ├── DropdownItem.tsx │ │ └── SelectAllButton.tsx │ ├── label │ │ └── SelectLabel.tsx │ ├── search │ │ └── Search.tsx │ └── value │ │ ├── SelectValue.tsx │ │ ├── SelectValueClear.tsx │ │ └── SelectValueTags.tsx ├── helpers │ ├── classNames.ts │ ├── events.ts │ ├── fireEvent.ts │ ├── mergeRefs.ts │ └── scrollIntoView.ts ├── index.ts └── select.scss └── tsconfig.json /.eslintignore: -------------------------------------------------------------------------------- 1 | dist 2 | test-coverage 3 | rollup.config.js 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .log 2 | .DS_Store 3 | .jest-* 4 | dist 5 | node_modules 6 | yarn-error.log 7 | build 8 | test-coverage 9 | .npmrc 10 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .github 2 | .jest-cache 3 | .storybook 4 | .vscode 5 | docs 6 | src 7 | test-coverage 8 | .eslintignore 9 | .gitignore 10 | babel.config.js 11 | rollup.config.js 12 | tsconfig.json 13 | yarn.lock 14 | @popperjs 15 | @popperjs/core 16 | -------------------------------------------------------------------------------- /.storybook/Select.story.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import { countryOptions } from './static/options.mock'; 4 | import { TemplateSingle, TemplateMultiple, TemplateCustomOptions, TemplateCustomValue } from './templates/'; 5 | import { Select } from '../src/Select'; 6 | import { SelectMultiple, SelectSingle } from '../src/Select.types'; 7 | 8 | 9 | export const Single = TemplateSingle.bind({}); 10 | 11 | Single.storyName = 'Single [default]'; 12 | 13 | Single.parameters = { 14 | actions: false, 15 | controls: false, 16 | options: { 17 | order: 1, 18 | showPanel: false 19 | } 20 | }; 21 | 22 | export const Multiple = TemplateMultiple.bind({}); 23 | 24 | Multiple.parameters = { 25 | actions: false, 26 | controls: false, 27 | options: { 28 | order: 2, 29 | showPanel: false 30 | } 31 | }; 32 | 33 | export const CustomOptions = TemplateCustomOptions.bind({}); 34 | 35 | CustomOptions.storyName = 'Custom Options'; 36 | 37 | CustomOptions.parameters = { 38 | actions: false, 39 | controls: false, 40 | options: { 41 | order: 3, 42 | showPanel: false 43 | } 44 | }; 45 | 46 | export const CustomValue = TemplateCustomValue.bind({}); 47 | 48 | CustomValue.storyName = 'Custom Value'; 49 | 50 | CustomValue.parameters = { 51 | actions: false, 52 | controls: false, 53 | options: { 54 | order: 4, 55 | showPanel: false 56 | } 57 | }; 58 | 59 | const PlaygroundTemplate = ({ multiple, value, ...props }) => { 60 | return ( 61 |
Sorry, but you either have no stories or none are selected somehow.
If the problem persists, check the browser console, or the terminal you've run Storybook from.