@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.
Files changed (416) hide show
  1. package/README.md +58 -0
  2. package/dist/dts/accordion/accordion.d.ts +65 -0
  3. package/dist/dts/accordion/accordion.template.d.ts +8 -0
  4. package/dist/dts/accordion/index.d.ts +2 -0
  5. package/dist/dts/accordion-item/accordion-item.d.ts +76 -0
  6. package/dist/dts/accordion-item/accordion-item.template.d.ts +8 -0
  7. package/dist/dts/accordion-item/index.d.ts +2 -0
  8. package/dist/dts/anchor/anchor.d.ts +128 -0
  9. package/dist/dts/anchor/anchor.template.d.ts +8 -0
  10. package/dist/dts/anchor/index.d.ts +2 -0
  11. package/dist/dts/anchored-region/anchored-region-config.d.ts +117 -0
  12. package/dist/dts/anchored-region/anchored-region.d.ts +389 -0
  13. package/dist/dts/anchored-region/anchored-region.template.d.ts +8 -0
  14. package/dist/dts/anchored-region/index.d.ts +3 -0
  15. package/dist/dts/avatar/avatar.d.ts +62 -0
  16. package/dist/dts/avatar/avatar.template.d.ts +8 -0
  17. package/dist/dts/avatar/index.d.ts +2 -0
  18. package/dist/dts/badge/badge.d.ts +36 -0
  19. package/dist/dts/badge/badge.template.d.ts +8 -0
  20. package/dist/dts/badge/index.d.ts +2 -0
  21. package/dist/dts/breadcrumb/breadcrumb.d.ts +27 -0
  22. package/dist/dts/breadcrumb/breadcrumb.template.d.ts +8 -0
  23. package/dist/dts/breadcrumb/index.d.ts +2 -0
  24. package/dist/dts/breadcrumb-item/breadcrumb-item.d.ts +36 -0
  25. package/dist/dts/breadcrumb-item/breadcrumb-item.template.d.ts +8 -0
  26. package/dist/dts/breadcrumb-item/index.d.ts +2 -0
  27. package/dist/dts/button/button.d.ts +167 -0
  28. package/dist/dts/button/button.form-associated.d.ts +16 -0
  29. package/dist/dts/button/button.template.d.ts +8 -0
  30. package/dist/dts/button/index.d.ts +2 -0
  31. package/dist/dts/calendar/calendar.d.ts +178 -0
  32. package/dist/dts/calendar/calendar.template.d.ts +58 -0
  33. package/dist/dts/calendar/date-formatter.d.ts +124 -0
  34. package/dist/dts/calendar/index.d.ts +3 -0
  35. package/dist/dts/card/card.d.ts +10 -0
  36. package/dist/dts/card/card.template.d.ts +8 -0
  37. package/dist/dts/card/index.d.ts +2 -0
  38. package/dist/dts/checkbox/checkbox.d.ts +58 -0
  39. package/dist/dts/checkbox/checkbox.form-associated.d.ts +16 -0
  40. package/dist/dts/checkbox/checkbox.template.d.ts +8 -0
  41. package/dist/dts/checkbox/index.d.ts +2 -0
  42. package/dist/dts/combobox/combobox.d.ts +341 -0
  43. package/dist/dts/combobox/combobox.form-associated.d.ts +16 -0
  44. package/dist/dts/combobox/combobox.options.d.ts +15 -0
  45. package/dist/dts/combobox/combobox.template.d.ts +8 -0
  46. package/dist/dts/combobox/index.d.ts +3 -0
  47. package/dist/dts/data-grid/data-grid-cell.d.ts +62 -0
  48. package/dist/dts/data-grid/data-grid-cell.template.d.ts +9 -0
  49. package/dist/dts/data-grid/data-grid-row.d.ts +119 -0
  50. package/dist/dts/data-grid/data-grid-row.template.d.ts +10 -0
  51. package/dist/dts/data-grid/data-grid.d.ts +218 -0
  52. package/dist/dts/data-grid/data-grid.options.d.ts +49 -0
  53. package/dist/dts/data-grid/data-grid.template.d.ts +10 -0
  54. package/dist/dts/data-grid/index.d.ts +6 -0
  55. package/dist/dts/design-system/component-presentation.d.ts +66 -0
  56. package/dist/dts/design-system/design-system.d.ts +104 -0
  57. package/dist/dts/design-system/index.d.ts +3 -0
  58. package/dist/dts/design-system/registration-context.d.ts +106 -0
  59. package/dist/dts/design-token/custom-property-manager.d.ts +35 -0
  60. package/dist/dts/design-token/design-token.d.ts +139 -0
  61. package/dist/dts/design-token/interfaces.d.ts +31 -0
  62. package/dist/dts/di/di.d.ts +858 -0
  63. package/dist/dts/di/index.d.ts +1 -0
  64. package/dist/dts/dialog/dialog.d.ts +153 -0
  65. package/dist/dts/dialog/dialog.template.d.ts +8 -0
  66. package/dist/dts/dialog/index.d.ts +2 -0
  67. package/dist/dts/directives/reflect-attributes.d.ts +18 -0
  68. package/dist/dts/disclosure/disclosure.d.ts +59 -0
  69. package/dist/dts/disclosure/disclosure.template.d.ts +8 -0
  70. package/dist/dts/disclosure/index.d.ts +2 -0
  71. package/dist/dts/divider/divider.d.ts +28 -0
  72. package/dist/dts/divider/divider.options.d.ts +19 -0
  73. package/dist/dts/divider/divider.template.d.ts +8 -0
  74. package/dist/dts/divider/index.d.ts +2 -0
  75. package/dist/dts/flipper/flipper.d.ts +57 -0
  76. package/dist/dts/flipper/flipper.options.d.ts +13 -0
  77. package/dist/dts/flipper/flipper.template.d.ts +8 -0
  78. package/dist/dts/flipper/index.d.ts +2 -0
  79. package/dist/dts/form-associated/form-associated.d.ts +177 -0
  80. package/dist/dts/form-associated/index.d.ts +1 -0
  81. package/dist/dts/foundation-element/foundation-element.d.ts +120 -0
  82. package/dist/dts/foundation-element/index.d.ts +1 -0
  83. package/dist/dts/horizontal-scroll/horizontal-scroll.d.ts +242 -0
  84. package/dist/dts/horizontal-scroll/horizontal-scroll.template.d.ts +7 -0
  85. package/dist/dts/horizontal-scroll/index.d.ts +2 -0
  86. package/dist/dts/index-rollup.d.ts +2 -0
  87. package/dist/dts/index.d.ts +53 -0
  88. package/dist/dts/interfaces.d.ts +4 -0
  89. package/dist/dts/listbox/index.d.ts +3 -0
  90. package/dist/dts/listbox/listbox.d.ts +314 -0
  91. package/dist/dts/listbox/listbox.element.d.ts +223 -0
  92. package/dist/dts/listbox/listbox.template.d.ts +8 -0
  93. package/dist/dts/listbox-option/index.d.ts +2 -0
  94. package/dist/dts/listbox-option/listbox-option.d.ts +176 -0
  95. package/dist/dts/listbox-option/listbox-option.template.d.ts +8 -0
  96. package/dist/dts/menu/index.d.ts +2 -0
  97. package/dist/dts/menu/menu.d.ts +78 -0
  98. package/dist/dts/menu/menu.template.d.ts +8 -0
  99. package/dist/dts/menu-item/index.d.ts +2 -0
  100. package/dist/dts/menu-item/menu-item.d.ts +160 -0
  101. package/dist/dts/menu-item/menu-item.options.d.ts +29 -0
  102. package/dist/dts/menu-item/menu-item.template.d.ts +10 -0
  103. package/dist/dts/number-field/index.d.ts +2 -0
  104. package/dist/dts/number-field/number-field.d.ts +227 -0
  105. package/dist/dts/number-field/number-field.form-associated.d.ts +16 -0
  106. package/dist/dts/number-field/number-field.template.d.ts +8 -0
  107. package/dist/dts/patterns/aria-global.d.ts +189 -0
  108. package/dist/dts/patterns/index.d.ts +2 -0
  109. package/dist/dts/patterns/start-end.d.ts +65 -0
  110. package/dist/dts/picker/index.d.ts +10 -0
  111. package/dist/dts/picker/picker-list-item.d.ts +38 -0
  112. package/dist/dts/picker/picker-list-item.template.d.ts +8 -0
  113. package/dist/dts/picker/picker-list.d.ts +8 -0
  114. package/dist/dts/picker/picker-list.template.d.ts +8 -0
  115. package/dist/dts/picker/picker-menu-option.d.ts +37 -0
  116. package/dist/dts/picker/picker-menu-option.template.d.ts +8 -0
  117. package/dist/dts/picker/picker-menu.d.ts +46 -0
  118. package/dist/dts/picker/picker-menu.template.d.ts +8 -0
  119. package/dist/dts/picker/picker.d.ts +390 -0
  120. package/dist/dts/picker/picker.form-associated.d.ts +16 -0
  121. package/dist/dts/picker/picker.template.d.ts +8 -0
  122. package/dist/dts/progress/base-progress.d.ts +71 -0
  123. package/dist/dts/progress/index.d.ts +2 -0
  124. package/dist/dts/progress/progress.template.d.ts +8 -0
  125. package/dist/dts/progress-ring/index.d.ts +1 -0
  126. package/dist/dts/progress-ring/progress-ring.template.d.ts +8 -0
  127. package/dist/dts/radio/index.d.ts +2 -0
  128. package/dist/dts/radio/radio.d.ts +70 -0
  129. package/dist/dts/radio/radio.form-associated.d.ts +16 -0
  130. package/dist/dts/radio/radio.template.d.ts +8 -0
  131. package/dist/dts/radio-group/index.d.ts +2 -0
  132. package/dist/dts/radio-group/radio-group.d.ts +101 -0
  133. package/dist/dts/radio-group/radio-group.template.d.ts +8 -0
  134. package/dist/dts/search/index.d.ts +2 -0
  135. package/dist/dts/search/search.d.ts +162 -0
  136. package/dist/dts/search/search.form-associated.d.ts +16 -0
  137. package/dist/dts/search/search.template.d.ts +8 -0
  138. package/dist/dts/select/index.d.ts +3 -0
  139. package/dist/dts/select/select.d.ts +289 -0
  140. package/dist/dts/select/select.form-associated.d.ts +16 -0
  141. package/dist/dts/select/select.options.d.ts +13 -0
  142. package/dist/dts/select/select.template.d.ts +8 -0
  143. package/dist/dts/skeleton/index.d.ts +2 -0
  144. package/dist/dts/skeleton/skeleton.d.ts +47 -0
  145. package/dist/dts/skeleton/skeleton.template.d.ts +8 -0
  146. package/dist/dts/slider/index.d.ts +2 -0
  147. package/dist/dts/slider/slider-utilities.d.ts +5 -0
  148. package/dist/dts/slider/slider.d.ts +230 -0
  149. package/dist/dts/slider/slider.form-associated.d.ts +16 -0
  150. package/dist/dts/slider/slider.template.d.ts +8 -0
  151. package/dist/dts/slider-label/index.d.ts +2 -0
  152. package/dist/dts/slider-label/slider-label.d.ts +81 -0
  153. package/dist/dts/slider-label/slider-label.template.d.ts +8 -0
  154. package/dist/dts/switch/index.d.ts +2 -0
  155. package/dist/dts/switch/switch.d.ts +60 -0
  156. package/dist/dts/switch/switch.form-associated.d.ts +16 -0
  157. package/dist/dts/switch/switch.template.d.ts +8 -0
  158. package/dist/dts/tab/index.d.ts +2 -0
  159. package/dist/dts/tab/tab.d.ts +17 -0
  160. package/dist/dts/tab/tab.template.d.ts +8 -0
  161. package/dist/dts/tab-panel/index.d.ts +2 -0
  162. package/dist/dts/tab-panel/tab-panel.d.ts +10 -0
  163. package/dist/dts/tab-panel/tab-panel.template.d.ts +8 -0
  164. package/dist/dts/tabs/index.d.ts +2 -0
  165. package/dist/dts/tabs/tabs.d.ts +140 -0
  166. package/dist/dts/tabs/tabs.template.d.ts +8 -0
  167. package/dist/dts/test-utilities/fixture.d.ts +89 -0
  168. package/dist/dts/test-utilities/timeout.d.ts +4 -0
  169. package/dist/dts/text-area/index.d.ts +2 -0
  170. package/dist/dts/text-area/text-area.d.ts +149 -0
  171. package/dist/dts/text-area/text-area.form-associated.d.ts +16 -0
  172. package/dist/dts/text-area/text-area.options.d.ts +27 -0
  173. package/dist/dts/text-area/text-area.template.d.ts +8 -0
  174. package/dist/dts/text-field/index.d.ts +2 -0
  175. package/dist/dts/text-field/text-field.d.ts +166 -0
  176. package/dist/dts/text-field/text-field.form-associated.d.ts +16 -0
  177. package/dist/dts/text-field/text-field.options.d.ts +31 -0
  178. package/dist/dts/text-field/text-field.template.d.ts +8 -0
  179. package/dist/dts/toolbar/index.d.ts +2 -0
  180. package/dist/dts/toolbar/toolbar.d.ts +167 -0
  181. package/dist/dts/toolbar/toolbar.template.d.ts +9 -0
  182. package/dist/dts/tooltip/index.d.ts +2 -0
  183. package/dist/dts/tooltip/tooltip.d.ts +239 -0
  184. package/dist/dts/tooltip/tooltip.options.d.ts +69 -0
  185. package/dist/dts/tooltip/tooltip.template.d.ts +8 -0
  186. package/dist/dts/tree-item/index.d.ts +2 -0
  187. package/dist/dts/tree-item/tree-item.d.ts +141 -0
  188. package/dist/dts/tree-item/tree-item.template.d.ts +8 -0
  189. package/dist/dts/tree-view/index.d.ts +2 -0
  190. package/dist/dts/tree-view/tree-view.d.ts +99 -0
  191. package/dist/dts/tree-view/tree-view.template.d.ts +8 -0
  192. package/dist/dts/utilities/apply-mixins.d.ts +6 -0
  193. package/dist/dts/utilities/composed-contains.d.ts +12 -0
  194. package/dist/dts/utilities/composed-parent.d.ts +10 -0
  195. package/dist/dts/utilities/direction.d.ts +7 -0
  196. package/dist/dts/utilities/index.d.ts +8 -0
  197. package/dist/dts/utilities/intersection-service.d.ts +30 -0
  198. package/dist/dts/utilities/match-media-stylesheet-behavior.d.ts +124 -0
  199. package/dist/dts/utilities/property-stylesheet-behavior.d.ts +38 -0
  200. package/dist/dts/utilities/resize-observer.d.ts +31 -0
  201. package/dist/dts/utilities/root-active-element.d.ts +1 -0
  202. package/dist/dts/utilities/style/disabled.d.ts +5 -0
  203. package/dist/dts/utilities/style/display.d.ts +17 -0
  204. package/dist/dts/utilities/style/focus.d.ts +8 -0
  205. package/dist/dts/utilities/style/index.d.ts +3 -0
  206. package/dist/dts/utilities/whitespace-filter.d.ts +9 -0
  207. package/dist/esm/accordion/accordion.js +185 -0
  208. package/dist/esm/accordion/accordion.template.js +11 -0
  209. package/dist/esm/accordion/index.js +2 -0
  210. package/dist/esm/accordion-item/accordion-item.js +72 -0
  211. package/dist/esm/accordion-item/accordion-item.template.js +49 -0
  212. package/dist/esm/accordion-item/index.js +2 -0
  213. package/dist/esm/anchor/anchor.js +85 -0
  214. package/dist/esm/anchor/anchor.template.js +47 -0
  215. package/dist/esm/anchor/index.js +2 -0
  216. package/dist/esm/anchored-region/anchored-region-config.js +59 -0
  217. package/dist/esm/anchored-region/anchored-region.js +964 -0
  218. package/dist/esm/anchored-region/anchored-region.template.js +12 -0
  219. package/dist/esm/anchored-region/index.js +3 -0
  220. package/dist/esm/avatar/avatar.js +39 -0
  221. package/dist/esm/avatar/avatar.template.js +23 -0
  222. package/dist/esm/avatar/index.js +2 -0
  223. package/dist/esm/badge/badge.js +40 -0
  224. package/dist/esm/badge/badge.template.js +12 -0
  225. package/dist/esm/badge/index.js +2 -0
  226. package/dist/esm/breadcrumb/breadcrumb.js +70 -0
  227. package/dist/esm/breadcrumb/breadcrumb.template.js +14 -0
  228. package/dist/esm/breadcrumb/index.js +2 -0
  229. package/dist/esm/breadcrumb-item/breadcrumb-item.js +23 -0
  230. package/dist/esm/breadcrumb-item/breadcrumb-item.template.js +24 -0
  231. package/dist/esm/breadcrumb-item/index.js +2 -0
  232. package/dist/esm/button/button.form-associated.js +15 -0
  233. package/dist/esm/button/button.js +183 -0
  234. package/dist/esm/button/button.template.js +51 -0
  235. package/dist/esm/button/index.js +2 -0
  236. package/dist/esm/calendar/calendar.js +280 -0
  237. package/dist/esm/calendar/calendar.template.js +191 -0
  238. package/dist/esm/calendar/date-formatter.js +144 -0
  239. package/dist/esm/calendar/index.js +3 -0
  240. package/dist/esm/card/card.js +10 -0
  241. package/dist/esm/card/card.template.js +8 -0
  242. package/dist/esm/card/index.js +2 -0
  243. package/dist/esm/checkbox/checkbox.form-associated.js +15 -0
  244. package/dist/esm/checkbox/checkbox.js +75 -0
  245. package/dist/esm/checkbox/checkbox.template.js +35 -0
  246. package/dist/esm/checkbox/index.js +2 -0
  247. package/dist/esm/combobox/combobox.form-associated.js +15 -0
  248. package/dist/esm/combobox/combobox.js +587 -0
  249. package/dist/esm/combobox/combobox.options.js +10 -0
  250. package/dist/esm/combobox/combobox.template.js +66 -0
  251. package/dist/esm/combobox/index.js +3 -0
  252. package/dist/esm/data-grid/data-grid-cell.js +229 -0
  253. package/dist/esm/data-grid/data-grid-cell.template.js +23 -0
  254. package/dist/esm/data-grid/data-grid-row.js +203 -0
  255. package/dist/esm/data-grid/data-grid-row.template.js +47 -0
  256. package/dist/esm/data-grid/data-grid.js +440 -0
  257. package/dist/esm/data-grid/data-grid.options.js +31 -0
  258. package/dist/esm/data-grid/data-grid.template.js +36 -0
  259. package/dist/esm/data-grid/index.js +6 -0
  260. package/dist/esm/design-system/component-presentation.js +86 -0
  261. package/dist/esm/design-system/design-system.js +207 -0
  262. package/dist/esm/design-system/index.js +3 -0
  263. package/dist/esm/design-system/registration-context.js +1 -0
  264. package/dist/esm/design-token/custom-property-manager.js +216 -0
  265. package/dist/esm/design-token/design-token.js +657 -0
  266. package/dist/esm/design-token/interfaces.js +1 -0
  267. package/dist/esm/di/di.js +1341 -0
  268. package/dist/esm/di/index.js +1 -0
  269. package/dist/esm/dialog/dialog.js +280 -0
  270. package/dist/esm/dialog/dialog.template.js +30 -0
  271. package/dist/esm/dialog/index.js +2 -0
  272. package/dist/esm/directives/reflect-attributes.js +88 -0
  273. package/dist/esm/disclosure/disclosure.js +72 -0
  274. package/dist/esm/disclosure/disclosure.template.js +20 -0
  275. package/dist/esm/disclosure/index.js +2 -0
  276. package/dist/esm/divider/divider.js +39 -0
  277. package/dist/esm/divider/divider.options.js +14 -0
  278. package/dist/esm/divider/divider.template.js +8 -0
  279. package/dist/esm/divider/index.js +2 -0
  280. package/dist/esm/flipper/flipper.js +65 -0
  281. package/dist/esm/flipper/flipper.options.js +8 -0
  282. package/dist/esm/flipper/flipper.template.js +30 -0
  283. package/dist/esm/flipper/index.js +2 -0
  284. package/dist/esm/form-associated/form-associated.js +464 -0
  285. package/dist/esm/form-associated/index.js +1 -0
  286. package/dist/esm/foundation-element/foundation-element.js +132 -0
  287. package/dist/esm/foundation-element/index.js +1 -0
  288. package/dist/esm/horizontal-scroll/horizontal-scroll.js +380 -0
  289. package/dist/esm/horizontal-scroll/horizontal-scroll.template.js +62 -0
  290. package/dist/esm/horizontal-scroll/index.js +2 -0
  291. package/dist/esm/index-rollup.js +2 -0
  292. package/dist/esm/index.js +54 -0
  293. package/dist/esm/interfaces.js +1 -0
  294. package/dist/esm/listbox/index.js +3 -0
  295. package/dist/esm/listbox/listbox.element.js +448 -0
  296. package/dist/esm/listbox/listbox.js +528 -0
  297. package/dist/esm/listbox/listbox.template.js +27 -0
  298. package/dist/esm/listbox-option/index.js +2 -0
  299. package/dist/esm/listbox-option/listbox-option.js +200 -0
  300. package/dist/esm/listbox-option/listbox-option.template.js +25 -0
  301. package/dist/esm/menu/index.js +2 -0
  302. package/dist/esm/menu/menu.js +290 -0
  303. package/dist/esm/menu/menu.template.js +15 -0
  304. package/dist/esm/menu-item/index.js +2 -0
  305. package/dist/esm/menu-item/menu-item.js +251 -0
  306. package/dist/esm/menu-item/menu-item.options.js +26 -0
  307. package/dist/esm/menu-item/menu-item.template.js +78 -0
  308. package/dist/esm/number-field/index.js +2 -0
  309. package/dist/esm/number-field/number-field.form-associated.js +15 -0
  310. package/dist/esm/number-field/number-field.js +288 -0
  311. package/dist/esm/number-field/number-field.template.js +84 -0
  312. package/dist/esm/patterns/aria-global.js +70 -0
  313. package/dist/esm/patterns/index.js +2 -0
  314. package/dist/esm/patterns/start-end.js +84 -0
  315. package/dist/esm/picker/index.js +10 -0
  316. package/dist/esm/picker/picker-list-item.js +71 -0
  317. package/dist/esm/picker/picker-list-item.template.js +17 -0
  318. package/dist/esm/picker/picker-list.js +8 -0
  319. package/dist/esm/picker/picker-list.template.js +13 -0
  320. package/dist/esm/picker/picker-menu-option.js +61 -0
  321. package/dist/esm/picker/picker-menu-option.template.js +16 -0
  322. package/dist/esm/picker/picker-menu.js +59 -0
  323. package/dist/esm/picker/picker-menu.template.js +29 -0
  324. package/dist/esm/picker/picker.form-associated.js +15 -0
  325. package/dist/esm/picker/picker.js +759 -0
  326. package/dist/esm/picker/picker.template.js +97 -0
  327. package/dist/esm/progress/base-progress.js +69 -0
  328. package/dist/esm/progress/index.js +2 -0
  329. package/dist/esm/progress/progress.template.js +31 -0
  330. package/dist/esm/progress-ring/index.js +1 -0
  331. package/dist/esm/progress-ring/progress-ring.template.js +45 -0
  332. package/dist/esm/radio/index.js +2 -0
  333. package/dist/esm/radio/radio.form-associated.js +15 -0
  334. package/dist/esm/radio/radio.js +108 -0
  335. package/dist/esm/radio/radio.template.js +31 -0
  336. package/dist/esm/radio-group/index.js +2 -0
  337. package/dist/esm/radio-group/radio-group.js +390 -0
  338. package/dist/esm/radio-group/radio-group.template.js +29 -0
  339. package/dist/esm/search/index.js +2 -0
  340. package/dist/esm/search/search.form-associated.js +15 -0
  341. package/dist/esm/search/search.js +157 -0
  342. package/dist/esm/search/search.template.js +93 -0
  343. package/dist/esm/select/index.js +3 -0
  344. package/dist/esm/select/select.form-associated.js +15 -0
  345. package/dist/esm/select/select.js +490 -0
  346. package/dist/esm/select/select.options.js +8 -0
  347. package/dist/esm/select/select.template.js +72 -0
  348. package/dist/esm/skeleton/index.js +2 -0
  349. package/dist/esm/skeleton/skeleton.js +35 -0
  350. package/dist/esm/skeleton/skeleton.template.js +20 -0
  351. package/dist/esm/slider/index.js +2 -0
  352. package/dist/esm/slider/slider-utilities.js +11 -0
  353. package/dist/esm/slider/slider.form-associated.js +15 -0
  354. package/dist/esm/slider/slider.js +452 -0
  355. package/dist/esm/slider/slider.template.js +40 -0
  356. package/dist/esm/slider-label/index.js +2 -0
  357. package/dist/esm/slider-label/slider-label.js +158 -0
  358. package/dist/esm/slider-label/slider-label.template.js +24 -0
  359. package/dist/esm/switch/index.js +2 -0
  360. package/dist/esm/switch/switch.form-associated.js +15 -0
  361. package/dist/esm/switch/switch.js +79 -0
  362. package/dist/esm/switch/switch.template.js +37 -0
  363. package/dist/esm/tab/index.js +2 -0
  364. package/dist/esm/tab/tab.js +15 -0
  365. package/dist/esm/tab/tab.template.js +10 -0
  366. package/dist/esm/tab-panel/index.js +2 -0
  367. package/dist/esm/tab-panel/tab-panel.js +10 -0
  368. package/dist/esm/tab-panel/tab-panel.template.js +10 -0
  369. package/dist/esm/tabs/index.js +2 -0
  370. package/dist/esm/tabs/tabs.js +375 -0
  371. package/dist/esm/tabs/tabs.template.js +26 -0
  372. package/dist/esm/test-utilities/fixture.js +90 -0
  373. package/dist/esm/test-utilities/timeout.js +13 -0
  374. package/dist/esm/text-area/index.js +2 -0
  375. package/dist/esm/text-area/text-area.form-associated.js +15 -0
  376. package/dist/esm/text-area/text-area.js +146 -0
  377. package/dist/esm/text-area/text-area.options.js +22 -0
  378. package/dist/esm/text-area/text-area.template.js +64 -0
  379. package/dist/esm/text-field/index.js +2 -0
  380. package/dist/esm/text-field/text-field.form-associated.js +15 -0
  381. package/dist/esm/text-field/text-field.js +183 -0
  382. package/dist/esm/text-field/text-field.options.js +26 -0
  383. package/dist/esm/text-field/text-field.template.js +70 -0
  384. package/dist/esm/toolbar/index.js +2 -0
  385. package/dist/esm/toolbar/toolbar.js +271 -0
  386. package/dist/esm/toolbar/toolbar.template.js +37 -0
  387. package/dist/esm/tooltip/index.js +2 -0
  388. package/dist/esm/tooltip/tooltip.js +512 -0
  389. package/dist/esm/tooltip/tooltip.options.js +63 -0
  390. package/dist/esm/tooltip/tooltip.template.js +32 -0
  391. package/dist/esm/tree-item/index.js +2 -0
  392. package/dist/esm/tree-item/tree-item.js +150 -0
  393. package/dist/esm/tree-item/tree-item.template.js +52 -0
  394. package/dist/esm/tree-view/index.js +2 -0
  395. package/dist/esm/tree-view/tree-view.js +268 -0
  396. package/dist/esm/tree-view/tree-view.template.js +18 -0
  397. package/dist/esm/utilities/apply-mixins.js +20 -0
  398. package/dist/esm/utilities/composed-contains.js +22 -0
  399. package/dist/esm/utilities/composed-parent.js +23 -0
  400. package/dist/esm/utilities/direction.js +10 -0
  401. package/dist/esm/utilities/index.js +8 -0
  402. package/dist/esm/utilities/intersection-service.js +91 -0
  403. package/dist/esm/utilities/match-media-stylesheet-behavior.js +140 -0
  404. package/dist/esm/utilities/property-stylesheet-behavior.js +52 -0
  405. package/dist/esm/utilities/resize-observer.js +5 -0
  406. package/dist/esm/utilities/root-active-element.js +8 -0
  407. package/dist/esm/utilities/style/disabled.js +5 -0
  408. package/dist/esm/utilities/style/display.js +14 -0
  409. package/dist/esm/utilities/style/focus.js +9 -0
  410. package/dist/esm/utilities/style/index.js +3 -0
  411. package/dist/esm/utilities/whitespace-filter.js +13 -0
  412. package/dist/fast-foundation.d.ts +9744 -0
  413. package/dist/fast-foundation.js +19097 -0
  414. package/dist/fast-foundation.min.js +19 -0
  415. package/dist/tsdoc-metadata.json +11 -0
  416. package/package.json +101 -0
@@ -0,0 +1,390 @@
1
+ import { __decorate } from "tslib";
2
+ import { attr, observable } from "@ni/fast-element";
3
+ import { ArrowKeys, Direction, keyArrowDown, keyArrowLeft, keyArrowRight, keyArrowUp, keyEnter, Orientation, } from "@ni/fast-web-utilities";
4
+ import { getDirection } from "../utilities/direction.js";
5
+ import { FoundationElement } from "../foundation-element/foundation-element.js";
6
+ /**
7
+ * An Radio Group Custom HTML Element.
8
+ * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#radiogroup | ARIA radiogroup }.
9
+ *
10
+ * @slot label - The slot for the label
11
+ * @slot - The default slot for radio buttons
12
+ * @csspart positioning-region - The positioning region for laying out the radios
13
+ * @fires change - Fires a custom 'change' event when the value changes
14
+ *
15
+ * @public
16
+ */
17
+ export class RadioGroup extends FoundationElement {
18
+ constructor() {
19
+ super(...arguments);
20
+ /**
21
+ * The orientation of the group
22
+ *
23
+ * @public
24
+ * @remarks
25
+ * HTML Attribute: orientation
26
+ */
27
+ this.orientation = Orientation.horizontal;
28
+ this.radioChangeHandler = (e) => {
29
+ const changedRadio = e.target;
30
+ if (changedRadio.checked) {
31
+ this.slottedRadioButtons.forEach((radio) => {
32
+ if (radio !== changedRadio) {
33
+ radio.checked = false;
34
+ if (!this.isInsideFoundationToolbar) {
35
+ radio.setAttribute("tabindex", "-1");
36
+ }
37
+ }
38
+ });
39
+ this.selectedRadio = changedRadio;
40
+ this.value = changedRadio.value;
41
+ changedRadio.setAttribute("tabindex", "0");
42
+ this.focusedRadio = changedRadio;
43
+ }
44
+ e.stopPropagation();
45
+ };
46
+ this.moveToRadioByIndex = (group, index) => {
47
+ const radio = group[index];
48
+ if (!this.isInsideToolbar) {
49
+ radio.setAttribute("tabindex", "0");
50
+ if (radio.readOnly) {
51
+ this.slottedRadioButtons.forEach((nextRadio) => {
52
+ if (nextRadio !== radio) {
53
+ nextRadio.setAttribute("tabindex", "-1");
54
+ }
55
+ });
56
+ }
57
+ else {
58
+ radio.checked = true;
59
+ this.selectedRadio = radio;
60
+ }
61
+ }
62
+ this.focusedRadio = radio;
63
+ radio.focus();
64
+ };
65
+ this.moveRightOffGroup = () => {
66
+ var _a;
67
+ (_a = this.nextElementSibling) === null || _a === void 0 ? void 0 : _a.focus();
68
+ };
69
+ this.moveLeftOffGroup = () => {
70
+ var _a;
71
+ (_a = this.previousElementSibling) === null || _a === void 0 ? void 0 : _a.focus();
72
+ };
73
+ /**
74
+ * @internal
75
+ */
76
+ this.focusOutHandler = (e) => {
77
+ const group = this.slottedRadioButtons;
78
+ const radio = e.target;
79
+ const index = radio !== null ? group.indexOf(radio) : 0;
80
+ const focusedIndex = this.focusedRadio
81
+ ? group.indexOf(this.focusedRadio)
82
+ : -1;
83
+ if ((focusedIndex === 0 && index === focusedIndex) ||
84
+ (focusedIndex === group.length - 1 && focusedIndex === index)) {
85
+ if (!this.selectedRadio) {
86
+ this.focusedRadio = group[0];
87
+ this.focusedRadio.setAttribute("tabindex", "0");
88
+ group.forEach((nextRadio) => {
89
+ if (nextRadio !== this.focusedRadio) {
90
+ nextRadio.setAttribute("tabindex", "-1");
91
+ }
92
+ });
93
+ }
94
+ else {
95
+ this.focusedRadio = this.selectedRadio;
96
+ if (!this.isInsideFoundationToolbar) {
97
+ this.selectedRadio.setAttribute("tabindex", "0");
98
+ group.forEach((nextRadio) => {
99
+ if (nextRadio !== this.selectedRadio) {
100
+ nextRadio.setAttribute("tabindex", "-1");
101
+ }
102
+ });
103
+ }
104
+ }
105
+ }
106
+ return true;
107
+ };
108
+ /**
109
+ * @internal
110
+ */
111
+ this.clickHandler = (e) => {
112
+ const radio = e.target;
113
+ if (radio) {
114
+ const group = this.slottedRadioButtons;
115
+ if (radio.checked || group.indexOf(radio) === 0) {
116
+ radio.setAttribute("tabindex", "0");
117
+ this.selectedRadio = radio;
118
+ }
119
+ else {
120
+ radio.setAttribute("tabindex", "-1");
121
+ this.selectedRadio = null;
122
+ }
123
+ this.focusedRadio = radio;
124
+ }
125
+ e.preventDefault();
126
+ };
127
+ this.shouldMoveOffGroupToTheRight = (index, group, key) => {
128
+ return index === group.length && this.isInsideToolbar && key === keyArrowRight;
129
+ };
130
+ this.shouldMoveOffGroupToTheLeft = (group, key) => {
131
+ const index = this.focusedRadio ? group.indexOf(this.focusedRadio) - 1 : 0;
132
+ return index < 0 && this.isInsideToolbar && key === keyArrowLeft;
133
+ };
134
+ this.checkFocusedRadio = () => {
135
+ if (this.focusedRadio !== null &&
136
+ !this.focusedRadio.readOnly &&
137
+ !this.focusedRadio.checked) {
138
+ this.focusedRadio.checked = true;
139
+ this.focusedRadio.setAttribute("tabindex", "0");
140
+ this.focusedRadio.focus();
141
+ this.selectedRadio = this.focusedRadio;
142
+ }
143
+ };
144
+ this.moveRight = (e) => {
145
+ const group = this.slottedRadioButtons;
146
+ let index = 0;
147
+ index = this.focusedRadio ? group.indexOf(this.focusedRadio) + 1 : 1;
148
+ if (this.shouldMoveOffGroupToTheRight(index, group, e.key)) {
149
+ this.moveRightOffGroup();
150
+ return;
151
+ }
152
+ else if (index === group.length) {
153
+ index = 0;
154
+ }
155
+ /* looping to get to next radio that is not disabled */
156
+ /* matching native radio/radiogroup which does not select an item if there is only 1 in the group */
157
+ while (index < group.length && group.length > 1) {
158
+ if (!group[index].disabled) {
159
+ this.moveToRadioByIndex(group, index);
160
+ break;
161
+ }
162
+ else if (this.focusedRadio && index === group.indexOf(this.focusedRadio)) {
163
+ break;
164
+ }
165
+ else if (index + 1 >= group.length) {
166
+ if (this.isInsideToolbar) {
167
+ break;
168
+ }
169
+ else {
170
+ index = 0;
171
+ }
172
+ }
173
+ else {
174
+ index += 1;
175
+ }
176
+ }
177
+ };
178
+ this.moveLeft = (e) => {
179
+ const group = this.slottedRadioButtons;
180
+ let index = 0;
181
+ index = this.focusedRadio ? group.indexOf(this.focusedRadio) - 1 : 0;
182
+ index = index < 0 ? group.length - 1 : index;
183
+ if (this.shouldMoveOffGroupToTheLeft(group, e.key)) {
184
+ this.moveLeftOffGroup();
185
+ return;
186
+ }
187
+ /* looping to get to next radio that is not disabled */
188
+ while (index >= 0 && group.length > 1) {
189
+ if (!group[index].disabled) {
190
+ this.moveToRadioByIndex(group, index);
191
+ break;
192
+ }
193
+ else if (this.focusedRadio && index === group.indexOf(this.focusedRadio)) {
194
+ break;
195
+ }
196
+ else if (index - 1 < 0) {
197
+ index = group.length - 1;
198
+ }
199
+ else {
200
+ index -= 1;
201
+ }
202
+ }
203
+ };
204
+ /**
205
+ * keyboard handling per https://w3c.github.io/aria-practices/#for-radio-groups-not-contained-in-a-toolbar
206
+ * navigation is different when there is an ancestor with role='toolbar'
207
+ *
208
+ * @internal
209
+ */
210
+ this.keydownHandler = (e) => {
211
+ const key = e.key;
212
+ if (key in ArrowKeys && this.isInsideFoundationToolbar) {
213
+ return true;
214
+ }
215
+ switch (key) {
216
+ case keyEnter: {
217
+ this.checkFocusedRadio();
218
+ break;
219
+ }
220
+ case keyArrowRight:
221
+ case keyArrowDown: {
222
+ if (this.direction === Direction.ltr) {
223
+ this.moveRight(e);
224
+ }
225
+ else {
226
+ this.moveLeft(e);
227
+ }
228
+ break;
229
+ }
230
+ case keyArrowLeft:
231
+ case keyArrowUp: {
232
+ if (this.direction === Direction.ltr) {
233
+ this.moveLeft(e);
234
+ }
235
+ else {
236
+ this.moveRight(e);
237
+ }
238
+ break;
239
+ }
240
+ default: {
241
+ return true;
242
+ }
243
+ }
244
+ };
245
+ }
246
+ readOnlyChanged() {
247
+ if (this.slottedRadioButtons !== undefined) {
248
+ this.slottedRadioButtons.forEach((radio) => {
249
+ if (this.readOnly) {
250
+ radio.readOnly = true;
251
+ }
252
+ else {
253
+ radio.readOnly = false;
254
+ }
255
+ });
256
+ }
257
+ }
258
+ disabledChanged() {
259
+ if (this.slottedRadioButtons !== undefined) {
260
+ this.slottedRadioButtons.forEach((radio) => {
261
+ if (this.disabled) {
262
+ radio.disabled = true;
263
+ }
264
+ else {
265
+ radio.disabled = false;
266
+ }
267
+ });
268
+ }
269
+ }
270
+ nameChanged() {
271
+ if (this.slottedRadioButtons) {
272
+ this.slottedRadioButtons.forEach((radio) => {
273
+ radio.setAttribute("name", this.name);
274
+ });
275
+ }
276
+ }
277
+ valueChanged() {
278
+ if (this.slottedRadioButtons) {
279
+ this.slottedRadioButtons.forEach((radio) => {
280
+ if (radio.value === this.value) {
281
+ radio.checked = true;
282
+ this.selectedRadio = radio;
283
+ }
284
+ });
285
+ }
286
+ this.$emit("change");
287
+ }
288
+ slottedRadioButtonsChanged(oldValue, newValue) {
289
+ if (this.slottedRadioButtons && this.slottedRadioButtons.length > 0) {
290
+ this.setupRadioButtons();
291
+ }
292
+ }
293
+ get parentToolbar() {
294
+ return this.closest('[role="toolbar"]');
295
+ }
296
+ get isInsideToolbar() {
297
+ var _a;
298
+ return ((_a = this.parentToolbar) !== null && _a !== void 0 ? _a : false);
299
+ }
300
+ get isInsideFoundationToolbar() {
301
+ var _a;
302
+ return !!((_a = this.parentToolbar) === null || _a === void 0 ? void 0 : _a["$fastController"]);
303
+ }
304
+ /**
305
+ * @internal
306
+ */
307
+ connectedCallback() {
308
+ super.connectedCallback();
309
+ this.direction = getDirection(this);
310
+ this.setupRadioButtons();
311
+ }
312
+ disconnectedCallback() {
313
+ this.slottedRadioButtons.forEach((radio) => {
314
+ radio.removeEventListener("change", this.radioChangeHandler);
315
+ });
316
+ }
317
+ setupRadioButtons() {
318
+ const checkedRadios = this.slottedRadioButtons.filter((radio) => {
319
+ return radio.hasAttribute("checked");
320
+ });
321
+ const numberOfCheckedRadios = checkedRadios ? checkedRadios.length : 0;
322
+ if (numberOfCheckedRadios > 1) {
323
+ const lastCheckedRadio = checkedRadios[numberOfCheckedRadios - 1];
324
+ lastCheckedRadio.checked = true;
325
+ }
326
+ let foundMatchingVal = false;
327
+ this.slottedRadioButtons.forEach((radio) => {
328
+ if (this.name !== undefined) {
329
+ radio.setAttribute("name", this.name);
330
+ }
331
+ if (this.disabled) {
332
+ radio.disabled = true;
333
+ }
334
+ if (this.readOnly) {
335
+ radio.readOnly = true;
336
+ }
337
+ if (this.value && this.value === radio.value) {
338
+ this.selectedRadio = radio;
339
+ this.focusedRadio = radio;
340
+ radio.checked = true;
341
+ radio.setAttribute("tabindex", "0");
342
+ foundMatchingVal = true;
343
+ }
344
+ else {
345
+ if (!this.isInsideFoundationToolbar) {
346
+ radio.setAttribute("tabindex", "-1");
347
+ }
348
+ radio.checked = false;
349
+ }
350
+ radio.addEventListener("change", this.radioChangeHandler);
351
+ });
352
+ if (this.value === undefined && this.slottedRadioButtons.length > 0) {
353
+ const checkedRadios = this.slottedRadioButtons.filter((radio) => {
354
+ return radio.hasAttribute("checked");
355
+ });
356
+ const numberOfCheckedRadios = checkedRadios !== null ? checkedRadios.length : 0;
357
+ if (numberOfCheckedRadios > 0 && !foundMatchingVal) {
358
+ const lastCheckedRadio = checkedRadios[numberOfCheckedRadios - 1];
359
+ lastCheckedRadio.checked = true;
360
+ this.focusedRadio = lastCheckedRadio;
361
+ lastCheckedRadio.setAttribute("tabindex", "0");
362
+ }
363
+ else {
364
+ this.slottedRadioButtons[0].setAttribute("tabindex", "0");
365
+ this.focusedRadio = this.slottedRadioButtons[0];
366
+ }
367
+ }
368
+ }
369
+ }
370
+ __decorate([
371
+ attr({ attribute: "readonly", mode: "boolean" })
372
+ ], RadioGroup.prototype, "readOnly", void 0);
373
+ __decorate([
374
+ attr({ attribute: "disabled", mode: "boolean" })
375
+ ], RadioGroup.prototype, "disabled", void 0);
376
+ __decorate([
377
+ attr
378
+ ], RadioGroup.prototype, "name", void 0);
379
+ __decorate([
380
+ attr
381
+ ], RadioGroup.prototype, "value", void 0);
382
+ __decorate([
383
+ attr
384
+ ], RadioGroup.prototype, "orientation", void 0);
385
+ __decorate([
386
+ observable
387
+ ], RadioGroup.prototype, "childItems", void 0);
388
+ __decorate([
389
+ observable
390
+ ], RadioGroup.prototype, "slottedRadioButtons", void 0);
@@ -0,0 +1,29 @@
1
+ import { elements, html, slotted } from "@ni/fast-element";
2
+ import { Orientation } from "@ni/fast-web-utilities";
3
+ /**
4
+ * The template for the {@link @ni/fast-foundation#RadioGroup} component.
5
+ * @public
6
+ */
7
+ export const radioGroupTemplate = (context, definition) => html `
8
+ <template
9
+ role="radiogroup"
10
+ aria-disabled="${x => x.disabled}"
11
+ aria-readonly="${x => x.readOnly}"
12
+ @click="${(x, c) => x.clickHandler(c.event)}"
13
+ @keydown="${(x, c) => x.keydownHandler(c.event)}"
14
+ @focusout="${(x, c) => x.focusOutHandler(c.event)}"
15
+ >
16
+ <slot name="label"></slot>
17
+ <div
18
+ class="positioning-region ${x => x.orientation === Orientation.horizontal ? "horizontal" : "vertical"}"
19
+ part="positioning-region"
20
+ >
21
+ <slot
22
+ ${slotted({
23
+ property: "slottedRadioButtons",
24
+ filter: elements("[role=radio]"),
25
+ })}
26
+ ></slot>
27
+ </div>
28
+ </template>
29
+ `;
@@ -0,0 +1,2 @@
1
+ export * from "./search.template.js";
2
+ export * from "./search.js";
@@ -0,0 +1,15 @@
1
+ import { FormAssociated } from "../form-associated/form-associated.js";
2
+ import { FoundationElement } from "../foundation-element/foundation-element.js";
3
+ class _Search extends FoundationElement {
4
+ }
5
+ /**
6
+ * A form-associated base class for the {@link @ni/fast-foundation#(Search:class)} component.
7
+ *
8
+ * @internal
9
+ */
10
+ export class FormAssociatedSearch extends FormAssociated(_Search) {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.proxy = document.createElement("input");
14
+ }
15
+ }
@@ -0,0 +1,157 @@
1
+ import { __decorate } from "tslib";
2
+ import { attr, DOM, nullableNumberConverter, observable } from "@ni/fast-element";
3
+ import { ARIAGlobalStatesAndProperties, StartEnd, } from "../patterns/index.js";
4
+ import { applyMixins } from "../utilities/apply-mixins.js";
5
+ import { FormAssociatedSearch } from "./search.form-associated.js";
6
+ /**
7
+ * A Search Custom HTML Element.
8
+ * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/search | <input type="search" /> element }.
9
+ *
10
+ * @slot start - Content which can be provided before the search input
11
+ * @slot end - Content which can be provided after the search clear button
12
+ * @slot - The default slot for the label
13
+ * @slot close-button - The clear button
14
+ * @slot close-glyph - The clear glyph
15
+ * @csspart label - The label
16
+ * @csspart root - The element wrapping the control, including start and end slots
17
+ * @csspart control - The element representing the input
18
+ * @csspart clear-button - The button to clear the input
19
+ *
20
+ * @public
21
+ */
22
+ export class Search extends FormAssociatedSearch {
23
+ readOnlyChanged() {
24
+ if (this.proxy instanceof HTMLInputElement) {
25
+ this.proxy.readOnly = this.readOnly;
26
+ this.validate();
27
+ }
28
+ }
29
+ autofocusChanged() {
30
+ if (this.proxy instanceof HTMLInputElement) {
31
+ this.proxy.autofocus = this.autofocus;
32
+ this.validate();
33
+ }
34
+ }
35
+ placeholderChanged() {
36
+ if (this.proxy instanceof HTMLInputElement) {
37
+ this.proxy.placeholder = this.placeholder;
38
+ }
39
+ }
40
+ listChanged() {
41
+ if (this.proxy instanceof HTMLInputElement) {
42
+ this.proxy.setAttribute("list", this.list);
43
+ this.validate();
44
+ }
45
+ }
46
+ maxlengthChanged() {
47
+ if (this.proxy instanceof HTMLInputElement) {
48
+ this.proxy.maxLength = this.maxlength;
49
+ this.validate();
50
+ }
51
+ }
52
+ minlengthChanged() {
53
+ if (this.proxy instanceof HTMLInputElement) {
54
+ this.proxy.minLength = this.minlength;
55
+ this.validate();
56
+ }
57
+ }
58
+ patternChanged() {
59
+ if (this.proxy instanceof HTMLInputElement) {
60
+ this.proxy.pattern = this.pattern;
61
+ this.validate();
62
+ }
63
+ }
64
+ sizeChanged() {
65
+ if (this.proxy instanceof HTMLInputElement) {
66
+ this.proxy.size = this.size;
67
+ }
68
+ }
69
+ spellcheckChanged() {
70
+ if (this.proxy instanceof HTMLInputElement) {
71
+ this.proxy.spellcheck = this.spellcheck;
72
+ }
73
+ }
74
+ /**
75
+ * @internal
76
+ */
77
+ connectedCallback() {
78
+ super.connectedCallback();
79
+ this.validate();
80
+ if (this.autofocus) {
81
+ DOM.queueUpdate(() => {
82
+ this.focus();
83
+ });
84
+ }
85
+ }
86
+ /** {@inheritDoc (FormAssociated:interface).validate} */
87
+ validate() {
88
+ super.validate(this.control);
89
+ }
90
+ /**
91
+ * Handles the internal control's `input` event
92
+ * @internal
93
+ */
94
+ handleTextInput() {
95
+ this.value = this.control.value;
96
+ }
97
+ /**
98
+ * Handles the control's clear value event
99
+ * @public
100
+ */
101
+ handleClearInput() {
102
+ this.value = "";
103
+ this.control.focus();
104
+ this.handleChange();
105
+ }
106
+ /**
107
+ * Change event handler for inner control.
108
+ * @remarks
109
+ * "Change" events are not `composable` so they will not
110
+ * permeate the shadow DOM boundary. This fn effectively proxies
111
+ * the change event, emitting a `change` event whenever the internal
112
+ * control emits a `change` event
113
+ * @internal
114
+ */
115
+ handleChange() {
116
+ this.$emit("change");
117
+ }
118
+ }
119
+ __decorate([
120
+ attr({ attribute: "readonly", mode: "boolean" })
121
+ ], Search.prototype, "readOnly", void 0);
122
+ __decorate([
123
+ attr({ mode: "boolean" })
124
+ ], Search.prototype, "autofocus", void 0);
125
+ __decorate([
126
+ attr
127
+ ], Search.prototype, "placeholder", void 0);
128
+ __decorate([
129
+ attr
130
+ ], Search.prototype, "list", void 0);
131
+ __decorate([
132
+ attr({ converter: nullableNumberConverter })
133
+ ], Search.prototype, "maxlength", void 0);
134
+ __decorate([
135
+ attr({ converter: nullableNumberConverter })
136
+ ], Search.prototype, "minlength", void 0);
137
+ __decorate([
138
+ attr
139
+ ], Search.prototype, "pattern", void 0);
140
+ __decorate([
141
+ attr({ converter: nullableNumberConverter })
142
+ ], Search.prototype, "size", void 0);
143
+ __decorate([
144
+ attr({ mode: "boolean" })
145
+ ], Search.prototype, "spellcheck", void 0);
146
+ __decorate([
147
+ observable
148
+ ], Search.prototype, "defaultSlottedNodes", void 0);
149
+ /**
150
+ * Includes ARIA states and properties relating to the ARIA textbox role
151
+ *
152
+ * @public
153
+ */
154
+ export class DelegatesARIASearch {
155
+ }
156
+ applyMixins(DelegatesARIASearch, ARIAGlobalStatesAndProperties);
157
+ applyMixins(Search, StartEnd, DelegatesARIASearch);
@@ -0,0 +1,93 @@
1
+ import { html, ref, slotted } from "@ni/fast-element";
2
+ import { endSlotTemplate, startSlotTemplate } from "../patterns/start-end.js";
3
+ import { whitespaceFilter } from "../utilities/whitespace-filter.js";
4
+ /**
5
+ * The template for the {@link @ni/fast-foundation#(Search:class)} component.
6
+ * @public
7
+ */
8
+ export const searchTemplate = (context, definition) => html `
9
+ <template
10
+ class="
11
+ ${x => (x.readOnly ? "readonly" : "")}
12
+ "
13
+ >
14
+ <label
15
+ part="label"
16
+ for="control"
17
+ class="${x => x.defaultSlottedNodes && x.defaultSlottedNodes.length
18
+ ? "label"
19
+ : "label label__hidden"}"
20
+ >
21
+ <slot
22
+ ${slotted({ property: "defaultSlottedNodes", filter: whitespaceFilter })}
23
+ ></slot>
24
+ </label>
25
+ <div class="root" part="root" ${ref("root")}>
26
+ ${startSlotTemplate(context, definition)}
27
+ <div class="input-wrapper" part="input-wrapper">
28
+ <input
29
+ class="control"
30
+ part="control"
31
+ id="control"
32
+ @input="${x => x.handleTextInput()}"
33
+ @change="${x => x.handleChange()}"
34
+ ?autofocus="${x => x.autofocus}"
35
+ ?disabled="${x => x.disabled}"
36
+ list="${x => x.list}"
37
+ maxlength="${x => x.maxlength}"
38
+ minlength="${x => x.minlength}"
39
+ pattern="${x => x.pattern}"
40
+ placeholder="${x => x.placeholder}"
41
+ ?readonly="${x => x.readOnly}"
42
+ ?required="${x => x.required}"
43
+ size="${x => x.size}"
44
+ ?spellcheck="${x => x.spellcheck}"
45
+ :value="${x => x.value}"
46
+ type="search"
47
+ aria-atomic="${x => x.ariaAtomic}"
48
+ aria-busy="${x => x.ariaBusy}"
49
+ aria-controls="${x => x.ariaControls}"
50
+ aria-current="${x => x.ariaCurrent}"
51
+ aria-describedby="${x => x.ariaDescribedby}"
52
+ aria-details="${x => x.ariaDetails}"
53
+ aria-disabled="${x => x.ariaDisabled}"
54
+ aria-errormessage="${x => x.ariaErrormessage}"
55
+ aria-flowto="${x => x.ariaFlowto}"
56
+ aria-haspopup="${x => x.ariaHaspopup}"
57
+ aria-hidden="${x => x.ariaHidden}"
58
+ aria-invalid="${x => x.ariaInvalid}"
59
+ aria-keyshortcuts="${x => x.ariaKeyshortcuts}"
60
+ aria-label="${x => x.ariaLabel}"
61
+ aria-labelledby="${x => x.ariaLabelledby}"
62
+ aria-live="${x => x.ariaLive}"
63
+ aria-owns="${x => x.ariaOwns}"
64
+ aria-relevant="${x => x.ariaRelevant}"
65
+ aria-roledescription="${x => x.ariaRoledescription}"
66
+ ${ref("control")}
67
+ />
68
+ <slot name="close-button">
69
+ <button
70
+ class="clear-button ${x => x.value ? "" : "clear-button__hidden"}"
71
+ part="clear-button"
72
+ tabindex="-1"
73
+ @click=${x => x.handleClearInput()}
74
+ >
75
+ <slot name="close-glyph">
76
+ <svg
77
+ width="9"
78
+ height="9"
79
+ viewBox="0 0 9 9"
80
+ xmlns="http://www.w3.org/2000/svg"
81
+ >
82
+ <path
83
+ d="M0.146447 0.146447C0.338683 -0.0478972 0.645911 -0.0270359 0.853553 0.146447L4.5 3.793L8.14645 0.146447C8.34171 -0.0488155 8.65829 -0.0488155 8.85355 0.146447C9.04882 0.341709 9.04882 0.658291 8.85355 0.853553L5.207 4.5L8.85355 8.14645C9.05934 8.35223 9.03129 8.67582 8.85355 8.85355C8.67582 9.03129 8.35409 9.02703 8.14645 8.85355L4.5 5.207L0.853553 8.85355C0.658291 9.04882 0.341709 9.04882 0.146447 8.85355C-0.0488155 8.65829 -0.0488155 8.34171 0.146447 8.14645L3.793 4.5L0.146447 0.853553C-0.0268697 0.680237 -0.0457894 0.34079 0.146447 0.146447Z"
84
+ />
85
+ </svg>
86
+ </slot>
87
+ </button>
88
+ </slot>
89
+ </div>
90
+ ${endSlotTemplate(context, definition)}
91
+ </div>
92
+ </template>
93
+ `;
@@ -0,0 +1,3 @@
1
+ export * from "./select.js";
2
+ export * from "./select.options.js";
3
+ export * from "./select.template.js";