@re-code/aurora 0.2.0 → 0.3.0

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 (320) hide show
  1. package/README.md +1 -1
  2. package/dist/aurora/aurora.esm.js +1 -1
  3. package/dist/aurora/{p-8ed72e5b.entry.js → p-01ff4d34.entry.js} +1 -1
  4. package/dist/aurora/{p-c3668073.entry.js → p-0554ffea.entry.js} +1 -1
  5. package/dist/aurora/{p-278d3434.entry.js → p-0a0a2bfe.entry.js} +1 -1
  6. package/dist/aurora/{p-e1c97234.entry.js → p-0a7e9e8e.entry.js} +1 -1
  7. package/dist/aurora/{p-c330982c.entry.js → p-1670a9bd.entry.js} +1 -1
  8. package/dist/aurora/{p-efd60427.entry.js → p-17c6de2c.entry.js} +1 -1
  9. package/dist/aurora/{p-a87dc1d3.entry.js → p-24ff90e0.entry.js} +1 -1
  10. package/dist/aurora/p-27da7b8a.entry.js +1 -0
  11. package/dist/aurora/p-380d8ebe.entry.js +1 -0
  12. package/dist/aurora/{p-a1e257c7.entry.js → p-3cfccef1.entry.js} +1 -1
  13. package/dist/aurora/{p-e72126a2.entry.js → p-4fd71d14.entry.js} +1 -1
  14. package/dist/aurora/{p-89b66c7a.entry.js → p-5606ed9c.entry.js} +1 -1
  15. package/dist/aurora/p-56fc4315.entry.js +1 -0
  16. package/dist/aurora/{p-685b9e53.entry.js → p-5a027df1.entry.js} +1 -1
  17. package/dist/aurora/{p-487df7d8.entry.js → p-5dd73182.entry.js} +1 -1
  18. package/dist/aurora/{p-17e65032.entry.js → p-62d79933.entry.js} +1 -1
  19. package/dist/aurora/p-6a1363da.entry.js +1 -0
  20. package/dist/aurora/{p-fd4e9cdd.entry.js → p-6e9c8e27.entry.js} +1 -1
  21. package/dist/aurora/{p-31a86367.entry.js → p-742abb2c.entry.js} +1 -1
  22. package/dist/aurora/{p-40bb52c3.entry.js → p-7a9bc20f.entry.js} +1 -1
  23. package/dist/aurora/{p-35edd036.entry.js → p-7cc6bb71.entry.js} +1 -1
  24. package/dist/aurora/{p-689f37db.entry.js → p-7fa0ee48.entry.js} +1 -1
  25. package/dist/aurora/{p-ee2ea46e.entry.js → p-815611f9.entry.js} +1 -1
  26. package/dist/aurora/{p-a8e984e1.entry.js → p-8800c466.entry.js} +1 -1
  27. package/dist/aurora/{p-5d2a88ca.entry.js → p-9e9377b5.entry.js} +1 -1
  28. package/dist/aurora/p-DMeUBbqF.js +7 -0
  29. package/dist/aurora/{p-DXbj-yic.js → p-DNpzZvak.js} +1 -1
  30. package/dist/aurora/p-DjW6oMgu.js +7 -0
  31. package/dist/aurora/{p-DzNA1eDU.js → p-DqAwSryz.js} +1 -1
  32. package/dist/aurora/p-NvNa2Iiu.js +1 -0
  33. package/dist/aurora/p-a376a248.entry.js +1 -0
  34. package/dist/aurora/{p-0608e910.entry.js → p-a63d1f80.entry.js} +1 -1
  35. package/dist/aurora/p-b0ebcc51.entry.js +1 -0
  36. package/dist/aurora/p-be98a1d7.entry.js +1 -0
  37. package/dist/aurora/{p-ed998b0c.entry.js → p-bf922703.entry.js} +1 -1
  38. package/dist/aurora/{p-ee4475a6.entry.js → p-c1422894.entry.js} +1 -1
  39. package/dist/aurora/{p-372a3416.entry.js → p-c2164ffe.entry.js} +1 -1
  40. package/dist/aurora/{p-2a16d544.entry.js → p-cb63ca43.entry.js} +1 -1
  41. package/dist/aurora/p-cc1015fe.entry.js +1 -0
  42. package/dist/aurora/{p-88b72de7.entry.js → p-cf16464e.entry.js} +1 -1
  43. package/dist/aurora/p-cfa0166b.entry.js +1 -0
  44. package/dist/aurora/{p-e7c81a6b.entry.js → p-d85e1d60.entry.js} +1 -1
  45. package/dist/aurora/{p-64229ad2.entry.js → p-f176be8b.entry.js} +1 -1
  46. package/dist/aurora/{p-bd1f6486.entry.js → p-f3383f3c.entry.js} +1 -1
  47. package/dist/aurora/p-f5d3aefa.entry.js +1 -0
  48. package/dist/aurora/{p-038b2190.entry.js → p-f85687a5.entry.js} +1 -1
  49. package/dist/aurora/{p-546a2f69.entry.js → p-fe143404.entry.js} +1 -1
  50. package/dist/cjs/au-alert.cjs.entry.js +1 -1
  51. package/dist/cjs/au-breadcrumb-item.cjs.entry.js +1 -1
  52. package/dist/cjs/au-breadcrumb.cjs.entry.js +1 -1
  53. package/dist/cjs/au-checkbox.cjs.entry.js +4 -4
  54. package/dist/cjs/au-combobox.cjs.entry.js +6 -6
  55. package/dist/cjs/au-container.cjs.entry.js +1 -1
  56. package/dist/cjs/au-dialog.cjs.entry.js +4 -4
  57. package/dist/cjs/au-divider.cjs.entry.js +1 -1
  58. package/dist/cjs/au-field.cjs.entry.js +1 -1
  59. package/dist/cjs/{au-icon-D0L9Wwy0.js → au-icon-0-khGfX2.js} +1 -1
  60. package/dist/cjs/au-icon.cjs.entry.js +1 -1
  61. package/dist/cjs/au-input.cjs.entry.js +6 -6
  62. package/dist/cjs/au-kbd.cjs.entry.js +355 -0
  63. package/dist/cjs/au-list-item.cjs.entry.js +195 -0
  64. package/dist/cjs/au-list.cjs.entry.js +78 -0
  65. package/dist/cjs/au-menu-item.cjs.entry.js +1 -1
  66. package/dist/cjs/au-menu.cjs.entry.js +1 -1
  67. package/dist/cjs/au-nav-link.cjs.entry.js +1 -1
  68. package/dist/cjs/au-navbar.cjs.entry.js +4 -4
  69. package/dist/cjs/au-number-input.cjs.entry.js +4 -4
  70. package/dist/cjs/au-popover.cjs.entry.js +1 -1
  71. package/dist/cjs/au-progress.cjs.entry.js +107 -0
  72. package/dist/cjs/au-radio-group.cjs.entry.js +3 -3
  73. package/dist/cjs/au-radio.cjs.entry.js +1 -1
  74. package/dist/cjs/au-segmented-control.cjs.entry.js +3 -3
  75. package/dist/cjs/au-segmented-option.cjs.entry.js +1 -1
  76. package/dist/cjs/au-select.cjs.entry.js +4 -4
  77. package/dist/cjs/au-sidebar-nav.cjs.entry.js +1 -1
  78. package/dist/cjs/au-skeleton.cjs.entry.js +106 -0
  79. package/dist/cjs/au-slider.cjs.entry.js +3 -3
  80. package/dist/cjs/au-splitter.cjs.entry.js +2 -2
  81. package/dist/cjs/au-stat.cjs.entry.js +262 -0
  82. package/dist/cjs/au-switch.cjs.entry.js +4 -4
  83. package/dist/cjs/au-tab-panel.cjs.entry.js +1 -1
  84. package/dist/cjs/au-tab.cjs.entry.js +1 -1
  85. package/dist/cjs/au-table.cjs.entry.js +337 -0
  86. package/dist/cjs/au-tabs.cjs.entry.js +4 -4
  87. package/dist/cjs/au-textarea.cjs.entry.js +3 -3
  88. package/dist/cjs/au-toast-region.cjs.entry.js +1 -1
  89. package/dist/cjs/au-toast.cjs.entry.js +1 -1
  90. package/dist/cjs/au-toc.cjs.entry.js +1 -1
  91. package/dist/cjs/au-tooltip.cjs.entry.js +1 -1
  92. package/dist/cjs/aurora.cjs.js +1 -1
  93. package/dist/cjs/{icon-loader-DyRasOnf.js → icon-loader-Dij7pYkP.js} +3 -1
  94. package/dist/cjs/loader.cjs.js +1 -1
  95. package/dist/cjs/trending-down-BKjmYE1H.js +19 -0
  96. package/dist/cjs/trending-up-CoWuXxqz.js +19 -0
  97. package/dist/collection/collection-manifest.json +7 -0
  98. package/dist/collection/components/data-display/au-kbd/au-kbd.constants.js +85 -0
  99. package/dist/collection/components/data-display/au-kbd/au-kbd.css +98 -0
  100. package/dist/collection/components/data-display/au-kbd/au-kbd.js +189 -0
  101. package/dist/collection/components/data-display/au-kbd/au-kbd.types.js +1 -0
  102. package/dist/collection/components/data-display/au-kbd/index.js +2 -0
  103. package/dist/collection/components/data-display/au-kbd/internal/describe.js +67 -0
  104. package/dist/collection/components/data-display/au-kbd/internal/parse.js +85 -0
  105. package/dist/collection/components/data-display/au-kbd/internal/platform.js +19 -0
  106. package/dist/collection/components/data-display/au-list/au-list.constants.js +8 -0
  107. package/dist/collection/components/data-display/au-list/au-list.css +30 -0
  108. package/dist/collection/components/data-display/au-list/au-list.js +132 -0
  109. package/dist/collection/components/data-display/au-list/au-list.types.js +1 -0
  110. package/dist/collection/components/data-display/au-list/index.js +2 -0
  111. package/dist/collection/components/data-display/au-list-item/au-list-item.css +196 -0
  112. package/dist/collection/components/data-display/au-list-item/au-list-item.js +305 -0
  113. package/dist/collection/components/data-display/au-list-item/index.js +1 -0
  114. package/dist/collection/components/data-display/au-list-item/internal/interactive-content.js +29 -0
  115. package/dist/collection/components/data-display/au-stat/au-stat.constants.js +44 -0
  116. package/dist/collection/components/data-display/au-stat/au-stat.css +139 -0
  117. package/dist/collection/components/data-display/au-stat/au-stat.js +491 -0
  118. package/dist/collection/components/data-display/au-stat/au-stat.types.js +1 -0
  119. package/dist/collection/components/data-display/au-stat/index.js +2 -0
  120. package/dist/collection/components/data-display/au-stat/internal/announcement.js +13 -0
  121. package/dist/collection/components/data-display/au-table/au-table.constants.js +21 -0
  122. package/dist/collection/components/data-display/au-table/au-table.css +20 -0
  123. package/dist/collection/components/data-display/au-table/au-table.js +482 -0
  124. package/dist/collection/components/data-display/au-table/au-table.types.js +1 -0
  125. package/dist/collection/components/data-display/au-table/index.js +2 -0
  126. package/dist/collection/components/data-display/au-table/internal/scroller-label.js +11 -0
  127. package/dist/collection/components/data-display/au-table/internal/sort.js +17 -0
  128. package/dist/collection/components/feedback/au-alert/au-alert.js +1 -1
  129. package/dist/collection/components/feedback/au-progress/au-progress.constants.js +38 -0
  130. package/dist/collection/components/feedback/au-progress/au-progress.css +201 -0
  131. package/dist/collection/components/feedback/au-progress/au-progress.js +226 -0
  132. package/dist/collection/components/feedback/au-progress/au-progress.types.js +1 -0
  133. package/dist/collection/components/feedback/au-progress/index.js +2 -0
  134. package/dist/collection/components/feedback/au-skeleton/au-skeleton.constants.js +33 -0
  135. package/dist/collection/components/feedback/au-skeleton/au-skeleton.css +108 -0
  136. package/dist/collection/components/feedback/au-skeleton/au-skeleton.js +159 -0
  137. package/dist/collection/components/feedback/au-skeleton/au-skeleton.types.js +1 -0
  138. package/dist/collection/components/feedback/au-skeleton/index.js +2 -0
  139. package/dist/collection/components/feedback/au-toast/au-toast.js +1 -1
  140. package/dist/collection/components/feedback/au-toast-region/au-toast-region.js +1 -1
  141. package/dist/collection/components/forms/au-checkbox/au-checkbox.js +4 -4
  142. package/dist/collection/components/forms/au-combobox/au-combobox.js +6 -6
  143. package/dist/collection/components/forms/au-field/au-field.js +1 -1
  144. package/dist/collection/components/forms/au-input/au-input.js +6 -6
  145. package/dist/collection/components/forms/au-number-input/au-number-input.js +4 -4
  146. package/dist/collection/components/forms/au-radio/au-radio.js +1 -1
  147. package/dist/collection/components/forms/au-radio-group/au-radio-group.js +3 -3
  148. package/dist/collection/components/forms/au-segmented-control/au-segmented-control.js +3 -3
  149. package/dist/collection/components/forms/au-segmented-option/au-segmented-option.js +1 -1
  150. package/dist/collection/components/forms/au-select/au-select.js +4 -4
  151. package/dist/collection/components/forms/au-slider/au-slider.js +3 -3
  152. package/dist/collection/components/forms/au-switch/au-switch.js +4 -4
  153. package/dist/collection/components/forms/au-textarea/au-textarea.js +3 -3
  154. package/dist/collection/components/layout/au-container/au-container.js +1 -1
  155. package/dist/collection/components/layout/au-divider/au-divider.js +1 -1
  156. package/dist/collection/components/layout/au-splitter/au-splitter.js +2 -2
  157. package/dist/collection/components/navigation/au-breadcrumb/au-breadcrumb.js +1 -1
  158. package/dist/collection/components/navigation/au-breadcrumb-item/au-breadcrumb-item.js +1 -1
  159. package/dist/collection/components/navigation/au-nav-link/au-nav-link.js +1 -1
  160. package/dist/collection/components/navigation/au-navbar/au-navbar.js +4 -4
  161. package/dist/collection/components/navigation/au-sidebar-nav/au-sidebar-nav.js +1 -1
  162. package/dist/collection/components/navigation/au-tab/au-tab.js +1 -1
  163. package/dist/collection/components/navigation/au-tab-panel/au-tab-panel.js +1 -1
  164. package/dist/collection/components/navigation/au-tabs/au-tabs.js +4 -4
  165. package/dist/collection/components/navigation/au-toc/au-toc.js +1 -1
  166. package/dist/collection/components/overlays/au-dialog/au-dialog.js +4 -4
  167. package/dist/collection/components/overlays/au-menu/au-menu.js +1 -1
  168. package/dist/collection/components/overlays/au-menu-item/au-menu-item.js +1 -1
  169. package/dist/collection/components/overlays/au-popover/au-popover.js +1 -1
  170. package/dist/collection/components/overlays/au-tooltip/au-tooltip.js +1 -1
  171. package/dist/collection/components/primitives/au-icon/core-icons.js +2 -0
  172. package/dist/components/au-alert.js +1 -1
  173. package/dist/components/au-avatar.js +1 -1
  174. package/dist/components/au-breadcrumb-item.js +1 -1
  175. package/dist/components/au-breadcrumb.js +1 -1
  176. package/dist/components/au-checkbox.js +1 -1
  177. package/dist/components/au-chip.js +1 -1
  178. package/dist/components/au-code-block.js +1 -1
  179. package/dist/components/au-combobox.js +1 -1
  180. package/dist/components/au-container.js +1 -1
  181. package/dist/components/au-dialog.js +1 -1
  182. package/dist/components/au-divider.js +1 -1
  183. package/dist/components/au-field.js +1 -1
  184. package/dist/components/au-icon.js +1 -1
  185. package/dist/components/au-input.js +1 -1
  186. package/dist/components/au-kbd.d.ts +11 -0
  187. package/dist/components/au-kbd.js +1 -0
  188. package/dist/components/au-list-item.d.ts +11 -0
  189. package/dist/components/au-list-item.js +1 -0
  190. package/dist/components/au-list.d.ts +11 -0
  191. package/dist/components/au-list.js +1 -0
  192. package/dist/components/au-menu-item.js +1 -1
  193. package/dist/components/au-menu.js +1 -1
  194. package/dist/components/au-nav-link.js +1 -1
  195. package/dist/components/au-navbar.js +1 -1
  196. package/dist/components/au-number-input.js +1 -1
  197. package/dist/components/au-popover.js +1 -1
  198. package/dist/components/au-progress.d.ts +11 -0
  199. package/dist/components/au-progress.js +1 -0
  200. package/dist/components/au-radio-group.js +1 -1
  201. package/dist/components/au-radio.js +1 -1
  202. package/dist/components/au-segmented-control.js +1 -1
  203. package/dist/components/au-segmented-option.js +1 -1
  204. package/dist/components/au-select.js +1 -1
  205. package/dist/components/au-sidebar-nav.js +1 -1
  206. package/dist/components/au-skeleton.d.ts +11 -0
  207. package/dist/components/au-skeleton.js +1 -0
  208. package/dist/components/au-slider.js +1 -1
  209. package/dist/components/au-splitter.js +1 -1
  210. package/dist/components/au-stat.d.ts +11 -0
  211. package/dist/components/au-stat.js +1 -0
  212. package/dist/components/au-switch.js +1 -1
  213. package/dist/components/au-tab-panel.js +1 -1
  214. package/dist/components/au-tab.js +1 -1
  215. package/dist/components/au-table.d.ts +11 -0
  216. package/dist/components/au-table.js +1 -0
  217. package/dist/components/au-tabs.js +1 -1
  218. package/dist/components/au-textarea.js +1 -1
  219. package/dist/components/au-toast-region.js +1 -1
  220. package/dist/components/au-toast.js +1 -1
  221. package/dist/components/au-toc.js +1 -1
  222. package/dist/components/au-tooltip.js +1 -1
  223. package/dist/components/p-B5BhPkwP.js +1 -0
  224. package/dist/components/p-DMeUBbqF.js +7 -0
  225. package/dist/components/p-DjW6oMgu.js +7 -0
  226. package/dist/components/{p-DzNA1eDU.js → p-DqAwSryz.js} +1 -1
  227. package/dist/components/{p-DAqsVCAy.js → p-Dw0zb4x_.js} +1 -1
  228. package/dist/components/{p-DIL-tsh4.js → p-ZpauIcNt.js} +1 -1
  229. package/dist/custom-elements.json +1338 -66
  230. package/dist/esm/au-alert.entry.js +1 -1
  231. package/dist/esm/au-breadcrumb-item.entry.js +1 -1
  232. package/dist/esm/au-breadcrumb.entry.js +1 -1
  233. package/dist/esm/au-checkbox.entry.js +4 -4
  234. package/dist/esm/au-code-block.entry.js +1 -1
  235. package/dist/esm/au-combobox.entry.js +7 -7
  236. package/dist/esm/au-container.entry.js +1 -1
  237. package/dist/esm/au-dialog.entry.js +4 -4
  238. package/dist/esm/au-divider.entry.js +1 -1
  239. package/dist/esm/au-field.entry.js +1 -1
  240. package/dist/esm/{au-icon-B17psn7x.js → au-icon-6iJTkDID.js} +1 -1
  241. package/dist/esm/au-icon.entry.js +1 -1
  242. package/dist/esm/au-input.entry.js +6 -6
  243. package/dist/esm/au-kbd.entry.js +353 -0
  244. package/dist/esm/au-list-item.entry.js +193 -0
  245. package/dist/esm/au-list.entry.js +76 -0
  246. package/dist/esm/au-menu-item.entry.js +1 -1
  247. package/dist/esm/au-menu.entry.js +1 -1
  248. package/dist/esm/au-nav-link.entry.js +1 -1
  249. package/dist/esm/au-navbar.entry.js +4 -4
  250. package/dist/esm/au-number-input.entry.js +4 -4
  251. package/dist/esm/au-popover.entry.js +1 -1
  252. package/dist/esm/au-progress.entry.js +105 -0
  253. package/dist/esm/au-radio-group.entry.js +3 -3
  254. package/dist/esm/au-radio.entry.js +1 -1
  255. package/dist/esm/au-segmented-control.entry.js +3 -3
  256. package/dist/esm/au-segmented-option.entry.js +1 -1
  257. package/dist/esm/au-select.entry.js +4 -4
  258. package/dist/esm/au-sidebar-nav.entry.js +1 -1
  259. package/dist/esm/au-skeleton.entry.js +104 -0
  260. package/dist/esm/au-slider.entry.js +3 -3
  261. package/dist/esm/au-splitter.entry.js +2 -2
  262. package/dist/esm/au-stat.entry.js +260 -0
  263. package/dist/esm/au-switch.entry.js +4 -4
  264. package/dist/esm/au-tab-panel.entry.js +1 -1
  265. package/dist/esm/au-tab.entry.js +1 -1
  266. package/dist/esm/au-table.entry.js +335 -0
  267. package/dist/esm/au-tabs.entry.js +4 -4
  268. package/dist/esm/au-textarea.entry.js +3 -3
  269. package/dist/esm/au-toast-region.entry.js +2 -2
  270. package/dist/esm/au-toast.entry.js +1 -1
  271. package/dist/esm/au-toc.entry.js +1 -1
  272. package/dist/esm/au-tooltip.entry.js +1 -1
  273. package/dist/esm/aurora.js +1 -1
  274. package/dist/esm/{icon-loader-CqLCmu4h.js → icon-loader-B2WSNZ27.js} +3 -1
  275. package/dist/esm/{live-announcer-CXd2OhYs.js → live-announcer-IAjNBWYI.js} +1 -1
  276. package/dist/esm/loader.js +1 -1
  277. package/dist/esm/trending-down-DjW6oMgu.js +17 -0
  278. package/dist/esm/trending-up-DMeUBbqF.js +17 -0
  279. package/dist/styles.css +139 -0
  280. package/dist/types/components/data-display/au-kbd/au-kbd.constants.d.ts +41 -0
  281. package/dist/types/components/data-display/au-kbd/au-kbd.d.ts +36 -0
  282. package/dist/types/components/data-display/au-kbd/au-kbd.types.d.ts +1 -0
  283. package/dist/types/components/data-display/au-kbd/index.d.ts +3 -0
  284. package/dist/types/components/data-display/au-kbd/internal/describe.d.ts +13 -0
  285. package/dist/types/components/data-display/au-kbd/internal/parse.d.ts +18 -0
  286. package/dist/types/components/data-display/au-kbd/internal/platform.d.ts +13 -0
  287. package/dist/types/components/data-display/au-list/au-list.constants.d.ts +8 -0
  288. package/dist/types/components/data-display/au-list/au-list.d.ts +29 -0
  289. package/dist/types/components/data-display/au-list/au-list.types.d.ts +1 -0
  290. package/dist/types/components/data-display/au-list/index.d.ts +3 -0
  291. package/dist/types/components/data-display/au-list-item/au-list-item.d.ts +61 -0
  292. package/dist/types/components/data-display/au-list-item/index.d.ts +1 -0
  293. package/dist/types/components/data-display/au-list-item/internal/interactive-content.d.ts +2 -0
  294. package/dist/types/components/data-display/au-stat/au-stat.constants.d.ts +44 -0
  295. package/dist/types/components/data-display/au-stat/au-stat.d.ts +67 -0
  296. package/dist/types/components/data-display/au-stat/au-stat.types.d.ts +1 -0
  297. package/dist/types/components/data-display/au-stat/index.d.ts +3 -0
  298. package/dist/types/components/data-display/au-stat/internal/announcement.d.ts +16 -0
  299. package/dist/types/components/data-display/au-table/au-table.constants.d.ts +26 -0
  300. package/dist/types/components/data-display/au-table/au-table.d.ts +86 -0
  301. package/dist/types/components/data-display/au-table/au-table.types.d.ts +1 -0
  302. package/dist/types/components/data-display/au-table/index.d.ts +3 -0
  303. package/dist/types/components/data-display/au-table/internal/scroller-label.d.ts +9 -0
  304. package/dist/types/components/data-display/au-table/internal/sort.d.ts +11 -0
  305. package/dist/types/components/feedback/au-progress/au-progress.constants.d.ts +31 -0
  306. package/dist/types/components/feedback/au-progress/au-progress.d.ts +32 -0
  307. package/dist/types/components/feedback/au-progress/au-progress.types.d.ts +1 -0
  308. package/dist/types/components/feedback/au-progress/index.d.ts +3 -0
  309. package/dist/types/components/feedback/au-skeleton/au-skeleton.constants.d.ts +27 -0
  310. package/dist/types/components/feedback/au-skeleton/au-skeleton.d.ts +31 -0
  311. package/dist/types/components/feedback/au-skeleton/au-skeleton.types.d.ts +1 -0
  312. package/dist/types/components/feedback/au-skeleton/index.d.ts +3 -0
  313. package/dist/types/components.d.ts +712 -0
  314. package/dist/types/vue.d.ts +7 -0
  315. package/package.json +53 -1
  316. package/dist/aurora/p-746825ce.entry.js +0 -1
  317. package/dist/aurora/p-CoyAdNcI.js +0 -1
  318. package/dist/aurora/p-b2feddb2.entry.js +0 -1
  319. package/dist/aurora/p-f89bde2b.entry.js +0 -1
  320. package/dist/components/p-M21eKzKU.js +0 -1
@@ -0,0 +1,20 @@
1
+ :host {
2
+ display: block;
3
+ }
4
+
5
+ [part=scroller] {
6
+ max-block-size: var(--aurora-table-max-block-size, none);
7
+ overflow: auto;
8
+ }
9
+
10
+ [part=scroller]:focus-visible {
11
+ outline: var(--aurora-focus-ring-width, 2px) solid var(--aurora-table-focus-ring-color, var(--aurora-focus-ring-color, Highlight));
12
+ outline-offset: calc(-1 * var(--aurora-focus-ring-width, 2px));
13
+ }
14
+
15
+ @media print {
16
+ [part=scroller] {
17
+ max-block-size: none;
18
+ overflow: visible;
19
+ }
20
+ }
@@ -0,0 +1,482 @@
1
+ import { Host, h, } from "@stencil/core";
2
+ import { observeMutations, observeSize } from "../../../shared/observers/index.js";
3
+ import { warnOncePerDocument } from "../../../shared/warn-once.js";
4
+ import { TABLE_SIZE, TABLE_SORT_ATTRIBUTE, TABLE_SORT_DIRECTION, isTableSize, isTableSortDirection, } from "./au-table.constants.js";
5
+ import { resolveScrollerLabel } from "./internal/scroller-label.js";
6
+ import { nextSort } from "./internal/sort.js";
7
+ /**
8
+ * An enhancer for a consumer-written native `<table>` (spec phase5-step9-table, TB-D1). The shadow
9
+ * root is only a scroller around the default slot, so the table stays one light-DOM subtree and the
10
+ * component never creates, moves or removes a node in it. The only attribute it writes there is
11
+ * `aria-sort` on the sortable headers (TB-D6). It never reorders rows: the consumer sorts in the
12
+ * `au-sort` handler (TB-D8).
13
+ *
14
+ * @slot - One `<table>`.
15
+ * @part scroller - The scroll container around the table. It is a named, focusable group only while it overflows.
16
+ */
17
+ export class AuTable {
18
+ host;
19
+ /** Key of the sorted column (the `data-table-sort` value of its header). Unset: no column is sorted. */
20
+ sortKey = undefined;
21
+ /** Direction of the sorted column. An unsupported value is ascending and warns once. */
22
+ sortDirection = TABLE_SORT_DIRECTION.ascending;
23
+ /** Keeps the header row visible while the table scrolls inside a scroller with a bounded block size. */
24
+ stickyHeader = false;
25
+ /** Gives every other body row a stripe background. */
26
+ striped = false;
27
+ /** Cell density: `small` or `medium`. Unsupported values render `medium` and warn once. */
28
+ size = TABLE_SIZE.medium;
29
+ /** Name of the scroll region while it overflows. Blank falls back to the caption text, then to `Table`. */
30
+ label = undefined;
31
+ /**
32
+ * A user activation of a sortable header changed the sort. `detail` is the new state, already
33
+ * written to `sortKey` and `sortDirection`. Programmatic writes of those properties are silent.
34
+ * The component never reorders the rows: sort the data or the DOM in the handler.
35
+ */
36
+ auSort;
37
+ /** True while the scroller overflows (or still has focus after it stopped): it is then a focusable group. */
38
+ scrollable = false;
39
+ /** The caption text, re-read on every table mutation: it names the scroller. */
40
+ captionText = '';
41
+ loaded = false;
42
+ table;
43
+ slotElement;
44
+ scroller;
45
+ scrollerFocused = false;
46
+ stopMutations;
47
+ stopSize;
48
+ observedTable;
49
+ observedScroller;
50
+ sizeChanged() {
51
+ this.normalizeSize();
52
+ }
53
+ sortDirectionChanged() {
54
+ this.normalizeDirection();
55
+ this.syncSort();
56
+ }
57
+ sortKeyChanged() {
58
+ this.syncSort();
59
+ }
60
+ stickyHeaderChanged() {
61
+ this.checkStickyHeader();
62
+ }
63
+ connectedCallback() {
64
+ // The host subtree covers the table and survives a replaced table (`slotchange` may not fire
65
+ // for a new table written by a framework in the same task).
66
+ this.stopMutations ??= observeMutations(this.host, () => {
67
+ if (this.loaded)
68
+ this.refresh();
69
+ }, {
70
+ childList: true,
71
+ characterData: true,
72
+ subtree: true,
73
+ attributes: true,
74
+ attributeFilter: [TABLE_SORT_ATTRIBUTE, 'aria-sort'],
75
+ });
76
+ if (this.loaded)
77
+ this.refresh();
78
+ }
79
+ disconnectedCallback() {
80
+ this.stopMutations?.();
81
+ this.stopMutations = undefined;
82
+ this.stopSize?.();
83
+ this.stopSize = undefined;
84
+ this.observedTable = undefined;
85
+ this.observedScroller = undefined;
86
+ }
87
+ componentWillLoad() {
88
+ this.normalizeSize();
89
+ this.normalizeDirection();
90
+ }
91
+ componentDidLoad() {
92
+ this.loaded = true;
93
+ this.refresh();
94
+ this.checkStickyHeader();
95
+ }
96
+ componentDidRender() {
97
+ this.measure();
98
+ }
99
+ warn(key, message) {
100
+ warnOncePerDocument(this.host.ownerDocument, `au-table:${key}`, `au-table:${key}: ${message}`);
101
+ }
102
+ /** An unsupported size renders `medium` (also on the reflected attribute) and warns once. */
103
+ normalizeSize() {
104
+ if (isTableSize(this.size))
105
+ return;
106
+ this.warn('size', `size=${JSON.stringify(this.size)} is not supported and renders "medium". Use "small" or "medium".`);
107
+ this.size = TABLE_SIZE.medium;
108
+ }
109
+ /** An unsupported direction is ascending (also on the reflected attribute) and warns once. */
110
+ normalizeDirection() {
111
+ if (isTableSortDirection(this.sortDirection))
112
+ return;
113
+ this.warn('sort-direction', `sort-direction=${JSON.stringify(this.sortDirection)} is not supported and behaves as "ascending". Use "ascending" or "descending".`);
114
+ this.sortDirection = TABLE_SORT_DIRECTION.ascending;
115
+ }
116
+ /** The table is the first `table` among the slot's assigned elements (TB-D1). */
117
+ discoverTable() {
118
+ const assigned = this.slotElement?.assignedElements({ flatten: true }) ?? Array.from(this.host.children);
119
+ const tables = assigned.filter((element) => element.localName === 'table');
120
+ if (tables.length === 0) {
121
+ this.warn('no-table', 'the default slot holds no <table>, so there is nothing to enhance.');
122
+ }
123
+ else if (tables.length > 1) {
124
+ this.warn('multiple-tables', 'the default slot holds more than one <table>. The first one is used.');
125
+ }
126
+ return tables[0];
127
+ }
128
+ /** Everything that follows the table: discovery, `aria-sort`, the caption name and the overflow. */
129
+ refresh() {
130
+ this.table = this.discoverTable();
131
+ this.bindSize();
132
+ this.syncSort();
133
+ this.syncCaption();
134
+ this.measure();
135
+ }
136
+ handleSlotChange = () => {
137
+ if (this.loaded)
138
+ this.refresh();
139
+ };
140
+ /** The direct `thead` of the slotted table, found by name: `table.tHead` is not reliable everywhere. */
141
+ headOf(table) {
142
+ return Array.from(table.children).find((child) => child.localName === 'thead');
143
+ }
144
+ /**
145
+ * The sortable headers of the slotted table: `th[data-table-sort]` in its own `thead`, not in a
146
+ * nested table. A blank key makes the header unsortable (TB-D4).
147
+ */
148
+ sortableHeaders() {
149
+ const table = this.table;
150
+ const head = table ? this.headOf(table) : undefined;
151
+ if (!table || !head)
152
+ return [];
153
+ const found = [];
154
+ for (const header of Array.from(head.querySelectorAll('th'))) {
155
+ const raw = header.getAttribute(TABLE_SORT_ATTRIBUTE);
156
+ if (raw === null || header.closest('table') !== table)
157
+ continue;
158
+ const key = raw.trim();
159
+ if (key === '') {
160
+ this.warn('sort-key', `a header has a blank ${TABLE_SORT_ATTRIBUTE}, so it is not sortable. Give it a key.`);
161
+ continue;
162
+ }
163
+ if (!header.querySelector('button')) {
164
+ this.warn('sort-button', `the header of "${key}" has no <button>, so nothing activates it. Write <button type="button"> inside the th.`);
165
+ }
166
+ found.push({ header, key });
167
+ }
168
+ return found;
169
+ }
170
+ /** `aria-sort` is component-owned on every sortable header (TB-D6). Writes only when the value differs. */
171
+ syncSort() {
172
+ for (const { header, key } of this.sortableHeaders()) {
173
+ const wanted = key === this.sortKey ? this.sortDirection : null;
174
+ const current = header.getAttribute('aria-sort');
175
+ if (wanted === null) {
176
+ if (current !== null)
177
+ header.removeAttribute('aria-sort');
178
+ }
179
+ else if (current !== wanted) {
180
+ header.setAttribute('aria-sort', wanted);
181
+ }
182
+ }
183
+ }
184
+ syncCaption() {
185
+ const table = this.table;
186
+ const caption = table
187
+ ? Array.from(table.children).find((child) => child.localName === 'caption')
188
+ : undefined;
189
+ const text = caption?.textContent ?? '';
190
+ if (text !== this.captionText)
191
+ this.captionText = text;
192
+ }
193
+ /** Activation is delegated on the host (TB-D7): one listener, no keys of its own. */
194
+ handleClick(event) {
195
+ if (event.defaultPrevented)
196
+ return;
197
+ const target = event.target;
198
+ if (typeof target?.closest !== 'function')
199
+ return;
200
+ const button = target.closest('button');
201
+ const header = button?.closest('th[data-table-sort]');
202
+ const table = this.table;
203
+ if (!button || !header || !table)
204
+ return;
205
+ if (header.closest('table') !== table || header.closest('thead')?.parentElement !== table) {
206
+ return;
207
+ }
208
+ const key = (header.getAttribute(TABLE_SORT_ATTRIBUTE) ?? '').trim();
209
+ if (key === '')
210
+ return;
211
+ const next = nextSort({ key: this.sortKey, direction: this.sortDirection }, key);
212
+ // The state is final before the event, so a listener reads `sortKey` and `aria-sort` as updated.
213
+ this.sortKey = next.key;
214
+ this.sortDirection = next.direction;
215
+ this.syncSort();
216
+ this.auSort.emit({ key, direction: next.direction });
217
+ }
218
+ /** Watches the scroller and the table: a cell that grows overflows without resizing the scroller. */
219
+ bindSize() {
220
+ if (this.stopSize &&
221
+ this.observedTable === this.table &&
222
+ this.observedScroller === this.scroller) {
223
+ return;
224
+ }
225
+ this.stopSize?.();
226
+ this.stopSize = undefined;
227
+ this.observedTable = this.table;
228
+ this.observedScroller = this.scroller;
229
+ const targets = [this.scroller, this.table].filter((element) => element !== undefined);
230
+ if (targets.length > 0)
231
+ this.stopSize = observeSize(targets, this.measure);
232
+ }
233
+ /** The scroller is a focusable group only while it overflows; it keeps the attributes while focused. */
234
+ measure = () => {
235
+ const scroller = this.scroller;
236
+ if (!scroller)
237
+ return;
238
+ const overflows = scroller.scrollWidth > scroller.clientWidth || scroller.scrollHeight > scroller.clientHeight;
239
+ if (!overflows && this.scrollerFocused)
240
+ return;
241
+ if (this.scrollable !== overflows)
242
+ this.scrollable = overflows;
243
+ };
244
+ handleScrollerFocus = () => {
245
+ this.scrollerFocused = true;
246
+ };
247
+ handleScrollerBlur = () => {
248
+ this.scrollerFocused = false;
249
+ this.measure();
250
+ };
251
+ /** A sticky header needs a bounded scroller (TB-D10, TS5). Silent where there is no layout. */
252
+ checkStickyHeader() {
253
+ if (!this.stickyHeader || !this.scroller)
254
+ return;
255
+ const view = this.host.ownerDocument.defaultView;
256
+ if (view?.getComputedStyle(this.scroller).maxBlockSize !== 'none')
257
+ return;
258
+ this.warn('sticky-header', 'sticky-header needs a bounded block size: set --aurora-table-max-block-size (for example 24rem), or ::part(scroller) { max-block-size }. Without it the header scrolls with the page.');
259
+ }
260
+ render() {
261
+ return (h(Host, { key: '209a5e210ba3a13cf5428df22de193c8b39ca305', ...(this.scrollable ? { scrollable: '' } : {}) }, h("div", { key: '5957323b686ab11b856fea697c90128a35bf8286', part: "scroller", ref: (element) => {
262
+ this.scroller = element;
263
+ }, onFocus: this.handleScrollerFocus, onBlur: this.handleScrollerBlur, ...(this.scrollable
264
+ ? {
265
+ tabindex: '0',
266
+ role: 'group',
267
+ 'aria-label': resolveScrollerLabel({
268
+ label: this.label,
269
+ captionText: this.captionText,
270
+ }),
271
+ }
272
+ : {}) }, h("slot", { key: '1ae5f2a7d0d7641ba85c7308716fb13662791eed', onSlotchange: this.handleSlotChange, ref: (element) => {
273
+ this.slotElement = element;
274
+ } }))));
275
+ }
276
+ static get is() { return "au-table"; }
277
+ static get encapsulation() { return "shadow"; }
278
+ static get originalStyleUrls() {
279
+ return {
280
+ "$": ["au-table.scss"]
281
+ };
282
+ }
283
+ static get styleUrls() {
284
+ return {
285
+ "$": ["au-table.css"]
286
+ };
287
+ }
288
+ static get properties() {
289
+ return {
290
+ "sortKey": {
291
+ "type": "string",
292
+ "mutable": true,
293
+ "complexType": {
294
+ "original": "string | undefined",
295
+ "resolved": "string | undefined",
296
+ "references": {}
297
+ },
298
+ "required": false,
299
+ "optional": false,
300
+ "docs": {
301
+ "tags": [],
302
+ "text": "Key of the sorted column (the `data-table-sort` value of its header). Unset: no column is sorted."
303
+ },
304
+ "getter": false,
305
+ "setter": false,
306
+ "reflect": true,
307
+ "attribute": "sort-key",
308
+ "defaultValue": "undefined"
309
+ },
310
+ "sortDirection": {
311
+ "type": "string",
312
+ "mutable": true,
313
+ "complexType": {
314
+ "original": "TableSortDirection",
315
+ "resolved": "\"ascending\" | \"descending\"",
316
+ "references": {
317
+ "TableSortDirection": {
318
+ "location": "import",
319
+ "path": "./au-table.types",
320
+ "id": "src/components/data-display/au-table/au-table.types.ts::TableSortDirection",
321
+ "referenceLocation": "TableSortDirection"
322
+ }
323
+ }
324
+ },
325
+ "required": false,
326
+ "optional": false,
327
+ "docs": {
328
+ "tags": [],
329
+ "text": "Direction of the sorted column. An unsupported value is ascending and warns once."
330
+ },
331
+ "getter": false,
332
+ "setter": false,
333
+ "reflect": true,
334
+ "attribute": "sort-direction",
335
+ "defaultValue": "'ascending'"
336
+ },
337
+ "stickyHeader": {
338
+ "type": "boolean",
339
+ "mutable": false,
340
+ "complexType": {
341
+ "original": "boolean",
342
+ "resolved": "boolean",
343
+ "references": {}
344
+ },
345
+ "required": false,
346
+ "optional": false,
347
+ "docs": {
348
+ "tags": [],
349
+ "text": "Keeps the header row visible while the table scrolls inside a scroller with a bounded block size."
350
+ },
351
+ "getter": false,
352
+ "setter": false,
353
+ "reflect": true,
354
+ "attribute": "sticky-header",
355
+ "defaultValue": "false"
356
+ },
357
+ "striped": {
358
+ "type": "boolean",
359
+ "mutable": false,
360
+ "complexType": {
361
+ "original": "boolean",
362
+ "resolved": "boolean",
363
+ "references": {}
364
+ },
365
+ "required": false,
366
+ "optional": false,
367
+ "docs": {
368
+ "tags": [],
369
+ "text": "Gives every other body row a stripe background."
370
+ },
371
+ "getter": false,
372
+ "setter": false,
373
+ "reflect": true,
374
+ "attribute": "striped",
375
+ "defaultValue": "false"
376
+ },
377
+ "size": {
378
+ "type": "string",
379
+ "mutable": true,
380
+ "complexType": {
381
+ "original": "TableSize",
382
+ "resolved": "\"medium\" | \"small\"",
383
+ "references": {
384
+ "TableSize": {
385
+ "location": "import",
386
+ "path": "./au-table.types",
387
+ "id": "src/components/data-display/au-table/au-table.types.ts::TableSize",
388
+ "referenceLocation": "TableSize"
389
+ }
390
+ }
391
+ },
392
+ "required": false,
393
+ "optional": false,
394
+ "docs": {
395
+ "tags": [],
396
+ "text": "Cell density: `small` or `medium`. Unsupported values render `medium` and warn once."
397
+ },
398
+ "getter": false,
399
+ "setter": false,
400
+ "reflect": true,
401
+ "attribute": "size",
402
+ "defaultValue": "'medium'"
403
+ },
404
+ "label": {
405
+ "type": "string",
406
+ "mutable": false,
407
+ "complexType": {
408
+ "original": "string | undefined",
409
+ "resolved": "string | undefined",
410
+ "references": {}
411
+ },
412
+ "required": false,
413
+ "optional": false,
414
+ "docs": {
415
+ "tags": [],
416
+ "text": "Name of the scroll region while it overflows. Blank falls back to the caption text, then to `Table`."
417
+ },
418
+ "getter": false,
419
+ "setter": false,
420
+ "reflect": false,
421
+ "attribute": "label",
422
+ "defaultValue": "undefined"
423
+ }
424
+ };
425
+ }
426
+ static get states() {
427
+ return {
428
+ "scrollable": {},
429
+ "captionText": {}
430
+ };
431
+ }
432
+ static get events() {
433
+ return [{
434
+ "method": "auSort",
435
+ "name": "au-sort",
436
+ "bubbles": true,
437
+ "cancelable": false,
438
+ "composed": true,
439
+ "docs": {
440
+ "tags": [],
441
+ "text": "A user activation of a sortable header changed the sort. `detail` is the new state, already\nwritten to `sortKey` and `sortDirection`. Programmatic writes of those properties are silent.\nThe component never reorders the rows: sort the data or the DOM in the handler."
442
+ },
443
+ "complexType": {
444
+ "original": "AuSortDetail",
445
+ "resolved": "AuSortDetail",
446
+ "references": {
447
+ "AuSortDetail": {
448
+ "location": "import",
449
+ "path": "./au-table.types",
450
+ "id": "src/components/data-display/au-table/au-table.types.ts::AuSortDetail",
451
+ "referenceLocation": "AuSortDetail"
452
+ }
453
+ }
454
+ }
455
+ }];
456
+ }
457
+ static get elementRef() { return "host"; }
458
+ static get watchers() {
459
+ return [{
460
+ "propName": "size",
461
+ "methodName": "sizeChanged"
462
+ }, {
463
+ "propName": "sortDirection",
464
+ "methodName": "sortDirectionChanged"
465
+ }, {
466
+ "propName": "sortKey",
467
+ "methodName": "sortKeyChanged"
468
+ }, {
469
+ "propName": "stickyHeader",
470
+ "methodName": "stickyHeaderChanged"
471
+ }];
472
+ }
473
+ static get listeners() {
474
+ return [{
475
+ "name": "click",
476
+ "method": "handleClick",
477
+ "target": undefined,
478
+ "capture": false,
479
+ "passive": false
480
+ }];
481
+ }
482
+ }
@@ -0,0 +1,2 @@
1
+ export { AuTable } from './au-table.js';
2
+ export { TABLE_DEFAULT_LABEL, TABLE_NUMERIC_ATTRIBUTE, TABLE_SIZE, TABLE_SORT_ATTRIBUTE, TABLE_SORT_DIRECTION, } from './au-table.constants.js';
@@ -0,0 +1,11 @@
1
+ import { TABLE_DEFAULT_LABEL } from "../au-table.constants.js";
2
+ /** A trimmed string with its whitespace runs collapsed; anything that is not a string is blank. */
3
+ const clean = (value) => typeof value === 'string' ? value.replace(/\s+/g, ' ').trim() : '';
4
+ /**
5
+ * The name of the scroll region (spec TB-D9): the `label`, else the caption text, else `Table`.
6
+ * `aria-labelledby` cannot reach the light-DOM caption from the shadow scroller, so the text is
7
+ * resolved here.
8
+ */
9
+ export function resolveScrollerLabel(input) {
10
+ return clean(input.label) || clean(input.captionText) || TABLE_DEFAULT_LABEL;
11
+ }
@@ -0,0 +1,17 @@
1
+ import { TABLE_SORT_DIRECTION } from "../au-table.constants.js";
2
+ /**
3
+ * The state after a user activates the header of `key` (spec TB-D5): a different column starts
4
+ * ascending, the same column flips its direction. There is no unsorted third state. Pure: the
5
+ * result is a new object and the input is not changed.
6
+ */
7
+ export function nextSort(current, key) {
8
+ if (current.key === key) {
9
+ return {
10
+ key,
11
+ direction: current.direction === TABLE_SORT_DIRECTION.ascending
12
+ ? TABLE_SORT_DIRECTION.descending
13
+ : TABLE_SORT_DIRECTION.ascending,
14
+ };
15
+ }
16
+ return { key, direction: TABLE_SORT_DIRECTION.ascending };
17
+ }
@@ -82,7 +82,7 @@ export class AuAlert {
82
82
  const variant = this.safeVariant;
83
83
  const role = this.safeRole;
84
84
  const liveAttributes = role ? { role, 'aria-atomic': 'true' } : {};
85
- return (h("div", { key: '7a1f018a5224fe6c9af3eae91a1b1729829a9218', class: `alert alert--${variant}${this.empty ? ' alert--empty' : ''}${this.hasTitle ? '' : ' alert--no-title'}`, part: "alert" }, h("div", { key: '159039080e1ed367c7e4e585a4442d9d879cc9e1', class: "alert__body", part: "body", ...liveAttributes }, h("span", { key: '433887fcb8d20bbfdc53f5f9b80eff168a7e415a', class: "alert__icon", part: "icon" }, h("slot", { key: 'e5435e6a18bb1e1cb2b2aaed40099668698b203e', name: "icon" }, h("au-icon", { key: '230489161a83ac3ca8ababa0b6a5ff3b375e7123', icon: DEFAULT_ICONS[variant], decorative: true }))), h("div", { key: '9082ccd4e8b3e31bdb5caa508a3d4c35b19c215a', class: "alert__content", part: "content" }, h("div", { key: '32527d36a2a0c93b86379f324a23d2533b3115f8', class: "alert__title", part: "title" }, h("slot", { key: '83978630e7edadd1760ef905ca6010db7b094b7a', name: "title", onSlotchange: this.syncContent })), h("div", { key: 'b443dce73331f8f6aa61f15ad006377fdd1e6672', class: "alert__message", part: "message" }, h("slot", { key: '1e79d5b07ac3db6680b53d2ef3278e40fd5b87e9', onSlotchange: this.syncContent })))), this.dismissible && (h("button", { key: 'fe3ff25cbdaca39b127a94ea86ca765013dcdc15', class: "alert__dismiss", part: "dismiss", type: "button", "aria-label": this.safeDismissLabel, onClick: this.handleDismiss }, h("au-icon", { key: '1a1e5256468263a2f3bf1b629abb54107fb73374', icon: CLOSE_ICON, decorative: true })))));
85
+ return (h("div", { key: '2e8d03036108daf9ed35bffebca9a0168b3692c3', class: `alert alert--${variant}${this.empty ? ' alert--empty' : ''}${this.hasTitle ? '' : ' alert--no-title'}`, part: "alert" }, h("div", { key: 'f0560d1376bf667abcd1347e49264eb007393406', class: "alert__body", part: "body", ...liveAttributes }, h("span", { key: '3fdddd8223c45e7db2f8199929fed74f86202230', class: "alert__icon", part: "icon" }, h("slot", { key: '1c1d31cbd566e5d4e917503b6406dc8da4f3c7ed', name: "icon" }, h("au-icon", { key: '191531b37eaedb35c1d42a18c96a6ae185456671', icon: DEFAULT_ICONS[variant], decorative: true }))), h("div", { key: '43b2527b4a05b75fa82a8267b1dbb2c77f55179f', class: "alert__content", part: "content" }, h("div", { key: 'b1741ea56ed73a104b2ddff501bd6da634c18a42', class: "alert__title", part: "title" }, h("slot", { key: '962b0ff431f0daacace8bb340ea5b88558af50f1', name: "title", onSlotchange: this.syncContent })), h("div", { key: '71535cac03d9d9d9aefa60eef3ff58d26a4be8ff', class: "alert__message", part: "message" }, h("slot", { key: '3195a7702022de1ad9a674fa9d4a3437ce265521', onSlotchange: this.syncContent })))), this.dismissible && (h("button", { key: 'b677fc5fee2f407339190943916a9dfdeececa82', class: "alert__dismiss", part: "dismiss", type: "button", "aria-label": this.safeDismissLabel, onClick: this.handleDismiss }, h("au-icon", { key: '9ae59a4c53d550cb6b0c57c7d2f505fc73cd21ba', icon: CLOSE_ICON, decorative: true })))));
86
86
  }
87
87
  static get is() { return "au-alert"; }
88
88
  static get encapsulation() { return "shadow"; }
@@ -0,0 +1,38 @@
1
+ /** Literals only: no import from the foundations, so the `/constants` subpath stays standalone. */
2
+ /** `small` is a 0.25rem bar and `medium` a 0.5rem bar; any other thickness is `--aurora-progress-block-size`. */
3
+ export const PROGRESS_SIZE = {
4
+ small: 'small',
5
+ medium: 'medium',
6
+ };
7
+ /** The maximum of a bar when `max` is unset or invalid. */
8
+ export const PROGRESS_DEFAULT_MAX = 100;
9
+ const sizes = new Set(Object.values(PROGRESS_SIZE));
10
+ export const isProgressSize = (value) => typeof value === 'string' && sizes.has(value);
11
+ /**
12
+ * Resolves `value` and `max` the way the native element would, except that an invalid `max` becomes
13
+ * 100 (the native element treats it as 1, which would turn `value="40"` into a full bar). `undefined`
14
+ * and `null` (a removed attribute) mean "unset": `max` is 100 with no warning, `value` is indeterminate.
15
+ */
16
+ export function resolveProgress(value, max) {
17
+ const unsetMax = max === undefined || max === null;
18
+ const parsedMax = unsetMax ? PROGRESS_DEFAULT_MAX : Number(max);
19
+ const invalidMax = !unsetMax && (!Number.isFinite(parsedMax) || parsedMax <= 0);
20
+ const usableMax = unsetMax || invalidMax ? PROGRESS_DEFAULT_MAX : parsedMax;
21
+ const unsetValue = value === undefined || value === null || value === '';
22
+ const parsedValue = unsetValue ? Number.NaN : Number(value);
23
+ if (!Number.isFinite(parsedValue)) {
24
+ return { indeterminate: true, value: null, max: usableMax, ratio: null, invalidMax };
25
+ }
26
+ const clamped = Math.min(Math.max(parsedValue, 0), usableMax);
27
+ return {
28
+ indeterminate: false,
29
+ value: clamped,
30
+ max: usableMax,
31
+ ratio: clamped / usableMax,
32
+ invalidMax,
33
+ };
34
+ }
35
+ /** A whole localized percent of `ratio` (0 to 1), for example `41%` in `en`. */
36
+ export function formatProgressPercent(ratio, locale) {
37
+ return new Intl.NumberFormat(locale, { style: 'percent', maximumFractionDigits: 0 }).format(ratio);
38
+ }