@ni/fast-foundation 0.0.2
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/README.md +58 -0
- package/dist/dts/accordion/accordion.d.ts +65 -0
- package/dist/dts/accordion/accordion.template.d.ts +8 -0
- package/dist/dts/accordion/index.d.ts +2 -0
- package/dist/dts/accordion-item/accordion-item.d.ts +76 -0
- package/dist/dts/accordion-item/accordion-item.template.d.ts +8 -0
- package/dist/dts/accordion-item/index.d.ts +2 -0
- package/dist/dts/anchor/anchor.d.ts +128 -0
- package/dist/dts/anchor/anchor.template.d.ts +8 -0
- package/dist/dts/anchor/index.d.ts +2 -0
- package/dist/dts/anchored-region/anchored-region-config.d.ts +117 -0
- package/dist/dts/anchored-region/anchored-region.d.ts +389 -0
- package/dist/dts/anchored-region/anchored-region.template.d.ts +8 -0
- package/dist/dts/anchored-region/index.d.ts +3 -0
- package/dist/dts/avatar/avatar.d.ts +62 -0
- package/dist/dts/avatar/avatar.template.d.ts +8 -0
- package/dist/dts/avatar/index.d.ts +2 -0
- package/dist/dts/badge/badge.d.ts +36 -0
- package/dist/dts/badge/badge.template.d.ts +8 -0
- package/dist/dts/badge/index.d.ts +2 -0
- package/dist/dts/breadcrumb/breadcrumb.d.ts +27 -0
- package/dist/dts/breadcrumb/breadcrumb.template.d.ts +8 -0
- package/dist/dts/breadcrumb/index.d.ts +2 -0
- package/dist/dts/breadcrumb-item/breadcrumb-item.d.ts +36 -0
- package/dist/dts/breadcrumb-item/breadcrumb-item.template.d.ts +8 -0
- package/dist/dts/breadcrumb-item/index.d.ts +2 -0
- package/dist/dts/button/button.d.ts +167 -0
- package/dist/dts/button/button.form-associated.d.ts +16 -0
- package/dist/dts/button/button.template.d.ts +8 -0
- package/dist/dts/button/index.d.ts +2 -0
- package/dist/dts/calendar/calendar.d.ts +178 -0
- package/dist/dts/calendar/calendar.template.d.ts +58 -0
- package/dist/dts/calendar/date-formatter.d.ts +124 -0
- package/dist/dts/calendar/index.d.ts +3 -0
- package/dist/dts/card/card.d.ts +10 -0
- package/dist/dts/card/card.template.d.ts +8 -0
- package/dist/dts/card/index.d.ts +2 -0
- package/dist/dts/checkbox/checkbox.d.ts +58 -0
- package/dist/dts/checkbox/checkbox.form-associated.d.ts +16 -0
- package/dist/dts/checkbox/checkbox.template.d.ts +8 -0
- package/dist/dts/checkbox/index.d.ts +2 -0
- package/dist/dts/combobox/combobox.d.ts +341 -0
- package/dist/dts/combobox/combobox.form-associated.d.ts +16 -0
- package/dist/dts/combobox/combobox.options.d.ts +15 -0
- package/dist/dts/combobox/combobox.template.d.ts +8 -0
- package/dist/dts/combobox/index.d.ts +3 -0
- package/dist/dts/data-grid/data-grid-cell.d.ts +62 -0
- package/dist/dts/data-grid/data-grid-cell.template.d.ts +9 -0
- package/dist/dts/data-grid/data-grid-row.d.ts +119 -0
- package/dist/dts/data-grid/data-grid-row.template.d.ts +10 -0
- package/dist/dts/data-grid/data-grid.d.ts +218 -0
- package/dist/dts/data-grid/data-grid.options.d.ts +49 -0
- package/dist/dts/data-grid/data-grid.template.d.ts +10 -0
- package/dist/dts/data-grid/index.d.ts +6 -0
- package/dist/dts/design-system/component-presentation.d.ts +66 -0
- package/dist/dts/design-system/design-system.d.ts +104 -0
- package/dist/dts/design-system/index.d.ts +3 -0
- package/dist/dts/design-system/registration-context.d.ts +106 -0
- package/dist/dts/design-token/custom-property-manager.d.ts +35 -0
- package/dist/dts/design-token/design-token.d.ts +139 -0
- package/dist/dts/design-token/interfaces.d.ts +31 -0
- package/dist/dts/di/di.d.ts +858 -0
- package/dist/dts/di/index.d.ts +1 -0
- package/dist/dts/dialog/dialog.d.ts +153 -0
- package/dist/dts/dialog/dialog.template.d.ts +8 -0
- package/dist/dts/dialog/index.d.ts +2 -0
- package/dist/dts/directives/reflect-attributes.d.ts +18 -0
- package/dist/dts/disclosure/disclosure.d.ts +59 -0
- package/dist/dts/disclosure/disclosure.template.d.ts +8 -0
- package/dist/dts/disclosure/index.d.ts +2 -0
- package/dist/dts/divider/divider.d.ts +28 -0
- package/dist/dts/divider/divider.options.d.ts +19 -0
- package/dist/dts/divider/divider.template.d.ts +8 -0
- package/dist/dts/divider/index.d.ts +2 -0
- package/dist/dts/flipper/flipper.d.ts +57 -0
- package/dist/dts/flipper/flipper.options.d.ts +13 -0
- package/dist/dts/flipper/flipper.template.d.ts +8 -0
- package/dist/dts/flipper/index.d.ts +2 -0
- package/dist/dts/form-associated/form-associated.d.ts +177 -0
- package/dist/dts/form-associated/index.d.ts +1 -0
- package/dist/dts/foundation-element/foundation-element.d.ts +120 -0
- package/dist/dts/foundation-element/index.d.ts +1 -0
- package/dist/dts/horizontal-scroll/horizontal-scroll.d.ts +242 -0
- package/dist/dts/horizontal-scroll/horizontal-scroll.template.d.ts +7 -0
- package/dist/dts/horizontal-scroll/index.d.ts +2 -0
- package/dist/dts/index-rollup.d.ts +2 -0
- package/dist/dts/index.d.ts +53 -0
- package/dist/dts/interfaces.d.ts +4 -0
- package/dist/dts/listbox/index.d.ts +3 -0
- package/dist/dts/listbox/listbox.d.ts +314 -0
- package/dist/dts/listbox/listbox.element.d.ts +223 -0
- package/dist/dts/listbox/listbox.template.d.ts +8 -0
- package/dist/dts/listbox-option/index.d.ts +2 -0
- package/dist/dts/listbox-option/listbox-option.d.ts +176 -0
- package/dist/dts/listbox-option/listbox-option.template.d.ts +8 -0
- package/dist/dts/menu/index.d.ts +2 -0
- package/dist/dts/menu/menu.d.ts +78 -0
- package/dist/dts/menu/menu.template.d.ts +8 -0
- package/dist/dts/menu-item/index.d.ts +2 -0
- package/dist/dts/menu-item/menu-item.d.ts +160 -0
- package/dist/dts/menu-item/menu-item.options.d.ts +29 -0
- package/dist/dts/menu-item/menu-item.template.d.ts +10 -0
- package/dist/dts/number-field/index.d.ts +2 -0
- package/dist/dts/number-field/number-field.d.ts +227 -0
- package/dist/dts/number-field/number-field.form-associated.d.ts +16 -0
- package/dist/dts/number-field/number-field.template.d.ts +8 -0
- package/dist/dts/patterns/aria-global.d.ts +189 -0
- package/dist/dts/patterns/index.d.ts +2 -0
- package/dist/dts/patterns/start-end.d.ts +65 -0
- package/dist/dts/picker/index.d.ts +10 -0
- package/dist/dts/picker/picker-list-item.d.ts +38 -0
- package/dist/dts/picker/picker-list-item.template.d.ts +8 -0
- package/dist/dts/picker/picker-list.d.ts +8 -0
- package/dist/dts/picker/picker-list.template.d.ts +8 -0
- package/dist/dts/picker/picker-menu-option.d.ts +37 -0
- package/dist/dts/picker/picker-menu-option.template.d.ts +8 -0
- package/dist/dts/picker/picker-menu.d.ts +46 -0
- package/dist/dts/picker/picker-menu.template.d.ts +8 -0
- package/dist/dts/picker/picker.d.ts +390 -0
- package/dist/dts/picker/picker.form-associated.d.ts +16 -0
- package/dist/dts/picker/picker.template.d.ts +8 -0
- package/dist/dts/progress/base-progress.d.ts +71 -0
- package/dist/dts/progress/index.d.ts +2 -0
- package/dist/dts/progress/progress.template.d.ts +8 -0
- package/dist/dts/progress-ring/index.d.ts +1 -0
- package/dist/dts/progress-ring/progress-ring.template.d.ts +8 -0
- package/dist/dts/radio/index.d.ts +2 -0
- package/dist/dts/radio/radio.d.ts +70 -0
- package/dist/dts/radio/radio.form-associated.d.ts +16 -0
- package/dist/dts/radio/radio.template.d.ts +8 -0
- package/dist/dts/radio-group/index.d.ts +2 -0
- package/dist/dts/radio-group/radio-group.d.ts +101 -0
- package/dist/dts/radio-group/radio-group.template.d.ts +8 -0
- package/dist/dts/search/index.d.ts +2 -0
- package/dist/dts/search/search.d.ts +162 -0
- package/dist/dts/search/search.form-associated.d.ts +16 -0
- package/dist/dts/search/search.template.d.ts +8 -0
- package/dist/dts/select/index.d.ts +3 -0
- package/dist/dts/select/select.d.ts +289 -0
- package/dist/dts/select/select.form-associated.d.ts +16 -0
- package/dist/dts/select/select.options.d.ts +13 -0
- package/dist/dts/select/select.template.d.ts +8 -0
- package/dist/dts/skeleton/index.d.ts +2 -0
- package/dist/dts/skeleton/skeleton.d.ts +47 -0
- package/dist/dts/skeleton/skeleton.template.d.ts +8 -0
- package/dist/dts/slider/index.d.ts +2 -0
- package/dist/dts/slider/slider-utilities.d.ts +5 -0
- package/dist/dts/slider/slider.d.ts +230 -0
- package/dist/dts/slider/slider.form-associated.d.ts +16 -0
- package/dist/dts/slider/slider.template.d.ts +8 -0
- package/dist/dts/slider-label/index.d.ts +2 -0
- package/dist/dts/slider-label/slider-label.d.ts +81 -0
- package/dist/dts/slider-label/slider-label.template.d.ts +8 -0
- package/dist/dts/switch/index.d.ts +2 -0
- package/dist/dts/switch/switch.d.ts +60 -0
- package/dist/dts/switch/switch.form-associated.d.ts +16 -0
- package/dist/dts/switch/switch.template.d.ts +8 -0
- package/dist/dts/tab/index.d.ts +2 -0
- package/dist/dts/tab/tab.d.ts +17 -0
- package/dist/dts/tab/tab.template.d.ts +8 -0
- package/dist/dts/tab-panel/index.d.ts +2 -0
- package/dist/dts/tab-panel/tab-panel.d.ts +10 -0
- package/dist/dts/tab-panel/tab-panel.template.d.ts +8 -0
- package/dist/dts/tabs/index.d.ts +2 -0
- package/dist/dts/tabs/tabs.d.ts +140 -0
- package/dist/dts/tabs/tabs.template.d.ts +8 -0
- package/dist/dts/test-utilities/fixture.d.ts +89 -0
- package/dist/dts/test-utilities/timeout.d.ts +4 -0
- package/dist/dts/text-area/index.d.ts +2 -0
- package/dist/dts/text-area/text-area.d.ts +149 -0
- package/dist/dts/text-area/text-area.form-associated.d.ts +16 -0
- package/dist/dts/text-area/text-area.options.d.ts +27 -0
- package/dist/dts/text-area/text-area.template.d.ts +8 -0
- package/dist/dts/text-field/index.d.ts +2 -0
- package/dist/dts/text-field/text-field.d.ts +166 -0
- package/dist/dts/text-field/text-field.form-associated.d.ts +16 -0
- package/dist/dts/text-field/text-field.options.d.ts +31 -0
- package/dist/dts/text-field/text-field.template.d.ts +8 -0
- package/dist/dts/toolbar/index.d.ts +2 -0
- package/dist/dts/toolbar/toolbar.d.ts +167 -0
- package/dist/dts/toolbar/toolbar.template.d.ts +9 -0
- package/dist/dts/tooltip/index.d.ts +2 -0
- package/dist/dts/tooltip/tooltip.d.ts +239 -0
- package/dist/dts/tooltip/tooltip.options.d.ts +69 -0
- package/dist/dts/tooltip/tooltip.template.d.ts +8 -0
- package/dist/dts/tree-item/index.d.ts +2 -0
- package/dist/dts/tree-item/tree-item.d.ts +141 -0
- package/dist/dts/tree-item/tree-item.template.d.ts +8 -0
- package/dist/dts/tree-view/index.d.ts +2 -0
- package/dist/dts/tree-view/tree-view.d.ts +99 -0
- package/dist/dts/tree-view/tree-view.template.d.ts +8 -0
- package/dist/dts/utilities/apply-mixins.d.ts +6 -0
- package/dist/dts/utilities/composed-contains.d.ts +12 -0
- package/dist/dts/utilities/composed-parent.d.ts +10 -0
- package/dist/dts/utilities/direction.d.ts +7 -0
- package/dist/dts/utilities/index.d.ts +8 -0
- package/dist/dts/utilities/intersection-service.d.ts +30 -0
- package/dist/dts/utilities/match-media-stylesheet-behavior.d.ts +124 -0
- package/dist/dts/utilities/property-stylesheet-behavior.d.ts +38 -0
- package/dist/dts/utilities/resize-observer.d.ts +31 -0
- package/dist/dts/utilities/root-active-element.d.ts +1 -0
- package/dist/dts/utilities/style/disabled.d.ts +5 -0
- package/dist/dts/utilities/style/display.d.ts +17 -0
- package/dist/dts/utilities/style/focus.d.ts +8 -0
- package/dist/dts/utilities/style/index.d.ts +3 -0
- package/dist/dts/utilities/whitespace-filter.d.ts +9 -0
- package/dist/esm/accordion/accordion.js +185 -0
- package/dist/esm/accordion/accordion.template.js +11 -0
- package/dist/esm/accordion/index.js +2 -0
- package/dist/esm/accordion-item/accordion-item.js +72 -0
- package/dist/esm/accordion-item/accordion-item.template.js +49 -0
- package/dist/esm/accordion-item/index.js +2 -0
- package/dist/esm/anchor/anchor.js +85 -0
- package/dist/esm/anchor/anchor.template.js +47 -0
- package/dist/esm/anchor/index.js +2 -0
- package/dist/esm/anchored-region/anchored-region-config.js +59 -0
- package/dist/esm/anchored-region/anchored-region.js +964 -0
- package/dist/esm/anchored-region/anchored-region.template.js +12 -0
- package/dist/esm/anchored-region/index.js +3 -0
- package/dist/esm/avatar/avatar.js +39 -0
- package/dist/esm/avatar/avatar.template.js +23 -0
- package/dist/esm/avatar/index.js +2 -0
- package/dist/esm/badge/badge.js +40 -0
- package/dist/esm/badge/badge.template.js +12 -0
- package/dist/esm/badge/index.js +2 -0
- package/dist/esm/breadcrumb/breadcrumb.js +70 -0
- package/dist/esm/breadcrumb/breadcrumb.template.js +14 -0
- package/dist/esm/breadcrumb/index.js +2 -0
- package/dist/esm/breadcrumb-item/breadcrumb-item.js +23 -0
- package/dist/esm/breadcrumb-item/breadcrumb-item.template.js +24 -0
- package/dist/esm/breadcrumb-item/index.js +2 -0
- package/dist/esm/button/button.form-associated.js +15 -0
- package/dist/esm/button/button.js +183 -0
- package/dist/esm/button/button.template.js +51 -0
- package/dist/esm/button/index.js +2 -0
- package/dist/esm/calendar/calendar.js +280 -0
- package/dist/esm/calendar/calendar.template.js +191 -0
- package/dist/esm/calendar/date-formatter.js +144 -0
- package/dist/esm/calendar/index.js +3 -0
- package/dist/esm/card/card.js +10 -0
- package/dist/esm/card/card.template.js +8 -0
- package/dist/esm/card/index.js +2 -0
- package/dist/esm/checkbox/checkbox.form-associated.js +15 -0
- package/dist/esm/checkbox/checkbox.js +75 -0
- package/dist/esm/checkbox/checkbox.template.js +35 -0
- package/dist/esm/checkbox/index.js +2 -0
- package/dist/esm/combobox/combobox.form-associated.js +15 -0
- package/dist/esm/combobox/combobox.js +587 -0
- package/dist/esm/combobox/combobox.options.js +10 -0
- package/dist/esm/combobox/combobox.template.js +66 -0
- package/dist/esm/combobox/index.js +3 -0
- package/dist/esm/data-grid/data-grid-cell.js +229 -0
- package/dist/esm/data-grid/data-grid-cell.template.js +23 -0
- package/dist/esm/data-grid/data-grid-row.js +203 -0
- package/dist/esm/data-grid/data-grid-row.template.js +47 -0
- package/dist/esm/data-grid/data-grid.js +440 -0
- package/dist/esm/data-grid/data-grid.options.js +31 -0
- package/dist/esm/data-grid/data-grid.template.js +36 -0
- package/dist/esm/data-grid/index.js +6 -0
- package/dist/esm/design-system/component-presentation.js +86 -0
- package/dist/esm/design-system/design-system.js +207 -0
- package/dist/esm/design-system/index.js +3 -0
- package/dist/esm/design-system/registration-context.js +1 -0
- package/dist/esm/design-token/custom-property-manager.js +216 -0
- package/dist/esm/design-token/design-token.js +657 -0
- package/dist/esm/design-token/interfaces.js +1 -0
- package/dist/esm/di/di.js +1341 -0
- package/dist/esm/di/index.js +1 -0
- package/dist/esm/dialog/dialog.js +280 -0
- package/dist/esm/dialog/dialog.template.js +30 -0
- package/dist/esm/dialog/index.js +2 -0
- package/dist/esm/directives/reflect-attributes.js +88 -0
- package/dist/esm/disclosure/disclosure.js +72 -0
- package/dist/esm/disclosure/disclosure.template.js +20 -0
- package/dist/esm/disclosure/index.js +2 -0
- package/dist/esm/divider/divider.js +39 -0
- package/dist/esm/divider/divider.options.js +14 -0
- package/dist/esm/divider/divider.template.js +8 -0
- package/dist/esm/divider/index.js +2 -0
- package/dist/esm/flipper/flipper.js +65 -0
- package/dist/esm/flipper/flipper.options.js +8 -0
- package/dist/esm/flipper/flipper.template.js +30 -0
- package/dist/esm/flipper/index.js +2 -0
- package/dist/esm/form-associated/form-associated.js +464 -0
- package/dist/esm/form-associated/index.js +1 -0
- package/dist/esm/foundation-element/foundation-element.js +132 -0
- package/dist/esm/foundation-element/index.js +1 -0
- package/dist/esm/horizontal-scroll/horizontal-scroll.js +380 -0
- package/dist/esm/horizontal-scroll/horizontal-scroll.template.js +62 -0
- package/dist/esm/horizontal-scroll/index.js +2 -0
- package/dist/esm/index-rollup.js +2 -0
- package/dist/esm/index.js +54 -0
- package/dist/esm/interfaces.js +1 -0
- package/dist/esm/listbox/index.js +3 -0
- package/dist/esm/listbox/listbox.element.js +448 -0
- package/dist/esm/listbox/listbox.js +528 -0
- package/dist/esm/listbox/listbox.template.js +27 -0
- package/dist/esm/listbox-option/index.js +2 -0
- package/dist/esm/listbox-option/listbox-option.js +200 -0
- package/dist/esm/listbox-option/listbox-option.template.js +25 -0
- package/dist/esm/menu/index.js +2 -0
- package/dist/esm/menu/menu.js +290 -0
- package/dist/esm/menu/menu.template.js +15 -0
- package/dist/esm/menu-item/index.js +2 -0
- package/dist/esm/menu-item/menu-item.js +251 -0
- package/dist/esm/menu-item/menu-item.options.js +26 -0
- package/dist/esm/menu-item/menu-item.template.js +78 -0
- package/dist/esm/number-field/index.js +2 -0
- package/dist/esm/number-field/number-field.form-associated.js +15 -0
- package/dist/esm/number-field/number-field.js +288 -0
- package/dist/esm/number-field/number-field.template.js +84 -0
- package/dist/esm/patterns/aria-global.js +70 -0
- package/dist/esm/patterns/index.js +2 -0
- package/dist/esm/patterns/start-end.js +84 -0
- package/dist/esm/picker/index.js +10 -0
- package/dist/esm/picker/picker-list-item.js +71 -0
- package/dist/esm/picker/picker-list-item.template.js +17 -0
- package/dist/esm/picker/picker-list.js +8 -0
- package/dist/esm/picker/picker-list.template.js +13 -0
- package/dist/esm/picker/picker-menu-option.js +61 -0
- package/dist/esm/picker/picker-menu-option.template.js +16 -0
- package/dist/esm/picker/picker-menu.js +59 -0
- package/dist/esm/picker/picker-menu.template.js +29 -0
- package/dist/esm/picker/picker.form-associated.js +15 -0
- package/dist/esm/picker/picker.js +759 -0
- package/dist/esm/picker/picker.template.js +97 -0
- package/dist/esm/progress/base-progress.js +69 -0
- package/dist/esm/progress/index.js +2 -0
- package/dist/esm/progress/progress.template.js +31 -0
- package/dist/esm/progress-ring/index.js +1 -0
- package/dist/esm/progress-ring/progress-ring.template.js +45 -0
- package/dist/esm/radio/index.js +2 -0
- package/dist/esm/radio/radio.form-associated.js +15 -0
- package/dist/esm/radio/radio.js +108 -0
- package/dist/esm/radio/radio.template.js +31 -0
- package/dist/esm/radio-group/index.js +2 -0
- package/dist/esm/radio-group/radio-group.js +390 -0
- package/dist/esm/radio-group/radio-group.template.js +29 -0
- package/dist/esm/search/index.js +2 -0
- package/dist/esm/search/search.form-associated.js +15 -0
- package/dist/esm/search/search.js +157 -0
- package/dist/esm/search/search.template.js +93 -0
- package/dist/esm/select/index.js +3 -0
- package/dist/esm/select/select.form-associated.js +15 -0
- package/dist/esm/select/select.js +490 -0
- package/dist/esm/select/select.options.js +8 -0
- package/dist/esm/select/select.template.js +72 -0
- package/dist/esm/skeleton/index.js +2 -0
- package/dist/esm/skeleton/skeleton.js +35 -0
- package/dist/esm/skeleton/skeleton.template.js +20 -0
- package/dist/esm/slider/index.js +2 -0
- package/dist/esm/slider/slider-utilities.js +11 -0
- package/dist/esm/slider/slider.form-associated.js +15 -0
- package/dist/esm/slider/slider.js +452 -0
- package/dist/esm/slider/slider.template.js +40 -0
- package/dist/esm/slider-label/index.js +2 -0
- package/dist/esm/slider-label/slider-label.js +158 -0
- package/dist/esm/slider-label/slider-label.template.js +24 -0
- package/dist/esm/switch/index.js +2 -0
- package/dist/esm/switch/switch.form-associated.js +15 -0
- package/dist/esm/switch/switch.js +79 -0
- package/dist/esm/switch/switch.template.js +37 -0
- package/dist/esm/tab/index.js +2 -0
- package/dist/esm/tab/tab.js +15 -0
- package/dist/esm/tab/tab.template.js +10 -0
- package/dist/esm/tab-panel/index.js +2 -0
- package/dist/esm/tab-panel/tab-panel.js +10 -0
- package/dist/esm/tab-panel/tab-panel.template.js +10 -0
- package/dist/esm/tabs/index.js +2 -0
- package/dist/esm/tabs/tabs.js +375 -0
- package/dist/esm/tabs/tabs.template.js +26 -0
- package/dist/esm/test-utilities/fixture.js +90 -0
- package/dist/esm/test-utilities/timeout.js +13 -0
- package/dist/esm/text-area/index.js +2 -0
- package/dist/esm/text-area/text-area.form-associated.js +15 -0
- package/dist/esm/text-area/text-area.js +146 -0
- package/dist/esm/text-area/text-area.options.js +22 -0
- package/dist/esm/text-area/text-area.template.js +64 -0
- package/dist/esm/text-field/index.js +2 -0
- package/dist/esm/text-field/text-field.form-associated.js +15 -0
- package/dist/esm/text-field/text-field.js +183 -0
- package/dist/esm/text-field/text-field.options.js +26 -0
- package/dist/esm/text-field/text-field.template.js +70 -0
- package/dist/esm/toolbar/index.js +2 -0
- package/dist/esm/toolbar/toolbar.js +271 -0
- package/dist/esm/toolbar/toolbar.template.js +37 -0
- package/dist/esm/tooltip/index.js +2 -0
- package/dist/esm/tooltip/tooltip.js +512 -0
- package/dist/esm/tooltip/tooltip.options.js +63 -0
- package/dist/esm/tooltip/tooltip.template.js +32 -0
- package/dist/esm/tree-item/index.js +2 -0
- package/dist/esm/tree-item/tree-item.js +150 -0
- package/dist/esm/tree-item/tree-item.template.js +52 -0
- package/dist/esm/tree-view/index.js +2 -0
- package/dist/esm/tree-view/tree-view.js +268 -0
- package/dist/esm/tree-view/tree-view.template.js +18 -0
- package/dist/esm/utilities/apply-mixins.js +20 -0
- package/dist/esm/utilities/composed-contains.js +22 -0
- package/dist/esm/utilities/composed-parent.js +23 -0
- package/dist/esm/utilities/direction.js +10 -0
- package/dist/esm/utilities/index.js +8 -0
- package/dist/esm/utilities/intersection-service.js +91 -0
- package/dist/esm/utilities/match-media-stylesheet-behavior.js +140 -0
- package/dist/esm/utilities/property-stylesheet-behavior.js +52 -0
- package/dist/esm/utilities/resize-observer.js +5 -0
- package/dist/esm/utilities/root-active-element.js +8 -0
- package/dist/esm/utilities/style/disabled.js +5 -0
- package/dist/esm/utilities/style/display.js +14 -0
- package/dist/esm/utilities/style/focus.js +9 -0
- package/dist/esm/utilities/style/index.js +3 -0
- package/dist/esm/utilities/whitespace-filter.js +13 -0
- package/dist/fast-foundation.d.ts +9744 -0
- package/dist/fast-foundation.js +19097 -0
- package/dist/fast-foundation.min.js +19 -0
- package/dist/tsdoc-metadata.json +11 -0
- package/package.json +101 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { html, ref, slotted, when } from "@ni/fast-element";
|
|
2
|
+
import { endSlotTemplate, startSlotTemplate } from "../patterns/start-end.js";
|
|
3
|
+
/**
|
|
4
|
+
* The template for the {@link @ni/fast-foundation#(NumberField:class)} component.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export const numberFieldTemplate = (context, definition) => html `
|
|
8
|
+
<template class="${x => (x.readOnly ? "readonly" : "")}">
|
|
9
|
+
<label
|
|
10
|
+
part="label"
|
|
11
|
+
for="control"
|
|
12
|
+
class="${x => x.defaultSlottedNodes && x.defaultSlottedNodes.length
|
|
13
|
+
? "label"
|
|
14
|
+
: "label label__hidden"}"
|
|
15
|
+
>
|
|
16
|
+
<slot ${slotted("defaultSlottedNodes")}></slot>
|
|
17
|
+
</label>
|
|
18
|
+
<div class="root" part="root">
|
|
19
|
+
${startSlotTemplate(context, definition)}
|
|
20
|
+
<input
|
|
21
|
+
class="control"
|
|
22
|
+
part="control"
|
|
23
|
+
id="control"
|
|
24
|
+
@input="${x => x.handleTextInput()}"
|
|
25
|
+
@change="${x => x.handleChange()}"
|
|
26
|
+
@keydown="${(x, c) => x.handleKeyDown(c.event)}"
|
|
27
|
+
@blur="${(x, c) => x.handleBlur()}"
|
|
28
|
+
?autofocus="${x => x.autofocus}"
|
|
29
|
+
?disabled="${x => x.disabled}"
|
|
30
|
+
list="${x => x.list}"
|
|
31
|
+
maxlength="${x => x.maxlength}"
|
|
32
|
+
minlength="${x => x.minlength}"
|
|
33
|
+
placeholder="${x => x.placeholder}"
|
|
34
|
+
?readonly="${x => x.readOnly}"
|
|
35
|
+
?required="${x => x.required}"
|
|
36
|
+
size="${x => x.size}"
|
|
37
|
+
type="text"
|
|
38
|
+
inputmode="numeric"
|
|
39
|
+
min="${x => x.min}"
|
|
40
|
+
max="${x => x.max}"
|
|
41
|
+
step="${x => x.step}"
|
|
42
|
+
aria-atomic="${x => x.ariaAtomic}"
|
|
43
|
+
aria-busy="${x => x.ariaBusy}"
|
|
44
|
+
aria-controls="${x => x.ariaControls}"
|
|
45
|
+
aria-current="${x => x.ariaCurrent}"
|
|
46
|
+
aria-describedby="${x => x.ariaDescribedby}"
|
|
47
|
+
aria-details="${x => x.ariaDetails}"
|
|
48
|
+
aria-disabled="${x => x.ariaDisabled}"
|
|
49
|
+
aria-errormessage="${x => x.ariaErrormessage}"
|
|
50
|
+
aria-flowto="${x => x.ariaFlowto}"
|
|
51
|
+
aria-haspopup="${x => x.ariaHaspopup}"
|
|
52
|
+
aria-hidden="${x => x.ariaHidden}"
|
|
53
|
+
aria-invalid="${x => x.ariaInvalid}"
|
|
54
|
+
aria-keyshortcuts="${x => x.ariaKeyshortcuts}"
|
|
55
|
+
aria-label="${x => x.ariaLabel}"
|
|
56
|
+
aria-labelledby="${x => x.ariaLabelledby}"
|
|
57
|
+
aria-live="${x => x.ariaLive}"
|
|
58
|
+
aria-owns="${x => x.ariaOwns}"
|
|
59
|
+
aria-relevant="${x => x.ariaRelevant}"
|
|
60
|
+
aria-roledescription="${x => x.ariaRoledescription}"
|
|
61
|
+
${ref("control")}
|
|
62
|
+
/>
|
|
63
|
+
${when(x => !x.hideStep && !x.readOnly && !x.disabled, html `
|
|
64
|
+
<div class="controls" part="controls">
|
|
65
|
+
<div class="step-up" part="step-up" @click="${x => x.stepUp()}">
|
|
66
|
+
<slot name="step-up-glyph">
|
|
67
|
+
${definition.stepUpGlyph || ""}
|
|
68
|
+
</slot>
|
|
69
|
+
</div>
|
|
70
|
+
<div
|
|
71
|
+
class="step-down"
|
|
72
|
+
part="step-down"
|
|
73
|
+
@click="${x => x.stepDown()}"
|
|
74
|
+
>
|
|
75
|
+
<slot name="step-down-glyph">
|
|
76
|
+
${definition.stepDownGlyph || ""}
|
|
77
|
+
</slot>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
`)}
|
|
81
|
+
${endSlotTemplate(context, definition)}
|
|
82
|
+
</div>
|
|
83
|
+
</template>
|
|
84
|
+
`;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { attr } from "@ni/fast-element";
|
|
3
|
+
/**
|
|
4
|
+
* Some states and properties are applicable to all host language elements regardless of whether a role is applied.
|
|
5
|
+
* The following global states and properties are supported by all roles and by all base markup elements.
|
|
6
|
+
* {@link https://www.w3.org/TR/wai-aria-1.1/#global_states}
|
|
7
|
+
*
|
|
8
|
+
* This is intended to be used as a mixin. Be sure you extend FASTElement.
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export class ARIAGlobalStatesAndProperties {
|
|
13
|
+
}
|
|
14
|
+
__decorate([
|
|
15
|
+
attr({ attribute: "aria-atomic" })
|
|
16
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaAtomic", void 0);
|
|
17
|
+
__decorate([
|
|
18
|
+
attr({ attribute: "aria-busy" })
|
|
19
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaBusy", void 0);
|
|
20
|
+
__decorate([
|
|
21
|
+
attr({ attribute: "aria-controls" })
|
|
22
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaControls", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
attr({ attribute: "aria-current" })
|
|
25
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaCurrent", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
attr({ attribute: "aria-describedby" })
|
|
28
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaDescribedby", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
attr({ attribute: "aria-details" })
|
|
31
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaDetails", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
attr({ attribute: "aria-disabled" })
|
|
34
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaDisabled", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
attr({ attribute: "aria-errormessage" })
|
|
37
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaErrormessage", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
attr({ attribute: "aria-flowto" })
|
|
40
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaFlowto", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
attr({ attribute: "aria-haspopup" })
|
|
43
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaHaspopup", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
attr({ attribute: "aria-hidden" })
|
|
46
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaHidden", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
attr({ attribute: "aria-invalid" })
|
|
49
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaInvalid", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
attr({ attribute: "aria-keyshortcuts" })
|
|
52
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaKeyshortcuts", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
attr({ attribute: "aria-label" })
|
|
55
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaLabel", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
attr({ attribute: "aria-labelledby" })
|
|
58
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaLabelledby", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
attr({ attribute: "aria-live" })
|
|
61
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaLive", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
attr({ attribute: "aria-owns" })
|
|
64
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaOwns", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
attr({ attribute: "aria-relevant" })
|
|
67
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaRelevant", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
attr({ attribute: "aria-roledescription" })
|
|
70
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaRoledescription", void 0);
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { html, ref } from "@ni/fast-element";
|
|
2
|
+
/**
|
|
3
|
+
* A mixin class implementing start and end elements.
|
|
4
|
+
* These are generally used to decorate text elements with icons or other visual indicators.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export class StartEnd {
|
|
8
|
+
handleStartContentChange() {
|
|
9
|
+
this.startContainer.classList.toggle("start", this.start.assignedNodes().length > 0);
|
|
10
|
+
}
|
|
11
|
+
handleEndContentChange() {
|
|
12
|
+
this.endContainer.classList.toggle("end", this.end.assignedNodes().length > 0);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The template for the end element.
|
|
17
|
+
* For use with {@link StartEnd}
|
|
18
|
+
*
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
export const endSlotTemplate = (context, definition) => html `
|
|
22
|
+
<span
|
|
23
|
+
part="end"
|
|
24
|
+
${ref("endContainer")}
|
|
25
|
+
class=${x => (definition.end ? "end" : void 0)}
|
|
26
|
+
>
|
|
27
|
+
<slot name="end" ${ref("end")} @slotchange="${x => x.handleEndContentChange()}">
|
|
28
|
+
${definition.end || ""}
|
|
29
|
+
</slot>
|
|
30
|
+
</span>
|
|
31
|
+
`;
|
|
32
|
+
/**
|
|
33
|
+
* The template for the start element.
|
|
34
|
+
* For use with {@link StartEnd}
|
|
35
|
+
*
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
38
|
+
export const startSlotTemplate = (context, definition) => html `
|
|
39
|
+
<span
|
|
40
|
+
part="start"
|
|
41
|
+
${ref("startContainer")}
|
|
42
|
+
class="${x => (definition.start ? "start" : void 0)}"
|
|
43
|
+
>
|
|
44
|
+
<slot
|
|
45
|
+
name="start"
|
|
46
|
+
${ref("start")}
|
|
47
|
+
@slotchange="${x => x.handleStartContentChange()}"
|
|
48
|
+
>
|
|
49
|
+
${definition.start || ""}
|
|
50
|
+
</slot>
|
|
51
|
+
</span>
|
|
52
|
+
`;
|
|
53
|
+
/**
|
|
54
|
+
* The template for the end element.
|
|
55
|
+
* For use with {@link StartEnd}
|
|
56
|
+
*
|
|
57
|
+
* @public
|
|
58
|
+
* @deprecated - use endSlotTemplate
|
|
59
|
+
*/
|
|
60
|
+
export const endTemplate = html `
|
|
61
|
+
<span part="end" ${ref("endContainer")}>
|
|
62
|
+
<slot
|
|
63
|
+
name="end"
|
|
64
|
+
${ref("end")}
|
|
65
|
+
@slotchange="${x => x.handleEndContentChange()}"
|
|
66
|
+
></slot>
|
|
67
|
+
</span>
|
|
68
|
+
`;
|
|
69
|
+
/**
|
|
70
|
+
* The template for the start element.
|
|
71
|
+
* For use with {@link StartEnd}
|
|
72
|
+
*
|
|
73
|
+
* @public
|
|
74
|
+
* @deprecated - use startSlotTemplate
|
|
75
|
+
*/
|
|
76
|
+
export const startTemplate = html `
|
|
77
|
+
<span part="start" ${ref("startContainer")}>
|
|
78
|
+
<slot
|
|
79
|
+
name="start"
|
|
80
|
+
${ref("start")}
|
|
81
|
+
@slotchange="${x => x.handleStartContentChange()}"
|
|
82
|
+
></slot>
|
|
83
|
+
</span>
|
|
84
|
+
`;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./picker.template.js";
|
|
2
|
+
export * from "./picker.js";
|
|
3
|
+
export * from "./picker-menu.template.js";
|
|
4
|
+
export * from "./picker-menu.js";
|
|
5
|
+
export * from "./picker-menu-option.template.js";
|
|
6
|
+
export * from "./picker-menu-option.js";
|
|
7
|
+
export * from "./picker-list.template.js";
|
|
8
|
+
export * from "./picker-list.js";
|
|
9
|
+
export * from "./picker-list-item.template.js";
|
|
10
|
+
export * from "./picker-list-item.js";
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { attr, html, observable } from "@ni/fast-element";
|
|
3
|
+
import { keyEnter } from "@ni/fast-web-utilities";
|
|
4
|
+
import { FoundationElement } from "../foundation-element/foundation-element.js";
|
|
5
|
+
const defaultContentsTemplate = html `
|
|
6
|
+
<template>
|
|
7
|
+
${x => x.value}
|
|
8
|
+
</template>
|
|
9
|
+
`;
|
|
10
|
+
/**
|
|
11
|
+
* A picker list item Custom HTML Element.
|
|
12
|
+
*
|
|
13
|
+
* @alpha
|
|
14
|
+
*/
|
|
15
|
+
export class PickerListItem extends FoundationElement {
|
|
16
|
+
contentsTemplateChanged() {
|
|
17
|
+
if (this.$fastController.isConnected) {
|
|
18
|
+
this.updateView();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
connectedCallback() {
|
|
25
|
+
super.connectedCallback();
|
|
26
|
+
this.updateView();
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
disconnectedCallback() {
|
|
32
|
+
this.disconnectView();
|
|
33
|
+
super.disconnectedCallback();
|
|
34
|
+
}
|
|
35
|
+
handleKeyDown(e) {
|
|
36
|
+
if (e.defaultPrevented) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
if (e.key === keyEnter) {
|
|
40
|
+
this.handleInvoke();
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
handleClick(e) {
|
|
46
|
+
if (!e.defaultPrevented) {
|
|
47
|
+
this.handleInvoke();
|
|
48
|
+
}
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
handleInvoke() {
|
|
52
|
+
this.$emit("pickeriteminvoked");
|
|
53
|
+
}
|
|
54
|
+
updateView() {
|
|
55
|
+
var _a, _b;
|
|
56
|
+
this.disconnectView();
|
|
57
|
+
this.customView =
|
|
58
|
+
(_b = (_a = this.contentsTemplate) === null || _a === void 0 ? void 0 : _a.render(this, this)) !== null && _b !== void 0 ? _b : defaultContentsTemplate.render(this, this);
|
|
59
|
+
}
|
|
60
|
+
disconnectView() {
|
|
61
|
+
var _a;
|
|
62
|
+
(_a = this.customView) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
63
|
+
this.customView = undefined;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
__decorate([
|
|
67
|
+
attr({ attribute: "value" })
|
|
68
|
+
], PickerListItem.prototype, "value", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
observable
|
|
71
|
+
], PickerListItem.prototype, "contentsTemplate", void 0);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { html } from "@ni/fast-element";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export const pickerListItemTemplate = (context, definition) => {
|
|
7
|
+
return html `
|
|
8
|
+
<template
|
|
9
|
+
role="listitem"
|
|
10
|
+
tabindex="0"
|
|
11
|
+
@click="${(x, c) => x.handleClick(c.event)}"
|
|
12
|
+
@keydown="${(x, c) => x.handleKeyDown(c.event)}"
|
|
13
|
+
>
|
|
14
|
+
<slot></slot>
|
|
15
|
+
</template>
|
|
16
|
+
`;
|
|
17
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { html } from "@ni/fast-element";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export const pickerListTemplate = (context, definition) => {
|
|
7
|
+
return html `
|
|
8
|
+
<template slot="list-region" role="list" class="picker-list">
|
|
9
|
+
<slot></slot>
|
|
10
|
+
<slot name="input-region"></slot>
|
|
11
|
+
</template>
|
|
12
|
+
`;
|
|
13
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { attr, html, observable } from "@ni/fast-element";
|
|
3
|
+
import { FoundationElement } from "../foundation-element/foundation-element.js";
|
|
4
|
+
const defaultContentsTemplate = html `
|
|
5
|
+
<template>
|
|
6
|
+
${x => x.value}
|
|
7
|
+
</template>
|
|
8
|
+
`;
|
|
9
|
+
/**
|
|
10
|
+
* A picker list item Custom HTML Element.
|
|
11
|
+
*
|
|
12
|
+
* @alpha
|
|
13
|
+
*/
|
|
14
|
+
export class PickerMenuOption extends FoundationElement {
|
|
15
|
+
contentsTemplateChanged() {
|
|
16
|
+
if (this.$fastController.isConnected) {
|
|
17
|
+
this.updateView();
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
connectedCallback() {
|
|
24
|
+
super.connectedCallback();
|
|
25
|
+
this.updateView();
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
disconnectedCallback() {
|
|
31
|
+
super.disconnectedCallback();
|
|
32
|
+
this.disconnectView();
|
|
33
|
+
}
|
|
34
|
+
handleClick(e) {
|
|
35
|
+
if (e.defaultPrevented) {
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
this.handleInvoked();
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
handleInvoked() {
|
|
42
|
+
this.$emit("pickeroptioninvoked");
|
|
43
|
+
}
|
|
44
|
+
updateView() {
|
|
45
|
+
var _a, _b;
|
|
46
|
+
this.disconnectView();
|
|
47
|
+
this.customView =
|
|
48
|
+
(_b = (_a = this.contentsTemplate) === null || _a === void 0 ? void 0 : _a.render(this, this)) !== null && _b !== void 0 ? _b : defaultContentsTemplate.render(this, this);
|
|
49
|
+
}
|
|
50
|
+
disconnectView() {
|
|
51
|
+
var _a;
|
|
52
|
+
(_a = this.customView) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
53
|
+
this.customView = undefined;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
__decorate([
|
|
57
|
+
attr({ attribute: "value" })
|
|
58
|
+
], PickerMenuOption.prototype, "value", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
observable
|
|
61
|
+
], PickerMenuOption.prototype, "contentsTemplate", void 0);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { html } from "@ni/fast-element";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export const pickerMenuOptionTemplate = (context, definition) => {
|
|
7
|
+
return html `
|
|
8
|
+
<template
|
|
9
|
+
role="listitem"
|
|
10
|
+
tabindex="-1"
|
|
11
|
+
@click="${(x, c) => x.handleClick(c.event)}"
|
|
12
|
+
>
|
|
13
|
+
<slot></slot>
|
|
14
|
+
</template>
|
|
15
|
+
`;
|
|
16
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { uniqueId } from "@ni/fast-web-utilities";
|
|
3
|
+
import { observable } from "@ni/fast-element";
|
|
4
|
+
import { FoundationElement } from "../foundation-element/foundation-element.js";
|
|
5
|
+
/**
|
|
6
|
+
* A List Picker Menu Custom HTML Element.
|
|
7
|
+
*
|
|
8
|
+
* @alpha
|
|
9
|
+
*/
|
|
10
|
+
export class PickerMenu extends FoundationElement {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
/**
|
|
14
|
+
* Children that are list items
|
|
15
|
+
*
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
this.optionElements = [];
|
|
19
|
+
}
|
|
20
|
+
menuElementsChanged() {
|
|
21
|
+
this.updateOptions();
|
|
22
|
+
}
|
|
23
|
+
headerElementsChanged() {
|
|
24
|
+
this.updateOptions();
|
|
25
|
+
}
|
|
26
|
+
footerElementsChanged() {
|
|
27
|
+
this.updateOptions();
|
|
28
|
+
}
|
|
29
|
+
updateOptions() {
|
|
30
|
+
this.optionElements.splice(0, this.optionElements.length);
|
|
31
|
+
this.addSlottedListItems(this.headerElements);
|
|
32
|
+
this.addSlottedListItems(this.menuElements);
|
|
33
|
+
this.addSlottedListItems(this.footerElements);
|
|
34
|
+
this.$emit("optionsupdated", { bubbles: false });
|
|
35
|
+
}
|
|
36
|
+
addSlottedListItems(slotChildren) {
|
|
37
|
+
if (slotChildren === undefined) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
slotChildren.forEach((child) => {
|
|
41
|
+
if (child.nodeType === 1 && child.getAttribute("role") === "listitem") {
|
|
42
|
+
child.id = child.id || uniqueId("option-");
|
|
43
|
+
this.optionElements.push(child);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
__decorate([
|
|
49
|
+
observable
|
|
50
|
+
], PickerMenu.prototype, "menuElements", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
observable
|
|
53
|
+
], PickerMenu.prototype, "headerElements", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
observable
|
|
56
|
+
], PickerMenu.prototype, "footerElements", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
observable
|
|
59
|
+
], PickerMenu.prototype, "suggestionsAvailableText", void 0);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { html, slotted } from "@ni/fast-element";
|
|
2
|
+
/**
|
|
3
|
+
* The template for the List Picker component.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export const pickerMenuTemplate = (context, definition) => {
|
|
7
|
+
return html `
|
|
8
|
+
<template role="list" slot="menu-region">
|
|
9
|
+
<div class="options-display" part="options-display">
|
|
10
|
+
<div class="header-region" part="header-region">
|
|
11
|
+
<slot name="header-region" ${slotted("headerElements")}></slot>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
<slot ${slotted("menuElements")}></slot>
|
|
15
|
+
<div class="footer-region" part="footer-region">
|
|
16
|
+
<slot name="footer-region" ${slotted("footerElements")}></slot>
|
|
17
|
+
</div>
|
|
18
|
+
<div
|
|
19
|
+
role="alert"
|
|
20
|
+
aria-live="polite"
|
|
21
|
+
part="suggestions-available-alert"
|
|
22
|
+
class="suggestions-available-alert"
|
|
23
|
+
>
|
|
24
|
+
${x => x.suggestionsAvailableText}
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
`;
|
|
29
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FormAssociated } from "../form-associated/form-associated.js";
|
|
2
|
+
import { FoundationElement } from "../foundation-element/foundation-element.js";
|
|
3
|
+
class _Picker extends FoundationElement {
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* A form-associated base class for the {@link @ni/fast-foundation#(Picker:class)} component.
|
|
7
|
+
*
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export class FormAssociatedPicker extends FormAssociated(_Picker) {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.proxy = document.createElement("input");
|
|
14
|
+
}
|
|
15
|
+
}
|