@duetds/components 6.0.3 → 6.0.5

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 (434) hide show
  1. package/hydrate/index.js +77 -70
  2. package/lib/cjs/duet-action-button.cjs.entry.js +3 -3
  3. package/lib/cjs/duet-alert.cjs.entry.js +1 -1
  4. package/lib/cjs/duet-badge.cjs.entry.js +1 -1
  5. package/lib/cjs/duet-breadcrumb.cjs.entry.js +1 -1
  6. package/lib/cjs/duet-breadcrumbs.cjs.entry.js +1 -1
  7. package/lib/cjs/duet-button_2.cjs.entry.js +3 -3
  8. package/lib/cjs/duet-caption_4.cjs.entry.js +3 -3
  9. package/lib/cjs/duet-card.cjs.entry.js +3 -3
  10. package/lib/cjs/duet-checkbox.cjs.entry.js +1 -1
  11. package/lib/cjs/duet-choice_2.cjs.entry.js +10 -9
  12. package/lib/cjs/duet-collapsible.cjs.entry.js +2 -2
  13. package/lib/cjs/duet-combobox.cjs.entry.js +1 -1
  14. package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
  15. package/lib/cjs/duet-date-picker.cjs.entry.js +2 -2
  16. package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
  17. package/lib/cjs/duet-editable-table_3.cjs.entry.js +17 -14
  18. package/lib/cjs/duet-empty-state.cjs.entry.js +1 -1
  19. package/lib/cjs/duet-fieldset.cjs.entry.js +1 -1
  20. package/lib/cjs/duet-footer.cjs.entry.js +1 -1
  21. package/lib/cjs/duet-grid_2.cjs.entry.js +2 -2
  22. package/lib/cjs/duet-header_2.cjs.entry.js +3 -3
  23. package/lib/cjs/duet-hero.cjs.entry.js +1 -1
  24. package/lib/cjs/duet-icon.cjs.entry.js +3 -3
  25. package/lib/cjs/duet-input_2.cjs.entry.js +1 -1
  26. package/lib/cjs/duet-layout.cjs.entry.js +1 -1
  27. package/lib/cjs/duet-list_2.cjs.entry.js +1 -1
  28. package/lib/cjs/duet-modal.cjs.entry.js +2 -2
  29. package/lib/cjs/duet-notification_2.cjs.entry.js +1 -1
  30. package/lib/cjs/duet-number-input.cjs.entry.js +1 -1
  31. package/lib/cjs/duet-pagination_2.cjs.entry.js +25 -27
  32. package/lib/cjs/duet-progress.cjs.entry.js +1 -1
  33. package/lib/cjs/duet-radio_2.cjs.entry.js +1 -1
  34. package/lib/cjs/duet-range-slider.cjs.entry.js +2 -2
  35. package/lib/cjs/duet-scrollable_3.cjs.entry.js +1 -1
  36. package/lib/cjs/duet-select.cjs.entry.js +1 -1
  37. package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
  38. package/lib/cjs/duet-textarea.cjs.entry.js +1 -1
  39. package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
  40. package/lib/cjs/duet-tooltip.cjs.entry.js +1 -1
  41. package/lib/cjs/duet-tray.cjs.entry.js +2 -2
  42. package/lib/cjs/duet-upload-aria-status.cjs.entry.js +1 -1
  43. package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
  44. package/lib/cjs/duet.cjs.js +1 -1
  45. package/lib/cjs/{focus-utils-15207057.js → focus-utils-bbba1f98.js} +1 -1
  46. package/lib/cjs/{index-28a9133b.js → index-af927d29.js} +1 -1
  47. package/lib/cjs/loader.cjs.js +1 -1
  48. package/lib/cjs/{token-utils-fef5b4eb.js → token-utils-f6e2f4ef.js} +1 -1
  49. package/lib/cjs/{tokens-29450bcb.js → tokens-4c69b122.js} +18 -15
  50. package/lib/cjs/{tokens.module-ef598645.js → tokens.module-1bb2d45e.js} +12 -10
  51. package/lib/collection/components/duet-choice/duet-choice.js +4 -4
  52. package/lib/collection/components/duet-choice-group/duet-choice-group.js +4 -3
  53. package/lib/collection/components/duet-range-stepper/duet-range-stepper.js +25 -27
  54. package/lib/collection/components/duet-upload/duet-upload.js +18 -15
  55. package/lib/dist-custom-elements/duet-action-button.d.ts +11 -0
  56. package/lib/dist-custom-elements/duet-action-button.js +9 -0
  57. package/lib/dist-custom-elements/duet-alert.d.ts +11 -0
  58. package/lib/dist-custom-elements/duet-alert.js +9 -0
  59. package/lib/dist-custom-elements/duet-badge.d.ts +11 -0
  60. package/lib/dist-custom-elements/duet-badge.js +9 -0
  61. package/lib/dist-custom-elements/duet-breadcrumb.d.ts +11 -0
  62. package/lib/dist-custom-elements/duet-breadcrumb.js +73 -0
  63. package/lib/dist-custom-elements/duet-breadcrumbs.d.ts +11 -0
  64. package/lib/dist-custom-elements/duet-breadcrumbs.js +90 -0
  65. package/lib/dist-custom-elements/duet-button.d.ts +11 -0
  66. package/lib/dist-custom-elements/duet-button.js +9 -0
  67. package/lib/dist-custom-elements/duet-caption.d.ts +11 -0
  68. package/lib/dist-custom-elements/duet-caption.js +9 -0
  69. package/lib/dist-custom-elements/duet-card.d.ts +11 -0
  70. package/lib/dist-custom-elements/duet-card.js +190 -0
  71. package/lib/dist-custom-elements/duet-checkbox.d.ts +11 -0
  72. package/lib/dist-custom-elements/duet-checkbox.js +163 -0
  73. package/lib/dist-custom-elements/duet-choice-group.d.ts +11 -0
  74. package/lib/dist-custom-elements/duet-choice-group.js +227 -0
  75. package/lib/dist-custom-elements/duet-choice.d.ts +11 -0
  76. package/lib/dist-custom-elements/duet-choice.js +390 -0
  77. package/lib/dist-custom-elements/duet-collapsible.d.ts +11 -0
  78. package/lib/dist-custom-elements/duet-collapsible.js +170 -0
  79. package/lib/dist-custom-elements/duet-combobox.d.ts +11 -0
  80. package/lib/dist-custom-elements/duet-combobox.js +432 -0
  81. package/lib/dist-custom-elements/duet-cookie-consent.d.ts +11 -0
  82. package/lib/dist-custom-elements/duet-cookie-consent.js +94 -0
  83. package/lib/dist-custom-elements/duet-date-picker.d.ts +11 -0
  84. package/lib/dist-custom-elements/duet-date-picker.js +906 -0
  85. package/lib/dist-custom-elements/duet-divider.d.ts +11 -0
  86. package/lib/dist-custom-elements/duet-divider.js +9 -0
  87. package/lib/dist-custom-elements/duet-editable-table.d.ts +11 -0
  88. package/lib/dist-custom-elements/duet-editable-table.js +9 -0
  89. package/lib/dist-custom-elements/duet-empty-state.d.ts +11 -0
  90. package/lib/dist-custom-elements/duet-empty-state.js +9 -0
  91. package/lib/dist-custom-elements/duet-fieldset.d.ts +11 -0
  92. package/lib/dist-custom-elements/duet-fieldset.js +9 -0
  93. package/lib/dist-custom-elements/duet-footer.d.ts +11 -0
  94. package/lib/dist-custom-elements/duet-footer.js +199 -0
  95. package/lib/dist-custom-elements/duet-grid-item.d.ts +11 -0
  96. package/lib/dist-custom-elements/duet-grid-item.js +9 -0
  97. package/lib/dist-custom-elements/duet-grid.d.ts +11 -0
  98. package/lib/dist-custom-elements/duet-grid.js +9 -0
  99. package/lib/dist-custom-elements/duet-header.d.ts +11 -0
  100. package/lib/dist-custom-elements/duet-header.js +764 -0
  101. package/lib/dist-custom-elements/duet-heading.d.ts +11 -0
  102. package/lib/dist-custom-elements/duet-heading.js +9 -0
  103. package/lib/dist-custom-elements/duet-hero.d.ts +11 -0
  104. package/lib/dist-custom-elements/duet-hero.js +314 -0
  105. package/lib/dist-custom-elements/duet-icon.d.ts +11 -0
  106. package/lib/dist-custom-elements/duet-icon.js +9 -0
  107. package/lib/dist-custom-elements/duet-input.d.ts +11 -0
  108. package/lib/dist-custom-elements/duet-input.js +9 -0
  109. package/lib/dist-custom-elements/duet-label.d.ts +11 -0
  110. package/lib/dist-custom-elements/duet-label.js +9 -0
  111. package/lib/dist-custom-elements/duet-layout.d.ts +11 -0
  112. package/lib/dist-custom-elements/duet-layout.js +107 -0
  113. package/lib/dist-custom-elements/duet-link.d.ts +11 -0
  114. package/lib/dist-custom-elements/duet-link.js +9 -0
  115. package/lib/dist-custom-elements/duet-list-item.d.ts +11 -0
  116. package/lib/dist-custom-elements/duet-list-item.js +9 -0
  117. package/lib/dist-custom-elements/duet-list.d.ts +11 -0
  118. package/lib/dist-custom-elements/duet-list.js +9 -0
  119. package/lib/dist-custom-elements/duet-logo.d.ts +11 -0
  120. package/lib/dist-custom-elements/duet-logo.js +9 -0
  121. package/lib/dist-custom-elements/duet-modal.d.ts +11 -0
  122. package/lib/dist-custom-elements/duet-modal.js +331 -0
  123. package/lib/dist-custom-elements/duet-notification-drawer.d.ts +11 -0
  124. package/lib/dist-custom-elements/duet-notification-drawer.js +194 -0
  125. package/lib/dist-custom-elements/duet-notification.d.ts +11 -0
  126. package/lib/dist-custom-elements/duet-notification.js +114 -0
  127. package/lib/dist-custom-elements/duet-number-input.d.ts +11 -0
  128. package/lib/dist-custom-elements/duet-number-input.js +516 -0
  129. package/lib/dist-custom-elements/duet-pagination.d.ts +11 -0
  130. package/lib/dist-custom-elements/duet-pagination.js +396 -0
  131. package/lib/dist-custom-elements/duet-paragraph.d.ts +11 -0
  132. package/lib/dist-custom-elements/duet-paragraph.js +9 -0
  133. package/lib/dist-custom-elements/duet-progress.d.ts +11 -0
  134. package/lib/dist-custom-elements/duet-progress.js +9 -0
  135. package/lib/dist-custom-elements/duet-radio-group.d.ts +11 -0
  136. package/lib/dist-custom-elements/duet-radio-group.js +216 -0
  137. package/lib/dist-custom-elements/duet-radio.d.ts +11 -0
  138. package/lib/dist-custom-elements/duet-radio.js +167 -0
  139. package/lib/dist-custom-elements/duet-range-slider.d.ts +11 -0
  140. package/lib/dist-custom-elements/duet-range-slider.js +209 -0
  141. package/lib/dist-custom-elements/duet-range-stepper.d.ts +11 -0
  142. package/lib/dist-custom-elements/duet-range-stepper.js +223 -0
  143. package/lib/dist-custom-elements/duet-scrollable.d.ts +11 -0
  144. package/lib/dist-custom-elements/duet-scrollable.js +9 -0
  145. package/lib/dist-custom-elements/duet-select.d.ts +11 -0
  146. package/lib/dist-custom-elements/duet-select.js +9 -0
  147. package/lib/dist-custom-elements/duet-spacer.d.ts +11 -0
  148. package/lib/dist-custom-elements/duet-spacer.js +9 -0
  149. package/lib/dist-custom-elements/duet-spinner.d.ts +11 -0
  150. package/lib/dist-custom-elements/duet-spinner.js +9 -0
  151. package/lib/dist-custom-elements/duet-step.d.ts +11 -0
  152. package/lib/dist-custom-elements/duet-step.js +150 -0
  153. package/lib/dist-custom-elements/duet-stepper.d.ts +11 -0
  154. package/lib/dist-custom-elements/duet-stepper.js +164 -0
  155. package/lib/dist-custom-elements/duet-tab-group.d.ts +11 -0
  156. package/lib/dist-custom-elements/duet-tab-group.js +301 -0
  157. package/lib/dist-custom-elements/duet-tab.d.ts +11 -0
  158. package/lib/dist-custom-elements/duet-tab.js +59 -0
  159. package/lib/dist-custom-elements/duet-table.d.ts +11 -0
  160. package/lib/dist-custom-elements/duet-table.js +9 -0
  161. package/lib/dist-custom-elements/duet-textarea.d.ts +11 -0
  162. package/lib/dist-custom-elements/duet-textarea.js +297 -0
  163. package/lib/dist-custom-elements/duet-toggle.d.ts +11 -0
  164. package/lib/dist-custom-elements/duet-toggle.js +150 -0
  165. package/lib/dist-custom-elements/duet-tooltip.d.ts +11 -0
  166. package/lib/dist-custom-elements/duet-tooltip.js +9 -0
  167. package/lib/dist-custom-elements/duet-tray.d.ts +11 -0
  168. package/lib/dist-custom-elements/duet-tray.js +175 -0
  169. package/lib/dist-custom-elements/duet-upload-aria-status.d.ts +11 -0
  170. package/lib/dist-custom-elements/duet-upload-aria-status.js +9 -0
  171. package/lib/dist-custom-elements/duet-upload.d.ts +11 -0
  172. package/lib/dist-custom-elements/duet-upload.js +1514 -0
  173. package/lib/dist-custom-elements/duet-visually-hidden.d.ts +11 -0
  174. package/lib/dist-custom-elements/duet-visually-hidden.js +9 -0
  175. package/lib/dist-custom-elements/index.d.ts +26 -0
  176. package/lib/dist-custom-elements/index.js +37 -0
  177. package/lib/{esm/tokens-8ff8c570.js → dist-custom-elements/p-02305a1e.js} +18 -15
  178. package/lib/dist-custom-elements/p-0b3f675e.js +47 -0
  179. package/lib/{esm/focus-utils-559691b3.js → dist-custom-elements/p-0b8f16f1.js} +1 -1
  180. package/lib/dist-custom-elements/p-0ce83b83.js +154 -0
  181. package/lib/dist-custom-elements/p-0f5b2dfe.js +287 -0
  182. package/lib/dist-custom-elements/p-115c79b6.js +6 -0
  183. package/lib/dist-custom-elements/p-12721178.js +57 -0
  184. package/lib/dist-custom-elements/p-166d7b9c.js +199 -0
  185. package/lib/dist-custom-elements/p-1ad6b04e.js +1666 -0
  186. package/lib/dist-custom-elements/p-21887c28.js +275 -0
  187. package/lib/dist-custom-elements/p-24c2ac51.js +114 -0
  188. package/lib/dist-custom-elements/p-266411cf.js +307 -0
  189. package/lib/dist-custom-elements/p-2bb345c0.js +193 -0
  190. package/lib/dist-custom-elements/p-32a67b55.js +87 -0
  191. package/lib/dist-custom-elements/p-4c52333e.js +341 -0
  192. package/lib/dist-custom-elements/p-4ebf1618.js +13 -0
  193. package/lib/dist-custom-elements/p-4f516732.js +214 -0
  194. package/lib/dist-custom-elements/p-53a0c93d.js +37 -0
  195. package/lib/dist-custom-elements/p-544d933d.js +61 -0
  196. package/lib/dist-custom-elements/p-56118313.js +53 -0
  197. package/lib/dist-custom-elements/p-56b5945f.js +160 -0
  198. package/lib/dist-custom-elements/p-5a9d75e1.js +55 -0
  199. package/lib/dist-custom-elements/p-692cc270.js +125 -0
  200. package/lib/dist-custom-elements/p-6cae0682.js +75 -0
  201. package/lib/dist-custom-elements/p-704245ef.js +9 -0
  202. package/lib/dist-custom-elements/p-76f00bd5.js +10 -0
  203. package/lib/dist-custom-elements/p-7a003d73.js +37 -0
  204. package/lib/dist-custom-elements/p-7f5ad01d.js +64 -0
  205. package/lib/{esm/token-utils-df78f4d8.js → dist-custom-elements/p-86faf728.js} +1 -1
  206. package/lib/dist-custom-elements/p-8f69f7ca.js +428 -0
  207. package/lib/dist-custom-elements/p-92012dcc.js +71 -0
  208. package/lib/dist-custom-elements/p-9af8e9da.js +70 -0
  209. package/lib/dist-custom-elements/p-a087e30a.js +86 -0
  210. package/lib/dist-custom-elements/p-b9058029.js +138 -0
  211. package/lib/dist-custom-elements/p-bd779757.js +184 -0
  212. package/lib/dist-custom-elements/p-c0469b33.js +133 -0
  213. package/lib/dist-custom-elements/p-c1325e35.js +11 -0
  214. package/lib/dist-custom-elements/p-c8d44e6d.js +87 -0
  215. package/lib/dist-custom-elements/p-cfab50b5.js +110 -0
  216. package/lib/dist-custom-elements/p-d004da5f.js +6 -0
  217. package/lib/dist-custom-elements/p-d11287e1.js +129 -0
  218. package/lib/dist-custom-elements/p-d4c234ed.js +390 -0
  219. package/lib/dist-custom-elements/p-d8549efe.js +20 -0
  220. package/lib/dist-custom-elements/p-db91a981.js +98 -0
  221. package/lib/dist-custom-elements/p-e121eb6d.js +241 -0
  222. package/lib/dist-custom-elements/p-ede854e1.js +92 -0
  223. package/lib/dist-custom-elements/p-ee9a63c3.js +65 -0
  224. package/lib/dist-custom-elements/p-f11208c3.js +6 -0
  225. package/lib/dist-custom-elements/p-f1d0dca7.js +275 -0
  226. package/lib/dist-custom-elements/p-fb6be4e4.js +66 -0
  227. package/lib/duet/duet.esm.js +1 -1
  228. package/lib/duet/duet.js +1 -1
  229. package/lib/duet/{p-4c93a18e.system.entry.js → p-01ec746a.system.entry.js} +1 -1
  230. package/lib/duet/p-02305a1e.js +4 -0
  231. package/lib/duet/{p-674e546f.system.entry.js → p-02a0c4f6.system.entry.js} +1 -1
  232. package/lib/duet/{p-b01e2523.entry.js → p-02fec3bd.entry.js} +1 -1
  233. package/lib/duet/{p-300147ad.entry.js → p-032a5071.entry.js} +1 -1
  234. package/lib/duet/{p-0626271f.entry.js → p-08fe21b1.entry.js} +1 -1
  235. package/lib/duet/{p-d0cee171.entry.js → p-0b0c7f09.entry.js} +1 -1
  236. package/lib/duet/{p-1931d33f.system.js → p-100c6ed7.system.js} +1 -1
  237. package/lib/duet/{p-dab594cf.system.entry.js → p-168a22df.system.entry.js} +1 -1
  238. package/lib/duet/p-1fc60a60.system.js +4 -0
  239. package/lib/duet/{p-bb9624c3.entry.js → p-24dafa59.entry.js} +1 -1
  240. package/lib/duet/{p-d444107c.system.entry.js → p-28fcab59.system.entry.js} +1 -1
  241. package/lib/duet/{p-db15d420.system.entry.js → p-292ab686.system.entry.js} +1 -1
  242. package/lib/duet/{p-de986d77.system.entry.js → p-293b8c58.system.entry.js} +1 -1
  243. package/lib/duet/{p-9308c1e6.entry.js → p-2c698aec.entry.js} +1 -1
  244. package/lib/duet/p-32f7178a.system.js +4 -0
  245. package/lib/duet/{p-92d95bde.system.entry.js → p-3967595b.system.entry.js} +1 -1
  246. package/lib/duet/{p-72443e94.system.entry.js → p-414b1ba7.system.entry.js} +1 -1
  247. package/lib/duet/{p-ae515c54.entry.js → p-422d7157.entry.js} +1 -1
  248. package/lib/duet/{p-9fcac068.system.entry.js → p-4df190b5.system.entry.js} +1 -1
  249. package/lib/duet/{p-c41b07d7.entry.js → p-50eb1959.entry.js} +1 -1
  250. package/lib/duet/{p-de3c0f4d.js → p-532e9db7.js} +1 -1
  251. package/lib/duet/{p-16521f2d.entry.js → p-552ce747.entry.js} +1 -1
  252. package/lib/duet/{p-398a79a0.js → p-588be556.js} +1 -1
  253. package/lib/duet/{p-b008fe25.entry.js → p-58c58219.entry.js} +1 -1
  254. package/lib/duet/{p-2bd79d6b.entry.js → p-5b7db3d5.entry.js} +1 -1
  255. package/lib/duet/{p-5d967d15.entry.js → p-5bb6f856.entry.js} +1 -1
  256. package/lib/duet/{p-20271117.entry.js → p-62ff683a.entry.js} +1 -1
  257. package/lib/duet/{p-e1654a8b.system.entry.js → p-65206bf2.system.entry.js} +1 -1
  258. package/lib/duet/{p-2bba6489.entry.js → p-66bb00c2.entry.js} +1 -1
  259. package/lib/duet/{p-49db53a1.system.entry.js → p-6cc35a71.system.entry.js} +1 -1
  260. package/lib/duet/{p-63dbd5af.system.entry.js → p-7431ad27.system.entry.js} +1 -1
  261. package/lib/duet/{p-df11c241.system.entry.js → p-74bcd39f.system.entry.js} +1 -1
  262. package/lib/duet/{p-e2ac0727.system.entry.js → p-76fd11ff.system.entry.js} +1 -1
  263. package/lib/duet/{p-339e5901.system.js → p-7871ef0a.system.js} +1 -1
  264. package/lib/duet/{p-1aca544d.entry.js → p-79160b90.entry.js} +1 -1
  265. package/lib/duet/{p-23ad5f8a.entry.js → p-7d71fd3b.entry.js} +1 -1
  266. package/lib/duet/{p-946aa901.system.entry.js → p-7d866e2a.system.entry.js} +1 -1
  267. package/lib/duet/{p-9e54127f.system.entry.js → p-83120829.system.entry.js} +1 -1
  268. package/lib/duet/{p-d0f72f22.js → p-85c3f82e.js} +1 -1
  269. package/lib/duet/{p-06ab2787.system.entry.js → p-85df6ff1.system.entry.js} +1 -1
  270. package/lib/duet/{p-68c3b19f.entry.js → p-86567f28.entry.js} +1 -1
  271. package/lib/duet/{p-104bf1b5.entry.js → p-8669b09e.entry.js} +1 -1
  272. package/lib/duet/{p-9f18afd6.entry.js → p-88819152.entry.js} +1 -1
  273. package/lib/duet/{p-5d1787cb.entry.js → p-89dc739e.entry.js} +1 -1
  274. package/lib/duet/{p-6c875cfa.system.entry.js → p-8a4d7ae9.system.entry.js} +1 -1
  275. package/lib/duet/{p-571440c7.system.entry.js → p-8edd208a.system.entry.js} +1 -1
  276. package/lib/duet/{p-691f609b.entry.js → p-8efd9495.entry.js} +1 -1
  277. package/lib/duet/{p-c5499bc3.entry.js → p-8f222a1b.entry.js} +1 -1
  278. package/lib/duet/{p-6b0a4b3b.entry.js → p-98ba3424.entry.js} +1 -1
  279. package/lib/duet/{p-31004a7b.system.entry.js → p-996ba330.system.entry.js} +1 -1
  280. package/lib/duet/{p-de815460.system.entry.js → p-9999e5fa.system.entry.js} +1 -1
  281. package/lib/duet/{p-de146ffa.system.entry.js → p-9bae46c2.system.entry.js} +1 -1
  282. package/lib/duet/{p-ab2f08b3.system.entry.js → p-9cb366b1.system.entry.js} +1 -1
  283. package/lib/duet/{p-8c409ffe.system.entry.js → p-a3de163c.system.entry.js} +1 -1
  284. package/lib/duet/{p-064dd5fd.entry.js → p-a40a7074.entry.js} +1 -1
  285. package/lib/duet/{p-1010fb94.entry.js → p-a463d7ba.entry.js} +1 -1
  286. package/lib/duet/{p-087d72dd.system.entry.js → p-a755f378.system.entry.js} +1 -1
  287. package/lib/duet/{p-b066a6b7.entry.js → p-a78c751d.entry.js} +1 -1
  288. package/lib/duet/{p-c8d9da51.entry.js → p-aae486b1.entry.js} +1 -1
  289. package/lib/duet/{p-0f7f7e7d.system.entry.js → p-ade95c1a.system.entry.js} +1 -1
  290. package/lib/duet/{p-9f8a51b4.system.entry.js → p-ae270d5c.system.entry.js} +1 -1
  291. package/lib/duet/{p-94c07a46.system.entry.js → p-afd48ab5.system.entry.js} +1 -1
  292. package/lib/duet/{p-f2eaad1e.js → p-b1931fae.js} +1 -1
  293. package/lib/duet/{p-e3983bfe.entry.js → p-b1b6bfaf.entry.js} +1 -1
  294. package/lib/duet/{p-6eecfced.system.entry.js → p-bcaa46bc.system.entry.js} +1 -1
  295. package/lib/duet/{p-eb54474f.system.entry.js → p-bd95bbac.system.entry.js} +1 -1
  296. package/lib/duet/{p-09364233.entry.js → p-c14e364f.entry.js} +1 -1
  297. package/lib/duet/{p-074bfd45.entry.js → p-cd24ed34.entry.js} +1 -1
  298. package/lib/duet/{p-8157e5bb.system.entry.js → p-ceaefc71.system.entry.js} +1 -1
  299. package/lib/duet/{p-18cc5627.system.js → p-d209191d.system.js} +1 -1
  300. package/lib/duet/{p-5658ac20.system.entry.js → p-d33ad700.system.entry.js} +1 -1
  301. package/lib/duet/{p-41cb95cb.entry.js → p-d5700477.entry.js} +1 -1
  302. package/lib/duet/{p-b3dc55a6.system.entry.js → p-d8c1e717.system.entry.js} +1 -1
  303. package/lib/duet/{p-cca9c605.system.entry.js → p-d8e4683f.system.entry.js} +1 -1
  304. package/lib/duet/{p-0ae59d7c.entry.js → p-db5582e2.entry.js} +1 -1
  305. package/lib/duet/{p-f7ac05dd.system.entry.js → p-dc3379cf.system.entry.js} +1 -1
  306. package/lib/duet/{p-cfa50753.system.js → p-ddc42b65.system.js} +1 -1
  307. package/lib/duet/{p-3cc55c8a.system.entry.js → p-e1c35023.system.entry.js} +1 -1
  308. package/lib/duet/p-e6d75fab.entry.js +4 -0
  309. package/lib/duet/{p-89048c6f.entry.js → p-e99cfa9a.entry.js} +1 -1
  310. package/lib/duet/{p-4034b322.system.entry.js → p-ec08089e.system.entry.js} +1 -1
  311. package/lib/duet/{p-bec24271.system.entry.js → p-ec45b5c6.system.entry.js} +1 -1
  312. package/lib/duet/{p-5beb69ac.entry.js → p-ed41265b.entry.js} +1 -1
  313. package/lib/duet/{p-744ce6ce.entry.js → p-ed985877.entry.js} +1 -1
  314. package/lib/duet/p-f5cac1af.entry.js +4 -0
  315. package/lib/duet/{p-e0f6ebf4.system.entry.js → p-f6725c7b.system.entry.js} +1 -1
  316. package/lib/duet/{p-c2e37fb4.entry.js → p-f7012b1f.entry.js} +1 -1
  317. package/lib/duet/{p-23ba48a5.system.entry.js → p-f7856429.system.entry.js} +1 -1
  318. package/lib/duet/{p-97a369d6.entry.js → p-f9d05a5c.entry.js} +1 -1
  319. package/lib/duet/{p-ef4b4f35.entry.js → p-fb798cb8.entry.js} +1 -1
  320. package/lib/duet/{p-47ed8218.entry.js → p-fcbf70a6.entry.js} +1 -1
  321. package/lib/duet/{p-3d029dce.system.entry.js → p-fcc58f66.system.entry.js} +1 -1
  322. package/lib/duet/{p-db115036.entry.js → p-fdd0a7df.entry.js} +1 -1
  323. package/lib/duet/{p-6841adb8.system.entry.js → p-feae179e.system.entry.js} +1 -1
  324. package/lib/esm/duet-action-button.entry.js +3 -3
  325. package/lib/esm/duet-alert.entry.js +1 -1
  326. package/lib/esm/duet-badge.entry.js +1 -1
  327. package/lib/esm/duet-breadcrumb.entry.js +1 -1
  328. package/lib/esm/duet-breadcrumbs.entry.js +1 -1
  329. package/lib/esm/duet-button_2.entry.js +3 -3
  330. package/lib/esm/duet-caption_4.entry.js +3 -3
  331. package/lib/esm/duet-card.entry.js +3 -3
  332. package/lib/esm/duet-checkbox.entry.js +1 -1
  333. package/lib/esm/duet-choice_2.entry.js +10 -9
  334. package/lib/esm/duet-collapsible.entry.js +2 -2
  335. package/lib/esm/duet-combobox.entry.js +1 -1
  336. package/lib/esm/duet-cookie-consent.entry.js +1 -1
  337. package/lib/esm/duet-date-picker.entry.js +2 -2
  338. package/lib/esm/duet-divider_2.entry.js +1 -1
  339. package/lib/esm/duet-editable-table_3.entry.js +17 -14
  340. package/lib/esm/duet-empty-state.entry.js +1 -1
  341. package/lib/esm/duet-fieldset.entry.js +1 -1
  342. package/lib/esm/duet-footer.entry.js +1 -1
  343. package/lib/esm/duet-grid_2.entry.js +2 -2
  344. package/lib/esm/duet-header_2.entry.js +3 -3
  345. package/lib/esm/duet-hero.entry.js +1 -1
  346. package/lib/esm/duet-icon.entry.js +3 -3
  347. package/lib/esm/duet-input_2.entry.js +1 -1
  348. package/lib/esm/duet-layout.entry.js +1 -1
  349. package/lib/esm/duet-list_2.entry.js +1 -1
  350. package/lib/esm/duet-modal.entry.js +2 -2
  351. package/lib/esm/duet-notification_2.entry.js +1 -1
  352. package/lib/esm/duet-number-input.entry.js +1 -1
  353. package/lib/esm/duet-pagination_2.entry.js +25 -27
  354. package/lib/esm/duet-progress.entry.js +1 -1
  355. package/lib/esm/duet-radio_2.entry.js +1 -1
  356. package/lib/esm/duet-range-slider.entry.js +2 -2
  357. package/lib/esm/duet-scrollable_3.entry.js +1 -1
  358. package/lib/esm/duet-select.entry.js +1 -1
  359. package/lib/esm/duet-step_2.entry.js +1 -1
  360. package/lib/esm/duet-textarea.entry.js +1 -1
  361. package/lib/esm/duet-toggle.entry.js +1 -1
  362. package/lib/esm/duet-tooltip.entry.js +1 -1
  363. package/lib/esm/duet-tray.entry.js +2 -2
  364. package/lib/esm/duet-upload-aria-status.entry.js +1 -1
  365. package/lib/esm/duet-visually-hidden.entry.js +1 -1
  366. package/lib/esm/duet.js +1 -1
  367. package/lib/esm/focus-utils-b515b88b.js +18 -0
  368. package/lib/esm/{index-f600b8dc.js → index-d8c3ba71.js} +1 -1
  369. package/lib/esm/loader.js +1 -1
  370. package/lib/esm/token-utils-ebf797ab.js +92 -0
  371. package/lib/esm/tokens-b9d87fda.js +459 -0
  372. package/lib/esm/{tokens.module-f4572ed7.js → tokens.module-385c4cf8.js} +12 -10
  373. package/lib/esm-es5/duet-action-button.entry.js +1 -1
  374. package/lib/esm-es5/duet-alert.entry.js +1 -1
  375. package/lib/esm-es5/duet-badge.entry.js +1 -1
  376. package/lib/esm-es5/duet-breadcrumb.entry.js +1 -1
  377. package/lib/esm-es5/duet-breadcrumbs.entry.js +1 -1
  378. package/lib/esm-es5/duet-button_2.entry.js +1 -1
  379. package/lib/esm-es5/duet-caption_4.entry.js +1 -1
  380. package/lib/esm-es5/duet-card.entry.js +1 -1
  381. package/lib/esm-es5/duet-checkbox.entry.js +1 -1
  382. package/lib/esm-es5/duet-choice_2.entry.js +1 -1
  383. package/lib/esm-es5/duet-collapsible.entry.js +2 -2
  384. package/lib/esm-es5/duet-combobox.entry.js +1 -1
  385. package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
  386. package/lib/esm-es5/duet-date-picker.entry.js +1 -1
  387. package/lib/esm-es5/duet-divider_2.entry.js +1 -1
  388. package/lib/esm-es5/duet-editable-table_3.entry.js +1 -1
  389. package/lib/esm-es5/duet-empty-state.entry.js +1 -1
  390. package/lib/esm-es5/duet-fieldset.entry.js +1 -1
  391. package/lib/esm-es5/duet-footer.entry.js +1 -1
  392. package/lib/esm-es5/duet-grid_2.entry.js +1 -1
  393. package/lib/esm-es5/duet-header_2.entry.js +1 -1
  394. package/lib/esm-es5/duet-hero.entry.js +1 -1
  395. package/lib/esm-es5/duet-icon.entry.js +1 -1
  396. package/lib/esm-es5/duet-input_2.entry.js +1 -1
  397. package/lib/esm-es5/duet-layout.entry.js +1 -1
  398. package/lib/esm-es5/duet-list_2.entry.js +1 -1
  399. package/lib/esm-es5/duet-modal.entry.js +1 -1
  400. package/lib/esm-es5/duet-notification_2.entry.js +1 -1
  401. package/lib/esm-es5/duet-number-input.entry.js +1 -1
  402. package/lib/esm-es5/duet-pagination_2.entry.js +1 -1
  403. package/lib/esm-es5/duet-progress.entry.js +1 -1
  404. package/lib/esm-es5/duet-radio_2.entry.js +1 -1
  405. package/lib/esm-es5/duet-range-slider.entry.js +1 -1
  406. package/lib/esm-es5/duet-scrollable_3.entry.js +1 -1
  407. package/lib/esm-es5/duet-select.entry.js +1 -1
  408. package/lib/esm-es5/duet-step_2.entry.js +1 -1
  409. package/lib/esm-es5/duet-textarea.entry.js +1 -1
  410. package/lib/esm-es5/duet-toggle.entry.js +1 -1
  411. package/lib/esm-es5/duet-tooltip.entry.js +1 -1
  412. package/lib/esm-es5/duet-tray.entry.js +1 -1
  413. package/lib/esm-es5/duet-upload-aria-status.entry.js +1 -1
  414. package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
  415. package/lib/esm-es5/duet.js +1 -1
  416. package/lib/esm-es5/{focus-utils-559691b3.js → focus-utils-b515b88b.js} +1 -1
  417. package/lib/esm-es5/{index-f600b8dc.js → index-d8c3ba71.js} +1 -1
  418. package/lib/esm-es5/loader.js +1 -1
  419. package/lib/esm-es5/{token-utils-df78f4d8.js → token-utils-ebf797ab.js} +1 -1
  420. package/lib/esm-es5/tokens-b9d87fda.js +4 -0
  421. package/lib/esm-es5/{tokens.module-f4572ed7.js → tokens.module-385c4cf8.js} +1 -1
  422. package/lib/types/components/duet-choice-group/duet-choice-group.d.ts +1 -0
  423. package/lib/types/components/duet-range-stepper/duet-range-stepper.d.ts +2 -2
  424. package/lib/types/components/duet-upload/duet-upload.d.ts +8 -8
  425. package/lib/types/components.d.ts +6 -6
  426. package/package.json +5 -5
  427. package/lib/custom-elements-bundle/index.d.ts +0 -399
  428. package/lib/custom-elements-bundle/index.js +0 -14110
  429. package/lib/duet/p-6002f3d2.system.js +0 -4
  430. package/lib/duet/p-7c198c75.entry.js +0 -4
  431. package/lib/duet/p-a93a04b9.system.js +0 -4
  432. package/lib/duet/p-d1746325.js +0 -4
  433. package/lib/duet/p-f2ab3e5c.entry.js +0 -4
  434. package/lib/esm-es5/tokens-8ff8c570.js +0 -4
@@ -0,0 +1,114 @@
1
+ /*!
2
+ * Built with Duet Design System
3
+ */
4
+ import { p as proxyCustomElement, H, h } from './p-1ad6b04e.js';
5
+ import { i as inheritGlobalTheme } from './p-4ebf1618.js';
6
+ import { a as getLanguage, g as getLocaleString } from './p-ede854e1.js';
7
+ import { d as defineCustomElement$2 } from './p-53a0c93d.js';
8
+
9
+ const duetNotificationCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.duet-notification{display:block;padding:16px;color:#00294d;cursor:pointer;border-bottom:1px solid #e1e3e6;transition:300ms ease}:host(:last-of-type) .duet-notification{border-bottom:0}.duet-notification.duet-theme-turva{color:#171c3a;border-bottom-color:#e4e4e6}.duet-notification.duet-notification-highlight{font-weight:600;background:#f3f9fc}.duet-notification.duet-notification-highlight.duet-theme-turva{background:#fcf3f4}@media (min-width: 62em){.duet-notification:hover{background:#f3f9fc}.duet-notification:hover.duet-theme-turva{background:#fcf3f4}}.duet-notification a{text-decoration:none}.duet-notification a:focus{outline:0}:host(.user-is-tabbing) .duet-notification:focus-within{z-index:1;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing) .duet-notification:focus-within.duet-theme-turva{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-notification-container{position:relative;display:flex}.duet-notification-badge-container{position:relative;width:16px}.duet-notification-badge{position:absolute;top:6px;left:-2px;width:8px;height:8px;background:#0077b3;border-radius:50%}.duet-theme-turva .duet-notification-badge{background:#c60c30}.duet-notification-content{flex:1}.duet-notification-date{position:absolute;top:2px;right:0;width:96px;font-size:0.75rem;font-weight:600;line-height:1.25;color:#657787;text-align:right;text-transform:uppercase}@media (max-width: 35.9375em){.duet-notification-date{width:auto}}.duet-theme-turva .duet-notification-date{color:#444445}::slotted(duet-heading){padding-right:80px !important}::slotted(duet-paragraph){margin-bottom:2px !important}";
10
+
11
+ const DuetNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends H {
12
+ constructor() {
13
+ super();
14
+ this.__registerHost();
15
+ this.__attachShadow();
16
+ /**
17
+ * The currently active language.
18
+ * Used for announcing unread notifications to screen readers.
19
+ * @deprecated this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing
20
+ * @default "fi"
21
+ */
22
+ this.language = getLanguage();
23
+ /**
24
+ * Property to change accessibleLabelUnread defaults on the component.
25
+ * normally you would handle these strings on an application level and override @accessibleLabelUnread when needed
26
+ */
27
+ this.accessibleLabelUnreadDefaults = {
28
+ en: "Unread",
29
+ fi: "Lukematon",
30
+ sv: "Oläst",
31
+ };
32
+ /**
33
+ * Adds accessible label for tooltip that is shown over unread counter
34
+ * @default { en: "Unread", fi: "Lukematon", sv: "Oläst" }
35
+ */
36
+ this.accessibleLabelUnread = getLocaleString(this.accessibleLabelUnreadDefaults, this.language);
37
+ /**
38
+ * The url to open on notification click.
39
+ */
40
+ this.url = "#";
41
+ /**
42
+ * The date of the notification.
43
+ */
44
+ this.date = "";
45
+ /**
46
+ * Should the notification be visually highlighted?
47
+ */
48
+ this.highlight = false;
49
+ /**
50
+ * Should the link open in a new window?
51
+ */
52
+ this.external = false;
53
+ /**
54
+ * Theme of the notification.
55
+ */
56
+ this.theme = "";
57
+ }
58
+ /**
59
+ * Component lifecycle events.
60
+ */
61
+ componentWillLoad() {
62
+ inheritGlobalTheme(this);
63
+ }
64
+ /**
65
+ * Move focus to the notification's link element.
66
+ * Use this method instead of the native `focus()` method.
67
+ * @param options
68
+ */
69
+ async setFocus(options) {
70
+ this.linkElement.focus(options);
71
+ }
72
+ render() {
73
+ return (h("div", { role: "listitem", class: {
74
+ "duet-notification": true,
75
+ "duet-notification-highlight": this.highlight,
76
+ "duet-theme-turva": this.theme === "turva",
77
+ } }, h("a", { ref: element => (this.linkElement = element), href: this.url, target: this.external ? "_blank" : "_self" }, h("div", { class: "duet-notification-container" }, h("div", { class: "duet-notification-badge-container" }, this.highlight && (h("div", { class: "duet-notification-badge" }, h("duet-visually-hidden", null, this.accessibleLabelUnread, ":")))), h("div", { class: "duet-notification-content" }, h("slot", null)), h("div", { class: "duet-notification-date" }, this.date)))));
78
+ }
79
+ get element() { return this; }
80
+ static get style() { return duetNotificationCss; }
81
+ }, [1, "duet-notification", {
82
+ "language": [1],
83
+ "accessibleLabelUnreadDefaults": [16],
84
+ "accessibleLabelUnread": [1, "accessible-label-unread"],
85
+ "url": [1],
86
+ "date": [1],
87
+ "highlight": [4],
88
+ "external": [4],
89
+ "theme": [1025],
90
+ "setFocus": [64]
91
+ }]);
92
+ function defineCustomElement$1() {
93
+ if (typeof customElements === "undefined") {
94
+ return;
95
+ }
96
+ const components = ["duet-notification", "duet-visually-hidden"];
97
+ components.forEach(tagName => { switch (tagName) {
98
+ case "duet-notification":
99
+ if (!customElements.get(tagName)) {
100
+ customElements.define(tagName, DuetNotification$1);
101
+ }
102
+ break;
103
+ case "duet-visually-hidden":
104
+ if (!customElements.get(tagName)) {
105
+ defineCustomElement$2();
106
+ }
107
+ break;
108
+ } });
109
+ }
110
+
111
+ const DuetNotification = DuetNotification$1;
112
+ const defineCustomElement = defineCustomElement$1;
113
+
114
+ export { DuetNotification, defineCustomElement };
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface DuetNumberInput extends Components.DuetNumberInput, HTMLElement {}
4
+ export const DuetNumberInput: {
5
+ prototype: DuetNumberInput;
6
+ new (): DuetNumberInput;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,516 @@
1
+ /*!
2
+ * Built with Duet Design System
3
+ */
4
+ import { p as proxyCustomElement, H, c as createEvent, h, b as Host } from './p-1ad6b04e.js';
5
+ import { i as inheritGlobalTheme } from './p-4ebf1618.js';
6
+ import { c as createID } from './p-c1325e35.js';
7
+ import { j as isArrowRightKey, e as isArrowUpKey, f as isArrowDownKey, h as isArrowLeftKey, k as isBackspaceKey } from './p-d8549efe.js';
8
+ import { a as getLanguage, b as getLocale, g as getLocaleString } from './p-ede854e1.js';
9
+ import { d as defineCustomElement$7 } from './p-92012dcc.js';
10
+ import { d as defineCustomElement$6 } from './p-4f516732.js';
11
+ import { d as defineCustomElement$5 } from './p-8f69f7ca.js';
12
+ import { d as defineCustomElement$4 } from './p-fb6be4e4.js';
13
+ import { d as defineCustomElement$3 } from './p-f1d0dca7.js';
14
+ import { d as defineCustomElement$2 } from './p-53a0c93d.js';
15
+
16
+ var actionAdd={"title":"action-add","tags":"action add plus","svg":"<svg fill=\"currentColor\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\"><path d=\"M12 24a.75.75 0 0 1-.75-.75v-10.5H.75a.75.75 0 0 1 0-1.5h10.5V.75a.75.75 0 0 1 1.5 0v10.5h10.5a.75.75 0 0 1 0 1.5h-10.5v10.5A.75.75 0 0 1 12 24z\"/></svg>"};
17
+
18
+ var actionSubtract={"title":"action-subtract","tags":"action subtract minus remove delete cancel","svg":"<svg fill=\"currentColor\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\"><path d=\"M.75 12.788a.75.75 0 0 1 0-1.5h22.5a.75.75 0 0 1 0 1.5z\"/></svg>"};
19
+
20
+ /**
21
+ * function that takes a string value or number and looks for any character resembling a minus,
22
+ * it will then replace it with a hypen-minus and return the parseFloat value of that string
23
+ * it will string / number cast the value to a number and return that number
24
+ * known issues: if a negative number is indicated with other characters than a "minus like" character, it will throw
25
+ * - an example is that some locales use (number) as an indicator for negative values instead of -number
26
+ */
27
+ function SafeParseFloat(value, locale) {
28
+ let results;
29
+ if (typeof value === "string") {
30
+ //the minuses are NOT the same characters, they differ in unicode for some languages
31
+ // "‐", "−", "–", and "—"
32
+ let convertedMinus = value.replace("−", "-").replace("‐", "-").replace("−", "-").replace("–", "-").replace("—", "-");
33
+ if (locale) {
34
+ convertedMinus = ConvertToEnUS(convertedMinus, locale, false);
35
+ }
36
+ // replace all possible spaces from the string
37
+ convertedMinus = convertedMinus.replace(/\s+/g, "");
38
+ convertedMinus = convertedMinus.replace(/(?!^-?\d*\.{0,1}\d+$)/g, "");
39
+ /*
40
+ example: https://regex101.com/r/np7FqS/1
41
+ /(?!^-?\d*\.{0,1}\d+$)/g
42
+ Negative Lookahead (?!^-?\d*\.{0,1}\d+$)
43
+ Assert that the Regex below does not match
44
+ ^ asserts position at start of a line
45
+ - matches the character - with index 4510 (2D16 or 558) literally (case sensitive)
46
+ ? matches the previous token between zero and one times, as many times as possible, giving back as needed (greedy)
47
+ \d matches a digit (equivalent to [0-9])
48
+ * matches the previous token between zero and unlimited times, as many times as possible, giving back as needed (greedy)
49
+ \. matches the character . with index 4610 (2E16 or 568) literally (case sensitive)
50
+ {0,1} matches the previous token between zero and one times, as many times as possible, giving back as needed (greedy)
51
+ \d matches a digit (equivalent to [0-9])
52
+ + matches the previous token between one and unlimited times, as many times as possible, giving back as needed (greedy)
53
+ $ asserts position at the end of a line
54
+ Global pattern flags
55
+ g modifier: global. All matches (don't return after first match)
56
+ m modifier: multi line. Causes ^ and $ to match the begin/end of each line (not only begin/end of string)
57
+ */
58
+ results = parseFloat(convertedMinus);
59
+ }
60
+ if (typeof value === "number") {
61
+ results = parseFloat(String(value));
62
+ }
63
+ if (!isNaN(Number(results))) {
64
+ return Number(results);
65
+ }
66
+ if (value === null || value === undefined) {
67
+ return null;
68
+ }
69
+ throw new Error("Invalid value passed to SafeParseFloat");
70
+ }
71
+ // string conversion function that takes a locale and coverts decimal indicator to en-US indicator
72
+ // and takes the thousand separator for the given locale and transforms that to the en-US separator
73
+ function ConvertToEnUS(value, locale, replaceThousands = false) {
74
+ let replacedValue;
75
+ const localeSeparator = new Intl.NumberFormat(locale).format(1 / 2).replace(/[0-9]/g, "");
76
+ const enUSSeparator = new Intl.NumberFormat("en-US").format(1 / 2).replace(/[0-9]/g, "");
77
+ const thousandSeparator = new Intl.NumberFormat(locale).format(1000).replace(/[0-9]/g, "");
78
+ const enUSThousandSeparator = new Intl.NumberFormat("en-US").format(1000).replace(/[0-9]/g, "");
79
+ // double conversions to avoid ,->. and .->, at the same time resulting in a double conversion
80
+ replacedValue = value.replace(localeSeparator, "DECIMALSEPARATOR");
81
+ if (replaceThousands) {
82
+ replacedValue = replacedValue.replace(thousandSeparator, "THOUSANDSEPARATOR");
83
+ }
84
+ else {
85
+ replacedValue = replacedValue.replace(thousandSeparator, "");
86
+ }
87
+ replacedValue = replacedValue.replace("DECIMALSEPARATOR", enUSSeparator);
88
+ replacedValue = replacedValue.replace("THOUSANDSEPARATOR", enUSThousandSeparator);
89
+ return replacedValue;
90
+ }
91
+ const roundTo = (val, multiple) => Math.round(val / multiple) * multiple;
92
+ const clamp = (val, min, max) => Math.min(Math.max(val, min), max);
93
+
94
+ const duetNumberInputCss = "*.sc-duet-number-input,*.sc-duet-number-input::after,*.sc-duet-number-input::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-number-input-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:16px !important;margin-bottom:12px !important;display:inline-flex;width:100%;min-width:calc(33.333% - 8px);max-width:100%;line-height:1.25;text-align:left;vertical-align:bottom}.sc-duet-number-input-h:last-child,.sc-duet-number-input-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-number-input-h{width:calc(50% - 16px - 3px)}}.duet-expand.sc-duet-number-input-h{width:100% !important}.duet-m-0.sc-duet-number-input-h{margin:0 !important}.duet-number-container.sc-duet-number-input{position:relative;width:100%}.duet-number-buttons.sc-duet-number-input{-webkit-user-select:none;user-select:none;position:absolute;top:1px;right:1px;z-index:200;width:96px;height:calc(100% - 2px)}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input{position:relative;display:inline-flex;align-items:center;justify-content:center;width:50%;height:100%;text-align:center;cursor:pointer;background:transparent;-webkit-appearance:none;appearance:none}.duet-number-buttons.sc-duet-number-input .duet-number-button[aria-disabled=true].sc-duet-number-input,.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:disabled{pointer-events:none}.duet-number-buttons.sc-duet-number-input .duet-number-button[aria-disabled=true].sc-duet-number-input duet-icon.sc-duet-number-input,.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:disabled duet-icon.sc-duet-number-input{opacity:0.4}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:active duet-icon.sc-duet-number-input{transform:translateY(1px)}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:focus{outline:0}.user-is-tabbing.sc-duet-number-input-h .duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:focus{z-index:2;box-shadow:0 0 0 2px #0077b3}.duet-theme-turva .user-is-tabbing.sc-duet-number-input-h .duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:focus{box-shadow:0 0 0 2px #171c3a}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:first-of-type{border-left:1px solid #cfd2d4}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:first-of-type::before{position:absolute;top:0;left:-6px;width:6px;height:100%;content:\"\";background:linear-gradient(to left, rgba(207, 210, 212, 0.2) 0%, rgba(207, 210, 212, 0.2) 1px, rgba(207, 210, 212, 0.1) 1px, rgba(207, 210, 212, 0) 100%)}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:last-of-type{border-top-right-radius:4px;border-bottom-right-radius:4px}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:last-of-type::before{position:absolute;top:20%;left:0;width:1px;height:60%;content:\"\";background:#e1e3e6}.duet-theme-turva.sc-duet-number-input-h .duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:first-of-type::before{background:linear-gradient(to left, rgba(207, 207, 209, 0.2) 0%, rgba(207, 207, 209, 0.2) 1px, rgba(207, 207, 209, 0.1) 1px, rgba(207, 207, 209, 0) 100%)}.duet-theme-turva.sc-duet-number-input-h .duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:last-of-type::before{background:#e4e4e6}";
95
+
96
+ const DuetNumberInput$1 = /*@__PURE__*/ proxyCustomElement(class extends H {
97
+ constructor() {
98
+ super();
99
+ this.__registerHost();
100
+ this.duetChange = createEvent(this, "duetChange", 3);
101
+ this.duetInput = createEvent(this, "duetInput", 3);
102
+ this.duetBlur = createEvent(this, "duetBlur", 7);
103
+ this.duetFocus = createEvent(this, "duetFocus", 7);
104
+ this.inputId = createID("DuetInput");
105
+ /**
106
+ * The currently active language. This setting changes the accessible labels to match the
107
+ * chosen language.
108
+ * @deprecated this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing
109
+ * @default "fi"
110
+ */
111
+ this.language = getLanguage();
112
+ /**
113
+ * Locale used to format the entered value.
114
+ */
115
+ this.locale = getLocale(this.language).locale;
116
+ /**
117
+ * Unit for the number input.
118
+ */
119
+ this.unit = getLocale(this.language).money;
120
+ /**
121
+ * Details of the component
122
+ */
123
+ this.accessibleDetails = undefined;
124
+ /**
125
+ * String of id's that indicate alternative labels elements
126
+ */
127
+ this.accessibleLabelledBy = undefined;
128
+ /**
129
+ * Aria description the button
130
+ */
131
+ this.accessibleDescription = undefined;
132
+ /**
133
+ * Defaults for accessibleLive
134
+ * @default {fi: "{current} euroa valittuna", en: "{current} euros selected", sv: "{current} valda euro"}
135
+ */
136
+ this.accessibleLiveDefaults = {
137
+ fi: "{current} euroa valittuna",
138
+ en: "{current} euros selected",
139
+ sv: "{current} euro valt",
140
+ };
141
+ /**
142
+ * Format of message used to announce current amount when switching between amounts.
143
+ * The string {current} is replaced with the current amount.
144
+ * @default {fi: "{current} euroa valittuna", en: "{current} euros selected", sv: "{current} valda euro"}
145
+ */
146
+ this.accessibleLive = getLocaleString(this.accessibleLiveDefaults, this.language);
147
+ /**
148
+ * Disables the aria-live messaging used internally in this component. This could be useful when you want to use custom aria-live messages instead.
149
+ */
150
+ this.accessibleLiveEnabled = true;
151
+ /**
152
+ * Defaults for accessibleAdd
153
+ * @default {fi: "Lisää summaan", en: "Add to the amount", sv: "Lägg till beloppet"}
154
+ */
155
+ this.accessibleAddDefaults = {
156
+ fi: "Lisää summaan",
157
+ en: "Add to the amount",
158
+ sv: "Lägg till beloppet",
159
+ };
160
+ /**
161
+ * Accessible label for the add button that is read for screen reader users.
162
+ * @default {fi: "Lisää summaan", en: "Add to the amount", sv: "Lägg till beloppet"}
163
+ */
164
+ this.accessibleAdd = getLocaleString(this.accessibleAddDefaults, this.language);
165
+ /**
166
+ * Defaults for accessibleSubtract
167
+ * @default {fi: "Vähennä summasta", en: "Subtract from the amount", sv: "Dra från beloppet"}
168
+ */
169
+ this.accessibleSubtractDefaults = {
170
+ fi: "Vähennä summasta",
171
+ en: "Subtract from the amount",
172
+ sv: "Dra från beloppet",
173
+ };
174
+ /**
175
+ * Accessible label for the subtract button that is read for screen reader users.
176
+ * @default {fi: "Vähennä summasta", en: "Subtract from the amount", sv: "Dra från beloppet"}
177
+ */
178
+ this.accessibleSubtract = getLocaleString(this.accessibleSubtractDefaults, this.language);
179
+ /**
180
+ * Theme of the input.
181
+ */
182
+ this.theme = "";
183
+ /**
184
+ * Controls the margin of the component.
185
+ */
186
+ this.margin = "auto";
187
+ /**
188
+ * Expands the input to fill 100% of the container width.
189
+ */
190
+ this.expand = false;
191
+ /**
192
+ * Minimum value.
193
+ */
194
+ this.min = 0;
195
+ /**
196
+ * Defaults for Label
197
+ * @default {fi: "Etiketti", en: "Label", sv: "Märka"}
198
+ */
199
+ this.labelDefaults = {
200
+ fi: "Nimilappu",
201
+ en: "Label",
202
+ sv: "Etikett",
203
+ };
204
+ /**
205
+ * Label for the number input.
206
+ * @default {fi: "Etiketti", en: "Label", sv: "Märka"}
207
+ */
208
+ this.label = getLocaleString(this.labelDefaults, this.language);
209
+ /**
210
+ * Visually hide the label, but still show it to screen readers.
211
+ */
212
+ this.labelHidden = false;
213
+ /**
214
+ * Maximum value.
215
+ */
216
+ this.max = 1000000;
217
+ /**
218
+ * Display the input in error state along with an error message.
219
+ */
220
+ this.error = "";
221
+ /**
222
+ * Tooltip to display next to the label of the input.
223
+ */
224
+ this.tooltip = "";
225
+ /**
226
+ * Step amount.
227
+ */
228
+ this.step = 5000;
229
+ /**
230
+ * Controls whether or not value gets rounded to the nearest
231
+ * multiple of a step on blur. Set to "false" to disable this behaviour.
232
+ */
233
+ this.rounding = true;
234
+ /**
235
+ * Makes the number input component disabled. This prevents users from being able to
236
+ * interact with the input, and conveys its inactive state to assistive technologies.
237
+ */
238
+ this.disabled = false;
239
+ /**
240
+ * Set whether the input is required or not. Please note that this is required for
241
+ * accessible inputs when the user is required to fill them. When using this property
242
+ * you need to also set “novalidate” attribute to your form element to prevent
243
+ * browser from displaying its own validation errors.
244
+ */
245
+ this.required = false;
246
+ /**
247
+ * Component event handling.
248
+ */
249
+ this.handleFocus = () => {
250
+ // This state is saved on focus so we can compare on blur to it.
251
+ this.focusedValue = this.value;
252
+ };
253
+ this.handleKeyDown = (ev) => {
254
+ if (isArrowRightKey(ev) || isArrowUpKey(ev)) {
255
+ this.add(ev);
256
+ }
257
+ else if (isArrowDownKey(ev) || isArrowLeftKey(ev)) {
258
+ this.subtract(ev);
259
+ }
260
+ else if (isBackspaceKey(ev)) {
261
+ this.clearValue();
262
+ }
263
+ };
264
+ this.handleChange = (ev) => {
265
+ const input = ev.target;
266
+ if (input && input.value) {
267
+ let value = SafeParseFloat(input.value, this.locale);
268
+ // Make sure that everything works if the user clears the input and
269
+ // starts typing non-numeric characters.
270
+ if (isNaN(value) || value == null) {
271
+ value = this.min || 0;
272
+ }
273
+ this.setValue(value);
274
+ this.duetInput.emit({
275
+ component: "duet-number-input",
276
+ originalEvent: ev,
277
+ value: SafeParseFloat(this.value, this.locale).toString(),
278
+ valueAsNumber: value,
279
+ });
280
+ }
281
+ else {
282
+ this.duetInput.emit({
283
+ component: "duet-number-input",
284
+ originalEvent: ev,
285
+ value: null,
286
+ valueAsNumber: null,
287
+ });
288
+ }
289
+ };
290
+ this.handleBlur = (ev) => {
291
+ const input = ev.target;
292
+ if (!input) {
293
+ return;
294
+ }
295
+ if (input.value) {
296
+ // On blur we want to make sure that the user input is between the min and max values,
297
+ // and also round it up or down to the nearest step.
298
+ let value = SafeParseFloat(input.value, this.locale);
299
+ if (this.rounding) {
300
+ value = roundTo(value, this.step);
301
+ }
302
+ value = clamp(value, this.min, this.max);
303
+ if (value !== SafeParseFloat(this.value, this.locale) ||
304
+ value !== SafeParseFloat(this.focusedValue, this.locale)) {
305
+ this.setValue(value);
306
+ this.emitChange(ev);
307
+ }
308
+ }
309
+ this.duetChange.emit({
310
+ originalEvent: ev,
311
+ value: null,
312
+ valueAsNumber: null,
313
+ component: "duet-number-input",
314
+ });
315
+ };
316
+ /**
317
+ * Local methods.
318
+ */
319
+ this.emitChange = (ev) => {
320
+ const currentValue = SafeParseFloat(this.value, this.locale);
321
+ this.duetChange.emit({
322
+ originalEvent: ev,
323
+ value: currentValue.toString(),
324
+ valueAsNumber: currentValue,
325
+ component: "duet-number-input",
326
+ });
327
+ };
328
+ this.localizeValue = (value) => {
329
+ // Returns a localized string that can be used as input value.
330
+ return value.toLocaleString(this.locale);
331
+ };
332
+ this.setValue = (value) => {
333
+ // Set the localized prop value.
334
+ this.value = this.localizeValue(value);
335
+ // Finally also set the visible input value and unit.
336
+ this.duetInputElement.value = `${this.value} ${this.unit}`;
337
+ };
338
+ this.add = (ev) => {
339
+ // If this was called via a html button, prevent the default functionality
340
+ // to not trigger submit accidentally when used inside a form.
341
+ if (ev) {
342
+ ev.preventDefault();
343
+ }
344
+ const cleanedValue = SafeParseFloat(this.value, this.locale);
345
+ // Only fire change event when necessary
346
+ if (cleanedValue === this.max) {
347
+ return;
348
+ }
349
+ // in cases where no value set, incrementing should go to min
350
+ let newValue = cleanedValue == null ? this.min : cleanedValue + this.step;
351
+ // handle cases where value is not multiple of step
352
+ // e.g. if someone enters 199, with a step of 100, add should go to 200
353
+ // and if someone enters 101, add should also go to 200
354
+ if (newValue % this.step !== 0) {
355
+ const adjustment = newValue % this.step;
356
+ newValue -= adjustment;
357
+ }
358
+ const clampedValue = clamp(newValue, this.min, this.max);
359
+ this.value = this.localizeValue(clampedValue);
360
+ this.emitChange(ev);
361
+ };
362
+ this.subtract = (ev) => {
363
+ // If this was called via a html button, prevent the default functionality
364
+ // to not trigger submit accidentally when used inside a form.
365
+ if (ev) {
366
+ ev.preventDefault();
367
+ }
368
+ const currentValue = SafeParseFloat(this.value, this.locale);
369
+ // Only fire change event when necessary.
370
+ if (currentValue === this.min) {
371
+ return;
372
+ }
373
+ let newValue = currentValue - this.step;
374
+ // handle cases where value is not multiple of step
375
+ // if someone enters 199, with a step of 100, subtract should go to 100
376
+ // and if someone enters 101, subtract should also go to 100
377
+ if (newValue % this.step !== 0) {
378
+ const adjustment = this.step - (newValue % this.step);
379
+ newValue += adjustment;
380
+ }
381
+ newValue = clamp(newValue, this.min, this.max);
382
+ this.value = this.localizeValue(newValue);
383
+ this.emitChange(ev);
384
+ };
385
+ }
386
+ /**
387
+ * Component lifecycle events.
388
+ */
389
+ componentWillLoad() {
390
+ inheritGlobalTheme(this);
391
+ // Format the number value to a localeString initially.
392
+ if (this.value) {
393
+ this.value = this.localizeValue(SafeParseFloat(this.value, this.locale));
394
+ }
395
+ }
396
+ /**
397
+ * Sets focus on the specified `duet-number-input`. Use this method instead of the global
398
+ * `input.focus()`.
399
+ */
400
+ async setFocus(options) {
401
+ this.duetInputElement.setFocus(options);
402
+ }
403
+ clearValue() {
404
+ this.value = null;
405
+ this.duetInputElement.value = "";
406
+ }
407
+ formatAnnouncement() {
408
+ const current = SafeParseFloat(this.value, this.locale);
409
+ if (current == null) {
410
+ return "";
411
+ }
412
+ return this.accessibleLive.replace("{current}", current.toString(10));
413
+ }
414
+ /**
415
+ * render() function
416
+ * Always the last one in the class.
417
+ */
418
+ render() {
419
+ const identifier = this.identifier || this.inputId;
420
+ const maxlength = `${this.localizeValue(this.max)} ${this.unit}`.length;
421
+ const cleanedValue = SafeParseFloat(this.value, this.locale);
422
+ return (h(Host, { class: {
423
+ "duet-theme-turva": this.theme === "turva",
424
+ "duet-expand": this.expand,
425
+ "duet-m-0": this.margin === "none",
426
+ } }, h("div", { class: "duet-number-container" }, h("duet-input", { ref: input => (this.duetInputElement = input), onDuetChange: event => this.handleChange(event), onDuetFocus: this.handleFocus, onDuetBlur: event => this.handleBlur(event), onKeyDown: event => this.handleKeyDown(event), label: this.label, value: this.value ? `${this.value} ${this.unit}` : "", error: this.error, "aria-valuemin": this.min, "aria-valuemax": this.max, "aria-valuenow": cleanedValue != null ? cleanedValue : "", maxlength: maxlength, name: this.name, component: "number", required: this.required, disabled: this.disabled, role: this.role, labelHidden: this.labelHidden, tooltip: this.tooltip, identifier: identifier, theme: this.theme, margin: "none", expand: true, numericKeyboard: true, autoComplete: "off", type: "text", accessibleActiveDescendant: this.accessibleActiveDescendant, accessibleLabelledBy: this.accessibleLabelledBy, accessibleDescription: this.accessibleDescription, accessibleDetails: this.accessibleDetails, accessibleControls: this.accessibleControls, accessibleOwns: this.accessibleOwns, accessibleDescribedBy: this.accessibleDescribedBy }, h("div", { class: { "duet-number-buttons": true, "duet-no-label": this.labelHidden } }, h("button", { "aria-controls": identifier, disabled: this.disabled, "aria-disabled": cleanedValue == null || cleanedValue === this.min ? "true" : "false", class: "duet-number-button duet-number-button-subtract", onClick: this.subtract, type: "button" }, h("duet-visually-hidden", null, this.accessibleSubtract, " ", this.step), h("duet-icon", { icon: actionSubtract.svg, size: "small", margin: "none", color: this.theme === "turva" ? "secondary-turva" : "secondary" })), h("button", { "aria-controls": identifier, disabled: this.disabled, "aria-disabled": cleanedValue === this.max ? "true" : "false", class: "duet-number-button duet-number-button-add", onClick: this.add, type: "button" }, h("duet-visually-hidden", null, this.accessibleAdd, " ", this.step), h("duet-icon", { icon: actionAdd.svg, size: "small", margin: "none", color: this.theme === "turva" ? "secondary-turva" : "secondary" })))), this.accessibleLiveEnabled && (h("duet-visually-hidden", { "aria-live": "polite", "aria-atomic": "true", "aria-relevant": "all" }, this.formatAnnouncement())))));
427
+ }
428
+ get element() { return this; }
429
+ static get style() { return duetNumberInputCss; }
430
+ }, [2, "duet-number-input", {
431
+ "language": [1025],
432
+ "locale": [1],
433
+ "unit": [1],
434
+ "accessibleActiveDescendant": [1, "accessible-active-descendant"],
435
+ "accessibleControls": [1, "accessible-controls"],
436
+ "accessibleDetails": [1, "accessible-details"],
437
+ "accessibleLabelledBy": [1, "accessible-labelled-by"],
438
+ "accessibleDescription": [1, "accessible-description"],
439
+ "accessibleOwns": [1, "accessible-owns"],
440
+ "accessibleDescribedBy": [1, "accessible-described-by"],
441
+ "accessibleLiveDefaults": [1, "accessible-live-default"],
442
+ "accessibleLive": [1, "accessible-live"],
443
+ "accessibleLiveEnabled": [4, "accessible-live-enabled"],
444
+ "accessibleAddDefaults": [1, "accessible-add-default"],
445
+ "accessibleAdd": [1, "accessible-add"],
446
+ "accessibleSubtractDefaults": [1, "accessible-subtract-defaults"],
447
+ "accessibleSubtract": [1, "accessible-subtract"],
448
+ "theme": [1025],
449
+ "margin": [1],
450
+ "expand": [4],
451
+ "identifier": [1],
452
+ "min": [2],
453
+ "labelDefaults": [1, "label-default"],
454
+ "label": [1],
455
+ "labelHidden": [4, "label-hidden"],
456
+ "max": [2],
457
+ "name": [1],
458
+ "error": [1],
459
+ "tooltip": [1],
460
+ "step": [2],
461
+ "rounding": [4],
462
+ "role": [1],
463
+ "disabled": [516],
464
+ "required": [4],
465
+ "value": [1025],
466
+ "focusedValue": [32],
467
+ "setFocus": [64]
468
+ }]);
469
+ function defineCustomElement$1() {
470
+ if (typeof customElements === "undefined") {
471
+ return;
472
+ }
473
+ const components = ["duet-number-input", "duet-caption", "duet-icon", "duet-input", "duet-label", "duet-tooltip", "duet-visually-hidden"];
474
+ components.forEach(tagName => { switch (tagName) {
475
+ case "duet-number-input":
476
+ if (!customElements.get(tagName)) {
477
+ customElements.define(tagName, DuetNumberInput$1);
478
+ }
479
+ break;
480
+ case "duet-caption":
481
+ if (!customElements.get(tagName)) {
482
+ defineCustomElement$7();
483
+ }
484
+ break;
485
+ case "duet-icon":
486
+ if (!customElements.get(tagName)) {
487
+ defineCustomElement$6();
488
+ }
489
+ break;
490
+ case "duet-input":
491
+ if (!customElements.get(tagName)) {
492
+ defineCustomElement$5();
493
+ }
494
+ break;
495
+ case "duet-label":
496
+ if (!customElements.get(tagName)) {
497
+ defineCustomElement$4();
498
+ }
499
+ break;
500
+ case "duet-tooltip":
501
+ if (!customElements.get(tagName)) {
502
+ defineCustomElement$3();
503
+ }
504
+ break;
505
+ case "duet-visually-hidden":
506
+ if (!customElements.get(tagName)) {
507
+ defineCustomElement$2();
508
+ }
509
+ break;
510
+ } });
511
+ }
512
+
513
+ const DuetNumberInput = DuetNumberInput$1;
514
+ const defineCustomElement = defineCustomElement$1;
515
+
516
+ export { DuetNumberInput, defineCustomElement };
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface DuetPagination extends Components.DuetPagination, HTMLElement {}
4
+ export const DuetPagination: {
5
+ prototype: DuetPagination;
6
+ new (): DuetPagination;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;