@warp-ds/elements 2.9.2-next.1 → 2.10.0-next.10

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 (283) hide show
  1. package/README.md +4 -0
  2. package/dist/api.js +1 -1
  3. package/dist/api.js.map +1 -1
  4. package/dist/custom-elements.json +508 -145
  5. package/dist/docs/affix/affix.md +2 -2
  6. package/dist/docs/affix/styling.md +1 -0
  7. package/dist/docs/alert/alert.md +2 -2
  8. package/dist/docs/alert/styling.md +1 -0
  9. package/dist/docs/attention/attention.md +2 -0
  10. package/dist/docs/attention/styling.md +1 -0
  11. package/dist/docs/badge/badge.md +2 -0
  12. package/dist/docs/badge/styling.md +1 -0
  13. package/dist/docs/box/box.md +22 -40
  14. package/dist/docs/box/examples.md +20 -38
  15. package/dist/docs/box/styling.md +1 -0
  16. package/dist/docs/breadcrumbs/breadcrumbs.md +8 -2
  17. package/dist/docs/breadcrumbs/examples.md +7 -1
  18. package/dist/docs/breadcrumbs/styling.md +1 -0
  19. package/dist/docs/button/accessibility.md +42 -0
  20. package/dist/docs/button/api.md +63 -39
  21. package/dist/docs/button/button.md +395 -42
  22. package/dist/docs/button/examples.md +126 -0
  23. package/dist/docs/button/styling.md +72 -0
  24. package/dist/docs/button/usage.md +89 -0
  25. package/dist/docs/card/accessibility.md +74 -0
  26. package/dist/docs/card/api.md +9 -3
  27. package/dist/docs/card/card.md +236 -5
  28. package/dist/docs/card/examples.md +75 -0
  29. package/dist/docs/card/styling.md +1 -0
  30. package/dist/docs/card/usage.md +76 -0
  31. package/dist/docs/checkbox/api.md +128 -0
  32. package/dist/docs/checkbox/checkbox.md +134 -0
  33. package/dist/docs/checkbox-group/accessibility.md +71 -0
  34. package/dist/docs/checkbox-group/api.md +79 -0
  35. package/dist/docs/checkbox-group/checkbox-group.md +492 -0
  36. package/dist/docs/checkbox-group/examples.md +105 -0
  37. package/dist/docs/checkbox-group/styling.md +132 -0
  38. package/dist/docs/checkbox-group/usage.md +95 -0
  39. package/dist/docs/combobox/accessibility.md +71 -0
  40. package/dist/docs/combobox/api.md +60 -30
  41. package/dist/docs/combobox/combobox.md +205 -32
  42. package/dist/docs/combobox/examples.md +44 -0
  43. package/dist/docs/combobox/styling.md +1 -0
  44. package/dist/docs/combobox/usage.md +28 -0
  45. package/dist/docs/datepicker/accessibility.md +25 -0
  46. package/dist/docs/datepicker/api.md +22 -14
  47. package/dist/docs/datepicker/datepicker.md +208 -16
  48. package/dist/docs/datepicker/examples.md +75 -0
  49. package/dist/docs/datepicker/styling.md +1 -0
  50. package/dist/docs/datepicker/usage.md +84 -0
  51. package/dist/docs/expandable/api.md +20 -32
  52. package/dist/docs/expandable/examples.md +54 -0
  53. package/dist/docs/expandable/expandable.md +74 -32
  54. package/dist/docs/expandable/styling.md +1 -0
  55. package/dist/docs/icon/accessibility.md +5 -0
  56. package/dist/docs/icon/api.md +43 -0
  57. package/dist/docs/icon/examples.md +45 -0
  58. package/dist/docs/icon/icon.md +115 -0
  59. package/dist/docs/icon/styling.md +1 -0
  60. package/dist/docs/icon/usage.md +11 -0
  61. package/dist/docs/index.md +46 -0
  62. package/dist/docs/link/api.md +18 -22
  63. package/dist/docs/link/examples.md +75 -0
  64. package/dist/docs/link/link.md +113 -24
  65. package/dist/docs/link/styling.md +1 -0
  66. package/dist/docs/link/usage.md +18 -0
  67. package/dist/docs/modal/api.md +51 -0
  68. package/dist/docs/modal/examples.md +67 -0
  69. package/dist/docs/modal/modal.md +240 -0
  70. package/dist/docs/modal/styling.md +1 -0
  71. package/dist/docs/modal/usage.md +110 -0
  72. package/dist/docs/modal-footer/api.md +11 -0
  73. package/dist/docs/modal-footer/modal-footer.md +17 -0
  74. package/dist/docs/modal-header/api.md +42 -0
  75. package/dist/docs/modal-header/modal-header.md +48 -0
  76. package/dist/docs/page-indicator/api.md +6 -6
  77. package/dist/docs/page-indicator/examples.md +8 -0
  78. package/dist/docs/page-indicator/page-indicator.md +25 -6
  79. package/dist/docs/page-indicator/styling.md +1 -0
  80. package/dist/docs/page-indicator/usage.md +8 -0
  81. package/dist/docs/pagination/api.md +12 -10
  82. package/dist/docs/pagination/examples.md +20 -0
  83. package/dist/docs/pagination/pagination.md +52 -12
  84. package/dist/docs/pagination/styling.md +1 -0
  85. package/dist/docs/pagination/usage.md +18 -0
  86. package/dist/docs/pill/accessibility.md +2 -0
  87. package/dist/docs/pill/api.md +10 -26
  88. package/dist/docs/pill/examples.md +23 -0
  89. package/dist/docs/pill/pill.md +45 -28
  90. package/dist/docs/pill/styling.md +1 -0
  91. package/dist/docs/pill/usage.md +8 -0
  92. package/dist/docs/radio/radio.md +1 -7
  93. package/dist/docs/select/select.md +2 -0
  94. package/dist/docs/select/styling.md +1 -0
  95. package/dist/docs/slider/slider.md +2 -0
  96. package/dist/docs/slider/styling.md +1 -0
  97. package/dist/docs/slider-thumb/slider-thumb.md +2 -0
  98. package/dist/docs/slider-thumb/styling.md +1 -0
  99. package/dist/docs/step-indicator/step-indicator.md +2 -0
  100. package/dist/docs/step-indicator/styling.md +1 -0
  101. package/dist/docs/switch/styling.md +1 -0
  102. package/dist/docs/switch/switch.md +2 -0
  103. package/dist/docs/tabs/styling.md +1 -0
  104. package/dist/docs/tabs/tabs.md +2 -0
  105. package/dist/docs/textarea/styling.md +1 -0
  106. package/dist/docs/textarea/textarea.md +2 -0
  107. package/dist/docs/textfield/styling.md +1 -0
  108. package/dist/docs/textfield/textfield.md +2 -0
  109. package/dist/index.d.ts +950 -602
  110. package/dist/packages/affix/affix.hydration.test.js +1 -1
  111. package/dist/packages/affix/affix.js +4 -4
  112. package/dist/packages/affix/affix.js.map +4 -4
  113. package/dist/packages/alert/alert.hydration.test.js +1 -1
  114. package/dist/packages/alert/alert.js +3 -3
  115. package/dist/packages/alert/alert.js.map +3 -3
  116. package/dist/packages/attention/attention.hydration.test.js +1 -1
  117. package/dist/packages/attention/attention.js +397 -444
  118. package/dist/packages/attention/attention.js.map +4 -4
  119. package/dist/packages/attention/attention.test.js +1 -1
  120. package/dist/packages/badge/badge.hydration.test.js +1 -1
  121. package/dist/packages/box/box.hydration.test.js +1 -1
  122. package/dist/packages/box/box.js +1 -1
  123. package/dist/packages/box/box.js.map +1 -1
  124. package/dist/packages/breadcrumbs/breadcrumbs.hydration.test.js +3 -2
  125. package/dist/packages/breadcrumbs/breadcrumbs.js +4 -4
  126. package/dist/packages/breadcrumbs/breadcrumbs.js.map +3 -3
  127. package/dist/packages/button/button.d.ts +54 -37
  128. package/dist/packages/button/button.hydration.test.js +1 -1
  129. package/dist/packages/button/button.js +385 -432
  130. package/dist/packages/button/button.js.map +4 -4
  131. package/dist/packages/button/button.react.stories.d.ts +2 -2
  132. package/dist/packages/button/button.stories.d.ts +29 -0
  133. package/dist/packages/button/button.stories.js +176 -2
  134. package/dist/packages/button/react.d.ts +1 -1
  135. package/dist/packages/button/styles.d.ts +22 -1
  136. package/dist/packages/button/styles.js +390 -1
  137. package/dist/packages/card/card.d.ts +9 -6
  138. package/dist/packages/card/card.hydration.test.js +1 -1
  139. package/dist/packages/card/card.js +3 -3
  140. package/dist/packages/card/card.js.map +4 -4
  141. package/dist/packages/checkbox/checkbox.d.ts +45 -14
  142. package/dist/packages/checkbox/checkbox.hydration.test.js +1 -1
  143. package/dist/packages/checkbox/checkbox.js +3 -3
  144. package/dist/packages/checkbox/checkbox.js.map +3 -3
  145. package/dist/packages/checkbox/checkbox.react.stories.d.ts +1 -1
  146. package/dist/packages/checkbox/checkbox.stories.d.ts +2 -2
  147. package/dist/packages/checkbox/checkbox.test.js +1 -1
  148. package/dist/packages/checkbox/react.d.ts +2 -2
  149. package/dist/packages/checkbox-group/checkbox-group.a11y.test.js +1 -1
  150. package/dist/packages/checkbox-group/checkbox-group.d.ts +35 -8
  151. package/dist/packages/checkbox-group/checkbox-group.hydration.test.js +1 -1
  152. package/dist/packages/checkbox-group/checkbox-group.js +6 -6
  153. package/dist/packages/checkbox-group/checkbox-group.js.map +4 -4
  154. package/dist/packages/checkbox-group/react.d.ts +3 -3
  155. package/dist/packages/combobox/combobox.a11y.test.js +24 -0
  156. package/dist/packages/combobox/combobox.d.ts +65 -45
  157. package/dist/packages/combobox/combobox.hydration.test.js +39 -1
  158. package/dist/packages/combobox/combobox.js +21 -21
  159. package/dist/packages/combobox/combobox.js.map +4 -4
  160. package/dist/packages/combobox/combobox.stories.js +28 -15
  161. package/dist/packages/combobox/combobox.test.js +110 -0
  162. package/dist/packages/datepicker/DatePicker.test.js +1 -1
  163. package/dist/packages/datepicker/datepicker.d.ts +22 -30
  164. package/dist/packages/datepicker/datepicker.hydration.test.js +1 -1
  165. package/dist/packages/datepicker/datepicker.js +49 -49
  166. package/dist/packages/datepicker/datepicker.js.map +4 -4
  167. package/dist/packages/datepicker/datepicker.test.js +1 -1
  168. package/dist/packages/expandable/expandable.d.ts +11 -32
  169. package/dist/packages/expandable/expandable.hydration.test.js +1 -1
  170. package/dist/packages/expandable/expandable.js +11 -11
  171. package/dist/packages/expandable/expandable.js.map +3 -3
  172. package/dist/packages/expandable/expandable.react.stories.d.ts +2 -2
  173. package/dist/packages/expandable/react.d.ts +1 -1
  174. package/dist/packages/icon/icon.d.ts +16 -4
  175. package/dist/packages/icon/icon.hydration.test.js +1 -1
  176. package/dist/packages/icon/icon.js +2 -2
  177. package/dist/packages/icon/icon.js.map +3 -3
  178. package/dist/packages/icon/icon.react.stories.d.ts +1 -1
  179. package/dist/packages/icon/react.d.ts +2 -2
  180. package/dist/packages/link/link.d.ts +15 -16
  181. package/dist/packages/link/link.hydration.test.js +1 -1
  182. package/dist/packages/link/link.js +420 -190
  183. package/dist/packages/link/link.js.map +4 -4
  184. package/dist/packages/link/link.test.js +1 -1
  185. package/dist/packages/link/styles.d.ts +5 -0
  186. package/dist/packages/link/styles.js +80 -0
  187. package/dist/packages/modal/index.d.ts +4 -4
  188. package/dist/packages/modal/index.js +4 -4
  189. package/dist/packages/modal/modal.d.ts +22 -12
  190. package/dist/packages/modal/modal.hydration.test.js +1 -1
  191. package/dist/packages/modal/modal.js +5 -5
  192. package/dist/packages/modal/modal.js.map +3 -3
  193. package/dist/packages/modal/modal.react.stories.d.ts +3 -3
  194. package/dist/packages/modal/modal.stories.d.ts +2 -1
  195. package/dist/packages/modal/modal.stories.js +85 -3
  196. package/dist/packages/modal/react.d.ts +2 -2
  197. package/dist/packages/modal-footer/modal-footer.d.ts +5 -3
  198. package/dist/packages/modal-footer/modal-footer.js +4 -4
  199. package/dist/packages/modal-footer/modal-footer.js.map +3 -3
  200. package/dist/packages/modal-footer/react.d.ts +1 -1
  201. package/dist/packages/modal-header/modal-header.d.ts +21 -11
  202. package/dist/packages/modal-header/modal-header.js +11 -9
  203. package/dist/packages/modal-header/modal-header.js.map +4 -4
  204. package/dist/packages/modal-header/react.d.ts +2 -2
  205. package/dist/packages/page-indicator/page-indicator.d.ts +9 -14
  206. package/dist/packages/page-indicator/page-indicator.hydration.test.js +1 -1
  207. package/dist/packages/page-indicator/page-indicator.js +5 -5
  208. package/dist/packages/page-indicator/page-indicator.js.map +4 -4
  209. package/dist/packages/pagination/pagination.d.ts +11 -11
  210. package/dist/packages/pagination/pagination.hydration.test.js +1 -1
  211. package/dist/packages/pagination/pagination.js +4 -4
  212. package/dist/packages/pagination/pagination.js.map +4 -4
  213. package/dist/packages/pagination/pagination.test.js +1 -1
  214. package/dist/packages/pill/pill.d.ts +14 -29
  215. package/dist/packages/pill/pill.hydration.test.js +1 -1
  216. package/dist/packages/pill/pill.js +3 -3
  217. package/dist/packages/pill/pill.js.map +4 -4
  218. package/dist/packages/pill/pill.react.stories.d.ts +2 -2
  219. package/dist/packages/pill/react.d.ts +1 -1
  220. package/dist/packages/radio/radio.hydration.test.js +1 -1
  221. package/dist/packages/radio/radio.js +3 -3
  222. package/dist/packages/radio/radio.js.map +3 -3
  223. package/dist/packages/radio/radio.test.js +1 -1
  224. package/dist/packages/radio-group/radio-group.a11y.test.js +7 -3
  225. package/dist/packages/radio-group/radio-group.hydration.test.js +6 -2
  226. package/dist/packages/radio-group/radio-group.js +11 -11
  227. package/dist/packages/radio-group/radio-group.js.map +4 -4
  228. package/dist/packages/select/select.a11y.test.js +6 -2
  229. package/dist/packages/select/select.hydration.test.js +1 -1
  230. package/dist/packages/select/select.js +7 -7
  231. package/dist/packages/select/select.js.map +4 -4
  232. package/dist/packages/select/select.test.js +4 -2
  233. package/dist/packages/slider/slider.hydration.test.js +7 -2
  234. package/dist/packages/slider/slider.js +5 -5
  235. package/dist/packages/slider/slider.js.map +4 -4
  236. package/dist/packages/slider/slider.react.stories.js +2 -2
  237. package/dist/packages/slider/slider.test.js +1 -1
  238. package/dist/packages/slider-thumb/slider-thumb.hydration.test.js +1 -1
  239. package/dist/packages/slider-thumb/slider-thumb.js +20 -20
  240. package/dist/packages/slider-thumb/slider-thumb.js.map +4 -4
  241. package/dist/packages/step/step.hydration.test.js +1 -1
  242. package/dist/packages/step/step.js +8 -8
  243. package/dist/packages/step/step.js.map +4 -4
  244. package/dist/packages/step-indicator/step-indicator.hydration.test.js +1 -1
  245. package/dist/packages/switch/switch.a11y.test.js +1 -1
  246. package/dist/packages/switch/switch.hydration.test.js +1 -1
  247. package/dist/packages/switch/switch.js +1 -1
  248. package/dist/packages/switch/switch.js.map +1 -1
  249. package/dist/packages/tab/tab.hydration.test.js +1 -1
  250. package/dist/packages/tab/tab.js +10 -10
  251. package/dist/packages/tab/tab.js.map +2 -2
  252. package/dist/packages/tab-panel/tab-panel.hydration.test.js +1 -1
  253. package/dist/packages/tab-panel/tab-panel.js +3 -3
  254. package/dist/packages/tab-panel/tab-panel.js.map +2 -2
  255. package/dist/packages/tabs/tabs.a11y.test.js +2 -2
  256. package/dist/packages/tabs/tabs.hydration.test.js +1 -1
  257. package/dist/packages/tabs/tabs.js +1 -1
  258. package/dist/packages/tabs/tabs.js.map +2 -2
  259. package/dist/packages/tabs/tabs.test.js +4 -4
  260. package/dist/packages/textarea/textarea.hydration.test.js +1 -1
  261. package/dist/packages/textarea/textarea.js +4 -4
  262. package/dist/packages/textarea/textarea.js.map +3 -3
  263. package/dist/packages/textarea/textarea.test.js +1 -1
  264. package/dist/packages/textfield/textfield.hydration.test.js +1 -1
  265. package/dist/packages/textfield/textfield.js +1 -1
  266. package/dist/packages/textfield/textfield.js.map +1 -1
  267. package/dist/packages/textfield/textfield.test.js +1 -1
  268. package/dist/packages/toast/toast.js +6 -6
  269. package/dist/packages/toast/toast.js.map +4 -4
  270. package/dist/packages/toast/toast.stories.d.ts +1 -5
  271. package/dist/packages/toast/toast.stories.js +0 -17
  272. package/dist/packages/toast-container/toast-container.js +2 -2
  273. package/dist/packages/toast-container/toast-container.js.map +2 -2
  274. package/dist/web-types.json +509 -172
  275. package/eik/index.js +2536 -0
  276. package/package.json +18 -12
  277. package/dist/docs/radio/examples.md +0 -1
  278. package/dist/docs/radio/usage.md +0 -1
  279. package/dist/packages/button/styles/w-button.styles.d.ts +0 -1
  280. package/dist/packages/button/styles/w-button.styles.js +0 -282
  281. package/dist/packages/link/styles/w-link.styles.d.ts +0 -1
  282. package/dist/packages/link/styles/w-link.styles.js +0 -213
  283. /package/dist/docs/{radio → modal}/accessibility.md +0 -0
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react';
2
2
  import { Checkbox } from './react';
3
3
  declare const _default: {
4
4
  title: string;
5
- component: import("@lit/react").ReactWebComponent<import("./checkbox").WCheckbox, {
5
+ component: import("@lit/react").ReactWebComponent<import("./checkbox").WarpCheckbox, {
6
6
  onChange: string;
7
7
  onchange: string;
8
8
  }>;
@@ -1,8 +1,8 @@
1
1
  import type { Meta, StoryObj } from '@storybook/web-components-vite';
2
2
  import './checkbox.js';
3
3
  import '../checkbox-group/checkbox-group.js';
4
- import type { WCheckbox } from './checkbox.js';
5
- declare const args: Partial<WCheckbox> & {
4
+ import type { WarpCheckbox } from './checkbox.js';
5
+ declare const args: Partial<WarpCheckbox> & {
6
6
  [key: string]: any;
7
7
  };
8
8
  declare const meta: Meta<typeof args>;
@@ -1,6 +1,6 @@
1
1
  import { html } from 'lit';
2
2
  import { expect, test, vi } from 'vitest';
3
- import { server, userEvent } from '@vitest/browser/context';
3
+ import { server, userEvent } from 'vitest/browser';
4
4
  import { render } from 'vitest-browser-lit';
5
5
  import './checkbox.js';
6
6
  const getInput = (el) => el.shadowRoot?.querySelector('input[type="checkbox"]');
@@ -1,5 +1,5 @@
1
- import { WCheckbox } from './checkbox.js';
2
- export declare const Checkbox: import("@lit/react").ReactWebComponent<WCheckbox, {
1
+ import { WarpCheckbox } from './checkbox.js';
2
+ export declare const Checkbox: import("@lit/react").ReactWebComponent<WarpCheckbox, {
3
3
  onChange: string;
4
4
  onchange: string;
5
5
  }>;
@@ -1,5 +1,5 @@
1
1
  import { i18n } from '@lingui/core';
2
- import { userEvent } from '@vitest/browser/context';
2
+ import { userEvent } from 'vitest/browser';
3
3
  import { html } from 'lit';
4
4
  import { describe, expect, test } from 'vitest';
5
5
  import { render } from 'vitest-browser-lit';
@@ -1,6 +1,6 @@
1
1
  import { LitElement, PropertyValues } from 'lit';
2
- declare const WCheckboxGroup_base: import("@open-wc/form-control").Constructor<import("@open-wc/form-control").FormControlInterface> & typeof LitElement;
3
- export declare class WCheckboxGroup extends WCheckboxGroup_base {
2
+ declare const WarpCheckboxGroup_base: import("@open-wc/form-control").Constructor<import("@open-wc/form-control").FormControlInterface> & typeof LitElement;
3
+ export declare class WarpCheckboxGroup extends WarpCheckboxGroup_base {
4
4
  #private;
5
5
  static shadowRootOptions: {
6
6
  delegatesFocus: boolean;
@@ -10,16 +10,41 @@ export declare class WCheckboxGroup extends WCheckboxGroup_base {
10
10
  serializable?: boolean;
11
11
  slotAssignment?: SlotAssignmentMode;
12
12
  };
13
- /** The group label displayed above the checkboxes. */
13
+ /**
14
+ * The group label displayed above the checkboxes.
15
+ *
16
+ * Use this to describe the shared question or topic for the checkbox options. The label is connected to the internal group for assistive technologies.
17
+ */
14
18
  label: string;
15
- /** The name applied to child checkboxes when they do not provide one. */
19
+ /**
20
+ * The name applied to child checkboxes when they do not provide one.
21
+ *
22
+ * Use this when the grouped checkboxes should submit values under the same form field name. Individual checkboxes can still override the group name with their own `name`.
23
+ */
16
24
  name: string;
17
- /** Whether to show optional text next to the label. */
25
+ /**
26
+ * Whether to show optional text next to the label.
27
+ *
28
+ * Use this to indicate that selecting an option from the group is not required.
29
+ */
18
30
  optional: boolean;
31
+ /**
32
+ * Help text displayed below the checkbox group.
33
+ *
34
+ * Use this for supporting guidance or validation feedback. When required validation fails, the group replaces this text with the localized required message.
35
+ */
19
36
  helpText: string;
20
- /** Makes the checkbox group required. */
37
+ /**
38
+ * Whether at least one checkbox in the group must be selected.
39
+ *
40
+ * Required validation is managed by the group. The individual checkboxes provide the submitted form values.
41
+ */
21
42
  required: boolean;
22
- /** Marks the checkbox group as invalid. */
43
+ /**
44
+ * Whether the checkbox group is visually invalid.
45
+ *
46
+ * Use this to show an externally managed validation error for the group. The invalid state is also shared with child checkboxes for consistent styling and accessibility state.
47
+ */
23
48
  invalid: boolean;
24
49
  private _internalTabIndex;
25
50
  static styles: import("lit").CSSResult;
@@ -34,9 +59,11 @@ export declare class WCheckboxGroup extends WCheckboxGroup_base {
34
59
  focus(options?: FocusOptions): void;
35
60
  updated(changedProperties: PropertyValues<this>): void;
36
61
  }
62
+ /** @deprecated Use WarpCheckboxGroup */
63
+ export declare const WCheckboxGroup: typeof WarpCheckboxGroup;
37
64
  declare global {
38
65
  interface HTMLElementTagNameMap {
39
- 'w-checkbox-group': WCheckboxGroup;
66
+ 'w-checkbox-group': WarpCheckboxGroup;
40
67
  }
41
68
  }
42
69
  export {};
@@ -1,4 +1,4 @@
1
- import { describe, expect, test, beforeEach, afterEach } from 'vitest';
1
+ import { afterEach, beforeEach, describe, expect, test } from 'vitest';
2
2
  import { setupHydrationWarningCapture, testHydration } from '../../tests/react-hydration';
3
3
  import '../checkbox/checkbox.js';
4
4
  import './checkbox-group.js';
@@ -1,4 +1,4 @@
1
- var Jt=Object.defineProperty;var Bt=Object.getOwnPropertyDescriptor;var Ct=i=>{throw TypeError(i)};var S=(i,t,e,s)=>{for(var a=s>1?void 0:s?Bt(t,e):t,c=i.length-1,o;c>=0;c--)(o=i[c])&&(a=(s?o(t,e,a):o(a))||a);return s&&a&&Jt(t,e,a),a};var ot=(i,t,e)=>t.has(i)||Ct("Cannot "+e);var M=(i,t,e)=>(ot(i,t,"read from private field"),e?e.call(i):t.get(i)),x=(i,t,e)=>t.has(i)?Ct("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,e),W=(i,t,e,s)=>(ot(i,t,"write to private field"),s?s.call(i,e):t.set(i,e),e),h=(i,t,e)=>(ot(i,t,"access private method"),e);var I=i=>typeof i=="string",Kt=i=>typeof i=="function",Et=new Map,xt="en";function ut(i){return[...Array.isArray(i)?i:[i],xt]}function dt(i,t,e){let s=ut(i);e||(e="default");let a;if(typeof e=="string")switch(a={day:"numeric",month:"short",year:"numeric"},e){case"full":a.weekday="long";case"long":a.month="long";break;case"short":a.month="numeric";break}else a=e;return K(()=>Q("date",s,e),()=>new Intl.DateTimeFormat(s,a)).format(I(t)?new Date(t):t)}function Qt(i,t,e){let s;if(e||(e="default"),typeof e=="string")switch(s={second:"numeric",minute:"numeric",hour:"numeric"},e){case"full":case"long":s.timeZoneName="short";break;case"short":delete s.second}else s=e;return dt(i,t,s)}function lt(i,t,e){let s=ut(i);return K(()=>Q("number",s,e),()=>new Intl.NumberFormat(s,e)).format(t)}function Mt(i,t,e,{offset:s=0,...a}){var n,f;let c=ut(i),o=t?K(()=>Q("plural-ordinal",c),()=>new Intl.PluralRules(c,{type:"ordinal"})):K(()=>Q("plural-cardinal",c),()=>new Intl.PluralRules(c,{type:"cardinal"}));return(f=(n=a[e])!=null?n:a[o.select(e-s)])!=null?f:a.other}function K(i,t){let e=i(),s=Et.get(e);return s||(s=t(),Et.set(e,s)),s}function Q(i,t,e){let s=t.join("-");return`${i}-${s}-${JSON.stringify(e)}`}var Ft=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,kt=i=>i.replace(/\\u([a-fA-F0-9]{4})|\\x([a-fA-F0-9]{2})/g,(t,e,s)=>{if(e){let a=parseInt(e,16);return String.fromCharCode(a)}else{let a=parseInt(s,16);return String.fromCharCode(a)}}),Vt="%__lingui_octothorpe__%",Gt=(i,t,e={})=>{let s=t||i,a=o=>typeof o=="object"?o:e[o],c=(o,n)=>{let f=Object.keys(e).length?a("number"):void 0,v=lt(s,o,f);return n.replace(new RegExp(Vt,"g"),v)};return{plural:(o,n)=>{let{offset:f=0}=n,v=Mt(s,!1,o,n);return c(o-f,v)},selectordinal:(o,n)=>{let{offset:f=0}=n,v=Mt(s,!0,o,n);return c(o-f,v)},select:Xt,number:(o,n)=>lt(s,o,a(n)||{style:n}),date:(o,n)=>dt(s,o,a(n)||n),time:(o,n)=>Qt(s,o,a(n)||n)}},Xt=(i,t)=>{var e;return(e=t[i])!=null?e:t.other};function Zt(i,t,e){return(s={},a)=>{let c=Gt(t,e,a),o=(f,v=!1)=>Array.isArray(f)?f.reduce((F,k)=>{if(k==="#"&&v)return F+Vt;if(I(k))return F+k;let[P,y,V]=k,L={};y==="plural"||y==="selectordinal"||y==="select"?Object.entries(V).forEach(([T,U])=>{L[T]=o(U,y==="plural"||y==="selectordinal")}):L=V;let _;if(y){let T=c[y];_=T(s[P],L)}else _=s[P];return _==null?F:F+_},""):f,n=o(i);return I(n)&&Ft.test(n)?kt(n):I(n)?n:n?String(n):""}}var Yt=Object.defineProperty,te=(i,t,e)=>t in i?Yt(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,ee=(i,t,e)=>(te(i,typeof t!="symbol"?t+"":t,e),e),ct=class{constructor(){ee(this,"_events",{})}on(t,e){var a;var s;return(a=(s=this._events)[t])!=null||(s[t]=[]),this._events[t].push(e),()=>this.removeListener(t,e)}removeListener(t,e){let s=this._getListeners(t);if(!s)return;let a=s.indexOf(e);~a&&s.splice(a,1)}emit(t,...e){let s=this._getListeners(t);s&&s.map(a=>a.apply(this,e))}_getListeners(t){let e=this._events[t];return Array.isArray(e)?e:!1}},se=Object.defineProperty,ie=(i,t,e)=>t in i?se(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,A=(i,t,e)=>(ie(i,typeof t!="symbol"?t+"":t,e),e),ht=class extends ct{constructor(t){var e;super(),A(this,"_locale",""),A(this,"_locales"),A(this,"_localeData",{}),A(this,"_messages",{}),A(this,"_missing"),A(this,"_messageCompiler"),A(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:xt,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 s=this._localeData[t];s?Object.assign(s,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(s=>this._loadLocaleData(s,t[s])),this.emit("change")}_load(t,e){let s=this._messages[t];s?Object.assign(s,e):this._messages[t]=e}load(t,e){typeof t=="string"&&typeof e=="object"?this._load(t,e):Object.entries(t).forEach(([s,a])=>this._load(s,a)),this.emit("change")}loadAndActivate({locale:t,locales:e,messages:s}){this._locale=t,this._locales=e||void 0,this._messages[this._locale]=s,this.emit("change")}activate(t,e){this._locale=t,this._locales=e,this.emit("change")}_(t,e,s){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 a=s==null?void 0:s.message;t||(t=""),I(t)||(e=t.values||e,a=t.message,t=t.id);let c=this.messages[t],o=c===void 0,n=this._missing;if(n&&o)return Kt(n)?n(this._locale,t):n;o&&this.emit("missing",{id:t,locale:this._locale});let f=c||a||t;return I(f)&&(this._messageCompiler?f=this._messageCompiler(f):console.warn(`Uncompiled message detected! Message:
1
+ var Jt=Object.defineProperty;var Bt=Object.getOwnPropertyDescriptor;var Ct=i=>{throw TypeError(i)};var S=(i,t,e,s)=>{for(var n=s>1?void 0:s?Bt(t,e):t,c=i.length-1,r;c>=0;c--)(r=i[c])&&(n=(s?r(t,e,n):r(n))||n);return s&&n&&Jt(t,e,n),n};var ot=(i,t,e)=>t.has(i)||Ct("Cannot "+e);var M=(i,t,e)=>(ot(i,t,"read from private field"),e?e.call(i):t.get(i)),x=(i,t,e)=>t.has(i)?Ct("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,e),z=(i,t,e,s)=>(ot(i,t,"write to private field"),s?s.call(i,e):t.set(i,e),e),h=(i,t,e)=>(ot(i,t,"access private method"),e);var I=i=>typeof i=="string",Gt=i=>typeof i=="function",Et=new Map,xt="en";function ut(i){return[...Array.isArray(i)?i:[i],xt]}function dt(i,t,e){let s=ut(i);e||(e="default");let n;if(typeof e=="string")switch(n={day:"numeric",month:"short",year:"numeric"},e){case"full":n.weekday="long";case"long":n.month="long";break;case"short":n.month="numeric";break}else n=e;return G(()=>K("date",s,e),()=>new Intl.DateTimeFormat(s,n)).format(I(t)?new Date(t):t)}function Kt(i,t,e){let s;if(e||(e="default"),typeof e=="string")switch(s={second:"numeric",minute:"numeric",hour:"numeric"},e){case"full":case"long":s.timeZoneName="short";break;case"short":delete s.second}else s=e;return dt(i,t,s)}function lt(i,t,e){let s=ut(i);return G(()=>K("number",s,e),()=>new Intl.NumberFormat(s,e)).format(t)}function Mt(i,t,e,{offset:s=0,...n}){let c=ut(i),r=t?G(()=>K("plural-ordinal",c),()=>new Intl.PluralRules(c,{type:"ordinal"})):G(()=>K("plural-cardinal",c),()=>new Intl.PluralRules(c,{type:"cardinal"}));return n[e]??n[r.select(e-s)]??n.other}function G(i,t){let e=i(),s=Et.get(e);return s||(s=t(),Et.set(e,s)),s}function K(i,t,e){let s=t.join("-");return`${i}-${s}-${JSON.stringify(e)}`}var Ft=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,kt=i=>i.replace(/\\u([a-fA-F0-9]{4})|\\x([a-fA-F0-9]{2})/g,(t,e,s)=>{if(e){let n=parseInt(e,16);return String.fromCharCode(n)}else{let n=parseInt(s,16);return String.fromCharCode(n)}}),Vt="%__lingui_octothorpe__%",Qt=(i,t,e={})=>{let s=t||i,n=r=>typeof r=="object"?r:e[r],c=(r,o)=>{let f=Object.keys(e).length?n("number"):void 0,v=lt(s,r,f);return o.replace(new RegExp(Vt,"g"),v)};return{plural:(r,o)=>{let{offset:f=0}=o,v=Mt(s,!1,r,o);return c(r-f,v)},selectordinal:(r,o)=>{let{offset:f=0}=o,v=Mt(s,!0,r,o);return c(r-f,v)},select:Xt,number:(r,o)=>lt(s,r,n(o)||{style:o}),date:(r,o)=>dt(s,r,n(o)||o),time:(r,o)=>Kt(s,r,n(o)||o)}},Xt=(i,t)=>t[i]??t.other;function Zt(i,t,e){return(s={},n)=>{let c=Qt(t,e,n),r=(f,v=!1)=>Array.isArray(f)?f.reduce((F,k)=>{if(k==="#"&&v)return F+Vt;if(I(k))return F+k;let[P,w,V]=k,L={};w==="plural"||w==="selectordinal"||w==="select"?Object.entries(V).forEach(([T,U])=>{L[T]=r(U,w==="plural"||w==="selectordinal")}):L=V;let _;if(w){let T=c[w];_=T(s[P],L)}else _=s[P];return _==null?F:F+_},""):f,o=r(i);return I(o)&&Ft.test(o)?kt(o):I(o)?o:o?String(o):""}}var Yt=Object.defineProperty,te=(i,t,e)=>t in i?Yt(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,ee=(i,t,e)=>(te(i,typeof t!="symbol"?t+"":t,e),e),ct=class{constructor(){ee(this,"_events",{})}on(t,e){var s;return(s=this._events)[t]??(s[t]=[]),this._events[t].push(e),()=>this.removeListener(t,e)}removeListener(t,e){let s=this._getListeners(t);if(!s)return;let n=s.indexOf(e);~n&&s.splice(n,1)}emit(t,...e){let s=this._getListeners(t);s&&s.map(n=>n.apply(this,e))}_getListeners(t){let e=this._events[t];return Array.isArray(e)?e:!1}},se=Object.defineProperty,ie=(i,t,e)=>t in i?se(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,A=(i,t,e)=>(ie(i,typeof t!="symbol"?t+"":t,e),e),ht=class extends ct{constructor(t){super(),A(this,"_locale",""),A(this,"_locales"),A(this,"_localeData",{}),A(this,"_messages",{}),A(this,"_missing"),A(this,"_messageCompiler"),A(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(t.locale??xt,t.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}get localeData(){return this._localeData[this._locale]??{}}_loadLocaleData(t,e){let s=this._localeData[t];s?Object.assign(s,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(s=>this._loadLocaleData(s,t[s])),this.emit("change")}_load(t,e){let s=this._messages[t];s?Object.assign(s,e):this._messages[t]=e}load(t,e){typeof t=="string"&&typeof e=="object"?this._load(t,e):Object.entries(t).forEach(([s,n])=>this._load(s,n)),this.emit("change")}loadAndActivate({locale:t,locales:e,messages:s}){this._locale=t,this._locales=e||void 0,this._messages[this._locale]=s,this.emit("change")}activate(t,e){this._locale=t,this._locales=e,this.emit("change")}_(t,e,s){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 n=s?.message;t||(t=""),I(t)||(e=t.values||e,n=t.message,t=t.id);let c=this.messages[t],r=c===void 0,o=this._missing;if(o&&r)return Gt(o)?o(this._locale,t):o;r&&this.emit("missing",{id:t,locale:this._locale});let f=c||n||t;return I(f)&&(this._messageCompiler?f=this._messageCompiler(f):console.warn(`Uncompiled message detected! Message:
2
2
 
3
3
  > ${f}
4
4
 
@@ -6,7 +6,7 @@ That means you use raw catalog or your catalog doesn't have a translation for th
6
6
  ICU features such as interpolation and plurals will not work properly for that message.
7
7
 
8
8
  Please compile your catalog first.
9
- `)),I(f)&&Ft.test(f)?kt(f):I(f)?f:Zt(f,this._locale,this._locales)(e,s==null?void 0:s.formats)}date(t,e){return dt(this._locales||this._locale,t,e)}number(t,e){return lt(this._locales||this._locale,t,e)}};function ae(i={}){return new ht(i)}var b=ae();var d=function(i,t,e,s){if(e==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?i!==t||!s:!t.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?s:e==="a"?s.call(i):s?s.value:t.get(i)},g=function(i,t,e,s,a){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?i!==t||!a:!t.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?a.call(i,e):a?a.value=e:t.set(i,e),e};function Lt(i){var t,e,s,a,c,o,n,f,v,F,k,P,y,V,L,_,T,U,at;class Wt extends i{constructor(...l){var u,m,p;super(...l),t.add(this),this.internals=this.attachInternals(),e.set(this,!1),s.set(this,!1),a.set(this,!1),c.set(this,void 0),o.set(this,void 0),n.set(this,!0),v.set(this,""),F.set(this,()=>{g(this,a,!0,"f"),g(this,e,!0,"f"),d(this,t,"m",_).call(this)}),k.set(this,()=>{g(this,e,!1,"f"),d(this,t,"m",T).call(this,this.shouldFormValueUpdate()?d(this,v,"f"):""),!this.validity.valid&&d(this,a,"f")&&g(this,s,!0,"f");let E=d(this,t,"m",_).call(this);this.validationMessageCallback&&this.validationMessageCallback(E?this.internals.validationMessage:"")}),P.set(this,()=>{var E;d(this,n,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),g(this,n,!1,"f")),g(this,a,!0,"f"),g(this,s,!0,"f"),d(this,t,"m",_).call(this),(E=this===null||this===void 0?void 0:this.validationMessageCallback)===null||E===void 0||E.call(this,this.showError?this.internals.validationMessage:"")}),y.set(this,void 0),V.set(this,!1),L.set(this,Promise.resolve()),(u=this.addEventListener)===null||u===void 0||u.call(this,"focus",d(this,F,"f")),(m=this.addEventListener)===null||m===void 0||m.call(this,"blur",d(this,k,"f")),(p=this.addEventListener)===null||p===void 0||p.call(this,"invalid",d(this,P,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let l=this.validators.map(p=>p.attribute).flat(),u=super.observedAttributes||[];return[...new Set([...u,...l])]}static getValidator(l){return this.validators.find(u=>u.attribute===l)||null}static getValidators(l){return this.validators.filter(u=>{var m;if(u.attribute===l||!((m=u.attribute)===null||m===void 0)&&m.includes(l))return!0})}get form(){return this.internals.form}get showError(){return d(this,t,"m",_).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(l,u,m){var p;(p=super.attributeChangedCallback)===null||p===void 0||p.call(this,l,u,m);let j=this.constructor.getValidators(l);j!=null&&j.length&&this.validationTarget&&this.setValue(d(this,v,"f"))}setValue(l){var u;g(this,s,!1,"f"),(u=this.validationMessageCallback)===null||u===void 0||u.call(this,""),g(this,v,l,"f");let p=this.shouldFormValueUpdate()?l:null;this.internals.setFormValue(p),d(this,t,"m",T).call(this,p),this.valueChangedCallback&&this.valueChangedCallback(p),d(this,t,"m",_).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(l=>l(d(this,L,"f")))}formResetCallback(){var l,u;g(this,a,!1,"f"),g(this,s,!1,"f"),d(this,t,"m",_).call(this),(l=this.resetFormControl)===null||l===void 0||l.call(this),(u=this.validationMessageCallback)===null||u===void 0||u.call(this,d(this,t,"m",_).call(this)?this.validationMessage:"")}}return e=new WeakMap,s=new WeakMap,a=new WeakMap,c=new WeakMap,o=new WeakMap,n=new WeakMap,v=new WeakMap,F=new WeakMap,k=new WeakMap,P=new WeakMap,y=new WeakMap,V=new WeakMap,L=new WeakMap,t=new WeakSet,f=function(){let l=this.getRootNode(),u=`${this.localName}[name="${this.getAttribute("name")}"]`;return l.querySelectorAll(u)},_=function(){if(this.hasAttribute("disabled"))return!1;let l=d(this,s,"f")||d(this,a,"f")&&!this.validity.valid&&!d(this,e,"f");return l&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),l},T=function(l){let u=this.constructor,m={},p=u.validators,E=[],j=p.some(w=>w.isValid instanceof Promise);d(this,V,"f")||(g(this,L,new Promise(w=>{g(this,y,w,"f")}),"f"),g(this,V,!0,"f")),d(this,c,"f")&&(d(this,c,"f").abort(),g(this,o,d(this,c,"f"),"f"));let H=new AbortController;g(this,c,H,"f");let z,wt=!1;p.length&&(p.forEach(w=>{let rt=w.key||"customError",q=w.isValid(this,l,H.signal);q instanceof Promise?(E.push(q),q.then(nt=>{nt!=null&&(m[rt]=!nt,z=d(this,t,"m",at).call(this,w,l),d(this,t,"m",U).call(this,m,z))})):(m[rt]=!q,this.validity[rt]!==!q&&(wt=!0),!q&&!z&&(z=d(this,t,"m",at).call(this,w,l)))}),Promise.allSettled(E).then(()=>{var w;H!=null&&H.signal.aborted||(g(this,V,!1,"f"),(w=d(this,y,"f"))===null||w===void 0||w.call(this))}),(wt||!j)&&d(this,t,"m",U).call(this,m,z))},U=function(l,u){if(this.validationTarget)this.internals.setValidity(l,u,this.validationTarget),g(this,n,!1,"f");else{if(this.internals.setValidity(l,u),this.internals.validity.valid)return;g(this,n,!0,"f")}},at=function(l,u){if(this.validityCallback){let m=this.validityCallback(l.key||"customError");if(m)return m}return l.message instanceof Function?l.message(this,u):l.message},Wt}import{css as he,html as X,LitElement as Rt,nothing as mt}from"lit";import{property as O,state as ue}from"lit/decorators.js";import{ifDefined as gt}from"lit/directives/if-defined.js";var re=["en","nb","fi","da","sv"],ft="en",G=i=>re.find(t=>i===t||i.toLowerCase().includes(t))||ft;function Tt(){if(typeof window=="undefined"){let i=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return G(i)}try{let i=It(document);if(i)return G(i);let t=ce();if(t)return G(t);let e=It(Pt());return e?G(e):ft}catch(i){return console.warn("could not detect locale, falling back to source locale",i),ft}}var At=(i,t,e,s,a)=>{b.load("en",i),b.load("nb",t),b.load("fi",e),b.load("da",s),b.load("sv",a);let c=Tt();b.activate(c),Nt(),oe()},ne="warp-i18n-change";function Nt(){typeof window!="undefined"&&window.dispatchEvent(new Event(ne))}var St=!1;function oe(){if(St||typeof window=="undefined"||!(document!=null&&document.documentElement))return;St=!0;let i=()=>{let a=Tt();b.locale!==a&&(b.activate(a),Nt())},t=new MutationObserver(a=>{for(let c of a)if(c.type==="attributes"&&c.attributeName==="lang"){i();break}});t.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]});let e=Pt();e&&e.documentElement&&e!==document&&t.observe(e.documentElement,{attributes:!0,attributeFilter:["lang"]});let s=le();s&&t.observe(s,{attributes:!0,attributeFilter:["lang"]})}function Pt(){var i,t;try{return(t=(i=window.parent)==null?void 0:i.document)!=null?t:null}catch(e){return null}}function It(i){var t,e;try{return(e=(t=i==null?void 0:i.documentElement)==null?void 0:t.lang)!=null?e:""}catch(s){return""}}function le(){var i;try{return(i=window.frameElement)!=null?i:null}catch(t){return null}}function ce(){var i,t,e;try{return(e=(t=(i=window.frameElement)==null?void 0:i.getAttribute)==null?void 0:t.call(i,"lang"))!=null?e:""}catch(s){return""}}var qt=JSON.parse('{"checkbox-group.label.optional":["Valgfri"],"checkbox-group.validation.required":["Mindst \xE9n valgt mulighed er p\xE5kr\xE6vet."]}');var Ot=JSON.parse('{"checkbox-group.label.optional":["Optional"],"checkbox-group.validation.required":["At least one selection is required."]}');var $t=JSON.parse('{"checkbox-group.label.optional":["Valinnainen"],"checkbox-group.validation.required":["V\xE4hint\xE4\xE4n yksi valinta vaaditaan."]}');var Dt=JSON.parse('{"checkbox-group.label.optional":["Valgfri"],"checkbox-group.validation.required":["Minst ett valg er p\xE5krevd."]}');var Ut=JSON.parse('{"checkbox-group.label.optional":["Valfritt"],"checkbox-group.validation.required":["Minst ett val kr\xE4vs."]}');At(Ot,Dt,$t,qt,Ut);var de=()=>b._({id:"checkbox-group.validation.required",message:"At least one selection is required.",comment:"Shown when required checkbox group has no selections"}),$,B,D,tt,et,st,r,Z,it,pt,vt,Y,_t,J,jt,Ht,bt,zt,N,yt,C=class extends Lt(Rt){constructor(){super(...arguments);x(this,r);this.optional=!1;this.required=!1;this.invalid=!1;x(this,$,!1);x(this,B,!1);this._internalTabIndex=-1;x(this,D);x(this,tt,()=>{h(this,r,Z).call(this),h(this,r,N).call(this),this.requestUpdate()});x(this,et,()=>{h(this,r,Z).call(this),h(this,r,N).call(this),this.requestUpdate()});x(this,st,()=>{h(this,r,vt).call(this),h(this,r,N).call(this),this.requestUpdate()});x(this,it,()=>{this.requestUpdate()})}render(){let e=h(this,r,pt).call(this)>0,a=this.required&&!e&&M(this,$),c=this.invalid||a,o=c?h(this,r,jt).call(this):this.helpText,n=o?"checkbox-group__help":void 0,f=this.label?"checkbox-group__label":void 0,v=c?"true":void 0;return X`
9
+ `)),I(f)&&Ft.test(f)?kt(f):I(f)?f:Zt(f,this._locale,this._locales)(e,s?.formats)}date(t,e){return dt(this._locales||this._locale,t,e)}number(t,e){return lt(this._locales||this._locale,t,e)}};function ne(i={}){return new ht(i)}var b=ne();var d=function(i,t,e,s){if(e==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?i!==t||!s:!t.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?s:e==="a"?s.call(i):s?s.value:t.get(i)},g=function(i,t,e,s,n){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?i!==t||!n:!t.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?n.call(i,e):n?n.value=e:t.set(i,e),e};function Lt(i){var t,e,s,n,c,r,o,f,v,F,k,P,w,V,L,_,T,U,nt;class zt extends i{constructor(...l){var u,m,p;super(...l),t.add(this),this.internals=this.attachInternals(),e.set(this,!1),s.set(this,!1),n.set(this,!1),c.set(this,void 0),r.set(this,void 0),o.set(this,!0),v.set(this,""),F.set(this,()=>{g(this,n,!0,"f"),g(this,e,!0,"f"),d(this,t,"m",_).call(this)}),k.set(this,()=>{g(this,e,!1,"f"),d(this,t,"m",T).call(this,this.shouldFormValueUpdate()?d(this,v,"f"):""),!this.validity.valid&&d(this,n,"f")&&g(this,s,!0,"f");let E=d(this,t,"m",_).call(this);this.validationMessageCallback&&this.validationMessageCallback(E?this.internals.validationMessage:"")}),P.set(this,()=>{var E;d(this,o,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),g(this,o,!1,"f")),g(this,n,!0,"f"),g(this,s,!0,"f"),d(this,t,"m",_).call(this),(E=this===null||this===void 0?void 0:this.validationMessageCallback)===null||E===void 0||E.call(this,this.showError?this.internals.validationMessage:"")}),w.set(this,void 0),V.set(this,!1),L.set(this,Promise.resolve()),(u=this.addEventListener)===null||u===void 0||u.call(this,"focus",d(this,F,"f")),(m=this.addEventListener)===null||m===void 0||m.call(this,"blur",d(this,k,"f")),(p=this.addEventListener)===null||p===void 0||p.call(this,"invalid",d(this,P,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let l=this.validators.map(p=>p.attribute).flat(),u=super.observedAttributes||[];return[...new Set([...u,...l])]}static getValidator(l){return this.validators.find(u=>u.attribute===l)||null}static getValidators(l){return this.validators.filter(u=>{var m;if(u.attribute===l||!((m=u.attribute)===null||m===void 0)&&m.includes(l))return!0})}get form(){return this.internals.form}get showError(){return d(this,t,"m",_).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(l,u,m){var p;(p=super.attributeChangedCallback)===null||p===void 0||p.call(this,l,u,m);let j=this.constructor.getValidators(l);j?.length&&this.validationTarget&&this.setValue(d(this,v,"f"))}setValue(l){var u;g(this,s,!1,"f"),(u=this.validationMessageCallback)===null||u===void 0||u.call(this,""),g(this,v,l,"f");let p=this.shouldFormValueUpdate()?l:null;this.internals.setFormValue(p),d(this,t,"m",T).call(this,p),this.valueChangedCallback&&this.valueChangedCallback(p),d(this,t,"m",_).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(l=>l(d(this,L,"f")))}formResetCallback(){var l,u;g(this,n,!1,"f"),g(this,s,!1,"f"),d(this,t,"m",_).call(this),(l=this.resetFormControl)===null||l===void 0||l.call(this),(u=this.validationMessageCallback)===null||u===void 0||u.call(this,d(this,t,"m",_).call(this)?this.validationMessage:"")}}return e=new WeakMap,s=new WeakMap,n=new WeakMap,c=new WeakMap,r=new WeakMap,o=new WeakMap,v=new WeakMap,F=new WeakMap,k=new WeakMap,P=new WeakMap,w=new WeakMap,V=new WeakMap,L=new WeakMap,t=new WeakSet,f=function(){let l=this.getRootNode(),u=`${this.localName}[name="${this.getAttribute("name")}"]`;return l.querySelectorAll(u)},_=function(){if(this.hasAttribute("disabled"))return!1;let l=d(this,s,"f")||d(this,n,"f")&&!this.validity.valid&&!d(this,e,"f");return l&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),l},T=function(l){let u=this.constructor,m={},p=u.validators,E=[],j=p.some(C=>C.isValid instanceof Promise);d(this,V,"f")||(g(this,L,new Promise(C=>{g(this,w,C,"f")}),"f"),g(this,V,!0,"f")),d(this,c,"f")&&(d(this,c,"f").abort(),g(this,r,d(this,c,"f"),"f"));let H=new AbortController;g(this,c,H,"f");let W,wt=!1;p.length&&(p.forEach(C=>{let at=C.key||"customError",q=C.isValid(this,l,H.signal);q instanceof Promise?(E.push(q),q.then(rt=>{rt!=null&&(m[at]=!rt,W=d(this,t,"m",nt).call(this,C,l),d(this,t,"m",U).call(this,m,W))})):(m[at]=!q,this.validity[at]!==!q&&(wt=!0),!q&&!W&&(W=d(this,t,"m",nt).call(this,C,l)))}),Promise.allSettled(E).then(()=>{var C;H?.signal.aborted||(g(this,V,!1,"f"),(C=d(this,w,"f"))===null||C===void 0||C.call(this))}),(wt||!j)&&d(this,t,"m",U).call(this,m,W))},U=function(l,u){if(this.validationTarget)this.internals.setValidity(l,u,this.validationTarget),g(this,o,!1,"f");else{if(this.internals.setValidity(l,u),this.internals.validity.valid)return;g(this,o,!0,"f")}},nt=function(l,u){if(this.validityCallback){let m=this.validityCallback(l.key||"customError");if(m)return m}return l.message instanceof Function?l.message(this,u):l.message},zt}import{css as he,html as X,LitElement as Rt,nothing as mt}from"lit";import{property as O,state as ue}from"lit/decorators.js";import{ifDefined as gt}from"lit/directives/if-defined.js";var ae=["en","nb","fi","da","sv"],ft="en",Q=i=>ae.find(t=>i===t||i.toLowerCase().includes(t))||ft;function Tt(){if(typeof window>"u"){let i=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return Q(i)}try{let i=It(document);if(i)return Q(i);let t=ce();if(t)return Q(t);let e=It(Pt());return e?Q(e):ft}catch(i){return console.warn("could not detect locale, falling back to source locale",i),ft}}var At=(i,t,e,s,n)=>{b.load("en",i),b.load("nb",t),b.load("fi",e),b.load("da",s),b.load("sv",n);let c=Tt();b.activate(c),Nt(),oe()},re="warp-i18n-change";function Nt(){typeof window>"u"||window.dispatchEvent(new Event(re))}var St=!1;function oe(){if(St||typeof window>"u"||!document?.documentElement)return;St=!0;let i=()=>{let n=Tt();b.locale!==n&&(b.activate(n),Nt())},t=new MutationObserver(n=>{for(let c of n)if(c.type==="attributes"&&c.attributeName==="lang"){i();break}});t.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]});let e=Pt();e&&e.documentElement&&e!==document&&t.observe(e.documentElement,{attributes:!0,attributeFilter:["lang"]});let s=le();s&&t.observe(s,{attributes:!0,attributeFilter:["lang"]})}function Pt(){try{return window.parent?.document??null}catch{return null}}function It(i){try{return i?.documentElement?.lang??""}catch{return""}}function le(){try{return window.frameElement??null}catch{return null}}function ce(){try{return window.frameElement?.getAttribute?.("lang")??""}catch{return""}}var qt=JSON.parse('{"checkbox-group.label.optional":["Valgfri"],"checkbox-group.validation.required":["Mindst \xE9n valgt mulighed er p\xE5kr\xE6vet."]}');var Ot=JSON.parse('{"checkbox-group.label.optional":["Optional"],"checkbox-group.validation.required":["At least one selection is required."]}');var $t=JSON.parse('{"checkbox-group.label.optional":["Valinnainen"],"checkbox-group.validation.required":["V\xE4hint\xE4\xE4n yksi valinta vaaditaan."]}');var Dt=JSON.parse('{"checkbox-group.label.optional":["Valgfri"],"checkbox-group.validation.required":["Minst ett valg er p\xE5krevd."]}');var Ut=JSON.parse('{"checkbox-group.label.optional":["Valfritt"],"checkbox-group.validation.required":["Minst ett val kr\xE4vs."]}');At(Ot,Dt,$t,qt,Ut);var de=()=>b._({id:"checkbox-group.validation.required",message:"At least one selection is required.",comment:"Shown when required checkbox group has no selections"}),$,B,D,tt,et,st,a,Z,it,pt,vt,Y,_t,J,jt,Ht,bt,Wt,N,yt,y=class extends Lt(Rt){constructor(){super(...arguments);x(this,a);this.optional=!1;this.required=!1;this.invalid=!1;x(this,$,!1);x(this,B,!1);this._internalTabIndex=-1;x(this,D);x(this,tt,()=>{h(this,a,Z).call(this),h(this,a,N).call(this),this.requestUpdate()});x(this,et,()=>{h(this,a,Z).call(this),h(this,a,N).call(this),this.requestUpdate()});x(this,st,()=>{h(this,a,vt).call(this),h(this,a,N).call(this),this.requestUpdate()});x(this,it,()=>{this.requestUpdate()})}render(){let e=h(this,a,pt).call(this)>0,n=this.required&&!e&&M(this,$),c=this.invalid||n,r=c?h(this,a,jt).call(this):this.helpText,o=r?"checkbox-group__help":void 0,f=this.label?"checkbox-group__label":void 0,v=c?"true":void 0;return X`
10
10
  <div class="wrapper" tabindex="${this._internalTabIndex}">
11
11
  ${this.label?X`
12
12
  <div class="label" id="${f}">
@@ -22,14 +22,14 @@ Please compile your catalog first.
22
22
  class="checkbox-group"
23
23
  role="group"
24
24
  aria-labelledby=${gt(f)}
25
- aria-describedby=${gt(n)}
25
+ aria-describedby=${gt(o)}
26
26
  aria-invalid=${gt(v)}
27
27
  >
28
28
  <slot></slot>
29
29
  </div>
30
- ${o?X`<div class="${c?"help-text error":"help-text"}" id="${n}">${o}</div>`:mt}
30
+ ${r?X`<div class="${c?"help-text error":"help-text"}" id="${o}">${r}</div>`:mt}
31
31
  </div>
32
- `}connectedCallback(){super.connectedCallback(),this.addEventListener("change",M(this,tt)),this.addEventListener("invalid",M(this,et)),this.addEventListener("slotchange",M(this,st)),W(this,D,b.on("change",M(this,it))),this.setValue(null),h(this,r,yt).call(this)}disconnectedCallback(){var e;(e=M(this,D))==null||e.call(this),W(this,D,void 0),super.disconnectedCallback()}checkValidity(){return h(this,r,N).call(this),this.internals.checkValidity()}reportValidity(){return h(this,r,Z).call(this),h(this,r,N).call(this),this.internals.checkValidity()}focus(e){let s=h(this,r,_t).call(this);if(s!=null&&s.focus){s.focus(e);return}HTMLElement.prototype.focus.call(this,e)}updated(e){super.updated(e),h(this,r,Ht).call(this,e)&&(e.has("name")&&h(this,r,vt).call(this),h(this,r,N).call(this))}};$=new WeakMap,B=new WeakMap,D=new WeakMap,tt=new WeakMap,et=new WeakMap,st=new WeakMap,r=new WeakSet,Z=function(){W(this,$,!0)},it=new WeakMap,pt=function(){return h(this,r,J).call(this).filter(e=>e.checked).length},vt=function(){if(this.name)for(let e of h(this,r,J).call(this)){let s=e;s&&typeof s=="object"&&!s.name&&(s._groupName=this.name)}},Y=function(e){for(let s of h(this,r,J).call(this))"_groupInvalid"in s&&(s._groupInvalid=e)},_t=function(){return h(this,r,J).call(this)[0]},J=function(){var s,a;let e=(s=this.shadowRoot)==null?void 0:s.querySelector("slot");return(a=e==null?void 0:e.assignedElements({flatten:!0}))!=null?a:[]},jt=function(){return de()},Ht=function(e){return e.has("invalid")||e.has("required")||e.has("helpText")||e.has("name")},bt=function(e){let s=h(this,r,_t).call(this);this.internals.setValidity(e," ",s!=null?s:void 0)},zt=function(e){this._internalTabIndex=e?0:-1},N=function(){h(this,r,yt).call(this);let e=h(this,r,pt).call(this)>0,s=this.required&&!e,a=this.invalid,c=s&&M(this,$),o=a||c;if(h(this,r,zt).call(this,o),s){h(this,r,bt).call(this,{valueMissing:!0}),h(this,r,Y).call(this,o);return}if(a){h(this,r,bt).call(this,{customError:!0}),h(this,r,Y).call(this,!0);return}this.internals.setValidity({}),h(this,r,Y).call(this,!1)},yt=function(){M(this,B)||this.internals.form&&(this.name&&this.name.trim().length>0||(console.warn('w-checkbox-group: "name" is required for form submission.'),W(this,B,!0)))},C.shadowRootOptions={...Rt.shadowRootOptions,delegatesFocus:!0},C.styles=he`
32
+ `}connectedCallback(){super.connectedCallback(),this.addEventListener("change",M(this,tt)),this.addEventListener("invalid",M(this,et)),this.addEventListener("slotchange",M(this,st)),z(this,D,b.on("change",M(this,it))),this.setValue(null),h(this,a,yt).call(this)}disconnectedCallback(){var e;(e=M(this,D))==null||e.call(this),z(this,D,void 0),super.disconnectedCallback()}checkValidity(){return h(this,a,N).call(this),this.internals.checkValidity()}reportValidity(){return h(this,a,Z).call(this),h(this,a,N).call(this),this.internals.checkValidity()}focus(e){let s=h(this,a,_t).call(this);if(s?.focus){s.focus(e);return}HTMLElement.prototype.focus.call(this,e)}updated(e){super.updated(e),h(this,a,Ht).call(this,e)&&(e.has("name")&&h(this,a,vt).call(this),h(this,a,N).call(this))}};$=new WeakMap,B=new WeakMap,D=new WeakMap,tt=new WeakMap,et=new WeakMap,st=new WeakMap,a=new WeakSet,Z=function(){z(this,$,!0)},it=new WeakMap,pt=function(){return h(this,a,J).call(this).filter(e=>e.checked).length},vt=function(){if(this.name)for(let e of h(this,a,J).call(this)){let s=e;s&&typeof s=="object"&&!s.name&&(s._groupName=this.name)}},Y=function(e){for(let s of h(this,a,J).call(this))"_groupInvalid"in s&&(s._groupInvalid=e)},_t=function(){return h(this,a,J).call(this)[0]},J=function(){return this.shadowRoot?.querySelector("slot")?.assignedElements({flatten:!0})??[]},jt=function(){return de()},Ht=function(e){return e.has("invalid")||e.has("required")||e.has("helpText")||e.has("name")},bt=function(e){let s=h(this,a,_t).call(this);this.internals.setValidity(e," ",s??void 0)},Wt=function(e){this._internalTabIndex=e?0:-1},N=function(){h(this,a,yt).call(this);let e=h(this,a,pt).call(this)>0,s=this.required&&!e,n=this.invalid,c=s&&M(this,$),r=n||c;if(h(this,a,Wt).call(this,r),s){h(this,a,bt).call(this,{valueMissing:!0}),h(this,a,Y).call(this,r);return}if(n){h(this,a,bt).call(this,{customError:!0}),h(this,a,Y).call(this,!0);return}this.internals.setValidity({}),h(this,a,Y).call(this,!1)},yt=function(){M(this,B)||this.internals.form&&(this.name&&this.name.trim().length>0||(console.warn('w-checkbox-group: "name" is required for form submission.'),z(this,B,!0)))},y.shadowRootOptions={...Rt.shadowRootOptions,delegatesFocus:!0},y.styles=he`
33
33
  .wrapper {
34
34
  display: inline-flex;
35
35
  flex-direction: column;
@@ -66,5 +66,5 @@ Please compile your catalog first.
66
66
  .error {
67
67
  color: var(--w-s-color-text-negative);
68
68
  }
69
- `,S([O({type:String,reflect:!0})],C.prototype,"label",2),S([O({type:String,reflect:!0})],C.prototype,"name",2),S([O({type:Boolean,reflect:!0})],C.prototype,"optional",2),S([O({type:String,reflect:!0,attribute:"help-text"})],C.prototype,"helpText",2),S([O({type:Boolean,reflect:!0})],C.prototype,"required",2),S([O({type:Boolean,reflect:!0})],C.prototype,"invalid",2),S([ue()],C.prototype,"_internalTabIndex",2);customElements.get("w-checkbox-group")||customElements.define("w-checkbox-group",C);export{C as WCheckboxGroup};
69
+ `,S([O({type:String,reflect:!0})],y.prototype,"label",2),S([O({type:String,reflect:!0})],y.prototype,"name",2),S([O({type:Boolean,reflect:!0})],y.prototype,"optional",2),S([O({type:String,reflect:!0,attribute:"help-text"})],y.prototype,"helpText",2),S([O({type:Boolean,reflect:!0})],y.prototype,"required",2),S([O({type:Boolean,reflect:!0})],y.prototype,"invalid",2),S([ue()],y.prototype,"_internalTabIndex",2);var Oe=y;customElements.get("w-checkbox-group")||customElements.define("w-checkbox-group",y);export{Oe as WCheckboxGroup,y as WarpCheckboxGroup};
70
70
  //# sourceMappingURL=checkbox-group.js.map