@nanoporetech-digital/components 1.15.6 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +70 -0
- package/dist/cjs/active-element-2f9bf0aa.js +21 -0
- package/dist/cjs/active-element-2f9bf0aa.js.map +1 -0
- package/dist/cjs/{algoliasearch.umd-0ccd70ce.js → algoliasearch.umd-79e17a1a.js} +3 -3
- package/dist/cjs/{algoliasearch.umd-0ccd70ce.js.map → algoliasearch.umd-79e17a1a.js.map} +1 -1
- package/dist/cjs/{dom-5f3fae1a.js → dom-52f9b8b7.js} +25 -6
- package/dist/cjs/dom-52f9b8b7.js.map +1 -0
- package/dist/cjs/form-control-3bc82e3e.js +80 -0
- package/dist/cjs/form-control-3bc82e3e.js.map +1 -0
- package/dist/cjs/{index-117f36a4.js → index-53d02e05.js} +12 -27
- package/dist/cjs/index-53d02e05.js.map +1 -0
- package/dist/cjs/index-cb62df44.js +12 -12
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{modal-01eed1bf.js → modal-f09e431f.js} +2 -2
- package/dist/cjs/{modal-01eed1bf.js.map → modal-f09e431f.js.map} +1 -1
- package/dist/cjs/nano-accordion.cjs.entry.js +2 -4
- package/dist/cjs/nano-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-alert.cjs.entry.js +6 -6
- package/dist/cjs/nano-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-algolia-filter.cjs.entry.js +1 -1
- package/dist/cjs/nano-algolia-filter.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-algolia-input.cjs.entry.js +1 -1
- package/dist/cjs/nano-algolia.cjs.entry.js +9 -5
- package/dist/cjs/nano-algolia.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-aspect-ratio.cjs.entry.js +1 -1
- package/dist/cjs/nano-aspect-ratio.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-checkbox-group.cjs.entry.js +4 -1
- package/dist/cjs/nano-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/nano-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-components.cjs.js +1 -1
- package/dist/cjs/nano-datalist_3.cjs.entry.js +790 -0
- package/dist/cjs/nano-datalist_3.cjs.entry.js.map +1 -0
- package/dist/cjs/nano-date-input.cjs.entry.js +9 -5
- package/dist/cjs/nano-date-input.cjs.entry.js.map +1 -1
- package/dist/cjs/{nano-date-picker_2.cjs.entry.js → nano-date-picker.cjs.entry.js} +2 -274
- package/dist/cjs/nano-date-picker.cjs.entry.js.map +1 -0
- package/dist/cjs/nano-details.cjs.entry.js +2 -2
- package/dist/cjs/nano-details.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-dialog.cjs.entry.js +5 -5
- package/dist/cjs/nano-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-drawer.cjs.entry.js +5 -5
- package/dist/cjs/nano-drawer.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-dropdown.cjs.entry.js +307 -0
- package/dist/cjs/nano-dropdown.cjs.entry.js.map +1 -0
- package/dist/cjs/nano-file-upload.cjs.entry.js +1 -1
- package/dist/cjs/nano-file-upload.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-global-nav.cjs.entry.js +19 -24
- package/dist/cjs/nano-global-nav.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-global-search-results.cjs.entry.js +200 -115
- package/dist/cjs/nano-global-search-results.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-grid_3.cjs.entry.js +15 -7
- package/dist/cjs/nano-grid_3.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-hero.cjs.entry.js +13 -5
- package/dist/cjs/nano-hero.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-icon-button.cjs.entry.js +2 -2
- package/dist/cjs/nano-icon-button.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-icon.cjs.entry.js +1 -1
- package/dist/cjs/nano-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-input.cjs.entry.js +80 -75
- package/dist/cjs/nano-input.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-menu-drawer.cjs.entry.js +2 -2
- package/dist/cjs/nano-menu-drawer.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-nav-item_2.cjs.entry.js +287 -533
- package/dist/cjs/nano-nav-item_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-range.cjs.entry.js +2 -2
- package/dist/cjs/nano-range.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-rating.cjs.entry.js +2 -2
- package/dist/cjs/nano-rating.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-resize-observe_2.cjs.entry.js +1 -1
- package/dist/cjs/nano-resize-observe_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-slide.cjs.entry.js +1 -1
- package/dist/cjs/nano-slide.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-slides.cjs.entry.js +1 -1
- package/dist/cjs/nano-slides.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-spinner.cjs.entry.js +1 -1
- package/dist/cjs/nano-spinner.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-sticker.cjs.entry.js +3 -3
- package/dist/cjs/nano-sticker.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-tab-content.cjs.entry.js +2 -2
- package/dist/cjs/nano-tab-content.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-tab-group.cjs.entry.js +72 -36
- package/dist/cjs/nano-tab-group.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-tab.cjs.entry.js +9 -2
- package/dist/cjs/nano-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/nano-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/{popover-d033efa2.js → popover-86f1775c.js} +10 -1
- package/dist/cjs/popover-86f1775c.js.map +1 -0
- package/dist/cjs/{scroll-d7753eed.js → scroll-6b9e6870.js} +2 -2
- package/dist/cjs/{scroll-d7753eed.js.map → scroll-6b9e6870.js.map} +1 -1
- package/dist/cjs/{tabbable-615c30e1.js → tabbable-de4c23d8.js} +8 -6
- package/dist/cjs/tabbable-de4c23d8.js.map +1 -0
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/accordion/accordion.css +3 -0
- package/dist/collection/components/accordion/accordion.js +2 -5
- package/dist/collection/components/accordion/accordion.js.map +1 -1
- package/dist/collection/components/alert/alert.css +5 -6
- package/dist/collection/components/alert/alert.helpers.js +2 -2
- package/dist/collection/components/alert/alert.helpers.js.map +1 -1
- package/dist/collection/components/alert/alert.js +1 -1
- package/dist/collection/components/algolia/algolia-filter.css +3 -0
- package/dist/collection/components/algolia/algolia-filter.js +2 -2
- package/dist/collection/components/algolia/algolia-input.js +5 -5
- package/dist/collection/components/algolia/algolia-results.js +1 -1
- package/dist/collection/components/algolia/algolia.css +3 -0
- package/dist/collection/components/algolia/algolia.js +6 -6
- package/dist/collection/components/aspect-ratio/aspect-ratio.css +3 -0
- package/dist/collection/components/checkbox/checkbox-group.css +3 -0
- package/dist/collection/components/checkbox/checkbox-group.js +5 -2
- package/dist/collection/components/checkbox/checkbox-group.js.map +1 -1
- package/dist/collection/components/checkbox/checkbox.css +3 -0
- package/dist/collection/components/checkbox/checkbox.js +3 -3
- package/dist/collection/components/datalist/datalist.css +55 -0
- package/dist/collection/components/datalist/datalist.js +796 -0
- package/dist/collection/components/datalist/datalist.js.map +1 -0
- package/dist/collection/components/date-input/date-input.css +3 -0
- package/dist/collection/components/date-input/date-input.js +18 -10
- package/dist/collection/components/date-input/date-input.js.map +1 -1
- package/dist/collection/components/date-picker/date-picker.css +3 -0
- package/dist/collection/components/date-picker/date-picker.js +5 -5
- package/dist/collection/components/details/details.css +3 -0
- package/dist/collection/components/details/details.js +2 -3
- package/dist/collection/components/details/details.js.map +1 -1
- package/dist/collection/components/dialog/dialog.css +4 -1
- package/dist/collection/components/dialog/dialog.helpers.js.map +1 -1
- package/dist/collection/components/dialog/dialog.js +1 -1
- package/dist/collection/components/drawer/drawer.css +3 -0
- package/dist/collection/components/dropdown/dropdown.css +19 -2
- package/dist/collection/components/dropdown/dropdown.js +56 -39
- package/dist/collection/components/dropdown/dropdown.js.map +1 -1
- package/dist/collection/components/file-upload/file-upload.css +5 -2
- package/dist/collection/components/file-upload/file-upload.js +4 -4
- package/dist/collection/components/form-control/form-control.js +73 -0
- package/dist/collection/components/form-control/form-control.js.map +1 -0
- package/dist/collection/components/global-nav/global-nav.css +43 -37
- package/dist/collection/components/global-nav/global-nav.js +21 -26
- package/dist/collection/components/global-nav/global-nav.js.map +1 -1
- package/dist/collection/components/global-search-results/global-search-results.css +299 -18
- package/dist/collection/components/global-search-results/global-search-results.js +200 -113
- package/dist/collection/components/global-search-results/global-search-results.js.map +1 -1
- package/dist/collection/components/grid/grid-item.css +3 -0
- package/dist/collection/components/grid/grid-item.js +1 -1
- package/dist/collection/components/grid/grid.css +3 -0
- package/dist/collection/components/grid/grid.js +37 -6
- package/dist/collection/components/grid/grid.js.map +1 -1
- package/dist/collection/components/hero/hero.css +13 -5
- package/dist/collection/components/hero/hero.js +32 -22
- package/dist/collection/components/hero/hero.js.map +1 -1
- package/dist/collection/components/icon/icon.css +3 -0
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/icon-button/icon-button.css +6 -1
- package/dist/collection/components/icon-button/icon-button.js +1 -1
- package/dist/collection/components/icon-button/icon-button.js.map +1 -1
- package/dist/collection/components/img/img.css +3 -0
- package/dist/collection/components/input/input.css +242 -232
- package/dist/collection/components/input/input.js +111 -114
- package/dist/collection/components/input/input.js.map +1 -1
- package/dist/collection/components/menu/menu.css +27 -35
- package/dist/collection/components/menu/menu.js +222 -48
- package/dist/collection/components/menu/menu.js.map +1 -1
- package/dist/collection/components/menu-drawer/menu-drawer.css +3 -0
- package/dist/collection/components/nav-item/nav-item.css +3 -0
- package/dist/collection/components/nav-item/nav-item.js +5 -5
- package/dist/collection/components/nav-item/nav-item.js.map +1 -1
- package/dist/collection/components/option/option-interface.js +5 -0
- package/dist/collection/components/option/option-interface.js.map +1 -0
- package/dist/collection/components/option/option.css +187 -0
- package/dist/collection/components/option/option.js +242 -0
- package/dist/collection/components/option/option.js.map +1 -0
- package/dist/collection/components/range/range.css +3 -0
- package/dist/collection/components/range/range.js +4 -4
- package/dist/collection/components/rating/rating.css +3 -0
- package/dist/collection/components/resize-observe/resize-observe.js +1 -1
- package/dist/collection/components/select/select.css +458 -391
- package/dist/collection/components/select/select.js +367 -607
- package/dist/collection/components/select/select.js.map +1 -1
- package/dist/collection/components/skeleton/skeleton.css +3 -0
- package/dist/collection/components/slides/slide.css +3 -0
- package/dist/collection/components/slides/slides.css +3 -0
- package/dist/collection/components/slides/slides.js +7 -7
- package/dist/collection/components/spinner/spinner.css +3 -0
- package/dist/collection/components/sticky/sticker.css +3 -0
- package/dist/collection/components/tabs/tab-content.css +3 -0
- package/dist/collection/components/tabs/tab-content.js +3 -3
- package/dist/collection/components/tabs/tab-content.js.map +1 -1
- package/dist/collection/components/tabs/tab-group.css +16 -5
- package/dist/collection/components/tabs/tab-group.js +137 -41
- package/dist/collection/components/tabs/tab-group.js.map +1 -1
- package/dist/collection/components/tabs/tab.css +36 -6
- package/dist/collection/components/tabs/tab.js +45 -2
- package/dist/collection/components/tabs/tab.js.map +1 -1
- package/dist/collection/components/tooltip/tooltip.css +3 -0
- package/dist/collection/utils/active-element.js +16 -0
- package/dist/collection/utils/active-element.js.map +1 -0
- package/dist/collection/utils/dom.js +24 -5
- package/dist/collection/utils/dom.js.map +1 -1
- package/dist/collection/utils/index.js +13 -13
- package/dist/collection/utils/index.js.map +1 -1
- package/dist/collection/utils/popover.js +9 -0
- package/dist/collection/utils/popover.js.map +1 -1
- package/dist/collection/utils/tabbable.js +7 -5
- package/dist/collection/utils/tabbable.js.map +1 -1
- package/dist/collection/utils/template.js +5 -1
- package/dist/collection/utils/template.js.map +1 -1
- package/dist/collection/utils/testing/index.js +11 -1
- package/dist/collection/utils/testing/index.js.map +1 -1
- package/dist/components/ResizeObserver.es.js +933 -0
- package/dist/components/ResizeObserver.es.js.map +1 -0
- package/dist/components/_commonjsHelpers.js +41 -0
- package/dist/components/_commonjsHelpers.js.map +1 -0
- package/dist/components/active-element.js +19 -0
- package/dist/components/active-element.js.map +1 -0
- package/dist/components/algolia-data.js +49 -0
- package/dist/components/algolia-data.js.map +1 -0
- package/dist/components/algolia.js +906 -0
- package/dist/components/algolia.js.map +1 -0
- package/dist/components/algoliasearch.umd.js +13 -0
- package/dist/components/algoliasearch.umd.js.map +1 -0
- package/dist/components/component-store.js +2234 -0
- package/dist/components/component-store.js.map +1 -0
- package/dist/components/datalist.js +557 -0
- package/dist/components/datalist.js.map +1 -0
- package/dist/components/date-picker.js +624 -0
- package/dist/components/date-picker.js.map +1 -0
- package/dist/{esm/dom-a791b223.js → components/dom.js} +25 -6
- package/dist/components/dom.js.map +1 -0
- package/dist/components/dropdown.js +332 -0
- package/dist/components/dropdown.js.map +1 -0
- package/dist/components/focus-visible.js +66 -0
- package/dist/components/focus-visible.js.map +1 -0
- package/dist/components/form-control.js +77 -0
- package/dist/components/form-control.js.map +1 -0
- package/dist/components/grid-item.js +112 -0
- package/dist/components/grid-item.js.map +1 -0
- package/dist/components/grid.js +276 -0
- package/dist/components/grid.js.map +1 -0
- package/dist/components/icon-button.js +70 -0
- package/dist/components/icon-button.js.map +1 -0
- package/dist/components/icon.js +269 -0
- package/dist/components/icon.js.map +1 -0
- package/dist/components/img.js +184 -0
- package/dist/components/img.js.map +1 -0
- package/dist/components/index.d.ts +26 -0
- package/dist/components/index.js +251 -0
- package/dist/components/index.js.map +1 -0
- package/dist/{esm/index-f41ae118.js → components/index2.js} +13 -27
- package/dist/components/index2.js.map +1 -0
- package/dist/components/index3.js +1075 -0
- package/dist/components/index3.js.map +1 -0
- package/dist/components/index4.js +637 -0
- package/dist/components/index4.js.map +1 -0
- package/dist/components/input.js +474 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/intersection-observer.js +985 -0
- package/dist/components/intersection-observer.js.map +1 -0
- package/dist/components/local-my-account.js +353 -0
- package/dist/components/local-my-account.js.map +1 -0
- package/dist/components/menu.js +235 -0
- package/dist/components/menu.js.map +1 -0
- package/dist/components/modal.js +48 -0
- package/dist/components/modal.js.map +1 -0
- package/dist/components/nano-accordion.d.ts +11 -0
- package/dist/components/nano-accordion.js +63 -0
- package/dist/components/nano-accordion.js.map +1 -0
- package/dist/components/nano-alert.d.ts +11 -0
- package/dist/components/nano-alert.js +296 -0
- package/dist/components/nano-alert.js.map +1 -0
- package/dist/components/nano-algolia-filter.d.ts +11 -0
- package/dist/components/nano-algolia-filter.js +317 -0
- package/dist/components/nano-algolia-filter.js.map +1 -0
- package/dist/components/nano-algolia-input.d.ts +11 -0
- package/dist/components/nano-algolia-input.js +224 -0
- package/dist/components/nano-algolia-input.js.map +1 -0
- package/dist/components/nano-algolia-pagination.d.ts +11 -0
- package/dist/components/nano-algolia-pagination.js +104 -0
- package/dist/components/nano-algolia-pagination.js.map +1 -0
- package/dist/components/nano-algolia-results.d.ts +11 -0
- package/dist/components/nano-algolia-results.js +224 -0
- package/dist/components/nano-algolia-results.js.map +1 -0
- package/dist/components/nano-algolia.d.ts +11 -0
- package/dist/components/nano-algolia.js +11 -0
- package/dist/components/nano-algolia.js.map +1 -0
- package/dist/components/nano-aspect-ratio.d.ts +11 -0
- package/dist/components/nano-aspect-ratio.js +74 -0
- package/dist/components/nano-aspect-ratio.js.map +1 -0
- package/dist/components/nano-checkbox-group.d.ts +11 -0
- package/dist/components/nano-checkbox-group.js +235 -0
- package/dist/components/nano-checkbox-group.js.map +1 -0
- package/dist/components/nano-checkbox.d.ts +11 -0
- package/dist/components/nano-checkbox.js +231 -0
- package/dist/components/nano-checkbox.js.map +1 -0
- package/dist/components/nano-datalist.d.ts +11 -0
- package/dist/components/nano-datalist.js +11 -0
- package/dist/components/nano-datalist.js.map +1 -0
- package/dist/components/nano-date-input.d.ts +11 -0
- package/dist/components/nano-date-input.js +408 -0
- package/dist/components/nano-date-input.js.map +1 -0
- package/dist/components/nano-date-picker.d.ts +11 -0
- package/dist/components/nano-date-picker.js +11 -0
- package/dist/components/nano-date-picker.js.map +1 -0
- package/dist/components/nano-details.d.ts +11 -0
- package/dist/components/nano-details.js +162 -0
- package/dist/components/nano-details.js.map +1 -0
- package/dist/components/nano-dialog.d.ts +11 -0
- package/dist/components/nano-dialog.js +231 -0
- package/dist/components/nano-dialog.js.map +1 -0
- package/dist/components/nano-drawer.d.ts +11 -0
- package/dist/components/nano-drawer.js +217 -0
- package/dist/components/nano-drawer.js.map +1 -0
- package/dist/components/nano-dropdown.d.ts +11 -0
- package/dist/components/nano-dropdown.js +11 -0
- package/dist/components/nano-dropdown.js.map +1 -0
- package/dist/components/nano-file-upload.d.ts +11 -0
- package/dist/components/nano-file-upload.js +421 -0
- package/dist/components/nano-file-upload.js.map +1 -0
- package/dist/components/nano-global-nav.d.ts +11 -0
- package/dist/components/nano-global-nav.js +1221 -0
- package/dist/components/nano-global-nav.js.map +1 -0
- package/dist/components/nano-global-search-results.d.ts +11 -0
- package/dist/components/nano-global-search-results.js +608 -0
- package/dist/components/nano-global-search-results.js.map +1 -0
- package/dist/components/nano-grid-item.d.ts +11 -0
- package/dist/components/nano-grid-item.js +11 -0
- package/dist/components/nano-grid-item.js.map +1 -0
- package/dist/components/nano-grid.d.ts +11 -0
- package/dist/components/nano-grid.js +11 -0
- package/dist/components/nano-grid.js.map +1 -0
- package/dist/components/nano-hero.d.ts +11 -0
- package/dist/components/nano-hero.js +187 -0
- package/dist/components/nano-hero.js.map +1 -0
- package/dist/components/nano-icon-button.d.ts +11 -0
- package/dist/components/nano-icon-button.js +11 -0
- package/dist/components/nano-icon-button.js.map +1 -0
- package/dist/components/nano-icon.d.ts +11 -0
- package/dist/components/nano-icon.js +11 -0
- package/dist/components/nano-icon.js.map +1 -0
- package/dist/components/nano-img.d.ts +11 -0
- package/dist/components/nano-img.js +11 -0
- package/dist/components/nano-img.js.map +1 -0
- package/dist/components/nano-input.d.ts +11 -0
- package/dist/components/nano-input.js +11 -0
- package/dist/components/nano-input.js.map +1 -0
- package/dist/components/nano-menu-drawer.d.ts +11 -0
- package/dist/components/nano-menu-drawer.js +221 -0
- package/dist/components/nano-menu-drawer.js.map +1 -0
- package/dist/components/nano-menu.d.ts +11 -0
- package/dist/components/nano-menu.js +11 -0
- package/dist/components/nano-menu.js.map +1 -0
- package/dist/components/nano-nav-item.d.ts +11 -0
- package/dist/components/nano-nav-item.js +11 -0
- package/dist/components/nano-nav-item.js.map +1 -0
- package/dist/components/nano-option.d.ts +11 -0
- package/dist/components/nano-option.js +11 -0
- package/dist/components/nano-option.js.map +1 -0
- package/dist/components/nano-range.d.ts +11 -0
- package/dist/components/nano-range.js +430 -0
- package/dist/components/nano-range.js.map +1 -0
- package/dist/components/nano-rating.d.ts +11 -0
- package/dist/components/nano-rating.js +240 -0
- package/dist/components/nano-rating.js.map +1 -0
- package/dist/components/nano-resize-observe.d.ts +11 -0
- package/dist/components/nano-resize-observe.js +11 -0
- package/dist/components/nano-resize-observe.js.map +1 -0
- package/dist/components/nano-select.d.ts +11 -0
- package/dist/components/nano-select.js +11 -0
- package/dist/components/nano-select.js.map +1 -0
- package/dist/components/nano-skeleton.d.ts +11 -0
- package/dist/components/nano-skeleton.js +11 -0
- package/dist/components/nano-skeleton.js.map +1 -0
- package/dist/components/nano-slide.d.ts +11 -0
- package/dist/components/nano-slide.js +66 -0
- package/dist/components/nano-slide.js.map +1 -0
- package/dist/components/nano-slides.d.ts +11 -0
- package/dist/components/nano-slides.js +4335 -0
- package/dist/components/nano-slides.js.map +1 -0
- package/dist/components/nano-spinner.d.ts +11 -0
- package/dist/components/nano-spinner.js +11 -0
- package/dist/components/nano-spinner.js.map +1 -0
- package/dist/components/nano-sticker.d.ts +11 -0
- package/dist/components/nano-sticker.js +11 -0
- package/dist/components/nano-sticker.js.map +1 -0
- package/dist/components/nano-tab-content.d.ts +11 -0
- package/dist/components/nano-tab-content.js +49 -0
- package/dist/components/nano-tab-content.js.map +1 -0
- package/dist/components/nano-tab-group.d.ts +11 -0
- package/dist/components/nano-tab-group.js +460 -0
- package/dist/components/nano-tab-group.js.map +1 -0
- package/dist/components/nano-tab.d.ts +11 -0
- package/dist/components/nano-tab.js +86 -0
- package/dist/components/nano-tab.js.map +1 -0
- package/dist/components/nano-tooltip.d.ts +11 -0
- package/dist/components/nano-tooltip.js +11 -0
- package/dist/components/nano-tooltip.js.map +1 -0
- package/dist/components/nav-item.js +327 -0
- package/dist/components/nav-item.js.map +1 -0
- package/dist/components/option.js +120 -0
- package/dist/components/option.js.map +1 -0
- package/dist/{esm/popover-2c7b2326.js → components/popover.js} +10 -1
- package/dist/components/popover.js.map +1 -0
- package/dist/components/resize-observe.js +162 -0
- package/dist/components/resize-observe.js.map +1 -0
- package/dist/{esm/scroll-5cd0ab13.js → components/scroll.js} +2 -2
- package/dist/components/scroll.js.map +1 -0
- package/dist/components/select.js +670 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/skeleton.js +43 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/slot.js +48 -0
- package/dist/components/slot.js.map +1 -0
- package/dist/components/spinner.js +49 -0
- package/dist/components/spinner.js.map +1 -0
- package/dist/components/sticker.js +665 -0
- package/dist/components/sticker.js.map +1 -0
- package/dist/{esm/tabbable-e21f860a.js → components/tabbable.js} +8 -6
- package/dist/components/tabbable.js.map +1 -0
- package/dist/components/theme.js +29 -0
- package/dist/components/theme.js.map +1 -0
- package/dist/components/throttle.js +55 -0
- package/dist/components/throttle.js.map +1 -0
- package/dist/components/tooltip.js +216 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/custom-elements/index.d.ts +12 -6
- package/dist/custom-elements/index.js +1745 -1116
- package/dist/custom-elements/index.js.map +1 -1
- package/dist/esm/active-element-75b7c8a0.js +19 -0
- package/dist/esm/active-element-75b7c8a0.js.map +1 -0
- package/dist/esm/{algoliasearch.umd-8e5aff52.js → algoliasearch.umd-6d09b727.js} +3 -3
- package/dist/esm/{algoliasearch.umd-8e5aff52.js.map → algoliasearch.umd-6d09b727.js.map} +1 -1
- package/dist/esm/dom-faa69d29.js +75 -0
- package/dist/esm/dom-faa69d29.js.map +1 -0
- package/dist/esm/form-control-67eeb108.js +77 -0
- package/dist/esm/form-control-67eeb108.js.map +1 -0
- package/dist/esm/index-5f8d16e7.js +12 -12
- package/dist/esm/index-bf53664b.js +74 -0
- package/dist/esm/{index-f41ae118.js.map → index-bf53664b.js.map} +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{modal-eb0a9bb3.js → modal-215df46b.js} +2 -2
- package/dist/esm/{modal-eb0a9bb3.js.map → modal-215df46b.js.map} +1 -1
- package/dist/esm/nano-accordion.entry.js +2 -4
- package/dist/esm/nano-accordion.entry.js.map +1 -1
- package/dist/esm/nano-alert.entry.js +6 -6
- package/dist/esm/nano-alert.entry.js.map +1 -1
- package/dist/esm/nano-algolia-filter.entry.js +1 -1
- package/dist/esm/nano-algolia-filter.entry.js.map +1 -1
- package/dist/esm/nano-algolia-input.entry.js +1 -1
- package/dist/esm/nano-algolia.entry.js +9 -5
- package/dist/esm/nano-algolia.entry.js.map +1 -1
- package/dist/esm/nano-aspect-ratio.entry.js +1 -1
- package/dist/esm/nano-aspect-ratio.entry.js.map +1 -1
- package/dist/esm/nano-checkbox-group.entry.js +4 -1
- package/dist/esm/nano-checkbox-group.entry.js.map +1 -1
- package/dist/esm/nano-checkbox.entry.js +1 -1
- package/dist/esm/nano-checkbox.entry.js.map +1 -1
- package/dist/esm/nano-components.js +1 -1
- package/dist/esm/nano-datalist_3.entry.js +784 -0
- package/dist/esm/nano-datalist_3.entry.js.map +1 -0
- package/dist/esm/nano-date-input.entry.js +9 -5
- package/dist/esm/nano-date-input.entry.js.map +1 -1
- package/dist/esm/{nano-date-picker_2.entry.js → nano-date-picker.entry.js} +3 -274
- package/dist/esm/nano-date-picker.entry.js.map +1 -0
- package/dist/esm/nano-details.entry.js +2 -2
- package/dist/esm/nano-details.entry.js.map +1 -1
- package/dist/esm/nano-dialog.entry.js +5 -5
- package/dist/esm/nano-dialog.entry.js.map +1 -1
- package/dist/esm/nano-drawer.entry.js +5 -5
- package/dist/esm/nano-drawer.entry.js.map +1 -1
- package/dist/esm/nano-dropdown.entry.js +303 -0
- package/dist/esm/nano-dropdown.entry.js.map +1 -0
- package/dist/esm/nano-file-upload.entry.js +1 -1
- package/dist/esm/nano-file-upload.entry.js.map +1 -1
- package/dist/esm/nano-global-nav.entry.js +19 -24
- package/dist/esm/nano-global-nav.entry.js.map +1 -1
- package/dist/esm/nano-global-search-results.entry.js +200 -115
- package/dist/esm/nano-global-search-results.entry.js.map +1 -1
- package/dist/esm/nano-grid_3.entry.js +16 -8
- package/dist/esm/nano-grid_3.entry.js.map +1 -1
- package/dist/esm/nano-hero.entry.js +14 -6
- package/dist/esm/nano-hero.entry.js.map +1 -1
- package/dist/esm/nano-icon-button.entry.js +2 -2
- package/dist/esm/nano-icon-button.entry.js.map +1 -1
- package/dist/esm/nano-icon.entry.js +1 -1
- package/dist/esm/nano-icon.entry.js.map +1 -1
- package/dist/esm/nano-input.entry.js +80 -75
- package/dist/esm/nano-input.entry.js.map +1 -1
- package/dist/esm/nano-menu-drawer.entry.js +2 -2
- package/dist/esm/nano-menu-drawer.entry.js.map +1 -1
- package/dist/esm/nano-nav-item_2.entry.js +287 -533
- package/dist/esm/nano-nav-item_2.entry.js.map +1 -1
- package/dist/esm/nano-range.entry.js +2 -2
- package/dist/esm/nano-range.entry.js.map +1 -1
- package/dist/esm/nano-rating.entry.js +2 -2
- package/dist/esm/nano-rating.entry.js.map +1 -1
- package/dist/esm/nano-resize-observe_2.entry.js +1 -1
- package/dist/esm/nano-resize-observe_2.entry.js.map +1 -1
- package/dist/esm/nano-slide.entry.js +1 -1
- package/dist/esm/nano-slide.entry.js.map +1 -1
- package/dist/esm/nano-slides.entry.js +1 -1
- package/dist/esm/nano-slides.entry.js.map +1 -1
- package/dist/esm/nano-spinner.entry.js +1 -1
- package/dist/esm/nano-spinner.entry.js.map +1 -1
- package/dist/esm/nano-sticker.entry.js +3 -3
- package/dist/esm/nano-sticker.entry.js.map +1 -1
- package/dist/esm/nano-tab-content.entry.js +2 -2
- package/dist/esm/nano-tab-content.entry.js.map +1 -1
- package/dist/esm/nano-tab-group.entry.js +72 -36
- package/dist/esm/nano-tab-group.entry.js.map +1 -1
- package/dist/esm/nano-tab.entry.js +10 -3
- package/dist/esm/nano-tab.entry.js.map +1 -1
- package/dist/esm/nano-tooltip.entry.js +2 -2
- package/dist/esm/nano-tooltip.entry.js.map +1 -1
- package/dist/esm/popover-db86a392.js +1893 -0
- package/dist/esm/popover-db86a392.js.map +1 -0
- package/dist/esm/scroll-881feb46.js +76 -0
- package/dist/esm/{scroll-5cd0ab13.js.map → scroll-881feb46.js.map} +1 -1
- package/dist/esm/tabbable-614f515e.js +94 -0
- package/dist/esm/tabbable-614f515e.js.map +1 -0
- package/dist/esm-es5/active-element-75b7c8a0.js +5 -0
- package/dist/esm-es5/active-element-75b7c8a0.js.map +1 -0
- package/dist/esm-es5/{algoliasearch.umd-8e5aff52.js → algoliasearch.umd-6d09b727.js} +3 -3
- package/dist/esm-es5/{algoliasearch.umd-8e5aff52.js.map → algoliasearch.umd-6d09b727.js.map} +1 -1
- package/dist/esm-es5/dom-faa69d29.js +5 -0
- package/dist/esm-es5/dom-faa69d29.js.map +1 -0
- package/dist/esm-es5/form-control-67eeb108.js +5 -0
- package/dist/esm-es5/form-control-67eeb108.js.map +1 -0
- package/dist/esm-es5/index-5f8d16e7.js +1 -1
- package/dist/esm-es5/index-bf53664b.js +5 -0
- package/dist/esm-es5/index-bf53664b.js.map +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/index.js.map +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/esm-es5/{modal-eb0a9bb3.js → modal-215df46b.js} +2 -2
- package/dist/esm-es5/{modal-eb0a9bb3.js.map → modal-215df46b.js.map} +0 -0
- package/dist/esm-es5/nano-accordion.entry.js +1 -1
- package/dist/esm-es5/nano-accordion.entry.js.map +1 -1
- package/dist/esm-es5/nano-alert.entry.js +1 -1
- package/dist/esm-es5/nano-alert.entry.js.map +1 -1
- package/dist/esm-es5/nano-algolia-filter.entry.js +1 -1
- package/dist/esm-es5/nano-algolia-filter.entry.js.map +1 -1
- package/dist/esm-es5/nano-algolia-input.entry.js +1 -1
- package/dist/esm-es5/nano-algolia.entry.js +1 -1
- package/dist/esm-es5/nano-algolia.entry.js.map +1 -1
- package/dist/esm-es5/nano-aspect-ratio.entry.js +1 -1
- package/dist/esm-es5/nano-aspect-ratio.entry.js.map +1 -1
- package/dist/esm-es5/nano-checkbox-group.entry.js +1 -1
- package/dist/esm-es5/nano-checkbox-group.entry.js.map +1 -1
- package/dist/esm-es5/nano-checkbox.entry.js +1 -1
- package/dist/esm-es5/nano-checkbox.entry.js.map +1 -1
- package/dist/esm-es5/nano-components.js +1 -1
- package/dist/esm-es5/nano-components.js.map +1 -1
- package/dist/esm-es5/nano-datalist_3.entry.js +5 -0
- package/dist/esm-es5/nano-datalist_3.entry.js.map +1 -0
- package/dist/esm-es5/nano-date-input.entry.js +1 -1
- package/dist/esm-es5/nano-date-input.entry.js.map +1 -1
- package/dist/esm-es5/nano-date-picker.entry.js +5 -0
- package/dist/esm-es5/nano-date-picker.entry.js.map +1 -0
- package/dist/esm-es5/nano-details.entry.js +1 -1
- package/dist/esm-es5/nano-details.entry.js.map +1 -1
- package/dist/esm-es5/nano-dialog.entry.js +1 -1
- package/dist/esm-es5/nano-dialog.entry.js.map +1 -1
- package/dist/esm-es5/nano-drawer.entry.js +1 -1
- package/dist/esm-es5/nano-drawer.entry.js.map +1 -1
- package/dist/esm-es5/nano-dropdown.entry.js +5 -0
- package/dist/esm-es5/nano-dropdown.entry.js.map +1 -0
- package/dist/esm-es5/nano-file-upload.entry.js +1 -1
- package/dist/esm-es5/nano-file-upload.entry.js.map +1 -1
- package/dist/esm-es5/nano-global-nav.entry.js +1 -1
- package/dist/esm-es5/nano-global-nav.entry.js.map +1 -1
- package/dist/esm-es5/nano-global-search-results.entry.js +2 -2
- package/dist/esm-es5/nano-global-search-results.entry.js.map +1 -1
- package/dist/esm-es5/nano-grid_3.entry.js +1 -1
- package/dist/esm-es5/nano-grid_3.entry.js.map +1 -1
- package/dist/esm-es5/nano-hero.entry.js +1 -1
- package/dist/esm-es5/nano-hero.entry.js.map +1 -1
- package/dist/esm-es5/nano-icon-button.entry.js +1 -1
- package/dist/esm-es5/nano-icon-button.entry.js.map +1 -1
- package/dist/esm-es5/nano-icon.entry.js +1 -1
- package/dist/esm-es5/nano-icon.entry.js.map +1 -1
- package/dist/esm-es5/nano-input.entry.js +2 -2
- package/dist/esm-es5/nano-input.entry.js.map +1 -1
- package/dist/esm-es5/nano-menu-drawer.entry.js +1 -1
- package/dist/esm-es5/nano-menu-drawer.entry.js.map +1 -1
- package/dist/esm-es5/nano-nav-item_2.entry.js +1 -1
- package/dist/esm-es5/nano-nav-item_2.entry.js.map +1 -1
- package/dist/esm-es5/nano-range.entry.js +1 -1
- package/dist/esm-es5/nano-range.entry.js.map +1 -1
- package/dist/esm-es5/nano-rating.entry.js +1 -1
- package/dist/esm-es5/nano-rating.entry.js.map +1 -1
- package/dist/esm-es5/nano-resize-observe_2.entry.js +2 -2
- package/dist/esm-es5/nano-resize-observe_2.entry.js.map +1 -1
- package/dist/esm-es5/nano-slide.entry.js +1 -1
- package/dist/esm-es5/nano-slide.entry.js.map +1 -1
- package/dist/esm-es5/nano-slides.entry.js +1 -1
- package/dist/esm-es5/nano-slides.entry.js.map +1 -1
- package/dist/esm-es5/nano-spinner.entry.js +1 -1
- package/dist/esm-es5/nano-spinner.entry.js.map +1 -1
- package/dist/esm-es5/nano-sticker.entry.js +1 -1
- package/dist/esm-es5/nano-sticker.entry.js.map +1 -1
- package/dist/esm-es5/nano-tab-content.entry.js +1 -1
- package/dist/esm-es5/nano-tab-content.entry.js.map +1 -1
- package/dist/esm-es5/nano-tab-group.entry.js +2 -2
- package/dist/esm-es5/nano-tab-group.entry.js.map +1 -1
- package/dist/esm-es5/nano-tab.entry.js +2 -2
- package/dist/esm-es5/nano-tab.entry.js.map +1 -1
- package/dist/esm-es5/nano-tooltip.entry.js +1 -1
- package/dist/esm-es5/nano-tooltip.entry.js.map +1 -1
- package/dist/esm-es5/{popover-2c7b2326.js → popover-db86a392.js} +2 -2
- package/dist/esm-es5/popover-db86a392.js.map +1 -0
- package/dist/esm-es5/{scroll-5cd0ab13.js → scroll-881feb46.js} +2 -2
- package/dist/esm-es5/{scroll-5cd0ab13.js.map → scroll-881feb46.js.map} +0 -0
- package/dist/esm-es5/tabbable-614f515e.js +5 -0
- package/dist/esm-es5/tabbable-614f515e.js.map +1 -0
- package/dist/nano-components/index.esm.js +1 -1
- package/dist/nano-components/index.esm.js.map +1 -1
- package/dist/nano-components/nano-components.css +1 -1
- package/dist/nano-components/nano-components.esm.js +1 -1
- package/dist/nano-components/nano-components.esm.js.map +1 -1
- package/dist/nano-components/{p-2f21a443.system.entry.js → p-033296c7.system.entry.js} +2 -2
- package/dist/nano-components/{p-2f21a443.system.entry.js.map → p-033296c7.system.entry.js.map} +1 -1
- package/dist/nano-components/p-040b6cda.entry.js +5 -0
- package/dist/nano-components/{p-61565b5a.entry.js.map → p-040b6cda.entry.js.map} +1 -1
- package/dist/nano-components/p-05c7bde1.system.entry.js +5 -0
- package/dist/nano-components/{p-30df44d9.system.entry.js.map → p-05c7bde1.system.entry.js.map} +1 -1
- package/dist/nano-components/p-07bdf44d.entry.js +5 -0
- package/dist/nano-components/{p-88bcf55b.entry.js.map → p-07bdf44d.entry.js.map} +1 -1
- package/dist/nano-components/p-09066701.system.entry.js +5 -0
- package/dist/nano-components/p-09066701.system.entry.js.map +1 -0
- package/dist/nano-components/p-090f22a9.system.entry.js +5 -0
- package/dist/nano-components/{p-854df906.system.entry.js.map → p-090f22a9.system.entry.js.map} +1 -1
- package/dist/nano-components/p-096682d9.system.js +1 -1
- package/dist/nano-components/p-096682d9.system.js.map +1 -1
- package/dist/nano-components/p-09d2d944.system.js +5 -0
- package/dist/nano-components/p-09d2d944.system.js.map +1 -0
- package/dist/nano-components/{p-bfc12324.system.entry.js → p-0bee6fe6.system.entry.js} +2 -2
- package/dist/nano-components/{p-bfc12324.system.entry.js.map → p-0bee6fe6.system.entry.js.map} +0 -0
- package/dist/nano-components/{p-21c2a9a5.system.entry.js → p-173bae15.system.entry.js} +2 -2
- package/dist/nano-components/{p-21c2a9a5.system.entry.js.map → p-173bae15.system.entry.js.map} +1 -1
- package/dist/nano-components/{p-731935b1.js → p-1805d59a.js} +2 -2
- package/dist/nano-components/{p-731935b1.js.map → p-1805d59a.js.map} +0 -0
- package/dist/nano-components/p-1a293bd0.entry.js +5 -0
- package/dist/nano-components/{p-8b7f8ef4.entry.js.map → p-1a293bd0.entry.js.map} +1 -1
- package/dist/nano-components/p-1c216ca4.system.js +5 -0
- package/dist/{esm-es5/index-f41ae118.js.map → nano-components/p-1c216ca4.system.js.map} +1 -1
- package/dist/nano-components/p-1d13dbdf.system.js +5 -0
- package/dist/nano-components/p-1d13dbdf.system.js.map +1 -0
- package/dist/nano-components/p-1e974cad.entry.js +5 -0
- package/dist/nano-components/{p-7e60c331.entry.js.map → p-1e974cad.entry.js.map} +1 -1
- package/dist/nano-components/p-20387cde.system.entry.js +5 -0
- package/dist/nano-components/{p-91778977.system.entry.js.map → p-20387cde.system.entry.js.map} +1 -1
- package/dist/nano-components/p-20db18f3.entry.js +5 -0
- package/dist/nano-components/{p-a9dd7cf9.entry.js.map → p-20db18f3.entry.js.map} +1 -1
- package/dist/nano-components/p-22884654.system.entry.js +5 -0
- package/dist/nano-components/{p-3d0fbd0e.system.entry.js.map → p-22884654.system.entry.js.map} +1 -1
- package/dist/nano-components/p-2559e9c1.entry.js +5 -0
- package/dist/nano-components/p-2559e9c1.entry.js.map +1 -0
- package/dist/nano-components/p-289aa03f.js +5 -0
- package/dist/nano-components/p-289aa03f.js.map +1 -0
- package/dist/nano-components/p-2e6c55e2.entry.js +5 -0
- package/dist/nano-components/{p-6f3d20fe.entry.js.map → p-2e6c55e2.entry.js.map} +1 -1
- package/dist/nano-components/{p-60c9b580.system.js → p-3258c568.system.js} +2 -2
- package/dist/nano-components/p-3258c568.system.js.map +1 -0
- package/dist/nano-components/p-3456db01.entry.js +5 -0
- package/dist/nano-components/p-3456db01.entry.js.map +1 -0
- package/dist/nano-components/p-346588cc.entry.js +5 -0
- package/dist/nano-components/p-346588cc.entry.js.map +1 -0
- package/dist/nano-components/p-394c3c19.entry.js +5 -0
- package/dist/nano-components/{p-217f71aa.entry.js.map → p-394c3c19.entry.js.map} +1 -1
- package/dist/nano-components/p-3a13948a.system.entry.js +5 -0
- package/dist/nano-components/p-3a13948a.system.entry.js.map +1 -0
- package/dist/nano-components/p-3a725f1f.system.entry.js +5 -0
- package/dist/nano-components/p-3a725f1f.system.entry.js.map +1 -0
- package/dist/nano-components/p-3aa1d07d.entry.js +5 -0
- package/dist/nano-components/{p-6a1c69d3.entry.js.map → p-3aa1d07d.entry.js.map} +1 -1
- package/dist/nano-components/p-3ad1d5aa.system.entry.js +5 -0
- package/dist/nano-components/p-3ad1d5aa.system.entry.js.map +1 -0
- package/dist/nano-components/p-3ef30ded.system.entry.js +5 -0
- package/dist/nano-components/{p-9bf4a6e0.system.entry.js.map → p-3ef30ded.system.entry.js.map} +1 -1
- package/dist/nano-components/p-3fc52f19.system.entry.js +5 -0
- package/dist/nano-components/p-3fc52f19.system.entry.js.map +1 -0
- package/dist/nano-components/p-4429caac.system.entry.js +5 -0
- package/dist/nano-components/p-4429caac.system.entry.js.map +1 -0
- package/dist/nano-components/p-4535e3bb.entry.js +5 -0
- package/dist/nano-components/{p-143bca0d.entry.js.map → p-4535e3bb.entry.js.map} +1 -1
- package/dist/nano-components/p-462ad4f1.entry.js +5 -0
- package/dist/nano-components/p-462ad4f1.entry.js.map +1 -0
- package/dist/nano-components/p-46d0bb7b.entry.js +5 -0
- package/dist/nano-components/p-46d0bb7b.entry.js.map +1 -0
- package/dist/nano-components/p-5066e563.system.entry.js +5 -0
- package/dist/nano-components/{p-006f2fd3.system.entry.js.map → p-5066e563.system.entry.js.map} +1 -1
- package/dist/nano-components/p-52ab579e.system.entry.js +5 -0
- package/dist/nano-components/p-52ab579e.system.entry.js.map +1 -0
- package/dist/nano-components/p-531d5275.system.entry.js +5 -0
- package/dist/nano-components/{p-b79dc23a.system.entry.js.map → p-531d5275.system.entry.js.map} +1 -1
- package/dist/nano-components/p-5653961d.system.entry.js +5 -0
- package/dist/nano-components/{p-18f49ebf.system.entry.js.map → p-5653961d.system.entry.js.map} +1 -1
- package/dist/nano-components/p-56ba0d63.entry.js +5 -0
- package/dist/nano-components/p-56ba0d63.entry.js.map +1 -0
- package/dist/nano-components/p-593de29b.system.entry.js +5 -0
- package/dist/nano-components/{p-76b13c27.system.entry.js.map → p-593de29b.system.entry.js.map} +1 -1
- package/dist/nano-components/p-5a476bba.system.entry.js +5 -0
- package/dist/nano-components/p-5a476bba.system.entry.js.map +1 -0
- package/dist/nano-components/{p-8a608e6d.entry.js → p-5e7c7d3d.entry.js} +2 -2
- package/dist/nano-components/{p-8a608e6d.entry.js.map → p-5e7c7d3d.entry.js.map} +1 -1
- package/dist/nano-components/p-672e5547.js +5 -0
- package/dist/nano-components/p-672e5547.js.map +1 -0
- package/dist/nano-components/{p-a16651a6.system.js → p-67cc0d9b.system.js} +3 -3
- package/dist/nano-components/{p-a16651a6.system.js.map → p-67cc0d9b.system.js.map} +1 -1
- package/dist/nano-components/p-69439aa1.system.entry.js +5 -0
- package/dist/nano-components/p-69439aa1.system.entry.js.map +1 -0
- package/dist/nano-components/p-6ade3290.entry.js +5 -0
- package/dist/nano-components/{p-1e03f9bf.entry.js.map → p-6ade3290.entry.js.map} +1 -1
- package/dist/nano-components/p-70dec19f.entry.js +5 -0
- package/dist/nano-components/{p-d0e9b177.entry.js.map → p-70dec19f.entry.js.map} +1 -1
- package/dist/nano-components/p-71c26ace.entry.js +5 -0
- package/dist/nano-components/p-71c26ace.entry.js.map +1 -0
- package/dist/nano-components/p-7232c046.system.entry.js +5 -0
- package/dist/nano-components/{p-92b3f99b.system.entry.js.map → p-7232c046.system.entry.js.map} +1 -1
- package/dist/nano-components/p-730f60ea.entry.js +5 -0
- package/dist/nano-components/{p-78cf9d39.entry.js.map → p-730f60ea.entry.js.map} +1 -1
- package/dist/nano-components/p-74a7fc4f.js +5 -0
- package/dist/nano-components/p-74a7fc4f.js.map +1 -0
- package/dist/nano-components/p-774e090b.system.entry.js +5 -0
- package/dist/nano-components/p-774e090b.system.entry.js.map +1 -0
- package/dist/nano-components/{p-d31761c8.system.js → p-7be6b7f3.system.js} +2 -2
- package/dist/nano-components/p-7be6b7f3.system.js.map +1 -0
- package/dist/nano-components/p-7d2e2685.entry.js +5 -0
- package/dist/nano-components/p-7d2e2685.entry.js.map +1 -0
- package/dist/nano-components/p-820d9e23.system.entry.js +5 -0
- package/dist/nano-components/p-820d9e23.system.entry.js.map +1 -0
- package/dist/nano-components/p-8278c5d2.system.entry.js +5 -0
- package/dist/nano-components/{p-badf69ee.system.entry.js.map → p-8278c5d2.system.entry.js.map} +1 -1
- package/dist/nano-components/p-82f4b071.entry.js +5 -0
- package/dist/nano-components/p-82f4b071.entry.js.map +1 -0
- package/dist/nano-components/p-88f17c86.system.entry.js +5 -0
- package/dist/nano-components/p-88f17c86.system.entry.js.map +1 -0
- package/dist/nano-components/p-8a8f893b.system.entry.js +5 -0
- package/dist/nano-components/{p-cc668975.system.entry.js.map → p-8a8f893b.system.entry.js.map} +1 -1
- package/dist/nano-components/p-93448bcd.system.entry.js +5 -0
- package/dist/nano-components/{p-02e82e14.system.entry.js.map → p-93448bcd.system.entry.js.map} +1 -1
- package/dist/nano-components/p-94593617.system.entry.js +5 -0
- package/dist/nano-components/{p-2442eda0.system.entry.js.map → p-94593617.system.entry.js.map} +1 -1
- package/dist/nano-components/{p-56113dd3.js → p-9a385481.js} +2 -2
- package/dist/nano-components/p-9a385481.js.map +1 -0
- package/dist/nano-components/{p-8134c14e.system.js → p-9de508a5.system.js} +2 -2
- package/dist/nano-components/p-9de508a5.system.js.map +1 -0
- package/dist/nano-components/p-a315ed2c.entry.js +5 -0
- package/dist/nano-components/{p-13801651.entry.js.map → p-a315ed2c.entry.js.map} +1 -1
- package/dist/nano-components/p-a4075d49.entry.js +5 -0
- package/dist/nano-components/p-a4075d49.entry.js.map +1 -0
- package/dist/nano-components/p-b19e0775.system.entry.js +5 -0
- package/dist/nano-components/p-b19e0775.system.entry.js.map +1 -0
- package/dist/nano-components/{p-18411914.system.js → p-b370e3ef.system.js} +2 -2
- package/dist/nano-components/{p-18411914.system.js.map → p-b370e3ef.system.js.map} +0 -0
- package/dist/nano-components/p-b59d2bd5.entry.js +5 -0
- package/dist/nano-components/p-b59d2bd5.entry.js.map +1 -0
- package/dist/nano-components/p-b619500f.js +5 -0
- package/dist/nano-components/p-b619500f.js.map +1 -0
- package/dist/nano-components/{p-23f65b34.entry.js → p-ba13bb56.entry.js} +2 -2
- package/dist/nano-components/{p-23f65b34.entry.js.map → p-ba13bb56.entry.js.map} +1 -1
- package/dist/nano-components/p-c0ddb4c3.entry.js +5 -0
- package/dist/nano-components/{p-78569d39.entry.js.map → p-c0ddb4c3.entry.js.map} +1 -1
- package/dist/nano-components/p-c954c040.entry.js +5 -0
- package/dist/nano-components/p-c954c040.entry.js.map +1 -0
- package/dist/nano-components/p-c9c1a345.system.entry.js +5 -0
- package/dist/nano-components/{p-38a3e791.system.entry.js.map → p-c9c1a345.system.entry.js.map} +1 -1
- package/dist/nano-components/{p-8c8963f6.js → p-cb79d1ec.js} +2 -2
- package/dist/nano-components/{p-8c8963f6.js.map → p-cb79d1ec.js.map} +0 -0
- package/dist/nano-components/p-d6569144.entry.js +5 -0
- package/dist/nano-components/{p-c7b7f7ab.entry.js.map → p-d6569144.entry.js.map} +1 -1
- package/dist/nano-components/{p-2d1a856e.system.js → p-d84ef175.system.js} +2 -2
- package/dist/nano-components/{p-2d1a856e.system.js.map → p-d84ef175.system.js.map} +0 -0
- package/dist/nano-components/p-d9c7909e.js +5 -0
- package/dist/nano-components/p-d9c7909e.js.map +1 -0
- package/dist/nano-components/p-e11bd40d.entry.js +5 -0
- package/dist/nano-components/{p-a21d90aa.entry.js.map → p-e11bd40d.entry.js.map} +1 -1
- package/dist/nano-components/p-e15be516.system.entry.js +5 -0
- package/dist/nano-components/p-e15be516.system.entry.js.map +1 -0
- package/dist/nano-components/p-e2ae11d2.entry.js +5 -0
- package/dist/nano-components/p-e2ae11d2.entry.js.map +1 -0
- package/dist/nano-components/{p-8757b4eb.js → p-e3583b00.js} +3 -3
- package/dist/nano-components/{p-8757b4eb.js.map → p-e3583b00.js.map} +1 -1
- package/dist/nano-components/p-e35eac75.entry.js +5 -0
- package/dist/nano-components/p-e35eac75.entry.js.map +1 -0
- package/dist/nano-components/p-e562bffd.entry.js +5 -0
- package/dist/nano-components/p-e562bffd.entry.js.map +1 -0
- package/dist/nano-components/p-e6f41b97.entry.js +5 -0
- package/dist/nano-components/p-e6f41b97.entry.js.map +1 -0
- package/dist/nano-components/p-e6f8f9f7.system.entry.js +5 -0
- package/dist/nano-components/p-e6f8f9f7.system.entry.js.map +1 -0
- package/dist/nano-components/p-ea5eb591.system.js +5 -0
- package/dist/nano-components/p-ea5eb591.system.js.map +1 -0
- package/dist/nano-components/p-ef4e0912.system.entry.js +5 -0
- package/dist/nano-components/{p-2aed806d.system.entry.js.map → p-ef4e0912.system.entry.js.map} +1 -1
- package/dist/nano-components/{p-981cc614.entry.js → p-f1bf1099.entry.js} +2 -2
- package/dist/nano-components/{p-981cc614.entry.js.map → p-f1bf1099.entry.js.map} +0 -0
- package/dist/nano-components/p-f2e7d2f9.system.entry.js +5 -0
- package/dist/nano-components/p-f2e7d2f9.system.entry.js.map +1 -0
- package/dist/nano-components/p-f3bf942d.entry.js +5 -0
- package/dist/nano-components/p-f3bf942d.entry.js.map +1 -0
- package/dist/nano-components/p-f53989c3.system.entry.js +5 -0
- package/dist/nano-components/{p-6621e4f1.system.entry.js.map → p-f53989c3.system.entry.js.map} +1 -1
- package/dist/themes/nanopore.css +1 -1
- package/dist/themes/nanopore.css.map +1 -1
- package/dist/types/components/accordion/accordion.d.ts +0 -1
- package/dist/types/components/checkbox/checkbox-group.d.ts +1 -0
- package/dist/types/components/datalist/datalist.d.ts +98 -0
- package/dist/types/components/date-input/date-input.d.ts +2 -0
- package/dist/types/components/dialog/dialog.helpers.d.ts +2 -2
- package/dist/types/components/dropdown/dropdown.d.ts +8 -4
- package/dist/types/components/form-control/form-control.d.ts +35 -0
- package/dist/types/components/global-search-results/global-search-results.d.ts +1 -0
- package/dist/types/components/grid/grid.d.ts +7 -1
- package/dist/types/components/hero/hero.d.ts +2 -0
- package/dist/types/components/input/input.d.ts +13 -9
- package/dist/types/components/menu/menu.d.ts +22 -8
- package/dist/types/components/option/option-interface.d.ts +7 -0
- package/dist/types/components/option/option.d.ts +45 -0
- package/dist/types/components/select/select.d.ts +43 -49
- package/dist/types/components/tabs/tab-group.d.ts +32 -6
- package/dist/types/components/tabs/tab.d.ts +6 -1
- package/dist/types/components.d.ts +241 -70
- package/dist/types/interface.d.ts +1 -0
- package/dist/types/utils/active-element.d.ts +1 -0
- package/dist/types/utils/dom.d.ts +9 -1
- package/dist/types/utils/index.d.ts +2 -1
- package/dist/types/utils/tabbable.d.ts +2 -2
- package/dist/types/utils/testing/index.d.ts +3 -2
- package/docs-json.json +1244 -262
- package/docs-vscode.json +102 -33
- package/package.json +5 -5
- package/dist/cjs/dom-5f3fae1a.js.map +0 -1
- package/dist/cjs/index-117f36a4.js.map +0 -1
- package/dist/cjs/nano-date-picker_2.cjs.entry.js.map +0 -1
- package/dist/cjs/nano-menu.cjs.entry.js +0 -156
- package/dist/cjs/nano-menu.cjs.entry.js.map +0 -1
- package/dist/cjs/nano-select-option.cjs.entry.js +0 -43
- package/dist/cjs/nano-select-option.cjs.entry.js.map +0 -1
- package/dist/cjs/popover-d033efa2.js.map +0 -1
- package/dist/cjs/tabbable-615c30e1.js.map +0 -1
- package/dist/collection/components/select/select-option.css +0 -15
- package/dist/collection/components/select/select-option.js +0 -127
- package/dist/collection/components/select/select-option.js.map +0 -1
- package/dist/esm/dom-a791b223.js.map +0 -1
- package/dist/esm/nano-date-picker_2.entry.js.map +0 -1
- package/dist/esm/nano-menu.entry.js +0 -152
- package/dist/esm/nano-menu.entry.js.map +0 -1
- package/dist/esm/nano-select-option.entry.js +0 -39
- package/dist/esm/nano-select-option.entry.js.map +0 -1
- package/dist/esm/popover-2c7b2326.js.map +0 -1
- package/dist/esm/tabbable-e21f860a.js.map +0 -1
- package/dist/esm-es5/dom-a791b223.js +0 -5
- package/dist/esm-es5/dom-a791b223.js.map +0 -1
- package/dist/esm-es5/index-f41ae118.js +0 -5
- package/dist/esm-es5/nano-date-picker_2.entry.js +0 -5
- package/dist/esm-es5/nano-date-picker_2.entry.js.map +0 -1
- package/dist/esm-es5/nano-menu.entry.js +0 -5
- package/dist/esm-es5/nano-menu.entry.js.map +0 -1
- package/dist/esm-es5/nano-select-option.entry.js +0 -5
- package/dist/esm-es5/nano-select-option.entry.js.map +0 -1
- package/dist/esm-es5/popover-2c7b2326.js.map +0 -1
- package/dist/esm-es5/tabbable-e21f860a.js +0 -5
- package/dist/esm-es5/tabbable-e21f860a.js.map +0 -1
- package/dist/nano-components/p-006f2fd3.system.entry.js +0 -5
- package/dist/nano-components/p-02e82e14.system.entry.js +0 -5
- package/dist/nano-components/p-05a8014a.entry.js +0 -5
- package/dist/nano-components/p-05a8014a.entry.js.map +0 -1
- package/dist/nano-components/p-13801651.entry.js +0 -5
- package/dist/nano-components/p-13fa75fc.entry.js +0 -5
- package/dist/nano-components/p-13fa75fc.entry.js.map +0 -1
- package/dist/nano-components/p-143bca0d.entry.js +0 -5
- package/dist/nano-components/p-18f49ebf.system.entry.js +0 -5
- package/dist/nano-components/p-19428228.system.entry.js +0 -5
- package/dist/nano-components/p-19428228.system.entry.js.map +0 -1
- package/dist/nano-components/p-1e03f9bf.entry.js +0 -5
- package/dist/nano-components/p-217f71aa.entry.js +0 -5
- package/dist/nano-components/p-2442eda0.system.entry.js +0 -5
- package/dist/nano-components/p-2946bd70.system.entry.js +0 -5
- package/dist/nano-components/p-2946bd70.system.entry.js.map +0 -1
- package/dist/nano-components/p-2aed806d.system.entry.js +0 -5
- package/dist/nano-components/p-30df44d9.system.entry.js +0 -5
- package/dist/nano-components/p-38a3e791.system.entry.js +0 -5
- package/dist/nano-components/p-3a49ceab.entry.js +0 -5
- package/dist/nano-components/p-3a49ceab.entry.js.map +0 -1
- package/dist/nano-components/p-3d0fbd0e.system.entry.js +0 -5
- package/dist/nano-components/p-3f00179c.js +0 -5
- package/dist/nano-components/p-3f00179c.js.map +0 -1
- package/dist/nano-components/p-48e6bea3.entry.js +0 -5
- package/dist/nano-components/p-48e6bea3.entry.js.map +0 -1
- package/dist/nano-components/p-4d62ec32.system.js +0 -5
- package/dist/nano-components/p-4d62ec32.system.js.map +0 -1
- package/dist/nano-components/p-4e451498.entry.js +0 -5
- package/dist/nano-components/p-4e451498.entry.js.map +0 -1
- package/dist/nano-components/p-51d9570d.entry.js +0 -5
- package/dist/nano-components/p-51d9570d.entry.js.map +0 -1
- package/dist/nano-components/p-51fa04a6.entry.js +0 -5
- package/dist/nano-components/p-51fa04a6.entry.js.map +0 -1
- package/dist/nano-components/p-55189485.system.entry.js +0 -5
- package/dist/nano-components/p-55189485.system.entry.js.map +0 -1
- package/dist/nano-components/p-56113dd3.js.map +0 -1
- package/dist/nano-components/p-5bbd6c81.entry.js +0 -5
- package/dist/nano-components/p-5bbd6c81.entry.js.map +0 -1
- package/dist/nano-components/p-5e9170ae.entry.js +0 -5
- package/dist/nano-components/p-5e9170ae.entry.js.map +0 -1
- package/dist/nano-components/p-60c9b580.system.js.map +0 -1
- package/dist/nano-components/p-61565b5a.entry.js +0 -5
- package/dist/nano-components/p-621750cc.js +0 -5
- package/dist/nano-components/p-621750cc.js.map +0 -1
- package/dist/nano-components/p-6621e4f1.system.entry.js +0 -5
- package/dist/nano-components/p-6a1c69d3.entry.js +0 -5
- package/dist/nano-components/p-6ab8d211.system.entry.js +0 -5
- package/dist/nano-components/p-6ab8d211.system.entry.js.map +0 -1
- package/dist/nano-components/p-6e9b3d60.system.entry.js +0 -5
- package/dist/nano-components/p-6e9b3d60.system.entry.js.map +0 -1
- package/dist/nano-components/p-6f3d20fe.entry.js +0 -5
- package/dist/nano-components/p-6feac35e.entry.js +0 -5
- package/dist/nano-components/p-6feac35e.entry.js.map +0 -1
- package/dist/nano-components/p-723c212f.system.entry.js +0 -5
- package/dist/nano-components/p-723c212f.system.entry.js.map +0 -1
- package/dist/nano-components/p-76b13c27.system.entry.js +0 -5
- package/dist/nano-components/p-78569d39.entry.js +0 -5
- package/dist/nano-components/p-78cf9d39.entry.js +0 -5
- package/dist/nano-components/p-7e60c331.entry.js +0 -5
- package/dist/nano-components/p-8134c14e.system.js.map +0 -1
- package/dist/nano-components/p-81b4ed2a.system.entry.js +0 -5
- package/dist/nano-components/p-81b4ed2a.system.entry.js.map +0 -1
- package/dist/nano-components/p-854df906.system.entry.js +0 -5
- package/dist/nano-components/p-88bcf55b.entry.js +0 -5
- package/dist/nano-components/p-8b7f8ef4.entry.js +0 -5
- package/dist/nano-components/p-8c3993ff.entry.js +0 -5
- package/dist/nano-components/p-8c3993ff.entry.js.map +0 -1
- package/dist/nano-components/p-91778977.system.entry.js +0 -5
- package/dist/nano-components/p-92b3f99b.system.entry.js +0 -5
- package/dist/nano-components/p-9bd73d1d.js +0 -5
- package/dist/nano-components/p-9bd73d1d.js.map +0 -1
- package/dist/nano-components/p-9bf4a6e0.system.entry.js +0 -5
- package/dist/nano-components/p-9df226fd.system.entry.js +0 -5
- package/dist/nano-components/p-9df226fd.system.entry.js.map +0 -1
- package/dist/nano-components/p-a0b55c38.system.entry.js +0 -5
- package/dist/nano-components/p-a0b55c38.system.entry.js.map +0 -1
- package/dist/nano-components/p-a21d90aa.entry.js +0 -5
- package/dist/nano-components/p-a9dd7cf9.entry.js +0 -5
- package/dist/nano-components/p-ad069ba4.entry.js +0 -5
- package/dist/nano-components/p-ad069ba4.entry.js.map +0 -1
- package/dist/nano-components/p-b246a7bb.entry.js +0 -5
- package/dist/nano-components/p-b246a7bb.entry.js.map +0 -1
- package/dist/nano-components/p-b45d4be9.entry.js +0 -5
- package/dist/nano-components/p-b45d4be9.entry.js.map +0 -1
- package/dist/nano-components/p-b79dc23a.system.entry.js +0 -5
- package/dist/nano-components/p-b86fc6b7.system.js +0 -5
- package/dist/nano-components/p-b86fc6b7.system.js.map +0 -1
- package/dist/nano-components/p-badf69ee.system.entry.js +0 -5
- package/dist/nano-components/p-bde0deae.system.entry.js +0 -5
- package/dist/nano-components/p-bde0deae.system.entry.js.map +0 -1
- package/dist/nano-components/p-be3df2e8.system.entry.js +0 -5
- package/dist/nano-components/p-be3df2e8.system.entry.js.map +0 -1
- package/dist/nano-components/p-c39c1e8d.entry.js +0 -5
- package/dist/nano-components/p-c39c1e8d.entry.js.map +0 -1
- package/dist/nano-components/p-c7b7f7ab.entry.js +0 -5
- package/dist/nano-components/p-c82ccbc8.entry.js +0 -5
- package/dist/nano-components/p-c82ccbc8.entry.js.map +0 -1
- package/dist/nano-components/p-cc668975.system.entry.js +0 -5
- package/dist/nano-components/p-cfd4c9de.system.entry.js +0 -5
- package/dist/nano-components/p-cfd4c9de.system.entry.js.map +0 -1
- package/dist/nano-components/p-d0e9b177.entry.js +0 -5
- package/dist/nano-components/p-d31761c8.system.js.map +0 -1
- package/dist/nano-components/p-d47d297b.system.entry.js +0 -5
- package/dist/nano-components/p-d47d297b.system.entry.js.map +0 -1
- package/dist/nano-components/p-e48a53f5.system.entry.js +0 -5
- package/dist/nano-components/p-e48a53f5.system.entry.js.map +0 -1
- package/dist/nano-components/p-e5f01860.entry.js +0 -5
- package/dist/nano-components/p-e5f01860.entry.js.map +0 -1
- package/dist/nano-components/p-f2b2cd38.system.entry.js +0 -5
- package/dist/nano-components/p-f2b2cd38.system.entry.js.map +0 -1
- package/dist/nano-components/p-fcb5ffaf.system.entry.js +0 -5
- package/dist/nano-components/p-fcb5ffaf.system.entry.js.map +0 -1
- package/dist/types/components/select/select-option.d.ts +0 -23
@@ -1,43 +1,40 @@
|
|
1
1
|
/*!
|
2
2
|
* Web Components for Nanopore digital Web Apps
|
3
3
|
*/
|
4
|
-
import { Build, Component, Element, Event, Host, Method, Prop, State, Watch, h, } from '@stencil/core';
|
5
|
-
import {
|
6
|
-
import
|
4
|
+
import { Build, Component, Element, Event, Host, Method, Prop, State, Watch, h, Listen, } from '@stencil/core';
|
5
|
+
import { debounceEvent, createColorClasses, closestElement, raf, getActiveElement, } from '../../utils';
|
6
|
+
import { FormControl, FormControlWrap } from '../form-control/form-control';
|
7
|
+
let selectIds = 0;
|
7
8
|
/**
|
8
9
|
* The select component is a wrapper to the HTML select element with custom styling and additional functionality.
|
9
10
|
* It accepts most of the same properties as the HTML [select](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select).
|
10
11
|
* It's multi selection functionality is vastly improved from the native solution. It allows for the control of
|
11
12
|
* value order through drag and drop or changing the insertion point with arrow keys. It also can allow for user defined values.
|
12
13
|
*
|
14
|
+
* @slot start - suitable for inline action buttons or icons that may add extra contextual information
|
15
|
+
* @slot end - suitable for inline action buttons or icons that may add extra contextual information
|
16
|
+
* @slot value-start - similar to 'start', however clicking elements using this slot will activate the input control. This would be suitable to show a secodary 'value' for context or to show a dropdown arrow if using a datalist
|
17
|
+
* @slot value-end - similar to 'end', however clicking elements using this slot will activate the input control. This would be suitable to show a secodary 'value' for context or to show a dropdown arrow if using a datalist
|
13
18
|
* @slot label - if you do not set a label attribute, you can use this slot for more complex markup
|
14
|
-
* @slot
|
19
|
+
* @slot helper - helper text to accompany the form field underneath.
|
20
|
+
* @slot down-arrow - use this to replace the default down arrow
|
21
|
+
* @slot - default slot; nest `nano-option` elements
|
15
22
|
*/
|
16
23
|
export class Select {
|
17
24
|
constructor() {
|
18
|
-
this.listItems = [];
|
19
25
|
this.valueItems = [];
|
20
26
|
this.selectId = `nano-select-${selectIds++}`;
|
21
27
|
this.rtl = false;
|
22
|
-
this.currLiIndex = -1;
|
23
|
-
this.inputSearchVal = '';
|
24
|
-
this.watchValue = true;
|
25
28
|
this.onInit = true;
|
26
|
-
this.
|
27
|
-
this.
|
29
|
+
this.isLegacy = 'registerElement' in document;
|
30
|
+
this.currInsertIndex = -1;
|
28
31
|
this.showErrorMsg = false;
|
29
32
|
this.errorMessage = '';
|
30
33
|
this.hasFocus = false;
|
31
|
-
this.listOpen = false;
|
32
|
-
this.isLegacy = 'registerElement' in document;
|
33
34
|
this.hasLabelSlot = false;
|
34
35
|
this.hasHelperSlot = false;
|
35
|
-
this.
|
36
|
-
|
37
|
-
* This will be true when the control is in an invalid state.
|
38
|
-
* Validity is determined by the `required` prop. Or if custom validity message is set.
|
39
|
-
*/
|
40
|
-
this.invalid = false;
|
36
|
+
this.inputSearchVal = '';
|
37
|
+
this._invalid = false;
|
41
38
|
/**
|
42
39
|
* This Boolean attribute lets you specify that a form control should have select focus when the page loads.
|
43
40
|
*/
|
@@ -82,16 +79,9 @@ export class Select {
|
|
82
79
|
* in multiple mode, allow users to enter their own values
|
83
80
|
*/
|
84
81
|
this.allowCustomValues = false;
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
this.value = this.multiple
|
89
|
-
? []
|
90
|
-
: '';
|
91
|
-
/**
|
92
|
-
* You can set options via js. domElement.options = ['option 1', 'option 2'] or [{label: 'option 1', value: 'opt-1'}]
|
93
|
-
*/
|
94
|
-
this.options = [];
|
82
|
+
this._value = this.multiple ? [] : '';
|
83
|
+
this._options = [];
|
84
|
+
this._eOptions = [];
|
95
85
|
/**
|
96
86
|
* If `true`, a clear icon will appear in the select when there is a value. Clicking it clears the select.
|
97
87
|
*/
|
@@ -105,28 +95,26 @@ export class Select {
|
|
105
95
|
* Set the amount of time, in milliseconds, to wait to trigger the `nanoSearchChange` event after each keystroke.
|
106
96
|
*/
|
107
97
|
this.debounce = 0;
|
108
|
-
/**
|
109
|
-
|
110
|
-
*/
|
111
|
-
this.native = true;
|
98
|
+
/** nano-dropdown config options you can pass to the nested dropdown component */
|
99
|
+
this.dropDownConfig = {};
|
112
100
|
this.customValidate = () => {
|
113
101
|
this.nativeSelect.setCustomValidity('');
|
114
102
|
// add custom validations 'cos html5 validations are a bit rubbish on selects
|
115
|
-
if (this.required && !this.
|
103
|
+
if (this.required && !this.valArray.length) {
|
116
104
|
this.nativeSelect.setCustomValidity('Please fill in this field.');
|
117
105
|
return true;
|
118
106
|
}
|
119
|
-
if (this.
|
107
|
+
if (this.valArray.length &&
|
120
108
|
!this.allowCustomValues &&
|
121
109
|
!this.isValidValues()) {
|
122
110
|
this.nativeSelect.setCustomValidity('Please choose an item from this field.');
|
123
111
|
return true;
|
124
112
|
}
|
125
|
-
if (this.max && this.
|
113
|
+
if (this.max && this.valArray.length > this.max) {
|
126
114
|
this.nativeSelect.setCustomValidity(`Only up to ${this.max} values are allowed.`);
|
127
115
|
return true;
|
128
116
|
}
|
129
|
-
if (this.min && this.
|
117
|
+
if (this.min && this.valArray.length < this.min) {
|
130
118
|
this.nativeSelect.setCustomValidity(`You must select a minimum of ${this.min} values.`);
|
131
119
|
return true;
|
132
120
|
}
|
@@ -135,12 +123,12 @@ export class Select {
|
|
135
123
|
this.showInlineValidation = (ev) => {
|
136
124
|
if (this.validateOn === 'submitThenDirty')
|
137
125
|
this.validateOn = 'dirty';
|
138
|
-
this.
|
126
|
+
this._invalid = false;
|
139
127
|
this.showErrorMsg = false;
|
140
128
|
this.errorMessage = '';
|
141
129
|
if (!this.nativeSelect.validity.valid) {
|
142
130
|
this.errorMessage = this.nativeSelect.validationMessage;
|
143
|
-
this.
|
131
|
+
this._invalid = true;
|
144
132
|
this.showErrorMsg = true;
|
145
133
|
}
|
146
134
|
this.nanoValidate.emit({
|
@@ -150,41 +138,104 @@ export class Select {
|
|
150
138
|
});
|
151
139
|
};
|
152
140
|
this.handleInvalid = (ev) => {
|
153
|
-
this.
|
141
|
+
this._invalid = true;
|
154
142
|
if (this.validateOn === 'submit')
|
155
|
-
this.
|
143
|
+
this._invalid = this.showErrorMsg = this.customValidate();
|
156
144
|
if (this.showInlineError)
|
157
145
|
ev.preventDefault();
|
158
146
|
setTimeout((_) => this.showInlineValidation(ev), 20);
|
159
147
|
};
|
160
|
-
|
161
|
-
|
162
|
-
if (!this.
|
163
|
-
|
164
|
-
|
148
|
+
this.setValue = (e) => {
|
149
|
+
e.preventDefault();
|
150
|
+
if (!this.multiple) {
|
151
|
+
this.value = e.detail.value;
|
152
|
+
this.selectWrap.clientWidth; // force reflow
|
153
|
+
this.inputCtrl.focus();
|
154
|
+
return;
|
165
155
|
}
|
166
|
-
this.value
|
156
|
+
if (this.value && this.value.length && this.value.includes(e.detail.value))
|
157
|
+
return;
|
158
|
+
if (this.max && this.value.length === this.max)
|
159
|
+
return;
|
160
|
+
this.currInsertIndex++;
|
161
|
+
this.value = [
|
162
|
+
...this.value.slice(0, this.currInsertIndex),
|
163
|
+
e.detail.value,
|
164
|
+
...this.value.slice(this.currInsertIndex),
|
165
|
+
];
|
166
|
+
this.inputSearchVal = '';
|
167
|
+
// this.selectWrap.clientWidth; // force reflow
|
167
168
|
};
|
168
|
-
this.
|
169
|
-
if (this.multiple)
|
170
|
-
|
171
|
-
|
172
|
-
|
169
|
+
this.removeValue = (toFind) => {
|
170
|
+
if (!this.multiple || !this.value.length)
|
171
|
+
return;
|
172
|
+
if (!toFind)
|
173
|
+
toFind = this.value[this.value.length - 1];
|
174
|
+
this.value = this.value.filter((val) => val !== toFind);
|
175
|
+
this.currInsertIndex--;
|
176
|
+
// this.selectWrap.clientWidth; // force reflow
|
177
|
+
this.setFocus();
|
178
|
+
};
|
179
|
+
this.setOptions = () => {
|
180
|
+
if (!this.datalist ||
|
181
|
+
!this.datalist.activeOptions ||
|
182
|
+
!this.datalist.activeOptions.length)
|
183
|
+
return;
|
184
|
+
this._eOptions = this.datalist.activeOptions.map((ao) => {
|
185
|
+
const { value, selected, label, filterMeta } = ao;
|
186
|
+
return { value, selected, label, filterMeta };
|
187
|
+
});
|
188
|
+
};
|
189
|
+
this.handleDocumentKeyDown = (ev) => {
|
190
|
+
if (!this.multiple || !this.hasFocus)
|
191
|
+
return;
|
192
|
+
if (!this.inputSearchVal) {
|
193
|
+
let rm;
|
194
|
+
switch (ev.key) {
|
195
|
+
case 'Backspace':
|
196
|
+
if (this.inputCtrl.previousElementSibling)
|
197
|
+
rm = this.inputCtrl.previousElementSibling;
|
198
|
+
else
|
199
|
+
break;
|
200
|
+
this.removeValue(rm.dataset.value || null);
|
201
|
+
break;
|
202
|
+
case 'Delete':
|
203
|
+
if (this.inputCtrl.nextElementSibling)
|
204
|
+
rm = this.inputCtrl.nextElementSibling;
|
205
|
+
else
|
206
|
+
break;
|
207
|
+
this.removeValue(rm.dataset.value || null);
|
208
|
+
break;
|
209
|
+
case 'ArrowLeft':
|
210
|
+
case 'ArrowRight':
|
211
|
+
if (!this.value.length)
|
212
|
+
break;
|
213
|
+
if (ev.key === 'ArrowLeft' && this.inputCtrl.previousSibling)
|
214
|
+
this.currInsertIndex--;
|
215
|
+
if (ev.key === 'ArrowRight' && this.inputCtrl.nextSibling)
|
216
|
+
this.currInsertIndex++;
|
217
|
+
setTimeout(() => {
|
218
|
+
this.inputCtrl.focus();
|
219
|
+
}, 20);
|
220
|
+
ev.preventDefault();
|
221
|
+
break;
|
222
|
+
}
|
173
223
|
}
|
224
|
+
};
|
225
|
+
this.onBlur = () => {
|
174
226
|
this.hasFocus = false;
|
175
227
|
setTimeout(() => {
|
176
|
-
if (this.validateOn === 'dirty' && !this.
|
228
|
+
if (this.validateOn === 'dirty' && !this.hasFocus)
|
177
229
|
this.showInlineValidation();
|
178
230
|
}, 20);
|
179
231
|
this.nanoBlur.emit();
|
232
|
+
if (!this.allowCustomValues && this.multiple) {
|
233
|
+
this.inputSearchVal = '';
|
234
|
+
const event = new window.Event('change');
|
235
|
+
this.inputCtrl.dispatchEvent(event);
|
236
|
+
}
|
180
237
|
};
|
181
238
|
this.onFocus = () => {
|
182
|
-
if (this.multiple) {
|
183
|
-
this.currLiIndex = -1;
|
184
|
-
document.addEventListener('keydown', this.handleDocumentKeyDown);
|
185
|
-
document.addEventListener('mousedown', this.handleDocumentMouseDown);
|
186
|
-
this.openList();
|
187
|
-
}
|
188
239
|
this.hasFocus = true;
|
189
240
|
this.nanoFocus.emit();
|
190
241
|
};
|
@@ -195,27 +246,18 @@ export class Select {
|
|
195
246
|
}
|
196
247
|
if (this.multiple) {
|
197
248
|
this.value = [];
|
198
|
-
let options = this.nativeSelect.querySelectorAll('option');
|
199
|
-
if (options.length)
|
200
|
-
options.forEach((n) => n.remove());
|
201
249
|
this.currInsertIndex = -1;
|
202
|
-
this.setAvailOpts();
|
203
250
|
}
|
204
251
|
else
|
205
252
|
this.value = '';
|
206
|
-
this.
|
253
|
+
this.inputCtrl.value = '';
|
254
|
+
const event = new window.Event('change');
|
255
|
+
this.inputCtrl.dispatchEvent(event);
|
207
256
|
};
|
208
257
|
this.onClick = () => {
|
209
258
|
this.setFocus();
|
210
|
-
this.openList();
|
211
259
|
};
|
212
260
|
/* Multi event handlers */
|
213
|
-
this.onMultiInputBlur = () => {
|
214
|
-
if (this.allowCustomValues)
|
215
|
-
return;
|
216
|
-
this.inputSearchVal = '';
|
217
|
-
this.setAvailOpts();
|
218
|
-
};
|
219
261
|
this.onDragStart = (ev) => {
|
220
262
|
let ele = ev.target;
|
221
263
|
this.dragVal = ele.dataset.value;
|
@@ -242,132 +284,87 @@ export class Select {
|
|
242
284
|
this.value = [...tmpArr];
|
243
285
|
};
|
244
286
|
this.onMultiInput = (ev) => {
|
245
|
-
this.inputSearchVal = ev.target.value;
|
246
|
-
this.
|
247
|
-
this.openList();
|
248
|
-
this.nanoSearchChange.emit({ value: ev.target.value });
|
249
|
-
};
|
250
|
-
this.onOptFocus = (ev) => {
|
251
|
-
let activeEle = this.getActiveOpt();
|
252
|
-
if (activeEle)
|
253
|
-
activeEle.classList.remove('has-focus');
|
254
|
-
ev.target.classList.add('has-focus');
|
255
|
-
};
|
256
|
-
this.onHostClick = () => {
|
257
|
-
setTimeout((_) => {
|
258
|
-
if (!this.multiple || this.hasFocus)
|
259
|
-
return;
|
260
|
-
this.setFocus();
|
261
|
-
}, 20);
|
262
|
-
};
|
263
|
-
this.handleDocumentMouseDown = (ev) => {
|
264
|
-
const target = ev.target;
|
265
|
-
if (closestElement(this.el.tagName.toLowerCase(), target) !== this.el) {
|
266
|
-
this.listOpen = false;
|
267
|
-
this.onBlur();
|
268
|
-
}
|
269
|
-
};
|
270
|
-
this.handleDocumentKeyDown = (ev) => {
|
271
|
-
if (!this.multiple)
|
272
|
-
return;
|
273
|
-
if (!this.inputSearchVal) {
|
274
|
-
let rm;
|
275
|
-
switch (ev.key) {
|
276
|
-
case 'Backspace':
|
277
|
-
if (this.multiInput.previousElementSibling)
|
278
|
-
rm = this.multiInput.previousElementSibling;
|
279
|
-
else
|
280
|
-
break;
|
281
|
-
this.removeValue(rm.dataset.value || null);
|
282
|
-
break;
|
283
|
-
case 'Delete':
|
284
|
-
if (this.multiInput.nextElementSibling)
|
285
|
-
rm = this.multiInput.nextElementSibling;
|
286
|
-
else
|
287
|
-
break;
|
288
|
-
this.removeValue(rm.dataset.value || null);
|
289
|
-
break;
|
290
|
-
case 'ArrowLeft':
|
291
|
-
case 'ArrowRight':
|
292
|
-
if (!this.value.length)
|
293
|
-
break;
|
294
|
-
if (ev.key === 'ArrowLeft' && this.multiInput.previousSibling)
|
295
|
-
this.currInsertIndex--;
|
296
|
-
if (ev.key === 'ArrowRight' && this.multiInput.nextSibling)
|
297
|
-
this.currInsertIndex++;
|
298
|
-
setTimeout(() => {
|
299
|
-
this.multiInput.focus();
|
300
|
-
}, 20);
|
301
|
-
ev.preventDefault();
|
302
|
-
break;
|
303
|
-
}
|
304
|
-
}
|
305
|
-
// navigated to component via keyboard. Open with down.
|
306
|
-
if (this.hasFocus && !this.listOpen && ev.key === 'ArrowDown') {
|
307
|
-
this.openList();
|
308
|
-
this.currLiIndex = -1;
|
309
|
-
}
|
310
|
-
// Close when tabbing outside of element
|
311
|
-
if (this.hasFocus && ev.key === 'Tab') {
|
312
|
-
setTimeout(() => {
|
313
|
-
if (document.activeElement &&
|
314
|
-
closestElement(this.el.tagName.toLowerCase(), document.activeElement) !== this.el) {
|
315
|
-
this.listOpen = false;
|
316
|
-
this.onBlur();
|
317
|
-
return;
|
318
|
-
}
|
319
|
-
});
|
320
|
-
}
|
321
|
-
// list open, navigate items with arrows
|
322
|
-
if (this.listOpen) {
|
323
|
-
const selectedItem = this.getActiveOpt();
|
324
|
-
let testIndex = this.listItems.indexOf(selectedItem) || this.currLiIndex;
|
325
|
-
switch (ev.key) {
|
326
|
-
case 'ArrowDown':
|
327
|
-
case 'ArrowUp':
|
328
|
-
ev.preventDefault();
|
329
|
-
if (ev.key === 'ArrowDown')
|
330
|
-
testIndex++;
|
331
|
-
else if (ev.key === 'ArrowUp')
|
332
|
-
testIndex--;
|
333
|
-
if (testIndex < 0) {
|
334
|
-
this.currLiIndex = 0;
|
335
|
-
this.multiInput.focus();
|
336
|
-
return;
|
337
|
-
}
|
338
|
-
let foundIndex = this.listItems[testIndex]
|
339
|
-
? testIndex
|
340
|
-
: this.currLiIndex;
|
341
|
-
setTimeout(() => {
|
342
|
-
this.listItems[foundIndex].focus();
|
343
|
-
this.currLiIndex = foundIndex;
|
344
|
-
}, 20);
|
345
|
-
return;
|
346
|
-
case 'Enter':
|
347
|
-
case ' ':
|
348
|
-
if (this.listItems[this.currLiIndex]) {
|
349
|
-
this.addValue(this.listItems[this.currLiIndex].dataset.value);
|
350
|
-
ev.preventDefault();
|
351
|
-
}
|
352
|
-
return;
|
353
|
-
case 'Escape':
|
354
|
-
this.listOpen = false;
|
355
|
-
return;
|
356
|
-
}
|
357
|
-
}
|
358
|
-
if (this.currLiIndex > -1)
|
359
|
-
ev.preventDefault();
|
287
|
+
this.inputSearchVal = ev.target.value.trim();
|
288
|
+
this.nanoSearchChange.emit({ value: ev.target.value.trim() });
|
360
289
|
};
|
361
290
|
}
|
291
|
+
get selectWrap() {
|
292
|
+
return this._selectWrap;
|
293
|
+
}
|
294
|
+
set selectWrap(ele) {
|
295
|
+
if (this._selectWrap === ele)
|
296
|
+
return;
|
297
|
+
this._selectWrap = ele;
|
298
|
+
this.setDataListOpts();
|
299
|
+
}
|
300
|
+
get datalist() {
|
301
|
+
return this._datalist;
|
302
|
+
}
|
303
|
+
set datalist(ele) {
|
304
|
+
if (this._datalist === ele)
|
305
|
+
return;
|
306
|
+
this._datalist = ele;
|
307
|
+
this.setDataListOpts();
|
308
|
+
}
|
309
|
+
/**
|
310
|
+
* This will be true when the control is in an invalid state.
|
311
|
+
* Validity is determined by the `required` prop. Or if custom validity message is set.
|
312
|
+
*/
|
313
|
+
get invalid() {
|
314
|
+
return this._invalid;
|
315
|
+
}
|
316
|
+
/**
|
317
|
+
* The value of the select.
|
318
|
+
*/
|
319
|
+
get value() {
|
320
|
+
return this._value;
|
321
|
+
}
|
322
|
+
set value(val) {
|
323
|
+
if (typeof val === 'string') {
|
324
|
+
if (this.multiple)
|
325
|
+
this._value = val.split(',');
|
326
|
+
else
|
327
|
+
this._value = val;
|
328
|
+
}
|
329
|
+
else if (Array.isArray(val)) {
|
330
|
+
if (this.multiple)
|
331
|
+
this._value = val;
|
332
|
+
else
|
333
|
+
this._value = val[0];
|
334
|
+
}
|
335
|
+
}
|
336
|
+
/**
|
337
|
+
* You can set options via js as an array of strings: `domElement.options = ['option 1', 'option 2']` or
|
338
|
+
* objects `domElement.options = [{label: 'option 1', value: 'opt-1'}]`. See `nano-option` docs for all available properties.
|
339
|
+
* Alternatively, you can nest `<nano-option>` elements within a `<nano-select>`
|
340
|
+
* Regardless - reading `options` will return the current component options - slotted or otherwise
|
341
|
+
*/
|
342
|
+
get options() {
|
343
|
+
if (this._options.length)
|
344
|
+
return this._options;
|
345
|
+
if (!this.datalist || !this.datalist.activeOptions)
|
346
|
+
return [];
|
347
|
+
return this._eOptions.map((ao) => {
|
348
|
+
const { value, selected, label, filterMeta } = ao;
|
349
|
+
return { value, selected, label, filterMeta };
|
350
|
+
});
|
351
|
+
}
|
352
|
+
set options(opts) {
|
353
|
+
this._options = opts.map((opt) => {
|
354
|
+
if (typeof opt === 'string')
|
355
|
+
return { value: opt, label: opt };
|
356
|
+
else
|
357
|
+
return opt;
|
358
|
+
});
|
359
|
+
}
|
362
360
|
debounceChanged() {
|
363
361
|
this.nanoSearchChange = debounceEvent(this.nanoSearchChange, this.debounce);
|
364
362
|
}
|
365
|
-
// @Watch('options')
|
366
363
|
shouldValidate() {
|
367
364
|
if (this.onInit)
|
368
365
|
return;
|
369
366
|
if (this.invalid)
|
370
|
-
this.showErrorMsg = this.
|
367
|
+
this.showErrorMsg = this._invalid = false;
|
371
368
|
this.customValidate();
|
372
369
|
if (this.validateOn !== 'dirty')
|
373
370
|
return;
|
@@ -376,63 +373,24 @@ export class Select {
|
|
376
373
|
/**
|
377
374
|
* Update the native select element when the value changes
|
378
375
|
*/
|
376
|
+
// eslint-disable-next-line @stencil/no-unused-watch
|
379
377
|
valueChanged() {
|
380
|
-
if (
|
381
|
-
|
382
|
-
if (this.multiple) {
|
383
|
-
if (typeof this.value === 'string' && !!this.value.length)
|
384
|
-
this.value = this.value.split(',');
|
385
|
-
if (this.value === null ||
|
386
|
-
(typeof this.value === 'string' && !this.value.length))
|
387
|
-
this.value = [];
|
388
|
-
if (this.currInsertIndex > this.value.length - 1)
|
378
|
+
if (this.onInit) {
|
379
|
+
if (this.multiple)
|
389
380
|
this.currInsertIndex = this.value.length - 1;
|
381
|
+
return;
|
390
382
|
}
|
391
|
-
else if (typeof this.value !== 'string' && this.value && this.value[0])
|
392
|
-
this.value = this.value[0];
|
393
|
-
this.setNativeValue();
|
394
|
-
this.setAvailOpts();
|
395
383
|
setTimeout((_) => this.shouldValidate(), 20);
|
396
384
|
this.nanoChange.emit({ value: this.value });
|
397
|
-
if (this.onInit)
|
398
|
-
return;
|
399
|
-
}
|
400
|
-
optionsChanged() {
|
401
|
-
this.setAvailOpts();
|
402
|
-
if (this.hasFocus)
|
403
|
-
this.openList();
|
404
385
|
}
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
this.
|
410
|
-
|
411
|
-
this.setupMulti();
|
412
|
-
else if (this.popover)
|
413
|
-
this.popover.destroy();
|
414
|
-
}
|
415
|
-
setupMulti() {
|
416
|
-
setTimeout(() => {
|
417
|
-
this.setAvailOpts();
|
418
|
-
this.popover = new Popover(this.selectWrap, this.multiList, {
|
419
|
-
placement: 'bottom-start',
|
420
|
-
skidding: 0,
|
421
|
-
distance: 0,
|
422
|
-
onTransitionEnd: () => {
|
423
|
-
if (!this.listOpen) {
|
424
|
-
this.multiList.scrollTop = 0;
|
425
|
-
}
|
426
|
-
},
|
427
|
-
});
|
428
|
-
}, 20);
|
429
|
-
}
|
430
|
-
listOpenChange() {
|
431
|
-
if (this.listOpen)
|
432
|
-
this.popover.show();
|
433
|
-
else
|
434
|
-
this.popover.hide();
|
386
|
+
setDataListOpts() {
|
387
|
+
if (!this.datalist || !this.selectWrap)
|
388
|
+
return;
|
389
|
+
const currDWConfig = this.datalist.dropDownConfig || {};
|
390
|
+
this.datalist.dropDownConfig = Object.assign(Object.assign(Object.assign({}, currDWConfig), this.dropDownConfig), { tetherTo: this.selectWrap });
|
391
|
+
this.datalist.input = this.inputCtrl;
|
435
392
|
}
|
393
|
+
// Public Methods
|
436
394
|
/**
|
437
395
|
* Get the current state of the control.
|
438
396
|
* @param validateFirst - perform validation first before reporting
|
@@ -451,10 +409,8 @@ export class Select {
|
|
451
409
|
* `select.focus()`.
|
452
410
|
*/
|
453
411
|
async setFocus() {
|
454
|
-
|
455
|
-
|
456
|
-
else if (this.multiInput)
|
457
|
-
this.multiInput.focus();
|
412
|
+
this.inputCtrl.focus();
|
413
|
+
setTimeout(() => this.inputCtrl.click(), 50);
|
458
414
|
}
|
459
415
|
/**
|
460
416
|
* Returns the native `<select>` element used under the hood.
|
@@ -469,225 +425,62 @@ export class Select {
|
|
469
425
|
async showError(message) {
|
470
426
|
if (this.nativeSelect) {
|
471
427
|
this.nativeSelect.setCustomValidity(message);
|
472
|
-
this.
|
428
|
+
this.showInlineValidation();
|
473
429
|
}
|
474
430
|
}
|
475
431
|
/* Logic */
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
this.availOpts = this.options.filter((opt) => {
|
483
|
-
let toFind = typeof opt === 'string' ? opt : opt['value'];
|
484
|
-
let strFilter = typeof opt === 'string' ? opt : opt['label'] || opt['value'];
|
485
|
-
if (!toFind)
|
486
|
-
return false;
|
487
|
-
return (!this.value.includes(toFind) &&
|
488
|
-
(!this.multiInput ||
|
489
|
-
strFilter.toLowerCase().indexOf(this.inputSearchVal.toLowerCase()) >
|
490
|
-
-1));
|
491
|
-
});
|
492
|
-
}
|
493
|
-
getNativeValue() {
|
494
|
-
const nsl = this.nativeSelect;
|
495
|
-
if (!nsl)
|
496
|
-
return '';
|
497
|
-
if (!this.multiple)
|
498
|
-
return nsl.options[nsl.selectedIndex] &&
|
499
|
-
nsl.options[nsl.selectedIndex].hasAttribute('value')
|
500
|
-
? nsl.options[nsl.selectedIndex].value
|
501
|
-
: '';
|
502
|
-
else {
|
503
|
-
return Array.from(nsl.options).map((opt) => {
|
504
|
-
if (opt.selected && opt.hasAttribute('value'))
|
505
|
-
return opt.value;
|
506
|
-
});
|
507
|
-
}
|
508
|
-
}
|
509
|
-
setNativeValue() {
|
510
|
-
const nsl = this.nativeSelect;
|
511
|
-
if (!nsl)
|
512
|
-
return null;
|
513
|
-
if (!this.multiple)
|
514
|
-
nsl.value = this.value;
|
515
|
-
else {
|
516
|
-
Array.from(this.nativeSelect.options)
|
517
|
-
.filter((opt) => {
|
518
|
-
if (typeof this.value === 'string')
|
519
|
-
return opt.value === this.value;
|
520
|
-
else
|
521
|
-
return this.value.find((val) => {
|
522
|
-
if (typeof val === 'string')
|
523
|
-
return val === this.value;
|
524
|
-
else if (val['value'])
|
525
|
-
return val === val['value'];
|
526
|
-
});
|
527
|
-
})
|
528
|
-
.map((opt) => {
|
529
|
-
opt.selected = true;
|
530
|
-
});
|
531
|
-
}
|
432
|
+
get valArray() {
|
433
|
+
return typeof this.value === 'string'
|
434
|
+
? this.value.length
|
435
|
+
? [this.value]
|
436
|
+
: []
|
437
|
+
: this.value;
|
532
438
|
}
|
533
439
|
isValidValues() {
|
534
|
-
|
535
|
-
if (!nsl)
|
536
|
-
return null;
|
537
|
-
const selected = this.nativeSelect.querySelectorAll('option:checked');
|
538
|
-
const values = Array.from(selected).map((el) => el.value || null);
|
539
|
-
if (this.multiple) {
|
540
|
-
return values.reduce((accumulator, currentValue) => {
|
541
|
-
if (!accumulator)
|
542
|
-
return false;
|
543
|
-
return !!this.options.find((opt) => opt['value'] ? opt['value'] === currentValue : opt === currentValue);
|
544
|
-
}, true);
|
545
|
-
}
|
546
|
-
else {
|
547
|
-
return this.options.find((opt) => opt['value'] ? opt['value'] === values[0] : opt === values[0]);
|
548
|
-
}
|
549
|
-
}
|
550
|
-
openList() {
|
551
|
-
if (!this.multiple)
|
552
|
-
return;
|
553
|
-
if ((this.availOpts.length ||
|
554
|
-
(!!this.inputSearchVal.length && this.allowCustomValues)) &&
|
555
|
-
(!this.max || (this.max && this.value.length < this.max)))
|
556
|
-
this.listOpen = true;
|
557
|
-
else
|
558
|
-
this.listOpen = false;
|
559
|
-
}
|
560
|
-
addValue(value) {
|
561
|
-
if (!this.multiple)
|
562
|
-
return;
|
563
|
-
if (this.value && this.value.length && this.value.includes(value))
|
564
|
-
return;
|
565
|
-
if (this.max && this.value.length === this.max)
|
566
|
-
return;
|
567
|
-
this.currInsertIndex++;
|
568
|
-
this.value = [
|
569
|
-
...this.value.slice(0, this.currInsertIndex),
|
570
|
-
value,
|
571
|
-
...this.value.slice(this.currInsertIndex),
|
572
|
-
];
|
573
|
-
this.inputSearchVal = '';
|
574
|
-
this.setAvailOpts();
|
575
|
-
this.selectWrap.clientWidth; // force reflow
|
576
|
-
this.setFocus();
|
577
|
-
this.openList();
|
578
|
-
}
|
579
|
-
removeValue(toFind) {
|
580
|
-
if (!this.multiple || !this.value.length)
|
581
|
-
return;
|
582
|
-
if (!toFind)
|
583
|
-
toFind = this.value[this.value.length - 1];
|
584
|
-
this.value = this.value.filter((val) => val !== toFind);
|
585
|
-
if (this.currInsertIndex > this.value.length - 1)
|
586
|
-
this.currInsertIndex = this.value.length - 1;
|
587
|
-
this.selectWrap.clientWidth; // force reflow
|
588
|
-
this.setFocus();
|
589
|
-
this.openList();
|
590
|
-
}
|
591
|
-
switchValue() {
|
592
|
-
this.watchValue = false;
|
593
|
-
if (this.multiple) {
|
594
|
-
if (typeof this.value === 'string' && !!this.value.length)
|
595
|
-
this.value = this.value.split(',');
|
596
|
-
else
|
597
|
-
this.value = [];
|
598
|
-
this.currInsertIndex = Math.max(this.value.length - 1, 0);
|
599
|
-
}
|
600
|
-
else if (typeof this.value !== 'string' && this.value && this.value[0])
|
601
|
-
this.value = this.value[0];
|
602
|
-
this.watchValue = true;
|
603
|
-
}
|
604
|
-
isSelected(value) {
|
605
|
-
if (this.multiple)
|
606
|
-
return this.value.find((val) => val === value);
|
607
|
-
else
|
608
|
-
value === this.value;
|
609
|
-
}
|
610
|
-
getLabel(val) {
|
611
|
-
let foundVal = this.options.find((opt) => {
|
612
|
-
return opt['value'] ? opt['value'] === val : opt === val;
|
613
|
-
});
|
614
|
-
if (!foundVal)
|
615
|
-
return null;
|
616
|
-
return foundVal['label'] ? foundVal['label'] : foundVal;
|
440
|
+
return this.valArray.find((val) => this.options.find((opt) => opt.value === val));
|
617
441
|
}
|
618
442
|
slotChangeObserver() {
|
619
|
-
const mo = (this.mo = new MutationObserver((
|
443
|
+
const mo = (this.mo = new MutationObserver(() => this.processSlottedContent()));
|
620
444
|
mo.observe(this.el, { childList: true, subtree: true });
|
621
445
|
}
|
622
|
-
processSlottedContent(
|
446
|
+
processSlottedContent() {
|
623
447
|
// see if we have label / helper content
|
624
448
|
this.hasLabelSlot = !!this.el.querySelectorAll('[slot="label"]').length;
|
625
449
|
this.hasHelperSlot = !!this.el.querySelector('[slot="helper"]');
|
626
|
-
|
627
|
-
if (
|
628
|
-
|
629
|
-
let existingselect = this.el.querySelector('select:not([class*="sc-nano-select"])');
|
630
|
-
if (existingselect) {
|
631
|
-
Array.from(existingselect.attributes)
|
632
|
-
.filter((attr) => attr.specified && attr.nodeName in this)
|
633
|
-
.map((attr) => (this[attr.nodeName] = attr.nodeValue));
|
634
|
-
}
|
635
|
-
// find legacy label. Apply to our element
|
636
|
-
let existingLabel = this.el.querySelector('label:not([class*="sc-nano-select"])');
|
637
|
-
if (existingLabel)
|
638
|
-
this.label = this.label || existingLabel.innerHTML;
|
639
|
-
// find legacy slotted options. Apply them and add any relevant values
|
640
|
-
let legacyOpts = this.el.querySelectorAll('option:not([class*="sc-nano-select"])');
|
641
|
-
this.watchValue = false;
|
642
|
-
if (legacyOpts && legacyOpts.length) {
|
643
|
-
let options = [];
|
644
|
-
legacyOpts.forEach((option) => {
|
645
|
-
options.push({
|
646
|
-
label: option.label || option.innerText,
|
647
|
-
value: option.value,
|
648
|
-
});
|
649
|
-
if (!option.selected || !option.value)
|
650
|
-
return;
|
651
|
-
if (this.multiple)
|
652
|
-
this.value.push(option.value);
|
653
|
-
else
|
654
|
-
this.value = option.value;
|
655
|
-
});
|
656
|
-
this.options = options;
|
657
|
-
}
|
658
|
-
if (legacyOpts.length || existingLabel || existingselect) {
|
659
|
-
// empty all legacy slotted stuff
|
660
|
-
let children = this.el.querySelectorAll('[slot="legacy"]');
|
661
|
-
if (children)
|
662
|
-
children.forEach((n) => n.parentNode.removeChild(n));
|
663
|
-
}
|
664
|
-
this.watchValue = true;
|
450
|
+
// breaking change introduced in v2. Rm in v3
|
451
|
+
if (!!this.el.querySelector('select:not([class*="sc-nano-select"]) option')) {
|
452
|
+
console.warn('nesting `<option>` elements was removed in v2. Please update your code to use `<nano-option>` elements instead.', this.el);
|
665
453
|
}
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
// find nano-select-options
|
670
|
-
let nanoOpts = this.el.querySelectorAll('nano-select-option');
|
671
|
-
if (nanoOpts && nanoOpts.length) {
|
672
|
-
let options = [];
|
673
|
-
nanoOpts.forEach((option) => {
|
674
|
-
options.push({
|
675
|
-
label: option.label || option.innerText,
|
676
|
-
value: option.value,
|
677
|
-
});
|
678
|
-
if (!option.selected || !option.value)
|
679
|
-
return;
|
680
|
-
if (this.multiple)
|
681
|
-
this.value.push(option.value);
|
682
|
-
else
|
683
|
-
this.value = option.value;
|
684
|
-
});
|
685
|
-
this.options = options;
|
454
|
+
// breaking change introduced in v2. Rm in v3
|
455
|
+
if (!!this.el.querySelector('[slot="legacy"]')) {
|
456
|
+
console.warn('The `legacy` slot has been removed. Please update your code', this.el);
|
686
457
|
}
|
687
|
-
this.setAvailOpts();
|
688
458
|
}
|
689
|
-
|
690
|
-
|
459
|
+
getLabel(toFind) {
|
460
|
+
let label = this.options.find((opt) => {
|
461
|
+
var _a;
|
462
|
+
return !opt.disabled && ((_a = opt.value) === null || _a === void 0 ? void 0 : _a.length) && opt.value === toFind;
|
463
|
+
});
|
464
|
+
return label && label.label ? label.label : toFind;
|
465
|
+
}
|
466
|
+
/* Event handling */
|
467
|
+
handleBlur(e) {
|
468
|
+
if (!this.hasFocus)
|
469
|
+
return;
|
470
|
+
const kev = e;
|
471
|
+
let target;
|
472
|
+
raf(() => {
|
473
|
+
if (kev.key) {
|
474
|
+
if (kev.key !== 'Tab')
|
475
|
+
return;
|
476
|
+
target = getActiveElement();
|
477
|
+
}
|
478
|
+
else
|
479
|
+
target = e.target;
|
480
|
+
if (closestElement(this.el.tagName.toLowerCase(), target) !== this.el) {
|
481
|
+
this.onBlur();
|
482
|
+
}
|
483
|
+
});
|
691
484
|
}
|
692
485
|
/* Stencil Component lifecycle hooks */
|
693
486
|
connectedCallback() {
|
@@ -697,7 +490,6 @@ export class Select {
|
|
697
490
|
this.el.dispatchEvent(new CustomEvent('nanoDidLoad', {
|
698
491
|
detail: this.el,
|
699
492
|
}));
|
700
|
-
testLegacyStyle(this.el);
|
701
493
|
}
|
702
494
|
disconnectedCallback() {
|
703
495
|
document.dispatchEvent(new CustomEvent('nanoDidUnload', {
|
@@ -707,133 +499,92 @@ export class Select {
|
|
707
499
|
return;
|
708
500
|
if (this.mo)
|
709
501
|
this.mo.disconnect();
|
710
|
-
if (this.popover)
|
711
|
-
this.popover.destroy();
|
712
502
|
}
|
713
503
|
componentDidLoad() {
|
714
504
|
this.slotChangeObserver();
|
715
|
-
if (this.multiple)
|
716
|
-
this.setupMulti();
|
717
505
|
this.customValidate();
|
506
|
+
this.setDataListOpts();
|
507
|
+
raf(() => (this.onInit = false));
|
718
508
|
}
|
719
509
|
componentWillLoad() {
|
720
|
-
this.switchValue();
|
721
510
|
this.processSlottedContent();
|
722
|
-
this.onInit = false;
|
723
|
-
}
|
724
|
-
renderLabel(labelId, position) {
|
725
|
-
let classes = {};
|
726
|
-
if (position === 'float') {
|
727
|
-
classes = { 'placeholder-as-label': true };
|
728
|
-
}
|
729
|
-
else {
|
730
|
-
classes = { label: true, 'visually-hide': this.hideLabel };
|
731
|
-
}
|
732
|
-
if (!this.label && !this.hasLabelSlot)
|
733
|
-
return;
|
734
|
-
return (h("label", { class: classes, htmlFor: this.selectId, id: labelId },
|
735
|
-
this.label && this.label,
|
736
|
-
!this.label && !!this.hasLabelSlot && h("slot", { name: "label" })));
|
737
511
|
}
|
738
512
|
render() {
|
739
513
|
const labelId = this.selectId + '-lbl';
|
740
514
|
const moreId = this.showInlineError || this.hasHelperSlot
|
741
515
|
? this.selectId + '-moreId'
|
742
516
|
: '';
|
743
|
-
const listId = this.selectId + '-list';
|
744
517
|
this.rtl = this.el.ownerDocument.dir === 'rtl';
|
745
|
-
this.listItems = [];
|
746
518
|
this.valueItems = [];
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
519
|
+
const compWrapOptions = (({ el, floatLabel, label, errorMessage, showInlineError, hasHelperSlot, hasLabelSlot, hideLabel, placeholder, rtl, }) => ({
|
520
|
+
el,
|
521
|
+
floatLabel,
|
522
|
+
label,
|
523
|
+
errorMessage,
|
524
|
+
showInlineError,
|
525
|
+
hasHelperSlot,
|
526
|
+
hasLabelSlot,
|
527
|
+
hideLabel,
|
528
|
+
placeholder,
|
529
|
+
rtl,
|
530
|
+
}))(this);
|
531
|
+
const wrapOptions = Object.assign(Object.assign({}, compWrapOptions), { labelId,
|
532
|
+
moreId, hasValue: !!this.value.length || !!this.inputSearchVal.length, controlId: this.selectId });
|
533
|
+
const controlOptions = (({ readonly, disabled }) => ({
|
534
|
+
readonly,
|
535
|
+
disabled,
|
536
|
+
clearControl: this.clearSelect,
|
537
|
+
}))(this);
|
538
|
+
return (h(Host, { type: this.multiple ? 'select-multiple' : 'select-one', "aria-disabled": this.disabled ? 'true' : null, class: Object.assign(Object.assign({}, createColorClasses(this.color)), { 'has-value': !!this.value.length || !!this.inputSearchVal.length, 'has-focus': this.hasFocus, 'is-invalid': this.invalid, 'has-label': this.label !== null && !this.floatLabel, 'has-float-label': this.label !== null && this.floatLabel, rtl: this.rtl, 'has-multiple': this.multiple, 'has-clr-btn': this.clearSelect, masked: this.mask, legacy: this.isLegacy }) },
|
539
|
+
h(FormControlWrap, Object.assign({}, wrapOptions),
|
540
|
+
h(FormControl, Object.assign({}, controlOptions, { onClearText: this.clearSelectValue, control: this.el, ref: (el) => (this.selectWrap = el), endValueSlot: h("slot", { name: "down-arrow" },
|
541
|
+
h("nano-icon", { slot: "value-end", name: "light/chevron-down" })) }),
|
542
|
+
this.multiple && (h("div", { class: "multi-wrap" }, this.multipleValues(labelId, moreId))),
|
543
|
+
!this.multiple && [
|
544
|
+
this.mask && (h("div", { class: "select-mask" }, this.getLabel(this.value))),
|
545
|
+
h("input", { id: this.selectId, class: "native-input", ref: (input) => (this.inputCtrl = input), "aria-labelledby": labelId + ' ' + moreId, disabled: this.disabled, form: this.form, placeholder: !this.floatLabel && this.placeholder ? this.placeholder : '', readOnly: true, required: this.required, value: this.getLabel(this.value), onFocus: this.onFocus }),
|
546
|
+
])),
|
547
|
+
!this.readonly && !this.disabled && (h("nano-datalist", { onNanoOptionsUpdated: this.setOptions, ref: (el) => (this.datalist = el), selected: this.valArray, type: this.multiple ? 'selctMulti' : 'select', onNanoSelect: this.setValue, onNanoDeselect: (e) => {
|
548
|
+
e.preventDefault();
|
549
|
+
this.removeValue(e.detail.value);
|
550
|
+
}, options: this._options.length ? this._options : undefined },
|
551
|
+
this.allowCustomValues && this.multiple && !!this.inputSearchVal && (h("nano-option", { slot: "list-top", value: this.inputSearchVal, selected: false, label: this.inputSearchVal, onNanoSelect: () => this.inputCtrl.focus() },
|
552
|
+
h("span", { slot: "check-icon" }),
|
553
|
+
"Add '",
|
554
|
+
this.inputSearchVal,
|
555
|
+
"'")),
|
556
|
+
h("slot", null))),
|
557
|
+
h("select", { id: this.selectId + '-hidden', class: "native-select", ref: (select) => (this.nativeSelect = select), "aria-labelledby": labelId + ' ' + moreId, disabled: this.disabled, form: this.form, multiple: this.multiple, name: this.name, required: this.required, onInvalid: this.handleInvalid },
|
558
|
+
this.allowCustomValues &&
|
559
|
+
this.valArray.map((val) => {
|
560
|
+
return (h("option", { value: val, selected: true }, val));
|
561
|
+
}),
|
562
|
+
!this.allowCustomValues &&
|
563
|
+
this.options.map((opt) => {
|
564
|
+
return (h("option", { value: opt.value, selected: this.valArray.includes(opt.value), disabled: opt.disabled, label: opt.label }, this.valArray.includes(opt.value)));
|
565
|
+
}))));
|
566
|
+
}
|
567
|
+
multipleValues(labelId, moreId) {
|
568
|
+
let input = (h("input", { class: "multi-input", id: this.selectId, ref: (input) => (this.inputCtrl = input), readOnly: this.readonly, disabled: this.disabled, autoFocus: this.autofocus, autocomplete: "off", onKeyDown: this.handleDocumentKeyDown, onInput: this.onMultiInput, value: this.inputSearchVal, onTouchStart: this.onClick, onMouseDown: this.onClick, onFocus: this.onFocus, placeholder: this.placeholder && !this.floatLabel && !this.value.length
|
569
|
+
? this.placeholder
|
570
|
+
: '', "aria-labelledby": labelId + ' ' + moreId }));
|
571
|
+
if (!this.value.length)
|
572
|
+
return input;
|
573
|
+
return this.value.map((val, i) => {
|
574
|
+
let toReturn = (h("span", { onDragStart: this.onDragStart, onDragLeave: this.onDragLeave, onDragEnd: this.onDragEnd, onDragOver: (e) => e.preventDefault(), draggable: true, "data-value": val, ref: (span) => this.valueItems.push(span), class: "multi-value" },
|
575
|
+
h("span", null, this.getLabel(val)),
|
576
|
+
h("button", { class: "multi-value-remove", type: "button", tabindex: "-1", onTouchEnd: () => {
|
577
|
+
this.removeValue(val);
|
578
|
+
}, onMouseUp: () => {
|
579
|
+
this.removeValue(val);
|
788
580
|
} },
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
this.allowCustomValues && this.inputSearchVal.length > 0 && (h("li", { "data-value": this.inputSearchVal, role: "option", tabindex: "-1", ref: (li) => this.listItems.push(li), onMouseDown: () => {
|
797
|
-
this.addValue(this.inputSearchVal);
|
798
|
-
}, onFocus: this.onOptFocus },
|
799
|
-
"Add ",
|
800
|
-
this.inputSearchVal)),
|
801
|
-
this.availOpts.map((option) => {
|
802
|
-
let optval, label;
|
803
|
-
if (option['value']) {
|
804
|
-
optval = option['value'];
|
805
|
-
label = option['label'] || option['value'];
|
806
|
-
}
|
807
|
-
else if (typeof option === 'string') {
|
808
|
-
optval = option;
|
809
|
-
label = optval;
|
810
|
-
}
|
811
|
-
if (!optval)
|
812
|
-
return;
|
813
|
-
return (h("li", { role: "option", key: optval, "data-value": optval, ref: (li) => this.listItems.push(li), tabindex: "-1", "aria-selected": this.isSelected(optval) ? 'true' : 'false', onMouseDown: () => {
|
814
|
-
this.addValue(optval);
|
815
|
-
}, onFocus: this.onOptFocus }, label));
|
816
|
-
})),
|
817
|
-
h("select", { id: this.selectId + '-hidden', class: "native-select", ref: (select) => (this.nativeSelect = select), "aria-labelledby": labelId + ' ' + moreId, disabled: this.disabled, form: this.form, multiple: this.multiple, name: this.name, required: this.required, onInvalid: this.handleInvalid }, this.value.map((val) => {
|
818
|
-
return (h("option", { value: val, selected: true }, val));
|
819
|
-
})),
|
820
|
-
],
|
821
|
-
!this.multiple && (h("select", { id: this.selectId, class: "native-select", ref: (select) => (this.nativeSelect = select), "aria-labelledby": labelId + ' ' + moreId, disabled: this.disabled, form: this.form, autoFocus: this.autofocus, multiple: this.multiple, name: this.name, required: this.required, size: this.size, onBlur: this.onBlur, onFocus: this.onFocus, onInvalid: this.handleInvalid, onChange: this.onChange },
|
822
|
-
this.options.map((option, i) => {
|
823
|
-
if (option['value'] || option['label'])
|
824
|
-
return (h("option", { key: option['label'] + i, label: option['label'], value: option['value'], selected: option['value'] === this.value ||
|
825
|
-
(!this.value && !option['value']), disabled: !option['value'] && this.required }, option['label'] ? option['label'] : option['value']));
|
826
|
-
else
|
827
|
-
return (h("option", { key: option + i, value: option, selected: option === this.value }, option));
|
828
|
-
}),
|
829
|
-
h("slot", { name: "legacy" }))),
|
830
|
-
this.clearSelect && !this.readonly && !this.disabled && (h("button", { type: "button", class: "select-clear-icon", tabindex: "-1", onTouchEnd: this.clearSelectValue, onMouseUp: this.clearSelectValue },
|
831
|
-
h("nano-icon", { name: "light/times" }))),
|
832
|
-
h("div", { onTouchEnd: this.onClick, onMouseUp: this.onClick, class: "select-down-icon" }, this.hasIconSlot ? (h("slot", { name: "icon" })) : (h("nano-icon", { name: "regular/chevron-down" }))))),
|
833
|
-
(this.showInlineError || this.hasHelperSlot) && (h("div", { class: "more", id: moreId },
|
834
|
-
!!this.showInlineError ? (h("div", { class: "error" }, this.errorMessage)) : (''),
|
835
|
-
h("div", { class: "helper" },
|
836
|
-
h("slot", { name: "helper" }))))));
|
581
|
+
h("nano-icon", { name: "light/times" }))));
|
582
|
+
if (i === 0 && this.currInsertIndex < 0)
|
583
|
+
toReturn = [input, toReturn];
|
584
|
+
else if (i === this.currInsertIndex)
|
585
|
+
toReturn = [toReturn, input];
|
586
|
+
return toReturn;
|
587
|
+
});
|
837
588
|
}
|
838
589
|
static get is() { return "nano-select"; }
|
839
590
|
static get encapsulation() { return "scoped"; }
|
@@ -846,7 +597,7 @@ export class Select {
|
|
846
597
|
static get properties() { return {
|
847
598
|
"invalid": {
|
848
599
|
"type": "boolean",
|
849
|
-
"mutable":
|
600
|
+
"mutable": false,
|
850
601
|
"complexType": {
|
851
602
|
"original": "boolean",
|
852
603
|
"resolved": "boolean",
|
@@ -858,7 +609,7 @@ export class Select {
|
|
858
609
|
"tags": [],
|
859
610
|
"text": "This will be true when the control is in an invalid state.\nValidity is determined by the `required` prop. Or if custom validity message is set."
|
860
611
|
},
|
861
|
-
"getter":
|
612
|
+
"getter": true,
|
862
613
|
"setter": false,
|
863
614
|
"attribute": "invalid",
|
864
615
|
"reflect": true,
|
@@ -873,7 +624,7 @@ export class Select {
|
|
873
624
|
"references": {
|
874
625
|
"Color": {
|
875
626
|
"location": "import",
|
876
|
-
"path": "/builds/
|
627
|
+
"path": "/builds/vyiT33Zh/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
877
628
|
}
|
878
629
|
}
|
879
630
|
},
|
@@ -980,7 +731,7 @@ export class Select {
|
|
980
731
|
"optional": false,
|
981
732
|
"docs": {
|
982
733
|
"tags": [],
|
983
|
-
"text": "String to place within a label element."
|
734
|
+
"text": "String to place within a label element. Alternatively use the 'label' slot"
|
984
735
|
},
|
985
736
|
"getter": false,
|
986
737
|
"setter": false,
|
@@ -1103,7 +854,7 @@ export class Select {
|
|
1103
854
|
"getter": false,
|
1104
855
|
"setter": false,
|
1105
856
|
"attribute": "readonly",
|
1106
|
-
"reflect":
|
857
|
+
"reflect": true,
|
1107
858
|
"defaultValue": "false"
|
1108
859
|
},
|
1109
860
|
"required": {
|
@@ -1224,37 +975,37 @@ export class Select {
|
|
1224
975
|
},
|
1225
976
|
"value": {
|
1226
977
|
"type": "string",
|
1227
|
-
"mutable":
|
978
|
+
"mutable": false,
|
1228
979
|
"complexType": {
|
1229
|
-
"original": "string |
|
980
|
+
"original": "string | string[]",
|
1230
981
|
"resolved": "string | string[]",
|
1231
|
-
"references": {
|
1232
|
-
"Array": {
|
1233
|
-
"location": "global"
|
1234
|
-
}
|
1235
|
-
}
|
982
|
+
"references": {}
|
1236
983
|
},
|
1237
984
|
"required": false,
|
1238
|
-
"optional":
|
985
|
+
"optional": false,
|
1239
986
|
"docs": {
|
1240
987
|
"tags": [],
|
1241
988
|
"text": "The value of the select."
|
1242
989
|
},
|
1243
|
-
"getter":
|
1244
|
-
"setter":
|
990
|
+
"getter": true,
|
991
|
+
"setter": true,
|
1245
992
|
"attribute": "value",
|
1246
993
|
"reflect": false,
|
1247
|
-
"defaultValue": "this.multiple
|
994
|
+
"defaultValue": "this.multiple ? [] : ''"
|
1248
995
|
},
|
1249
996
|
"options": {
|
1250
997
|
"type": "unknown",
|
1251
|
-
"mutable":
|
998
|
+
"mutable": false,
|
1252
999
|
"complexType": {
|
1253
|
-
"original": "Array
|
1254
|
-
"resolved": "(string |
|
1000
|
+
"original": "Array<OptionInterface | string>",
|
1001
|
+
"resolved": "(string | OptionInterface)[]",
|
1255
1002
|
"references": {
|
1256
1003
|
"Array": {
|
1257
1004
|
"location": "global"
|
1005
|
+
},
|
1006
|
+
"OptionInterface": {
|
1007
|
+
"location": "import",
|
1008
|
+
"path": "/builds/vyiT33Zh/0/Digital/nano-components/packages/components/src/components/option/option-interface.ts"
|
1258
1009
|
}
|
1259
1010
|
}
|
1260
1011
|
},
|
@@ -1262,11 +1013,10 @@ export class Select {
|
|
1262
1013
|
"optional": false,
|
1263
1014
|
"docs": {
|
1264
1015
|
"tags": [],
|
1265
|
-
"text": "You can set options via js
|
1016
|
+
"text": "You can set options via js as an array of strings: `domElement.options = ['option 1', 'option 2']` or\nobjects `domElement.options = [{label: 'option 1', value: 'opt-1'}]`. See `nano-option` docs for all available properties.\nAlternatively, you can nest `<nano-option>` elements within a `<nano-select>`\nRegardless - reading `options` will return the current component options - slotted or otherwise"
|
1266
1017
|
},
|
1267
|
-
"getter":
|
1268
|
-
"setter":
|
1269
|
-
"defaultValue": "[]"
|
1018
|
+
"getter": true,
|
1019
|
+
"setter": true
|
1270
1020
|
},
|
1271
1021
|
"clearSelect": {
|
1272
1022
|
"type": "boolean",
|
@@ -1328,38 +1078,42 @@ export class Select {
|
|
1328
1078
|
"reflect": false,
|
1329
1079
|
"defaultValue": "0"
|
1330
1080
|
},
|
1331
|
-
"
|
1332
|
-
"type": "
|
1333
|
-
"mutable":
|
1081
|
+
"dropDownConfig": {
|
1082
|
+
"type": "unknown",
|
1083
|
+
"mutable": true,
|
1334
1084
|
"complexType": {
|
1335
|
-
"original": "
|
1336
|
-
"resolved": "boolean",
|
1337
|
-
"references": {
|
1085
|
+
"original": "Partial<Dropdown>",
|
1086
|
+
"resolved": "{ host?: HTMLNanoDropdownElement; autoOpen?: boolean; open?: boolean; handleOpenChange?: () => void; closeOnSelect?: boolean; containingElement?: HTMLElement; tetherTo?: HTMLElement; handleTetherToChange?: () => void; placement?: \"top\" | \"top-start\" | \"top-end\" | \"bottom\" | \"bottom-start\" | \"bottom-end\" | \"right\" | \"right-start\" | \"right-end\" | \"left\" | \"left-start\" | \"left-end\"; distance?: number; skidding?: number; hoist?: boolean; handlePopoverOptionsChange?: () => void; dialogTitle?: string; nanoShow?: EventEmitter<any>; nanoAfterShow?: EventEmitter<any>; nanoHide?: EventEmitter<any>; nanoAfterHide?: EventEmitter<any>; secondaryOpen?: (ev: CustomEvent<any>) => void; secondaryClose?: (ev: CustomEvent<any>) => void; handlePanelSelect?: (event: CustomEvent<any>) => void; show?: () => Promise<void>; hide?: () => Promise<void>; connectedCallback?: () => void; componentDidLoad?: () => void; disconnectedCallback?: () => void; render?: () => any; }",
|
1087
|
+
"references": {
|
1088
|
+
"Partial": {
|
1089
|
+
"location": "global"
|
1090
|
+
},
|
1091
|
+
"Dropdown": {
|
1092
|
+
"location": "import",
|
1093
|
+
"path": "/builds/vyiT33Zh/0/Digital/nano-components/packages/components/src/components/dropdown/dropdown.tsx"
|
1094
|
+
}
|
1095
|
+
}
|
1338
1096
|
},
|
1339
1097
|
"required": false,
|
1340
|
-
"optional":
|
1098
|
+
"optional": true,
|
1341
1099
|
"docs": {
|
1342
1100
|
"tags": [],
|
1343
|
-
"text": "
|
1101
|
+
"text": "nano-dropdown config options you can pass to the nested dropdown component"
|
1344
1102
|
},
|
1345
1103
|
"getter": false,
|
1346
1104
|
"setter": false,
|
1347
|
-
"
|
1348
|
-
"reflect": false,
|
1349
|
-
"defaultValue": "true"
|
1105
|
+
"defaultValue": "{}"
|
1350
1106
|
}
|
1351
1107
|
}; }
|
1352
1108
|
static get states() { return {
|
1353
1109
|
"currInsertIndex": {},
|
1354
|
-
"availOpts": {},
|
1355
1110
|
"showErrorMsg": {},
|
1356
1111
|
"errorMessage": {},
|
1357
1112
|
"hasFocus": {},
|
1358
|
-
"listOpen": {},
|
1359
|
-
"isLegacy": {},
|
1360
1113
|
"hasLabelSlot": {},
|
1361
1114
|
"hasHelperSlot": {},
|
1362
|
-
"
|
1115
|
+
"inputSearchVal": {},
|
1116
|
+
"_eOptions": {}
|
1363
1117
|
}; }
|
1364
1118
|
static get events() { return [{
|
1365
1119
|
"method": "nanoChange",
|
@@ -1377,7 +1131,7 @@ export class Select {
|
|
1377
1131
|
"references": {
|
1378
1132
|
"SelectChangeEventDetail": {
|
1379
1133
|
"location": "import",
|
1380
|
-
"path": "/builds/
|
1134
|
+
"path": "/builds/vyiT33Zh/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
1381
1135
|
}
|
1382
1136
|
}
|
1383
1137
|
}
|
@@ -1463,7 +1217,7 @@ export class Select {
|
|
1463
1217
|
"references": {
|
1464
1218
|
"InputChangeEventDetail": {
|
1465
1219
|
"location": "import",
|
1466
|
-
"path": "/builds/
|
1220
|
+
"path": "/builds/vyiT33Zh/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
1467
1221
|
}
|
1468
1222
|
}
|
1469
1223
|
}
|
@@ -1486,7 +1240,7 @@ export class Select {
|
|
1486
1240
|
"references": {
|
1487
1241
|
"ControlValidityEventDetail": {
|
1488
1242
|
"location": "import",
|
1489
|
-
"path": "/builds/
|
1243
|
+
"path": "/builds/vyiT33Zh/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
1490
1244
|
}
|
1491
1245
|
}
|
1492
1246
|
}
|
@@ -1508,7 +1262,7 @@ export class Select {
|
|
1508
1262
|
},
|
1509
1263
|
"ControlValidity": {
|
1510
1264
|
"location": "import",
|
1511
|
-
"path": "/builds/
|
1265
|
+
"path": "/builds/vyiT33Zh/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
1512
1266
|
}
|
1513
1267
|
},
|
1514
1268
|
"return": "Promise<ControlValidity>"
|
@@ -1605,15 +1359,21 @@ export class Select {
|
|
1605
1359
|
"propName": "value",
|
1606
1360
|
"methodName": "valueChanged"
|
1607
1361
|
}, {
|
1608
|
-
"propName": "
|
1609
|
-
"methodName": "
|
1610
|
-
}
|
1611
|
-
|
1612
|
-
"
|
1362
|
+
"propName": "dropDownConfig",
|
1363
|
+
"methodName": "setDataListOpts"
|
1364
|
+
}]; }
|
1365
|
+
static get listeners() { return [{
|
1366
|
+
"name": "mousedown",
|
1367
|
+
"method": "handleBlur",
|
1368
|
+
"target": "body",
|
1369
|
+
"capture": false,
|
1370
|
+
"passive": true
|
1613
1371
|
}, {
|
1614
|
-
"
|
1615
|
-
"
|
1372
|
+
"name": "keydown",
|
1373
|
+
"method": "handleBlur",
|
1374
|
+
"target": undefined,
|
1375
|
+
"capture": false,
|
1376
|
+
"passive": false
|
1616
1377
|
}]; }
|
1617
1378
|
}
|
1618
|
-
let selectIds = 0;
|
1619
1379
|
//# sourceMappingURL=select.js.map
|