@ds-autonomie/web-components 1.0.1

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 (500) hide show
  1. package/CHANGELOG.md +318 -0
  2. package/LICENSE +8 -0
  3. package/README.md +3 -0
  4. package/dist/chunks/chunk.23TOS4ZE.js +29 -0
  5. package/dist/chunks/chunk.2FK6USFR.js +63 -0
  6. package/dist/chunks/chunk.2HUORR44.js +76 -0
  7. package/dist/chunks/chunk.3BL7JA77.js +59 -0
  8. package/dist/chunks/chunk.3RBCYA4F.js +147 -0
  9. package/dist/chunks/chunk.3XRQRY25.js +25 -0
  10. package/dist/chunks/chunk.42W4S2HN.js +145 -0
  11. package/dist/chunks/chunk.4A3WMGMZ.js +79 -0
  12. package/dist/chunks/chunk.4A57I2HX.js +241 -0
  13. package/dist/chunks/chunk.4XT2OJD2.js +75 -0
  14. package/dist/chunks/chunk.5LT3B7MI.js +372 -0
  15. package/dist/chunks/chunk.5WAZTHII.js +37 -0
  16. package/dist/chunks/chunk.5XL2LZLC.js +100 -0
  17. package/dist/chunks/chunk.5XUV3SRW.js +420 -0
  18. package/dist/chunks/chunk.6FAUBLR3.js +84 -0
  19. package/dist/chunks/chunk.6M63UXML.js +35 -0
  20. package/dist/chunks/chunk.6PS5KB3O.js +53 -0
  21. package/dist/chunks/chunk.6ZQ4OQ2C.js +51 -0
  22. package/dist/chunks/chunk.73T7TU6S.js +24 -0
  23. package/dist/chunks/chunk.7J7CS3BK.js +43 -0
  24. package/dist/chunks/chunk.7NWAYDYI.js +168 -0
  25. package/dist/chunks/chunk.7ZCCXTFG.js +301 -0
  26. package/dist/chunks/chunk.A2PAK6VF.js +206 -0
  27. package/dist/chunks/chunk.ABGBXXKA.js +164 -0
  28. package/dist/chunks/chunk.AQRNB4GJ.js +33 -0
  29. package/dist/chunks/chunk.AR5HJD7F.js +111 -0
  30. package/dist/chunks/chunk.B4BZKR24.js +16 -0
  31. package/dist/chunks/chunk.BD63GRU5.js +132 -0
  32. package/dist/chunks/chunk.BEB47LM2.js +278 -0
  33. package/dist/chunks/chunk.BLPP3Q5H.js +555 -0
  34. package/dist/chunks/chunk.CJIL3BLA.js +45 -0
  35. package/dist/chunks/chunk.CPXD6UYZ.js +34 -0
  36. package/dist/chunks/chunk.D7CATJYB.js +36 -0
  37. package/dist/chunks/chunk.DC6CT5PU.js +109 -0
  38. package/dist/chunks/chunk.DRGGQ4WL.js +9 -0
  39. package/dist/chunks/chunk.DSGUQNN4.js +26 -0
  40. package/dist/chunks/chunk.DURVPB6M.js +391 -0
  41. package/dist/chunks/chunk.DXVNWE2M.js +166 -0
  42. package/dist/chunks/chunk.EFQHAGXP.js +26 -0
  43. package/dist/chunks/chunk.EHVJT7BH.js +215 -0
  44. package/dist/chunks/chunk.EKWYMXQO.js +166 -0
  45. package/dist/chunks/chunk.EMIT7S33.js +71 -0
  46. package/dist/chunks/chunk.EMJZLQCL.js +60 -0
  47. package/dist/chunks/chunk.ENKP2IFW.js +361 -0
  48. package/dist/chunks/chunk.EU56EW33.js +91 -0
  49. package/dist/chunks/chunk.EYZGEU3G.js +45 -0
  50. package/dist/chunks/chunk.FDYFSRSX.js +33 -0
  51. package/dist/chunks/chunk.FIGO7UV2.js +77 -0
  52. package/dist/chunks/chunk.G7AELPSO.js +131 -0
  53. package/dist/chunks/chunk.GI7VDIWX.js +24 -0
  54. package/dist/chunks/chunk.GYTA2LJC.js +145 -0
  55. package/dist/chunks/chunk.HAL7R4WT.js +0 -0
  56. package/dist/chunks/chunk.HC5BO5YV.js +405 -0
  57. package/dist/chunks/chunk.HH63FIEF.js +122 -0
  58. package/dist/chunks/chunk.HLYGKGDG.js +308 -0
  59. package/dist/chunks/chunk.I33L3NO6.js +122 -0
  60. package/dist/chunks/chunk.IGYXUK7A.js +19 -0
  61. package/dist/chunks/chunk.INCGVIAQ.js +61 -0
  62. package/dist/chunks/chunk.IOFPPNUO.js +25 -0
  63. package/dist/chunks/chunk.IRQOFNJE.js +317 -0
  64. package/dist/chunks/chunk.ISAFRNR2.js +112 -0
  65. package/dist/chunks/chunk.J2XNYTTZ.js +715 -0
  66. package/dist/chunks/chunk.JETXIC4F.js +150 -0
  67. package/dist/chunks/chunk.JT7UJED5.js +33 -0
  68. package/dist/chunks/chunk.K6WCEYZI.js +52 -0
  69. package/dist/chunks/chunk.KBT2EKLF.js +25 -0
  70. package/dist/chunks/chunk.KDAK2GXX.js +58 -0
  71. package/dist/chunks/chunk.KHIMMW3T.js +33 -0
  72. package/dist/chunks/chunk.KIFBWPW5.js +298 -0
  73. package/dist/chunks/chunk.KOH5V4C6.js +552 -0
  74. package/dist/chunks/chunk.LC54322H.js +99 -0
  75. package/dist/chunks/chunk.LMJPQPQT.js +26 -0
  76. package/dist/chunks/chunk.LT7JMZ3T.js +371 -0
  77. package/dist/chunks/chunk.M245ZGRR.js +80 -0
  78. package/dist/chunks/chunk.MOWTZFON.js +63 -0
  79. package/dist/chunks/chunk.MY434P47.js +125 -0
  80. package/dist/chunks/chunk.N6VVY6XD.js +91 -0
  81. package/dist/chunks/chunk.NDEZEB3Z.js +402 -0
  82. package/dist/chunks/chunk.NHRDZGLI.js +81 -0
  83. package/dist/chunks/chunk.NKKVGICB.js +114 -0
  84. package/dist/chunks/chunk.NNBOLKWI.js +17 -0
  85. package/dist/chunks/chunk.O73OYTYJ.js +319 -0
  86. package/dist/chunks/chunk.OBU65KDL.js +29 -0
  87. package/dist/chunks/chunk.ODSCDJDO.js +91 -0
  88. package/dist/chunks/chunk.OVK7QCA7.js +441 -0
  89. package/dist/chunks/chunk.PQWQ42E2.js +150 -0
  90. package/dist/chunks/chunk.PULHNCDM.js +98 -0
  91. package/dist/chunks/chunk.PWWER3ZK.js +806 -0
  92. package/dist/chunks/chunk.QFJA3MTV.js +66 -0
  93. package/dist/chunks/chunk.QKNNLZ2M.js +361 -0
  94. package/dist/chunks/chunk.QL5C2XOW.js +0 -0
  95. package/dist/chunks/chunk.RDGMZ5XB.js +24 -0
  96. package/dist/chunks/chunk.RIJQGADY.js +108 -0
  97. package/dist/chunks/chunk.RMCOWJOW.js +17 -0
  98. package/dist/chunks/chunk.RY4QCT3T.js +29 -0
  99. package/dist/chunks/chunk.S4ATPBQN.js +89 -0
  100. package/dist/chunks/chunk.SGIGGO5M.js +86 -0
  101. package/dist/chunks/chunk.SQMWMSBA.js +207 -0
  102. package/dist/chunks/chunk.TJOP7HQP.js +14 -0
  103. package/dist/chunks/chunk.TUVJKY7S.js +21 -0
  104. package/dist/chunks/chunk.UA32LJYW.js +230 -0
  105. package/dist/chunks/chunk.UEUTSYIH.js +60 -0
  106. package/dist/chunks/chunk.UPYCV66H.js +111 -0
  107. package/dist/chunks/chunk.UV53JTE3.js +128 -0
  108. package/dist/chunks/chunk.UZLQVFDR.js +386 -0
  109. package/dist/chunks/chunk.V7RJROLH.js +48 -0
  110. package/dist/chunks/chunk.VFYKLPN2.js +144 -0
  111. package/dist/chunks/chunk.VRY3E2XG.js +196 -0
  112. package/dist/chunks/chunk.WE6IG5XG.js +164 -0
  113. package/dist/chunks/chunk.WFHOSUOX.js +263 -0
  114. package/dist/chunks/chunk.WHK7EFIM.js +264 -0
  115. package/dist/chunks/chunk.WIEJJS3W.js +88 -0
  116. package/dist/chunks/chunk.WK7RWLAK.js +54 -0
  117. package/dist/chunks/chunk.WNHQYL5W.js +298 -0
  118. package/dist/chunks/chunk.WSVP75MH.js +102 -0
  119. package/dist/chunks/chunk.XNEONNEJ.js +23 -0
  120. package/dist/chunks/chunk.XSCX6TC5.js +127 -0
  121. package/dist/chunks/chunk.XWUQFDIN.js +15 -0
  122. package/dist/chunks/chunk.Y3ZUFLVS.js +90 -0
  123. package/dist/chunks/chunk.YCXTCVAZ.js +30 -0
  124. package/dist/chunks/chunk.YIY5RM53.js +66 -0
  125. package/dist/chunks/chunk.YL3TSWVM.js +17 -0
  126. package/dist/chunks/chunk.YS7MY5CH.js +512 -0
  127. package/dist/chunks/chunk.YY6AEXJK.js +33 -0
  128. package/dist/chunks/chunk.YZHDFJWJ.js +17 -0
  129. package/dist/chunks/chunk.Z6TBD2AC.js +125 -0
  130. package/dist/chunks/chunk.ZKYSHEVZ.js +22 -0
  131. package/dist/chunks/chunk.ZVGZDTBF.js +104 -0
  132. package/dist/components/accordion/accordion.d.ts +49 -0
  133. package/dist/components/accordion/accordion.js +23 -0
  134. package/dist/components/accordion/accordion.styles.d.ts +2 -0
  135. package/dist/components/accordion/accordion.styles.js +8 -0
  136. package/dist/components/alert/alert.d.ts +52 -0
  137. package/dist/components/alert/alert.js +25 -0
  138. package/dist/components/alert/alert.styles.d.ts +2 -0
  139. package/dist/components/alert/alert.styles.js +8 -0
  140. package/dist/components/animation/animation.d.ts +81 -0
  141. package/dist/components/animation/animation.js +12 -0
  142. package/dist/components/animation/animation.styles.d.ts +2 -0
  143. package/dist/components/animation/animation.styles.js +8 -0
  144. package/dist/components/animation/animations.d.ts +6 -0
  145. package/dist/components/animation/animations.js +11 -0
  146. package/dist/components/avatar/avatar.d.ts +42 -0
  147. package/dist/components/avatar/avatar.js +19 -0
  148. package/dist/components/avatar/avatar.styles.d.ts +2 -0
  149. package/dist/components/avatar/avatar.styles.js +8 -0
  150. package/dist/components/avatar-group/avatar-group.d.ts +21 -0
  151. package/dist/components/avatar-group/avatar-group.js +9 -0
  152. package/dist/components/avatar-group/avatar-group.styles.d.ts +2 -0
  153. package/dist/components/avatar-group/avatar-group.styles.js +7 -0
  154. package/dist/components/badge/badge.d.ts +23 -0
  155. package/dist/components/badge/badge.js +10 -0
  156. package/dist/components/badge/badge.styles.d.ts +2 -0
  157. package/dist/components/badge/badge.styles.js +8 -0
  158. package/dist/components/breadcrumb/breadcrumb.d.ts +23 -0
  159. package/dist/components/breadcrumb/breadcrumb.js +20 -0
  160. package/dist/components/breadcrumb/breadcrumb.styles.d.ts +2 -0
  161. package/dist/components/breadcrumb/breadcrumb.styles.js +8 -0
  162. package/dist/components/breadcrumb-item/breadcrumb-item.d.ts +30 -0
  163. package/dist/components/breadcrumb-item/breadcrumb-item.js +12 -0
  164. package/dist/components/breadcrumb-item/breadcrumb-item.styles.d.ts +2 -0
  165. package/dist/components/breadcrumb-item/breadcrumb-item.styles.js +8 -0
  166. package/dist/components/button/button.d.ts +120 -0
  167. package/dist/components/button/button.js +24 -0
  168. package/dist/components/button/button.styles.d.ts +2 -0
  169. package/dist/components/button/button.styles.js +8 -0
  170. package/dist/components/card/card.d.ts +22 -0
  171. package/dist/components/card/card.js +11 -0
  172. package/dist/components/card/card.styles.d.ts +2 -0
  173. package/dist/components/card/card.styles.js +8 -0
  174. package/dist/components/checkbox/checkbox.d.ts +93 -0
  175. package/dist/components/checkbox/checkbox.js +24 -0
  176. package/dist/components/checkbox/checkbox.styles.d.ts +2 -0
  177. package/dist/components/checkbox/checkbox.styles.js +9 -0
  178. package/dist/components/checkbox-button/checkbox-button.d.ts +48 -0
  179. package/dist/components/checkbox-button/checkbox-button.js +21 -0
  180. package/dist/components/checkbox-button/checkbox-button.styles.d.ts +2 -0
  181. package/dist/components/checkbox-button/checkbox-button.styles.js +9 -0
  182. package/dist/components/checkbox-group/checkbox-group.d.ts +85 -0
  183. package/dist/components/checkbox-group/checkbox-group.js +16 -0
  184. package/dist/components/checkbox-group/checkbox-group.styles.d.ts +2 -0
  185. package/dist/components/checkbox-group/checkbox-group.styles.js +9 -0
  186. package/dist/components/dialog/dialog.d.ts +70 -0
  187. package/dist/components/dialog/dialog.js +28 -0
  188. package/dist/components/dialog/dialog.styles.d.ts +2 -0
  189. package/dist/components/dialog/dialog.styles.js +8 -0
  190. package/dist/components/divider/divider.d.ts +17 -0
  191. package/dist/components/divider/divider.js +10 -0
  192. package/dist/components/divider/divider.styles.d.ts +2 -0
  193. package/dist/components/divider/divider.styles.js +8 -0
  194. package/dist/components/drawer/drawer.d.ts +77 -0
  195. package/dist/components/drawer/drawer.js +28 -0
  196. package/dist/components/drawer/drawer.styles.d.ts +2 -0
  197. package/dist/components/drawer/drawer.styles.js +8 -0
  198. package/dist/components/dropdown/dropdown.d.ts +87 -0
  199. package/dist/components/dropdown/dropdown.js +15 -0
  200. package/dist/components/dropdown/dropdown.styles.d.ts +2 -0
  201. package/dist/components/dropdown/dropdown.styles.js +8 -0
  202. package/dist/components/error-text/error-text.d.ts +18 -0
  203. package/dist/components/error-text/error-text.js +9 -0
  204. package/dist/components/error-text/error-text.styles.d.ts +2 -0
  205. package/dist/components/error-text/error-text.styles.js +7 -0
  206. package/dist/components/format-bytes/format-bytes.d.ts +22 -0
  207. package/dist/components/format-bytes/format-bytes.js +9 -0
  208. package/dist/components/format-date/format-date.d.ts +42 -0
  209. package/dist/components/format-date/format-date.js +9 -0
  210. package/dist/components/format-number/format-number.d.ts +36 -0
  211. package/dist/components/format-number/format-number.js +9 -0
  212. package/dist/components/icon/icon.d.ts +40 -0
  213. package/dist/components/icon/icon.js +17 -0
  214. package/dist/components/icon/icon.styles.d.ts +2 -0
  215. package/dist/components/icon/icon.styles.js +8 -0
  216. package/dist/components/icon/library.d.ts +21 -0
  217. package/dist/components/icon/library.default.d.ts +3 -0
  218. package/dist/components/icon/library.default.js +8 -0
  219. package/dist/components/icon/library.js +18 -0
  220. package/dist/components/icon/library.system.d.ts +3 -0
  221. package/dist/components/icon/library.system.js +7 -0
  222. package/dist/components/icon/request.d.ts +11 -0
  223. package/dist/components/icon/request.js +8 -0
  224. package/dist/components/icon-button/icon-button.d.ts +59 -0
  225. package/dist/components/icon-button/icon-button.js +19 -0
  226. package/dist/components/icon-button/icon-button.styles.d.ts +2 -0
  227. package/dist/components/icon-button/icon-button.styles.js +8 -0
  228. package/dist/components/include/include.d.ts +32 -0
  229. package/dist/components/include/include.js +12 -0
  230. package/dist/components/include/include.styles.d.ts +2 -0
  231. package/dist/components/include/include.styles.js +8 -0
  232. package/dist/components/include/request.d.ts +8 -0
  233. package/dist/components/include/request.js +7 -0
  234. package/dist/components/input/input.d.ts +165 -0
  235. package/dist/components/input/input.js +27 -0
  236. package/dist/components/input/input.styles.d.ts +2 -0
  237. package/dist/components/input/input.styles.js +9 -0
  238. package/dist/components/input/input.utils.d.ts +4 -0
  239. package/dist/components/input/input.utils.js +9 -0
  240. package/dist/components/input-mask/input-mask.configs.d.ts +42 -0
  241. package/dist/components/input-mask/input-mask.configs.js +11 -0
  242. package/dist/components/input-mask/input-mask.d.ts +127 -0
  243. package/dist/components/input-mask/input-mask.js +19 -0
  244. package/dist/components/input-mask/input-mask.styles.d.ts +2 -0
  245. package/dist/components/input-mask/input-mask.styles.js +9 -0
  246. package/dist/components/input-mask/input-mask.utils.d.ts +7 -0
  247. package/dist/components/input-mask/input-mask.utils.js +19 -0
  248. package/dist/components/input-phone/input-phone.configs.d.ts +14 -0
  249. package/dist/components/input-phone/input-phone.configs.js +7 -0
  250. package/dist/components/input-phone/input-phone.d.ts +138 -0
  251. package/dist/components/input-phone/input-phone.js +49 -0
  252. package/dist/components/input-phone/input-phone.styles.d.ts +2 -0
  253. package/dist/components/input-phone/input-phone.styles.js +9 -0
  254. package/dist/components/input-phone/input-phone.utils.d.ts +9 -0
  255. package/dist/components/input-phone/input-phone.utils.js +13 -0
  256. package/dist/components/menu/menu.d.ts +43 -0
  257. package/dist/components/menu/menu.js +10 -0
  258. package/dist/components/menu/menu.styles.d.ts +2 -0
  259. package/dist/components/menu/menu.styles.js +8 -0
  260. package/dist/components/menu-item/menu-item.d.ts +44 -0
  261. package/dist/components/menu-item/menu-item.js +20 -0
  262. package/dist/components/menu-item/menu-item.styles.d.ts +2 -0
  263. package/dist/components/menu-item/menu-item.styles.js +8 -0
  264. package/dist/components/menu-label/menu-label.d.ts +17 -0
  265. package/dist/components/menu-label/menu-label.js +10 -0
  266. package/dist/components/menu-label/menu-label.styles.d.ts +2 -0
  267. package/dist/components/menu-label/menu-label.styles.js +8 -0
  268. package/dist/components/mutation-observer/mutation-observer.d.ts +44 -0
  269. package/dist/components/mutation-observer/mutation-observer.js +11 -0
  270. package/dist/components/mutation-observer/mutation-observer.styles.d.ts +2 -0
  271. package/dist/components/mutation-observer/mutation-observer.styles.js +8 -0
  272. package/dist/components/option/option.d.ts +50 -0
  273. package/dist/components/option/option.js +20 -0
  274. package/dist/components/option/option.styles.d.ts +2 -0
  275. package/dist/components/option/option.styles.js +8 -0
  276. package/dist/components/popup/popup.d.ts +123 -0
  277. package/dist/components/popup/popup.js +10 -0
  278. package/dist/components/popup/popup.styles.d.ts +2 -0
  279. package/dist/components/popup/popup.styles.js +8 -0
  280. package/dist/components/progress-bar/progress-bar.d.ts +23 -0
  281. package/dist/components/progress-bar/progress-bar.js +11 -0
  282. package/dist/components/progress-bar/progress-bar.styles.d.ts +2 -0
  283. package/dist/components/progress-bar/progress-bar.styles.js +8 -0
  284. package/dist/components/progress-ring/progress-ring.d.ts +25 -0
  285. package/dist/components/progress-ring/progress-ring.js +11 -0
  286. package/dist/components/progress-ring/progress-ring.styles.d.ts +2 -0
  287. package/dist/components/progress-ring/progress-ring.styles.js +8 -0
  288. package/dist/components/radio/radio.d.ts +46 -0
  289. package/dist/components/radio/radio.js +19 -0
  290. package/dist/components/radio/radio.styles.d.ts +2 -0
  291. package/dist/components/radio/radio.styles.js +8 -0
  292. package/dist/components/radio-button/radio-button.d.ts +47 -0
  293. package/dist/components/radio-button/radio-button.js +13 -0
  294. package/dist/components/radio-button/radio-button.styles.d.ts +2 -0
  295. package/dist/components/radio-button/radio-button.styles.js +9 -0
  296. package/dist/components/radio-group/radio-group.d.ts +91 -0
  297. package/dist/components/radio-group/radio-group.js +16 -0
  298. package/dist/components/radio-group/radio-group.styles.d.ts +2 -0
  299. package/dist/components/radio-group/radio-group.styles.js +9 -0
  300. package/dist/components/relative-time/relative-time.d.ts +34 -0
  301. package/dist/components/relative-time/relative-time.js +9 -0
  302. package/dist/components/resize-observer/resize-observer.d.ts +31 -0
  303. package/dist/components/resize-observer/resize-observer.js +11 -0
  304. package/dist/components/resize-observer/resize-observer.styles.d.ts +2 -0
  305. package/dist/components/resize-observer/resize-observer.styles.js +8 -0
  306. package/dist/components/select/select.d.ts +166 -0
  307. package/dist/components/select/select.js +36 -0
  308. package/dist/components/select/select.styles.d.ts +2 -0
  309. package/dist/components/select/select.styles.js +9 -0
  310. package/dist/components/skeleton/skeleton.d.ts +21 -0
  311. package/dist/components/skeleton/skeleton.js +10 -0
  312. package/dist/components/skeleton/skeleton.styles.d.ts +2 -0
  313. package/dist/components/skeleton/skeleton.styles.js +8 -0
  314. package/dist/components/spinner/spinner.d.ts +21 -0
  315. package/dist/components/spinner/spinner.js +11 -0
  316. package/dist/components/spinner/spinner.styles.d.ts +2 -0
  317. package/dist/components/spinner/spinner.styles.js +8 -0
  318. package/dist/components/tab/tab.d.ts +44 -0
  319. package/dist/components/tab/tab.js +12 -0
  320. package/dist/components/tab/tab.styles.d.ts +2 -0
  321. package/dist/components/tab/tab.styles.js +8 -0
  322. package/dist/components/tab-group/tab-group.d.ts +61 -0
  323. package/dist/components/tab-group/tab-group.js +13 -0
  324. package/dist/components/tab-group/tab-group.styles.d.ts +2 -0
  325. package/dist/components/tab-group/tab-group.styles.js +8 -0
  326. package/dist/components/tab-panel/tab-panel.d.ts +25 -0
  327. package/dist/components/tab-panel/tab-panel.js +11 -0
  328. package/dist/components/tab-panel/tab-panel.styles.d.ts +2 -0
  329. package/dist/components/tab-panel/tab-panel.styles.js +8 -0
  330. package/dist/components/tag/tag.d.ts +34 -0
  331. package/dist/components/tag/tag.js +22 -0
  332. package/dist/components/tag/tag.styles.d.ts +2 -0
  333. package/dist/components/tag/tag.styles.js +8 -0
  334. package/dist/components/textarea/textarea.d.ts +137 -0
  335. package/dist/components/textarea/textarea.js +17 -0
  336. package/dist/components/textarea/textarea.styles.d.ts +2 -0
  337. package/dist/components/textarea/textarea.styles.js +9 -0
  338. package/dist/components/tooltip/tooltip.d.ts +80 -0
  339. package/dist/components/tooltip/tooltip.js +17 -0
  340. package/dist/components/tooltip/tooltip.styles.d.ts +2 -0
  341. package/dist/components/tooltip/tooltip.styles.js +8 -0
  342. package/dist/components/tree/tree.d.ts +53 -0
  343. package/dist/components/tree/tree.js +33 -0
  344. package/dist/components/tree/tree.styles.d.ts +2 -0
  345. package/dist/components/tree/tree.styles.js +8 -0
  346. package/dist/components/tree-item/tree-item.d.ts +69 -0
  347. package/dist/components/tree-item/tree-item.js +31 -0
  348. package/dist/components/tree-item/tree-item.styles.d.ts +2 -0
  349. package/dist/components/tree-item/tree-item.styles.js +8 -0
  350. package/dist/components/visually-hidden/visually-hidden.d.ts +17 -0
  351. package/dist/components/visually-hidden/visually-hidden.js +10 -0
  352. package/dist/components/visually-hidden/visually-hidden.styles.d.ts +2 -0
  353. package/dist/components/visually-hidden/visually-hidden.styles.js +8 -0
  354. package/dist/custom-elements.json +14628 -0
  355. package/dist/design-system-autoloader.d.ts +4 -0
  356. package/dist/design-system-autoloader.js +46 -0
  357. package/dist/design-system.d.ts +58 -0
  358. package/dist/design-system.js +309 -0
  359. package/dist/events/dsa-after-collapse.d.ts +7 -0
  360. package/dist/events/dsa-after-collapse.js +1 -0
  361. package/dist/events/dsa-after-expand.d.ts +7 -0
  362. package/dist/events/dsa-after-expand.js +1 -0
  363. package/dist/events/dsa-after-hide.d.ts +7 -0
  364. package/dist/events/dsa-after-hide.js +1 -0
  365. package/dist/events/dsa-after-show.d.ts +7 -0
  366. package/dist/events/dsa-after-show.js +1 -0
  367. package/dist/events/dsa-blur.d.ts +7 -0
  368. package/dist/events/dsa-blur.js +1 -0
  369. package/dist/events/dsa-cancel.d.ts +7 -0
  370. package/dist/events/dsa-cancel.js +1 -0
  371. package/dist/events/dsa-change.d.ts +7 -0
  372. package/dist/events/dsa-change.js +1 -0
  373. package/dist/events/dsa-clear.d.ts +7 -0
  374. package/dist/events/dsa-clear.js +1 -0
  375. package/dist/events/dsa-close.d.ts +7 -0
  376. package/dist/events/dsa-close.js +1 -0
  377. package/dist/events/dsa-collapse.d.ts +7 -0
  378. package/dist/events/dsa-collapse.js +1 -0
  379. package/dist/events/dsa-error.d.ts +9 -0
  380. package/dist/events/dsa-error.js +1 -0
  381. package/dist/events/dsa-expand.d.ts +7 -0
  382. package/dist/events/dsa-expand.js +1 -0
  383. package/dist/events/dsa-finish.d.ts +7 -0
  384. package/dist/events/dsa-finish.js +1 -0
  385. package/dist/events/dsa-focus.d.ts +7 -0
  386. package/dist/events/dsa-focus.js +1 -0
  387. package/dist/events/dsa-hide.d.ts +7 -0
  388. package/dist/events/dsa-hide.js +1 -0
  389. package/dist/events/dsa-hover.d.ts +10 -0
  390. package/dist/events/dsa-hover.js +1 -0
  391. package/dist/events/dsa-initial-focus.d.ts +7 -0
  392. package/dist/events/dsa-initial-focus.js +1 -0
  393. package/dist/events/dsa-input.d.ts +7 -0
  394. package/dist/events/dsa-input.js +1 -0
  395. package/dist/events/dsa-invalid.d.ts +7 -0
  396. package/dist/events/dsa-invalid.js +1 -0
  397. package/dist/events/dsa-lazy-change.d.ts +7 -0
  398. package/dist/events/dsa-lazy-change.js +1 -0
  399. package/dist/events/dsa-lazy-load.d.ts +7 -0
  400. package/dist/events/dsa-lazy-load.js +1 -0
  401. package/dist/events/dsa-load.d.ts +7 -0
  402. package/dist/events/dsa-load.js +1 -0
  403. package/dist/events/dsa-mutation.d.ts +9 -0
  404. package/dist/events/dsa-mutation.js +1 -0
  405. package/dist/events/dsa-remove.d.ts +7 -0
  406. package/dist/events/dsa-remove.js +1 -0
  407. package/dist/events/dsa-reposition.d.ts +7 -0
  408. package/dist/events/dsa-reposition.js +1 -0
  409. package/dist/events/dsa-request-close.d.ts +9 -0
  410. package/dist/events/dsa-request-close.js +1 -0
  411. package/dist/events/dsa-resize.d.ts +9 -0
  412. package/dist/events/dsa-resize.js +1 -0
  413. package/dist/events/dsa-select.d.ts +10 -0
  414. package/dist/events/dsa-select.js +1 -0
  415. package/dist/events/dsa-selection-change.d.ts +10 -0
  416. package/dist/events/dsa-selection-change.js +1 -0
  417. package/dist/events/dsa-show.d.ts +7 -0
  418. package/dist/events/dsa-show.js +1 -0
  419. package/dist/events/dsa-start.d.ts +7 -0
  420. package/dist/events/dsa-start.js +1 -0
  421. package/dist/events/dsa-tab-hide.d.ts +9 -0
  422. package/dist/events/dsa-tab-hide.js +1 -0
  423. package/dist/events/dsa-tab-show.d.ts +9 -0
  424. package/dist/events/dsa-tab-show.js +1 -0
  425. package/dist/events/events.d.ts +32 -0
  426. package/dist/events/events.js +1 -0
  427. package/dist/internal/animate.d.ts +22 -0
  428. package/dist/internal/animate.js +56 -0
  429. package/dist/internal/components/button-group/button-group.d.ts +34 -0
  430. package/dist/internal/components/button-group/button-group.js +110 -0
  431. package/dist/internal/components/button-group/button-group.styles.d.ts +2 -0
  432. package/dist/internal/components/button-group/button-group.styles.js +19 -0
  433. package/dist/internal/debounce.d.ts +1 -0
  434. package/dist/internal/debounce.js +26 -0
  435. package/dist/internal/default-value.d.ts +2 -0
  436. package/dist/internal/default-value.js +38 -0
  437. package/dist/internal/drag.d.ts +15 -0
  438. package/dist/internal/drag.js +27 -0
  439. package/dist/internal/event.d.ts +2 -0
  440. package/dist/internal/event.js +12 -0
  441. package/dist/internal/form.d.ts +73 -0
  442. package/dist/internal/form.js +328 -0
  443. package/dist/internal/math.d.ts +2 -0
  444. package/dist/internal/math.js +11 -0
  445. package/dist/internal/modal.d.ts +12 -0
  446. package/dist/internal/modal.js +51 -0
  447. package/dist/internal/offset.d.ts +11 -0
  448. package/dist/internal/offset.js +13 -0
  449. package/dist/internal/scroll.d.ts +11 -0
  450. package/dist/internal/scroll.js +63 -0
  451. package/dist/internal/shoelace-element.d.ts +43 -0
  452. package/dist/internal/shoelace-element.js +21 -0
  453. package/dist/internal/slot.d.ts +23 -0
  454. package/dist/internal/slot.js +84 -0
  455. package/dist/internal/string.d.ts +2 -0
  456. package/dist/internal/string.js +4 -0
  457. package/dist/internal/tabbable.d.ts +8 -0
  458. package/dist/internal/tabbable.js +79 -0
  459. package/dist/internal/test/data-testid-helpers.d.ts +12 -0
  460. package/dist/internal/test/data-testid-helpers.js +14 -0
  461. package/dist/internal/test/element-visible-overflow.d.ts +11 -0
  462. package/dist/internal/test/element-visible-overflow.js +18 -0
  463. package/dist/internal/test/form-control-base-tests.d.ts +7 -0
  464. package/dist/internal/test/form-control-base-tests.js +262 -0
  465. package/dist/internal/test/wait-for-scrolling.d.ts +9 -0
  466. package/dist/internal/test/wait-for-scrolling.js +34 -0
  467. package/dist/internal/test.d.ts +20 -0
  468. package/dist/internal/test.js +71 -0
  469. package/dist/internal/watch.d.ts +26 -0
  470. package/dist/internal/watch.js +38 -0
  471. package/dist/styles/component.styles.d.ts +2 -0
  472. package/dist/styles/component.styles.js +16 -0
  473. package/dist/styles/form-control.styles.d.ts +2 -0
  474. package/dist/styles/form-control.styles.js +142 -0
  475. package/dist/themes/dsa-wc-theme.css +1218 -0
  476. package/dist/themes/dsa-wc-theme.min.css +1 -0
  477. package/dist/themes/dsa-wc-theme.styles.js +1229 -0
  478. package/dist/translations/en-gb.d.ts +3 -0
  479. package/dist/translations/en-gb.js +21 -0
  480. package/dist/translations/en.d.ts +3 -0
  481. package/dist/translations/en.js +7 -0
  482. package/dist/translations/fr.d.ts +3 -0
  483. package/dist/translations/fr.js +7 -0
  484. package/dist/utilities/animation-registry.d.ts +24 -0
  485. package/dist/utilities/animation-registry.js +11 -0
  486. package/dist/utilities/animation.d.ts +1 -0
  487. package/dist/utilities/animation.js +10 -0
  488. package/dist/utilities/base-path.d.ts +18 -0
  489. package/dist/utilities/base-path.js +9 -0
  490. package/dist/utilities/form.d.ts +11 -0
  491. package/dist/utilities/form.js +43 -0
  492. package/dist/utilities/icon-library.d.ts +1 -0
  493. package/dist/utilities/icon-library.js +13 -0
  494. package/dist/utilities/localize.d.ts +39 -0
  495. package/dist/utilities/localize.js +9 -0
  496. package/dist/utilities/storybook.d.ts +46 -0
  497. package/dist/utilities/storybook.js +54 -0
  498. package/dist/vscode.html-custom-data.json +2392 -0
  499. package/dist/web-types.json +8687 -0
  500. package/package.json +109 -0
@@ -0,0 +1,111 @@
1
+ import {
2
+ button_styles_default
3
+ } from "./chunk.J2XNYTTZ.js";
4
+
5
+ // src/components/checkbox-button/checkbox-button.styles.ts
6
+ import { css } from "lit";
7
+ var checkbox_button_styles_default = css`
8
+ ${button_styles_default}
9
+
10
+ .button__prefix,
11
+ .button__suffix,
12
+ .button__label {
13
+ display: inline-flex;
14
+ position: relative;
15
+ align-items: center;
16
+ }
17
+
18
+ .button--toggle {
19
+ display: inline-flex;
20
+ align-items: center;
21
+ background-color: var(--dsa-wc-toggle-button-background-color);
22
+ border-color: var(--dsa-wc-toggle-button-border-color);
23
+ color: var(--dsa-wc-toggle-button-color);
24
+
25
+ border-width: 1px;
26
+ boder-style: solid;
27
+ }
28
+
29
+ .button--toggle:hover {
30
+ background-color: var(--dsa-wc-toggle-button-hover-background-color);
31
+ border-color: var(--dsa-wc-toggle-button-hover-border-color);
32
+ color: var(--dsa-wc-toggle-button-hover-color);
33
+ }
34
+
35
+ .button--toggle:active {
36
+ background-color: var(--dsa-wc-toggle-button-active-background-color);
37
+ border-color: var(--dsa-wc-toggle-button-active-border-color);
38
+ color: var(--dsa-wc-toggle-button-active-color);
39
+ }
40
+
41
+ .button--toggle.button--checked {
42
+ background-color: var(--dsa-wc-toggle-button-checked-background-color);
43
+ border-color: var(--dsa-wc-toggle-button-checked-border-color);
44
+ color: var(--dsa-wc-toggle-button-checked-color);
45
+ padding-right: var(--dsa-wc-toggle-button-icon-padding-x);
46
+ }
47
+ .button--toggle:hover.button--checked {
48
+ background-color: var(
49
+ --dsa-wc-toggle-button-checked-hover-background-color
50
+ );
51
+ border-color: var(--dsa-wc-toggle-button-checked-hover-border-color);
52
+ color: var(--dsa-wc-toggle-button-checked-hover-color);
53
+ }
54
+ .button--toggle:active.button--checked {
55
+ background-color: var(
56
+ --dsa-wc-toggle-button-checked-active-background-color
57
+ );
58
+ border-color: var(--dsa-wc-toggle-button-checked-active-border-color);
59
+ color: var(--dsa-wc-toggle-button-checked-active-color);
60
+ }
61
+
62
+ .button--toggle.button--readonly.button--readonly {
63
+ background-color: var(--dsa-wc-toggle-button-read-only-background-color);
64
+ border-color: var(--dsa-wc-toggle-button-read-only-border-color);
65
+ color: var(--dsa-wc-toggle-button-read-only-color);
66
+ padding-left: var(--dsa-wc-toggle-button-icon-padding-x);
67
+ }
68
+ .button--toggle.button--checked.button--readonly.button--readonly {
69
+ background-color: var(
70
+ --dsa-wc-toggle-button-read-only-checked-background-color
71
+ );
72
+ border-color: var(--dsa-wc-toggle-button-read-only-checked-border-color);
73
+ color: var(--dsa-wc-toggle-button-read-only-checked-color);
74
+ }
75
+ .button--toggle.button--checked.button--read-only.button--readonly
76
+ .button__icon-check {
77
+ color: var(--dsa-wc-toggle-button-read-only-checked-icon-color);
78
+ }
79
+
80
+ .button--toggle.button--disabled {
81
+ background-color: var(--dsa-wc-toggle-button-disabled-background-color);
82
+ border-color: var(--dsa-wc-toggle-button-disabled-border-color);
83
+ color: var(--dsa-wc-toggle-button-disabled-color);
84
+ }
85
+
86
+ .button--toggle .button__icon-check {
87
+ margin-inline-start: var(--dsa-wc-toggle-button-icon-spacing);
88
+ }
89
+
90
+ .button--toggle .button__icon-readonly {
91
+ margin-inline-end: var(--dsa-wc-toggle-button-icon-spacing);
92
+ }
93
+
94
+ /* We use a hidden input so constraint validation errors work, since they don't appear to show when used with buttons.
95
+ We can't actually hide it, though, otherwise the messages will be suppressed by the browser. */
96
+ .hidden-input {
97
+ all: unset;
98
+ position: absolute;
99
+ top: 0;
100
+ left: 0;
101
+ bottom: 0;
102
+ right: 0;
103
+ outline: dotted 1px red;
104
+ opacity: 0;
105
+ z-index: -1;
106
+ }
107
+ `;
108
+
109
+ export {
110
+ checkbox_button_styles_default
111
+ };
@@ -0,0 +1,128 @@
1
+ import {
2
+ LocalizeController
3
+ } from "./chunk.5XL2LZLC.js";
4
+ import {
5
+ ShoelaceElement
6
+ } from "./chunk.YCXTCVAZ.js";
7
+ import {
8
+ __decorateClass
9
+ } from "./chunk.6M63UXML.js";
10
+
11
+ // src/components/relative-time/relative-time.ts
12
+ import { html } from "lit";
13
+ import { customElement, property, state } from "lit/decorators.js";
14
+ var availableUnits = [
15
+ { max: 276e4, value: 6e4, unit: "minute" },
16
+ // max 46 minutes
17
+ { max: 72e6, value: 36e5, unit: "hour" },
18
+ // max 20 hours
19
+ { max: 5184e5, value: 864e5, unit: "day" },
20
+ // max 6 days
21
+ { max: 24192e5, value: 6048e5, unit: "week" },
22
+ // max 28 days
23
+ { max: 28512e6, value: 2592e6, unit: "month" },
24
+ // max 11 months
25
+ { max: Infinity, value: 31536e6, unit: "year" }
26
+ ];
27
+ var DSARelativeTime = class extends ShoelaceElement {
28
+ constructor() {
29
+ super(...arguments);
30
+ this.localize = new LocalizeController(this);
31
+ this.isoTime = "";
32
+ this.relativeTime = "";
33
+ this.titleTime = "";
34
+ this.date = new Date();
35
+ this.format = "long";
36
+ this.numeric = "auto";
37
+ this.sync = false;
38
+ }
39
+ disconnectedCallback() {
40
+ super.disconnectedCallback();
41
+ clearTimeout(this.updateTimeout);
42
+ }
43
+ render() {
44
+ const now = new Date();
45
+ const then = new Date(this.date);
46
+ if (isNaN(then.getMilliseconds())) {
47
+ this.relativeTime = "";
48
+ this.isoTime = "";
49
+ return "";
50
+ }
51
+ const diff = then.getTime() - now.getTime();
52
+ const { unit, value } = availableUnits.find(
53
+ (singleUnit) => Math.abs(diff) < singleUnit.max
54
+ );
55
+ this.isoTime = then.toISOString();
56
+ this.titleTime = this.localize.date(then, {
57
+ month: "long",
58
+ year: "numeric",
59
+ day: "numeric",
60
+ hour: "numeric",
61
+ minute: "numeric",
62
+ timeZoneName: "short"
63
+ });
64
+ this.relativeTime = this.localize.relativeTime(
65
+ Math.round(diff / value),
66
+ unit,
67
+ {
68
+ numeric: this.numeric,
69
+ style: this.format
70
+ }
71
+ );
72
+ clearTimeout(this.updateTimeout);
73
+ if (this.sync) {
74
+ let nextInterval;
75
+ if (unit === "minute") {
76
+ nextInterval = getTimeUntilNextUnit("second");
77
+ } else if (unit === "hour") {
78
+ nextInterval = getTimeUntilNextUnit("minute");
79
+ } else if (unit === "day") {
80
+ nextInterval = getTimeUntilNextUnit("hour");
81
+ } else {
82
+ nextInterval = getTimeUntilNextUnit("day");
83
+ }
84
+ this.updateTimeout = window.setTimeout(
85
+ () => this.requestUpdate(),
86
+ nextInterval
87
+ );
88
+ }
89
+ return html`
90
+ <time datetime=${this.isoTime} title=${this.titleTime}
91
+ >${this.relativeTime}</time
92
+ >
93
+ `;
94
+ }
95
+ };
96
+ __decorateClass([
97
+ state()
98
+ ], DSARelativeTime.prototype, "isoTime", 2);
99
+ __decorateClass([
100
+ state()
101
+ ], DSARelativeTime.prototype, "relativeTime", 2);
102
+ __decorateClass([
103
+ state()
104
+ ], DSARelativeTime.prototype, "titleTime", 2);
105
+ __decorateClass([
106
+ property()
107
+ ], DSARelativeTime.prototype, "date", 2);
108
+ __decorateClass([
109
+ property()
110
+ ], DSARelativeTime.prototype, "format", 2);
111
+ __decorateClass([
112
+ property()
113
+ ], DSARelativeTime.prototype, "numeric", 2);
114
+ __decorateClass([
115
+ property({ type: Boolean })
116
+ ], DSARelativeTime.prototype, "sync", 2);
117
+ DSARelativeTime = __decorateClass([
118
+ customElement("dsa-relative-time")
119
+ ], DSARelativeTime);
120
+ function getTimeUntilNextUnit(unit) {
121
+ const units = { second: 1e3, minute: 6e4, hour: 36e5, day: 864e5 };
122
+ const value = units[unit];
123
+ return value - Date.now() % value;
124
+ }
125
+
126
+ export {
127
+ DSARelativeTime
128
+ };
@@ -0,0 +1,386 @@
1
+ import {
2
+ tab_group_styles_default
3
+ } from "./chunk.4A57I2HX.js";
4
+ import {
5
+ scrollIntoView
6
+ } from "./chunk.EMIT7S33.js";
7
+ import {
8
+ LocalizeController
9
+ } from "./chunk.5XL2LZLC.js";
10
+ import {
11
+ watch
12
+ } from "./chunk.D7CATJYB.js";
13
+ import {
14
+ ShoelaceElement
15
+ } from "./chunk.YCXTCVAZ.js";
16
+ import {
17
+ __decorateClass,
18
+ __spreadValues
19
+ } from "./chunk.6M63UXML.js";
20
+
21
+ // src/components/tab-group/tab-group.ts
22
+ import { html } from "lit";
23
+ import { customElement, property, query, state } from "lit/decorators.js";
24
+ import { classMap } from "lit/directives/class-map.js";
25
+ var DSATabGroup = class extends ShoelaceElement {
26
+ constructor() {
27
+ super(...arguments);
28
+ this.localize = new LocalizeController(this);
29
+ this.tabs = [];
30
+ this.panels = [];
31
+ this.hasScrollControls = false;
32
+ this.placement = "top";
33
+ this.activation = "auto";
34
+ }
35
+ connectedCallback() {
36
+ super.connectedCallback();
37
+ this.resizeObserver = new ResizeObserver(() => {
38
+ this.repositionIndicator();
39
+ this.updateScrollControls();
40
+ });
41
+ this.mutationObserver = new MutationObserver((mutations) => {
42
+ if (mutations.some(
43
+ (m) => !["aria-labelledby", "aria-controls"].includes(m.attributeName)
44
+ )) {
45
+ setTimeout(() => this.setAriaLabels());
46
+ }
47
+ if (mutations.some((m) => m.attributeName === "disabled")) {
48
+ this.syncTabsAndPanels();
49
+ }
50
+ });
51
+ this.updateComplete.then(() => {
52
+ this.syncTabsAndPanels();
53
+ this.mutationObserver.observe(this, {
54
+ attributes: true,
55
+ childList: true,
56
+ subtree: true
57
+ });
58
+ this.resizeObserver.observe(this.nav);
59
+ const intersectionObserver = new IntersectionObserver(
60
+ (entries, observer) => {
61
+ var _a;
62
+ if (entries[0].intersectionRatio > 0) {
63
+ this.setAriaLabels();
64
+ this.setActiveTab((_a = this.getActiveTab()) != null ? _a : this.tabs[0], {
65
+ emitEvents: false
66
+ });
67
+ observer.unobserve(entries[0].target);
68
+ }
69
+ }
70
+ );
71
+ intersectionObserver.observe(this.tabGroup);
72
+ });
73
+ }
74
+ disconnectedCallback() {
75
+ this.mutationObserver.disconnect();
76
+ this.resizeObserver.unobserve(this.nav);
77
+ }
78
+ getAllTabs(options = { includeDisabled: true }) {
79
+ const slot = this.shadowRoot.querySelector('slot[name="nav"]');
80
+ return [...slot.assignedElements()].filter((el) => {
81
+ return options.includeDisabled ? el.tagName.toLowerCase() === "dsa-tab" : el.tagName.toLowerCase() === "dsa-tab" && !el.disabled;
82
+ });
83
+ }
84
+ getAllPanels() {
85
+ return [...this.body.assignedElements()].filter(
86
+ (el) => el.tagName.toLowerCase() === "dsa-tab-panel"
87
+ );
88
+ }
89
+ getActiveTab() {
90
+ return this.tabs.find((el) => el.active);
91
+ }
92
+ handleClick(event) {
93
+ const target = event.target;
94
+ const tab = target.closest("dsa-tab");
95
+ const tabGroup = tab == null ? void 0 : tab.closest("dsa-tab-group");
96
+ if (tabGroup !== this) {
97
+ return;
98
+ }
99
+ if (tab !== null) {
100
+ this.setActiveTab(tab, { scrollBehavior: "smooth" });
101
+ }
102
+ }
103
+ handleKeyDown(event) {
104
+ const target = event.target;
105
+ const tab = target.closest("dsa-tab");
106
+ const tabGroup = tab == null ? void 0 : tab.closest("dsa-tab-group");
107
+ if (tabGroup !== this) {
108
+ return;
109
+ }
110
+ if (event.key === "Escape" && (tab == null ? void 0 : tab.closable) === true) {
111
+ this.emit("dsa-close");
112
+ event.preventDefault();
113
+ }
114
+ if (["Enter", " "].includes(event.key)) {
115
+ if (tab !== null) {
116
+ if (tab.closable) {
117
+ const closeButton = tab.shadowRoot.querySelector(
118
+ '[part~="close-button"]'
119
+ );
120
+ if ((closeButton == null ? void 0 : closeButton.hasFocus) === true) {
121
+ this.emit("dsa-close");
122
+ }
123
+ }
124
+ this.setActiveTab(tab, { scrollBehavior: "smooth" });
125
+ event.preventDefault();
126
+ }
127
+ }
128
+ if ([
129
+ "ArrowLeft",
130
+ "ArrowRight",
131
+ "ArrowUp",
132
+ "ArrowDown",
133
+ "Home",
134
+ "End",
135
+ "Escape"
136
+ ].includes(event.key)) {
137
+ const activeEl = this.tabs.find((t) => t.matches(":focus"));
138
+ const isRtl = this.localize.dir() === "rtl";
139
+ if ((activeEl == null ? void 0 : activeEl.tagName.toLowerCase()) === "dsa-tab") {
140
+ let index = this.tabs.indexOf(activeEl);
141
+ if (event.key === "Home") {
142
+ index = 0;
143
+ } else if (event.key === "End") {
144
+ index = this.tabs.length - 1;
145
+ } else if (["top", "bottom"].includes(this.placement) && event.key === (isRtl ? "ArrowRight" : "ArrowLeft") || ["start", "end"].includes(this.placement) && event.key === "ArrowUp") {
146
+ index--;
147
+ } else if (["top", "bottom"].includes(this.placement) && event.key === (isRtl ? "ArrowLeft" : "ArrowRight") || ["start", "end"].includes(this.placement) && event.key === "ArrowDown") {
148
+ index++;
149
+ }
150
+ if (index < 0) {
151
+ index = this.tabs.length - 1;
152
+ }
153
+ if (index > this.tabs.length - 1) {
154
+ index = 0;
155
+ }
156
+ this.tabs[index].focus({ preventScroll: true });
157
+ if (this.activation === "auto") {
158
+ this.setActiveTab(this.tabs[index], { scrollBehavior: "smooth" });
159
+ }
160
+ if (["top", "bottom"].includes(this.placement)) {
161
+ scrollIntoView(this.tabs[index], this.nav, "horizontal");
162
+ }
163
+ event.preventDefault();
164
+ }
165
+ }
166
+ }
167
+ handleScrollToStart() {
168
+ this.nav.scroll({
169
+ left: this.localize.dir() === "rtl" ? this.nav.scrollLeft + this.nav.clientWidth : this.nav.scrollLeft - this.nav.clientWidth,
170
+ behavior: "smooth"
171
+ });
172
+ }
173
+ handleScrollToEnd() {
174
+ this.nav.scroll({
175
+ left: this.localize.dir() === "rtl" ? this.nav.scrollLeft - this.nav.clientWidth : this.nav.scrollLeft + this.nav.clientWidth,
176
+ behavior: "smooth"
177
+ });
178
+ }
179
+ setActiveTab(tab, options) {
180
+ options = __spreadValues({
181
+ emitEvents: true,
182
+ scrollBehavior: "auto"
183
+ }, options);
184
+ if (tab !== this.activeTab && !tab.disabled) {
185
+ const previousTab = this.activeTab;
186
+ this.activeTab = tab;
187
+ this.tabs.map((el) => {
188
+ const isActive = el === this.activeTab;
189
+ el.active = isActive;
190
+ el.tab.tabIndex = isActive ? 0 : -1;
191
+ return el;
192
+ });
193
+ this.panels.map((el) => {
194
+ var _a;
195
+ return el.active = el.name === ((_a = this.activeTab) == null ? void 0 : _a.panel);
196
+ });
197
+ this.syncIndicator();
198
+ if (["top", "bottom"].includes(this.placement)) {
199
+ scrollIntoView(
200
+ this.activeTab,
201
+ this.nav,
202
+ "horizontal",
203
+ options.scrollBehavior
204
+ );
205
+ }
206
+ if (options.emitEvents) {
207
+ if (previousTab) {
208
+ this.emit("dsa-tab-hide", { detail: { name: previousTab.panel } });
209
+ }
210
+ this.emit("dsa-tab-show", { detail: { name: this.activeTab.panel } });
211
+ }
212
+ }
213
+ }
214
+ setAriaLabels() {
215
+ this.tabs.forEach((tab) => {
216
+ const panel = this.panels.find((el) => el.name === tab.panel);
217
+ if (panel) {
218
+ tab.setAttribute("aria-controls", panel.getAttribute("id"));
219
+ panel.setAttribute("aria-labelledby", tab.getAttribute("id"));
220
+ }
221
+ });
222
+ }
223
+ repositionIndicator() {
224
+ const currentTab = this.getActiveTab();
225
+ if (!currentTab) {
226
+ return;
227
+ }
228
+ const width = currentTab.clientWidth;
229
+ const height = currentTab.clientHeight;
230
+ const isRtl = this.localize.dir() === "rtl";
231
+ const allTabs = this.getAllTabs();
232
+ const precedingTabs = allTabs.slice(0, allTabs.indexOf(currentTab));
233
+ const offset = precedingTabs.reduce(
234
+ (previous, current) => ({
235
+ left: previous.left + current.clientWidth,
236
+ top: previous.top + current.clientHeight
237
+ }),
238
+ { left: 0, top: 0 }
239
+ );
240
+ switch (this.placement) {
241
+ case "top":
242
+ case "bottom":
243
+ this.indicator.style.width = `${width}px`;
244
+ this.indicator.style.height = "auto";
245
+ this.indicator.style.translate = isRtl ? `${-1 * offset.left}px` : `${offset.left}px`;
246
+ break;
247
+ case "start":
248
+ case "end":
249
+ this.indicator.style.width = "auto";
250
+ this.indicator.style.height = `${height}px`;
251
+ this.indicator.style.translate = `0 ${offset.top}px`;
252
+ break;
253
+ }
254
+ }
255
+ // This stores tabs and panels so we can refer to a cache instead of calling querySelectorAll() multiple times.
256
+ syncTabsAndPanels() {
257
+ this.tabs = this.getAllTabs({ includeDisabled: false });
258
+ this.panels = this.getAllPanels();
259
+ let activeIndex = -1;
260
+ this.tabs.forEach((tab, index) => {
261
+ tab.tab.tabIndex = -1;
262
+ if (tab.active) {
263
+ tab.tab.tabIndex = 0;
264
+ activeIndex = index;
265
+ }
266
+ });
267
+ activeIndex = activeIndex === -1 ? 0 : activeIndex;
268
+ if (this.tabs[activeIndex] !== void 0) {
269
+ this.tabs[activeIndex].active = true;
270
+ }
271
+ if (this.panels[activeIndex] !== void 0) {
272
+ this.panels[activeIndex].active = true;
273
+ }
274
+ this.syncIndicator();
275
+ this.updateComplete.then(() => this.updateScrollControls());
276
+ }
277
+ updateScrollControls() {
278
+ this.hasScrollControls = ["top", "bottom"].includes(this.placement) && this.nav.scrollWidth > this.nav.clientWidth;
279
+ }
280
+ syncIndicator() {
281
+ const tab = this.getActiveTab();
282
+ if (tab) {
283
+ this.indicator.style.display = "block";
284
+ this.repositionIndicator();
285
+ } else {
286
+ this.indicator.style.display = "none";
287
+ }
288
+ }
289
+ /** Shows the specified tab panel. */
290
+ show(panel) {
291
+ const tab = this.tabs.find((el) => el.panel === panel);
292
+ if (tab) {
293
+ this.setActiveTab(tab, { scrollBehavior: "smooth" });
294
+ }
295
+ }
296
+ render() {
297
+ const isRtl = this.localize.dir() === "rtl";
298
+ return html`
299
+ <div
300
+ class=${classMap({
301
+ "tab-group": true,
302
+ "tab-group--top": this.placement === "top",
303
+ "tab-group--bottom": this.placement === "bottom",
304
+ "tab-group--start": this.placement === "start",
305
+ "tab-group--end": this.placement === "end",
306
+ "tab-group--rtl": this.localize.dir() === "rtl",
307
+ "tab-group--has-scroll-controls": this.hasScrollControls
308
+ })}
309
+ @click=${this.handleClick}
310
+ @keydown=${this.handleKeyDown}
311
+ >
312
+ <div part="nav" class="tab-group__nav-container">
313
+ ${this.hasScrollControls ? html`
314
+ <dsa-icon-button
315
+ part="scroll-button scroll-button--start"
316
+ exportparts="base:scroll-button__base"
317
+ class="tab-group__scroll-button tab-group__scroll-button--start"
318
+ name=${isRtl ? "chevron_right" : "chevron_left"}
319
+ label=${this.localize.term("scrollToStart")}
320
+ @click=${this.handleScrollToStart}
321
+ ></dsa-icon-button>
322
+ ` : ""}
323
+
324
+ <div class="tab-group__nav">
325
+ <div part="tabs" class="tab-group__tabs" role="tablist">
326
+ <div
327
+ part="active-tab-indicator"
328
+ class="tab-group__indicator"
329
+ ></div>
330
+ <slot name="nav" @slotchange=${this.syncTabsAndPanels}></slot>
331
+ </div>
332
+ </div>
333
+
334
+ ${this.hasScrollControls ? html`
335
+ <dsa-icon-button
336
+ part="scroll-button scroll-button--end"
337
+ exportparts="base:scroll-button__base"
338
+ class="tab-group__scroll-button tab-group__scroll-button--end"
339
+ name=${isRtl ? "chevron_left" : "chevron_right"}
340
+ label=${this.localize.term("scrollToEnd")}
341
+ @click=${this.handleScrollToEnd}
342
+ ></dsa-icon-button>
343
+ ` : ""}
344
+ </div>
345
+
346
+ <slot
347
+ part="body"
348
+ class="tab-group__body"
349
+ @slotchange=${this.syncTabsAndPanels}
350
+ ></slot>
351
+ </div>
352
+ `;
353
+ }
354
+ };
355
+ DSATabGroup.styles = tab_group_styles_default;
356
+ __decorateClass([
357
+ query(".tab-group")
358
+ ], DSATabGroup.prototype, "tabGroup", 2);
359
+ __decorateClass([
360
+ query(".tab-group__body")
361
+ ], DSATabGroup.prototype, "body", 2);
362
+ __decorateClass([
363
+ query(".tab-group__nav")
364
+ ], DSATabGroup.prototype, "nav", 2);
365
+ __decorateClass([
366
+ query(".tab-group__indicator")
367
+ ], DSATabGroup.prototype, "indicator", 2);
368
+ __decorateClass([
369
+ state()
370
+ ], DSATabGroup.prototype, "hasScrollControls", 2);
371
+ __decorateClass([
372
+ state()
373
+ ], DSATabGroup.prototype, "placement", 2);
374
+ __decorateClass([
375
+ property()
376
+ ], DSATabGroup.prototype, "activation", 2);
377
+ __decorateClass([
378
+ watch("placement", { waitUntilFirstUpdate: true })
379
+ ], DSATabGroup.prototype, "syncIndicator", 1);
380
+ DSATabGroup = __decorateClass([
381
+ customElement("dsa-tab-group")
382
+ ], DSATabGroup);
383
+
384
+ export {
385
+ DSATabGroup
386
+ };
@@ -0,0 +1,48 @@
1
+ import {
2
+ __spreadProps,
3
+ __spreadValues
4
+ } from "./chunk.6M63UXML.js";
5
+
6
+ // src/utilities/animation-registry.ts
7
+ var defaultAnimationRegistry = /* @__PURE__ */ new Map();
8
+ var customAnimationRegistry = /* @__PURE__ */ new WeakMap();
9
+ function ensureAnimation(animation) {
10
+ return animation != null ? animation : { keyframes: [], options: { duration: 0 } };
11
+ }
12
+ function getLogicalAnimation(animation, dir) {
13
+ if (dir.toLowerCase() === "rtl") {
14
+ return {
15
+ keyframes: animation.rtlKeyframes || animation.keyframes,
16
+ options: animation.options
17
+ };
18
+ }
19
+ return animation;
20
+ }
21
+ function setDefaultAnimation(animationName, animation) {
22
+ defaultAnimationRegistry.set(animationName, ensureAnimation(animation));
23
+ }
24
+ function setAnimation(el, animationName, animation) {
25
+ customAnimationRegistry.set(el, __spreadProps(__spreadValues({}, customAnimationRegistry.get(el)), {
26
+ [animationName]: ensureAnimation(animation)
27
+ }));
28
+ }
29
+ function getAnimation(el, animationName, options) {
30
+ const customAnimation = customAnimationRegistry.get(el);
31
+ if (customAnimation == null ? void 0 : customAnimation[animationName]) {
32
+ return getLogicalAnimation(customAnimation[animationName], options.dir);
33
+ }
34
+ const defaultAnimation = defaultAnimationRegistry.get(animationName);
35
+ if (defaultAnimation) {
36
+ return getLogicalAnimation(defaultAnimation, options.dir);
37
+ }
38
+ return {
39
+ keyframes: [],
40
+ options: { duration: 0 }
41
+ };
42
+ }
43
+
44
+ export {
45
+ setDefaultAnimation,
46
+ setAnimation,
47
+ getAnimation
48
+ };