@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,12 @@
|
|
|
1
|
+
import { html, when } from "@ni/fast-element";
|
|
2
|
+
/**
|
|
3
|
+
* The template for the {@link @ni/fast-foundation#(AnchoredRegion:class)} component.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export const anchoredRegionTemplate = (context, definition) => html `
|
|
7
|
+
<template class="${x => (x.initialLayoutComplete ? "loaded" : "")}">
|
|
8
|
+
${when(x => x.initialLayoutComplete, html `
|
|
9
|
+
<slot></slot>
|
|
10
|
+
`)}
|
|
11
|
+
</template>
|
|
12
|
+
`;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { attr } from "@ni/fast-element";
|
|
3
|
+
import { FoundationElement, } from "../foundation-element/foundation-element.js";
|
|
4
|
+
/**
|
|
5
|
+
* An Avatar Custom HTML Element
|
|
6
|
+
*
|
|
7
|
+
* @slot media - Used for media such as an image
|
|
8
|
+
* @slot - The default slot for avatar text, commonly a name or initials
|
|
9
|
+
* @slot badge - Used to provide a badge, such as a status badge
|
|
10
|
+
* @csspart backplate - The wrapping container for the avatar
|
|
11
|
+
* @csspart link - The avatar link
|
|
12
|
+
* @csspart media - The media slot
|
|
13
|
+
* @csspart content - The default slot
|
|
14
|
+
*
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
export class Avatar extends FoundationElement {
|
|
18
|
+
/**
|
|
19
|
+
* Internal
|
|
20
|
+
*/
|
|
21
|
+
connectedCallback() {
|
|
22
|
+
super.connectedCallback();
|
|
23
|
+
if (!this.shape) {
|
|
24
|
+
this.shape = "circle";
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
__decorate([
|
|
29
|
+
attr
|
|
30
|
+
], Avatar.prototype, "fill", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
attr
|
|
33
|
+
], Avatar.prototype, "color", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
attr
|
|
36
|
+
], Avatar.prototype, "link", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
attr
|
|
39
|
+
], Avatar.prototype, "shape", void 0);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { html } from "@ni/fast-element";
|
|
2
|
+
/**
|
|
3
|
+
* The template for {@link @ni/fast-foundation#Avatar} component.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export const avatarTemplate = (context, definition) => html `
|
|
7
|
+
<div
|
|
8
|
+
class="backplate ${x => x.shape}"
|
|
9
|
+
part="backplate"
|
|
10
|
+
style="${x => x.fill ? `background-color: var(--avatar-fill-${x.fill});` : void 0}"
|
|
11
|
+
>
|
|
12
|
+
<a
|
|
13
|
+
class="link"
|
|
14
|
+
part="link"
|
|
15
|
+
href="${x => (x.link ? x.link : void 0)}"
|
|
16
|
+
style="${x => (x.color ? `color: var(--avatar-color-${x.color});` : void 0)}"
|
|
17
|
+
>
|
|
18
|
+
<slot name="media" part="media">${definition.media || ""}</slot>
|
|
19
|
+
<slot class="content" part="content"><slot>
|
|
20
|
+
</a>
|
|
21
|
+
</div>
|
|
22
|
+
<slot name="badge" part="badge"></slot>
|
|
23
|
+
`;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { attr } from "@ni/fast-element";
|
|
3
|
+
import { FoundationElement } from "../foundation-element/foundation-element.js";
|
|
4
|
+
/**
|
|
5
|
+
* A Badge Custom HTML Element.
|
|
6
|
+
* @slot - The default slot for the badge
|
|
7
|
+
* @csspart control - The element representing the badge, which wraps the default slot
|
|
8
|
+
*
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export class Badge extends FoundationElement {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this.generateBadgeStyle = () => {
|
|
15
|
+
if (!this.fill && !this.color) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
const fill = `background-color: var(--badge-fill-${this.fill});`;
|
|
19
|
+
const color = `color: var(--badge-color-${this.color});`;
|
|
20
|
+
if (this.fill && !this.color) {
|
|
21
|
+
return fill;
|
|
22
|
+
}
|
|
23
|
+
else if (this.color && !this.fill) {
|
|
24
|
+
return color;
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
return `${color} ${fill}`;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
__decorate([
|
|
33
|
+
attr({ attribute: "fill" })
|
|
34
|
+
], Badge.prototype, "fill", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
attr({ attribute: "color" })
|
|
37
|
+
], Badge.prototype, "color", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
attr({ mode: "boolean" })
|
|
40
|
+
], Badge.prototype, "circular", void 0);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { html } from "@ni/fast-element";
|
|
2
|
+
/**
|
|
3
|
+
* The template for the {@link @ni/fast-foundation#Badge} component.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export const badgeTemplate = (context, definition) => html `
|
|
7
|
+
<template class="${x => (x.circular ? "circular" : "")}">
|
|
8
|
+
<div class="control" part="control" style="${x => x.generateBadgeStyle()}">
|
|
9
|
+
<slot></slot>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
`;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { observable } from "@ni/fast-element";
|
|
3
|
+
import { BreadcrumbItem } from "../breadcrumb-item/breadcrumb-item.js";
|
|
4
|
+
import { FoundationElement } from "../foundation-element/foundation-element.js";
|
|
5
|
+
/**
|
|
6
|
+
* A Breadcrumb Custom HTML Element.
|
|
7
|
+
* @slot - The default slot for the breadcrumb items
|
|
8
|
+
* @csspart list - The element wrapping the slotted items
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export class Breadcrumb extends FoundationElement {
|
|
13
|
+
slottedBreadcrumbItemsChanged() {
|
|
14
|
+
if (this.$fastController.isConnected) {
|
|
15
|
+
if (this.slottedBreadcrumbItems === undefined ||
|
|
16
|
+
this.slottedBreadcrumbItems.length === 0) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const lastNode = this.slottedBreadcrumbItems[this.slottedBreadcrumbItems.length - 1];
|
|
20
|
+
this.slottedBreadcrumbItems.forEach((item) => {
|
|
21
|
+
const itemIsLastNode = item === lastNode;
|
|
22
|
+
this.setItemSeparator(item, itemIsLastNode);
|
|
23
|
+
this.setAriaCurrent(item, itemIsLastNode);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
setItemSeparator(item, isLastNode) {
|
|
28
|
+
if (item instanceof BreadcrumbItem) {
|
|
29
|
+
item.separator = !isLastNode;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Finds href on childnodes in the light DOM or shadow DOM.
|
|
34
|
+
* We look in the shadow DOM because we insert an anchor when breadcrumb-item has an href.
|
|
35
|
+
*/
|
|
36
|
+
findChildWithHref(node) {
|
|
37
|
+
var _a, _b;
|
|
38
|
+
if (node.childElementCount > 0) {
|
|
39
|
+
return node.querySelector("a[href]");
|
|
40
|
+
}
|
|
41
|
+
else if ((_a = node.shadowRoot) === null || _a === void 0 ? void 0 : _a.childElementCount) {
|
|
42
|
+
return (_b = node.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector("a[href]");
|
|
43
|
+
}
|
|
44
|
+
else
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Sets ARIA Current for the current node
|
|
49
|
+
* If child node with an anchor tag and with href is found then set aria-current to correct value for the child node,
|
|
50
|
+
* otherwise apply aria-current to the host element, with an href
|
|
51
|
+
*/
|
|
52
|
+
setAriaCurrent(item, isLastNode) {
|
|
53
|
+
const childNodeWithHref = this.findChildWithHref(item);
|
|
54
|
+
if (childNodeWithHref === null &&
|
|
55
|
+
item.hasAttribute("href") &&
|
|
56
|
+
item instanceof BreadcrumbItem) {
|
|
57
|
+
isLastNode
|
|
58
|
+
? item.setAttribute("aria-current", "page")
|
|
59
|
+
: item.removeAttribute("aria-current");
|
|
60
|
+
}
|
|
61
|
+
else if (childNodeWithHref !== null) {
|
|
62
|
+
isLastNode
|
|
63
|
+
? childNodeWithHref.setAttribute("aria-current", "page")
|
|
64
|
+
: childNodeWithHref.removeAttribute("aria-current");
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
__decorate([
|
|
69
|
+
observable
|
|
70
|
+
], Breadcrumb.prototype, "slottedBreadcrumbItems", void 0);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { elements, html, slotted } from "@ni/fast-element";
|
|
2
|
+
/**
|
|
3
|
+
* The template for the {@link @ni/fast-foundation#Breadcrumb} component.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export const breadcrumbTemplate = (context, definition) => html `
|
|
7
|
+
<template role="navigation">
|
|
8
|
+
<div role="list" class="list" part="list">
|
|
9
|
+
<slot
|
|
10
|
+
${slotted({ property: "slottedBreadcrumbItems", filter: elements() })}
|
|
11
|
+
></slot>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
`;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { observable } from "@ni/fast-element";
|
|
3
|
+
import { Anchor, DelegatesARIALink } from "../anchor/anchor.js";
|
|
4
|
+
import { StartEnd } from "../patterns/index.js";
|
|
5
|
+
import { applyMixins } from "../utilities/apply-mixins.js";
|
|
6
|
+
/**
|
|
7
|
+
* A Breadcrumb Item Custom HTML Element.
|
|
8
|
+
*
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export class BreadcrumbItem extends Anchor {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
this.separator = true;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
__decorate([
|
|
21
|
+
observable
|
|
22
|
+
], BreadcrumbItem.prototype, "separator", void 0);
|
|
23
|
+
applyMixins(BreadcrumbItem, StartEnd, DelegatesARIALink);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { html, when } from "@ni/fast-element";
|
|
2
|
+
import { anchorTemplate } from "../anchor/anchor.template.js";
|
|
3
|
+
import { endSlotTemplate, startSlotTemplate } from "../patterns/start-end.js";
|
|
4
|
+
/**
|
|
5
|
+
* The template for the {@link @ni/fast-foundation#(BreadcrumbItem:class)} component.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export const breadcrumbItemTemplate = (context, definition) => html `
|
|
9
|
+
<div role="listitem" class="listitem" part="listitem">
|
|
10
|
+
${when(x => x.href && x.href.length > 0, html `
|
|
11
|
+
${anchorTemplate(context, definition)}
|
|
12
|
+
`)}
|
|
13
|
+
${when(x => !x.href, html `
|
|
14
|
+
${startSlotTemplate(context, definition)}
|
|
15
|
+
<slot></slot>
|
|
16
|
+
${endSlotTemplate(context, definition)}
|
|
17
|
+
`)}
|
|
18
|
+
${when(x => x.separator, html `
|
|
19
|
+
<span class="separator" part="separator" aria-hidden="true">
|
|
20
|
+
<slot name="separator">${definition.separator || ""}</slot>
|
|
21
|
+
</span>
|
|
22
|
+
`)}
|
|
23
|
+
</div>
|
|
24
|
+
`;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FormAssociated } from "../form-associated/form-associated.js";
|
|
2
|
+
import { FoundationElement } from "../foundation-element/foundation-element.js";
|
|
3
|
+
class _Button extends FoundationElement {
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* A form-associated base class for the {@link @ni/fast-foundation#(Button:class)} component.
|
|
7
|
+
*
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export class FormAssociatedButton extends FormAssociated(_Button) {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.proxy = document.createElement("input");
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { attr, observable } from "@ni/fast-element";
|
|
3
|
+
import { ARIAGlobalStatesAndProperties, StartEnd, } from "../patterns/index.js";
|
|
4
|
+
import { applyMixins } from "../utilities/apply-mixins.js";
|
|
5
|
+
import { FormAssociatedButton } from "./button.form-associated.js";
|
|
6
|
+
/**
|
|
7
|
+
* A Button Custom HTML Element.
|
|
8
|
+
* Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button | <button> element }.
|
|
9
|
+
*
|
|
10
|
+
* @slot start - Content which can be provided before the button content
|
|
11
|
+
* @slot end - Content which can be provided after the button content
|
|
12
|
+
* @slot - The default slot for button content
|
|
13
|
+
* @csspart control - The button element
|
|
14
|
+
* @csspart content - The element wrapping button content
|
|
15
|
+
*
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
export class Button extends FormAssociatedButton {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments);
|
|
21
|
+
/**
|
|
22
|
+
* Prevent events to propagate if disabled and has no slotted content wrapped in HTML elements
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
this.handleClick = (e) => {
|
|
26
|
+
var _a;
|
|
27
|
+
if (this.disabled && ((_a = this.defaultSlottedContent) === null || _a === void 0 ? void 0 : _a.length) <= 1) {
|
|
28
|
+
e.stopPropagation();
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Submits the parent form
|
|
33
|
+
*/
|
|
34
|
+
this.handleSubmission = () => {
|
|
35
|
+
if (!this.form) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const attached = this.proxy.isConnected;
|
|
39
|
+
if (!attached) {
|
|
40
|
+
this.attachProxy();
|
|
41
|
+
}
|
|
42
|
+
// Browser support for requestSubmit is not comprehensive
|
|
43
|
+
// so click the proxy if it isn't supported
|
|
44
|
+
typeof this.form.requestSubmit === "function"
|
|
45
|
+
? this.form.requestSubmit(this.proxy)
|
|
46
|
+
: this.proxy.click();
|
|
47
|
+
if (!attached) {
|
|
48
|
+
this.detachProxy();
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Resets the parent form
|
|
53
|
+
*/
|
|
54
|
+
this.handleFormReset = () => {
|
|
55
|
+
var _a;
|
|
56
|
+
(_a = this.form) === null || _a === void 0 ? void 0 : _a.reset();
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Overrides the focus call for where delegatesFocus is unsupported.
|
|
60
|
+
* This check works for Chrome, Edge Chromium, FireFox, and Safari
|
|
61
|
+
* Relevant PR on the Firefox browser: https://phabricator.services.mozilla.com/D123858
|
|
62
|
+
*/
|
|
63
|
+
this.handleUnsupportedDelegatesFocus = () => {
|
|
64
|
+
var _a;
|
|
65
|
+
// Check to see if delegatesFocus is supported
|
|
66
|
+
if (window.ShadowRoot &&
|
|
67
|
+
!window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus") &&
|
|
68
|
+
((_a = this.$fastController.definition.shadowOptions) === null || _a === void 0 ? void 0 : _a.delegatesFocus)) {
|
|
69
|
+
this.focus = () => {
|
|
70
|
+
this.control.focus();
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
formactionChanged() {
|
|
76
|
+
if (this.proxy instanceof HTMLInputElement) {
|
|
77
|
+
this.proxy.formAction = this.formaction;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
formenctypeChanged() {
|
|
81
|
+
if (this.proxy instanceof HTMLInputElement) {
|
|
82
|
+
this.proxy.formEnctype = this.formenctype;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
formmethodChanged() {
|
|
86
|
+
if (this.proxy instanceof HTMLInputElement) {
|
|
87
|
+
this.proxy.formMethod = this.formmethod;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
formnovalidateChanged() {
|
|
91
|
+
if (this.proxy instanceof HTMLInputElement) {
|
|
92
|
+
this.proxy.formNoValidate = this.formnovalidate;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
formtargetChanged() {
|
|
96
|
+
if (this.proxy instanceof HTMLInputElement) {
|
|
97
|
+
this.proxy.formTarget = this.formtarget;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
typeChanged(previous, next) {
|
|
101
|
+
if (this.proxy instanceof HTMLInputElement) {
|
|
102
|
+
this.proxy.type = this.type;
|
|
103
|
+
}
|
|
104
|
+
next === "submit" && this.addEventListener("click", this.handleSubmission);
|
|
105
|
+
previous === "submit" && this.removeEventListener("click", this.handleSubmission);
|
|
106
|
+
next === "reset" && this.addEventListener("click", this.handleFormReset);
|
|
107
|
+
previous === "reset" && this.removeEventListener("click", this.handleFormReset);
|
|
108
|
+
}
|
|
109
|
+
/** {@inheritDoc (FormAssociated:interface).validate} */
|
|
110
|
+
validate() {
|
|
111
|
+
super.validate(this.control);
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* @internal
|
|
115
|
+
*/
|
|
116
|
+
connectedCallback() {
|
|
117
|
+
var _a;
|
|
118
|
+
super.connectedCallback();
|
|
119
|
+
this.proxy.setAttribute("type", this.type);
|
|
120
|
+
this.handleUnsupportedDelegatesFocus();
|
|
121
|
+
const elements = Array.from((_a = this.control) === null || _a === void 0 ? void 0 : _a.children);
|
|
122
|
+
if (elements) {
|
|
123
|
+
elements.forEach((span) => {
|
|
124
|
+
span.addEventListener("click", this.handleClick);
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* @internal
|
|
130
|
+
*/
|
|
131
|
+
disconnectedCallback() {
|
|
132
|
+
var _a;
|
|
133
|
+
super.disconnectedCallback();
|
|
134
|
+
const elements = Array.from((_a = this.control) === null || _a === void 0 ? void 0 : _a.children);
|
|
135
|
+
if (elements) {
|
|
136
|
+
elements.forEach((span) => {
|
|
137
|
+
span.removeEventListener("click", this.handleClick);
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
__decorate([
|
|
143
|
+
attr({ mode: "boolean" })
|
|
144
|
+
], Button.prototype, "autofocus", void 0);
|
|
145
|
+
__decorate([
|
|
146
|
+
attr({ attribute: "form" })
|
|
147
|
+
], Button.prototype, "formId", void 0);
|
|
148
|
+
__decorate([
|
|
149
|
+
attr
|
|
150
|
+
], Button.prototype, "formaction", void 0);
|
|
151
|
+
__decorate([
|
|
152
|
+
attr
|
|
153
|
+
], Button.prototype, "formenctype", void 0);
|
|
154
|
+
__decorate([
|
|
155
|
+
attr
|
|
156
|
+
], Button.prototype, "formmethod", void 0);
|
|
157
|
+
__decorate([
|
|
158
|
+
attr({ mode: "boolean" })
|
|
159
|
+
], Button.prototype, "formnovalidate", void 0);
|
|
160
|
+
__decorate([
|
|
161
|
+
attr
|
|
162
|
+
], Button.prototype, "formtarget", void 0);
|
|
163
|
+
__decorate([
|
|
164
|
+
attr
|
|
165
|
+
], Button.prototype, "type", void 0);
|
|
166
|
+
__decorate([
|
|
167
|
+
observable
|
|
168
|
+
], Button.prototype, "defaultSlottedContent", void 0);
|
|
169
|
+
/**
|
|
170
|
+
* Includes ARIA states and properties relating to the ARIA button role
|
|
171
|
+
*
|
|
172
|
+
* @public
|
|
173
|
+
*/
|
|
174
|
+
export class DelegatesARIAButton {
|
|
175
|
+
}
|
|
176
|
+
__decorate([
|
|
177
|
+
attr({ attribute: "aria-expanded" })
|
|
178
|
+
], DelegatesARIAButton.prototype, "ariaExpanded", void 0);
|
|
179
|
+
__decorate([
|
|
180
|
+
attr({ attribute: "aria-pressed" })
|
|
181
|
+
], DelegatesARIAButton.prototype, "ariaPressed", void 0);
|
|
182
|
+
applyMixins(DelegatesARIAButton, ARIAGlobalStatesAndProperties);
|
|
183
|
+
applyMixins(Button, StartEnd, DelegatesARIAButton);
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { html, ref, slotted } from "@ni/fast-element";
|
|
2
|
+
import { endSlotTemplate, startSlotTemplate } from "../patterns/start-end.js";
|
|
3
|
+
/**
|
|
4
|
+
* The template for the {@link @ni/fast-foundation#(Button:class)} component.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export const buttonTemplate = (context, definition) => html `
|
|
8
|
+
<button
|
|
9
|
+
class="control"
|
|
10
|
+
part="control"
|
|
11
|
+
?autofocus="${x => x.autofocus}"
|
|
12
|
+
?disabled="${x => x.disabled}"
|
|
13
|
+
form="${x => x.formId}"
|
|
14
|
+
formaction="${x => x.formaction}"
|
|
15
|
+
formenctype="${x => x.formenctype}"
|
|
16
|
+
formmethod="${x => x.formmethod}"
|
|
17
|
+
formnovalidate="${x => x.formnovalidate}"
|
|
18
|
+
formtarget="${x => x.formtarget}"
|
|
19
|
+
name="${x => x.name}"
|
|
20
|
+
type="${x => x.type}"
|
|
21
|
+
value="${x => x.value}"
|
|
22
|
+
aria-atomic="${x => x.ariaAtomic}"
|
|
23
|
+
aria-busy="${x => x.ariaBusy}"
|
|
24
|
+
aria-controls="${x => x.ariaControls}"
|
|
25
|
+
aria-current="${x => x.ariaCurrent}"
|
|
26
|
+
aria-describedby="${x => x.ariaDescribedby}"
|
|
27
|
+
aria-details="${x => x.ariaDetails}"
|
|
28
|
+
aria-disabled="${x => x.ariaDisabled}"
|
|
29
|
+
aria-errormessage="${x => x.ariaErrormessage}"
|
|
30
|
+
aria-expanded="${x => x.ariaExpanded}"
|
|
31
|
+
aria-flowto="${x => x.ariaFlowto}"
|
|
32
|
+
aria-haspopup="${x => x.ariaHaspopup}"
|
|
33
|
+
aria-hidden="${x => x.ariaHidden}"
|
|
34
|
+
aria-invalid="${x => x.ariaInvalid}"
|
|
35
|
+
aria-keyshortcuts="${x => x.ariaKeyshortcuts}"
|
|
36
|
+
aria-label="${x => x.ariaLabel}"
|
|
37
|
+
aria-labelledby="${x => x.ariaLabelledby}"
|
|
38
|
+
aria-live="${x => x.ariaLive}"
|
|
39
|
+
aria-owns="${x => x.ariaOwns}"
|
|
40
|
+
aria-pressed="${x => x.ariaPressed}"
|
|
41
|
+
aria-relevant="${x => x.ariaRelevant}"
|
|
42
|
+
aria-roledescription="${x => x.ariaRoledescription}"
|
|
43
|
+
${ref("control")}
|
|
44
|
+
>
|
|
45
|
+
${startSlotTemplate(context, definition)}
|
|
46
|
+
<span class="content" part="content">
|
|
47
|
+
<slot ${slotted("defaultSlottedContent")}></slot>
|
|
48
|
+
</span>
|
|
49
|
+
${endSlotTemplate(context, definition)}
|
|
50
|
+
</button>
|
|
51
|
+
`;
|