@noctuatech/uswds 1.3.2 → 1.3.4

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 (299) hide show
  1. package/package.json +5 -5
  2. package/src/lib/accordion/{accordion.test.ts → accordion.element.test.ts} +28 -31
  3. package/src/lib/accordion/accordion.element.ts +9 -7
  4. package/src/lib/alert/{alert.test.ts → alert.element.test.ts} +5 -6
  5. package/src/lib/alert/alert.element.ts +6 -4
  6. package/src/lib/breadcrumbs/breadcrumb/breadcrumb.element.ts +10 -10
  7. package/src/lib/breadcrumbs/breadcrumbs.element.test.ts +23 -0
  8. package/src/lib/button/button.element.test.ts +15 -0
  9. package/src/lib/button/button.element.ts +37 -42
  10. package/src/lib/button-group/button-group.element.test.ts +13 -0
  11. package/src/lib/card/{card.test.ts → card.element.test.ts} +12 -12
  12. package/src/lib/checkbox/{checkbox.test.ts → checkbox.element.test.ts} +15 -17
  13. package/src/lib/checkbox/checkbox.element.ts +28 -32
  14. package/src/lib/checkbox/checkbox.stories.ts +17 -33
  15. package/src/lib/collection/collection-item/collection-item.element.test.ts +15 -0
  16. package/src/lib/collection/collection.element.test.ts +13 -0
  17. package/src/lib/combo-box/{combo-box.test.ts → combo-box.element.test.ts} +64 -93
  18. package/src/lib/config/config.element.test.ts +13 -0
  19. package/src/lib/description/description.element.test.ts +13 -0
  20. package/src/lib/file-input/file-input-preview/file-input-preview.element.test.ts +93 -0
  21. package/src/lib/file-input/file-input-preview/file-input-preview.element.ts +15 -13
  22. package/src/lib/file-input/file-input.element.test.ts +73 -0
  23. package/src/lib/file-input/file-input.element.ts +10 -20
  24. package/src/lib/in-page-nav/in-page-nav-item/in-page-nav-item.element.ts +20 -20
  25. package/src/lib/in-page-nav/{in-page-nav.test.ts → in-page-nav.element.test.ts} +18 -21
  26. package/src/lib/input/{input.test.ts → input.element.test.ts} +11 -0
  27. package/src/lib/input/input.element.ts +57 -41
  28. package/src/lib/input-mask/input-mask.element.ts +1 -1
  29. package/src/lib/input-mask/input-mask.stories.ts +2 -0
  30. package/src/lib/link/link.element.ts +18 -25
  31. package/src/lib/modal/modal-close/modal-close.element.test.ts +13 -0
  32. package/src/lib/modal/modal-heading/modal-heading.element.test.ts +15 -0
  33. package/src/lib/modal/modal.element.test.ts +23 -0
  34. package/src/lib/pagination/pagination-item/pagination-item.element.ts +9 -6
  35. package/src/lib/pagination/pagination-no/pagination-no.element.ts +17 -17
  36. package/src/lib/pagination/pagination.element.test.ts +13 -0
  37. package/src/lib/process-list/{process-list.test.ts → process-list.element.test.ts} +19 -12
  38. package/src/lib/radio/radio-option/radio-option.element.test.ts +20 -0
  39. package/src/lib/radio/radio.element.test.ts +121 -0
  40. package/src/lib/range-slider/range-slider.element.test.ts +57 -0
  41. package/src/lib/range-slider/range-slider.element.ts +48 -33
  42. package/src/lib/search/search.element.test.ts +71 -0
  43. package/src/lib/select/{select.test.ts → select.element.test.ts} +23 -26
  44. package/src/lib/select/select.element.ts +31 -32
  45. package/src/lib/side-nav/{side-nav.test.ts → side-nav.element.test.ts} +13 -23
  46. package/src/lib/step-indicator/step/step.element.ts +16 -16
  47. package/src/lib/step-indicator/{step-indicator.test.ts → step-indicator.element.test.ts} +6 -6
  48. package/src/lib/summary-box/summary-box.element.test.ts +13 -0
  49. package/src/lib/tag/tag.element.test.ts +13 -0
  50. package/src/lib/textarea/{textarea.test.ts → textarea.element.test.ts} +13 -13
  51. package/src/lib/textarea/textarea.element.ts +23 -24
  52. package/target/lib/accordion/accordion.element.js +4 -2
  53. package/target/lib/accordion/accordion.element.js.map +1 -1
  54. package/target/lib/accordion/accordion.element.test.d.ts +1 -0
  55. package/target/lib/accordion/{accordion.test.js → accordion.element.test.js} +19 -19
  56. package/target/lib/accordion/accordion.element.test.js.map +1 -0
  57. package/target/lib/alert/alert.element.js +4 -2
  58. package/target/lib/alert/alert.element.js.map +1 -1
  59. package/target/lib/alert/alert.element.test.d.ts +1 -0
  60. package/target/lib/alert/{alert.test.js → alert.element.test.js} +5 -5
  61. package/target/lib/alert/alert.element.test.js.map +1 -0
  62. package/target/lib/breadcrumbs/breadcrumb/breadcrumb.element.d.ts +1 -1
  63. package/target/lib/breadcrumbs/breadcrumb/breadcrumb.element.js +6 -6
  64. package/target/lib/breadcrumbs/breadcrumbs.element.test.d.ts +2 -0
  65. package/target/lib/breadcrumbs/{breadcrumbs.test.js → breadcrumbs.element.test.js} +6 -6
  66. package/target/lib/breadcrumbs/breadcrumbs.element.test.js.map +1 -0
  67. package/target/lib/button/button.element.d.ts +3 -3
  68. package/target/lib/button/button.element.js +17 -23
  69. package/target/lib/button/button.element.js.map +1 -1
  70. package/target/lib/button/button.element.test.d.ts +1 -0
  71. package/target/lib/button/button.element.test.js +12 -0
  72. package/target/lib/button/button.element.test.js.map +1 -0
  73. package/target/lib/button-group/button-group.element.test.d.ts +1 -0
  74. package/target/lib/button-group/button-group.element.test.js +9 -0
  75. package/target/lib/button-group/button-group.element.test.js.map +1 -0
  76. package/target/lib/card/card.element.test.d.ts +6 -0
  77. package/target/lib/card/{card.test.js → card.element.test.js} +10 -10
  78. package/target/lib/card/card.element.test.js.map +1 -0
  79. package/target/lib/checkbox/checkbox.element.d.ts +3 -2
  80. package/target/lib/checkbox/checkbox.element.js +21 -22
  81. package/target/lib/checkbox/checkbox.element.js.map +1 -1
  82. package/target/lib/checkbox/checkbox.element.test.d.ts +1 -0
  83. package/target/lib/checkbox/{checkbox.test.js → checkbox.element.test.js} +13 -12
  84. package/target/lib/checkbox/checkbox.element.test.js.map +1 -0
  85. package/target/lib/checkbox/checkbox.stories.d.ts +2 -2
  86. package/target/lib/checkbox/checkbox.stories.js +6 -6
  87. package/target/lib/checkbox/checkbox.stories.js.map +1 -1
  88. package/target/lib/collection/collection-item/collection-item.element.test.d.ts +1 -0
  89. package/target/lib/collection/collection-item/collection-item.element.test.js +9 -0
  90. package/target/lib/collection/collection-item/collection-item.element.test.js.map +1 -0
  91. package/target/lib/collection/collection.element.test.d.ts +1 -0
  92. package/target/lib/collection/collection.element.test.js +9 -0
  93. package/target/lib/collection/collection.element.test.js.map +1 -0
  94. package/target/lib/combo-box/combo-box.element.test.d.ts +3 -0
  95. package/target/lib/combo-box/{combo-box.test.js → combo-box.element.test.js} +60 -60
  96. package/target/lib/combo-box/combo-box.element.test.js.map +1 -0
  97. package/target/lib/config/config.element.test.d.ts +1 -0
  98. package/target/lib/config/config.element.test.js +9 -0
  99. package/target/lib/config/config.element.test.js.map +1 -0
  100. package/target/lib/description/description.element.test.d.ts +1 -0
  101. package/target/lib/description/description.element.test.js +9 -0
  102. package/target/lib/description/description.element.test.js.map +1 -0
  103. package/target/lib/file-input/file-input-preview/file-input-preview.element.js +12 -10
  104. package/target/lib/file-input/file-input-preview/file-input-preview.element.js.map +1 -1
  105. package/target/lib/file-input/file-input-preview/file-input-preview.element.test.d.ts +2 -0
  106. package/target/lib/file-input/file-input-preview/{file-input-preview.test.js → file-input-preview.element.test.js} +24 -24
  107. package/target/lib/file-input/file-input-preview/file-input-preview.element.test.js.map +1 -0
  108. package/target/lib/file-input/file-input.element.js +5 -6
  109. package/target/lib/file-input/file-input.element.js.map +1 -1
  110. package/target/lib/file-input/file-input.element.test.d.ts +1 -0
  111. package/target/lib/file-input/{file-input.test.js → file-input.element.test.js} +16 -16
  112. package/target/lib/file-input/file-input.element.test.js.map +1 -0
  113. package/target/lib/in-page-nav/in-page-nav-item/in-page-nav-item.element.d.ts +2 -3
  114. package/target/lib/in-page-nav/in-page-nav-item/in-page-nav-item.element.js +15 -13
  115. package/target/lib/in-page-nav/in-page-nav-item/in-page-nav-item.element.js.map +1 -1
  116. package/target/lib/in-page-nav/in-page-nav.element.test.d.ts +2 -0
  117. package/target/lib/in-page-nav/{in-page-nav.test.js → in-page-nav.element.test.js} +6 -6
  118. package/target/lib/in-page-nav/in-page-nav.element.test.js.map +1 -0
  119. package/target/lib/input/input.element.d.ts +4 -5
  120. package/target/lib/input/input.element.js +54 -48
  121. package/target/lib/input/input.element.js.map +1 -1
  122. package/target/lib/input/{input.test.js → input.element.test.js} +6 -1
  123. package/target/lib/input/input.element.test.js.map +1 -0
  124. package/target/lib/input-mask/input-mask.element.d.ts +1 -1
  125. package/target/lib/input-mask/input-mask.element.js +1 -1
  126. package/target/lib/input-mask/input-mask.element.js.map +1 -1
  127. package/target/lib/input-mask/{input-mask.test.js → input-mask.element.test.js} +1 -1
  128. package/target/lib/input-mask/input-mask.element.test.js.map +1 -0
  129. package/target/lib/input-mask/input-mask.stories.js +1 -1
  130. package/target/lib/input-mask/input-mask.stories.js.map +1 -1
  131. package/target/lib/link/link.element.d.ts +3 -5
  132. package/target/lib/link/link.element.js +14 -26
  133. package/target/lib/link/link.element.js.map +1 -1
  134. package/target/lib/modal/modal-close/modal-close.element.test.d.ts +1 -0
  135. package/target/lib/modal/modal-close/modal-close.element.test.js +9 -0
  136. package/target/lib/modal/modal-close/modal-close.element.test.js.map +1 -0
  137. package/target/lib/modal/modal-heading/modal-heading.element.test.d.ts +1 -0
  138. package/target/lib/modal/modal-heading/modal-heading.element.test.js +9 -0
  139. package/target/lib/modal/modal-heading/modal-heading.element.test.js.map +1 -0
  140. package/target/lib/modal/modal.element.test.d.ts +3 -0
  141. package/target/lib/modal/modal.element.test.js +11 -0
  142. package/target/lib/modal/modal.element.test.js.map +1 -0
  143. package/target/lib/pagination/pagination-item/pagination-item.element.d.ts +1 -1
  144. package/target/lib/pagination/pagination-item/pagination-item.element.js +3 -3
  145. package/target/lib/pagination/pagination-item/pagination-item.element.js.map +1 -1
  146. package/target/lib/pagination/pagination-no/pagination-no.element.d.ts +2 -3
  147. package/target/lib/pagination/pagination-no/pagination-no.element.js +10 -8
  148. package/target/lib/pagination/pagination-no/pagination-no.element.js.map +1 -1
  149. package/target/lib/pagination/pagination.element.test.d.ts +1 -0
  150. package/target/lib/pagination/pagination.element.test.js +9 -0
  151. package/target/lib/pagination/pagination.element.test.js.map +1 -0
  152. package/target/lib/process-list/process-list.element.test.d.ts +2 -0
  153. package/target/lib/process-list/{process-list.test.js → process-list.element.test.js} +6 -6
  154. package/target/lib/process-list/process-list.element.test.js.map +1 -0
  155. package/target/lib/radio/radio-option/radio-option.element.test.d.ts +2 -0
  156. package/target/lib/radio/radio-option/radio-option.element.test.js +11 -0
  157. package/target/lib/radio/radio-option/radio-option.element.test.js.map +1 -0
  158. package/target/lib/radio/radio.element.test.d.ts +2 -0
  159. package/target/lib/radio/{radio.test.js → radio.element.test.js} +19 -28
  160. package/target/lib/radio/radio.element.test.js.map +1 -0
  161. package/target/lib/range-slider/range-slider.element.d.ts +4 -2
  162. package/target/lib/range-slider/range-slider.element.js +34 -29
  163. package/target/lib/range-slider/range-slider.element.js.map +1 -1
  164. package/target/lib/range-slider/range-slider.element.test.d.ts +1 -0
  165. package/target/lib/range-slider/range-slider.element.test.js +26 -0
  166. package/target/lib/range-slider/range-slider.element.test.js.map +1 -0
  167. package/target/lib/search/search.element.test.d.ts +3 -0
  168. package/target/lib/search/search.element.test.js +52 -0
  169. package/target/lib/search/search.element.test.js.map +1 -0
  170. package/target/lib/select/select.element.d.ts +4 -3
  171. package/target/lib/select/select.element.js +25 -26
  172. package/target/lib/select/select.element.js.map +1 -1
  173. package/target/lib/select/select.element.test.d.ts +2 -0
  174. package/target/lib/select/{select.test.js → select.element.test.js} +23 -27
  175. package/target/lib/select/select.element.test.js.map +1 -0
  176. package/target/lib/services/{icon.service.test.js → icon.service.element.test.js} +1 -1
  177. package/target/lib/services/icon.service.element.test.js.map +1 -0
  178. package/target/lib/side-nav/side-nav.element.test.d.ts +3 -0
  179. package/target/lib/side-nav/{side-nav.test.js → side-nav.element.test.js} +11 -11
  180. package/target/lib/side-nav/side-nav.element.test.js.map +1 -0
  181. package/target/lib/step-indicator/step/step.element.d.ts +2 -2
  182. package/target/lib/step-indicator/step/step.element.js +8 -8
  183. package/target/lib/step-indicator/step-indicator.element.test.d.ts +2 -0
  184. package/target/lib/step-indicator/{step-indicator.test.js → step-indicator.element.test.js} +6 -6
  185. package/target/lib/step-indicator/step-indicator.element.test.js.map +1 -0
  186. package/target/lib/summary-box/summary-box.element.test.d.ts +1 -0
  187. package/target/lib/summary-box/summary-box.element.test.js +9 -0
  188. package/target/lib/summary-box/summary-box.element.test.js.map +1 -0
  189. package/target/lib/tag/tag.element.test.d.ts +1 -0
  190. package/target/lib/tag/tag.element.test.js +9 -0
  191. package/target/lib/tag/tag.element.test.js.map +1 -0
  192. package/target/lib/textarea/textarea.element.d.ts +2 -2
  193. package/target/lib/textarea/textarea.element.js +19 -24
  194. package/target/lib/textarea/textarea.element.js.map +1 -1
  195. package/target/lib/textarea/textarea.element.test.d.ts +1 -0
  196. package/target/lib/textarea/{textarea.test.js → textarea.element.test.js} +14 -14
  197. package/target/lib/textarea/textarea.element.test.js.map +1 -0
  198. package/src/lib/breadcrumbs/breadcrumbs.test.ts +0 -21
  199. package/src/lib/button/button.test.ts +0 -17
  200. package/src/lib/button-group/button-group.test.ts +0 -15
  201. package/src/lib/collection/collection-item/collection-item.test.ts +0 -15
  202. package/src/lib/collection/collection.test.ts +0 -15
  203. package/src/lib/config/config.test.ts +0 -15
  204. package/src/lib/description/description.test.ts +0 -15
  205. package/src/lib/file-input/file-input-preview/file-input-preview.test.ts +0 -95
  206. package/src/lib/file-input/file-input.test.ts +0 -79
  207. package/src/lib/modal/modal-close/modal-close.test.ts +0 -15
  208. package/src/lib/modal/modal-heading/modal-heading.test.ts +0 -15
  209. package/src/lib/modal/modal.test.ts +0 -25
  210. package/src/lib/pagination/pagination.test.ts +0 -15
  211. package/src/lib/radio/radio-option/radio-option.test.ts +0 -20
  212. package/src/lib/radio/radio.test.ts +0 -174
  213. package/src/lib/range-slider/range-slider.test.ts +0 -52
  214. package/src/lib/search/search.test.ts +0 -81
  215. package/src/lib/summary-box/summary-box.test.ts +0 -15
  216. package/src/lib/tag/tag.test.ts +0 -15
  217. package/target/lib/accordion/accordion.test.d.ts +0 -1
  218. package/target/lib/accordion/accordion.test.js.map +0 -1
  219. package/target/lib/alert/alert.test.d.ts +0 -1
  220. package/target/lib/alert/alert.test.js.map +0 -1
  221. package/target/lib/breadcrumbs/breadcrumbs.test.d.ts +0 -2
  222. package/target/lib/breadcrumbs/breadcrumbs.test.js.map +0 -1
  223. package/target/lib/button/button.test.d.ts +0 -1
  224. package/target/lib/button/button.test.js +0 -12
  225. package/target/lib/button/button.test.js.map +0 -1
  226. package/target/lib/button-group/button-group.test.d.ts +0 -1
  227. package/target/lib/button-group/button-group.test.js +0 -9
  228. package/target/lib/button-group/button-group.test.js.map +0 -1
  229. package/target/lib/card/card.test.d.ts +0 -6
  230. package/target/lib/card/card.test.js.map +0 -1
  231. package/target/lib/checkbox/checkbox.test.d.ts +0 -1
  232. package/target/lib/checkbox/checkbox.test.js.map +0 -1
  233. package/target/lib/collection/collection-item/collection-item.test.d.ts +0 -1
  234. package/target/lib/collection/collection-item/collection-item.test.js +0 -9
  235. package/target/lib/collection/collection-item/collection-item.test.js.map +0 -1
  236. package/target/lib/collection/collection.test.d.ts +0 -1
  237. package/target/lib/collection/collection.test.js +0 -9
  238. package/target/lib/collection/collection.test.js.map +0 -1
  239. package/target/lib/combo-box/combo-box.test.d.ts +0 -3
  240. package/target/lib/combo-box/combo-box.test.js.map +0 -1
  241. package/target/lib/config/config.test.d.ts +0 -1
  242. package/target/lib/config/config.test.js +0 -9
  243. package/target/lib/config/config.test.js.map +0 -1
  244. package/target/lib/description/description.test.d.ts +0 -1
  245. package/target/lib/description/description.test.js +0 -9
  246. package/target/lib/description/description.test.js.map +0 -1
  247. package/target/lib/file-input/file-input-preview/file-input-preview.test.d.ts +0 -2
  248. package/target/lib/file-input/file-input-preview/file-input-preview.test.js.map +0 -1
  249. package/target/lib/file-input/file-input.test.d.ts +0 -1
  250. package/target/lib/file-input/file-input.test.js.map +0 -1
  251. package/target/lib/in-page-nav/in-page-nav.test.d.ts +0 -2
  252. package/target/lib/in-page-nav/in-page-nav.test.js.map +0 -1
  253. package/target/lib/input/input.test.js.map +0 -1
  254. package/target/lib/input-mask/input-mask.test.js.map +0 -1
  255. package/target/lib/modal/modal-close/modal-close.test.d.ts +0 -1
  256. package/target/lib/modal/modal-close/modal-close.test.js +0 -9
  257. package/target/lib/modal/modal-close/modal-close.test.js.map +0 -1
  258. package/target/lib/modal/modal-heading/modal-heading.test.d.ts +0 -1
  259. package/target/lib/modal/modal-heading/modal-heading.test.js +0 -9
  260. package/target/lib/modal/modal-heading/modal-heading.test.js.map +0 -1
  261. package/target/lib/modal/modal.test.d.ts +0 -3
  262. package/target/lib/modal/modal.test.js +0 -11
  263. package/target/lib/modal/modal.test.js.map +0 -1
  264. package/target/lib/pagination/pagination.test.d.ts +0 -1
  265. package/target/lib/pagination/pagination.test.js +0 -9
  266. package/target/lib/pagination/pagination.test.js.map +0 -1
  267. package/target/lib/process-list/process-list.test.d.ts +0 -2
  268. package/target/lib/process-list/process-list.test.js.map +0 -1
  269. package/target/lib/radio/radio-option/radio-option.test.d.ts +0 -2
  270. package/target/lib/radio/radio-option/radio-option.test.js +0 -11
  271. package/target/lib/radio/radio-option/radio-option.test.js.map +0 -1
  272. package/target/lib/radio/radio.test.d.ts +0 -2
  273. package/target/lib/radio/radio.test.js.map +0 -1
  274. package/target/lib/range-slider/range-slider.test.d.ts +0 -1
  275. package/target/lib/range-slider/range-slider.test.js +0 -25
  276. package/target/lib/range-slider/range-slider.test.js.map +0 -1
  277. package/target/lib/search/search.test.d.ts +0 -3
  278. package/target/lib/search/search.test.js +0 -52
  279. package/target/lib/search/search.test.js.map +0 -1
  280. package/target/lib/select/select.test.d.ts +0 -2
  281. package/target/lib/select/select.test.js.map +0 -1
  282. package/target/lib/services/icon.service.test.js.map +0 -1
  283. package/target/lib/side-nav/side-nav.test.d.ts +0 -3
  284. package/target/lib/side-nav/side-nav.test.js.map +0 -1
  285. package/target/lib/step-indicator/step-indicator.test.d.ts +0 -2
  286. package/target/lib/step-indicator/step-indicator.test.js.map +0 -1
  287. package/target/lib/summary-box/summary-box.test.d.ts +0 -1
  288. package/target/lib/summary-box/summary-box.test.js +0 -9
  289. package/target/lib/summary-box/summary-box.test.js.map +0 -1
  290. package/target/lib/tag/tag.test.d.ts +0 -1
  291. package/target/lib/tag/tag.test.js +0 -9
  292. package/target/lib/tag/tag.test.js.map +0 -1
  293. package/target/lib/textarea/textarea.test.d.ts +0 -1
  294. package/target/lib/textarea/textarea.test.js.map +0 -1
  295. /package/src/lib/input-mask/{input-mask.test.ts → input-mask.element.test.ts} +0 -0
  296. /package/src/lib/services/{icon.service.test.ts → icon.service.element.test.ts} +0 -0
  297. /package/target/lib/input/{input.test.d.ts → input.element.test.d.ts} +0 -0
  298. /package/target/lib/input-mask/{input-mask.test.d.ts → input-mask.element.test.d.ts} +0 -0
  299. /package/target/lib/services/{icon.service.test.d.ts → icon.service.element.test.d.ts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noctuatech/uswds",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
4
  "type": "module",
5
5
  "workspaces": [
6
6
  "packages/**"
@@ -103,10 +103,10 @@
103
103
  "license": "ISC",
104
104
  "description": "",
105
105
  "dependencies": {
106
- "@joist/di": "^4.2.3",
107
- "@joist/element": "^4.2.3",
108
- "@joist/observable": "^4.2.3",
109
- "@joist/templating": "^4.2.3",
106
+ "@joist/di": "^4.2.4-next.2",
107
+ "@joist/element": "^4.2.4-next.2",
108
+ "@joist/observable": "^4.2.4-next.2",
109
+ "@joist/templating": "^4.2.4-next.2",
110
110
  "tslib": "2.8.1"
111
111
  },
112
112
  "devDependencies": {
@@ -1,22 +1,21 @@
1
- import "./accordion.element.js";
1
+ import './accordion.element.js';
2
2
 
3
- import { assert, fixture, html } from "@open-wc/testing";
4
- import { screen } from "@testing-library/dom";
5
- import { userEvent } from "@testing-library/user-event";
3
+ import { assert, fixture, html } from '@open-wc/testing';
4
+ import { screen } from '@testing-library/dom';
5
+ import { userEvent } from '@testing-library/user-event';
6
6
 
7
- import type { USAAccordionElement } from "./accordion.element.js";
7
+ import type { USAAccordionElement } from './accordion.element.js';
8
8
 
9
- describe("usa-accordion", () => {
10
- it("should be accessible", async () => {
9
+ describe('usa-accordion', () => {
10
+ it('should be accessible', async () => {
11
11
  const accordion = await fixture<USAAccordionElement>(html`
12
12
  <usa-accordion id="first" name="ammendment">
13
13
  <h4 slot="heading">First Ammendment</h4>
14
14
 
15
15
  <div class="content">
16
- Congress shall make no law respecting an establishment of religion, or
17
- prohibiting the free exercise thereof; or abridging the freedom of
18
- speech, or of the press; or the right of the people peaceably to
19
- assemble, and to petition the Government for a redress of grievances.
16
+ Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof;
17
+ or abridging the freedom of speech, or of the press; or the right of the people peaceably to assemble, and to
18
+ petition the Government for a redress of grievances.
20
19
  </div>
21
20
  </usa-accordion>
22
21
  `);
@@ -24,44 +23,42 @@ describe("usa-accordion", () => {
24
23
  return assert.isAccessible(accordion);
25
24
  });
26
25
 
27
- it("should toggle the open state when clicked", async () => {
26
+ it('should toggle the open state when clicked', async () => {
28
27
  const accordion = await fixture<USAAccordionElement>(html`
29
28
  <usa-accordion id="first" name="ammendment">
30
29
  <h4 slot="heading">First Ammendment</h4>
31
30
 
32
31
  <div class="content">
33
- Congress shall make no law respecting an establishment of religion, or
34
- prohibiting the free exercise thereof; or abridging the freedom of
35
- speech, or of the press; or the right of the people peaceably to
36
- assemble, and to petition the Government for a redress of grievances.
32
+ Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof;
33
+ or abridging the freedom of speech, or of the press; or the right of the people peaceably to assemble, and to
34
+ petition the Government for a redress of grievances.
37
35
  </div>
38
36
  </usa-accordion>
39
37
  `);
40
38
 
41
- const heading = await screen.findByRole("heading");
42
- const content = accordion.querySelector<HTMLDivElement>(".content");
39
+ const heading = await screen.findByRole('heading');
40
+ const content = accordion.querySelector<HTMLDivElement>('.content');
43
41
 
44
42
  await userEvent.click(heading);
45
43
 
46
44
  assert.isTrue(content?.checkVisibility());
47
45
  });
48
46
 
49
- it("should toggle the open state when clicked", async () => {
47
+ it('should toggle the open state when clicked', async () => {
50
48
  const accordion = await fixture<USAAccordionElement>(html`
51
49
  <usa-accordion id="first" name="ammendment">
52
50
  <h4 slot="heading">First Ammendment</h4>
53
51
 
54
52
  <div class="content">
55
- Congress shall make no law respecting an establishment of religion, or
56
- prohibiting the free exercise thereof; or abridging the freedom of
57
- speech, or of the press; or the right of the people peaceably to
58
- assemble, and to petition the Government for a redress of grievances.
53
+ Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof;
54
+ or abridging the freedom of speech, or of the press; or the right of the people peaceably to assemble, and to
55
+ petition the Government for a redress of grievances.
59
56
  </div>
60
57
  </usa-accordion>
61
58
  `);
62
59
 
63
- const heading = await screen.findByRole("heading");
64
- const content = accordion.querySelector<HTMLDivElement>(".content");
60
+ const heading = await screen.findByRole('heading');
61
+ const content = accordion.querySelector<HTMLDivElement>('.content');
65
62
 
66
63
  assert.isFalse(content?.checkVisibility());
67
64
 
@@ -70,7 +67,7 @@ describe("usa-accordion", () => {
70
67
  assert.isTrue(content.checkVisibility());
71
68
  });
72
69
 
73
- it("should only allow a single accordion in a group to be open", async () => {
70
+ it('should only allow a single accordion in a group to be open', async () => {
74
71
  const el = await fixture(html`
75
72
  <section>
76
73
  <usa-accordion name="ammendment">
@@ -90,8 +87,8 @@ describe("usa-accordion", () => {
90
87
  </section>
91
88
  `);
92
89
 
93
- const headings = el.querySelectorAll("h4");
94
- const content = Array.from(el.querySelectorAll<HTMLDivElement>(".content"));
90
+ const headings = el.querySelectorAll('h4');
91
+ const content = Array.from(el.querySelectorAll<HTMLDivElement>('.content'));
95
92
 
96
93
  await userEvent.click(headings[0]);
97
94
 
@@ -115,7 +112,7 @@ describe("usa-accordion", () => {
115
112
  );
116
113
  });
117
114
 
118
- it("should not close accordion not in the same group", async () => {
115
+ it('should not close accordion not in the same group', async () => {
119
116
  const el = await fixture(html`
120
117
  <section>
121
118
  <usa-accordion name="ammendment">
@@ -135,8 +132,8 @@ describe("usa-accordion", () => {
135
132
  </section>
136
133
  `);
137
134
 
138
- const headings = el.querySelectorAll("h4");
139
- const content = Array.from(el.querySelectorAll<HTMLDivElement>(".content"));
135
+ const headings = el.querySelectorAll('h4');
136
+ const content = Array.from(el.querySelectorAll<HTMLDivElement>('.content'));
140
137
 
141
138
  await userEvent.click(headings[0]);
142
139
 
@@ -79,21 +79,21 @@ declare global {
79
79
  }
80
80
  `,
81
81
  html`
82
- <j-props>
83
- <details $.open="open">
82
+ <j-bind props="open">
83
+ <details>
84
84
  <summary>
85
85
  <slot name="heading"></slot>
86
86
 
87
- <j-props>
88
- <usa-icon $.icon="icon"></usa-icon>
89
- </j-props>
87
+ <j-bind props="icon">
88
+ <usa-icon></usa-icon>
89
+ </j-bind>
90
90
  </summary>
91
91
 
92
92
  <div class="content">
93
93
  <slot></slot>
94
94
  </div>
95
95
  </details>
96
- </j-props>
96
+ </j-bind>
97
97
  `,
98
98
  ],
99
99
  })
@@ -105,7 +105,9 @@ export class USAAccordionElement extends HTMLElement {
105
105
  @bind()
106
106
  accessor open = false;
107
107
 
108
- @bind((i) => (i.open ? 'remove' : 'add'))
108
+ @bind({
109
+ compute: (i) => (i.open ? 'remove' : 'add'),
110
+ })
109
111
  accessor icon: 'add' | 'remove' = 'add';
110
112
 
111
113
  @listen('click', 'summary')
@@ -1,10 +1,10 @@
1
- import "./alert.element.js";
1
+ import './alert.element.js';
2
2
 
3
- import { assert, fixture, html } from "@open-wc/testing";
3
+ import { assert, fixture, html } from '@open-wc/testing';
4
4
 
5
- import { USA_ALERT_TYPES } from "./alert-types.js";
5
+ import { USA_ALERT_TYPES } from './alert-types.js';
6
6
 
7
- describe("usa-alert", () => {
7
+ describe('usa-alert', () => {
8
8
  for (const alert of USA_ALERT_TYPES) {
9
9
  it(`should be accessible: ${alert}`, async () => {
10
10
  const form = await fixture(html`
@@ -12,8 +12,7 @@ describe("usa-alert", () => {
12
12
  <h3 slot="heading">Status</h3>
13
13
 
14
14
  Lorem ipsum dolor sit amet,&nbsp;
15
- <usa-link href="#">consectetur adipiscing</usa-link>&nbsp;elit, sed do
16
- eiusmod.
15
+ <usa-link href="#">consectetur adipiscing</usa-link>&nbsp;elit, sed do eiusmod.
17
16
  </usa-alert>
18
17
  `);
19
18
 
@@ -76,9 +76,9 @@ declare global {
76
76
  `,
77
77
  html`
78
78
  <div class="alert-heading">
79
- <j-props>
80
- <usa-icon $.icon="icon"></usa-icon>
81
- </j-props>
79
+ <j-bind props="icon">
80
+ <usa-icon></usa-icon>
81
+ </j-bind>
82
82
 
83
83
  <div>
84
84
  <slot id="heading" name="heading"></slot>
@@ -98,6 +98,8 @@ export class USAAlertElement extends HTMLElement {
98
98
  @observe()
99
99
  accessor type: USAAlertType = 'info';
100
100
 
101
- @bind((i) => USA_ALERT_CONFIG[i.type].icon)
101
+ @bind({
102
+ compute: (i) => USA_ALERT_CONFIG[i.type].icon,
103
+ })
102
104
  accessor icon: USAIcon = 'info';
103
105
  }
@@ -1,14 +1,14 @@
1
- import { attr, css, element, html } from "@joist/element";
2
- import { bind } from "@joist/templating";
1
+ import { attr, css, element, html } from '@joist/element';
2
+ import { bind } from '@joist/templating';
3
3
 
4
4
  declare global {
5
5
  interface HTMLElementTagNameMap {
6
- "usa-breadcrumb": USABreadcrumbElement;
6
+ 'usa-breadcrumb': USABreadcrumbElement;
7
7
  }
8
8
  }
9
9
 
10
10
  @element({
11
- tagName: "usa-breadcrumb",
11
+ tagName: 'usa-breadcrumb',
12
12
  shadowDom: [
13
13
  css`
14
14
  :host {
@@ -33,15 +33,15 @@ declare global {
33
33
  height: 1rem;
34
34
  width: 1.5rem;
35
35
  position: absolute;
36
- top: .075rem;
36
+ top: 0.075rem;
37
37
  }
38
38
  `,
39
39
  html`
40
- <j-props>
41
- <a $.href="href">
40
+ <j-bind props="href">
41
+ <a>
42
42
  <slot></slot>
43
43
  </a>
44
- </j-props>
44
+ </j-bind>
45
45
 
46
46
  <usa-icon icon="navigate_next"></usa-icon>
47
47
  `,
@@ -50,8 +50,8 @@ declare global {
50
50
  export class USABreadcrumbElement extends HTMLElement {
51
51
  @attr()
52
52
  @bind()
53
- accessor href = "";
53
+ accessor href = '';
54
54
 
55
55
  @attr()
56
- accessor role = "listitem";
56
+ accessor role = 'listitem';
57
57
  }
@@ -0,0 +1,23 @@
1
+ import './breadcrumbs.element.js';
2
+ import './breadcrumb/breadcrumb.element.js';
3
+
4
+ import { assert, fixture, html } from '@open-wc/testing';
5
+
6
+ import type { USABreadcrumbsElement } from './breadcrumbs.element.js';
7
+
8
+ describe('usa-breadcrumbs', () => {
9
+ it('should be accessible', async () => {
10
+ const breadcrumbs = await fixture<USABreadcrumbsElement>(html`
11
+ <usa-breadcrumbs>
12
+ <usa-breadcrumb href="/">Home</usa-breadcrumb>
13
+ <usa-breadcrumb href="/">Federal Contracting</usa-breadcrumb>
14
+ <usa-breadcrumb href="/">Contracting assistance programs</usa-breadcrumb>
15
+ <usa-breadcrumb
16
+ >Economically disadvantaged women-owned small business federal contracting program</usa-breadcrumb
17
+ >
18
+ </usa-breadcrumbs>
19
+ `);
20
+
21
+ return assert.isAccessible(breadcrumbs);
22
+ });
23
+ });
@@ -0,0 +1,15 @@
1
+ import './button.element.js';
2
+
3
+ import { assert, fixture, html } from '@open-wc/testing';
4
+
5
+ import { BUTTON_VARIANTS, type USAButtonElement } from './button.element.js';
6
+
7
+ describe('usa-button', () => {
8
+ for (const variant of BUTTON_VARIANTS) {
9
+ it('should be accessible', async () => {
10
+ const button = await fixture<USAButtonElement>(html` <usa-button variant=${variant}>Hello World</usa-button> `);
11
+
12
+ return assert.isAccessible(button);
13
+ });
14
+ }
15
+ });
@@ -1,28 +1,22 @@
1
- import "@joist/templating/define.js";
1
+ import '@joist/templating/define.js';
2
2
 
3
- import { attr, css, element, html, listen } from "@joist/element";
4
- import { bind } from "@joist/templating";
3
+ import { attr, css, element, html, listen } from '@joist/element';
4
+ import { bind } from '@joist/templating';
5
5
 
6
6
  declare global {
7
7
  interface HTMLElementTagNameMap {
8
- "usa-button": USAButtonElement;
8
+ 'usa-button': USAButtonElement;
9
9
  }
10
10
  }
11
11
 
12
- export const BUTTON_VARIANTS = [
13
- "primary",
14
- "secondary",
15
- "cool",
16
- "warm",
17
- "outline",
18
- ] as const;
12
+ export const BUTTON_VARIANTS = ['primary', 'secondary', 'cool', 'warm', 'outline'] as const;
19
13
 
20
14
  export type ButtonVariant = (typeof BUTTON_VARIANTS)[number];
21
15
 
22
16
  @element({
23
- tagName: "usa-button",
17
+ tagName: 'usa-button',
24
18
  shadowDomOpts: {
25
- mode: "open",
19
+ mode: 'open',
26
20
  delegatesFocus: true,
27
21
  },
28
22
  shadowDom: [
@@ -36,7 +30,8 @@ export type ButtonVariant = (typeof BUTTON_VARIANTS)[number];
36
30
  overflow: hidden;
37
31
  }
38
32
 
39
- button, a {
33
+ button,
34
+ a {
40
35
  box-sizing: border-box;
41
36
  font-size: 1.06rem;
42
37
  line-height: 0.9;
@@ -107,63 +102,63 @@ export type ButtonVariant = (typeof BUTTON_VARIANTS)[number];
107
102
  }
108
103
 
109
104
  /** Secondary */
110
- :host([variant="secondary"]) :is(button, a) {
105
+ :host([variant='secondary']) :is(button, a) {
111
106
  color: #fff;
112
107
  background-color: #d83933;
113
108
  }
114
109
 
115
- :host([variant="secondary"]) :is(button, a):hover {
110
+ :host([variant='secondary']) :is(button, a):hover {
116
111
  background-color: #b50909;
117
112
  }
118
113
 
119
- :host([variant="secondary"]) :is(button, a):active {
114
+ :host([variant='secondary']) :is(button, a):active {
120
115
  background-color: #8b0a03;
121
116
  }
122
117
 
123
118
  /** cool */
124
- :host([variant="cool"]) :is(button, a) {
119
+ :host([variant='cool']) :is(button, a) {
125
120
  color: #1b1b1b;
126
121
  background-color: #00bde3;
127
122
  }
128
123
 
129
- :host([variant="cool"]) :is(button, a):hover {
124
+ :host([variant='cool']) :is(button, a):hover {
130
125
  background-color: #28a0cb;
131
126
  }
132
127
 
133
- :host([variant="cool"]) :is(button, a):active {
128
+ :host([variant='cool']) :is(button, a):active {
134
129
  color: #fff;
135
130
  background-color: #07648d;
136
131
  }
137
132
 
138
133
  /** warm */
139
- :host([variant="warm"]) :is(button, a) {
134
+ :host([variant='warm']) :is(button, a) {
140
135
  color: #1b1b1b;
141
136
  background-color: #fa9441;
142
137
  }
143
138
 
144
- :host([variant="warm"]) :is(button, a):hover {
139
+ :host([variant='warm']) :is(button, a):hover {
145
140
  color: #fff;
146
141
  background-color: #c05600;
147
142
  }
148
143
 
149
- :host([variant="warm"]) :is(button, a):active {
144
+ :host([variant='warm']) :is(button, a):active {
150
145
  color: #fff;
151
146
  background-color: #775540;
152
147
  }
153
148
 
154
149
  /** outline */
155
- :host([variant="outline"]) :is(button, a) {
150
+ :host([variant='outline']) :is(button, a) {
156
151
  background-color: transparent;
157
152
  box-shadow: inset 0 0 0 2px #005ea2;
158
153
  color: #005ea2;
159
154
  }
160
155
 
161
- :host([variant="outline"]) :is(button, a):hover {
156
+ :host([variant='outline']) :is(button, a):hover {
162
157
  box-shadow: inset 0 0 0 2px #1a4480;
163
158
  color: #1a4480;
164
159
  }
165
160
 
166
- :host([variant="outline"]) :is(button, a):active {
161
+ :host([variant='outline']) :is(button, a):active {
167
162
  box-shadow: inset 0 0 0 2px #162e51;
168
163
  color: #162e51;
169
164
  }
@@ -171,19 +166,19 @@ export type ButtonVariant = (typeof BUTTON_VARIANTS)[number];
171
166
  html`
172
167
  <j-if bind="href">
173
168
  <template>
174
- <j-props>
175
- <a part="link" $href="href" $disabled="disabled" $target="target">
169
+ <j-bind props="href,target">
170
+ <a part="link">
176
171
  <slot></slot>
177
172
  </a>
178
- </j-props>
173
+ </j-bind>
179
174
  </template>
180
175
 
181
176
  <template else>
182
- <j-props>
183
- <button tabindex="0" part="button" $type="type" $disabled="disabled" $value="value">
177
+ <j-bind props="value,type,disabled">
178
+ <button tabindex="0" part="button">
184
179
  <slot></slot>
185
180
  </button>
186
- </j-props>
181
+ </j-bind>
187
182
  </template>
188
183
  </j-if>
189
184
  `,
@@ -194,32 +189,32 @@ export class USAButtonElement extends HTMLElement {
194
189
 
195
190
  @attr()
196
191
  @bind()
197
- accessor type: "button" | "submit" | "reset" = "button";
192
+ accessor type: 'button' | 'submit' | 'reset' = 'button';
198
193
 
199
194
  @attr()
200
195
  @bind()
201
196
  accessor disabled = false;
202
197
 
203
198
  @attr()
204
- accessor variant: ButtonVariant = "primary";
199
+ accessor variant: ButtonVariant = 'primary';
205
200
 
206
201
  @attr()
207
202
  @bind()
208
- accessor value = "";
203
+ accessor value = '';
209
204
 
210
205
  @attr()
211
206
  @bind()
212
- accessor href = "";
207
+ accessor href = '';
213
208
 
214
209
  @attr()
215
210
  @bind()
216
- accessor target = "";
211
+ accessor target = '';
217
212
 
218
213
  accessor tabIndex = 0;
219
214
 
220
215
  #internals = this.attachInternals();
221
216
 
222
- @listen("click")
217
+ @listen('click')
223
218
  onInternalClick() {
224
219
  this.#handleForm();
225
220
  }
@@ -228,17 +223,17 @@ export class USAButtonElement extends HTMLElement {
228
223
  const { form } = this.#internals;
229
224
 
230
225
  if (form) {
231
- if (this.type === "submit") {
226
+ if (this.type === 'submit') {
232
227
  this.#submit(form);
233
- } else if (this.type === "reset") {
228
+ } else if (this.type === 'reset') {
234
229
  form.reset();
235
230
  }
236
231
  }
237
232
  }
238
233
 
239
234
  #submit(form: HTMLFormElement) {
240
- const btn = document.createElement("button");
241
- btn.type = "submit";
235
+ const btn = document.createElement('button');
236
+ btn.type = 'submit';
242
237
  form.append(btn);
243
238
 
244
239
  btn.click();
@@ -0,0 +1,13 @@
1
+ import './button-group.element.js';
2
+
3
+ import { assert, fixture, html } from '@open-wc/testing';
4
+
5
+ import type { USAButtonGroupElement } from './button-group.element.js';
6
+
7
+ describe('usa-button-group', () => {
8
+ it('should be accessible', async () => {
9
+ const buttonGroup = await fixture<USAButtonGroupElement>(html` <usa-button-group>Hello World</usa-button-group> `);
10
+
11
+ return assert.isAccessible(buttonGroup);
12
+ });
13
+ });
@@ -1,16 +1,16 @@
1
- import "./card.element.js";
2
- import "./card-body/card-body.element.js";
3
- import "./card-footer/card-footer.element.js";
4
- import "./card-group/card-group.element.js";
5
- import "./card-header/card-header.element.js";
6
- import "./card-media/card-media.element.js";
1
+ import './card.element.js';
2
+ import './card-body/card-body.element.js';
3
+ import './card-footer/card-footer.element.js';
4
+ import './card-group/card-group.element.js';
5
+ import './card-header/card-header.element.js';
6
+ import './card-media/card-media.element.js';
7
7
 
8
- import { assert, fixture, html } from "@open-wc/testing";
8
+ import { assert, fixture, html } from '@open-wc/testing';
9
9
 
10
- import type { USACardElement } from "./card.element.js";
10
+ import type { USACardElement } from './card.element.js';
11
11
 
12
- describe("usa-card", () => {
13
- it("should be accessible", async () => {
12
+ describe('usa-card', () => {
13
+ it('should be accessible', async () => {
14
14
  const card = await fixture<USACardElement>(html`
15
15
  <usa-card-group>
16
16
  <usa-card>
@@ -21,8 +21,8 @@ describe("usa-card", () => {
21
21
  <usa-card-header>Card with media</usa-card-header>
22
22
 
23
23
  <usa-card-body>
24
- Lorem ipsum dolor sit amet consectetur adipisicing elit. Facilis
25
- earum tenetur quo cupiditate, eaque qui officia recusandae.
24
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Facilis earum tenetur quo cupiditate, eaque qui
25
+ officia recusandae.
26
26
  </usa-card-body>
27
27
 
28
28
  <usa-card-footer>