@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,218 @@
|
|
|
1
|
+
import { ViewTemplate } from "@ni/fast-element";
|
|
2
|
+
import { FoundationElement } from "../foundation-element/foundation-element.js";
|
|
3
|
+
import type { DataGridCell } from "./data-grid-cell.js";
|
|
4
|
+
import { DataGridRowTypes, GenerateHeaderOptions } from "./data-grid.options.js";
|
|
5
|
+
export { DataGridRowTypes, GenerateHeaderOptions };
|
|
6
|
+
/**
|
|
7
|
+
* Defines a column in the grid
|
|
8
|
+
*
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export interface ColumnDefinition {
|
|
12
|
+
/**
|
|
13
|
+
* Identifies the data item to be displayed in this column
|
|
14
|
+
* (i.e. how the data item is labelled in each row)
|
|
15
|
+
*/
|
|
16
|
+
columnDataKey: string;
|
|
17
|
+
/**
|
|
18
|
+
* Sets the css grid-column property on the cell which controls its placement in
|
|
19
|
+
* the parent row. If left unset the cells will set this value to match the index
|
|
20
|
+
* of their column in the parent collection of ColumnDefinitions.
|
|
21
|
+
*/
|
|
22
|
+
gridColumn?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Column title, if not provided columnDataKey is used as title
|
|
25
|
+
*/
|
|
26
|
+
title?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Header cell template
|
|
29
|
+
*/
|
|
30
|
+
headerCellTemplate?: ViewTemplate;
|
|
31
|
+
/**
|
|
32
|
+
* Whether the header cell has an internal focus queue
|
|
33
|
+
*/
|
|
34
|
+
headerCellInternalFocusQueue?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Callback function that returns the element to focus in a custom cell.
|
|
37
|
+
* When headerCellInternalFocusQueue is false this function is called when the cell is first focused
|
|
38
|
+
* to immediately move focus to a cell element, for example a cell that is a checkbox could move
|
|
39
|
+
* focus directly to the checkbox.
|
|
40
|
+
* When headerCellInternalFocusQueue is true this function is called when the user hits Enter or F2
|
|
41
|
+
*/
|
|
42
|
+
headerCellFocusTargetCallback?: (cell: DataGridCell) => HTMLElement;
|
|
43
|
+
/**
|
|
44
|
+
* cell template
|
|
45
|
+
*/
|
|
46
|
+
cellTemplate?: ViewTemplate;
|
|
47
|
+
/**
|
|
48
|
+
* Whether the cell has an internal focus queue
|
|
49
|
+
*/
|
|
50
|
+
cellInternalFocusQueue?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Callback function that returns the element to focus in a custom cell.
|
|
53
|
+
* When cellInternalFocusQueue is false this function is called when the cell is first focused
|
|
54
|
+
* to immediately move focus to a cell element, for example a cell that is a checkbox could move
|
|
55
|
+
* focus directly to the checkbox.
|
|
56
|
+
* When cellInternalFocusQueue is true this function is called when the user hits Enter or F2
|
|
57
|
+
*/
|
|
58
|
+
cellFocusTargetCallback?: (cell: DataGridCell) => HTMLElement;
|
|
59
|
+
/**
|
|
60
|
+
* Whether this column is the row header
|
|
61
|
+
*/
|
|
62
|
+
isRowHeader?: boolean;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* A Data Grid Custom HTML Element.
|
|
66
|
+
*
|
|
67
|
+
* @slot - The default slot for custom row elements
|
|
68
|
+
* @public
|
|
69
|
+
*/
|
|
70
|
+
export declare class DataGrid extends FoundationElement {
|
|
71
|
+
/**
|
|
72
|
+
* generates a basic column definition by examining sample row data
|
|
73
|
+
*/
|
|
74
|
+
static generateColumns: (row: object) => ColumnDefinition[];
|
|
75
|
+
/**
|
|
76
|
+
* generates a gridTemplateColumns based on columndata array
|
|
77
|
+
*/
|
|
78
|
+
private static generateTemplateColumns;
|
|
79
|
+
/**
|
|
80
|
+
* When true the component will not add itself to the tab queue.
|
|
81
|
+
* Default is false.
|
|
82
|
+
*
|
|
83
|
+
* @public
|
|
84
|
+
* @remarks
|
|
85
|
+
* HTML Attribute: no-tabbing
|
|
86
|
+
*/
|
|
87
|
+
noTabbing: boolean;
|
|
88
|
+
private noTabbingChanged;
|
|
89
|
+
/**
|
|
90
|
+
* Whether the grid should automatically generate a header row and its type
|
|
91
|
+
*
|
|
92
|
+
* @public
|
|
93
|
+
* @remarks
|
|
94
|
+
* HTML Attribute: generate-header
|
|
95
|
+
*/
|
|
96
|
+
generateHeader: GenerateHeaderOptions;
|
|
97
|
+
private generateHeaderChanged;
|
|
98
|
+
/**
|
|
99
|
+
* String that gets applied to the the css gridTemplateColumns attribute of child rows
|
|
100
|
+
*
|
|
101
|
+
* @public
|
|
102
|
+
* @remarks
|
|
103
|
+
* HTML Attribute: grid-template-columns
|
|
104
|
+
*/
|
|
105
|
+
gridTemplateColumns: string;
|
|
106
|
+
private gridTemplateColumnsChanged;
|
|
107
|
+
/**
|
|
108
|
+
* The data being displayed in the grid
|
|
109
|
+
*
|
|
110
|
+
* @public
|
|
111
|
+
*/
|
|
112
|
+
rowsData: object[];
|
|
113
|
+
private rowsDataChanged;
|
|
114
|
+
/**
|
|
115
|
+
* The column definitions of the grid
|
|
116
|
+
*
|
|
117
|
+
* @public
|
|
118
|
+
*/
|
|
119
|
+
columnDefinitions: ColumnDefinition[] | null;
|
|
120
|
+
private columnDefinitionsChanged;
|
|
121
|
+
/**
|
|
122
|
+
* The template to use for the programmatic generation of rows
|
|
123
|
+
*
|
|
124
|
+
* @public
|
|
125
|
+
*/
|
|
126
|
+
rowItemTemplate: ViewTemplate;
|
|
127
|
+
/**
|
|
128
|
+
* The template used to render cells in generated rows.
|
|
129
|
+
*
|
|
130
|
+
* @public
|
|
131
|
+
*/
|
|
132
|
+
cellItemTemplate?: ViewTemplate;
|
|
133
|
+
/**
|
|
134
|
+
* The template used to render header cells in generated rows.
|
|
135
|
+
*
|
|
136
|
+
* @public
|
|
137
|
+
*/
|
|
138
|
+
headerCellItemTemplate?: ViewTemplate;
|
|
139
|
+
private headerCellItemTemplateChanged;
|
|
140
|
+
/**
|
|
141
|
+
* The index of the row that will receive focus the next time the
|
|
142
|
+
* grid is focused. This value changes as focus moves to different
|
|
143
|
+
* rows within the grid. Changing this value when focus is already
|
|
144
|
+
* within the grid moves focus to the specified row.
|
|
145
|
+
*
|
|
146
|
+
* @public
|
|
147
|
+
*/
|
|
148
|
+
focusRowIndex: number;
|
|
149
|
+
private focusRowIndexChanged;
|
|
150
|
+
/**
|
|
151
|
+
* The index of the column that will receive focus the next time the
|
|
152
|
+
* grid is focused. This value changes as focus moves to different rows
|
|
153
|
+
* within the grid. Changing this value when focus is already within
|
|
154
|
+
* the grid moves focus to the specified column.
|
|
155
|
+
*
|
|
156
|
+
* @public
|
|
157
|
+
*/
|
|
158
|
+
focusColumnIndex: number;
|
|
159
|
+
private focusColumnIndexChanged;
|
|
160
|
+
/**
|
|
161
|
+
* The default row item template. Set by the component templates.
|
|
162
|
+
*
|
|
163
|
+
* @internal
|
|
164
|
+
*/
|
|
165
|
+
defaultRowItemTemplate: ViewTemplate;
|
|
166
|
+
/**
|
|
167
|
+
* Set by the component templates.
|
|
168
|
+
*
|
|
169
|
+
*/
|
|
170
|
+
rowElementTag: string;
|
|
171
|
+
/**
|
|
172
|
+
* Children that are rows
|
|
173
|
+
*
|
|
174
|
+
* @internal
|
|
175
|
+
*/
|
|
176
|
+
rowElements: HTMLElement[];
|
|
177
|
+
private rowsRepeatBehavior;
|
|
178
|
+
private rowsPlaceholder;
|
|
179
|
+
private generatedHeader;
|
|
180
|
+
private isUpdatingFocus;
|
|
181
|
+
private pendingFocusUpdate;
|
|
182
|
+
private observer;
|
|
183
|
+
private rowindexUpdateQueued;
|
|
184
|
+
private columnDefinitionsStale;
|
|
185
|
+
private generatedGridTemplateColumns;
|
|
186
|
+
constructor();
|
|
187
|
+
/**
|
|
188
|
+
* @internal
|
|
189
|
+
*/
|
|
190
|
+
connectedCallback(): void;
|
|
191
|
+
/**
|
|
192
|
+
* @internal
|
|
193
|
+
*/
|
|
194
|
+
disconnectedCallback(): void;
|
|
195
|
+
/**
|
|
196
|
+
* @internal
|
|
197
|
+
*/
|
|
198
|
+
handleRowFocus(e: Event): void;
|
|
199
|
+
/**
|
|
200
|
+
* @internal
|
|
201
|
+
*/
|
|
202
|
+
handleFocus(e: FocusEvent): void;
|
|
203
|
+
/**
|
|
204
|
+
* @internal
|
|
205
|
+
*/
|
|
206
|
+
handleFocusOut(e: FocusEvent): void;
|
|
207
|
+
/**
|
|
208
|
+
* @internal
|
|
209
|
+
*/
|
|
210
|
+
handleKeydown(e: KeyboardEvent): void;
|
|
211
|
+
private focusOnCell;
|
|
212
|
+
private queueFocusUpdate;
|
|
213
|
+
private updateFocus;
|
|
214
|
+
private toggleGeneratedHeader;
|
|
215
|
+
private onChildListChange;
|
|
216
|
+
private queueRowIndexUpdate;
|
|
217
|
+
private updateRowIndexes;
|
|
218
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enumerates the data grid auto generated header options
|
|
3
|
+
* default option generates a non-sticky header row
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare const GenerateHeaderOptions: {
|
|
8
|
+
readonly none: "none";
|
|
9
|
+
readonly default: "default";
|
|
10
|
+
readonly sticky: "sticky";
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* The types for the data grid auto generated header options
|
|
14
|
+
*
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
export type GenerateHeaderOptions = typeof GenerateHeaderOptions[keyof typeof GenerateHeaderOptions];
|
|
18
|
+
/**
|
|
19
|
+
* Enumerates possible data grid cell types.
|
|
20
|
+
*
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
export declare const DataGridCellTypes: {
|
|
24
|
+
readonly default: "default";
|
|
25
|
+
readonly columnHeader: "columnheader";
|
|
26
|
+
readonly rowHeader: "rowheader";
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* The possible cell types.
|
|
30
|
+
*
|
|
31
|
+
* @public
|
|
32
|
+
*/
|
|
33
|
+
export type DataGridCellTypes = typeof DataGridCellTypes[keyof typeof DataGridCellTypes];
|
|
34
|
+
/**
|
|
35
|
+
* Enumerates possible data grid row types
|
|
36
|
+
*
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
export declare const DataGridRowTypes: {
|
|
40
|
+
readonly default: "default";
|
|
41
|
+
readonly header: "header";
|
|
42
|
+
readonly stickyHeader: "sticky-header";
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* The possible data grid row types
|
|
46
|
+
*
|
|
47
|
+
* @public
|
|
48
|
+
*/
|
|
49
|
+
export type DataGridRowTypes = typeof DataGridRowTypes[keyof typeof DataGridRowTypes];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ViewTemplate } from "@ni/fast-element";
|
|
2
|
+
import type { FoundationElementTemplate } from "../foundation-element/foundation-element.js";
|
|
3
|
+
import type { DataGrid } from "./data-grid.js";
|
|
4
|
+
/**
|
|
5
|
+
* Generates a template for the {@link @ni/fast-foundation#DataGrid} component using
|
|
6
|
+
* the provided prefix.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
export declare const dataGridTemplate: FoundationElementTemplate<ViewTemplate<DataGrid>>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { ComposableStyles, ElementStyles, ElementViewTemplate, FASTElement } from "@ni/fast-element";
|
|
2
|
+
import { Container } from "../di/di.js";
|
|
3
|
+
/**
|
|
4
|
+
* Applies presentation details, such as template and styles, to a component instance.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export interface ComponentPresentation {
|
|
8
|
+
/**
|
|
9
|
+
* Applies the presentation details to the specified element.
|
|
10
|
+
* @param element - The element to apply the presentation details to.
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
applyTo(element: FASTElement): void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* An API gateway to component presentation features.
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
export declare const ComponentPresentation: Readonly<{
|
|
20
|
+
/**
|
|
21
|
+
* Defines a component presentation for an element.
|
|
22
|
+
* @param tagName - The element name to define the presentation for.
|
|
23
|
+
* @param presentation - The presentation that will be applied to matching elements.
|
|
24
|
+
* @param container - The dependency injection container to register the configuration in.
|
|
25
|
+
* @public
|
|
26
|
+
*/
|
|
27
|
+
define(tagName: string, presentation: ComponentPresentation, container: Container): void;
|
|
28
|
+
/**
|
|
29
|
+
* Finds a component presentation for the specified element name,
|
|
30
|
+
* searching the DOM hierarchy starting from the provided element.
|
|
31
|
+
* @param tagName - The name of the element to locate the presentation for.
|
|
32
|
+
* @param element - The element to begin the search from.
|
|
33
|
+
* @returns The component presentation or null if none is found.
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
36
|
+
forTag(tagName: string, element: HTMLElement): ComponentPresentation | null;
|
|
37
|
+
}>;
|
|
38
|
+
/**
|
|
39
|
+
* The default implementation of ComponentPresentation, used by FoundationElement.
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
export declare class DefaultComponentPresentation implements ComponentPresentation {
|
|
43
|
+
/**
|
|
44
|
+
* The styles to apply to the element.
|
|
45
|
+
* @public
|
|
46
|
+
*/
|
|
47
|
+
readonly styles: ElementStyles | null;
|
|
48
|
+
/**
|
|
49
|
+
* The template to apply to the element.
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
readonly template: ElementViewTemplate | null;
|
|
53
|
+
/**
|
|
54
|
+
* Creates an instance of DefaultComponentPresentation.
|
|
55
|
+
* @param template - The template to apply to the element.
|
|
56
|
+
* @param styles - The styles to apply to the element.
|
|
57
|
+
* @public
|
|
58
|
+
*/
|
|
59
|
+
constructor(template?: ElementViewTemplate, styles?: ComposableStyles | ComposableStyles[]);
|
|
60
|
+
/**
|
|
61
|
+
* Applies the presentation details to the specified element.
|
|
62
|
+
* @param element - The element to apply the presentation details to.
|
|
63
|
+
* @public
|
|
64
|
+
*/
|
|
65
|
+
applyTo(element: FASTElement): void;
|
|
66
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { Constructable } from "@ni/fast-element";
|
|
2
|
+
/**
|
|
3
|
+
* Indicates what to do with an ambiguous (duplicate) element.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export declare const ElementDisambiguation: Readonly<{
|
|
7
|
+
/**
|
|
8
|
+
* Skip defining the element but still call the provided callback passed
|
|
9
|
+
* to DesignSystemRegistrationContext.tryDefineElement
|
|
10
|
+
*/
|
|
11
|
+
definitionCallbackOnly: null;
|
|
12
|
+
/**
|
|
13
|
+
* Ignore the duplicate element entirely.
|
|
14
|
+
*/
|
|
15
|
+
ignoreDuplicate: symbol;
|
|
16
|
+
}>;
|
|
17
|
+
/**
|
|
18
|
+
* Represents the return values expected from an ElementDisambiguationCallback.
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
export type ElementDisambiguationResult = string | typeof ElementDisambiguation.ignoreDuplicate | typeof ElementDisambiguation.definitionCallbackOnly;
|
|
22
|
+
/**
|
|
23
|
+
* The callback type that is invoked when two elements are trying to define themselves with
|
|
24
|
+
* the same name.
|
|
25
|
+
* @remarks
|
|
26
|
+
* The callback should return either:
|
|
27
|
+
* 1. A string to provide a new name used to disambiguate the element
|
|
28
|
+
* 2. ElementDisambiguation.ignoreDuplicate to ignore the duplicate element entirely
|
|
29
|
+
* 3. ElementDisambiguation.definitionCallbackOnly to skip defining the element but still
|
|
30
|
+
* call the provided callback passed to DesignSystemRegistrationContext.tryDefineElement
|
|
31
|
+
* @public
|
|
32
|
+
*/
|
|
33
|
+
export type ElementDisambiguationCallback = (nameAttempt: string, typeAttempt: Constructable, existingType: Constructable) => ElementDisambiguationResult;
|
|
34
|
+
/**
|
|
35
|
+
* Represents a configurable design system.
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
38
|
+
export interface DesignSystem {
|
|
39
|
+
/**
|
|
40
|
+
* Registers components and services with the design system and the
|
|
41
|
+
* underlying dependency injection container.
|
|
42
|
+
* @param params - The registries to pass to the design system
|
|
43
|
+
* and the underlying dependency injection container.
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
register(...params: any[]): DesignSystem;
|
|
47
|
+
/**
|
|
48
|
+
* Configures the prefix to add to each custom element name.
|
|
49
|
+
* @param prefix - The prefix to use for custom elements.
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
withPrefix(prefix: string): DesignSystem;
|
|
53
|
+
/**
|
|
54
|
+
* Overrides the default Shadow DOM mode for custom elements.
|
|
55
|
+
* @param mode - The Shadow DOM mode to use for custom elements.
|
|
56
|
+
* @public
|
|
57
|
+
*/
|
|
58
|
+
withShadowRootMode(mode: ShadowRootMode): DesignSystem;
|
|
59
|
+
/**
|
|
60
|
+
* Provides a custom callback capable of resolving scenarios where
|
|
61
|
+
* two different elements request the same element name.
|
|
62
|
+
* @param callback - The disambiguation callback.
|
|
63
|
+
* @public
|
|
64
|
+
*/
|
|
65
|
+
withElementDisambiguation(callback: ElementDisambiguationCallback): DesignSystem;
|
|
66
|
+
/**
|
|
67
|
+
* Overrides the {@link (DesignToken:interface)} root, controlling where
|
|
68
|
+
* {@link (DesignToken:interface)} default value CSS custom properties
|
|
69
|
+
* are emitted.
|
|
70
|
+
*
|
|
71
|
+
* Providing `null` disables automatic DesignToken registration.
|
|
72
|
+
* @param root - the root to register
|
|
73
|
+
* @public
|
|
74
|
+
*/
|
|
75
|
+
withDesignTokenRoot(root: HTMLElement | Document | null): DesignSystem;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* An API gateway to design system features.
|
|
79
|
+
* @public
|
|
80
|
+
*/
|
|
81
|
+
export declare const DesignSystem: Readonly<{
|
|
82
|
+
/**
|
|
83
|
+
* Returns the HTML element name that the type is defined as.
|
|
84
|
+
* @param type - The type to lookup.
|
|
85
|
+
* @public
|
|
86
|
+
*/
|
|
87
|
+
tagFor(type: Constructable): string;
|
|
88
|
+
/**
|
|
89
|
+
* Searches the DOM hierarchy for the design system that is responsible
|
|
90
|
+
* for the provided element.
|
|
91
|
+
* @param element - The element to locate the design system for.
|
|
92
|
+
* @returns The located design system.
|
|
93
|
+
* @public
|
|
94
|
+
*/
|
|
95
|
+
responsibleFor(element: HTMLElement): DesignSystem;
|
|
96
|
+
/**
|
|
97
|
+
* Gets the DesignSystem if one is explicitly defined on the provided element;
|
|
98
|
+
* otherwise creates a design system defined directly on the element.
|
|
99
|
+
* @param element - The element to get or create a design system for.
|
|
100
|
+
* @returns The design system.
|
|
101
|
+
* @public
|
|
102
|
+
*/
|
|
103
|
+
getOrCreate(node?: Node): DesignSystem;
|
|
104
|
+
}>;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import type { Constructable, PartialFASTElementDefinition } from "@ni/fast-element";
|
|
2
|
+
import type { Container } from "../di/di.js";
|
|
3
|
+
import type { ComponentPresentation } from "./component-presentation.js";
|
|
4
|
+
/**
|
|
5
|
+
* Enables defining an element within the context of a design system.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type ContextualElementDefinition = Omit<PartialFASTElementDefinition, "name">;
|
|
9
|
+
/**
|
|
10
|
+
* The design system context in which an element can be defined.
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
export interface ElementDefinitionContext {
|
|
14
|
+
/**
|
|
15
|
+
* The name that the element will be defined as.
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
readonly name: string;
|
|
19
|
+
/**
|
|
20
|
+
* The type that will be defined.
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
readonly type: Constructable;
|
|
24
|
+
/**
|
|
25
|
+
* The dependency injection container associated with the design system.
|
|
26
|
+
* @public
|
|
27
|
+
*/
|
|
28
|
+
readonly container: Container;
|
|
29
|
+
/**
|
|
30
|
+
* Indicates whether or not a platform define call will be made in order
|
|
31
|
+
* to define the element.
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
readonly willDefine: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* The shadow root mode specified by the design system's configuration.
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
readonly shadowRootMode: ShadowRootMode | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Defines the element.
|
|
42
|
+
* @param definition - The definition for the element.
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
defineElement(definition?: ContextualElementDefinition): void;
|
|
46
|
+
/**
|
|
47
|
+
* Defines a presentation for the element.
|
|
48
|
+
* @param presentation - The presentation configuration.
|
|
49
|
+
* @public
|
|
50
|
+
*/
|
|
51
|
+
definePresentation(presentation: ComponentPresentation): void;
|
|
52
|
+
/**
|
|
53
|
+
* Returns the HTML element tag name that the type will be defined as.
|
|
54
|
+
* @param type - The type to lookup.
|
|
55
|
+
* @public
|
|
56
|
+
*/
|
|
57
|
+
tagFor(type: Constructable): string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* The callback type that is invoked when an element can be defined by a design system.
|
|
61
|
+
* @public
|
|
62
|
+
*/
|
|
63
|
+
export type ElementDefinitionCallback = (ctx: ElementDefinitionContext) => void;
|
|
64
|
+
/**
|
|
65
|
+
* The element definition context interface. Designed to be used in `tryDefineElement`
|
|
66
|
+
* @public
|
|
67
|
+
*/
|
|
68
|
+
export interface ElementDefinitionParams extends Pick<ElementDefinitionContext, "name" | "type"> {
|
|
69
|
+
/**
|
|
70
|
+
* FAST actual base class instance.
|
|
71
|
+
* @public
|
|
72
|
+
*/
|
|
73
|
+
readonly baseClass?: Constructable;
|
|
74
|
+
/**
|
|
75
|
+
* A callback to invoke if definition will happen.
|
|
76
|
+
* @public
|
|
77
|
+
*/
|
|
78
|
+
callback: ElementDefinitionCallback;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Design system contextual APIs and configuration usable within component
|
|
82
|
+
* registries.
|
|
83
|
+
* @public
|
|
84
|
+
*/
|
|
85
|
+
export interface DesignSystemRegistrationContext {
|
|
86
|
+
/**
|
|
87
|
+
* The element prefix specified by the design system's configuration.
|
|
88
|
+
* @public
|
|
89
|
+
*/
|
|
90
|
+
readonly elementPrefix: string;
|
|
91
|
+
/**
|
|
92
|
+
* Used to attempt to define a custom element.
|
|
93
|
+
* @param name - The name of the element to define.
|
|
94
|
+
* @param type - The type of the constructor to use to define the element.
|
|
95
|
+
* @param callback - A callback to invoke if definition will happen.
|
|
96
|
+
* @public
|
|
97
|
+
* @deprecated - Use the signature with the ElementDefinitionParams param type instead
|
|
98
|
+
*/
|
|
99
|
+
tryDefineElement(name: string, type: Constructable, callback: ElementDefinitionCallback): void;
|
|
100
|
+
/**
|
|
101
|
+
* Used to attempt to define a custom element.
|
|
102
|
+
* @param params - The custom element definition.
|
|
103
|
+
* @public
|
|
104
|
+
*/
|
|
105
|
+
tryDefineElement(params: ElementDefinitionParams): void;
|
|
106
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export declare const defaultElement: HTMLDivElement;
|
|
2
|
+
interface PropertyTarget {
|
|
3
|
+
setProperty(name: string, value: string | null): void;
|
|
4
|
+
removeProperty(name: string): void;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Controls emission for default values. This control is capable
|
|
8
|
+
* of emitting to multiple {@link PropertyTarget | PropertyTargets},
|
|
9
|
+
* and only emits if it has at least one root.
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare class RootStyleSheetTarget implements PropertyTarget {
|
|
14
|
+
private static roots;
|
|
15
|
+
private static properties;
|
|
16
|
+
setProperty(name: string, value: any): void;
|
|
17
|
+
removeProperty(name: string): void;
|
|
18
|
+
static registerRoot(root: HTMLElement | Document): void;
|
|
19
|
+
static unregisterRoot(root: HTMLElement | Document): void;
|
|
20
|
+
/**
|
|
21
|
+
* Returns the document when provided the default element,
|
|
22
|
+
* otherwise is a no-op
|
|
23
|
+
* @param root - the root to normalize
|
|
24
|
+
*/
|
|
25
|
+
private static normalizeRoot;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Manages creation and caching of PropertyTarget instances.
|
|
29
|
+
*
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
export declare const PropertyTargetManager: Readonly<{
|
|
33
|
+
getOrCreate(source: HTMLElement | Document): PropertyTarget;
|
|
34
|
+
}>;
|
|
35
|
+
export {};
|