@warp-ds/elements 2.2.0-next.1 → 2.2.0-next.11

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 (396) hide show
  1. package/README.md +27 -17
  2. package/dist/.storybook/utilities.d.ts +28 -0
  3. package/dist/.storybook/utilities.js +52 -0
  4. package/dist/api.js +1 -49
  5. package/dist/api.js.map +4 -4
  6. package/dist/custom-elements.json +4282 -0
  7. package/dist/packages/affix/affix.stories.d.ts +10 -0
  8. package/dist/packages/affix/affix.stories.js +25 -0
  9. package/dist/packages/affix/affix.test.d.ts +1 -0
  10. package/dist/packages/affix/affix.test.js +9 -0
  11. package/dist/packages/affix/index.d.ts +52 -24
  12. package/dist/packages/affix/index.js +2448 -2240
  13. package/dist/packages/affix/index.js.map +4 -4
  14. package/dist/packages/affix/react.d.ts +2 -0
  15. package/dist/packages/affix/react.js +8 -0
  16. package/dist/packages/affix/styles.d.ts +1 -0
  17. package/dist/packages/affix/styles.js +2 -0
  18. package/dist/packages/alert/alert.stories.d.ts +15 -0
  19. package/dist/packages/alert/alert.stories.js +68 -0
  20. package/dist/packages/alert/alert.test.d.ts +1 -0
  21. package/dist/packages/alert/alert.test.js +16 -0
  22. package/dist/packages/alert/index.d.ts +27 -17
  23. package/dist/packages/alert/index.js +2452 -2446
  24. package/dist/packages/alert/index.js.map +4 -4
  25. package/dist/packages/alert/react.d.ts +2 -0
  26. package/dist/packages/alert/react.js +8 -0
  27. package/dist/packages/alert/styles.d.ts +1 -0
  28. package/dist/packages/alert/styles.js +2 -0
  29. package/dist/packages/attention/attention.stories.d.ts +15 -0
  30. package/dist/packages/attention/attention.stories.js +188 -0
  31. package/dist/packages/attention/attention.test.d.ts +1 -0
  32. package/dist/packages/attention/attention.test.js +11 -0
  33. package/dist/packages/attention/index.d.ts +62 -90
  34. package/dist/packages/attention/index.js +3360 -3984
  35. package/dist/packages/attention/index.js.map +4 -4
  36. package/dist/packages/attention/layout-styles.d.ts +1 -0
  37. package/dist/packages/attention/layout-styles.js +905 -0
  38. package/dist/packages/attention/locales/da/messages.mjs +1 -0
  39. package/dist/packages/attention/locales/en/messages.mjs +1 -0
  40. package/dist/packages/attention/locales/fi/messages.mjs +1 -0
  41. package/dist/packages/attention/locales/nb/messages.mjs +1 -0
  42. package/dist/packages/attention/locales/sv/messages.mjs +1 -0
  43. package/dist/packages/attention/react.d.ts +1 -0
  44. package/dist/packages/attention/react.js +9 -0
  45. package/dist/packages/attention/styles.d.ts +1 -0
  46. package/dist/packages/attention/styles.js +2 -0
  47. package/dist/packages/badge/badge.stories.d.ts +17 -0
  48. package/dist/packages/badge/badge.stories.js +68 -0
  49. package/dist/packages/badge/badge.test.d.ts +1 -0
  50. package/dist/packages/badge/badge.test.js +9 -0
  51. package/dist/packages/badge/index.d.ts +17 -11
  52. package/dist/packages/badge/index.js +2441 -300
  53. package/dist/packages/badge/index.js.map +4 -4
  54. package/dist/packages/badge/react.d.ts +2 -0
  55. package/dist/packages/badge/react.js +8 -0
  56. package/dist/packages/badge/styles.d.ts +1 -0
  57. package/dist/packages/badge/styles.js +2 -0
  58. package/dist/packages/box/box.stories.d.ts +14 -0
  59. package/dist/packages/box/box.stories.js +59 -0
  60. package/dist/packages/box/box.test.d.ts +1 -0
  61. package/dist/packages/box/box.test.js +9 -0
  62. package/dist/packages/box/index.d.ts +22 -20
  63. package/dist/packages/box/index.js +2441 -304
  64. package/dist/packages/box/index.js.map +4 -4
  65. package/dist/packages/box/react.d.ts +2 -0
  66. package/dist/packages/box/react.js +8 -0
  67. package/dist/packages/box/slot.test.d.ts +1 -0
  68. package/dist/packages/box/slot.test.js +9 -0
  69. package/dist/packages/box/styles.d.ts +1 -0
  70. package/dist/packages/box/styles.js +2 -0
  71. package/dist/packages/breadcrumbs/breadcrumbs.stories.d.ts +12 -0
  72. package/dist/packages/breadcrumbs/breadcrumbs.stories.js +60 -0
  73. package/dist/packages/breadcrumbs/breadcrumbs.test.d.ts +1 -0
  74. package/dist/packages/breadcrumbs/breadcrumbs.test.js +16 -0
  75. package/dist/packages/breadcrumbs/index.d.ts +24 -16
  76. package/dist/packages/breadcrumbs/index.js +2402 -2051
  77. package/dist/packages/breadcrumbs/index.js.map +4 -4
  78. package/dist/packages/breadcrumbs/locales/da/messages.mjs +1 -0
  79. package/dist/packages/breadcrumbs/locales/en/messages.mjs +1 -0
  80. package/dist/packages/breadcrumbs/locales/fi/messages.mjs +1 -0
  81. package/dist/packages/breadcrumbs/locales/nb/messages.mjs +1 -0
  82. package/dist/packages/breadcrumbs/locales/sv/messages.mjs +1 -0
  83. package/dist/packages/breadcrumbs/react.d.ts +2 -0
  84. package/dist/packages/breadcrumbs/react.js +8 -0
  85. package/dist/packages/breadcrumbs/styles.d.ts +1 -0
  86. package/dist/packages/breadcrumbs/styles.js +2 -0
  87. package/dist/packages/button/button.stories.d.ts +21 -0
  88. package/dist/packages/button/button.stories.js +119 -0
  89. package/dist/packages/button/button.test.d.ts +1 -0
  90. package/dist/packages/button/button.test.js +24 -0
  91. package/dist/packages/button/index.d.ts +111 -56
  92. package/dist/packages/button/index.js +2612 -2130
  93. package/dist/packages/button/index.js.map +4 -4
  94. package/dist/packages/button/locales/da/messages.mjs +1 -0
  95. package/dist/packages/button/locales/en/messages.mjs +1 -0
  96. package/dist/packages/button/locales/fi/messages.mjs +1 -0
  97. package/dist/packages/button/locales/nb/messages.mjs +1 -0
  98. package/dist/packages/button/locales/sv/messages.mjs +1 -0
  99. package/dist/packages/button/react.d.ts +2 -0
  100. package/dist/packages/button/react.js +8 -0
  101. package/dist/packages/button/styles.d.ts +1 -0
  102. package/dist/packages/button/styles.js +2 -0
  103. package/dist/packages/card/card.stories.d.ts +15 -0
  104. package/dist/packages/card/card.stories.js +82 -0
  105. package/dist/packages/card/card.test.d.ts +1 -0
  106. package/dist/packages/card/card.test.js +9 -0
  107. package/dist/packages/card/index.d.ts +33 -16
  108. package/dist/packages/card/index.js +2403 -2067
  109. package/dist/packages/card/index.js.map +4 -4
  110. package/dist/packages/card/locales/da/messages.mjs +1 -0
  111. package/dist/packages/card/locales/en/messages.mjs +1 -0
  112. package/dist/packages/card/locales/fi/messages.mjs +1 -0
  113. package/dist/packages/card/locales/nb/messages.mjs +1 -0
  114. package/dist/packages/card/locales/sv/messages.mjs +1 -0
  115. package/dist/packages/card/react.d.ts +2 -0
  116. package/dist/packages/card/react.js +8 -0
  117. package/dist/packages/card/styles.d.ts +1 -0
  118. package/dist/packages/card/styles.js +2 -0
  119. package/dist/packages/datepicker/DatePicker.test.d.ts +1 -0
  120. package/dist/packages/datepicker/DatePicker.test.js +68 -0
  121. package/dist/packages/datepicker/datepicker.d.ts +107 -0
  122. package/dist/packages/datepicker/datepicker.js +2785 -0
  123. package/dist/packages/datepicker/datepicker.js.map +7 -0
  124. package/dist/packages/datepicker/datepicker.stories.d.ts +11 -0
  125. package/dist/packages/datepicker/datepicker.stories.js +50 -0
  126. package/dist/packages/datepicker/datepicker.test.d.ts +2 -0
  127. package/dist/packages/datepicker/datepicker.test.js +62 -0
  128. package/dist/packages/datepicker/index.d.ts +1 -0
  129. package/dist/packages/datepicker/index.js +2785 -0
  130. package/dist/packages/datepicker/index.js.map +7 -0
  131. package/dist/packages/datepicker/locales/da/messages.d.mts +1 -0
  132. package/dist/packages/datepicker/locales/da/messages.mjs +1 -0
  133. package/dist/packages/datepicker/locales/en/messages.d.mts +1 -0
  134. package/dist/packages/datepicker/locales/en/messages.mjs +1 -0
  135. package/dist/packages/datepicker/locales/fi/messages.d.mts +1 -0
  136. package/dist/packages/datepicker/locales/fi/messages.mjs +1 -0
  137. package/dist/packages/datepicker/locales/nb/messages.d.mts +1 -0
  138. package/dist/packages/datepicker/locales/nb/messages.mjs +1 -0
  139. package/dist/packages/datepicker/locales/sv/messages.d.mts +1 -0
  140. package/dist/packages/datepicker/locales/sv/messages.mjs +1 -0
  141. package/dist/packages/datepicker/react.d.ts +2 -0
  142. package/dist/packages/datepicker/react.js +8 -0
  143. package/dist/packages/datepicker/styles/w-datepicker-calendar.styles.d.ts +1 -0
  144. package/dist/packages/datepicker/styles/w-datepicker-calendar.styles.js +15 -0
  145. package/dist/packages/datepicker/styles/w-datepicker-day.styles.d.ts +1 -0
  146. package/dist/packages/datepicker/styles/w-datepicker-day.styles.js +64 -0
  147. package/dist/packages/datepicker/styles/w-datepicker-month.styles.d.ts +1 -0
  148. package/dist/packages/datepicker/styles/w-datepicker-month.styles.js +72 -0
  149. package/dist/packages/datepicker/styles/w-datepicker.styles.d.ts +1 -0
  150. package/dist/packages/datepicker/styles/w-datepicker.styles.js +101 -0
  151. package/dist/packages/datepicker/utils.d.ts +13 -0
  152. package/dist/packages/datepicker/utils.js +28 -0
  153. package/dist/packages/dead-toggle/dead-toggle.stories.d.ts +10 -0
  154. package/dist/packages/dead-toggle/dead-toggle.stories.js +23 -0
  155. package/dist/packages/dead-toggle/dead-toggle.test.d.ts +1 -0
  156. package/dist/packages/dead-toggle/dead-toggle.test.js +9 -0
  157. package/dist/packages/dead-toggle/index.d.ts +21 -0
  158. package/dist/packages/dead-toggle/index.js +2487 -0
  159. package/dist/packages/dead-toggle/index.js.map +7 -0
  160. package/dist/packages/dead-toggle/react.d.ts +2 -0
  161. package/dist/packages/dead-toggle/react.js +8 -0
  162. package/dist/packages/expandable/expandable.stories.d.ts +19 -0
  163. package/dist/packages/expandable/expandable.stories.js +133 -0
  164. package/dist/packages/expandable/expandable.test.d.ts +1 -0
  165. package/dist/packages/expandable/expandable.test.js +24 -0
  166. package/dist/packages/expandable/index.d.ts +55 -50
  167. package/dist/packages/expandable/index.js +2416 -2287
  168. package/dist/packages/expandable/index.js.map +4 -4
  169. package/dist/packages/expandable/react.d.ts +2 -0
  170. package/dist/packages/expandable/react.js +8 -0
  171. package/dist/packages/expandable/styles.d.ts +1 -0
  172. package/dist/packages/expandable/styles.js +2 -0
  173. package/dist/packages/i18n.js +44 -0
  174. package/dist/packages/link/index.d.ts +39 -0
  175. package/dist/packages/link/index.js +2646 -0
  176. package/dist/packages/link/index.js.map +7 -0
  177. package/dist/packages/link/link.stories.d.ts +20 -0
  178. package/dist/packages/link/link.stories.js +121 -0
  179. package/dist/packages/link/link.test.d.ts +1 -0
  180. package/dist/packages/link/link.test.js +9 -0
  181. package/dist/packages/link/react.d.ts +2 -0
  182. package/dist/packages/link/react.js +8 -0
  183. package/dist/packages/link/styles.d.ts +1 -0
  184. package/dist/packages/link/styles.js +200 -0
  185. package/dist/packages/modal/index.d.ts +4 -5
  186. package/dist/packages/modal/index.js +2649 -2569
  187. package/dist/packages/modal/index.js.map +4 -4
  188. package/dist/packages/modal/locales/da/messages.mjs +1 -0
  189. package/dist/packages/modal/locales/en/messages.mjs +1 -0
  190. package/dist/packages/modal/locales/fi/messages.mjs +1 -0
  191. package/dist/packages/modal/locales/nb/messages.mjs +1 -0
  192. package/dist/packages/modal/locales/sv/messages.mjs +1 -0
  193. package/dist/packages/modal/modal-footer.d.ts +18 -11
  194. package/dist/packages/modal/modal-footer.js +2460 -0
  195. package/dist/packages/modal/modal-footer.js.map +7 -0
  196. package/dist/packages/modal/modal-header.d.ts +30 -31
  197. package/dist/packages/modal/modal-header.js +2584 -0
  198. package/dist/packages/modal/modal-header.js.map +7 -0
  199. package/dist/packages/modal/modal-main.d.ts +32 -31
  200. package/dist/packages/modal/modal-main.js +2572 -0
  201. package/dist/packages/modal/modal-main.js.map +7 -0
  202. package/dist/packages/modal/modal.stories.d.ts +19 -0
  203. package/dist/packages/modal/modal.stories.js +160 -0
  204. package/dist/packages/modal/react.d.ts +4 -0
  205. package/dist/packages/modal/react.js +18 -0
  206. package/dist/packages/modal/util.d.ts +7 -17
  207. package/dist/packages/modal/util.js +21 -0
  208. package/dist/packages/pageindicator/index.d.ts +14 -0
  209. package/dist/packages/pageindicator/index.js +32 -0
  210. package/dist/packages/pageindicator/index.js.map +7 -0
  211. package/dist/packages/pageindicator/pageindicator.stories.d.ts +32 -0
  212. package/dist/packages/pageindicator/pageindicator.stories.js +71 -0
  213. package/dist/packages/pageindicator/react.d.ts +2 -0
  214. package/dist/packages/pageindicator/react.js +8 -0
  215. package/dist/packages/pageindicator/style.d.ts +1 -0
  216. package/dist/packages/pageindicator/style.js +26 -0
  217. package/dist/packages/pagination/index.d.ts +37 -0
  218. package/dist/packages/pagination/index.js +2494 -0
  219. package/dist/packages/pagination/index.js.map +7 -0
  220. package/dist/packages/pagination/locales/da/messages.d.mts +1 -0
  221. package/dist/packages/pagination/locales/da/messages.mjs +1 -0
  222. package/dist/packages/pagination/locales/en/messages.d.mts +1 -0
  223. package/dist/packages/pagination/locales/en/messages.mjs +1 -0
  224. package/dist/packages/pagination/locales/fi/messages.d.mts +1 -0
  225. package/dist/packages/pagination/locales/fi/messages.mjs +1 -0
  226. package/dist/packages/pagination/locales/nb/messages.d.mts +1 -0
  227. package/dist/packages/pagination/locales/nb/messages.mjs +1 -0
  228. package/dist/packages/pagination/locales/sv/messages.d.mts +1 -0
  229. package/dist/packages/pagination/locales/sv/messages.mjs +1 -0
  230. package/dist/packages/pagination/pagination.stories.d.ts +14 -0
  231. package/dist/packages/pagination/pagination.stories.js +56 -0
  232. package/dist/packages/pagination/pagination.test.d.ts +1 -0
  233. package/dist/packages/pagination/pagination.test.js +76 -0
  234. package/dist/packages/pagination/react.d.ts +2 -0
  235. package/dist/packages/pagination/react.js +8 -0
  236. package/dist/packages/pagination/styles.d.ts +1 -0
  237. package/dist/packages/pagination/styles.js +2 -0
  238. package/dist/packages/pill/index.d.ts +44 -23
  239. package/dist/packages/pill/index.js +2408 -2175
  240. package/dist/packages/pill/index.js.map +4 -4
  241. package/dist/packages/pill/locales/da/messages.mjs +1 -0
  242. package/dist/packages/pill/locales/en/messages.mjs +1 -0
  243. package/dist/packages/pill/locales/fi/messages.mjs +1 -0
  244. package/dist/packages/pill/locales/nb/messages.mjs +1 -0
  245. package/dist/packages/pill/locales/sv/messages.mjs +1 -0
  246. package/dist/packages/pill/pill.stories.d.ts +12 -0
  247. package/dist/packages/pill/pill.stories.js +33 -0
  248. package/dist/packages/pill/pill.test.d.ts +1 -0
  249. package/dist/packages/pill/pill.test.js +23 -0
  250. package/dist/packages/pill/styles.d.ts +1 -0
  251. package/dist/packages/pill/styles.js +2 -0
  252. package/dist/packages/rip-and-tear-checkbox/checkbox.d.ts +64 -0
  253. package/dist/packages/rip-and-tear-checkbox/checkbox.js +210 -0
  254. package/dist/packages/rip-and-tear-checkbox/index.d.ts +6 -0
  255. package/dist/packages/rip-and-tear-checkbox/index.js +160 -0
  256. package/dist/packages/rip-and-tear-checkbox/index.js.map +7 -0
  257. package/dist/packages/rip-and-tear-checkbox/styles.d.ts +1 -0
  258. package/dist/packages/rip-and-tear-checkbox/styles.js +116 -0
  259. package/dist/packages/rip-and-tear-radio/base-element.d.ts +46 -0
  260. package/dist/packages/rip-and-tear-radio/base-element.js +100 -0
  261. package/dist/packages/rip-and-tear-radio/custom-error-validator.d.ts +6 -0
  262. package/dist/packages/rip-and-tear-radio/custom-error-validator.js +22 -0
  263. package/dist/packages/rip-and-tear-radio/form-associated-element.d.ts +103 -0
  264. package/dist/packages/rip-and-tear-radio/form-associated-element.js +282 -0
  265. package/dist/packages/rip-and-tear-radio/host-styles.d.ts +1 -0
  266. package/dist/packages/rip-and-tear-radio/host-styles.js +12 -0
  267. package/dist/packages/rip-and-tear-radio/index.d.ts +8 -0
  268. package/dist/packages/rip-and-tear-radio/index.js +272 -0
  269. package/dist/packages/rip-and-tear-radio/index.js.map +7 -0
  270. package/dist/packages/rip-and-tear-radio/invalid.d.ts +8 -0
  271. package/dist/packages/rip-and-tear-radio/invalid.js +5 -0
  272. package/dist/packages/rip-and-tear-radio/math.d.ts +1 -0
  273. package/dist/packages/rip-and-tear-radio/math.js +4 -0
  274. package/dist/packages/rip-and-tear-radio/radio-group-styles.d.ts +1 -0
  275. package/dist/packages/rip-and-tear-radio/radio-group-styles.js +60 -0
  276. package/dist/packages/rip-and-tear-radio/radio-group.d.ts +72 -0
  277. package/dist/packages/rip-and-tear-radio/radio-group.js +339 -0
  278. package/dist/packages/rip-and-tear-radio/radio-styles.d.ts +1 -0
  279. package/dist/packages/rip-and-tear-radio/radio-styles.js +172 -0
  280. package/dist/packages/rip-and-tear-radio/radio.d.ts +38 -0
  281. package/dist/packages/rip-and-tear-radio/radio.js +107 -0
  282. package/dist/packages/rip-and-tear-radio/required-validator.d.ts +11 -0
  283. package/dist/packages/rip-and-tear-radio/required-validator.js +34 -0
  284. package/dist/packages/rip-and-tear-radio/slot.d.ts +20 -0
  285. package/dist/packages/rip-and-tear-radio/slot.js +71 -0
  286. package/dist/packages/rip-and-tear-radio/watch.d.ts +26 -0
  287. package/dist/packages/rip-and-tear-radio/watch.js +39 -0
  288. package/dist/packages/select/index.d.ts +59 -48
  289. package/dist/packages/select/index.js +2421 -2236
  290. package/dist/packages/select/index.js.map +4 -4
  291. package/dist/packages/select/locales/da/messages.mjs +1 -0
  292. package/dist/packages/select/locales/en/messages.mjs +1 -0
  293. package/dist/packages/select/locales/fi/messages.mjs +1 -0
  294. package/dist/packages/select/locales/nb/messages.mjs +1 -0
  295. package/dist/packages/select/locales/sv/messages.mjs +1 -0
  296. package/dist/packages/select/react.d.ts +2 -0
  297. package/dist/packages/select/react.js +8 -0
  298. package/dist/packages/select/select.stories.d.ts +10 -0
  299. package/dist/packages/select/select.stories.js +31 -0
  300. package/dist/packages/select/select.test.d.ts +1 -0
  301. package/dist/packages/select/select.test.js +31 -0
  302. package/dist/packages/select/styles.d.ts +1 -0
  303. package/dist/packages/select/styles.js +2 -0
  304. package/dist/packages/steps/index.d.ts +43 -0
  305. package/dist/packages/steps/index.js +2465 -0
  306. package/dist/packages/steps/index.js.map +7 -0
  307. package/dist/packages/steps/locales/da/messages.d.mts +1 -0
  308. package/dist/packages/steps/locales/da/messages.mjs +1 -0
  309. package/dist/packages/steps/locales/en/messages.d.mts +1 -0
  310. package/dist/packages/steps/locales/en/messages.mjs +1 -0
  311. package/dist/packages/steps/locales/fi/messages.d.mts +1 -0
  312. package/dist/packages/steps/locales/fi/messages.mjs +1 -0
  313. package/dist/packages/steps/locales/nb/messages.d.mts +1 -0
  314. package/dist/packages/steps/locales/nb/messages.mjs +1 -0
  315. package/dist/packages/steps/locales/sv/messages.d.mts +1 -0
  316. package/dist/packages/steps/locales/sv/messages.mjs +1 -0
  317. package/dist/packages/steps/react.d.ts +3 -0
  318. package/dist/packages/steps/react.js +13 -0
  319. package/dist/packages/steps/steps.stories.d.ts +12 -0
  320. package/dist/packages/steps/steps.stories.js +172 -0
  321. package/dist/packages/steps/styles.d.ts +1 -0
  322. package/dist/packages/steps/styles.js +2 -0
  323. package/dist/packages/styles.d.ts +2 -0
  324. package/dist/packages/styles.js +2442 -0
  325. package/dist/packages/switch/index.d.ts +20 -0
  326. package/dist/packages/switch/index.js +2455 -0
  327. package/dist/packages/switch/index.js.map +7 -0
  328. package/dist/packages/switch/react.d.ts +2 -0
  329. package/dist/packages/switch/react.js +8 -0
  330. package/dist/packages/switch/styles.d.ts +1 -0
  331. package/dist/packages/switch/styles.js +2 -0
  332. package/dist/packages/switch/switch.stories.d.ts +9 -0
  333. package/dist/packages/switch/switch.stories.js +34 -0
  334. package/dist/packages/tabs/index.d.ts +4 -0
  335. package/dist/packages/tabs/index.js +2470 -0
  336. package/dist/packages/tabs/index.js.map +7 -0
  337. package/dist/packages/tabs/react.d.ts +4 -0
  338. package/dist/packages/tabs/react.js +18 -0
  339. package/dist/packages/tabs/styles.d.ts +1 -0
  340. package/dist/packages/tabs/styles.js +2 -0
  341. package/dist/packages/tabs/tab-panel.d.ts +20 -0
  342. package/dist/packages/tabs/tab-panel.js +51 -0
  343. package/dist/packages/tabs/tab.d.ts +23 -0
  344. package/dist/packages/tabs/tab.js +103 -0
  345. package/dist/packages/tabs/tabs.d.ts +38 -0
  346. package/dist/packages/tabs/tabs.js +238 -0
  347. package/dist/packages/tabs/tabs.stories.d.ts +8 -0
  348. package/dist/packages/tabs/tabs.stories.js +84 -0
  349. package/dist/packages/textfield/index.d.ts +72 -74
  350. package/dist/packages/textfield/index.js +2456 -413
  351. package/dist/packages/textfield/index.js.map +4 -4
  352. package/dist/packages/textfield/react.d.ts +2 -0
  353. package/dist/packages/textfield/react.js +8 -0
  354. package/dist/packages/textfield/styles.d.ts +1 -0
  355. package/dist/packages/textfield/styles.js +2 -0
  356. package/dist/packages/textfield/textfield.stories.d.ts +17 -0
  357. package/dist/packages/textfield/textfield.stories.js +86 -0
  358. package/dist/packages/textfield/textfield.test.d.ts +1 -0
  359. package/dist/packages/textfield/textfield.test.js +9 -0
  360. package/dist/packages/toast/api.d.ts +4 -45
  361. package/dist/packages/toast/api.js +41 -0
  362. package/dist/packages/toast/index.d.ts +3 -0
  363. package/dist/packages/toast/index.js +2466 -2787
  364. package/dist/packages/toast/index.js.map +4 -4
  365. package/dist/packages/toast/locales/da/messages.mjs +1 -0
  366. package/dist/packages/toast/locales/en/messages.mjs +1 -0
  367. package/dist/packages/toast/locales/fi/messages.mjs +1 -0
  368. package/dist/packages/toast/locales/nb/messages.mjs +1 -0
  369. package/dist/packages/toast/locales/sv/messages.mjs +1 -0
  370. package/dist/packages/toast/styles.d.ts +1 -0
  371. package/dist/packages/toast/styles.js +2 -0
  372. package/dist/packages/toast/toast-container.d.ts +12 -63
  373. package/dist/packages/toast/toast-container.js +153 -0
  374. package/dist/packages/toast/toast.d.ts +34 -29
  375. package/dist/packages/toast/toast.js +200 -0
  376. package/dist/packages/toast/toast.stories.d.ts +12 -0
  377. package/dist/packages/toast/toast.stories.js +50 -0
  378. package/dist/packages/toast/types.d.ts +15 -0
  379. package/dist/packages/toast/types.js +1 -0
  380. package/dist/packages/utils/expand-transition.d.ts +3 -2
  381. package/dist/packages/utils/expand-transition.js +59 -0
  382. package/dist/packages/utils/index.d.ts +1 -1
  383. package/dist/packages/utils/index.js +2 -0
  384. package/dist/packages/utils/index.js.map +7 -0
  385. package/dist/packages/utils/unstyled-heading.d.ts +3 -3
  386. package/dist/packages/utils/unstyled-heading.js +22 -0
  387. package/dist/packages/utils/window-exists.js +1 -0
  388. package/dist/setup-tests.d.ts +1 -0
  389. package/dist/setup-tests.js +1 -0
  390. package/dist/vscode.css-custom-data.json +6 -0
  391. package/dist/vscode.html-custom-data.json +421 -0
  392. package/dist/web-types.json +949 -0
  393. package/package.json +88 -32
  394. package/dist/index.d.ts +0 -18
  395. package/dist/index.js +0 -6832
  396. package/dist/index.js.map +0 -7
@@ -0,0 +1 @@
1
+ /*eslint-disable*/ export const messages = JSON.parse("{\"pill.aria.openFilter\":[\"Åbn filter\"],\"pill.aria.removeFilter\":[\"Fjern filter \",[\"label\"]]}");
@@ -0,0 +1 @@
1
+ /*eslint-disable*/ export const messages = JSON.parse("{\"pill.aria.openFilter\":[\"Open filter\"],\"pill.aria.removeFilter\":[\"Remove filter \",[\"label\"]]}");
@@ -0,0 +1 @@
1
+ /*eslint-disable*/ export const messages = JSON.parse("{\"pill.aria.openFilter\":[\"Avaa suodatin\"],\"pill.aria.removeFilter\":[\"Tyhjennä suodatin \",[\"label\"]]}");
@@ -0,0 +1 @@
1
+ /*eslint-disable*/ export const messages = JSON.parse("{\"pill.aria.openFilter\":[\"Åpne filter\"],\"pill.aria.removeFilter\":[\"Fjern filter \",[\"label\"]]}");
@@ -0,0 +1 @@
1
+ /*eslint-disable*/ export const messages = JSON.parse("{\"pill.aria.openFilter\":[\"Öppna filter\"],\"pill.aria.removeFilter\":[\"Ta bort filtret \",[\"label\"]]}");
@@ -0,0 +1,12 @@
1
+ import type { Meta, StoryObj } from '@storybook/web-components-vite';
2
+ import type { WarpPill } from './index.js';
3
+ import './index.js';
4
+ declare const args: Partial<WarpPill> & {
5
+ [key: string]: any;
6
+ };
7
+ declare const meta: Meta<typeof args>;
8
+ export default meta;
9
+ type Story = StoryObj<typeof args>;
10
+ export declare const Default: Story;
11
+ export declare const Suggestion: Story;
12
+ export declare const Closable: Story;
@@ -0,0 +1,33 @@
1
+ import { html } from 'lit';
2
+ import { spread } from '@open-wc/lit-helpers';
3
+ import { getStorybookHelpers } from '@wc-toolkit/storybook-helpers';
4
+ import { prespread } from '../../.storybook/utilities.js';
5
+ import './index.js';
6
+ const { events, args, argTypes } = getStorybookHelpers('w-pill');
7
+ const meta = {
8
+ title: 'Buttons/Pill',
9
+ render(args) {
10
+ return html `<w-pill ${spread(prespread(args))}>Lorem</w-pill>`;
11
+ },
12
+ args,
13
+ argTypes,
14
+ parameters: {
15
+ actions: {
16
+ handles: events,
17
+ },
18
+ },
19
+ };
20
+ export default meta;
21
+ export const Default = {
22
+ args: {},
23
+ };
24
+ export const Suggestion = {
25
+ args: {
26
+ suggestion: true,
27
+ },
28
+ };
29
+ export const Closable = {
30
+ args: {
31
+ 'can-close': true,
32
+ },
33
+ };
@@ -0,0 +1 @@
1
+ import './index.js';
@@ -0,0 +1,23 @@
1
+ import { html } from 'lit';
2
+ import { expect, test } from 'vitest';
3
+ import { render } from 'vitest-browser-lit';
4
+ import './index.js';
5
+ test('renders a pill', async () => {
6
+ const page = render(html ` <w-pill>Standard</w-pill>`);
7
+ await expect.element(page.getByText('Standard')).toBeVisible();
8
+ });
9
+ test('renders a pill with a close icon', async () => {
10
+ const page = render(html ` <w-pill can-close>Close me</w-pill>`);
11
+ await expect.element(page.getByText('Close me')).toBeVisible();
12
+ await expect.poll(() => page.getByText('Close me').element().shadowRoot.querySelector('w-icon-close-16')).toBeVisible();
13
+ });
14
+ test('renders screen reader label on the pill', async () => {
15
+ const page = render(html ` <w-pill open-sr-label="Open me please">Close me</w-pill>`);
16
+ await expect.element(page.getByText('Close me')).toBeVisible();
17
+ await expect.element(page.getByText('Open me please')).toBeVisible();
18
+ });
19
+ test('renders screen reader label on the pill', async () => {
20
+ const page = render(html ` <w-pill open-aria-label="Open me please">Close me</w-pill>`);
21
+ await expect.element(page.getByText('Close me')).toBeVisible();
22
+ await expect.element(page.getByText('Open me please')).toBeVisible();
23
+ });
@@ -0,0 +1 @@
1
+ export declare const styles: import("lit").CSSResult;
@@ -0,0 +1,2 @@
1
+ import { css } from 'lit';
2
+ export const styles = css `*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.bg-\\[--w-color-pill-suggestion-background\\]{background-color:var(--w-color-pill-suggestion-background)}.hover\\:bg-\\[--w-color-pill-suggestion-background-hover\\]:hover{background-color:var(--w-color-pill-suggestion-background-hover)}.active\\:bg-\\[--w-color-pill-suggestion-background-active\\]:active{background-color:var(--w-color-pill-suggestion-background-active)}.rounded-l-full{border-top-left-radius:9999px;border-bottom-left-radius:9999px}.rounded-r-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}.flex{display:flex}.inline-flex{display:inline-flex}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:none}.items-center{align-items:center}.static{position:static}.s-bg-primary{background-color:var(--w-s-color-background-primary)}.hover\\:s-bg-primary-hover:hover{background-color:var(--w-s-color-background-primary-hover)}.active\\:s-bg-primary-active:active{background-color:var(--w-s-color-background-primary-active)}.s-text{color:var(--w-s-color-text)}.s-text-inverted{color:var(--w-s-color-text-inverted)}.h-16{height:1.6rem}.py-8{padding-top:.8rem;padding-bottom:.8rem}.pl-12{padding-left:1.2rem}.pl-4{padding-left:.4rem}.pr-12{padding-right:1.2rem}.pr-2{padding-right:.2rem}.font-bold{font-weight:700}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.transition-all{transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}`;
@@ -0,0 +1,64 @@
1
+ import type { PropertyValues } from 'lit';
2
+ import { BaseFormAssociatedElement } from '../rip-and-tear-radio/form-associated-element';
3
+ import '@warp-ds/icons/elements/check-16';
4
+ export declare class WCheckbox extends BaseFormAssociatedElement {
5
+ static css: import("lit").CSSResult[];
6
+ static shadowRootOptions: {
7
+ delegatesFocus: boolean;
8
+ mode: ShadowRootMode;
9
+ serializable?: boolean;
10
+ slotAssignment?: SlotAssignmentMode;
11
+ };
12
+ static get validators(): import("../rip-and-tear-radio/form-associated-element").Validator<BaseFormAssociatedElement>[];
13
+ private readonly hasSlotController;
14
+ input: HTMLInputElement;
15
+ title: string;
16
+ /** The name of the checkbox, submitted as a name/value pair with form data. */
17
+ name: string;
18
+ private _value;
19
+ /** The value of the checkbox, submitted as a name/value pair with form data. */
20
+ get value(): string | null;
21
+ set value(val: string | null);
22
+ /** The checkbox's size. */
23
+ size: 'small' | 'medium' | 'large';
24
+ /** Disables the checkbox. */
25
+ disabled: boolean;
26
+ /**
27
+ * Draws the checkbox in an indeterminate state. This is usually applied to checkboxes that represents a "select
28
+ * all/none" behavior when associated checkboxes have a mix of checked and unchecked states.
29
+ */
30
+ indeterminate: boolean;
31
+ /** Draws the checkbox in a checked state. */
32
+ checked: boolean;
33
+ /** The default value of the form control. Primarily used for resetting the form control. */
34
+ defaultChecked: boolean;
35
+ /**
36
+ * By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you
37
+ * to place the form control outside of a form and associate it with the form that has this `id`. The form must be in
38
+ * the same document or shadow root for this to work.
39
+ */
40
+ form: any;
41
+ /** Makes the checkbox a required field. */
42
+ required: boolean;
43
+ /** The checkbox's hint. If you need to display HTML, use the `hint` slot instead. */
44
+ hint: string;
45
+ private handleClick;
46
+ handleDefaultCheckedChange(): void;
47
+ handleValueOrCheckedChange(): void;
48
+ handleStateChange(): void;
49
+ handleDisabledChange(): void;
50
+ protected willUpdate(changedProperties: PropertyValues<this>): void;
51
+ formResetCallback(): void;
52
+ /** Simulates a click on the checkbox. */
53
+ click(): void;
54
+ /** Sets focus on the checkbox. */
55
+ focus(options?: FocusOptions): void;
56
+ /** Removes focus from the checkbox. */
57
+ blur(): void;
58
+ render(): import("lit").TemplateResult<1>;
59
+ }
60
+ declare global {
61
+ interface HTMLElementTagNameMap {
62
+ 'w-checkbox': WCheckbox;
63
+ }
64
+ }
@@ -0,0 +1,210 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { html } from 'lit';
8
+ import { property, query } from 'lit/decorators.js';
9
+ import { classMap } from 'lit/directives/class-map.js';
10
+ import { ifDefined } from 'lit/directives/if-defined.js';
11
+ import { live } from 'lit/directives/live.js';
12
+ import { BaseFormAssociatedElement } from '../rip-and-tear-radio/form-associated-element';
13
+ import { RequiredValidator } from '../rip-and-tear-radio/required-validator';
14
+ import { HasSlotController } from '../rip-and-tear-radio/slot';
15
+ import { watch } from '../rip-and-tear-radio/watch';
16
+ import '@warp-ds/icons/elements/check-16';
17
+ // eslint-disable-next-line
18
+ // @ts-ignore
19
+ import { styles } from './styles';
20
+ export class WCheckbox extends BaseFormAssociatedElement {
21
+ constructor() {
22
+ super(...arguments);
23
+ this.hasSlotController = new HasSlotController(this, 'hint');
24
+ this.title = ''; // make reactive to pass through
25
+ /** The name of the checkbox, submitted as a name/value pair with form data. */
26
+ this.name = '';
27
+ this._value = this.getAttribute('value') ?? null;
28
+ /** The checkbox's size. */
29
+ this.size = 'medium';
30
+ /** Disables the checkbox. */
31
+ this.disabled = false;
32
+ /**
33
+ * Draws the checkbox in an indeterminate state. This is usually applied to checkboxes that represents a "select
34
+ * all/none" behavior when associated checkboxes have a mix of checked and unchecked states.
35
+ */
36
+ this.indeterminate = false;
37
+ /** Draws the checkbox in a checked state. */
38
+ this.checked = this.hasAttribute('checked');
39
+ /** The default value of the form control. Primarily used for resetting the form control. */
40
+ this.defaultChecked = this.hasAttribute('checked');
41
+ /**
42
+ * By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you
43
+ * to place the form control outside of a form and associate it with the form that has this `id`. The form must be in
44
+ * the same document or shadow root for this to work.
45
+ */
46
+ this.form = null;
47
+ /** Makes the checkbox a required field. */
48
+ this.required = false;
49
+ /** The checkbox's hint. If you need to display HTML, use the `hint` slot instead. */
50
+ this.hint = '';
51
+ }
52
+ static { this.css = [styles]; }
53
+ static { this.shadowRootOptions = { ...BaseFormAssociatedElement.shadowRootOptions, delegatesFocus: true }; }
54
+ static get validators() {
55
+ const validators = [
56
+ RequiredValidator({
57
+ validationProperty: 'checked',
58
+ // Use a checkbox so we get "free" translation strings.
59
+ validationElement: Object.assign(document.createElement('input'), {
60
+ type: 'checkbox',
61
+ required: true,
62
+ }),
63
+ }),
64
+ ];
65
+ return [...super.validators, ...validators];
66
+ }
67
+ /** The value of the checkbox, submitted as a name/value pair with form data. */
68
+ get value() {
69
+ return this._value ?? 'on';
70
+ }
71
+ set value(val) {
72
+ this._value = val;
73
+ }
74
+ handleClick() {
75
+ this.hasInteracted = true;
76
+ this.checked = !this.checked;
77
+ this.indeterminate = false;
78
+ this.updateComplete.then(() => {
79
+ this.dispatchEvent(new Event('change', { bubbles: true, composed: true }));
80
+ });
81
+ }
82
+ handleDefaultCheckedChange() {
83
+ if (!this.hasInteracted && this.checked !== this.defaultChecked) {
84
+ this.checked = this.defaultChecked;
85
+ this.handleValueOrCheckedChange();
86
+ }
87
+ }
88
+ handleValueOrCheckedChange() {
89
+ // These @watch() commands seem to override the base element checks for changes, so we need to setValue for the form and and updateValidity()
90
+ this.setValue(this.checked ? this.value : null, this._value);
91
+ this.updateValidity();
92
+ }
93
+ handleStateChange() {
94
+ if (this.hasUpdated) {
95
+ this.input.checked = this.checked; // force a sync update
96
+ this.input.indeterminate = this.indeterminate; // force a sync update
97
+ }
98
+ this.customStates.set('checked', this.checked);
99
+ this.customStates.set('indeterminate', this.indeterminate);
100
+ this.updateValidity();
101
+ }
102
+ handleDisabledChange() {
103
+ this.customStates.set('disabled', this.disabled);
104
+ }
105
+ willUpdate(changedProperties) {
106
+ super.willUpdate(changedProperties);
107
+ if (changedProperties.has('defaultChecked')) {
108
+ if (!this.hasInteracted) {
109
+ this.checked = this.defaultChecked;
110
+ }
111
+ }
112
+ if (changedProperties.has('value') || changedProperties.has('checked')) {
113
+ this.handleValueOrCheckedChange();
114
+ }
115
+ }
116
+ formResetCallback() {
117
+ // Evaluate checked before the super call because of our watcher on value.
118
+ this.checked = this.defaultChecked;
119
+ super.formResetCallback();
120
+ this.handleValueOrCheckedChange();
121
+ }
122
+ /** Simulates a click on the checkbox. */
123
+ click() {
124
+ this.input.click();
125
+ }
126
+ /** Sets focus on the checkbox. */
127
+ focus(options) {
128
+ this.input.focus(options);
129
+ }
130
+ /** Removes focus from the checkbox. */
131
+ blur() {
132
+ this.input.blur();
133
+ }
134
+ render() {
135
+ const hasHintSlot = this.hasSlotController.test('hint');
136
+ const hasHint = this.hint ? true : !!hasHintSlot;
137
+ const isIndeterminate = !this.checked && this.indeterminate;
138
+ return html `
139
+ <label part="base">
140
+ <span part="control">
141
+ <input
142
+ class="input"
143
+ type="checkbox"
144
+ title=${this.title /* An empty title prevents browser validation tooltips from appearing on hover */}
145
+ name=${this.name}
146
+ value=${ifDefined(this._value)}
147
+ .indeterminate=${live(this.indeterminate)}
148
+ .checked=${live(this.checked)}
149
+ .disabled=${this.disabled}
150
+ .required=${this.required}
151
+ aria-checked=${this.checked ? 'true' : 'false'}
152
+ aria-describedby="hint"
153
+ @click=${this.handleClick} />
154
+ ${isIndeterminate ? '–' : ''}
155
+ </span>
156
+
157
+ <slot part="label"></slot>
158
+ </label>
159
+
160
+ <slot id="hint" part="hint" name="hint" aria-hidden=${hasHint ? 'false' : 'true'} class="${classMap({ 'has-slotted': hasHint })}">
161
+ ${this.hint}
162
+ </slot>
163
+ `;
164
+ }
165
+ }
166
+ __decorate([
167
+ query('input[type="checkbox"]')
168
+ ], WCheckbox.prototype, "input", void 0);
169
+ __decorate([
170
+ property()
171
+ ], WCheckbox.prototype, "title", void 0);
172
+ __decorate([
173
+ property({ reflect: true })
174
+ ], WCheckbox.prototype, "name", void 0);
175
+ __decorate([
176
+ property({ reflect: true })
177
+ ], WCheckbox.prototype, "value", null);
178
+ __decorate([
179
+ property({ reflect: true })
180
+ ], WCheckbox.prototype, "size", void 0);
181
+ __decorate([
182
+ property({ type: Boolean })
183
+ ], WCheckbox.prototype, "disabled", void 0);
184
+ __decorate([
185
+ property({ type: Boolean, reflect: true })
186
+ ], WCheckbox.prototype, "indeterminate", void 0);
187
+ __decorate([
188
+ property({ type: Boolean, attribute: false })
189
+ ], WCheckbox.prototype, "checked", void 0);
190
+ __decorate([
191
+ property({ type: Boolean, reflect: true, attribute: 'checked' })
192
+ ], WCheckbox.prototype, "defaultChecked", void 0);
193
+ __decorate([
194
+ property({ reflect: true })
195
+ ], WCheckbox.prototype, "form", void 0);
196
+ __decorate([
197
+ property({ type: Boolean, reflect: true })
198
+ ], WCheckbox.prototype, "required", void 0);
199
+ __decorate([
200
+ property()
201
+ ], WCheckbox.prototype, "hint", void 0);
202
+ __decorate([
203
+ watch('defaultChecked')
204
+ ], WCheckbox.prototype, "handleDefaultCheckedChange", null);
205
+ __decorate([
206
+ watch(['checked', 'indeterminate'])
207
+ ], WCheckbox.prototype, "handleStateChange", null);
208
+ __decorate([
209
+ watch('disabled')
210
+ ], WCheckbox.prototype, "handleDisabledChange", null);
@@ -0,0 +1,6 @@
1
+ import { WCheckbox } from './checkbox';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'w-checkbox': WCheckbox;
5
+ }
6
+ }
@@ -0,0 +1,160 @@
1
+ var Ee=Object.create;var H=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var we=Object.getOwnPropertyNames;var ke=Object.getPrototypeOf,Ce=Object.prototype.hasOwnProperty;var J=s=>{throw TypeError(s)};var G=(s,t)=>()=>(t||s((t={exports:{}}).exports,t),t.exports);var _e=(s,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of we(t))!Ce.call(s,i)&&i!==e&&H(s,i,{get:()=>t[i],enumerable:!(r=z(t,i))||r.enumerable});return s};var Ve=(s,t,e)=>(e=s!=null?Ee(ke(s)):{},_e(t||!s||!s.__esModule?H(e,"default",{value:s,enumerable:!0}):e,s));var c=(s,t,e,r)=>{for(var i=r>1?void 0:r?z(t,e):t,a=s.length-1,n;a>=0;a--)(n=s[a])&&(i=(r?n(t,e,i):n(i))||i);return r&&i&&H(t,e,i),i};var X=(s,t,e)=>t.has(s)||J("Cannot "+e);var Z=(s,t,e)=>(X(s,t,"read from private field"),e?e.call(s):t.get(s)),Q=(s,t,e)=>t.has(s)?J("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,e),Y=(s,t,e,r)=>(X(s,t,"write to private field"),r?r.call(s,e):t.set(s,e),e);var se=G(w=>{"use strict";Object.defineProperty(w,"__esModule",{value:!0});w.errorMessages=w.ErrorType=void 0;var _;(function(s){s.MalformedUnicode="MALFORMED_UNICODE",s.MalformedHexadecimal="MALFORMED_HEXADECIMAL",s.CodePointLimit="CODE_POINT_LIMIT",s.OctalDeprecation="OCTAL_DEPRECATION",s.EndOfString="END_OF_STRING"})(_=w.ErrorType||(w.ErrorType={}));w.errorMessages=new Map([[_.MalformedUnicode,"malformed Unicode character escape sequence"],[_.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[_.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[_.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[_.EndOfString,"malformed escape sequence at end of string"]])});var ne=G(g=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0});g.unraw=g.errorMessages=g.ErrorType=void 0;var h=se();Object.defineProperty(g,"ErrorType",{enumerable:!0,get:function(){return h.ErrorType}});Object.defineProperty(g,"errorMessages",{enumerable:!0,get:function(){return h.errorMessages}});function Le(s){return!s.match(/[^a-f0-9]/i)?parseInt(s,16):NaN}function x(s,t,e){let r=Le(s);if(Number.isNaN(r)||e!==void 0&&e!==s.length)throw new SyntaxError(h.errorMessages.get(t));return r}function Oe(s){let t=x(s,h.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(t)}function ie(s,t){let e=x(s,h.ErrorType.MalformedUnicode,4);if(t!==void 0){let r=x(t,h.ErrorType.MalformedUnicode,4);return String.fromCharCode(e,r)}return String.fromCharCode(e)}function xe(s){return s.charAt(0)==="{"&&s.charAt(s.length-1)==="}"}function Ne(s){if(!xe(s))throw new SyntaxError(h.errorMessages.get(h.ErrorType.MalformedUnicode));let t=s.slice(1,-1),e=x(t,h.ErrorType.MalformedUnicode);try{return String.fromCodePoint(e)}catch(r){throw r instanceof RangeError?new SyntaxError(h.errorMessages.get(h.ErrorType.CodePointLimit)):r}}function Ie(s,t=!1){if(t)throw new SyntaxError(h.errorMessages.get(h.ErrorType.OctalDeprecation));let e=parseInt(s,8);return String.fromCharCode(e)}var De=new Map([["b","\b"],["f","\f"],["n",`
2
+ `],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function Re(s){return De.get(s)||s}var He=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function ae(s,t=!1){return s.replace(He,function(e,r,i,a,n,o,l,d,f){if(r!==void 0)return"\\";if(i!==void 0)return Oe(i);if(a!==void 0)return Ne(a);if(n!==void 0)return ie(n,o);if(l!==void 0)return ie(l);if(d==="0")return"\0";if(d!==void 0)return Ie(d,!t);if(f!==void 0)return Re(f);throw new SyntaxError(h.errorMessages.get(h.ErrorType.EndOfString))})}g.unraw=ae;g.default=ae});import{html as lt}from"lit";import{property as p,query as ct}from"lit/decorators.js";import{classMap as dt}from"lit/directives/class-map.js";import{ifDefined as ut}from"lit/directives/if-defined.js";import{live as ye}from"lit/directives/live.js";import{isServer as U}from"lit";import{property as C}from"lit/decorators.js";import{LitElement as Me,unsafeCSS as Te}from"lit";import{property as ee}from"lit/decorators.js";import{css as Se}from"lit";var W=Se`
3
+ :host {
4
+ box-sizing: border-box !important;
5
+ }
6
+
7
+ :host *,
8
+ :host *::before,
9
+ :host *::after {
10
+ box-sizing: inherit !important;
11
+ }
12
+ `;var V,E=class extends Me{constructor(){super();Q(this,V,!1);this.initialReflectedProperties=new Map;this.customStates={set:(e,r)=>{var i;(i=this.internals)!=null&&i.states&&(r?this.internals.states.add(e):this.internals.states.delete(e))},has:e=>{var r;return(r=this.internals)!=null&&r.states?this.internals.states.has(e):!1}};try{this.internals=this.attachInternals()}catch(r){console.error("Element internals are not supported in your browser. Consider using a polyfill")}this.customStates.set("wa-defined",!0);let e=this.constructor;for(let[r,i]of e.elementProperties)i.default==="inherit"&&i.initial!==void 0&&typeof r=="string"&&this.customStates.set(`initial-${r}-${i.initial}`,!0)}static get styles(){let e=Array.isArray(this.css)?this.css:this.css?[this.css]:[];return[W,...e].map(r=>typeof r=="string"?Te(r):r)}attributeChangedCallback(e,r,i){Z(this,V)||(this.constructor.elementProperties.forEach((a,n)=>{a.reflect&&this[n]!=null&&this.initialReflectedProperties.set(n,this[n])}),Y(this,V,!0)),super.attributeChangedCallback(e,r,i)}willUpdate(e){super.willUpdate(e),this.initialReflectedProperties.forEach((r,i)=>{e.has(i)&&this[i]==null&&(this[i]=r)})}relayNativeEvent(e,r){e.stopImmediatePropagation(),this.dispatchEvent(new e.constructor(e.type,{...e,...r}))}};V=new WeakMap,c([ee()],E.prototype,"dir",2),c([ee()],E.prototype,"lang",2);var te=()=>({observedAttributes:["custom-error"],checkValidity(s){let t={message:"",isValid:!0,invalidKeys:[]};return s.customError&&(t.message=s.customError,t.isValid=!1,t.invalidKeys=["customError"]),t}});var T=class extends Event{constructor(){super("w-invalid",{bubbles:!0,cancelable:!1,composed:!0})}};var m=class extends E{constructor(){super();this.name=null;this.disabled=!1;this.required=!1;this.assumeInteractionOn=["input"];this.validators=[];this.valueHasChanged=!1;this.hasInteracted=!1;this.customError=null;this.emittedEvents=[];this.emitInvalid=e=>{e.target===this&&(this.hasInteracted=!0,this.dispatchEvent(new T))};this.handleInteraction=e=>{var i;let r=this.emittedEvents;r.includes(e.type)||r.push(e.type),r.length===((i=this.assumeInteractionOn)==null?void 0:i.length)&&(this.hasInteracted=!0)};U||this.addEventListener("invalid",this.emitInvalid)}static get validators(){return[te()]}static get observedAttributes(){let e=new Set(super.observedAttributes||[]);for(let r of this.validators)if(r.observedAttributes)for(let i of r.observedAttributes)e.add(i);return[...e]}connectedCallback(){super.connectedCallback(),this.updateValidity(),this.assumeInteractionOn.forEach(e=>{this.addEventListener(e,this.handleInteraction)})}firstUpdated(...e){super.firstUpdated(...e),this.updateValidity()}willUpdate(e){if(!U&&e.has("customError")&&(this.customError||(this.customError=null),this.setCustomValidity(this.customError||"")),e.has("value")||e.has("disabled")){let r=this.value;if(Array.isArray(r)){if(this.name){let i=new FormData;for(let a of r)i.append(this.name,a);this.setValue(i,i)}}else this.setValue(r,r)}e.has("disabled")&&(this.customStates.set("disabled",this.disabled),(this.hasAttribute("disabled")||!U&&!this.matches(":disabled"))&&this.toggleAttribute("disabled",this.disabled)),this.updateValidity(),super.willUpdate(e)}get labels(){return this.internals.labels}getForm(){return this.internals.form}get validity(){return this.internals.validity}get willValidate(){return this.internals.willValidate}get validationMessage(){return this.internals.validationMessage}checkValidity(){return this.updateValidity(),this.internals.checkValidity()}reportValidity(){return this.updateValidity(),this.hasInteracted=!0,this.internals.reportValidity()}get validationTarget(){return this.input||void 0}setValidity(...e){let r=e[0],i=e[1],a=e[2];a||(a=this.validationTarget),this.internals.setValidity(r,i,a||void 0),this.requestUpdate("validity"),this.setCustomStates()}setCustomStates(){let e=!!this.required,r=this.internals.validity.valid,i=this.hasInteracted;this.customStates.set("required",e),this.customStates.set("optional",!e),this.customStates.set("invalid",!r),this.customStates.set("valid",r),this.customStates.set("user-invalid",!r&&i),this.customStates.set("user-valid",r&&i)}setCustomValidity(e){if(!e){this.customError=null,this.setValidity({});return}this.customError=e,this.setValidity({customError:!0},e,this.validationTarget)}formResetCallback(){this.resetValidity(),this.hasInteracted=!1,this.valueHasChanged=!1,this.emittedEvents=[],this.updateValidity()}formDisabledCallback(e){this.disabled=e,this.updateValidity()}formStateRestoreCallback(e,r){this.value=e,r==="restore"&&this.resetValidity(),this.updateValidity()}setValue(...e){let[r,i]=e;this.internals.setFormValue(r,i)}get allValidators(){let e=this.constructor.validators||[],r=this.validators||[];return[...e,...r]}resetValidity(){this.setCustomValidity(""),this.setValidity({})}updateValidity(){if(this.disabled||this.hasAttribute("disabled")||!this.willValidate){this.resetValidity();return}let e=this.allValidators;if(!(e!=null&&e.length))return;let r={customError:!!this.customError},i=this.validationTarget||this.input||void 0,a="";for(let n of e){let{isValid:o,message:l,invalidKeys:d}=n.checkValidity(this);o||(a||(a=l),(d==null?void 0:d.length)>=0&&d.forEach(f=>r[f]=!0))}a||(a=this.validationMessage),this.setValidity(r,a,i)}};m.formAssociated=!0,c([C({reflect:!0})],m.prototype,"name",2),c([C({type:Boolean})],m.prototype,"disabled",2),c([C({state:!0,attribute:!1})],m.prototype,"valueHasChanged",2),c([C({state:!0,attribute:!1})],m.prototype,"hasInteracted",2),c([C({attribute:"custom-error",reflect:!0})],m.prototype,"customError",2),c([C({attribute:!1,state:!0,type:Object})],m.prototype,"validity",1);var re=(s={})=>{let{validationElement:t,validationProperty:e}=s;t||(t=Object.assign(document.createElement("input"),{required:!0})),e||(e="value");let r={observedAttributes:["required"],message:t.validationMessage,checkValidity(i){var d;let a={message:"",isValid:!0,invalidKeys:[]};return((d=i.required)!=null?d:i.hasAttribute("required"))&&!i[e]&&(a.message=typeof r.message=="function"?r.message(i):r.message||"",a.isValid=!1,a.invalidKeys.push("valueMissing")),a}};return r};var L=class{constructor(t,...e){this.slotNames=[];this.handleSlotChange=t=>{let e=t.target;(this.slotNames.includes("[default]")&&!e.name||e.name&&this.slotNames.includes(e.name))&&this.host.requestUpdate()};(this.host=t).addController(this),this.slotNames=e}hasDefaultSlot(){return[...this.host.childNodes].some(t=>{if(t.nodeType===Node.TEXT_NODE&&t.textContent.trim()!=="")return!0;if(t.nodeType===Node.ELEMENT_NODE){let e=t;if(e.tagName.toLowerCase()==="w-visually-hidden")return!1;if(!e.hasAttribute("slot"))return!0}return!1})}hasNamedSlot(t){return this.host.querySelector(`:scope > [slot="${t}"]`)!==null}test(t){return t==="[default]"?this.hasDefaultSlot():this.hasNamedSlot(t)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}};function O(s,t){let e={waitUntilFirstUpdate:!1,...t};return(r,i)=>{let{update:a}=r,n=Array.isArray(s)?s:[s];r.update=function(o){n.forEach(l=>{let d=l;if(o.has(d)){let f=o.get(d),v=this[d];f!==v&&(!e.waitUntilFirstUpdate||this.hasUpdated)&&this[i](f,v)}}),a.call(this,o)}}}import{LitElement as Ge}from"lit";import{unsafeStatic as Xe,html as Ze}from"lit/static-html.js";var ce=Ve(ne(),1);var y=s=>typeof s=="string",Ue=s=>typeof s=="function",oe=new Map,de="en";function P(s){return[...Array.isArray(s)?s:[s],de]}function $(s,t,e){let r=P(s);e||(e="default");let i;if(typeof e=="string")switch(i={day:"numeric",month:"short",year:"numeric"},e){case"full":i.weekday="long";case"long":i.month="long";break;case"short":i.month="numeric";break}else i=e;return N(()=>I("date",r,e),()=>new Intl.DateTimeFormat(r,i)).format(y(t)?new Date(t):t)}function Ae(s,t,e){let r;if(e||(e="default"),typeof e=="string")switch(r={second:"numeric",minute:"numeric",hour:"numeric"},e){case"full":case"long":r.timeZoneName="short";break;case"short":delete r.second}else r=e;return $(s,t,r)}function A(s,t,e){let r=P(s);return N(()=>I("number",r,e),()=>new Intl.NumberFormat(r,e)).format(t)}function le(s,t,e,{offset:r=0,...i}){var o,l;let a=P(s),n=t?N(()=>I("plural-ordinal",a),()=>new Intl.PluralRules(a,{type:"ordinal"})):N(()=>I("plural-cardinal",a),()=>new Intl.PluralRules(a,{type:"cardinal"}));return(l=(o=i[e])!=null?o:i[n.select(e-r)])!=null?l:i.other}function N(s,t){let e=s(),r=oe.get(e);return r||(r=t(),oe.set(e,r)),r}function I(s,t,e){let r=t.join("-");return`${s}-${r}-${JSON.stringify(e)}`}var ue=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,he="%__lingui_octothorpe__%",Fe=(s,t,e={})=>{let r=t||s,i=n=>typeof n=="object"?n:e[n],a=(n,o)=>{let l=Object.keys(e).length?i("number"):void 0,d=A(r,n,l);return o.replace(new RegExp(he,"g"),d)};return{plural:(n,o)=>{let{offset:l=0}=o,d=le(r,!1,n,o);return a(n-l,d)},selectordinal:(n,o)=>{let{offset:l=0}=o,d=le(r,!0,n,o);return a(n-l,d)},select:qe,number:(n,o)=>A(r,n,i(o)||{style:o}),date:(n,o)=>$(r,n,i(o)||o),time:(n,o)=>Ae(r,n,i(o)||o)}},qe=(s,t)=>{var e;return(e=t[s])!=null?e:t.other};function Pe(s,t,e){return(r={},i)=>{let a=Fe(t,e,i),n=(l,d=!1)=>Array.isArray(l)?l.reduce((f,v)=>{if(v==="#"&&d)return f+he;if(y(v))return f+v;let[B,b,K]=v,D={};b==="plural"||b==="selectordinal"||b==="select"?Object.entries(K).forEach(([R,be])=>{D[R]=n(be,b==="plural"||b==="selectordinal")}):D=K;let M;if(b){let R=a[b];M=R(r[B],D)}else M=r[B];return M==null?f:f+M},""):l,o=n(s);return y(o)&&ue.test(o)?(0,ce.unraw)(o):y(o)?o:o?String(o):""}}var $e=Object.defineProperty,je=(s,t,e)=>t in s?$e(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,Be=(s,t,e)=>(je(s,typeof t!="symbol"?t+"":t,e),e),F=class{constructor(){Be(this,"_events",{})}on(t,e){var i;var r;return(i=(r=this._events)[t])!=null||(r[t]=[]),this._events[t].push(e),()=>this.removeListener(t,e)}removeListener(t,e){let r=this._getListeners(t);if(!r)return;let i=r.indexOf(e);~i&&r.splice(i,1)}emit(t,...e){let r=this._getListeners(t);r&&r.map(i=>i.apply(this,e))}_getListeners(t){let e=this._events[t];return Array.isArray(e)?e:!1}},Ke=Object.defineProperty,ze=(s,t,e)=>t in s?Ke(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,k=(s,t,e)=>(ze(s,typeof t!="symbol"?t+"":t,e),e),q=class extends F{constructor(t){var e;super(),k(this,"_locale",""),k(this,"_locales"),k(this,"_localeData",{}),k(this,"_messages",{}),k(this,"_missing"),k(this,"_messageCompiler"),k(this,"t",this._.bind(this)),t.missing!=null&&(this._missing=t.missing),t.messages!=null&&this.load(t.messages),t.localeData!=null&&this.loadLocaleData(t.localeData),(typeof t.locale=="string"||t.locales)&&this.activate((e=t.locale)!=null?e:de,t.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){var t;return(t=this._messages[this._locale])!=null?t:{}}get localeData(){var t;return(t=this._localeData[this._locale])!=null?t:{}}_loadLocaleData(t,e){let r=this._localeData[t];r?Object.assign(r,e):this._localeData[t]=e}setMessagesCompiler(t){return this._messageCompiler=t,this}loadLocaleData(t,e){typeof t=="string"?this._loadLocaleData(t,e):Object.keys(t).forEach(r=>this._loadLocaleData(r,t[r])),this.emit("change")}_load(t,e){let r=this._messages[t];r?Object.assign(r,e):this._messages[t]=e}load(t,e){typeof t=="string"&&typeof e=="object"?this._load(t,e):Object.entries(t).forEach(([r,i])=>this._load(r,i)),this.emit("change")}loadAndActivate({locale:t,locales:e,messages:r}){this._locale=t,this._locales=e||void 0,this._messages[this._locale]=r,this.emit("change")}activate(t,e){this._locale=t,this._locales=e,this.emit("change")}_(t,e,r){if(!this.locale)throw new Error("Lingui: Attempted to call a translation function without setting a locale.\nMake sure to call `i18n.activate(locale)` before using Lingui functions.\nThis issue may also occur due to a race condition in your initialization logic.");let i=r==null?void 0:r.message;t||(t=""),y(t)||(e=t.values||e,i=t.message,t=t.id);let a=this.messages[t],n=a===void 0,o=this._missing;if(o&&n)return Ue(o)?o(this._locale,t):o;n&&this.emit("missing",{id:t,locale:this._locale});let l=a||i||t;return y(l)&&(this._messageCompiler?l=this._messageCompiler(l):console.warn(`Uncompiled message detected! Message:
13
+
14
+ > ${l}
15
+
16
+ That means you use raw catalog or your catalog doesn't have a translation for the message and fallback was used.
17
+ ICU features such as interpolation and plurals will not work properly for that message.
18
+
19
+ Please compile your catalog first.
20
+ `)),y(l)&&ue.test(l)?JSON.parse(`"${l}"`):y(l)?l:Pe(l,this._locale,this._locales)(e,r==null?void 0:r.formats)}date(t,e){return $(this._locales||this._locale,t,e)}number(t,e){return A(this._locales||this._locale,t,e)}};function Je(s={}){return new q(s)}var S=Je();var Qe=JSON.parse('{"icon.title.check":["Sjekkmerke"]}'),Ye=JSON.parse('{"icon.title.check":["Checkmark"]}'),We=JSON.parse('{"icon.title.check":["Valintamerkki"]}'),et=JSON.parse('{"icon.title.check":["Flueben"]}'),tt=JSON.parse('{"icon.title.check":["Bock"]}'),fe=["en","nb","fi","da","sv"],me="en",rt=()=>{var s;let t;switch((s=process==null?void 0:process.env)==null?void 0:s.NMP_BRAND){case"FINN":t="nb";break;case"TORI":t="fi";break;case"BLOCKET":t="sv";break;case"DBA":t="da";break;default:t="en"}return t},pe=()=>{var s;let t=(s=document==null?void 0:document.location)==null?void 0:s.hostname;return t!=null&&t.includes("finn")?"nb":t.includes("tori")?"fi":t.includes("blocket")?"sv":t.includes("dba")?"da":me},j=s=>fe.find(t=>s===t||s.toLowerCase().includes(t))||pe();function st(){var s;if(typeof window=="undefined"){let t=rt();return j(t)}try{let t=(s=document==null?void 0:document.documentElement)==null?void 0:s.lang,e=pe();return fe.includes(t)?j(t!=null?t:e):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),j(e))}catch(t){return console.warn("could not detect locale, falling back to source locale",t),me}}var it=(s,t,e,r,i,a)=>s==="nb"?e:s==="fi"?r:s==="da"?i:s==="sv"?a:t,at=(s,t,e,r,i)=>{let a=st(),n=it(a,s,t,e,r,i);S.load(a,n),S.activate(a)};at(Ye,Qe,We,et,tt);var nt=class extends Ge{render(){let s=S.t({message:"Checkmark",id:"icon.title.check",comment:"Title for check icon"});return Ze`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-check-16-part">${Xe(`<title>${s}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M3.83 7.667 7.163 11l5.334-6"></path></svg>`}};customElements.get("w-icon-check-16")||customElements.define("w-icon-check-16",nt);import{css as ot}from"lit";var ge=ot`
21
+ :host {
22
+ display: block;
23
+ user-select: none;
24
+ -webkit-user-select: none;
25
+ }
26
+
27
+ [part~='control'] {
28
+ position: relative;
29
+ width: 2rem;
30
+ height: 2rem;
31
+ border-color: var(--w-s-color-border);
32
+ border-radius: 2px;
33
+ border-style: solid;
34
+ border-width: 1px;
35
+ background-color: var(--w-s-color-background);
36
+ transition-property: all;
37
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
38
+ transition-duration: 150ms;
39
+ margin-right: 0.8rem;
40
+ text-align: center;
41
+ line-height: var(--w-line-height-xs);
42
+ font-size: var(--w-font-size-m);
43
+ }
44
+
45
+ [part~='base'] {
46
+ display: flex;
47
+ align-items: center;
48
+ position: relative;
49
+ color: currentColor;
50
+ vertical-align: middle;
51
+ cursor: pointer;
52
+ }
53
+
54
+ [part~='label'] {
55
+ display: block;
56
+ font-size: var(--w-font-size-m);
57
+ line-height: var(--w-line-height-m);
58
+ user-select: none;
59
+ cursor: pointer;
60
+ padding: 0.2rem 0;
61
+ }
62
+
63
+ label:hover [part~='control']:not(:has(:checked, :indeterminate)) {
64
+ background-color: var(--w-s-color-background-hover);
65
+ border-color: var(--w-s-color-border-primary);
66
+ }
67
+
68
+ label:hover [part~='control']:has(:checked, :indeterminate) {
69
+ border-color: var(--w-s-color-border-primary-hover);
70
+ background-color: var(--w-s-color-background-primary-hover);
71
+ }
72
+
73
+ [part~='control']:has(:checked, :indeterminate) {
74
+ color: var(--checked-icon-color, white);
75
+ border-color: var(--w-s-color-border-primary);
76
+ background-color: var(--w-s-color-background-primary);
77
+ }
78
+
79
+ [part~='control']:has(:indeterminate) {
80
+ font-weight: 700;
81
+ }
82
+
83
+ [part~='control']:has(:invalid) {
84
+ border-color: var(--w-s-color-border-negative);
85
+ }
86
+
87
+ [part~='control']:has(:invalid):hover {
88
+ background-color: var(--w-s-color-background-negative-subtle-hover);
89
+ }
90
+
91
+ [part~='control']:has(:checked):has(:invalid) {
92
+ background-color: var(--w-s-color-background-negative);
93
+ }
94
+
95
+ [part~='control']:has(:checked) {
96
+ background-image: var(--w-icon-toggle-checked);
97
+ background-position: center;
98
+ }
99
+
100
+ /* Focus */
101
+ [part~='control']:has(> input:focus-visible:not(:disabled)) {
102
+ outline: var(--wa-focus-ring);
103
+ outline-offset: var(--wa-focus-ring-offset);
104
+ }
105
+
106
+ /* Disabled */
107
+ :host [part~='base']:has(input:disabled) {
108
+ opacity: 0.5;
109
+ cursor: not-allowed;
110
+ }
111
+
112
+ input {
113
+ position: absolute;
114
+ padding: 0;
115
+ margin: 0;
116
+ height: 100%;
117
+ width: 100%;
118
+ opacity: 0;
119
+ pointer-events: none;
120
+ }
121
+
122
+ [part~='icon'] {
123
+ display: flex;
124
+
125
+ input:not(:checked, :indeterminate) + & {
126
+ visibility: hidden;
127
+ }
128
+ }
129
+
130
+ :host([required]) [part~='label']::after {
131
+ content: var(--wa-form-control-required-content);
132
+ color: var(--wa-form-control-required-content-color);
133
+ margin-inline-start: var(--wa-form-control-required-content-offset);
134
+ }`;var ve,u=class extends m{constructor(){super(...arguments);this.hasSlotController=new L(this,"hint");this.title="";this.name="";this._value=(ve=this.getAttribute("value"))!=null?ve:null;this.size="medium";this.disabled=!1;this.indeterminate=!1;this.checked=this.hasAttribute("checked");this.defaultChecked=this.hasAttribute("checked");this.form=null;this.required=!1;this.hint=""}static get validators(){let e=[re({validationProperty:"checked",validationElement:Object.assign(document.createElement("input"),{type:"checkbox",required:!0})})];return[...super.validators,...e]}get value(){var e;return(e=this._value)!=null?e:"on"}set value(e){this._value=e}handleClick(){this.hasInteracted=!0,this.checked=!this.checked,this.indeterminate=!1,this.updateComplete.then(()=>{this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))})}handleDefaultCheckedChange(){!this.hasInteracted&&this.checked!==this.defaultChecked&&(this.checked=this.defaultChecked,this.handleValueOrCheckedChange())}handleValueOrCheckedChange(){this.setValue(this.checked?this.value:null,this._value),this.updateValidity()}handleStateChange(){this.hasUpdated&&(this.input.checked=this.checked,this.input.indeterminate=this.indeterminate),this.customStates.set("checked",this.checked),this.customStates.set("indeterminate",this.indeterminate),this.updateValidity()}handleDisabledChange(){this.customStates.set("disabled",this.disabled)}willUpdate(e){super.willUpdate(e),e.has("defaultChecked")&&(this.hasInteracted||(this.checked=this.defaultChecked)),(e.has("value")||e.has("checked"))&&this.handleValueOrCheckedChange()}formResetCallback(){this.checked=this.defaultChecked,super.formResetCallback(),this.handleValueOrCheckedChange()}click(){this.input.click()}focus(e){this.input.focus(e)}blur(){this.input.blur()}render(){let e=this.hasSlotController.test("hint"),r=this.hint?!0:!!e,i=!this.checked&&this.indeterminate;return lt`
135
+ <label part="base">
136
+ <span part="control">
137
+ <input
138
+ class="input"
139
+ type="checkbox"
140
+ title=${this.title}
141
+ name=${this.name}
142
+ value=${ut(this._value)}
143
+ .indeterminate=${ye(this.indeterminate)}
144
+ .checked=${ye(this.checked)}
145
+ .disabled=${this.disabled}
146
+ .required=${this.required}
147
+ aria-checked=${this.checked?"true":"false"}
148
+ aria-describedby="hint"
149
+ @click=${this.handleClick} />
150
+ ${i?"\u2013":""}
151
+ </span>
152
+
153
+ <slot part="label"></slot>
154
+ </label>
155
+
156
+ <slot id="hint" part="hint" name="hint" aria-hidden=${r?"false":"true"} class="${dt({"has-slotted":r})}">
157
+ ${this.hint}
158
+ </slot>
159
+ `}};u.css=[ge],u.shadowRootOptions={...m.shadowRootOptions,delegatesFocus:!0},c([ct('input[type="checkbox"]')],u.prototype,"input",2),c([p()],u.prototype,"title",2),c([p({reflect:!0})],u.prototype,"name",2),c([p({reflect:!0})],u.prototype,"value",1),c([p({reflect:!0})],u.prototype,"size",2),c([p({type:Boolean})],u.prototype,"disabled",2),c([p({type:Boolean,reflect:!0})],u.prototype,"indeterminate",2),c([p({type:Boolean,attribute:!1})],u.prototype,"checked",2),c([p({type:Boolean,reflect:!0,attribute:"checked"})],u.prototype,"defaultChecked",2),c([p({reflect:!0})],u.prototype,"form",2),c([p({type:Boolean,reflect:!0})],u.prototype,"required",2),c([p()],u.prototype,"hint",2),c([O("defaultChecked")],u.prototype,"handleDefaultCheckedChange",1),c([O(["checked","indeterminate"])],u.prototype,"handleStateChange",1),c([O("disabled")],u.prototype,"handleDisabledChange",1);customElements.get("w-checkbox")||customElements.define("w-checkbox",u);
160
+ //# sourceMappingURL=index.js.map