@nldd/design-system 0.8.80 → 0.8.82

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 (184) hide show
  1. package/custom-elements.json +704 -5
  2. package/dist/components/actions/menu/menu.d.ts +25 -2
  3. package/dist/components/actions/menu/menu.d.ts.map +1 -1
  4. package/dist/components/actions/menu/menu.js +31 -8
  5. package/dist/components/actions/menu/menu.js.map +1 -1
  6. package/dist/components/actions/menu/menu.template.d.ts +1 -1
  7. package/dist/components/actions/menu/menu.template.d.ts.map +1 -1
  8. package/dist/components/actions/menu/menu.template.js +7 -3
  9. package/dist/components/actions/menu/menu.template.js.map +1 -1
  10. package/dist/components/actions/toolbar/toolbar.d.ts +20 -0
  11. package/dist/components/actions/toolbar/toolbar.d.ts.map +1 -1
  12. package/dist/components/actions/toolbar/toolbar.js +54 -0
  13. package/dist/components/actions/toolbar/toolbar.js.map +1 -1
  14. package/dist/components/breakpoints-CkxsiRgH.js +10 -0
  15. package/dist/components/components.js +51975 -117
  16. package/dist/components/content/icon/icon-gallery-status.d.ts.map +1 -1
  17. package/dist/components/content/icon/icon-gallery-status.js +14 -4
  18. package/dist/components/content/icon/icon-gallery-status.js.map +1 -1
  19. package/dist/components/content/icon/icon-registry.d.ts.map +1 -1
  20. package/dist/components/content/icon/icon-registry.js +10 -2
  21. package/dist/components/content/icon/icon-registry.js.map +1 -1
  22. package/dist/components/decorate-BKn10QQi.js +9 -0
  23. package/dist/components/dist-BYVOPNHp.js +381 -0
  24. package/dist/components/dist-Bq4xc7Bm.js +624 -0
  25. package/dist/components/dist-C0PiB1dr.js +870 -0
  26. package/dist/components/dist-C400RcFU.js +1498 -0
  27. package/dist/components/dist-CCg5Mso_.js +390 -0
  28. package/dist/components/dist-CJR_Rwhh.js +464 -0
  29. package/dist/components/dist-Ccw7ZfsU.js +18481 -0
  30. package/dist/components/dist-OBifyiJS.js +887 -0
  31. package/dist/components/dist-TpIL8G4G.js +1480 -0
  32. package/dist/components/dist-afrAoubg.js +1181 -0
  33. package/dist/components/dist-bO14jlsr.js +78 -0
  34. package/dist/components/forms/form-field/form-field.d.ts +59 -2
  35. package/dist/components/forms/form-field/form-field.d.ts.map +1 -1
  36. package/dist/components/forms/form-field/form-field.js +120 -35
  37. package/dist/components/forms/form-field/form-field.js.map +1 -1
  38. package/dist/components/gherkin-uCVRxsGf.js +108 -0
  39. package/dist/components/icon-CIpJq_cf.js +751 -0
  40. package/dist/components/icon-button-BAkUJTn6.js +1676 -0
  41. package/dist/components/input-modality-DhTeUxKi.js +43 -0
  42. package/dist/components/inputs/checkbox/checkbox.d.ts +8 -0
  43. package/dist/components/inputs/checkbox/checkbox.d.ts.map +1 -1
  44. package/dist/components/inputs/checkbox/checkbox.js +10 -0
  45. package/dist/components/inputs/checkbox/checkbox.js.map +1 -1
  46. package/dist/components/inputs/checkbox-field/checkbox-field.d.ts +9 -0
  47. package/dist/components/inputs/checkbox-field/checkbox-field.d.ts.map +1 -1
  48. package/dist/components/inputs/checkbox-field/checkbox-field.js +11 -0
  49. package/dist/components/inputs/checkbox-field/checkbox-field.js.map +1 -1
  50. package/dist/components/inputs/code-editor/code-editor.d.ts +3 -0
  51. package/dist/components/inputs/code-editor/code-editor.d.ts.map +1 -1
  52. package/dist/components/inputs/code-editor/code-editor.js +3 -0
  53. package/dist/components/inputs/code-editor/code-editor.js.map +1 -1
  54. package/dist/components/inputs/combo-box/combo-box.d.ts +6 -0
  55. package/dist/components/inputs/combo-box/combo-box.d.ts.map +1 -1
  56. package/dist/components/inputs/combo-box/combo-box.js +14 -0
  57. package/dist/components/inputs/combo-box/combo-box.js.map +1 -1
  58. package/dist/components/inputs/date-field/date-field.d.ts +6 -0
  59. package/dist/components/inputs/date-field/date-field.d.ts.map +1 -1
  60. package/dist/components/inputs/date-field/date-field.js +11 -0
  61. package/dist/components/inputs/date-field/date-field.js.map +1 -1
  62. package/dist/components/inputs/date-picker/date-picker.d.ts +3 -0
  63. package/dist/components/inputs/date-picker/date-picker.d.ts.map +1 -1
  64. package/dist/components/inputs/date-picker/date-picker.js +4 -1
  65. package/dist/components/inputs/date-picker/date-picker.js.map +1 -1
  66. package/dist/components/inputs/dropdown/dropdown.d.ts +29 -0
  67. package/dist/components/inputs/dropdown/dropdown.d.ts.map +1 -1
  68. package/dist/components/inputs/dropdown/dropdown.js +44 -1
  69. package/dist/components/inputs/dropdown/dropdown.js.map +1 -1
  70. package/dist/components/inputs/file-field/file-field.d.ts +3 -0
  71. package/dist/components/inputs/file-field/file-field.d.ts.map +1 -1
  72. package/dist/components/inputs/file-field/file-field.js +3 -0
  73. package/dist/components/inputs/file-field/file-field.js.map +1 -1
  74. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.d.ts +3 -0
  75. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.d.ts.map +1 -1
  76. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.js +3 -0
  77. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.js.map +1 -1
  78. package/dist/components/inputs/number-field/number-field.d.ts +9 -0
  79. package/dist/components/inputs/number-field/number-field.d.ts.map +1 -1
  80. package/dist/components/inputs/number-field/number-field.js +12 -0
  81. package/dist/components/inputs/number-field/number-field.js.map +1 -1
  82. package/dist/components/inputs/number-field/number-field.template.d.ts.map +1 -1
  83. package/dist/components/inputs/number-field/number-field.template.js +1 -0
  84. package/dist/components/inputs/number-field/number-field.template.js.map +1 -1
  85. package/dist/components/inputs/password-field/password-field.d.ts +9 -0
  86. package/dist/components/inputs/password-field/password-field.d.ts.map +1 -1
  87. package/dist/components/inputs/password-field/password-field.js +12 -0
  88. package/dist/components/inputs/password-field/password-field.js.map +1 -1
  89. package/dist/components/inputs/password-field/password-field.template.d.ts.map +1 -1
  90. package/dist/components/inputs/password-field/password-field.template.js +1 -0
  91. package/dist/components/inputs/password-field/password-field.template.js.map +1 -1
  92. package/dist/components/inputs/radio-button/radio-button.d.ts +8 -0
  93. package/dist/components/inputs/radio-button/radio-button.d.ts.map +1 -1
  94. package/dist/components/inputs/radio-button/radio-button.js +10 -0
  95. package/dist/components/inputs/radio-button/radio-button.js.map +1 -1
  96. package/dist/components/inputs/radio-button-field/radio-button-field.d.ts +9 -0
  97. package/dist/components/inputs/radio-button-field/radio-button-field.d.ts.map +1 -1
  98. package/dist/components/inputs/radio-button-field/radio-button-field.js +11 -0
  99. package/dist/components/inputs/radio-button-field/radio-button-field.js.map +1 -1
  100. package/dist/components/inputs/radio-button-group/radio-button-group.d.ts +16 -0
  101. package/dist/components/inputs/radio-button-group/radio-button-group.d.ts.map +1 -1
  102. package/dist/components/inputs/radio-button-group/radio-button-group.js +33 -0
  103. package/dist/components/inputs/radio-button-group/radio-button-group.js.map +1 -1
  104. package/dist/components/inputs/search-field/search-field.d.ts +6 -0
  105. package/dist/components/inputs/search-field/search-field.d.ts.map +1 -1
  106. package/dist/components/inputs/search-field/search-field.js +6 -0
  107. package/dist/components/inputs/search-field/search-field.js.map +1 -1
  108. package/dist/components/inputs/segmented-control/segmented-control.d.ts +16 -0
  109. package/dist/components/inputs/segmented-control/segmented-control.d.ts.map +1 -1
  110. package/dist/components/inputs/segmented-control/segmented-control.js +26 -7
  111. package/dist/components/inputs/segmented-control/segmented-control.js.map +1 -1
  112. package/dist/components/inputs/stepper/stepper.d.ts +17 -0
  113. package/dist/components/inputs/stepper/stepper.d.ts.map +1 -1
  114. package/dist/components/inputs/stepper/stepper.js +22 -0
  115. package/dist/components/inputs/stepper/stepper.js.map +1 -1
  116. package/dist/components/inputs/stepper/stepper.template.js +1 -1
  117. package/dist/components/inputs/stepper/stepper.template.js.map +1 -1
  118. package/dist/components/inputs/switch/switch.d.ts +3 -0
  119. package/dist/components/inputs/switch/switch.d.ts.map +1 -1
  120. package/dist/components/inputs/switch/switch.js +3 -0
  121. package/dist/components/inputs/switch/switch.js.map +1 -1
  122. package/dist/components/inputs/switch-field/switch-field.d.ts +3 -0
  123. package/dist/components/inputs/switch-field/switch-field.d.ts.map +1 -1
  124. package/dist/components/inputs/switch-field/switch-field.js +3 -0
  125. package/dist/components/inputs/switch-field/switch-field.js.map +1 -1
  126. package/dist/components/inputs/text-editor/text-editor.d.ts +3 -0
  127. package/dist/components/inputs/text-editor/text-editor.d.ts.map +1 -1
  128. package/dist/components/inputs/text-editor/text-editor.js +4 -1
  129. package/dist/components/inputs/text-editor/text-editor.js.map +1 -1
  130. package/dist/components/inputs/text-field/text-field.d.ts +9 -0
  131. package/dist/components/inputs/text-field/text-field.d.ts.map +1 -1
  132. package/dist/components/inputs/text-field/text-field.js +12 -0
  133. package/dist/components/inputs/text-field/text-field.js.map +1 -1
  134. package/dist/components/inputs/text-field/text-field.template.d.ts.map +1 -1
  135. package/dist/components/inputs/text-field/text-field.template.js +1 -0
  136. package/dist/components/inputs/text-field/text-field.template.js.map +1 -1
  137. package/dist/components/inputs/time-field/time-field.d.ts +6 -0
  138. package/dist/components/inputs/time-field/time-field.d.ts.map +1 -1
  139. package/dist/components/inputs/time-field/time-field.js +11 -0
  140. package/dist/components/inputs/time-field/time-field.js.map +1 -1
  141. package/dist/components/inputs/time-picker/time-picker.d.ts +3 -0
  142. package/dist/components/inputs/time-picker/time-picker.d.ts.map +1 -1
  143. package/dist/components/inputs/time-picker/time-picker.js +4 -1
  144. package/dist/components/inputs/time-picker/time-picker.js.map +1 -1
  145. package/dist/components/inputs/toggle-button/toggle-button.d.ts +10 -0
  146. package/dist/components/inputs/toggle-button/toggle-button.d.ts.map +1 -1
  147. package/dist/components/inputs/toggle-button/toggle-button.js +14 -0
  148. package/dist/components/inputs/toggle-button/toggle-button.js.map +1 -1
  149. package/dist/components/inputs/toggle-button-group/toggle-button-group.d.ts +11 -0
  150. package/dist/components/inputs/toggle-button-group/toggle-button-group.d.ts.map +1 -1
  151. package/dist/components/inputs/toggle-button-group/toggle-button-group.js +16 -6
  152. package/dist/components/inputs/toggle-button-group/toggle-button-group.js.map +1 -1
  153. package/dist/components/inputs/token-field/token-field.d.ts +6 -0
  154. package/dist/components/inputs/token-field/token-field.d.ts.map +1 -1
  155. package/dist/components/inputs/token-field/token-field.js +13 -0
  156. package/dist/components/inputs/token-field/token-field.js.map +1 -1
  157. package/dist/components/reflect-non-default-OLaK60rT.js +37 -0
  158. package/dist/components/rolldown-runtime-D7D4PA-g.js +13 -0
  159. package/dist/components/shadow-resets-aG-rgyNQ.js +61 -0
  160. package/dist/components/shell-C61GCsJA.js +223 -0
  161. package/dist/components/toml-C2HBbPgG.js +59 -0
  162. package/dist/components/visibility-mixin-GxbwkBb1.js +104 -0
  163. package/dist/components/with-translations-DzAdFTK8.js +48 -0
  164. package/dist/nldd.min.js +2284 -2251
  165. package/dist/types/vue.d.ts +13 -1
  166. package/dist/utilities/implicit-submission.d.ts +31 -0
  167. package/dist/utilities/implicit-submission.d.ts.map +1 -0
  168. package/dist/utilities/implicit-submission.js +65 -0
  169. package/dist/utilities/implicit-submission.js.map +1 -0
  170. package/dist/utilities/owned-attribute.d.ts +19 -0
  171. package/dist/utilities/owned-attribute.d.ts.map +1 -0
  172. package/dist/utilities/owned-attribute.js +32 -0
  173. package/dist/utilities/owned-attribute.js.map +1 -0
  174. package/package.json +3 -3
  175. package/dist/components/gherkin-DhZlEZiy.js +0 -115
  176. package/dist/components/index-8pDDdMeW.js +0 -384
  177. package/dist/components/index-C7QocEcT.js +0 -81
  178. package/dist/components/index-CDz7-C9c.js +0 -177
  179. package/dist/components/index-CWQunWUb.js +0 -75039
  180. package/dist/components/index-CoY3JfIy.js +0 -688
  181. package/dist/components/index-DP9dl7P7.js +0 -703
  182. package/dist/components/index-DV_2YpaH.js +0 -405
  183. package/dist/components/shell-BlsXDxCn.js +0 -222
  184. package/dist/components/toml-BOuWGMcf.js +0 -76
@@ -965,6 +965,10 @@ declare module 'vue' {
965
965
  'expanded'?: NLDDDropdown['expanded'];
966
966
  /** Optional fixed width (any CSS length, e.g. "240px"). Default: stretches to fill container. */
967
967
  'width'?: NLDDDropdown['width'];
968
+ /** Accessible name, forwarded as aria-label to the slotted select */
969
+ 'accessible-label'?: NLDDDropdown['accessibleLabel'];
970
+ /** Accessible name, forwarded as aria-label to the slotted select */
971
+ 'accessibleLabel'?: NLDDDropdown['accessibleLabel'];
968
972
  /** Bubbles up from the slotted select; detail: { value: string } */
969
973
  'onChange'?: (event: CustomEvent) => void;
970
974
  };
@@ -1661,7 +1665,7 @@ declare module 'vue' {
1661
1665
  'shortcutWindows'?: NLDDMenuItem['shortcutWindows'];
1662
1666
  'shortcut-linux'?: NLDDMenuItem['shortcutLinux'];
1663
1667
  'shortcutLinux'?: NLDDMenuItem['shortcutLinux'];
1664
- /** Set by nldd-menu. Not part of the public API. */
1668
+ /** Which menu owns this item, set by that nldd-menu. Not part of the public API. `null` until one claims it, and an unclaimed item carries no menu role. A menu role is a promise about what is around you, so an item cannot make it on its own. `nldd-toolbar-item` holds exactly such an item: the declaration of what belongs in the overflow menu, which the toolbar clones into the real menu when it collapses. The clone is claimed there and the declaration stays what it is. */
1665
1669
  'menuVariant'?: NLDDMenuItem['menuVariant'];
1666
1670
  'onMenuItemFocused'?: (event: CustomEvent) => void;
1667
1671
  'onSubmenuOpen'?: (event: CustomEvent) => void;
@@ -2199,6 +2203,10 @@ declare module 'vue' {
2199
2203
  'disabled'?: NLDDRadioButtonGroup['disabled'];
2200
2204
  /** Marks the group as required */
2201
2205
  'required'?: NLDDRadioButtonGroup['required'];
2206
+ /** Accessible name for the group, set as aria-label on the group */
2207
+ 'accessible-label'?: NLDDRadioButtonGroup['accessibleLabel'];
2208
+ /** Accessible name for the group, set as aria-label on the group */
2209
+ 'accessibleLabel'?: NLDDRadioButtonGroup['accessibleLabel'];
2202
2210
  /** Id of an external label element, set as aria-labelledby on the group */
2203
2211
  'accessible-labeled-by'?: NLDDRadioButtonGroup['accessibleLabeledBy'];
2204
2212
  /** Id of an external label element, set as aria-labelledby on the group */
@@ -2595,6 +2603,10 @@ declare module 'vue' {
2595
2603
  'size'?: NLDDStepper['size'];
2596
2604
  /** Name for form submission; the value is submitted under this name */
2597
2605
  'name'?: NLDDStepper['name'];
2606
+ /** Accessible name for the spinbutton; falls back to a generic label */
2607
+ 'accessible-label'?: NLDDStepper['accessibleLabel'];
2608
+ /** Accessible name for the spinbutton; falls back to a generic label */
2609
+ 'accessibleLabel'?: NLDDStepper['accessibleLabel'];
2598
2610
  /** Translations; unspecified keys fall back to Dutch */
2599
2611
  'translations'?: NLDDStepper['translations'];
2600
2612
  'internals'?: NLDDStepper['internals'];
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Enter in a single-line field submits the form it belongs to.
3
+ *
4
+ * The browser does this by itself and calls it implicit submission, but only
5
+ * for a control that has a form owner. The real `<input>` of an nldd field
6
+ * lives in a shadow root, and form ownership does not cross that boundary:
7
+ * `input.form` is null, so the browser has no form to submit and nothing
8
+ * happens. The component is form-associated through ElementInternals, which
9
+ * does know the form, so the behavior is handed back over that connection. It
10
+ * mirrors what `nldd-button type="submit"` already does from the other side.
11
+ */
12
+ /**
13
+ * Submits the form this field belongs to, under the same conditions the browser
14
+ * uses.
15
+ *
16
+ * Does nothing when something already handled the Enter. A component that owns
17
+ * the key calls `preventDefault` when it acts on it and leaves it alone when it
18
+ * does not, so an open date picker keeps its Enter and a token field that
19
+ * commits nothing lets the form through.
20
+ *
21
+ * Without a submit button the specification submits only when the form holds a
22
+ * single field that blocks implicit submission. Reproducing that rule matters
23
+ * more than it looks: an Enter that behaves differently inside this design
24
+ * system than outside it is worse than one that does nothing.
25
+ *
26
+ * @returns whether the form was submitted, so a caller can tell.
27
+ */
28
+ export declare function submitOnEnter(host: HTMLElement & {
29
+ internals: ElementInternals;
30
+ }, event: KeyboardEvent): boolean;
31
+ //# sourceMappingURL=implicit-submission.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"implicit-submission.d.ts","sourceRoot":"","sources":["../../src/utilities/implicit-submission.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AA0BH;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAC5B,IAAI,EAAE,WAAW,GAAG;IAAE,SAAS,EAAE,gBAAgB,CAAA;CAAE,EACnD,KAAK,EAAE,aAAa,GAClB,OAAO,CAcT"}
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Enter in a single-line field submits the form it belongs to.
3
+ *
4
+ * The browser does this by itself and calls it implicit submission, but only
5
+ * for a control that has a form owner. The real `<input>` of an nldd field
6
+ * lives in a shadow root, and form ownership does not cross that boundary:
7
+ * `input.form` is null, so the browser has no form to submit and nothing
8
+ * happens. The component is form-associated through ElementInternals, which
9
+ * does know the form, so the behavior is handed back over that connection. It
10
+ * mirrors what `nldd-button type="submit"` already does from the other side.
11
+ */
12
+ /** Input types that block implicit submission, per the HTML specification. */
13
+ const BLOCKING_INPUT_TYPES = new Set([
14
+ 'text', 'search', 'url', 'tel', 'email', 'password',
15
+ 'date', 'month', 'week', 'time', 'datetime-local', 'number',
16
+ ]);
17
+ /**
18
+ * Whether this control counts for the "more than one field" rule below. Native
19
+ * inputs are classified by type, the way the specification does it; an nldd
20
+ * field says so itself with `static blocksImplicitSubmission = true`.
21
+ */
22
+ function blocksImplicitSubmission(el) {
23
+ if (el instanceof HTMLInputElement)
24
+ return BLOCKING_INPUT_TYPES.has(el.type);
25
+ return el.constructor.blocksImplicitSubmission === true;
26
+ }
27
+ /**
28
+ * The button the browser would press. A `<button>` without a type is a submit
29
+ * button, and `nldd-button type="submit"` carries the same attribute.
30
+ */
31
+ function hasDefaultButton(form) {
32
+ return form.querySelector('button:not([type]), [type="submit"], [type="image"]') !== null;
33
+ }
34
+ /**
35
+ * Submits the form this field belongs to, under the same conditions the browser
36
+ * uses.
37
+ *
38
+ * Does nothing when something already handled the Enter. A component that owns
39
+ * the key calls `preventDefault` when it acts on it and leaves it alone when it
40
+ * does not, so an open date picker keeps its Enter and a token field that
41
+ * commits nothing lets the form through.
42
+ *
43
+ * Without a submit button the specification submits only when the form holds a
44
+ * single field that blocks implicit submission. Reproducing that rule matters
45
+ * more than it looks: an Enter that behaves differently inside this design
46
+ * system than outside it is worse than one that does nothing.
47
+ *
48
+ * @returns whether the form was submitted, so a caller can tell.
49
+ */
50
+ export function submitOnEnter(host, event) {
51
+ if (event.key !== 'Enter' || event.isComposing || event.defaultPrevented)
52
+ return false;
53
+ const form = host.internals.form;
54
+ if (!form)
55
+ return false;
56
+ if (!hasDefaultButton(form)) {
57
+ const blocking = Array.from(form.elements).filter(blocksImplicitSubmission);
58
+ if (blocking.length > 1)
59
+ return false;
60
+ }
61
+ event.preventDefault();
62
+ form.requestSubmit();
63
+ return true;
64
+ }
65
+ //# sourceMappingURL=implicit-submission.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"implicit-submission.js","sourceRoot":"","sources":["../../src/utilities/implicit-submission.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,8EAA8E;AAC9E,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAAC;IACpC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU;IACnD,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,QAAQ;CAC3D,CAAC,CAAC;AAEH;;;;GAIG;AACH,SAAS,wBAAwB,CAAC,EAAW;IAC5C,IAAI,EAAE,YAAY,gBAAgB;QAAE,OAAO,oBAAoB,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IAC7E,OAAQ,EAAE,CAAC,WAAsD,CAAC,wBAAwB,KAAK,IAAI,CAAC;AACrG,CAAC;AAED;;;GAGG;AACH,SAAS,gBAAgB,CAAC,IAAqB;IAC9C,OAAO,IAAI,CAAC,aAAa,CAAC,qDAAqD,CAAC,KAAK,IAAI,CAAC;AAC3F,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,aAAa,CAC5B,IAAmD,EACnD,KAAoB;IAEpB,IAAI,KAAK,CAAC,GAAG,KAAK,OAAO,IAAI,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,gBAAgB;QAAE,OAAO,KAAK,CAAC;IAEvF,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;IACjC,IAAI,CAAC,IAAI;QAAE,OAAO,KAAK,CAAC;IAExB,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC;QAC7B,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC;QAC5E,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC;YAAE,OAAO,KAAK,CAAC;IACvC,CAAC;IAED,KAAK,CAAC,cAAc,EAAE,CAAC;IACvB,IAAI,CAAC,aAAa,EAAE,CAAC;IACrB,OAAO,IAAI,CAAC;AACb,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * An attribute one component hands to another without overruling what is
3
+ * already there.
4
+ *
5
+ * The closer to the control, the more specific, so the heavier it weighs. An
6
+ * `aria-label` on a slotted `<select>` beats the `accessible-label` on the
7
+ * wrapper around it, which beats the caption of the `nldd-form-field` above
8
+ * that. Every layer does two things and no more: it fills a gap, and it takes
9
+ * back only what it wrote itself.
10
+ *
11
+ * Without that second half a component reads "I have no name to give" as
12
+ * "remove the name that is there", which is how a documented way of naming a
13
+ * control quietly stopped working.
14
+ *
15
+ * @param applied what this component wrote here last time, or null
16
+ * @returns the new value to remember, to pass back in on the next call
17
+ */
18
+ export declare function setOwnedAttribute(el: Element, name: string, value: string, applied: string | null): string | null;
19
+ //# sourceMappingURL=owned-attribute.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"owned-attribute.d.ts","sourceRoot":"","sources":["../../src/utilities/owned-attribute.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,iBAAiB,CAChC,EAAE,EAAE,OAAO,EACX,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,GAAG,IAAI,GACpB,MAAM,GAAG,IAAI,CAcf"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * An attribute one component hands to another without overruling what is
3
+ * already there.
4
+ *
5
+ * The closer to the control, the more specific, so the heavier it weighs. An
6
+ * `aria-label` on a slotted `<select>` beats the `accessible-label` on the
7
+ * wrapper around it, which beats the caption of the `nldd-form-field` above
8
+ * that. Every layer does two things and no more: it fills a gap, and it takes
9
+ * back only what it wrote itself.
10
+ *
11
+ * Without that second half a component reads "I have no name to give" as
12
+ * "remove the name that is there", which is how a documented way of naming a
13
+ * control quietly stopped working.
14
+ *
15
+ * @param applied what this component wrote here last time, or null
16
+ * @returns the new value to remember, to pass back in on the next call
17
+ */
18
+ export function setOwnedAttribute(el, name, value, applied) {
19
+ const current = el.getAttribute(name);
20
+ // Someone else's value. Leave it alone, and keep remembering ours as it was,
21
+ // so a later change of theirs does not suddenly look like ours.
22
+ if (current !== null && current !== applied)
23
+ return applied;
24
+ if (value) {
25
+ el.setAttribute(name, value);
26
+ return value;
27
+ }
28
+ if (current !== null)
29
+ el.removeAttribute(name);
30
+ return null;
31
+ }
32
+ //# sourceMappingURL=owned-attribute.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"owned-attribute.js","sourceRoot":"","sources":["../../src/utilities/owned-attribute.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,iBAAiB,CAChC,EAAW,EACX,IAAY,EACZ,KAAa,EACb,OAAsB;IAEtB,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IAEtC,6EAA6E;IAC7E,gEAAgE;IAChE,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,OAAO;QAAE,OAAO,OAAO,CAAC;IAE5D,IAAI,KAAK,EAAE,CAAC;QACX,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAC7B,OAAO,KAAK,CAAC;IACd,CAAC;IAED,IAAI,OAAO,KAAK,IAAI;QAAE,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IAC/C,OAAO,IAAI,CAAC;AACb,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nldd/design-system",
3
- "version": "0.8.80",
3
+ "version": "0.8.82",
4
4
  "description": "Design System voor Nederlandse Digitale Dienst",
5
5
  "type": "module",
6
6
  "main": "dist/components/components.js",
@@ -518,7 +518,7 @@
518
518
  "@commitlint/cli": "^21.2.1",
519
519
  "@commitlint/config-conventional": "^21.2.0",
520
520
  "@custom-elements-manifest/analyzer": "^0.11.0",
521
- "@eslint/js": "^9.17.0",
521
+ "@eslint/js": "^10.0.1",
522
522
  "@semantic-release/changelog": "^7.0.0",
523
523
  "@semantic-release/exec": "^7.1.0",
524
524
  "@semantic-release/git": "^11.0.1",
@@ -539,7 +539,7 @@
539
539
  "storybook": "^10.5.7",
540
540
  "typescript": "^5.3.0",
541
541
  "typescript-eslint": "^8.58.0",
542
- "vite": "7.3.1",
542
+ "vite": "8.2.1",
543
543
  "vitest": "4.1.10",
544
544
  "vue": "^3.5.40",
545
545
  "vue-tsc": "^3.3.7"
@@ -1,115 +0,0 @@
1
- const gherkin = {
2
- name: "gherkin",
3
- startState: function() {
4
- return {
5
- lineNumber: 0,
6
- tableHeaderLine: false,
7
- allowFeature: true,
8
- allowBackground: false,
9
- allowScenario: false,
10
- allowSteps: false,
11
- allowPlaceholders: false,
12
- allowMultilineArgument: false,
13
- inMultilineString: false,
14
- inMultilineTable: false,
15
- inKeywordLine: false
16
- };
17
- },
18
- token: function(stream, state) {
19
- if (stream.sol()) {
20
- state.lineNumber++;
21
- state.inKeywordLine = false;
22
- if (state.inMultilineTable) {
23
- state.tableHeaderLine = false;
24
- if (!stream.match(/\s*\|/, false)) {
25
- state.allowMultilineArgument = false;
26
- state.inMultilineTable = false;
27
- }
28
- }
29
- }
30
- stream.eatSpace();
31
- if (state.allowMultilineArgument) {
32
- if (state.inMultilineString) {
33
- if (stream.match('"""')) {
34
- state.inMultilineString = false;
35
- state.allowMultilineArgument = false;
36
- } else {
37
- stream.match(/.*/);
38
- }
39
- return "string";
40
- }
41
- if (state.inMultilineTable) {
42
- if (stream.match(/\|\s*/)) {
43
- return "bracket";
44
- } else {
45
- stream.match(/[^\|]*/);
46
- return state.tableHeaderLine ? "header" : "string";
47
- }
48
- }
49
- if (stream.match('"""')) {
50
- state.inMultilineString = true;
51
- return "string";
52
- } else if (stream.match("|")) {
53
- state.inMultilineTable = true;
54
- state.tableHeaderLine = true;
55
- return "bracket";
56
- }
57
- }
58
- if (stream.match(/#.*/)) {
59
- return "comment";
60
- } else if (!state.inKeywordLine && stream.match(/@\S+/)) {
61
- return "tag";
62
- } else if (!state.inKeywordLine && state.allowFeature && stream.match(/(機能|功能|フィーチャ|기능|โครงหลัก|ความสามารถ|ความต้องการทางธุรกิจ|ಹೆಚ್ಚಳ|గుణము|ਮੁਹਾਂਦਰਾ|ਨਕਸ਼ ਨੁਹਾਰ|ਖਾਸੀਅਤ|रूप लेख|وِیژگی|خاصية|תכונה|Функціонал|Функция|Функционалност|Функционал|Үзенчәлеклелек|Свойство|Особина|Мөмкинлек|Могућност|Λειτουργία|Δυνατότητα|Właściwość|Vlastnosť|Trajto|Tính năng|Savybė|Pretty much|Požiadavka|Požadavek|Potrzeba biznesowa|Özellik|Osobina|Ominaisuus|Omadus|OH HAI|Mogućnost|Mogucnost|Jellemző|Hwæt|Hwaet|Funzionalità|Funktionalitéit|Funktionalität|Funkcja|Funkcionalnost|Funkcionalitāte|Funkcia|Fungsi|Functionaliteit|Funcționalitate|Funcţionalitate|Functionalitate|Funcionalitat|Funcionalidade|Fonctionnalité|Fitur|Fīča|Feature|Eiginleiki|Egenskap|Egenskab|Característica|Caracteristica|Business Need|Aspekt|Arwedd|Ahoy matey!|Ability):/)) {
63
- state.allowScenario = true;
64
- state.allowBackground = true;
65
- state.allowPlaceholders = false;
66
- state.allowSteps = false;
67
- state.allowMultilineArgument = false;
68
- state.inKeywordLine = true;
69
- return "keyword";
70
- } else if (!state.inKeywordLine && state.allowBackground && stream.match(/(背景|배경|แนวคิด|ಹಿನ್ನೆಲೆ|నేపథ్యం|ਪਿਛੋਕੜ|पृष्ठभूमि|زمینه|الخلفية|רקע|Тарих|Предыстория|Предистория|Позадина|Передумова|Основа|Контекст|Кереш|Υπόβαθρο|Założenia|Yo\-ho\-ho|Tausta|Taust|Situācija|Rerefons|Pozadina|Pozadie|Pozadí|Osnova|Latar Belakang|Kontext|Konteksts|Kontekstas|Kontekst|Háttér|Hannergrond|Grundlage|Geçmiş|Fundo|Fono|First off|Dis is what went down|Dasar|Contexto|Contexte|Context|Contesto|Cenário de Fundo|Cenario de Fundo|Cefndir|Bối cảnh|Bakgrunnur|Bakgrunn|Bakgrund|Baggrund|Background|B4|Antecedents|Antecedentes|Ær|Aer|Achtergrond):/)) {
71
- state.allowPlaceholders = false;
72
- state.allowSteps = true;
73
- state.allowBackground = false;
74
- state.allowMultilineArgument = false;
75
- state.inKeywordLine = true;
76
- return "keyword";
77
- } else if (!state.inKeywordLine && state.allowScenario && stream.match(/(場景大綱|场景大纲|劇本大綱|剧本大纲|テンプレ|シナリオテンプレート|シナリオテンプレ|シナリオアウトライン|시나리오 개요|สรุปเหตุการณ์|โครงสร้างของเหตุการณ์|ವಿವರಣೆ|కథనం|ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ|ਪਟਕਥਾ ਢਾਂਚਾ|परिदृश्य रूपरेखा|سيناريو مخطط|الگوی سناریو|תבנית תרחיש|Сценарийның төзелеше|Сценарий структураси|Структура сценарію|Структура сценария|Структура сценарија|Скица|Рамка на сценарий|Концепт|Περιγραφή Σεναρίου|Wharrimean is|Template Situai|Template Senario|Template Keadaan|Tapausaihio|Szenariogrundriss|Szablon scenariusza|Swa hwær swa|Swa hwaer swa|Struktura scenarija|Structură scenariu|Structura scenariu|Skica|Skenario konsep|Shiver me timbers|Senaryo taslağı|Schema dello scenario|Scenariomall|Scenariomal|Scenario Template|Scenario Outline|Scenario Amlinellol|Scenārijs pēc parauga|Scenarijaus šablonas|Reckon it's like|Raamstsenaarium|Plang vum Szenario|Plan du Scénario|Plan du scénario|Osnova scénáře|Osnova Scenára|Náčrt Scenáru|Náčrt Scénáře|Náčrt Scenára|MISHUN SRSLY|Menggariskan Senario|Lýsing Dæma|Lýsing Atburðarásar|Konturo de la scenaro|Koncept|Khung tình huống|Khung kịch bản|Forgatókönyv vázlat|Esquema do Cenário|Esquema do Cenario|Esquema del escenario|Esquema de l'escenari|Esbozo do escenario|Delineação do Cenário|Delineacao do Cenario|All y'all|Abstrakt Scenario|Abstract Scenario):/)) {
78
- state.allowPlaceholders = true;
79
- state.allowSteps = true;
80
- state.allowMultilineArgument = false;
81
- state.inKeywordLine = true;
82
- return "keyword";
83
- } else if (state.allowScenario && stream.match(/(例子|例|サンプル|예|ชุดของเหตุการณ์|ชุดของตัวอย่าง|ಉದಾಹರಣೆಗಳು|ఉదాహరణలు|ਉਦਾਹਰਨਾਂ|उदाहरण|نمونه ها|امثلة|דוגמאות|Үрнәкләр|Сценарији|Примеры|Примери|Приклади|Мисоллар|Мисаллар|Σενάρια|Παραδείγματα|You'll wanna|Voorbeelden|Variantai|Tapaukset|Se þe|Se the|Se ðe|Scenarios|Scenariji|Scenarijai|Przykłady|Primjeri|Primeri|Příklady|Príklady|Piemēri|Példák|Pavyzdžiai|Paraugs|Örnekler|Juhtumid|Exemplos|Exemples|Exemple|Exempel|EXAMPLZ|Examples|Esempi|Enghreifftiau|Ekzemploj|Eksempler|Ejemplos|Dữ liệu|Dead men tell no tales|Dæmi|Contoh|Cenários|Cenarios|Beispiller|Beispiele|Atburðarásir):/)) {
84
- state.allowPlaceholders = false;
85
- state.allowSteps = true;
86
- state.allowBackground = false;
87
- state.allowMultilineArgument = true;
88
- return "keyword";
89
- } else if (!state.inKeywordLine && state.allowScenario && stream.match(/(場景|场景|劇本|剧本|シナリオ|시나리오|เหตุการณ์|ಕಥಾಸಾರಾಂಶ|సన్నివేశం|ਪਟਕਥਾ|परिदृश्य|سيناريو|سناریو|תרחיש|Сценарій|Сценарио|Сценарий|Пример|Σενάριο|Tình huống|The thing of it is|Tapaus|Szenario|Swa|Stsenaarium|Skenario|Situai|Senaryo|Senario|Scenaro|Scenariusz|Scenariu|Scénario|Scenario|Scenarijus|Scenārijs|Scenarij|Scenarie|Scénář|Scenár|Primer|MISHUN|Kịch bản|Keadaan|Heave to|Forgatókönyv|Escenario|Escenari|Cenário|Cenario|Awww, look mate|Atburðarás):/)) {
90
- state.allowPlaceholders = false;
91
- state.allowSteps = true;
92
- state.allowBackground = false;
93
- state.allowMultilineArgument = false;
94
- state.inKeywordLine = true;
95
- return "keyword";
96
- } else if (!state.inKeywordLine && state.allowSteps && stream.match(/(那麼|那么|而且|當|当|并且|同時|同时|前提|假设|假設|假定|假如|但是|但し|並且|もし|ならば|ただし|しかし|かつ|하지만|조건|먼저|만일|만약|단|그리고|그러면|และ |เมื่อ |แต่ |ดังนั้น |กำหนดให้ |ಸ್ಥಿತಿಯನ್ನು |ಮತ್ತು |ನೀಡಿದ |ನಂತರ |ಆದರೆ |మరియు |చెప్పబడినది |కాని |ఈ పరిస్థితిలో |అప్పుడు |ਪਰ |ਤਦ |ਜੇਕਰ |ਜਿਵੇਂ ਕਿ |ਜਦੋਂ |ਅਤੇ |यदि |परन्तु |पर |तब |तदा |तथा |जब |चूंकि |किन्तु |कदा |और |अगर |و |هنگامی |متى |لكن |عندما |ثم |بفرض |با فرض |اما |اذاً |آنگاه |כאשר |וגם |בהינתן |אזי |אז |אבל |Якщо |Һәм |Унда |Тоді |Тогда |То |Также |Та |Пусть |Припустимо, що |Припустимо |Онда |Но |Нехай |Нәтиҗәдә |Лекин |Ләкин |Коли |Когда |Когато |Када |Кад |К тому же |І |И |Задато |Задати |Задате |Если |Допустим |Дано |Дадено |Вә |Ва |Бирок |Әмма |Әйтик |Әгәр |Аммо |Али |Але |Агар |А також |А |Τότε |Όταν |Και |Δεδομένου |Αλλά |Þurh |Þegar |Þa þe |Þá |Þa |Zatati |Zakładając |Zadato |Zadate |Zadano |Zadani |Zadan |Za předpokladu |Za predpokladu |Youse know when youse got |Youse know like when |Yna |Yeah nah |Y'know |Y |Wun |Wtedy |When y'all |When |Wenn |WEN |wann |Ve |Và |Und |Un |ugeholl |Too right |Thurh |Thì |Then y'all |Then |Tha the |Tha |Tetapi |Tapi |Tak |Tada |Tad |Stel |Soit |Siis |Și |Şi |Si |Sed |Se |Så |Quando |Quand |Quan |Pryd |Potom |Pokud |Pokiaľ |Però |Pero |Pak |Oraz |Onda |Ond |Oletetaan |Og |Och |O zaman |Niin |Nhưng |När |Når |Mutta |Men |Mas |Maka |Majd |Mając |Mais |Maar |mä |Ma |Lorsque |Lorsqu'|Logo |Let go and haul |Kun |Kuid |Kui |Kiedy |Khi |Ketika |Kemudian |Keď |Když |Kaj |Kai |Kada |Kad |Jeżeli |Jeśli |Ja |It's just unbelievable |Ir |I CAN HAZ |I |Ha |Givun |Givet |Given y'all |Given |Gitt |Gegeven |Gegeben seien |Gegeben sei |Gdy |Gangway! |Fakat |Étant donnés |Etant donnés |Étant données |Etant données |Étant donnée |Etant donnée |Étant donné |Etant donné |Et |És |Entonces |Entón |Então |Entao |En |Eğer ki |Ef |Eeldades |E |Ðurh |Duota |Dun |Donitaĵo |Donat |Donada |Do |Diyelim ki |Diberi |Dengan |Den youse gotta |DEN |De |Dato |Dați fiind |Daţi fiind |Dati fiind |Dati |Date fiind |Date |Data |Dat fiind |Dar |Dann |dann |Dan |Dados |Dado |Dadas |Dada |Ða ðe |Ða |Cuando |Cho |Cando |Când |Cand |Cal |But y'all |But at the end of the day I reckon |BUT |But |Buh |Blimey! |Biết |Bet |Bagi |Aye |awer |Avast! |Atunci |Atesa |Atès |Apabila |Anrhegedig a |Angenommen |And y'all |And |AN |An |an |Amikor |Amennyiben |Ama |Als |Alors |Allora |Ali |Aleshores |Ale |Akkor |Ak |Adott |Ac |Aber |A zároveň |A tiež |A taktiež |A také |A |a |7 |\* )/)) {
97
- state.inStep = true;
98
- state.allowPlaceholders = true;
99
- state.allowMultilineArgument = true;
100
- state.inKeywordLine = true;
101
- return "keyword";
102
- } else if (stream.match(/"[^"]*"?/)) {
103
- return "string";
104
- } else if (state.allowPlaceholders && stream.match(/<[^>]*>?/)) {
105
- return "variable";
106
- } else {
107
- stream.next();
108
- stream.eatWhile(/[^@"<#]/);
109
- return null;
110
- }
111
- }
112
- };
113
- export {
114
- gherkin
115
- };