@duetds/components 4.28.0 → 4.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (502) hide show
  1. package/README.md +4 -4
  2. package/hydrate/index.js +914 -168
  3. package/lib/cjs/{action-arrow-down-small-ce4eddbc.js → action-arrow-down-small-ef77a2d1.js} +3 -0
  4. package/lib/cjs/{action-new-window-small-764927c8.js → action-new-window-small-fa51dfb9.js} +3 -0
  5. package/lib/cjs/{app-globals-10f3c9d9.js → app-globals-a032b236.js} +3 -0
  6. package/lib/cjs/{bodyScrollLock.es6-ec4c4a5c.js → bodyScrollLock.es6-6ef1142a.js} +3 -0
  7. package/lib/cjs/{common-strings-210be249.js → common-strings-de17f887.js} +3 -0
  8. package/lib/cjs/{create-id-d0d6cd15.js → create-id-c3b984b1.js} +3 -0
  9. package/lib/cjs/{dom-3e7d9c3b.js → dom-e89ebf90.js} +4 -1
  10. package/lib/cjs/duet-alert.cjs.entry.js +10 -4
  11. package/lib/cjs/duet-badge.cjs.entry.js +7 -4
  12. package/lib/cjs/duet-button_2.cjs.entry.js +17 -10
  13. package/lib/cjs/duet-caption_4.cjs.entry.js +23 -17
  14. package/lib/cjs/duet-card.cjs.entry.js +13 -10
  15. package/lib/cjs/duet-checkbox.cjs.entry.js +7 -4
  16. package/lib/cjs/duet-choice_2.cjs.entry.js +16 -11
  17. package/lib/cjs/duet-collapsible.cjs.entry.js +512 -8
  18. package/lib/cjs/duet-cookie-consent.cjs.entry.js +6 -3
  19. package/lib/cjs/duet-date-picker.cjs.entry.js +31 -15
  20. package/lib/cjs/duet-divider_2.cjs.entry.js +7 -4
  21. package/lib/cjs/duet-empty-state.cjs.entry.js +6 -3
  22. package/lib/cjs/duet-fieldset.cjs.entry.js +7 -4
  23. package/lib/cjs/duet-footer.cjs.entry.js +15 -8
  24. package/lib/cjs/duet-grid_2.cjs.entry.js +8 -5
  25. package/lib/cjs/duet-header_2.cjs.entry.js +68 -21
  26. package/lib/cjs/duet-hero.cjs.entry.js +16 -10
  27. package/lib/cjs/duet-icon.cjs.entry.js +22 -6
  28. package/lib/cjs/duet-input_2.cjs.entry.js +16 -8
  29. package/lib/cjs/duet-layout.cjs.entry.js +6 -3
  30. package/lib/cjs/duet-list_2.cjs.entry.js +8 -5
  31. package/lib/cjs/duet-modal.cjs.entry.js +19 -12
  32. package/lib/cjs/duet-notification_2.cjs.entry.js +17 -9
  33. package/lib/cjs/duet-number-input.cjs.entry.js +54 -24
  34. package/lib/cjs/duet-radio_2.cjs.entry.js +9 -6
  35. package/lib/cjs/duet-range-slider.cjs.entry.js +9 -6
  36. package/lib/cjs/duet-select.cjs.entry.js +8 -5
  37. package/lib/cjs/duet-step_2.cjs.entry.js +9 -6
  38. package/lib/cjs/duet-tab_2.cjs.entry.js +23 -11
  39. package/lib/cjs/duet-table.cjs.entry.js +7 -4
  40. package/lib/cjs/duet-textarea.cjs.entry.js +8 -5
  41. package/lib/cjs/duet-toggle.cjs.entry.js +7 -4
  42. package/lib/cjs/duet-tooltip.cjs.entry.js +33 -15
  43. package/lib/cjs/duet-tray.cjs.entry.js +33 -15
  44. package/lib/cjs/duet-visually-hidden.cjs.entry.js +5 -2
  45. package/lib/cjs/duet.cjs.js +8 -5
  46. package/lib/cjs/{focus-utils-162d8238.js → focus-utils-bd331feb.js} +4 -1
  47. package/lib/cjs/{index-69f4451b.js → index-113c2add.js} +11 -1
  48. package/lib/cjs/index.cjs.js +3 -0
  49. package/lib/cjs/{input-utils-712b8b32.js → input-utils-f3e3854c.js} +28 -0
  50. package/lib/cjs/{is-internet-explorer-cd4610fc.js → is-internet-explorer-91361c56.js} +3 -0
  51. package/lib/cjs/{keyboard-utils-a0b0a23c.js → keyboard-utils-b4e3d1d3.js} +3 -0
  52. package/lib/cjs/language-utils-48b8860b.js +93 -0
  53. package/lib/cjs/loader.cjs.js +7 -4
  54. package/lib/cjs/{shadow-css-09555044.js → shadow-css-0c8c175b.js} +4 -1
  55. package/lib/cjs/string-utils-267e3dbb.js +53 -0
  56. package/lib/cjs/{themeable-component-c462e6fd.js → themeable-component-0c1be552.js} +3 -0
  57. package/lib/cjs/{token-utils-4e9d1b6c.js → token-utils-13e5d13e.js} +4 -1
  58. package/lib/cjs/{tokens.module-6f0eaf7f.js → tokens.module-53b3bd92.js} +3 -0
  59. package/lib/cjs/{watch-options-edeeafd0.js → watch-options-3877c082.js} +3 -0
  60. package/lib/collection/collection-manifest.json +1 -1
  61. package/lib/collection/common-strings.js +3 -0
  62. package/lib/collection/components/duet-alert/duet-alert.js +19 -6
  63. package/lib/collection/components/duet-badge/duet-badge.css +1 -0
  64. package/lib/collection/components/duet-badge/duet-badge.js +4 -1
  65. package/lib/collection/components/duet-button/duet-button.css +3 -3
  66. package/lib/collection/components/duet-button/duet-button.js +28 -11
  67. package/lib/collection/components/duet-caption/duet-caption.js +4 -1
  68. package/lib/collection/components/duet-card/duet-card.css +10 -7
  69. package/lib/collection/components/duet-card/duet-card.js +9 -8
  70. package/lib/collection/components/duet-checkbox/duet-checkbox.js +4 -1
  71. package/lib/collection/components/duet-choice/duet-choice.css +0 -1
  72. package/lib/collection/components/duet-choice/duet-choice.js +17 -8
  73. package/lib/collection/components/duet-choice-group/duet-choice-group.css +3 -1
  74. package/lib/collection/components/duet-choice-group/duet-choice-group.js +5 -2
  75. package/lib/collection/components/duet-collapsible/duet-collapsible.js +110 -6
  76. package/lib/collection/components/duet-cookie-consent/duet-cookie-consent.js +4 -1
  77. package/lib/collection/components/duet-date-picker/date-i18n.js +3 -0
  78. package/lib/collection/components/duet-date-picker/date-picker-day.js +4 -1
  79. package/lib/collection/components/duet-date-picker/date-picker-input.js +4 -1
  80. package/lib/collection/components/duet-date-picker/date-picker-month.js +4 -1
  81. package/lib/collection/components/duet-date-picker/date-utils.js +3 -0
  82. package/lib/collection/components/duet-date-picker/duet-date-picker.css +1 -1
  83. package/lib/collection/components/duet-date-picker/duet-date-picker.js +85 -35
  84. package/lib/collection/components/duet-date-picker/utils.js +3 -0
  85. package/lib/collection/components/duet-divider/duet-divider.js +4 -1
  86. package/lib/collection/components/duet-empty-state/duet-empty-state.js +4 -1
  87. package/lib/collection/components/duet-fieldset/duet-fieldset.js +5 -2
  88. package/lib/collection/components/duet-footer/duet-footer.js +33 -12
  89. package/lib/collection/components/duet-grid/duet-grid.js +4 -1
  90. package/lib/collection/components/duet-grid-item/duet-grid-item.js +4 -1
  91. package/lib/collection/components/duet-header/duet-header.js +108 -36
  92. package/lib/collection/components/duet-heading/duet-heading.css +1 -0
  93. package/lib/collection/components/duet-heading/duet-heading.js +5 -2
  94. package/lib/collection/components/duet-hero/duet-hero.js +35 -15
  95. package/lib/collection/components/duet-icon/duet-icon.js +6 -3
  96. package/lib/collection/components/duet-icon/icon-utils.js +17 -1
  97. package/lib/collection/components/duet-input/duet-input.js +12 -4
  98. package/lib/collection/components/duet-label/duet-label.css +2 -0
  99. package/lib/collection/components/duet-label/duet-label.js +4 -1
  100. package/lib/collection/components/duet-layout/duet-layout.js +4 -1
  101. package/lib/collection/components/duet-link/duet-link.js +35 -17
  102. package/lib/collection/components/duet-list/duet-list.js +5 -2
  103. package/lib/collection/components/duet-list-item/duet-list-item.js +4 -1
  104. package/lib/collection/components/duet-logo/duet-logo.js +15 -4
  105. package/lib/collection/components/duet-modal/duet-modal.js +40 -17
  106. package/lib/collection/components/duet-notification/duet-notification.js +19 -4
  107. package/lib/collection/components/duet-notification-drawer/duet-notification-drawer.js +24 -12
  108. package/lib/collection/components/duet-number-input/duet-number-input.js +182 -31
  109. package/lib/collection/components/duet-number-input/number-input-utils.js +3 -0
  110. package/lib/collection/components/duet-paragraph/duet-paragraph.js +5 -2
  111. package/lib/collection/components/duet-radio/duet-radio.js +4 -1
  112. package/lib/collection/components/duet-radio-group/duet-radio-group.js +5 -2
  113. package/lib/collection/components/duet-range-slider/duet-range-slider.js +6 -3
  114. package/lib/collection/components/duet-select/duet-select.js +4 -1
  115. package/lib/collection/components/duet-spacer/duet-spacer.js +4 -1
  116. package/lib/collection/components/duet-spinner/duet-spinner.js +5 -2
  117. package/lib/collection/components/duet-step/duet-step.js +6 -3
  118. package/lib/collection/components/duet-stepper/duet-stepper.js +4 -1
  119. package/lib/collection/components/duet-tab/duet-tab.js +4 -1
  120. package/lib/collection/components/duet-tab-group/duet-tab-group.js +56 -10
  121. package/lib/collection/components/duet-table/duet-table.js +5 -2
  122. package/lib/collection/components/duet-textarea/duet-textarea.js +5 -2
  123. package/lib/collection/components/duet-toggle/duet-toggle.js +4 -1
  124. package/lib/collection/components/duet-tooltip/duet-tooltip.js +98 -17
  125. package/lib/collection/components/duet-tray/duet-tray.js +97 -16
  126. package/lib/collection/components/duet-visually-hidden/duet-visually-hidden.js +4 -1
  127. package/lib/collection/global/duet-global.js +3 -0
  128. package/lib/collection/utils/create-id.js +3 -0
  129. package/lib/collection/utils/fixture-utils.js +15 -5
  130. package/lib/collection/utils/focus-utils.js +3 -0
  131. package/lib/collection/utils/form-components.js +3 -0
  132. package/lib/collection/utils/group-by.js +3 -0
  133. package/lib/collection/utils/input-utils.js +27 -0
  134. package/lib/collection/utils/is-internet-explorer.js +3 -0
  135. package/lib/collection/utils/keyboard-utils.js +3 -0
  136. package/lib/collection/utils/language-utils.js +46 -8
  137. package/lib/collection/utils/string-utils.js +24 -0
  138. package/lib/collection/utils/test-utils.js +3 -0
  139. package/lib/collection/utils/themeable-component.js +3 -0
  140. package/lib/collection/utils/token-utils.js +3 -0
  141. package/lib/collection/utils/watch-options.js +3 -0
  142. package/lib/custom-elements-bundle/index.js +970 -222
  143. package/lib/duet/duet.esm.js +4 -1
  144. package/lib/duet/duet.js +1 -1
  145. package/lib/duet/index.esm.js +3 -0
  146. package/lib/duet/p-0058512b.js +4 -0
  147. package/lib/duet/p-0224db45.entry.js +4 -0
  148. package/lib/duet/{p-c261a84b.system.entry.js → p-02ad46a0.system.entry.js} +4 -1
  149. package/lib/duet/{p-ae82ab86.js → p-04f9f1bf.js} +3 -0
  150. package/lib/duet/{p-62b75c80.system.js → p-053b71e6.system.js} +3 -0
  151. package/lib/duet/{p-f5e7899b.system.entry.js → p-07263910.system.entry.js} +4 -1
  152. package/lib/duet/{p-6242ef49.system.js → p-0c4bbd65.system.js} +3 -0
  153. package/lib/duet/{p-8b9ee5b0.js → p-115c79b6.js} +3 -0
  154. package/lib/duet/{p-a69855b7.js → p-15c15c6a.js} +3 -0
  155. package/lib/duet/{p-e780bfa0.js → p-18d801be.js} +3 -0
  156. package/lib/duet/p-1bfbc988.entry.js +4 -0
  157. package/lib/duet/p-1cd7177f.entry.js +4 -0
  158. package/lib/duet/p-1cec5a70.system.entry.js +4 -0
  159. package/lib/duet/p-1e7222c2.entry.js +4 -0
  160. package/lib/duet/p-202bbd70.entry.js +4 -0
  161. package/lib/duet/{p-44d3eb2f.system.entry.js → p-22f56356.system.entry.js} +4 -1
  162. package/lib/duet/{p-551d38f9.js → p-2826f987.js} +3 -0
  163. package/lib/duet/p-28b67b94.entry.js +4 -0
  164. package/lib/duet/{p-01dad2d3.js → p-322d1c38.js} +4 -1
  165. package/lib/duet/p-33426ddc.entry.js +4 -0
  166. package/lib/duet/p-33cf6ed1.entry.js +4 -0
  167. package/lib/duet/p-3d3f773d.system.entry.js +4 -0
  168. package/lib/duet/p-3e1ef509.system.entry.js +4 -0
  169. package/lib/duet/p-3f78a826.system.js +4 -0
  170. package/lib/duet/{p-50e14ff9.system.js → p-418b2ce7.system.js} +3 -0
  171. package/lib/duet/{p-9d4322ba.system.js → p-43e39d98.system.js} +3 -0
  172. package/lib/duet/p-44ffb960.entry.js +4 -0
  173. package/lib/duet/p-453955cc.system.entry.js +4 -0
  174. package/lib/duet/p-4670a654.entry.js +4 -0
  175. package/lib/duet/p-47645ea8.system.entry.js +4 -0
  176. package/lib/duet/p-504dbf8f.system.entry.js +4 -0
  177. package/lib/duet/p-5230ee3c.system.entry.js +4 -0
  178. package/lib/duet/p-56e172f5.system.entry.js +4 -0
  179. package/lib/duet/{p-7d7a595e.system.js → p-57ea2576.system.js} +4 -1
  180. package/lib/duet/p-5aa0d34d.entry.js +4 -0
  181. package/lib/duet/{p-63b13a5f.system.js → p-5f6bd5db.system.js} +3 -0
  182. package/lib/duet/p-5fc7e1f7.system.entry.js +4 -0
  183. package/lib/duet/p-605bc214.system.entry.js +4 -0
  184. package/lib/duet/p-60ab57d4.entry.js +4 -0
  185. package/lib/duet/p-64109493.entry.js +4 -0
  186. package/lib/duet/p-69a5dc6b.entry.js +4 -0
  187. package/lib/duet/p-6a230911.system.entry.js +4 -0
  188. package/lib/duet/p-6a356ab1.system.js +4 -0
  189. package/lib/duet/p-6a760b8a.entry.js +4 -0
  190. package/lib/duet/p-6d2da245.entry.js +4 -0
  191. package/lib/duet/p-704245ef.js +4 -0
  192. package/lib/duet/p-712e7dde.system.entry.js +4 -0
  193. package/lib/duet/p-746655ba.entry.js +4 -0
  194. package/lib/duet/p-76f00bd5.js +4 -0
  195. package/lib/duet/p-7b6db837.system.entry.js +4 -0
  196. package/lib/duet/p-7d080785.system.entry.js +4 -0
  197. package/lib/duet/p-82dc2e0b.entry.js +4 -0
  198. package/lib/duet/p-8c8e82aa.system.js +4 -0
  199. package/lib/duet/{p-5fe386d7.system.entry.js → p-8c980350.system.entry.js} +4 -1
  200. package/lib/duet/{p-1fcc25b6.system.entry.js → p-8cb47a70.system.entry.js} +4 -1
  201. package/lib/duet/p-8f03c3eb.entry.js +4 -0
  202. package/lib/duet/{p-50ea2036.system.js → p-8faaaf5f.system.js} +3 -0
  203. package/lib/duet/p-91fa68a5.js +4 -0
  204. package/lib/duet/p-92d38668.system.entry.js +4 -0
  205. package/lib/duet/p-95626e7e.system.entry.js +4 -0
  206. package/lib/duet/p-96808a2e.system.entry.js +4 -0
  207. package/lib/duet/p-96c103b2.system.entry.js +4 -0
  208. package/lib/duet/p-986779fb.js +4 -0
  209. package/lib/duet/{p-a0c363a1.js → p-9a89ec39.js} +3 -0
  210. package/lib/duet/p-9a8d5b11.system.js +4 -0
  211. package/lib/duet/p-9a945278.system.js +4 -0
  212. package/lib/duet/p-9c94be45.entry.js +4 -0
  213. package/lib/duet/p-9ce1baab.system.entry.js +4 -0
  214. package/lib/duet/p-9dfcd29a.js +4 -0
  215. package/lib/duet/p-9ff25646.entry.js +4 -0
  216. package/lib/duet/p-a1d12e94.system.entry.js +4 -0
  217. package/lib/duet/{p-a78af9f5.js → p-a28cf57b.js} +3 -0
  218. package/lib/duet/p-b03a46b6.entry.js +4 -0
  219. package/lib/duet/p-b1b8e510.entry.js +4 -0
  220. package/lib/duet/p-b694cbf5.system.js +4 -0
  221. package/lib/duet/p-b7e50cfa.entry.js +4 -0
  222. package/lib/duet/p-b82927b0.system.entry.js +4 -0
  223. package/lib/duet/p-ba205dca.entry.js +4 -0
  224. package/lib/duet/{p-2dd28142.system.js → p-bb12b972.system.js} +3 -0
  225. package/lib/duet/p-bcae23fc.system.entry.js +4 -0
  226. package/lib/duet/{p-a0e09a50.js → p-bd779757.js} +3 -0
  227. package/lib/duet/{p-69599f4e.js → p-bd9a7d8f.js} +3 -0
  228. package/lib/duet/p-be19c57b.system.entry.js +4 -0
  229. package/lib/duet/{p-6e296e99.js → p-c1325e35.js} +3 -0
  230. package/lib/duet/p-c4737f88.entry.js +4 -0
  231. package/lib/duet/{p-c3058688.js → p-c5beceed.js} +4 -1
  232. package/lib/duet/p-c5f10483.system.entry.js +4 -0
  233. package/lib/duet/{p-d95998b4.system.js → p-c7ae95bd.system.js} +3 -0
  234. package/lib/duet/{p-31c3b93f.system.js → p-ce0892e6.system.js} +3 -0
  235. package/lib/duet/p-d35fd913.system.entry.js +4 -0
  236. package/lib/duet/p-d4b4bfa6.entry.js +4 -0
  237. package/lib/duet/p-d7623eb8.system.entry.js +4 -0
  238. package/lib/duet/p-d863e150.system.js +4 -0
  239. package/lib/duet/p-dc85d2a4.entry.js +4 -0
  240. package/lib/duet/p-de093c16.entry.js +4 -0
  241. package/lib/duet/p-de842863.entry.js +4 -0
  242. package/lib/duet/p-e08b8909.entry.js +4 -0
  243. package/lib/duet/p-e39471b6.entry.js +4 -0
  244. package/lib/duet/{p-f180f2f2.system.js → p-e566ff11.system.js} +3 -0
  245. package/lib/duet/{p-cd603d87.system.js → p-e58ca7af.system.js} +4 -1
  246. package/lib/duet/p-e834c8d5.system.entry.js +4 -0
  247. package/lib/duet/{p-a8a8954e.system.entry.js → p-ef45cfe9.system.entry.js} +4 -1
  248. package/lib/duet/{p-73baca13.system.js → p-efaa0c04.system.js} +3 -0
  249. package/lib/duet/{p-fd305188.system.entry.js → p-f0b1850a.system.entry.js} +4 -1
  250. package/lib/duet/{p-871f3440.js → p-f11208c3.js} +3 -0
  251. package/lib/duet/p-f53c8019.entry.js +4 -0
  252. package/lib/duet/{p-95253d0a.entry.js → p-f96c4093.system.entry.js} +4 -1
  253. package/lib/duet/p-fbd83d67.entry.js +4 -0
  254. package/lib/duet/{p-dbe056ce.system.js → p-fd98468a.system.js} +3 -0
  255. package/lib/duet/p-fdecaf46.entry.js +4 -0
  256. package/lib/esm/{action-arrow-down-small-c24d2c7f.js → action-arrow-down-small-82273dc8.js} +3 -0
  257. package/lib/esm/{action-new-window-small-d592feb6.js → action-new-window-small-1945be91.js} +3 -0
  258. package/lib/esm/{app-globals-2796679e.js → app-globals-6641e444.js} +3 -0
  259. package/lib/esm/{bodyScrollLock.es6-cf1e49b2.js → bodyScrollLock.es6-61b5e9a4.js} +3 -0
  260. package/lib/esm/{common-strings-d5205fd4.js → common-strings-97e04e4b.js} +3 -0
  261. package/lib/esm/{create-id-124e0fc4.js → create-id-981107da.js} +3 -0
  262. package/lib/esm/{dom-1f98a75f.js → dom-21034390.js} +4 -1
  263. package/lib/esm/duet-alert.entry.js +10 -4
  264. package/lib/esm/duet-badge.entry.js +7 -4
  265. package/lib/esm/duet-button_2.entry.js +17 -10
  266. package/lib/esm/duet-caption_4.entry.js +23 -17
  267. package/lib/esm/duet-card.entry.js +13 -10
  268. package/lib/esm/duet-checkbox.entry.js +7 -4
  269. package/lib/esm/duet-choice_2.entry.js +16 -11
  270. package/lib/esm/duet-collapsible.entry.js +512 -8
  271. package/lib/esm/duet-cookie-consent.entry.js +6 -3
  272. package/lib/esm/duet-date-picker.entry.js +31 -15
  273. package/lib/esm/duet-divider_2.entry.js +7 -4
  274. package/lib/esm/duet-empty-state.entry.js +6 -3
  275. package/lib/esm/duet-fieldset.entry.js +7 -4
  276. package/lib/esm/duet-footer.entry.js +15 -8
  277. package/lib/esm/duet-grid_2.entry.js +8 -5
  278. package/lib/esm/duet-header_2.entry.js +68 -21
  279. package/lib/esm/duet-hero.entry.js +16 -10
  280. package/lib/esm/duet-icon.entry.js +22 -6
  281. package/lib/esm/duet-input_2.entry.js +16 -8
  282. package/lib/esm/duet-layout.entry.js +6 -3
  283. package/lib/esm/duet-list_2.entry.js +8 -5
  284. package/lib/esm/duet-modal.entry.js +19 -12
  285. package/lib/esm/duet-notification_2.entry.js +17 -9
  286. package/lib/esm/duet-number-input.entry.js +54 -24
  287. package/lib/esm/duet-radio_2.entry.js +9 -6
  288. package/lib/esm/duet-range-slider.entry.js +9 -6
  289. package/lib/esm/duet-select.entry.js +8 -5
  290. package/lib/esm/duet-step_2.entry.js +9 -6
  291. package/lib/esm/duet-tab_2.entry.js +23 -11
  292. package/lib/esm/duet-table.entry.js +7 -4
  293. package/lib/esm/duet-textarea.entry.js +8 -5
  294. package/lib/esm/duet-toggle.entry.js +7 -4
  295. package/lib/esm/duet-tooltip.entry.js +33 -15
  296. package/lib/esm/duet-tray.entry.js +33 -15
  297. package/lib/esm/duet-visually-hidden.entry.js +5 -2
  298. package/lib/esm/duet.js +8 -5
  299. package/lib/esm/{focus-utils-e76191e8.js → focus-utils-1995e5a9.js} +4 -1
  300. package/lib/esm/{index-aaa7610e.js → index-6e246691.js} +11 -1
  301. package/lib/esm/index.js +3 -1
  302. package/lib/esm/{input-utils-8a4c03a1.js → input-utils-f4cafee1.js} +28 -1
  303. package/lib/esm/{is-internet-explorer-0b40c5fe.js → is-internet-explorer-62b3bdbd.js} +3 -0
  304. package/lib/esm/{keyboard-utils-956f0d36.js → keyboard-utils-584cedd7.js} +3 -0
  305. package/lib/esm/language-utils-d5c38f65.js +89 -0
  306. package/lib/esm/loader.js +7 -4
  307. package/lib/esm/{shadow-css-67b66845.js → shadow-css-31e2d504.js} +4 -1
  308. package/lib/esm/string-utils-2f1793b8.js +49 -0
  309. package/lib/esm/{themeable-component-2a857b64.js → themeable-component-572685dd.js} +3 -0
  310. package/lib/esm/{token-utils-56e2be37.js → token-utils-5a35377f.js} +4 -1
  311. package/lib/esm/{tokens.module-17f6088f.js → tokens.module-edb66c04.js} +3 -0
  312. package/lib/esm/{watch-options-8f61a365.js → watch-options-de55ea78.js} +3 -0
  313. package/lib/esm-es5/{action-arrow-down-small-c24d2c7f.js → action-arrow-down-small-82273dc8.js} +3 -0
  314. package/lib/esm-es5/{action-new-window-small-d592feb6.js → action-new-window-small-1945be91.js} +3 -0
  315. package/lib/esm-es5/{app-globals-2796679e.js → app-globals-6641e444.js} +3 -0
  316. package/lib/esm-es5/{bodyScrollLock.es6-cf1e49b2.js → bodyScrollLock.es6-61b5e9a4.js} +3 -0
  317. package/lib/esm-es5/{common-strings-d5205fd4.js → common-strings-97e04e4b.js} +3 -0
  318. package/lib/esm-es5/{create-id-124e0fc4.js → create-id-981107da.js} +3 -0
  319. package/lib/esm-es5/{dom-1f98a75f.js → dom-21034390.js} +3 -0
  320. package/lib/esm-es5/duet-alert.entry.js +4 -1
  321. package/lib/esm-es5/duet-badge.entry.js +4 -1
  322. package/lib/esm-es5/duet-button_2.entry.js +4 -1
  323. package/lib/esm-es5/duet-caption_4.entry.js +4 -1
  324. package/lib/esm-es5/duet-card.entry.js +4 -1
  325. package/lib/esm-es5/duet-checkbox.entry.js +4 -1
  326. package/lib/esm-es5/duet-choice_2.entry.js +4 -1
  327. package/lib/esm-es5/duet-collapsible.entry.js +4 -1
  328. package/lib/esm-es5/duet-cookie-consent.entry.js +4 -1
  329. package/lib/esm-es5/duet-date-picker.entry.js +4 -1
  330. package/lib/esm-es5/duet-divider_2.entry.js +4 -1
  331. package/lib/esm-es5/duet-empty-state.entry.js +4 -1
  332. package/lib/esm-es5/duet-fieldset.entry.js +4 -1
  333. package/lib/esm-es5/duet-footer.entry.js +4 -1
  334. package/lib/esm-es5/duet-grid_2.entry.js +4 -1
  335. package/lib/esm-es5/duet-header_2.entry.js +4 -1
  336. package/lib/esm-es5/duet-hero.entry.js +4 -1
  337. package/lib/esm-es5/duet-icon.entry.js +4 -1
  338. package/lib/esm-es5/duet-input_2.entry.js +4 -1
  339. package/lib/esm-es5/duet-layout.entry.js +4 -1
  340. package/lib/esm-es5/duet-list_2.entry.js +4 -1
  341. package/lib/esm-es5/duet-modal.entry.js +4 -1
  342. package/lib/esm-es5/duet-notification_2.entry.js +4 -1
  343. package/lib/esm-es5/duet-number-input.entry.js +4 -1
  344. package/lib/esm-es5/duet-radio_2.entry.js +4 -1
  345. package/lib/esm-es5/duet-range-slider.entry.js +4 -1
  346. package/lib/esm-es5/duet-select.entry.js +4 -1
  347. package/lib/esm-es5/duet-step_2.entry.js +4 -1
  348. package/lib/esm-es5/duet-tab_2.entry.js +4 -1
  349. package/lib/esm-es5/duet-table.entry.js +4 -1
  350. package/lib/esm-es5/duet-textarea.entry.js +4 -1
  351. package/lib/esm-es5/duet-toggle.entry.js +4 -1
  352. package/lib/esm-es5/duet-tooltip.entry.js +4 -1
  353. package/lib/esm-es5/duet-tray.entry.js +4 -1
  354. package/lib/esm-es5/duet-visually-hidden.entry.js +4 -1
  355. package/lib/esm-es5/duet.js +4 -1
  356. package/lib/esm-es5/{focus-utils-e76191e8.js → focus-utils-1995e5a9.js} +4 -1
  357. package/lib/esm-es5/index-6e246691.js +4 -0
  358. package/lib/esm-es5/index.js +3 -0
  359. package/lib/esm-es5/input-utils-f4cafee1.js +4 -0
  360. package/lib/esm-es5/{is-internet-explorer-0b40c5fe.js → is-internet-explorer-62b3bdbd.js} +3 -0
  361. package/lib/esm-es5/{keyboard-utils-956f0d36.js → keyboard-utils-584cedd7.js} +3 -0
  362. package/lib/esm-es5/language-utils-d5c38f65.js +4 -0
  363. package/lib/esm-es5/loader.js +4 -1
  364. package/lib/esm-es5/{shadow-css-67b66845.js → shadow-css-31e2d504.js} +3 -0
  365. package/lib/esm-es5/string-utils-2f1793b8.js +4 -0
  366. package/lib/esm-es5/{themeable-component-2a857b64.js → themeable-component-572685dd.js} +3 -0
  367. package/lib/esm-es5/{token-utils-56e2be37.js → token-utils-5a35377f.js} +4 -1
  368. package/lib/esm-es5/{tokens.module-17f6088f.js → tokens.module-edb66c04.js} +3 -0
  369. package/lib/esm-es5/{watch-options-8f61a365.js → watch-options-de55ea78.js} +3 -0
  370. package/lib/html.html-data.json +140 -2
  371. package/lib/loader/cdn.js +3 -1
  372. package/lib/loader/index.cjs.js +3 -1
  373. package/lib/loader/index.d.ts +0 -1
  374. package/lib/loader/index.es2017.js +3 -1
  375. package/lib/loader/index.js +3 -1
  376. package/lib/types/components/duet-alert/duet-alert.d.ts +4 -2
  377. package/lib/types/components/duet-badge/duet-badge.d.ts +1 -1
  378. package/lib/types/components/duet-button/duet-button.d.ts +6 -3
  379. package/lib/types/components/duet-caption/duet-caption.d.ts +1 -1
  380. package/lib/types/components/duet-card/duet-card.d.ts +1 -1
  381. package/lib/types/components/duet-checkbox/duet-checkbox.d.ts +1 -1
  382. package/lib/types/components/duet-choice/duet-choice.d.ts +5 -4
  383. package/lib/types/components/duet-collapsible/duet-collapsible.d.ts +24 -1
  384. package/lib/types/components/duet-date-picker/date-picker-month.d.ts +1 -1
  385. package/lib/types/components/duet-date-picker/duet-date-picker.d.ts +16 -7
  386. package/lib/types/components/duet-divider/duet-divider.d.ts +1 -1
  387. package/lib/types/components/duet-empty-state/duet-empty-state.d.ts +1 -1
  388. package/lib/types/components/duet-fieldset/duet-fieldset.d.ts +1 -1
  389. package/lib/types/components/duet-footer/duet-footer.d.ts +7 -3
  390. package/lib/types/components/duet-grid-item/duet-grid-item.d.ts +1 -1
  391. package/lib/types/components/duet-header/duet-header.d.ts +50 -8
  392. package/lib/types/components/duet-heading/duet-heading.d.ts +1 -1
  393. package/lib/types/components/duet-hero/duet-hero.d.ts +8 -5
  394. package/lib/types/components/duet-icon/duet-icon.d.ts +1 -1
  395. package/lib/types/components/duet-input/duet-input.d.ts +2 -2
  396. package/lib/types/components/duet-link/duet-link.d.ts +8 -5
  397. package/lib/types/components/duet-list/duet-list.d.ts +1 -1
  398. package/lib/types/components/duet-logo/duet-logo.d.ts +3 -1
  399. package/lib/types/components/duet-modal/duet-modal.d.ts +11 -5
  400. package/lib/types/components/duet-notification/duet-notification.d.ts +4 -1
  401. package/lib/types/components/duet-notification-drawer/duet-notification-drawer.d.ts +6 -5
  402. package/lib/types/components/duet-number-input/duet-number-input.d.ts +29 -2
  403. package/lib/types/components/duet-paragraph/duet-paragraph.d.ts +1 -1
  404. package/lib/types/components/duet-radio/duet-radio.d.ts +2 -2
  405. package/lib/types/components/duet-range-slider/duet-range-slider.d.ts +2 -2
  406. package/lib/types/components/duet-select/duet-select.d.ts +1 -1
  407. package/lib/types/components/duet-step/duet-step.d.ts +1 -1
  408. package/lib/types/components/duet-stepper/duet-stepper.d.ts +1 -1
  409. package/lib/types/components/duet-tab-group/duet-tab-group.d.ts +10 -1
  410. package/lib/types/components/duet-textarea/duet-textarea.d.ts +2 -2
  411. package/lib/types/components/duet-toggle/duet-toggle.d.ts +2 -2
  412. package/lib/types/components/duet-tooltip/duet-tooltip.d.ts +16 -1
  413. package/lib/types/components/duet-tray/duet-tray.d.ts +15 -0
  414. package/lib/types/components.d.ts +265 -33
  415. package/lib/types/utils/input-utils.d.ts +9 -0
  416. package/lib/types/utils/language-utils.d.ts +26 -3
  417. package/lib/types/utils/string-utils.d.ts +1 -0
  418. package/lib/types/utils/test-utils.d.ts +1 -1
  419. package/package.json +39 -23
  420. package/lib/cjs/language-utils-0f4f60f1.js +0 -54
  421. package/lib/cjs/string-utils-0336d6da.js +0 -28
  422. package/lib/duet/p-00914fa8.entry.js +0 -1
  423. package/lib/duet/p-08b10b1b.entry.js +0 -1
  424. package/lib/duet/p-0a5bdffc.entry.js +0 -1
  425. package/lib/duet/p-117e6a2d.system.entry.js +0 -1
  426. package/lib/duet/p-11f650f9.system.entry.js +0 -1
  427. package/lib/duet/p-120f15f9.entry.js +0 -1
  428. package/lib/duet/p-1270fad1.entry.js +0 -1
  429. package/lib/duet/p-15c4ae87.system.entry.js +0 -1
  430. package/lib/duet/p-19d86321.system.js +0 -1
  431. package/lib/duet/p-1a544f89.js +0 -1
  432. package/lib/duet/p-1a773ea3.system.entry.js +0 -1
  433. package/lib/duet/p-1f18716e.entry.js +0 -1
  434. package/lib/duet/p-2141f564.system.js +0 -1
  435. package/lib/duet/p-23f2a281.entry.js +0 -1
  436. package/lib/duet/p-28072b15.entry.js +0 -1
  437. package/lib/duet/p-2ce3a1bc.entry.js +0 -1
  438. package/lib/duet/p-2f56c5d0.entry.js +0 -1
  439. package/lib/duet/p-330725c5.js +0 -1
  440. package/lib/duet/p-378186a8.entry.js +0 -1
  441. package/lib/duet/p-393dc5f0.system.entry.js +0 -1
  442. package/lib/duet/p-4486ae28.system.entry.js +0 -1
  443. package/lib/duet/p-45713f8a.system.entry.js +0 -1
  444. package/lib/duet/p-4e4d8137.system.entry.js +0 -1
  445. package/lib/duet/p-4f4895e0.entry.js +0 -1
  446. package/lib/duet/p-51f89eec.entry.js +0 -1
  447. package/lib/duet/p-545f6a97.entry.js +0 -1
  448. package/lib/duet/p-568ab60b.system.entry.js +0 -1
  449. package/lib/duet/p-598ba79a.js +0 -1
  450. package/lib/duet/p-598edf9e.system.entry.js +0 -1
  451. package/lib/duet/p-5e6a5340.entry.js +0 -1
  452. package/lib/duet/p-64fd394a.entry.js +0 -1
  453. package/lib/duet/p-66c75914.system.entry.js +0 -1
  454. package/lib/duet/p-6dc51621.system.entry.js +0 -1
  455. package/lib/duet/p-6f41124b.system.js +0 -1
  456. package/lib/duet/p-6f6b2cc5.system.entry.js +0 -1
  457. package/lib/duet/p-700243af.entry.js +0 -1
  458. package/lib/duet/p-770d46e6.entry.js +0 -1
  459. package/lib/duet/p-8498e753.system.entry.js +0 -1
  460. package/lib/duet/p-852e96c1.system.js +0 -1
  461. package/lib/duet/p-86de511c.system.entry.js +0 -1
  462. package/lib/duet/p-8db7a844.system.entry.js +0 -1
  463. package/lib/duet/p-91255671.js +0 -1
  464. package/lib/duet/p-921afc00.entry.js +0 -1
  465. package/lib/duet/p-9ac41fbc.system.entry.js +0 -1
  466. package/lib/duet/p-9b6adcb3.system.entry.js +0 -1
  467. package/lib/duet/p-9b9cb411.system.entry.js +0 -1
  468. package/lib/duet/p-9ff8c7c4.entry.js +0 -1
  469. package/lib/duet/p-a4d8b2c4.entry.js +0 -1
  470. package/lib/duet/p-a92bdc1c.system.entry.js +0 -1
  471. package/lib/duet/p-b6e261ef.js +0 -1
  472. package/lib/duet/p-b761ef2d.entry.js +0 -1
  473. package/lib/duet/p-b87ce8c9.system.entry.js +0 -1
  474. package/lib/duet/p-bdf5fe15.entry.js +0 -1
  475. package/lib/duet/p-c0c1bcba.system.js +0 -1
  476. package/lib/duet/p-c5fe3120.system.entry.js +0 -1
  477. package/lib/duet/p-c6d19c6c.system.entry.js +0 -1
  478. package/lib/duet/p-c8068a31.entry.js +0 -1
  479. package/lib/duet/p-cb073c9b.entry.js +0 -1
  480. package/lib/duet/p-cb49c05a.system.js +0 -1
  481. package/lib/duet/p-cb62f051.entry.js +0 -1
  482. package/lib/duet/p-ce55045f.js +0 -1
  483. package/lib/duet/p-d20651ba.entry.js +0 -1
  484. package/lib/duet/p-d7c57e6c.entry.js +0 -1
  485. package/lib/duet/p-da0df691.system.entry.js +0 -1
  486. package/lib/duet/p-dc2d2635.system.entry.js +0 -1
  487. package/lib/duet/p-dcd0f562.system.entry.js +0 -1
  488. package/lib/duet/p-dd4281d5.entry.js +0 -1
  489. package/lib/duet/p-e374aba6.entry.js +0 -1
  490. package/lib/duet/p-e693d73a.system.entry.js +0 -1
  491. package/lib/duet/p-e7bef783.entry.js +0 -1
  492. package/lib/duet/p-ec326c4c.system.entry.js +0 -1
  493. package/lib/duet/p-efa3e05d.entry.js +0 -1
  494. package/lib/duet/p-f2cca5cc.system.js +0 -1
  495. package/lib/duet/p-f3d07b69.entry.js +0 -1
  496. package/lib/duet/p-fbeb43e8.entry.js +0 -1
  497. package/lib/esm/language-utils-c7ce7c0e.js +0 -50
  498. package/lib/esm/string-utils-9ef35d2a.js +0 -25
  499. package/lib/esm-es5/index-aaa7610e.js +0 -1
  500. package/lib/esm-es5/input-utils-8a4c03a1.js +0 -1
  501. package/lib/esm-es5/language-utils-c7ce7c0e.js +0 -1
  502. package/lib/esm-es5/string-utils-9ef35d2a.js +0 -1
@@ -1,13 +1,16 @@
1
- import { Component, Host, Prop, Element, h, Event, State, Listen, Method, Watch } from "@stencil/core";
1
+ /*!
2
+ * Built with Duet Design System
3
+ */
4
+ import { Component, Element, Event, h, Host, Listen, Method, Prop, State, Watch } from "@stencil/core";
2
5
  import { createID } from "../../utils/create-id";
6
+ import { FocusGuard } from "../../utils/focus-utils";
3
7
  import { getLanguage, getLocaleString } from "../../utils/language-utils";
4
8
  import { inheritGlobalTheme } from "../../utils/themeable-component";
9
+ import i18n from "./date-i18n";
5
10
  import { DatePickerInput } from "./date-picker-input";
6
- import { addDays, startOfWeek, endOfWeek, parseDate, setMonth, setYear, clamp, inRange, endOfMonth, startOfMonth, printISODate, parseISODate, isEqual, printDate, } from "./date-utils";
7
11
  import { DatePickerMonth } from "./date-picker-month";
8
- import i18n from "./date-i18n";
12
+ import { addDays, clamp, endOfMonth, endOfWeek, inRange, isEqual, parseDate, parseISODate, printDate, printISODate, setMonth, setYear, startOfMonth, startOfWeek, } from "./date-utils";
9
13
  import { createShortcuts, range } from "./utils";
10
- import { FocusGuard } from "../../utils/focus-utils";
11
14
  export class DuetDatePicker {
12
15
  constructor() {
13
16
  this.monthSelectId = createID("DuetDatePicker");
@@ -43,10 +46,27 @@ export class DuetDatePicker {
43
46
  * Controls the margin of the component.
44
47
  */
45
48
  this.margin = "auto";
49
+ /**
50
+ * The currently active language. This setting changes the month/year/day
51
+ * names and button labels as well as all screen reader labels.
52
+ * @deprecated this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing
53
+ * @default "fi"
54
+ */
55
+ this.language = getLanguage();
56
+ /**
57
+ * Placeholder defaults
58
+ * @default { fi: "pp.kk.vvvv", en: "dd.mm.yyyy", sv: "dd.mm.åååå" }
59
+ */
60
+ this.placeholderDefaults = {
61
+ fi: "pp.kk.vvvv",
62
+ en: "dd.mm.yyyy",
63
+ sv: "dd.mm.åååå",
64
+ };
46
65
  /**
47
66
  * Hint text to display before the user types into the date picker input.
67
+ * @default { fi: "pp.kk.vvvv", en: "dd.mm.yyyy", sv: "dd.mm.åååå" }
48
68
  */
49
- this.placeholder = getLocaleString({ fi: "pp.kk.vvvv", en: "dd.mm.yyyy", sv: "dd.mm.åååå" });
69
+ this.placeholder = getLocaleString(this.placeholderDefaults, this.language);
50
70
  /**
51
71
  * If form input field has a placeholder text, and user types anything (causing the text to dissapear),
52
72
  * settings this to true will "echo" it into the caption slot - this option will be false by default for the next few versions, but will eventually be true by default (scheduled for 4.30.0)
@@ -57,11 +77,6 @@ export class DuetDatePicker {
57
77
  * interact with the input, and conveys its inactive state to assistive technologies.
58
78
  */
59
79
  this.disabled = false;
60
- /**
61
- * The currently active language. This setting changes the month/year/day
62
- * names and button labels as well as all screen reader labels.
63
- */
64
- this.language = getLanguage();
65
80
  /**
66
81
  * Display the date picker input in error state along with an error message.
67
82
  */
@@ -572,6 +587,61 @@ export class DuetDatePicker {
572
587
  "reflect": false,
573
588
  "defaultValue": "\"auto\""
574
589
  },
590
+ "language": {
591
+ "type": "string",
592
+ "mutable": false,
593
+ "complexType": {
594
+ "original": "DuetLanguage",
595
+ "resolved": "\"en\" | \"fi\" | \"sv\"",
596
+ "references": {
597
+ "DuetLanguage": {
598
+ "location": "import",
599
+ "path": "../../common-types"
600
+ }
601
+ }
602
+ },
603
+ "required": false,
604
+ "optional": false,
605
+ "docs": {
606
+ "tags": [{
607
+ "text": "this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing",
608
+ "name": "deprecated"
609
+ }, {
610
+ "text": "\"fi\"",
611
+ "name": "default"
612
+ }],
613
+ "text": "The currently active language. This setting changes the month/year/day\nnames and button labels as well as all screen reader labels."
614
+ },
615
+ "attribute": "language",
616
+ "reflect": false,
617
+ "defaultValue": "getLanguage()"
618
+ },
619
+ "placeholderDefaults": {
620
+ "type": "string",
621
+ "mutable": false,
622
+ "complexType": {
623
+ "original": "DuetLangObject | string",
624
+ "resolved": "DuetLangObject | string",
625
+ "references": {
626
+ "DuetLangObject": {
627
+ "location": "import",
628
+ "path": "../../utils/language-utils"
629
+ }
630
+ }
631
+ },
632
+ "required": false,
633
+ "optional": false,
634
+ "docs": {
635
+ "tags": [{
636
+ "text": "{ fi: \"pp.kk.vvvv\", en: \"dd.mm.yyyy\", sv: \"dd.mm.\u00E5\u00E5\u00E5\u00E5\" }",
637
+ "name": "default"
638
+ }],
639
+ "text": "Placeholder defaults"
640
+ },
641
+ "attribute": "placeholder-default",
642
+ "reflect": false,
643
+ "defaultValue": "{\n fi: \"pp.kk.vvvv\",\n en: \"dd.mm.yyyy\",\n sv: \"dd.mm.\u00E5\u00E5\u00E5\u00E5\",\n }"
644
+ },
575
645
  "placeholder": {
576
646
  "type": "string",
577
647
  "mutable": false,
@@ -583,12 +653,15 @@ export class DuetDatePicker {
583
653
  "required": false,
584
654
  "optional": false,
585
655
  "docs": {
586
- "tags": [],
656
+ "tags": [{
657
+ "text": "{ fi: \"pp.kk.vvvv\", en: \"dd.mm.yyyy\", sv: \"dd.mm.\u00E5\u00E5\u00E5\u00E5\" }",
658
+ "name": "default"
659
+ }],
587
660
  "text": "Hint text to display before the user types into the date picker input."
588
661
  },
589
662
  "attribute": "placeholder",
590
663
  "reflect": false,
591
- "defaultValue": "getLocaleString({ fi: \"pp.kk.vvvv\", en: \"dd.mm.yyyy\", sv: \"dd.mm.\u00E5\u00E5\u00E5\u00E5\" })"
664
+ "defaultValue": "getLocaleString(this.placeholderDefaults, this.language)"
592
665
  },
593
666
  "echoPlaceholder": {
594
667
  "type": "boolean",
@@ -626,29 +699,6 @@ export class DuetDatePicker {
626
699
  "reflect": true,
627
700
  "defaultValue": "false"
628
701
  },
629
- "language": {
630
- "type": "string",
631
- "mutable": false,
632
- "complexType": {
633
- "original": "DuetLanguage",
634
- "resolved": "\"en\" | \"fi\" | \"sv\"",
635
- "references": {
636
- "DuetLanguage": {
637
- "location": "import",
638
- "path": "../../common-types"
639
- }
640
- }
641
- },
642
- "required": false,
643
- "optional": false,
644
- "docs": {
645
- "tags": [],
646
- "text": "The currently active language. This setting changes the month/year/day\nnames and button labels as well as all screen reader labels."
647
- },
648
- "attribute": "language",
649
- "reflect": false,
650
- "defaultValue": "getLanguage()"
651
- },
652
702
  "error": {
653
703
  "type": "string",
654
704
  "mutable": false,
@@ -1,3 +1,6 @@
1
+ /*!
2
+ * Built with Duet Design System
3
+ */
1
4
  /**
2
5
  * Creates an array representing an inclusive numeric range.
3
6
  * `from` must be less than `to`
@@ -1,4 +1,7 @@
1
- import { Component, Prop, Element, h } from "@stencil/core";
1
+ /*!
2
+ * Built with Duet Design System
3
+ */
4
+ import { Component, Element, h, Prop } from "@stencil/core";
2
5
  import { inheritGlobalTheme } from "../../utils/themeable-component";
3
6
  export class DuetDivider {
4
7
  constructor() {
@@ -1,4 +1,7 @@
1
- import { Component, Host, Prop, h } from "@stencil/core";
1
+ /*!
2
+ * Built with Duet Design System
3
+ */
4
+ import { Component, h, Host, Prop } from "@stencil/core";
2
5
  import { inheritGlobalTheme } from "../../utils/themeable-component";
3
6
  export class DuetEmptyState {
4
7
  constructor() {
@@ -1,6 +1,9 @@
1
- import { Component, Prop, Element, h, Host, State } from "@stencil/core";
2
- import { inheritGlobalTheme } from "../../utils/themeable-component";
1
+ /*!
2
+ * Built with Duet Design System
3
+ */
4
+ import { Component, Element, h, Host, Prop, State } from "@stencil/core";
3
5
  import { createID } from "../../utils/create-id";
6
+ import { inheritGlobalTheme } from "../../utils/themeable-component";
4
7
  /**
5
8
  * @slot unnamed default slot - The component’s primary content. All child nodes that do not have a slot attribute defined are inserted into this primary slot.
6
9
  * @slot tooltip - Use to place a tooltip alongside the fieldset label.
@@ -1,11 +1,14 @@
1
- import { Component, Element, State, Watch, Prop, Event, h, Fragment } from "@stencil/core";
1
+ /*!
2
+ * Built with Duet Design System
3
+ */
2
4
  import arrowRightIcon from "@duetds/icons/lib/assets/action-arrow-right";
3
- import newWindowIconSmall from "@duetds/icons/lib/assets/action-new-window-small";
4
5
  import newWindowIcon from "@duetds/icons/lib/assets/action-new-window";
6
+ import newWindowIconSmall from "@duetds/icons/lib/assets/action-new-window-small";
7
+ import { Component, Element, Event, Fragment, h, Prop, State, Watch } from "@stencil/core";
8
+ import { DuetStringsExternalDefaults } from "../../common-strings";
9
+ import { getLanguage, getLocaleString } from "../../utils/language-utils";
5
10
  import { parsePossibleJSON } from "../../utils/string-utils";
6
11
  import { inheritGlobalTheme } from "../../utils/themeable-component";
7
- import { getLanguage, getLocaleString } from "../../utils/language-utils";
8
- import { DuetStringsExternalDefaults } from "../../common-strings";
9
12
  const i18n = {
10
13
  fi: { lahi: "© LähiTapiola", turva: "© Turva" },
11
14
  sv: { lahi: "© LokalTapiola", turva: "© Turva" },
@@ -43,17 +46,21 @@ export class DuetFooter {
43
46
  /**
44
47
  * The currently active language. This setting changes the logo to match the
45
48
  * chosen language.
49
+ * @deprecated this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing
50
+ * @default "fi"
46
51
  */
47
52
  this.language = getLanguage();
48
53
  /**
49
54
  * Property to change accessibleLabelExternal defaults on the component.
50
55
  * normally you would handle these strings on an application level and override @accessibleLabelExternal when needed
56
+ * @default {fi: "Avautuu uuteen ikkunaan",sv: "Öppnas i nytt fönster",en: "Opens in a new window"}
51
57
  */
52
58
  this.accessibleLabelExternalDefaults = DuetStringsExternalDefaults;
53
59
  /**
54
60
  * Adds accessible label for tooltip that is shown in external link (url & external have both been set)
61
+ * @default {fi: "Avautuu uuteen ikkunaan",sv: "Öppnas i nytt fönster",en: "Opens in a new window"}
55
62
  */
56
- this.accessibleLabelExternal = getLocaleString(this.accessibleLabelExternalDefaults);
63
+ this.accessibleLabelExternal = getLocaleString(this.accessibleLabelExternalDefaults, this.language);
57
64
  /**
58
65
  * Component event handling.
59
66
  */
@@ -247,7 +254,13 @@ export class DuetFooter {
247
254
  "required": false,
248
255
  "optional": false,
249
256
  "docs": {
250
- "tags": [],
257
+ "tags": [{
258
+ "text": "this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing",
259
+ "name": "deprecated"
260
+ }, {
261
+ "text": "\"fi\"",
262
+ "name": "default"
263
+ }],
251
264
  "text": "The currently active language. This setting changes the logo to match the\nchosen language."
252
265
  },
253
266
  "attribute": "language",
@@ -272,11 +285,11 @@ export class DuetFooter {
272
285
  "reflect": false
273
286
  },
274
287
  "accessibleLabelExternalDefaults": {
275
- "type": "unknown",
288
+ "type": "string",
276
289
  "mutable": false,
277
290
  "complexType": {
278
- "original": "DuetLangObject",
279
- "resolved": "DuetLangObject",
291
+ "original": "DuetLangObject | string",
292
+ "resolved": "DuetLangObject | string",
280
293
  "references": {
281
294
  "DuetLangObject": {
282
295
  "location": "import",
@@ -287,9 +300,14 @@ export class DuetFooter {
287
300
  "required": false,
288
301
  "optional": false,
289
302
  "docs": {
290
- "tags": [],
303
+ "tags": [{
304
+ "text": "{fi: \"Avautuu uuteen ikkunaan\",sv: \"\u00D6ppnas i nytt f\u00F6nster\",en: \"Opens in a new window\"}",
305
+ "name": "default"
306
+ }],
291
307
  "text": "Property to change accessibleLabelExternal defaults on the component.\nnormally you would handle these strings on an application level and override @accessibleLabelExternal when needed"
292
308
  },
309
+ "attribute": "accessible-label-external-default",
310
+ "reflect": false,
293
311
  "defaultValue": "DuetStringsExternalDefaults"
294
312
  },
295
313
  "accessibleLabelExternal": {
@@ -303,12 +321,15 @@ export class DuetFooter {
303
321
  "required": false,
304
322
  "optional": false,
305
323
  "docs": {
306
- "tags": [],
324
+ "tags": [{
325
+ "text": "{fi: \"Avautuu uuteen ikkunaan\",sv: \"\u00D6ppnas i nytt f\u00F6nster\",en: \"Opens in a new window\"}",
326
+ "name": "default"
327
+ }],
307
328
  "text": "Adds accessible label for tooltip that is shown in external link (url & external have both been set)"
308
329
  },
309
330
  "attribute": "accessible-label-external",
310
331
  "reflect": false,
311
- "defaultValue": "getLocaleString(this.accessibleLabelExternalDefaults)"
332
+ "defaultValue": "getLocaleString(this.accessibleLabelExternalDefaults, this.language)"
312
333
  },
313
334
  "menu": {
314
335
  "type": "any",
@@ -1,4 +1,7 @@
1
- import { Component, Watch, Element, Prop, Host, h } from "@stencil/core";
1
+ /*!
2
+ * Built with Duet Design System
3
+ */
4
+ import { Component, Element, h, Host, Prop, Watch } from "@stencil/core";
2
5
  import { watchForOptions } from "../../utils/watch-options";
3
6
  function isGridItem(element) {
4
7
  return element.tagName.toLowerCase() === "duet-grid-item";
@@ -1,4 +1,7 @@
1
- import { Component, Prop, Host, h } from "@stencil/core";
1
+ /*!
2
+ * Built with Duet Design System
3
+ */
4
+ import { Component, h, Host, Prop } from "@stencil/core";
2
5
  import { inheritGlobalTheme } from "../../utils/themeable-component";
3
6
  export class DuetGridItem {
4
7
  constructor() {
@@ -1,16 +1,19 @@
1
- import { Component, Prop, Element, Event, Method, State, Watch, Listen, h, Build, Fragment, } from "@stencil/core";
2
- import { disableBodyScroll, enableBodyScroll } from "body-scroll-lock/lib/bodyScrollLock.es6.js";
3
- import { parsePossibleJSON } from "../../utils/string-utils";
4
- import { inheritGlobalTheme } from "../../utils/themeable-component";
1
+ /*!
2
+ * Built with Duet Design System
3
+ */
5
4
  import arrowDownIcon from "@duetds/icons/lib/assets/action-arrow-down-small";
6
5
  import contactDropdownIcon from "@duetds/icons/lib/assets/navigation-contact-dropdown";
7
6
  import languageIcon from "@duetds/icons/lib/assets/navigation-language";
8
- import userIcon from "@duetds/icons/lib/assets/navigation-user";
9
- import logoutIcon from "@duetds/icons/lib/assets/navigation-logout";
10
7
  import loginIcon from "@duetds/icons/lib/assets/navigation-login";
11
- import { isSpaceKey, isEscapeKey, isArrowLeftKey, isArrowUpKey, isArrowRightKey, isArrowDownKey, } from "../../utils/keyboard-utils";
12
- import { getLocaleString, getLanguage } from "../../utils/language-utils";
8
+ import logoutIcon from "@duetds/icons/lib/assets/navigation-logout";
9
+ import userIcon from "@duetds/icons/lib/assets/navigation-user";
10
+ import { Build, Component, Element, Event, Fragment, h, Listen, Method, Prop, State, Watch, } from "@stencil/core";
11
+ import { disableBodyScroll, enableBodyScroll } from "body-scroll-lock/lib/bodyScrollLock.es6.js";
13
12
  import { DuetStringsExternalDefaults } from "../../common-strings";
13
+ import { isArrowDownKey, isArrowLeftKey, isArrowRightKey, isArrowUpKey, isEscapeKey, isSpaceKey, } from "../../utils/keyboard-utils";
14
+ import { getLanguage, getLocaleString } from "../../utils/language-utils";
15
+ import { parsePossibleJSON } from "../../utils/string-utils";
16
+ import { inheritGlobalTheme } from "../../utils/themeable-component";
14
17
  const createEvent = (ev, data) => ({
15
18
  component: "duet-header",
16
19
  data,
@@ -43,13 +46,13 @@ export class DuetHeader {
43
46
  /**
44
47
  * The currently active language. This setting also changes the logo to match
45
48
  * the chosen language.
49
+ * @deprecated this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing
50
+ * @default "fi"
46
51
  */
47
52
  this.language = getLanguage();
48
53
  /**
49
- * Property to change accessibleI18nLabels defaults on the component.
50
- * normally you would handle these strings on an application level and override @accessibleI18nLabels when needed
51
- */
52
- this.accessibleI18nLabelsDefault = {
54
+ * Default strings for accessibleI18nLabels
55
+ * @default {
53
56
  fi: {
54
57
  skipLabel: "Siirry pääsisältöön",
55
58
  changeLanguage: "Vaihda kieltä",
@@ -65,25 +68,62 @@ export class DuetHeader {
65
68
  changeLanguage: "Change language",
66
69
  activeLanguage: "English selected",
67
70
  },
71
+ }
72
+ */
73
+ this.accessibleI18nLabelsDefaults = {
74
+ fi: {
75
+ skipLabel: "Siirry pääsisältöön",
76
+ changeLanguage: "Vaihda kieltä",
77
+ activeLanguage: "Suomi valittuna",
78
+ },
79
+ sv: {
80
+ skipLabel: "Gå till huvudinnehåll",
81
+ changeLanguage: "Ändra Språk",
82
+ activeLanguage: "Svenska valt",
83
+ },
84
+ en: {
85
+ skipLabel: "Skip to main content",
86
+ changeLanguage: "Change language",
87
+ activeLanguage: "English selected",
88
+ },
68
89
  };
69
90
  /**
70
91
  * Adds i18n translations of all internally used textStrings
92
+ * @default {
93
+ fi: {
94
+ skipLabel: "Siirry pääsisältöön",
95
+ changeLanguage: "Vaihda kieltä",
96
+ activeLanguage: "Suomi valittuna",
97
+ },
98
+ sv: {
99
+ skipLabel: "Hoppa till huvudinnehåll",
100
+ changeLanguage: "Ändra Språk",
101
+ activeLanguage: "Svenska valt",
102
+ },
103
+ en: {
104
+ skipLabel: "Skip to main content",
105
+ changeLanguage: "Change language",
106
+ activeLanguage: "English selected",
107
+ },
108
+ }
71
109
  */
72
- this.accessibleI18nLabels = getLocaleString(this.accessibleI18nLabelsDefault, this.language);
110
+ this.accessibleI18nLabels = getLocaleString(this.accessibleI18nLabelsDefaults);
73
111
  /**
74
112
  * Property to change accessibleLabelExternal defaults on the component.
75
113
  * normally you would handle these strings on an application level and override @accessibleLabelExternal when needed
114
+ * @default {fi: "Avautuu uuteen ikkunaan",sv: "Öppnas i nytt fönster",en: "Opens in a new window"}
76
115
  */
77
116
  this.accessibleLabelExternalDefaults = DuetStringsExternalDefaults;
78
117
  /**
79
118
  * Adds accessible label for tooltip that is shown in external link (url & external have both been set)
119
+ * @default {fi: "Avautuu uuteen ikkunaan",sv: "Öppnas i nytt fönster",en: "Opens in a new window"}
80
120
  */
81
121
  this.accessibleLabelExternal = getLocaleString(this.accessibleLabelExternalDefaults);
82
122
  /**
83
123
  * Property to change accessibleLabel defaults on the component.
84
124
  * normally you would handle these strings on an application level and override @accessibleLabel when needed
85
125
  */
86
- this.accessibleLabelDefault = {
126
+ this.accessibleLabelDefaults = {
87
127
  fi: "Valikko",
88
128
  sv: "Meny",
89
129
  en: "Menu",
@@ -91,8 +131,13 @@ export class DuetHeader {
91
131
  /**
92
132
  * Accessible label that is shown for screen reader users in the mobile
93
133
  * navigation toggle. Not visible for normal users.
134
+ * @default {
135
+ fi: "Valikko",
136
+ sv: "Meny",
137
+ en: "Menu",
138
+ }
94
139
  */
95
- this.accessibleLabel = getLocaleString(this.accessibleLabelDefault);
140
+ this.accessibleLabel = getLocaleString(this.accessibleLabelDefaults);
96
141
  /**
97
142
  * URL that the logo link points to.
98
143
  */
@@ -467,19 +512,25 @@ export class DuetHeader {
467
512
  "required": false,
468
513
  "optional": false,
469
514
  "docs": {
470
- "tags": [],
515
+ "tags": [{
516
+ "text": "this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing",
517
+ "name": "deprecated"
518
+ }, {
519
+ "text": "\"fi\"",
520
+ "name": "default"
521
+ }],
471
522
  "text": "The currently active language. This setting also changes the logo to match\nthe chosen language."
472
523
  },
473
524
  "attribute": "language",
474
525
  "reflect": false,
475
526
  "defaultValue": "getLanguage()"
476
527
  },
477
- "accessibleI18nLabelsDefault": {
478
- "type": "unknown",
528
+ "accessibleI18nLabelsDefaults": {
529
+ "type": "string",
479
530
  "mutable": false,
480
531
  "complexType": {
481
- "original": "Record<DuetLanguage, I18nText>",
482
- "resolved": "{ fi: I18nText; en: I18nText; sv: I18nText; }",
532
+ "original": "| string\n | Record<DuetLanguage, I18nText>",
533
+ "resolved": "string | { fi: I18nText; en: I18nText; sv: I18nText; }",
483
534
  "references": {
484
535
  "Record": {
485
536
  "location": "global"
@@ -496,10 +547,15 @@ export class DuetHeader {
496
547
  "required": false,
497
548
  "optional": false,
498
549
  "docs": {
499
- "tags": [],
500
- "text": "Property to change accessibleI18nLabels defaults on the component.\nnormally you would handle these strings on an application level and override @accessibleI18nLabels when needed"
550
+ "tags": [{
551
+ "text": "{\nfi: {\nskipLabel: \"Siirry p\u00E4\u00E4sis\u00E4lt\u00F6\u00F6n\",\nchangeLanguage: \"Vaihda kielt\u00E4\",\nactiveLanguage: \"Suomi valittuna\",\n},\nsv: {\nskipLabel: \"Hoppa till huvudinneh\u00E5ll\",\nchangeLanguage: \"\u00C4ndra Spr\u00E5k\",\nactiveLanguage: \"Svenska valt\",\n},\nen: {\nskipLabel: \"Skip to main content\",\nchangeLanguage: \"Change language\",\nactiveLanguage: \"English selected\",\n},\n}",
552
+ "name": "default"
553
+ }],
554
+ "text": "Default strings for accessibleI18nLabels"
501
555
  },
502
- "defaultValue": "{\n fi: {\n skipLabel: \"Siirry p\u00E4\u00E4sis\u00E4lt\u00F6\u00F6n\",\n changeLanguage: \"Vaihda kielt\u00E4\",\n activeLanguage: \"Suomi valittuna\",\n },\n sv: {\n skipLabel: \"Hoppa till huvudinneh\u00E5ll\",\n changeLanguage: \"\u00C4ndra Spr\u00E5k\",\n activeLanguage: \"Svenska valt\",\n },\n en: {\n skipLabel: \"Skip to main content\",\n changeLanguage: \"Change language\",\n activeLanguage: \"English selected\",\n },\n }"
556
+ "attribute": "accessible-labels-default",
557
+ "reflect": false,
558
+ "defaultValue": "{\n fi: {\n skipLabel: \"Siirry p\u00E4\u00E4sis\u00E4lt\u00F6\u00F6n\",\n changeLanguage: \"Vaihda kielt\u00E4\",\n activeLanguage: \"Suomi valittuna\",\n },\n sv: {\n skipLabel: \"G\u00E5 till huvudinneh\u00E5ll\",\n changeLanguage: \"\u00C4ndra Spr\u00E5k\",\n activeLanguage: \"Svenska valt\",\n },\n en: {\n skipLabel: \"Skip to main content\",\n changeLanguage: \"Change language\",\n activeLanguage: \"English selected\",\n },\n }"
503
559
  },
504
560
  "accessibleI18nLabels": {
505
561
  "type": "unknown",
@@ -516,17 +572,20 @@ export class DuetHeader {
516
572
  "required": false,
517
573
  "optional": false,
518
574
  "docs": {
519
- "tags": [],
575
+ "tags": [{
576
+ "text": "{\nfi: {\nskipLabel: \"Siirry p\u00E4\u00E4sis\u00E4lt\u00F6\u00F6n\",\nchangeLanguage: \"Vaihda kielt\u00E4\",\nactiveLanguage: \"Suomi valittuna\",\n},\nsv: {\nskipLabel: \"Hoppa till huvudinneh\u00E5ll\",\nchangeLanguage: \"\u00C4ndra Spr\u00E5k\",\nactiveLanguage: \"Svenska valt\",\n},\nen: {\nskipLabel: \"Skip to main content\",\nchangeLanguage: \"Change language\",\nactiveLanguage: \"English selected\",\n},\n}",
577
+ "name": "default"
578
+ }],
520
579
  "text": "Adds i18n translations of all internally used textStrings"
521
580
  },
522
- "defaultValue": "getLocaleString(this.accessibleI18nLabelsDefault, this.language)"
581
+ "defaultValue": "getLocaleString(\n this.accessibleI18nLabelsDefaults\n )"
523
582
  },
524
583
  "accessibleLabelExternalDefaults": {
525
- "type": "unknown",
584
+ "type": "string",
526
585
  "mutable": false,
527
586
  "complexType": {
528
- "original": "DuetLangObject",
529
- "resolved": "DuetLangObject",
587
+ "original": "DuetLangObject | string",
588
+ "resolved": "DuetLangObject | string",
530
589
  "references": {
531
590
  "DuetLangObject": {
532
591
  "location": "import",
@@ -537,9 +596,14 @@ export class DuetHeader {
537
596
  "required": false,
538
597
  "optional": false,
539
598
  "docs": {
540
- "tags": [],
599
+ "tags": [{
600
+ "text": "{fi: \"Avautuu uuteen ikkunaan\",sv: \"\u00D6ppnas i nytt f\u00F6nster\",en: \"Opens in a new window\"}",
601
+ "name": "default"
602
+ }],
541
603
  "text": "Property to change accessibleLabelExternal defaults on the component.\nnormally you would handle these strings on an application level and override @accessibleLabelExternal when needed"
542
604
  },
605
+ "attribute": "accessible-label-external-default",
606
+ "reflect": false,
543
607
  "defaultValue": "DuetStringsExternalDefaults"
544
608
  },
545
609
  "accessibleLabelExternal": {
@@ -553,19 +617,22 @@ export class DuetHeader {
553
617
  "required": false,
554
618
  "optional": false,
555
619
  "docs": {
556
- "tags": [],
620
+ "tags": [{
621
+ "text": "{fi: \"Avautuu uuteen ikkunaan\",sv: \"\u00D6ppnas i nytt f\u00F6nster\",en: \"Opens in a new window\"}",
622
+ "name": "default"
623
+ }],
557
624
  "text": "Adds accessible label for tooltip that is shown in external link (url & external have both been set)"
558
625
  },
559
626
  "attribute": "accessible-label-external",
560
627
  "reflect": false,
561
628
  "defaultValue": "getLocaleString(this.accessibleLabelExternalDefaults)"
562
629
  },
563
- "accessibleLabelDefault": {
564
- "type": "unknown",
630
+ "accessibleLabelDefaults": {
631
+ "type": "string",
565
632
  "mutable": false,
566
633
  "complexType": {
567
- "original": "DuetLangObject",
568
- "resolved": "DuetLangObject",
634
+ "original": "DuetLangObject | string",
635
+ "resolved": "DuetLangObject | string",
569
636
  "references": {
570
637
  "DuetLangObject": {
571
638
  "location": "import",
@@ -579,6 +646,8 @@ export class DuetHeader {
579
646
  "tags": [],
580
647
  "text": "Property to change accessibleLabel defaults on the component.\nnormally you would handle these strings on an application level and override @accessibleLabel when needed"
581
648
  },
649
+ "attribute": "accessible-label-default",
650
+ "reflect": false,
582
651
  "defaultValue": "{\n fi: \"Valikko\",\n sv: \"Meny\",\n en: \"Menu\",\n }"
583
652
  },
584
653
  "accessibleLabel": {
@@ -592,12 +661,15 @@ export class DuetHeader {
592
661
  "required": false,
593
662
  "optional": false,
594
663
  "docs": {
595
- "tags": [],
664
+ "tags": [{
665
+ "text": "{\nfi: \"Valikko\",\nsv: \"Meny\",\nen: \"Menu\",\n}",
666
+ "name": "default"
667
+ }],
596
668
  "text": "Accessible label that is shown for screen reader users in the mobile\nnavigation toggle. Not visible for normal users."
597
669
  },
598
670
  "attribute": "accessible-label",
599
671
  "reflect": false,
600
- "defaultValue": "getLocaleString(this.accessibleLabelDefault)"
672
+ "defaultValue": "getLocaleString(this.accessibleLabelDefaults)"
601
673
  },
602
674
  "user": {
603
675
  "type": "any",
@@ -36,6 +36,7 @@
36
36
  color: #00294d;
37
37
  text-decoration: none;
38
38
  letter-spacing: -0.01rem;
39
+ word-break: break-word;
39
40
  }
40
41
  @media (min-width: 36em) {
41
42
  .duet-heading {
@@ -1,7 +1,10 @@
1
- import { Component, Prop, Element, h } from "@stencil/core";
2
- import { getColorByName } from "../../utils/token-utils";
1
+ /*!
2
+ * Built with Duet Design System
3
+ */
4
+ import { Component, Element, h, Prop } from "@stencil/core";
3
5
  import { sanitizeString } from "../../utils/string-utils";
4
6
  import { inheritGlobalTheme } from "../../utils/themeable-component";
7
+ import { getColorByName } from "../../utils/token-utils";
5
8
  export class DuetHeading {
6
9
  constructor() {
7
10
  /**