@nldd/design-system 0.15.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/custom-elements.json +1201 -172
  2. package/dist/components/actions/button/button.d.ts +2 -17
  3. package/dist/components/actions/button/button.d.ts.map +1 -1
  4. package/dist/components/actions/button/button.js +10 -35
  5. package/dist/components/actions/button/button.js.map +1 -1
  6. package/dist/components/actions/icon-button/icon-button.d.ts +2 -1
  7. package/dist/components/actions/icon-button/icon-button.d.ts.map +1 -1
  8. package/dist/components/actions/icon-button/icon-button.js +8 -2
  9. package/dist/components/actions/icon-button/icon-button.js.map +1 -1
  10. package/dist/components/actions/menu/menu.d.ts +9 -1
  11. package/dist/components/actions/menu/menu.d.ts.map +1 -1
  12. package/dist/components/actions/menu/menu.js +11 -1
  13. package/dist/components/actions/menu/menu.js.map +1 -1
  14. package/dist/components/actions/split-button/split-button.d.ts +63 -34
  15. package/dist/components/actions/split-button/split-button.d.ts.map +1 -1
  16. package/dist/components/actions/split-button/split-button.i18n.d.ts +1 -1
  17. package/dist/components/actions/split-button/split-button.i18n.js +1 -1
  18. package/dist/components/actions/split-button/split-button.i18n.js.map +1 -1
  19. package/dist/components/actions/split-button/split-button.js +116 -76
  20. package/dist/components/actions/split-button/split-button.js.map +1 -1
  21. package/dist/components/actions/split-button/split-button.styles.d.ts.map +1 -1
  22. package/dist/components/actions/split-button/split-button.styles.js +4 -0
  23. package/dist/components/actions/split-button/split-button.styles.js.map +1 -1
  24. package/dist/components/actions/split-button/split-button.template.d.ts +2 -1
  25. package/dist/components/actions/split-button/split-button.template.d.ts.map +1 -1
  26. package/dist/components/actions/split-button/split-button.template.js +25 -20
  27. package/dist/components/actions/split-button/split-button.template.js.map +1 -1
  28. package/dist/components/actions/toolbar/toolbar.story-sync.d.ts +13 -0
  29. package/dist/components/actions/toolbar/toolbar.story-sync.d.ts.map +1 -0
  30. package/dist/components/actions/toolbar/toolbar.story-sync.js +89 -0
  31. package/dist/components/actions/toolbar/toolbar.story-sync.js.map +1 -0
  32. package/dist/components/components.js +1202 -273
  33. package/dist/components/content/icon/icon-aliases.d.ts.map +1 -1
  34. package/dist/components/content/icon/icon-aliases.js +2 -0
  35. package/dist/components/content/icon/icon-aliases.js.map +1 -1
  36. package/dist/components/content/tooltip/tooltip.d.ts +8 -1
  37. package/dist/components/content/tooltip/tooltip.d.ts.map +1 -1
  38. package/dist/components/content/tooltip/tooltip.js +44 -5
  39. package/dist/components/content/tooltip/tooltip.js.map +1 -1
  40. package/dist/components/content/tooltip/tooltip.styles.d.ts.map +1 -1
  41. package/dist/components/content/tooltip/tooltip.styles.js +5 -0
  42. package/dist/components/content/tooltip/tooltip.styles.js.map +1 -1
  43. package/dist/components/{decorate-CzRe1eif.js → decorate-pEFCObfp.js} +1 -1
  44. package/dist/components/{defer-focus-DIPAUUJa.js → defer-focus-CkNrCf_g.js} +2 -2
  45. package/dist/components/{dev-checks-tdnaA2UV.js → dev-checks--aiYe9Pe.js} +85 -4
  46. package/dist/components/{icon-BPNDyhu9.js → icon-BQjRjtKH.js} +2 -1
  47. package/dist/components/{icon-button-Dbo_SGor.js → icon-button-BivCiIpt.js} +84 -12
  48. package/dist/components/index.d.ts +2 -0
  49. package/dist/components/index.d.ts.map +1 -1
  50. package/dist/components/index.js +2 -0
  51. package/dist/components/index.js.map +1 -1
  52. package/dist/components/inputs/checkbox/checkbox.d.ts +0 -5
  53. package/dist/components/inputs/checkbox/checkbox.d.ts.map +1 -1
  54. package/dist/components/inputs/checkbox/checkbox.js +0 -5
  55. package/dist/components/inputs/checkbox/checkbox.js.map +1 -1
  56. package/dist/components/inputs/checkbox/checkbox.styles.js +9 -9
  57. package/dist/components/inputs/code-editor/code-editor.styles.d.ts.map +1 -1
  58. package/dist/components/inputs/code-editor/code-editor.styles.js +6 -0
  59. package/dist/components/inputs/code-editor/code-editor.styles.js.map +1 -1
  60. package/dist/components/inputs/file-field/file-field.styles.js +17 -17
  61. package/dist/components/inputs/file-field/file-field.template.d.ts.map +1 -1
  62. package/dist/components/inputs/file-field/file-field.template.js +3 -2
  63. package/dist/components/inputs/file-field/file-field.template.js.map +1 -1
  64. package/dist/components/inputs/password-field/password-field.d.ts +5 -12
  65. package/dist/components/inputs/password-field/password-field.d.ts.map +1 -1
  66. package/dist/components/inputs/password-field/password-field.i18n.d.ts +8 -0
  67. package/dist/components/inputs/password-field/password-field.i18n.d.ts.map +1 -0
  68. package/dist/components/inputs/password-field/password-field.i18n.js +7 -0
  69. package/dist/components/inputs/password-field/password-field.i18n.js.map +1 -0
  70. package/dist/components/inputs/password-field/password-field.js +10 -23
  71. package/dist/components/inputs/password-field/password-field.js.map +1 -1
  72. package/dist/components/inputs/password-field/password-field.template.js +2 -2
  73. package/dist/components/inputs/password-field/password-field.template.js.map +1 -1
  74. package/dist/components/inputs/radio-button/radio-button.d.ts +0 -5
  75. package/dist/components/inputs/radio-button/radio-button.d.ts.map +1 -1
  76. package/dist/components/inputs/radio-button/radio-button.js +0 -5
  77. package/dist/components/inputs/radio-button/radio-button.js.map +1 -1
  78. package/dist/components/inputs/radio-button/radio-button.styles.js +9 -9
  79. package/dist/components/inputs/slider/slider.d.ts +19 -4
  80. package/dist/components/inputs/slider/slider.d.ts.map +1 -1
  81. package/dist/components/inputs/slider/slider.js +87 -19
  82. package/dist/components/inputs/slider/slider.js.map +1 -1
  83. package/dist/components/inputs/slider/slider.styles.d.ts.map +1 -1
  84. package/dist/components/inputs/slider/slider.styles.js +21 -6
  85. package/dist/components/inputs/slider/slider.styles.js.map +1 -1
  86. package/dist/components/inputs/slider/slider.template.js +1 -1
  87. package/dist/components/inputs/slider/slider.template.js.map +1 -1
  88. package/dist/components/inputs/swatch-picker/swatch-picker.d.ts +185 -0
  89. package/dist/components/inputs/swatch-picker/swatch-picker.d.ts.map +1 -0
  90. package/dist/components/inputs/swatch-picker/swatch-picker.i18n.d.ts +22 -0
  91. package/dist/components/inputs/swatch-picker/swatch-picker.i18n.d.ts.map +1 -0
  92. package/dist/components/inputs/swatch-picker/swatch-picker.i18n.js +21 -0
  93. package/dist/components/inputs/swatch-picker/swatch-picker.i18n.js.map +1 -0
  94. package/dist/components/inputs/swatch-picker/swatch-picker.js +485 -0
  95. package/dist/components/inputs/swatch-picker/swatch-picker.js.map +1 -0
  96. package/dist/components/inputs/swatch-picker/swatch-picker.styles.d.ts +3 -0
  97. package/dist/components/inputs/swatch-picker/swatch-picker.styles.d.ts.map +1 -0
  98. package/dist/components/inputs/swatch-picker/swatch-picker.styles.js +177 -0
  99. package/dist/components/inputs/swatch-picker/swatch-picker.styles.js.map +1 -0
  100. package/dist/components/inputs/swatch-picker/swatch-picker.template.d.ts +6 -0
  101. package/dist/components/inputs/swatch-picker/swatch-picker.template.d.ts.map +1 -0
  102. package/dist/components/inputs/swatch-picker/swatch-picker.template.js +44 -0
  103. package/dist/components/inputs/swatch-picker/swatch-picker.template.js.map +1 -0
  104. package/dist/components/inputs/switch/switch.d.ts +0 -5
  105. package/dist/components/inputs/switch/switch.d.ts.map +1 -1
  106. package/dist/components/inputs/switch/switch.js +0 -5
  107. package/dist/components/inputs/switch/switch.js.map +1 -1
  108. package/dist/components/inputs/switch/switch.styles.js +2 -2
  109. package/dist/components/{just-in-time-education.i18n-BgCd3s-c.js → just-in-time-education.i18n-S05IOgqk.js} +30 -2
  110. package/dist/components/layout/page-footer/page-footer.styles.d.ts.map +1 -1
  111. package/dist/components/layout/page-footer/page-footer.styles.js +11 -3
  112. package/dist/components/layout/page-footer/page-footer.styles.js.map +1 -1
  113. package/dist/components/layout/page-sections/hero/hero.styles.js +1 -1
  114. package/dist/components/layout/popover/popover.d.ts +5 -3
  115. package/dist/components/layout/popover/popover.d.ts.map +1 -1
  116. package/dist/components/layout/popover/popover.js +5 -3
  117. package/dist/components/layout/popover/popover.js.map +1 -1
  118. package/dist/components/layout/task-board/task-board.d.ts +8 -0
  119. package/dist/components/layout/task-board/task-board.d.ts.map +1 -1
  120. package/dist/components/layout/task-board/task-board.js +59 -0
  121. package/dist/components/layout/task-board/task-board.js.map +1 -1
  122. package/dist/components/lists-and-tables/list-item/list-item.d.ts +1 -1
  123. package/dist/components/lists-and-tables/list-item/list-item.js +1 -1
  124. package/dist/components/lists-and-tables/list-item/list-item.styles.d.ts.map +1 -1
  125. package/dist/components/lists-and-tables/list-item/list-item.styles.js +0 -6
  126. package/dist/components/lists-and-tables/list-item/list-item.styles.js.map +1 -1
  127. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts +1 -1
  128. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts.map +1 -1
  129. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js +5 -2
  130. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js.map +1 -1
  131. package/dist/components/navigation/link-group/link-group.d.ts +47 -0
  132. package/dist/components/navigation/link-group/link-group.d.ts.map +1 -0
  133. package/dist/components/navigation/link-group/link-group.js +81 -0
  134. package/dist/components/navigation/link-group/link-group.js.map +1 -0
  135. package/dist/components/navigation/link-group/link-group.styles.d.ts +2 -0
  136. package/dist/components/navigation/link-group/link-group.styles.d.ts.map +1 -0
  137. package/dist/components/navigation/link-group/link-group.styles.js +60 -0
  138. package/dist/components/navigation/link-group/link-group.styles.js.map +1 -0
  139. package/dist/components/navigation/link-group/link-group.template.d.ts +3 -0
  140. package/dist/components/navigation/link-group/link-group.template.d.ts.map +1 -0
  141. package/dist/components/navigation/link-group/link-group.template.js +15 -0
  142. package/dist/components/navigation/link-group/link-group.template.js.map +1 -0
  143. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.d.ts.map +1 -1
  144. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js +7 -6
  145. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js.map +1 -1
  146. package/dist/components/{nl.generated-D-8UF1iR.js → nl.generated-CUo20aPV.js} +3 -1
  147. package/dist/components/{visibility-mixin-CNCT26tu.js → visibility-mixin-Ce0goNS6.js} +1 -1
  148. package/dist/css/variables.css +3 -1
  149. package/dist/nldd.min.js +1074 -768
  150. package/dist/translations/en-US.d.ts.map +1 -1
  151. package/dist/translations/en-US.js +23 -1
  152. package/dist/translations/en-US.js.map +1 -1
  153. package/dist/translations/fy.d.ts +3 -3
  154. package/dist/translations/fy.d.ts.map +1 -1
  155. package/dist/translations/fy.js +38 -1
  156. package/dist/translations/fy.js.map +1 -1
  157. package/dist/translations/nl.generated.d.ts +23 -1
  158. package/dist/translations/nl.generated.d.ts.map +1 -1
  159. package/dist/translations/nl.generated.js +4 -0
  160. package/dist/translations/nl.generated.js.map +1 -1
  161. package/dist/translations/pap-AW.d.ts +3 -3
  162. package/dist/translations/pap-AW.d.ts.map +1 -1
  163. package/dist/translations/pap-AW.js +38 -1
  164. package/dist/translations/pap-AW.js.map +1 -1
  165. package/dist/translations/pap-CW.d.ts +3 -3
  166. package/dist/translations/pap-CW.d.ts.map +1 -1
  167. package/dist/translations/pap-CW.js +38 -1
  168. package/dist/translations/pap-CW.js.map +1 -1
  169. package/dist/types/vue.d.ts +111 -33
  170. package/dist/utilities/dev-rules.generated.d.ts.map +1 -1
  171. package/dist/utilities/dev-rules.generated.js +90 -3
  172. package/dist/utilities/dev-rules.generated.js.map +1 -1
  173. package/dist/utilities/owner-form.d.ts +21 -0
  174. package/dist/utilities/owner-form.d.ts.map +1 -0
  175. package/dist/utilities/owner-form.js +39 -0
  176. package/dist/utilities/owner-form.js.map +1 -0
  177. package/dist/utilities/popover-target.d.ts +11 -0
  178. package/dist/utilities/popover-target.d.ts.map +1 -1
  179. package/dist/utilities/popover-target.js +27 -0
  180. package/dist/utilities/popover-target.js.map +1 -1
  181. package/dist/utilities/popup-anchor-controller.d.ts.map +1 -1
  182. package/dist/utilities/popup-anchor-controller.js +5 -1
  183. package/dist/utilities/popup-anchor-controller.js.map +1 -1
  184. package/lint/cli.js +4 -4
  185. package/lint/data.generated.json +1 -1
  186. package/package.json +13 -5
@@ -1,16 +1,16 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D8jQpDG7.js";
2
- import { n as customElement, t as __decorate } from "./decorate-CzRe1eif.js";
2
+ import { n as customElement, t as __decorate } from "./decorate-pEFCObfp.js";
3
3
  import { n as slottedReset, t as inheritedTextReset } from "./shadow-resets-BwOyyZFH.js";
4
- import { a as downloadLinkHintKey, c as linkRel, i as translate, n as withTranslations, o as linkHintKey, r as setTranslations, s as markDownloadTarget, t as deferFocus } from "./defer-focus-DIPAUUJa.js";
4
+ import { a as downloadLinkHintKey, c as linkRel, i as translate, n as withTranslations, o as linkHintKey, r as setTranslations, s as markDownloadTarget, t as deferFocus } from "./defer-focus-CkNrCf_g.js";
5
5
  import { n as internalsOf, r as setState$1 } from "./element-state-BnarBv0M.js";
6
- import { a as releaseContext, c as popoverTargetOf, d as hasShortcut, f as shortcutLabel, i as langOf, l as NLDDKeyboardShortcut, n as NLDDTooltip, o as NLDDActivityIndicator, p as shortcutsAvailable, r as carryContext, s as PopupAnchorController, t as NLDDIconButton, u as ShortcutAvailabilityController } from "./icon-button-Dbo_SGor.js";
6
+ import { a as releaseContext, c as anchorPopoverTarget, d as ShortcutAvailabilityController, f as hasShortcut, i as langOf, l as popoverTargetOf, m as shortcutsAvailable, n as NLDDTooltip, o as NLDDActivityIndicator, p as shortcutLabel, r as carryContext, s as PopupAnchorController, t as NLDDIconButton, u as NLDDKeyboardShortcut } from "./icon-button-BivCiIpt.js";
7
7
  import { t as reflectNonDefault } from "./reflect-non-default-B9wQcnne.js";
8
8
  import { t as nlddButtonTranslations } from "./button.i18n-DiDGynnq.js";
9
- import { t as NLDDIcon } from "./icon-BPNDyhu9.js";
9
+ import { t as NLDDIcon } from "./icon-BQjRjtKH.js";
10
10
  import { n as isPointerMode, r as isTouchMode, t as isKeyboardMode } from "./input-modality-CiPLYYMN.js";
11
- import { A as nlddStepperTranslations, B as nlddTokenTranslations, C as nlddCardTranslations, D as nlddTimeFieldTranslations, E as nlddTokenFieldTranslations, F as MONTH_KEYS, G as nlddPopoverTranslations, H as nlddImageTranslations, I as WEEKDAY_KEYS, J as nlddMenuTranslations, K as nlddAvatarTranslations, L as nlddDatePickerTranslations, M as nlddNumberFieldTranslations, N as nlddFileFieldTranslations, O as nlddTimePickerTranslations, P as nlddDateFieldTranslations, R as nlddComboBoxTranslations, S as nlddCollectionTranslations, T as nlddSliderTranslations, U as nlddCodeViewerTranslations, V as nlddRichTextTranslations, W as nlddAvatarGroupTranslations, Y as nlddSplitButtonTranslations, _ as nlddTableTranslations, a as nlddBadgeTranslations, b as nlddPageFooterTranslations, c as nlddPaginationTranslations, d as nlddTopNavigationBarTranslations, f as nlddSkipLinkTranslations, g as nlddDragHandleCellTranslations, h as nlddBreadcrumbsTranslations, i as nlddProgressBarTranslations, j as nlddSearchFieldTranslations, k as nlddTextEditorTranslations, l as nlddDocumentTabBarTranslations, m as nlddMenuBarTranslations, n as nlddStepBarTranslations, o as nlddNotificationTranslations, p as nlddLinkTranslations, q as nlddToolbarTranslations, r as nlddProgressCircleTranslations, s as nlddBannerTranslations, t as nlddJustInTimeEducationTranslations, u as nlddTabBarTranslations, v as nlddListItemSegmentTranslations, w as nlddSidebarSectionTranslations, x as nlddWindowTranslations, y as nlddTaskBoardTranslations, z as nlddValidationListTranslations } from "./just-in-time-education.i18n-BgCd3s-c.js";
11
+ import { A as nlddStepperTranslations, B as nlddComboBoxTranslations, C as nlddCardTranslations, D as nlddTimeFieldTranslations, E as nlddTokenFieldTranslations, F as nlddFileFieldTranslations, G as nlddCodeViewerTranslations, H as nlddTokenTranslations, I as nlddDateFieldTranslations, J as nlddAvatarTranslations, K as nlddAvatarGroupTranslations, L as MONTH_KEYS, M as nlddSearchFieldTranslations, N as nlddPasswordFieldTranslations, O as nlddTimePickerTranslations, P as nlddNumberFieldTranslations, R as WEEKDAY_KEYS, S as nlddCollectionTranslations, T as nlddSliderTranslations, U as nlddRichTextTranslations, V as nlddValidationListTranslations, W as nlddImageTranslations, X as nlddMenuTranslations, Y as nlddToolbarTranslations, Z as nlddSplitButtonTranslations, _ as nlddTableTranslations, a as nlddBadgeTranslations, b as nlddPageFooterTranslations, c as nlddPaginationTranslations, d as nlddTopNavigationBarTranslations, f as nlddSkipLinkTranslations, g as nlddDragHandleCellTranslations, h as nlddBreadcrumbsTranslations, i as nlddProgressBarTranslations, j as nlddSwatchPickerItemTranslations, k as nlddTextEditorTranslations, l as nlddDocumentTabBarTranslations, m as nlddMenuBarTranslations, n as nlddStepBarTranslations, o as nlddNotificationTranslations, p as nlddLinkTranslations, q as nlddPopoverTranslations, r as nlddProgressCircleTranslations, s as nlddBannerTranslations, t as nlddJustInTimeEducationTranslations, u as nlddTabBarTranslations, v as nlddListItemSegmentTranslations, w as nlddSidebarSectionTranslations, x as nlddWindowTranslations, y as nlddTaskBoardTranslations, z as nlddDatePickerTranslations } from "./just-in-time-education.i18n-S05IOgqk.js";
12
12
  import { n as queryBreakpoints, r as rootFontSize, t as breakpointPx } from "./breakpoints-Bti55RWY.js";
13
- import { t as VisibilityMixin } from "./visibility-mixin-CNCT26tu.js";
13
+ import { t as VisibilityMixin } from "./visibility-mixin-Ce0goNS6.js";
14
14
  import { t as nlddListTranslations } from "./list.i18n-CKqbhFQ_.js";
15
15
  import { t as nlddListItemTranslations } from "./list-item.i18n-89uqlBMK.js";
16
16
  import { $ as ChangeSet, A as syntaxTree, B as getDrawSelectionConfig, C as indentNodeProp, D as matchBrackets, E as languageDataProp, F as RectangleMarker, G as layer, H as gutter, I as ViewPlugin, J as placeholder, K as lineNumbers, L as WidgetType, M as Direction, N as EditorView, P as GutterMarker, Q as ChangeDesc, R as drawSelection, S as getIndentation, T as indentUnit, U as gutterLineClass, W as keymap, X as tooltips, Y as showTooltip, Z as Annotation, _t as findClusterBreak, a as HighlightStyle, at as Prec, b as foldService, c as Language, d as ParseContext, dt as Text, et as Compartment, f as StreamLanguage, ft as Transaction, gt as countColumn, h as defineLanguageFacet, ht as combineConfig, j as Decoration, k as syntaxHighlighting, l as LanguageDescription, lt as StateEffect, nt as EditorState, o as IndentContext, ot as RangeSet, rt as Facet, st as RangeSetBuilder, tt as EditorSelection, u as LanguageSupport, ut as StateField, w as indentString, x as getIndentUnit, y as foldNodeProp, z as dropCursor } from "./dist-BFZM0YsR.js";
@@ -834,6 +834,38 @@ function DescribedBy(Base) {
834
834
  __decorate([property({ attribute: false })], DescribedByMixin.prototype, "describedByElements", void 0);
835
835
  return DescribedByMixin;
836
836
  }
837
+ // src/utilities/owner-form.ts
838
+ /**
839
+ * The form a form-associated button acts on: the one it sits in, or the one
840
+ * its `form` attribute names.
841
+ *
842
+ * The platform resolves that attribute itself, but only to a real `<form>`.
843
+ * An `nldd-form` renders its form in the light DOM without handing it the id
844
+ * the consumer wrote, so an id pointing at the component finds an element
845
+ * that is not a form, and the button ends up with no form owner at all. That
846
+ * is the whole reason a save button in a page footer, outside the form it
847
+ * belongs to, used to do nothing.
848
+ *
849
+ * The id is looked up in the host's own root, the same scope the platform
850
+ * searches: a button inside a shadow tree reaches the forms in that tree, not
851
+ * one in the document around it. Put the two in the same tree, or hand the
852
+ * button its form another way.
853
+ *
854
+ * Shared by nldd-button and nldd-split-button, whose action button sits in a
855
+ * shadow root and so has no form owner of its own.
856
+ */
857
+ function ownerForm(host, internals) {
858
+ const id = host.getAttribute("form");
859
+ const root = host.getRootNode();
860
+ const target = id && "getElementById" in root ? root.getElementById(id) : null;
861
+ const rendered = target?.form;
862
+ let form = null;
863
+ if (target instanceof HTMLFormElement) form = target;
864
+ else if (rendered instanceof HTMLFormElement) form = rendered;
865
+ setState$1(host, "no-form-target", Boolean(id) && !target);
866
+ setState$1(host, "form-target-not-a-form", Boolean(target) && !form);
867
+ return id ? form : internals.form;
868
+ }
837
869
  // src/components/actions/button/button.ts
838
870
  /**
839
871
  * Nederlandse Digitale Dienst Button Component (Lit + TypeScript)
@@ -846,7 +878,7 @@ function DescribedBy(Base) {
846
878
  * @attr {string} loading-text - What the screen reader announces while `loading` is on, for a button that does more than load: "Aan het bewaren". Leave it out and the activity indicator says its translated "Laden".
847
879
  * @attr {boolean} disabled - Disabled state. Avoid it: let the action run and say afterwards what is missing; the design guidelines say why.
848
880
  * @attr {string} type - Button type for form submission: 'button' | 'submit' | 'reset' (ignored when href is set)
849
- * @attr {string} popovertarget - ID of a popover element this button invokes, looked up in the tree of this button; the inner button gets the element. Use the popoverTargetElement property instead when the popover lives in another tree.
881
+ * @attr {string} popovertarget - ID of a popover element this button invokes, looked up in the tree of this button; the inner button gets the element. Use the popoverTargetElement property instead when the popover lives in another tree. An nldd-menu or nldd-popover it points at is also positioned against this control, so it needs no `anchor`.
850
882
  * @attr {boolean} expandable - Whether the button has a icon to indicate it opens a menu or popover
851
883
  * @attr {boolean} expanded - Whether the popover/menu controlled by this button is currently open. Forwarded as aria-expanded on the inner button; toggles the is-expanded visual state.
852
884
  * @attr {string} popup-type - Type of popup container this button opens: 'menu' | 'listbox' | 'dialog' | 'tree' | 'grid'. Sets aria-haspopup on the inner button and forces aria-expanded to always be present (true/false) so screen readers know the popup state. An nldd-menu or nldd-popover in the `popup` slot, or anchored to this button, sets it itself from the first render; set it only for another kind of popup.
@@ -915,7 +947,12 @@ var _NLDDButton = class NLDDButton extends DescribedBy(withTranslations(LitEleme
915
947
  this._popup = new PopupAnchorController(this);
916
948
  this._shortcutAvailability = new ShortcutAvailabilityController(this);
917
949
  }
950
+ disconnectedCallback() {
951
+ super.disconnectedCallback();
952
+ anchorPopoverTarget(this, null);
953
+ }
918
954
  updated(changedProperties) {
955
+ anchorPopoverTarget(this, popoverTargetOf(this, this.popovertarget, this.popoverTargetElement));
919
956
  if (changedProperties.has("maxWidth")) {
920
957
  const isValidLength = !!this.maxWidth && CSS.supports("max-width", this.maxWidth);
921
958
  this.style.maxWidth = isValidLength ? this.maxWidth : "";
@@ -935,7 +972,10 @@ var _NLDDButton = class NLDDButton extends DescribedBy(withTranslations(LitEleme
935
972
  e.stopPropagation();
936
973
  return;
937
974
  }
938
- if (e.currentTarget instanceof HTMLButtonElement) e.currentTarget.popoverTargetElement = popoverTargetOf(this, this.popovertarget, this.popoverTargetElement);
975
+ if (e.currentTarget instanceof HTMLButtonElement) {
976
+ e.currentTarget.popoverTargetElement = popoverTargetOf(this, this.popovertarget, this.popoverTargetElement);
977
+ anchorPopoverTarget(this, e.currentTarget.popoverTargetElement);
978
+ }
939
979
  if (this._popup.handleClick(e)) {
940
980
  e.preventDefault();
941
981
  return;
@@ -945,33 +985,8 @@ var _NLDDButton = class NLDDButton extends DescribedBy(withTranslations(LitEleme
945
985
  if (this.type === "submit") form?.requestSubmit();
946
986
  else if (this.type === "reset") form?.reset();
947
987
  }
948
- /**
949
- * The form this button acts on: the one it sits in, or the one its `form`
950
- * attribute names.
951
- *
952
- * The platform resolves that attribute itself, but only to a real `<form>`.
953
- * An `nldd-form` renders its form in the light DOM without handing it the id
954
- * the consumer wrote, so an id pointing at the component finds an element
955
- * that is not a form, and the button ends up with no form owner at all. That
956
- * is the whole reason a save button in a page footer, outside the form it
957
- * belongs to, used to do nothing.
958
- *
959
- * The id is looked up in the button's own root, the same scope the platform
960
- * searches: a button inside a shadow tree reaches the forms in that tree, not
961
- * one in the document around it. Put the two in the same tree, or hand the
962
- * button its form another way.
963
- */
964
988
  _ownerForm() {
965
- const id = this.getAttribute("form");
966
- const root = this.getRootNode();
967
- const target = id && "getElementById" in root ? root.getElementById(id) : null;
968
- const rendered = target?.form;
969
- let form = null;
970
- if (target instanceof HTMLFormElement) form = target;
971
- else if (rendered instanceof HTMLFormElement) form = rendered;
972
- setState$1(this, "no-form-target", Boolean(id) && !target);
973
- setState$1(this, "form-target-not-a-form", Boolean(target) && !form);
974
- return id ? form : this._internals.form;
989
+ return ownerForm(this, this._internals);
975
990
  }
976
991
  /**
977
992
  * Delegates focus to the inner `<button>` (or `<a>` when `href` is set), so
@@ -1121,9 +1136,11 @@ var splitButtonStyles = css`
1121
1136
  --_split-button-highlight-border-color: var(--semantics-buttons-neutral-tinted-highlight-border-color);
1122
1137
  --_split-button-divider-length: var(--semantics-buttons-md-divider-length);
1123
1138
  --_split-button-width: auto;
1139
+ --_split-button-host-width: auto;
1124
1140
 
1125
1141
  ${inheritedTextReset}
1126
1142
  display: inline-flex;
1143
+ width: var(--_split-button-host-width);
1127
1144
  isolation: isolate;
1128
1145
  -webkit-tap-highlight-color: transparent;
1129
1146
  }
@@ -1182,6 +1199,8 @@ var splitButtonStyles = css`
1182
1199
  display: none;
1183
1200
  }
1184
1201
 
1202
+ /* The host fades, not its buttons: the highlight border is drawn here and
1203
+ has to fade with them. */
1185
1204
  :host([disabled]) {
1186
1205
  opacity: var(--primitives-opacity-disabled);
1187
1206
  pointer-events: none;
@@ -1237,42 +1256,47 @@ var splitButtonStyles = css`
1237
1256
  }
1238
1257
  `;
1239
1258
  // src/components/actions/split-button/split-button.template.ts
1240
- function template$22() {
1259
+ function splitButtonTemplate(component) {
1241
1260
  return html`
1242
1261
  <div class="split-button">
1243
1262
  <nldd-button
1244
- appearance=${this.appearance}
1245
- size=${this.size}
1246
- text=${this.text}
1247
- start-icon=${this.icon || nothing}
1248
- shortcut=${this.shortcut || nothing}
1249
- shortcut-mac=${this.shortcutMac || nothing}
1250
- shortcut-windows=${this.shortcutWindows || nothing}
1251
- shortcut-linux=${this.shortcutLinux || nothing}
1263
+ appearance=${component._buttonAppearance()}
1264
+ size=${component.size}
1265
+ text=${component.text}
1266
+ start-icon=${component.icon || nothing}
1267
+ shortcut=${component.shortcut || nothing}
1268
+ shortcut-mac=${component.shortcutMac || nothing}
1269
+ shortcut-windows=${component.shortcutWindows || nothing}
1270
+ shortcut-linux=${component.shortcutLinux || nothing}
1271
+ href=${component.href || nothing}
1272
+ download=${component.download ?? nothing}
1273
+ loading-text=${component.loadingText || nothing}
1252
1274
  horizontal-alignment="left"
1253
1275
  width="full"
1254
1276
  no-highlight-border
1255
- ?disabled=${this.disabled}
1256
- @click=${this._handleActionClick}
1277
+ single-line
1278
+ ?loading=${component.loading}
1279
+ ?disabled=${component.disabled}
1280
+ @click=${component._handleActionClick}
1257
1281
  ></nldd-button>
1258
1282
  <div class="split-button__divider"></div>
1259
1283
  <div class="split-button__popup-button">
1260
1284
  <nldd-icon-button
1261
- appearance=${this.appearance}
1262
- size=${this.size}
1285
+ appearance=${component._buttonAppearance()}
1286
+ size=${component.size}
1263
1287
  icon="chevron-down-small"
1264
- text=${this._t("components.split-button.menu-action")}
1288
+ text=${component._t("components.split-button.show-options-action", { text: component.text })}
1265
1289
  tooltip-timing="never"
1266
1290
  no-highlight-border
1267
1291
  hide-lg-text
1268
- ?disabled=${this.disabled}
1269
- ?expanded=${this._menuIsOpen}
1270
- popup-type="menu"
1271
- @click=${this._handleMenuClick}
1272
- ></nldd-icon-button>
1292
+ ?disabled=${component.disabled}
1293
+ .popoverTargetElement=${component._popoverTarget()}
1294
+ >
1295
+ <slot name="popup" slot="popup"></slot>
1296
+ <slot slot="popup"></slot>
1297
+ </nldd-icon-button>
1273
1298
  </div>
1274
1299
  </div>
1275
- <slot @slotchange=${this._popup.handleSlotChange}></slot>
1276
1300
  `;
1277
1301
  }
1278
1302
  // src/components/actions/menu/menu.styles.ts
@@ -2048,7 +2072,7 @@ var iconCellStyles = css`
2048
2072
  }
2049
2073
  `;
2050
2074
  // src/components/lists-and-tables/cells/icon-cell/icon-cell.template.ts
2051
- function template$21() {
2075
+ function template$22() {
2052
2076
  return html`
2053
2077
  <span
2054
2078
  part="icon"
@@ -2087,7 +2111,7 @@ var _NLDDIconCell = class NLDDIconCell extends VisibilityMixin(LitElement, "cell
2087
2111
  this.icon = "";
2088
2112
  }
2089
2113
  render() {
2090
- return template$21.call(this);
2114
+ return template$22.call(this);
2091
2115
  }
2092
2116
  };
2093
2117
  var NLDDIconCell = (_NLDDIconCell.styles = iconCellStyles, _NLDDIconCell);
@@ -2431,7 +2455,7 @@ function renderQueryMark(text, query, mode = "predictive") {
2431
2455
  return html`${segments.map((s) => s.bold ? html`<b>${s.text}</b>` : s.text)}`;
2432
2456
  }
2433
2457
  // src/components/lists-and-tables/cells/text-cell/text-cell.template.ts
2434
- function template$20() {
2458
+ function template$21() {
2435
2459
  return html`
2436
2460
  <p
2437
2461
  class="text-cell__overline"
@@ -2609,7 +2633,7 @@ var _NLDDTextCell = class NLDDTextCell extends RowHeaderMixin(VisibilityMixin(Li
2609
2633
  else this.style.removeProperty("--_text-cell-min-height");
2610
2634
  }
2611
2635
  render() {
2612
- return template$20.call(this);
2636
+ return template$21.call(this);
2613
2637
  }
2614
2638
  };
2615
2639
  var NLDDTextCell = (_NLDDTextCell.styles = [textCellStyles], _NLDDTextCell);
@@ -3011,7 +3035,7 @@ var buttonGroupStyles = css`
3011
3035
  }
3012
3036
  `;
3013
3037
  // src/components/actions/button-group/button-group.template.ts
3014
- function template$19() {
3038
+ function template$20() {
3015
3039
  return html`
3016
3040
  <div class="button-group">
3017
3041
  <slot @slotchange=${this._handleSlotChange}></slot>
@@ -3160,7 +3184,7 @@ var NLDDButtonGroup = (_NLDDButtonGroup = class NLDDButtonGroup extends LitEleme
3160
3184
  this._collapseVerdict = 0;
3161
3185
  }
3162
3186
  render() {
3163
- return template$19.call(this);
3187
+ return template$20.call(this);
3164
3188
  }
3165
3189
  }, _NLDDButtonGroup.styles = buttonGroupStyles, _NLDDButtonGroup);
3166
3190
  __decorate([property({
@@ -4061,7 +4085,7 @@ var ANNOUNCE_RESULTS_DELAY_MS = 500;
4061
4085
  * @attr {'menu'|'listbox'|'navigation'} variant - What the menu is (default 'menu'). `menu` is a menu of actions: `role="menu"` with menu items, for things you do. `listbox` is the popup of a combobox: `role="listbox"` with options, focus stays in the field. `navigation` is a submenu in a site navigation: a list of links (`role="list"`, each item a list item around a real link), because a screen reader treats a menu as an application and reads a list of links as what it is. Every item takes an `href`. Tab reaches each link, the arrow keys, Home and End move between them, Escape closes and returns focus to the trigger, and the menu closes when focus leaves it. The trigger says `aria-expanded` and promises no menu. Checkbox and radio items, shortcuts and `filter()` belong to actions and warn in development here. A submenu of a navigation menu is a navigation menu too. The variant sets `role="listitem"` on its items and groups, and takes it off again when it changes back, also where you had set that role yourself.
4062
4086
  * @attr {string} width - Explicit width, pinned exactly. Without it the menu sizes to its content between a minimum and a viewport-aware maximum (min(100vw - inset, 640px)).
4063
4087
  * @attr {string} accessible-label - Name of the menu or listbox for assistive technology, on the element that has the role. Without it the menu takes the name of its anchor (the `accessible-label`, `aria-label`, `text` or text of the button or field it hangs off), and a submenu the text of the item that opens it, so a listbox under a search field is "Zoeken" rather than nameless (WCAG 4.1.2). The list of an nldd-combo-box or nldd-token-field takes the name of the field.
4064
- * @attr {string} anchor - ID of the anchor element. Positions the menu against it AND makes it a toggle: the menu listens on document click and opens/closes itself when the click lands on the anchor. Use this for a menu hung off a button. For a menu you open yourself (a type-ahead under a text field, say), set the `anchorElement` property instead — same positioning, no toggle.
4088
+ * @attr {string} anchor - ID of the anchor element. Positions the menu against it AND makes it a toggle: the menu listens on document click and opens/closes itself when the click lands on the anchor. Use this for a trigger that is not an nldd component, such as a plain `<button>`. An nldd-button, nldd-icon-button, nldd-split-button or nldd-list-item-segment needs no anchor: put the menu in its `popup` slot, or point its `popovertarget` at the menu, and it anchors and opens the menu itself. For a menu you open yourself (a type-ahead under a text field, say), set the `anchorElement` property instead — same positioning, no toggle.
4065
4089
  * @attr {string} placement - Floating UI placement. Default: 'bottom-start'.
4066
4090
  * @attr {number} max-items - Maximum number of visible items before scrolling. Sets --_menu-max-items internally. Default: 0 (no limit).
4067
4091
  * @attr {string} empty-text - Text of the default empty-state dialog. Falls back to Dutch i18n "Geen opties beschikbaar".
@@ -4433,6 +4457,16 @@ var NLDDMenu = class NLDDMenu extends LitElement {
4433
4457
  _shownForInvoker() {
4434
4458
  return this.matches(":popover-open") || this._openChain.length > 0 || this._collapsedByPointerGesture;
4435
4459
  }
4460
+ /**
4461
+ * Called by the invoking control once it has handled its click. The gesture
4462
+ * marker is normally cleared by the document click, but a control that stops
4463
+ * its click (nldd-split-button) keeps that from ever arriving, and a marker
4464
+ * left behind makes `_shownForInvoker()` report open on every later press.
4465
+ * @internal
4466
+ */
4467
+ _endInvokerGesture() {
4468
+ this._collapsedByPointerGesture = false;
4469
+ }
4436
4470
  /** @internal */
4437
4471
  _getAnchorEl() {
4438
4472
  if (this.anchorElement) return this.anchorElement;
@@ -4919,114 +4953,130 @@ if (!customElements.get("nldd-menu")) customElements.define("nldd-menu", NLDDMen
4919
4953
  /**
4920
4954
  * Nederlandse Digitale Dienst Split Button Component (Lit + TypeScript)
4921
4955
  *
4922
- * A split button combines a primary action button with a dropdown trigger.
4923
- * The main button performs the default action, while the icon button opens a
4924
- * menu or popover.
4956
+ * A split button combines a primary action with a chevron that opens its
4957
+ * alternatives. The main button performs the default action; the chevron opens
4958
+ * a menu or popover of variants of that same action.
4925
4959
  *
4926
- * Provide the dropdown by slotting an `nldd-menu` (with its `nldd-menu-item` /
4927
- * `nldd-menu-divider` children) or an `nldd-popover` directly:
4960
+ * The overlay is required. Put an `nldd-menu` or `nldd-popover` in the `popup`
4961
+ * slot, as on nldd-button and nldd-icon-button:
4928
4962
  *
4929
4963
  * ```html
4930
- * <nldd-split-button text="Opslaan">
4931
- * <nldd-menu>
4964
+ * <nldd-split-button text="Bewaar">
4965
+ * <nldd-menu slot="popup">
4932
4966
  * <nldd-menu-item text="Opslaan als…"></nldd-menu-item>
4933
4967
  * </nldd-menu>
4934
4968
  * </nldd-split-button>
4935
4969
  * ```
4936
4970
  *
4937
- * The slotted overlay stays in the light DOM — no item-moving — so consumers
4938
- * keep their references and the full overlay API. The split-button anchors it
4939
- * to the chevron and opens it on click. When no overlay is slotted, the chevron
4940
- * dispatches `menu-click` and the consumer manages their own popover.
4971
+ * The split button has no other slots, so an overlay without `slot="popup"`
4972
+ * works too. When both hold one, the one in `popup` wins. For an overlay that
4973
+ * lives elsewhere, point `popovertarget` at it instead.
4974
+ *
4975
+ * The chevron is the overlay's invoker: it anchors it, opens and closes it, and
4976
+ * takes `aria-expanded` and `aria-haspopup` from it, exactly as an
4977
+ * nldd-icon-button with a slotted overlay does. Its accessible name says which
4978
+ * action it belongs to ("Meer opties voor Bewaar").
4979
+ *
4980
+ * The API is narrower than nldd-button on purpose: a split button is an action
4981
+ * with variants, so it has no supporting text, no end icon and no link target.
4982
+ * Its label always stays on one line, without an ellipsis: keep it short.
4941
4983
  *
4942
4984
  * @element nldd-split-button
4943
4985
  * @attr {string} size - Button size: 'xs' | 'sm' | 'md' | 'lg' (default: 'md')
4944
- * @attr {string} appearance - Visual style (default: 'neutral-tinted'; 'inherit-tinted' and 'inherit-filled' for a colored surface)
4986
+ * @attr {string} appearance - Visual style: 'neutral-tinted' (default) | 'neutral-base' | 'accent-filled' | 'primary' | 'secondary' | 'inherit-tinted' | 'inherit-filled'. 'primary' is 'accent-filled' and 'secondary' is 'neutral-tinted'. The inherit appearances are for a colored surface. There are no transparent appearances: the split button needs a surface of its own to show it is one control.
4945
4987
  * @attr {boolean} disabled - Disabled state. Avoid it: let the action run and say afterwards what is missing; the design guidelines say why.
4988
+ * @attr {boolean} loading - Loading state of the main action, as on nldd-button. The chevron stays available.
4989
+ * @attr {string} loading-text - What the screen reader announces while `loading` is on, as on nldd-button.
4946
4990
  * @attr {string} width - Width mode: 'full' (stretches to container) or any CSS length; the main action button fills the available space
4947
4991
  * @attr {string} text - Button text for the primary action
4948
4992
  * @attr {string} icon - Icon name shown before the text on the primary action button
4993
+ * @attr {string} type - What the main action does in a form: 'button' (default) | 'submit' | 'reset'. Ignored when `href` is set.
4994
+ * @attr {string} form - Id of the form the main action submits or resets, for a split button outside it. Takes an `nldd-form` as well as a plain `<form>`, as on nldd-button.
4995
+ * @attr {string} href - Turns the main action into a link, as on nldd-button.
4996
+ * @attr {string} download - Saves the file `href` points at instead of opening it, as on nldd-button. Only used with `href`.
4997
+ * @attr {string} popovertarget - ID of an `nldd-menu` or `nldd-popover` elsewhere in this tree that the chevron opens, for an overlay that cannot be a child. A slotted overlay wins.
4949
4998
  * @attr {string} shortcut - Keyboard shortcut hint for the primary action, shown right after its text, e.g. 'Cmd+S'. Forwarded to the inner nldd-button; display only, wire up the handling in your app.
4950
4999
  * @attr {string} shortcut-mac - Override of `shortcut` on macOS, where the keys differ (falls back to `shortcut`).
4951
5000
  * @attr {string} shortcut-windows - Override of `shortcut` on Windows (falls back to `shortcut`).
4952
5001
  * @attr {string} shortcut-linux - Override of `shortcut` on Linux (falls back to `shortcut`).
4953
5002
  * @attr {object} translations - Translations; unset keys fall back to Dutch
4954
5003
  *
4955
- * @slot - A single `nldd-menu` or `nldd-popover` that the chevron opens.
5004
+ * @slot popup - The `nldd-menu` or `nldd-popover` the chevron opens.
5005
+ * @slot - Fallback for the overlay when it has no `slot="popup"`. Anything that is not an `nldd-menu` or `nldd-popover` does nothing here.
4956
5006
  *
4957
5007
  * @fires action-click - Fired when the main button is clicked
4958
- * @fires menu-click - Fired when the dropdown trigger is clicked and no overlay is slotted
4959
5008
  */
4960
5009
  var _NLDDSplitButton = class NLDDSplitButton extends LitElement {
4961
5010
  constructor(..._args) {
4962
5011
  super(..._args);
5012
+ this._internals = internalsOf(this);
4963
5013
  this.size = "md";
4964
5014
  this.appearance = "neutral-tinted";
4965
5015
  this.disabled = false;
5016
+ this.loading = false;
5017
+ this.loadingText = "";
4966
5018
  this.width = "";
4967
5019
  this.text = "";
5020
+ this.icon = "";
5021
+ this.type = "button";
5022
+ this.popoverTargetElement = null;
4968
5023
  this.shortcut = "";
4969
5024
  this.shortcutMac = "";
4970
5025
  this.shortcutWindows = "";
4971
5026
  this.shortcutLinux = "";
4972
- this.icon = "";
4973
5027
  this.translations = {};
4974
- this._menuIsOpen = false;
4975
- this._popup = new PopupAnchorController(this, {
4976
- anchorFor: () => this._popupButtonWrapper ?? null,
4977
- onChange: (overlay, previous) => {
4978
- previous?.removeEventListener("toggle", this._handleMenuToggle);
4979
- this._menuIsOpen = false;
4980
- overlay?.addEventListener("toggle", this._handleMenuToggle);
4981
- }
4982
- });
4983
- this._handleMenuToggle = (event) => {
4984
- this._menuIsOpen = event.newState === "open";
5028
+ this._refreshPopoverTarget = () => {
5029
+ const chevron = this.renderRoot.querySelector(".split-button__popup-button nldd-icon-button");
5030
+ if (chevron) chevron.popoverTargetElement = this._popoverTarget();
4985
5031
  };
4986
5032
  }
4987
- _t(key) {
4988
- return translate(this.translations, nlddSplitButtonTranslations, key);
5033
+ _t(key, vars) {
5034
+ return translate(this.translations, nlddSplitButtonTranslations, key, vars);
4989
5035
  }
4990
- firstUpdated() {
4991
- this._popupButtonWrapper?.addEventListener("pointerdown", this._popup.handlePointerdown);
4992
- this._popup.anchor();
5036
+ /** The appearance for the two buttons inside: they take the aliases'
5037
+ * meaning, not the alias, so 'secondary' is never a fall-through there. */
5038
+ _buttonAppearance() {
5039
+ if (this.appearance === "primary") return "accent-filled";
5040
+ if (this.appearance === "secondary") return "neutral-tinted";
5041
+ return this.appearance;
4993
5042
  }
4994
- disconnectedCallback() {
4995
- super.disconnectedCallback();
4996
- this._popup.overlay?.removeEventListener("toggle", this._handleMenuToggle);
5043
+ /** The overlay `popovertarget` names, for the chevron. Looked up in the tree
5044
+ * of this host: in the chevron's own tree the id would find nothing. */
5045
+ _popoverTarget() {
5046
+ return popoverTargetOf(this, this.popovertarget, this.popoverTargetElement);
4997
5047
  }
4998
5048
  _handleActionClick(e) {
4999
- if (this.disabled) return;
5049
+ if (this.disabled || this.loading) return;
5000
5050
  e.stopPropagation();
5001
5051
  this.dispatchEvent(new CustomEvent("action-click", {
5002
5052
  bubbles: true,
5003
5053
  composed: true
5004
5054
  }));
5055
+ if (this.href) return;
5056
+ const form = ownerForm(this, this._internals);
5057
+ if (this.type === "submit") form?.requestSubmit();
5058
+ else if (this.type === "reset") form?.reset();
5005
5059
  }
5006
- _handleMenuClick(e) {
5007
- if (this.disabled) return;
5008
- e.stopPropagation();
5009
- if (this._popup.handleClick(e)) return;
5010
- this.dispatchEvent(new CustomEvent("menu-click", {
5011
- bubbles: true,
5012
- composed: true
5013
- }));
5060
+ firstUpdated() {
5061
+ this.renderRoot.querySelector(".split-button__popup-button")?.addEventListener("click", this._refreshPopoverTarget, true);
5014
5062
  }
5015
- willUpdate(changedProperties) {
5016
- if (changedProperties.has("width")) {
5063
+ willUpdate(changed) {
5064
+ if (changed.has("width")) {
5017
5065
  const w = this.width;
5018
- const isFull = w === "full";
5019
- const isValidLength = !!w && !isFull && CSS.supports("width", w);
5020
- this.style.width = isValidLength ? w : "";
5021
- if (isFull || isValidLength) this.style.setProperty("--_split-button-width", "100%");
5022
- else this.style.removeProperty("--_split-button-width");
5066
+ if (w && w !== "full" && CSS.supports("width", w)) {
5067
+ this.style.setProperty("--_split-button-host-width", w);
5068
+ this.style.setProperty("--_split-button-width", "100%");
5069
+ } else {
5070
+ this.style.removeProperty("--_split-button-host-width");
5071
+ this.style.removeProperty("--_split-button-width");
5072
+ }
5023
5073
  }
5024
5074
  }
5025
5075
  render() {
5026
- return template$22.call(this);
5076
+ return splitButtonTemplate(this);
5027
5077
  }
5028
5078
  };
5029
- var NLDDSplitButton = (_NLDDSplitButton.styles = splitButtonStyles, _NLDDSplitButton);
5079
+ var NLDDSplitButton = (_NLDDSplitButton.styles = splitButtonStyles, _NLDDSplitButton.formAssociated = true, _NLDDSplitButton);
5030
5080
  __decorate([property({
5031
5081
  reflect: true,
5032
5082
  converter: reflectNonDefault("md")
@@ -5039,6 +5089,11 @@ __decorate([property({
5039
5089
  type: Boolean,
5040
5090
  reflect: true
5041
5091
  })], NLDDSplitButton.prototype, "disabled", void 0);
5092
+ __decorate([property({
5093
+ type: Boolean,
5094
+ reflect: true
5095
+ })], NLDDSplitButton.prototype, "loading", void 0);
5096
+ __decorate([property({ attribute: "loading-text" })], NLDDSplitButton.prototype, "loadingText", void 0);
5042
5097
  __decorate([property({
5043
5098
  reflect: true,
5044
5099
  converter: reflectNonDefault("")
@@ -5047,6 +5102,15 @@ __decorate([property({
5047
5102
  reflect: true,
5048
5103
  converter: reflectNonDefault("")
5049
5104
  })], NLDDSplitButton.prototype, "text", void 0);
5105
+ __decorate([property({ type: String })], NLDDSplitButton.prototype, "icon", void 0);
5106
+ __decorate([property({
5107
+ reflect: true,
5108
+ converter: reflectNonDefault("button")
5109
+ })], NLDDSplitButton.prototype, "type", void 0);
5110
+ __decorate([property()], NLDDSplitButton.prototype, "href", void 0);
5111
+ __decorate([property()], NLDDSplitButton.prototype, "download", void 0);
5112
+ __decorate([property()], NLDDSplitButton.prototype, "popovertarget", void 0);
5113
+ __decorate([property({ attribute: false })], NLDDSplitButton.prototype, "popoverTargetElement", void 0);
5050
5114
  __decorate([property({
5051
5115
  reflect: true,
5052
5116
  converter: reflectNonDefault("")
@@ -5066,10 +5130,7 @@ __decorate([property({
5066
5130
  attribute: "shortcut-linux",
5067
5131
  converter: reflectNonDefault("")
5068
5132
  })], NLDDSplitButton.prototype, "shortcutLinux", void 0);
5069
- __decorate([property({ type: String })], NLDDSplitButton.prototype, "icon", void 0);
5070
5133
  __decorate([property({ type: Object })], NLDDSplitButton.prototype, "translations", void 0);
5071
- __decorate([query(".split-button__popup-button")], NLDDSplitButton.prototype, "_popupButtonWrapper", void 0);
5072
- __decorate([state()], NLDDSplitButton.prototype, "_menuIsOpen", void 0);
5073
5134
  NLDDSplitButton = __decorate([customElement("nldd-split-button")], NLDDSplitButton);
5074
5135
  // src/components/actions/button-bar/button-bar.styles.ts
5075
5136
  var buttonBarStyles = css`
@@ -5200,7 +5261,7 @@ var buttonBarStyles = css`
5200
5261
  }
5201
5262
  `;
5202
5263
  // src/components/actions/button-bar/button-bar.template.ts
5203
- function template$18() {
5264
+ function template$19() {
5204
5265
  return html`
5205
5266
  <div class="button-bar"
5206
5267
  part="bar"
@@ -5337,7 +5398,7 @@ var NLDDButtonBar = (_NLDDButtonBar = class NLDDButtonBar extends LitElement {
5337
5398
  this._building = false;
5338
5399
  }
5339
5400
  render() {
5340
- return template$18.call(this);
5401
+ return template$19.call(this);
5341
5402
  }
5342
5403
  }, _NLDDButtonBar.styles = buttonBarStyles, _NLDDButtonBar);
5343
5404
  __decorate([property({
@@ -5736,7 +5797,7 @@ var toolbarTitleStyles = css`
5736
5797
  }
5737
5798
  `;
5738
5799
  // src/components/actions/toolbar/toolbar.template.ts
5739
- function template$17(component, hasCenterChildren, leftSpacerZero, rightSpacerZero, isSoloFluidItem, hasOverflow, menuOpen, label, centerOnly, t) {
5800
+ function template$18(component, hasCenterChildren, leftSpacerZero, rightSpacerZero, isSoloFluidItem, hasOverflow, menuOpen, label, centerOnly, t) {
5740
5801
  return html`
5741
5802
  <div class="toolbar"
5742
5803
  role="toolbar"
@@ -6573,7 +6634,7 @@ var _NLDDToolbar = class NLDDToolbar extends LitElement {
6573
6634
  }
6574
6635
  render() {
6575
6636
  const isSoloFluid = this._soloFluid || fillsRowAlone(this._allHostChildren().filter((c) => !this._overflowIds.has(c.id)));
6576
- return template$17(this, this._centerChildren.length > 0, this._leftSpacerZero, this._rightSpacerZero, isSoloFluid, this._pinnedOverflowItems.length > 0 || this._overflowIds.size > 0, this._overflowMenu.open, this.accessibleLabel, this._centerOnly, (key) => this._t(key));
6637
+ return template$18(this, this._centerChildren.length > 0, this._leftSpacerZero, this._rightSpacerZero, isSoloFluid, this._pinnedOverflowItems.length > 0 || this._overflowIds.size > 0, this._overflowMenu.open, this.accessibleLabel, this._centerOnly, (key) => this._t(key));
6577
6638
  }
6578
6639
  };
6579
6640
  var NLDDToolbar = (_NLDDToolbar.styles = toolbarStyles, _NLDDToolbar);
@@ -7141,7 +7202,7 @@ var blockquoteStyles = css`
7141
7202
  }
7142
7203
  `;
7143
7204
  // src/components/content/blockquote/blockquote.template.ts
7144
- function template$16(component) {
7205
+ function template$17(component) {
7145
7206
  return html`
7146
7207
  <blockquote class="blockquote"
7147
7208
  cite=${component.cite || nothing}
@@ -7185,7 +7246,7 @@ var _NLDDBlockquote = class NLDDBlockquote extends LitElement {
7185
7246
  };
7186
7247
  }
7187
7248
  render() {
7188
- return template$16(this);
7249
+ return template$17(this);
7189
7250
  }
7190
7251
  };
7191
7252
  var NLDDBlockquote = (_NLDDBlockquote.styles = blockquoteStyles, _NLDDBlockquote);
@@ -7584,10 +7645,12 @@ function isDismissFromTitleBar(e) {
7584
7645
  * handles opening, toggling and light dismiss; this component only handles
7585
7646
  * positioning and focus.
7586
7647
  *
7587
- * The recommended use is through popovertarget, so the browser owns the toggle:
7648
+ * The recommended use is through popovertarget, so the browser owns the toggle.
7649
+ * An nldd-button, nldd-icon-button, nldd-split-button or nldd-list-item-segment
7650
+ * also positions the popover against itself, so the popover needs no `anchor`:
7588
7651
  *
7589
- * <nldd-button id="info-trigger" popovertarget="info-popover">Info</nldd-button>
7590
- * <nldd-popover id="info-popover" anchor="info-trigger" accessible-label="Info">
7652
+ * <nldd-button popovertarget="info-popover">Info</nldd-button>
7653
+ * <nldd-popover id="info-popover" accessible-label="Info">
7591
7654
  * <nldd-container>
7592
7655
  * <p>Content of the popover.</p>
7593
7656
  * </nldd-container>
@@ -10486,7 +10549,7 @@ var listStyles = css`
10486
10549
  }
10487
10550
  `;
10488
10551
  // src/components/lists-and-tables/list/list.template.ts
10489
- var template$15 = ({ itemsLabel, hasToolbar, type, isEmpty, hasItems, hasEmptyState, hasNoResultsState, listbox }) => {
10552
+ var template$16 = ({ itemsLabel, hasToolbar, type, isEmpty, hasItems, hasEmptyState, hasNoResultsState, listbox }) => {
10490
10553
  const isNavigation = type === "navigation";
10491
10554
  const isListbox = type === "listbox";
10492
10555
  const skipItemsLabel = isNavigation || isListbox;
@@ -11431,7 +11494,7 @@ var NLDDList = (_NLDDList2 = class NLDDList extends LitElement {
11431
11494
  }));
11432
11495
  }
11433
11496
  render() {
11434
- return template$15({
11497
+ return template$16({
11435
11498
  itemsLabel: this.accessibleLabel || this._t("components.list.items-accessible-label"),
11436
11499
  hasToolbar: this._hasToolbar,
11437
11500
  type: this.type,
@@ -11683,10 +11746,6 @@ var listItemStyles = css`
11683
11746
  --_list-item-background-color: var(--semantics-list-items-is-selected-background-color);
11684
11747
  --context-content-color: var(--semantics-list-items-is-selected-content-color);
11685
11748
  --context-content-secondary-color: var(--semantics-list-items-is-selected-content-color);
11686
- /* A checked control on the gray row takes the content color: the accent
11687
- can fall under 3:1 against it. */
11688
- --context-selected-indicator-color: var(--semantics-list-items-is-selected-content-color);
11689
- --context-selected-contrast-color: var(--semantics-list-items-is-selected-background-color);
11690
11749
  }
11691
11750
 
11692
11751
 
@@ -11696,8 +11755,6 @@ var listItemStyles = css`
11696
11755
  --_list-item-background-color: var(--semantics-list-items-is-selected-background-color);
11697
11756
  --context-content-color: var(--semantics-list-items-is-selected-content-color);
11698
11757
  --context-content-secondary-color: var(--semantics-list-items-is-selected-content-color);
11699
- --context-selected-indicator-color: var(--semantics-list-items-is-selected-content-color);
11700
- --context-selected-contrast-color: var(--semantics-list-items-is-selected-background-color);
11701
11758
  }
11702
11759
 
11703
11760
  /* Hover only on hover-capable devices, so a touch that turns into a scroll
@@ -11911,7 +11968,7 @@ var listItemStyles = css`
11911
11968
  // src/components/lists-and-tables/list-item/list-item.template.ts
11912
11969
  var content = html`<slot></slot>`;
11913
11970
  var divider = html`<div class="list-item__divider"></div>`;
11914
- var template$14 = (button, href, target, rel, download, linkHint, actionTabindex, isHighlighted = false, checkbox = false, radio = false, checked = false, expanded, showChildren = false, hasCheckedSegment = false, disabled = false, childrenRole = "group", childrenOpen = expanded === true, accessibleLabel = "") => {
11971
+ var template$15 = (button, href, target, rel, download, linkHint, actionTabindex, isHighlighted = false, checkbox = false, radio = false, checked = false, expanded, showChildren = false, hasCheckedSegment = false, disabled = false, childrenRole = "group", childrenOpen = expanded === true, accessibleLabel = "") => {
11915
11972
  const ariaLabel = accessibleLabel ? [accessibleLabel, linkHint].filter(Boolean).join(", ") : nothing;
11916
11973
  const ariaExpanded = expanded === void 0 ? nothing : String(expanded);
11917
11974
  const children = showChildren ? html`<div class="list-item__children"
@@ -12687,7 +12744,7 @@ var NLDDListItem = (_NLDDListItem2 = class NLDDListItem extends withTranslations
12687
12744
  if (this.href) markDownloadTarget(this, this.download, this.target);
12688
12745
  const linkHint = hintKey ? this._t(`components.list-item.${hintKey}`) : void 0;
12689
12746
  const actionTabindex = this._isListboxOption ? "-1" : this._arrowNavigation ? this._rovingActive ? "0" : "-1" : void 0;
12690
- return template$14(this.button, this.href, this.target, this.rel, this.download, linkHint, actionTabindex, this._highlighted, this.checkbox, this.radio, this.checked, this._resolvedExpanded, this._showChildren, this._hasCheckedSegment, this.disabled, this._parentType === "navigation" ? "list" : "group", this._childrenOpen, this.accessibleLabel);
12747
+ return template$15(this.button, this.href, this.target, this.rel, this.download, linkHint, actionTabindex, this._highlighted, this.checkbox, this.radio, this.checked, this._resolvedExpanded, this._showChildren, this._hasCheckedSegment, this.disabled, this._parentType === "navigation" ? "list" : "group", this._childrenOpen, this.accessibleLabel);
12691
12748
  }
12692
12749
  }, _NLDDListItem = _NLDDListItem2, _NLDDListItem2.styles = [listItemStyles], _NLDDListItem2.SIZED_CELLS = "nldd-text-cell, nldd-drag-handle-cell", _NLDDListItem2);
12693
12750
  __decorate([property({
@@ -12849,7 +12906,7 @@ var cellStyles = css`
12849
12906
  }
12850
12907
  `;
12851
12908
  // src/components/lists-and-tables/cells/cell/cell.template.ts
12852
- var template$13 = () => html`<slot></slot>`;
12909
+ var template$14 = () => html`<slot></slot>`;
12853
12910
  // src/components/lists-and-tables/cells/cell/cell.ts
12854
12911
  /**
12855
12912
  * A generic cell for wrapping arbitrary content in a list item.
@@ -12899,7 +12956,7 @@ var _NLDDCell = class NLDDCell extends RowHeaderMixin(VisibilityMixin(LitElement
12899
12956
  else this.style.removeProperty("--_cell-min-height");
12900
12957
  }
12901
12958
  render() {
12902
- return template$13();
12959
+ return template$14();
12903
12960
  }
12904
12961
  };
12905
12962
  var NLDDCell = (_NLDDCell.styles = [cellStyles], _NLDDCell);
@@ -15911,7 +15968,7 @@ var tagStyles = css`
15911
15968
  }
15912
15969
  `;
15913
15970
  // src/components/content/tag/tag.template.ts
15914
- function template$12(component) {
15971
+ function template$13(component) {
15915
15972
  const variant = component._effectiveVariant;
15916
15973
  const showIcon = variant === "icon" || variant === "icon-and-text" && component._hasIcon;
15917
15974
  const showText = (variant === "text" || variant === "icon-and-text") && component._hasText;
@@ -16009,7 +16066,7 @@ var _NLDDTag = class NLDDTag extends LitElement {
16009
16066
  setState$1(this, "unnamed", this._effectiveVariant === "icon" && !this.accessibleLabel);
16010
16067
  }
16011
16068
  render() {
16012
- return template$12(this);
16069
+ return template$13(this);
16013
16070
  }
16014
16071
  };
16015
16072
  var NLDDTag = (_NLDDTag.styles = tagStyles, _NLDDTag);
@@ -16314,7 +16371,7 @@ var textStyles = css`
16314
16371
  }
16315
16372
  `;
16316
16373
  // src/components/content/text/text.template.ts
16317
- function template$11() {
16374
+ function template$12() {
16318
16375
  return html`
16319
16376
  <slot></slot>
16320
16377
  `;
@@ -16364,7 +16421,7 @@ var _NLDDText = class NLDDText extends LitElement {
16364
16421
  this.horizontalAlignment = "left";
16365
16422
  }
16366
16423
  render() {
16367
- return template$11();
16424
+ return template$12();
16368
16425
  }
16369
16426
  };
16370
16427
  var NLDDText = (_NLDDText.styles = textStyles, _NLDDText);
@@ -17338,7 +17395,7 @@ var visuallyHiddenStyles = css`
17338
17395
  }
17339
17396
  `;
17340
17397
  // src/components/content/visually-hidden/visually-hidden.template.ts
17341
- function template$10() {
17398
+ function template$11() {
17342
17399
  return html`
17343
17400
  <slot></slot>
17344
17401
  `;
@@ -17370,7 +17427,7 @@ function template$10() {
17370
17427
  */
17371
17428
  var _NLDDVisuallyHidden = class NLDDVisuallyHidden extends LitElement {
17372
17429
  render() {
17373
- return template$10();
17430
+ return template$11();
17374
17431
  }
17375
17432
  };
17376
17433
  var NLDDVisuallyHidden = (_NLDDVisuallyHidden.styles = visuallyHiddenStyles, _NLDDVisuallyHidden);
@@ -19049,17 +19106,17 @@ var checkboxStyles = css`
19049
19106
  --_checkbox-border-width: var(--primitives-border-width-regular);
19050
19107
  --_checkbox-border-color: light-dark(var(--primitives-color-neutral-550), var(--primitives-color-neutral-650));
19051
19108
  --_checkbox-background-color: var(--semantics-surfaces-base-background-color);
19052
- --_checkbox-is-selected-border-color: var(--context-selected-indicator-color, var(--semantics-controls-is-selected-indicator-color));
19053
- --_checkbox-is-selected-background-color: var(--context-selected-indicator-color, var(--semantics-controls-is-selected-indicator-color));
19054
- --_checkbox-is-selected-icon-color: var(--context-selected-contrast-color, var(--semantics-controls-is-selected-mark-color));
19109
+ --_checkbox-is-selected-border-color: var(--semantics-controls-is-selected-indicator-color);
19110
+ --_checkbox-is-selected-background-color: var(--semantics-controls-is-selected-indicator-color);
19111
+ --_checkbox-is-selected-icon-color: var(--semantics-controls-is-selected-mark-color);
19055
19112
  --_checkbox-is-hovered-border-color: light-dark(var(--primitives-color-neutral-600), var(--primitives-color-neutral-700));
19056
- --_checkbox-is-selected-is-hovered-border-color: var(--context-selected-indicator-color, var(--semantics-controls-is-selected-is-hovered-indicator-color));
19057
- --_checkbox-is-selected-is-hovered-background-color: var(--context-selected-indicator-color, var(--semantics-controls-is-selected-is-hovered-indicator-color));
19058
- --_checkbox-is-selected-is-hovered-icon-color: var(--context-selected-contrast-color, var(--semantics-controls-is-selected-mark-color));
19113
+ --_checkbox-is-selected-is-hovered-border-color: var(--semantics-controls-is-selected-is-hovered-indicator-color);
19114
+ --_checkbox-is-selected-is-hovered-background-color: var(--semantics-controls-is-selected-is-hovered-indicator-color);
19115
+ --_checkbox-is-selected-is-hovered-icon-color: var(--semantics-controls-is-selected-mark-color);
19059
19116
  --_checkbox-is-active-border-color: light-dark(var(--primitives-color-neutral-650), var(--primitives-color-neutral-750));
19060
- --_checkbox-is-selected-is-active-border-color: var(--context-selected-indicator-color, var(--semantics-controls-is-selected-is-active-indicator-color));
19061
- --_checkbox-is-selected-is-active-background-color: var(--context-selected-indicator-color, var(--semantics-controls-is-selected-is-active-indicator-color));
19062
- --_checkbox-is-selected-is-active-icon-color: var(--context-selected-contrast-color, var(--semantics-controls-is-selected-mark-color));
19117
+ --_checkbox-is-selected-is-active-border-color: var(--semantics-controls-is-selected-is-active-indicator-color);
19118
+ --_checkbox-is-selected-is-active-background-color: var(--semantics-controls-is-selected-is-active-indicator-color);
19119
+ --_checkbox-is-selected-is-active-icon-color: var(--semantics-controls-is-selected-mark-color);
19063
19120
 
19064
19121
  display: inline-flex;
19065
19122
  position: relative;
@@ -19251,11 +19308,6 @@ function checkboxTemplate(component) {
19251
19308
  /**
19252
19309
  * Nederlandse Digitale Dienst Checkbox Component (Lit + TypeScript)
19253
19310
  *
19254
- * On a selected row of nldd-list-item a checked control takes the colors of the
19255
- * row: the row sets `--context-selected-indicator-color` and
19256
- * `--context-selected-contrast-color`, because the accent can fall below 3:1 on
19257
- * the gray of a selected row.
19258
- *
19259
19311
  * @element nldd-checkbox
19260
19312
  * @attr {boolean} checked - Checked state
19261
19313
  * @attr {boolean} disabled - Disabled state
@@ -21613,6 +21665,12 @@ var codeEditorStyles = css`
21613
21665
 
21614
21666
  .code-editor .cm-editor {
21615
21667
  isolation: isolate;
21668
+ border-radius: inherit;
21669
+ }
21670
+
21671
+ /* The scroller clips the gutter to the rounded frame. */
21672
+ :host .cm-scroller {
21673
+ border-radius: inherit;
21616
21674
  }
21617
21675
 
21618
21676
  :host([disabled]) .code-editor {
@@ -25560,10 +25618,10 @@ var fileFieldStyles = css`
25560
25618
  flex-grow: 1;
25561
25619
  align-self: stretch;
25562
25620
  align-items: center;
25563
- justify-content: center;
25621
+ justify-content: flex-start;
25564
25622
  color: inherit;
25565
25623
  font: inherit;
25566
- text-align: center;
25624
+ text-align: start;
25567
25625
  }
25568
25626
 
25569
25627
  .file-field:not([class*="is-drag-"]) > .file-field__choose-button:hover {
@@ -25598,11 +25656,6 @@ var fileFieldStyles = css`
25598
25656
  outline: none;
25599
25657
  }
25600
25658
 
25601
- :host([valid]) .file-field:not(.file-field--area) :is(.file-field__choose-button, .file-field__replace-area),
25602
- :host([invalid]) .file-field:not(.file-field--area) :is(.file-field__choose-button, .file-field__replace-area) {
25603
- padding-left: calc(var(--_file-field-validation-icon-size) + var(--_file-field-validation-icon-area-padding-right));
25604
- }
25605
-
25606
25659
  .file-field__text,
25607
25660
  .file-field__value {
25608
25661
  display: grid;
@@ -25656,7 +25709,8 @@ var fileFieldStyles = css`
25656
25709
  font: var(--_file-field-choose-text-font);
25657
25710
  }
25658
25711
 
25659
- .file-field__file-icon {
25712
+ .file-field__file-icon,
25713
+ .file-field__upload-icon {
25660
25714
  flex-shrink: 0;
25661
25715
  margin-left: var(--_file-field-inline-padding);
25662
25716
  width: var(--_file-field-file-icon-size);
@@ -25664,6 +25718,14 @@ var fileFieldStyles = css`
25664
25718
  color: var(--semantics-content-color);
25665
25719
  }
25666
25720
 
25721
+ .file-field__upload-icon {
25722
+ color: var(--_file-field-accepted-types-color);
25723
+ }
25724
+
25725
+ .file-field:not(.file-field--area) .file-field__upload-icon + .file-field__text {
25726
+ padding-left: var(--_file-field-file-icon-gap);
25727
+ }
25728
+
25667
25729
  .file-field:not(.file-field--area) .file-field__chosen-file {
25668
25730
  @container file-field-chosen-area (max-width: 14.9375rem) {
25669
25731
  .file-field__file-icon {
@@ -25744,7 +25806,7 @@ var fileFieldStyles = css`
25744
25806
  display: flex;
25745
25807
  height: 1lh;
25746
25808
  align-items: center;
25747
- justify-content: center;
25809
+ justify-content: flex-start;
25748
25810
  }
25749
25811
 
25750
25812
  .file-field__drop-hint-text {
@@ -25897,16 +25959,12 @@ var fileFieldStyles = css`
25897
25959
  height: var(--_file-field-area-icon-size);
25898
25960
  }
25899
25961
 
25900
- .file-field--area .file-field__upload-icon {
25901
- color: var(--_file-field-accepted-types-color);
25902
- }
25903
-
25904
- .file-field--area.is-drag-over :is(.file-field__upload-icon, .file-field__accepted-types) {
25962
+ .file-field.is-drag-over :is(.file-field__upload-icon, .file-field__accepted-types) {
25905
25963
  color: var(--_file-field-choose-text-color);
25906
25964
  }
25907
25965
 
25908
- .file-field--area.is-drag-rejected :is(.file-field__upload-icon, .file-field__accepted-types),
25909
- .file-field--area.is-refused .file-field__upload-icon {
25966
+ .file-field.is-drag-rejected :is(.file-field__upload-icon, .file-field__accepted-types),
25967
+ .file-field.is-refused .file-field__upload-icon {
25910
25968
  color: var(--_file-field-rejected-color);
25911
25969
  }
25912
25970
 
@@ -25923,7 +25981,7 @@ var fileFieldStyles = css`
25923
25981
  display: none;
25924
25982
  }
25925
25983
 
25926
- .file-field--area :is(.file-field__name, .file-field__folder) {
25984
+ .file-field--area :is(.file-field__name, .file-field__folder, .file-field__reading-text) {
25927
25985
  justify-content: center;
25928
25986
  }
25929
25987
 
@@ -26285,7 +26343,7 @@ function renderEmpty(component) {
26285
26343
  }],
26286
26344
  ...reservedVariants(component)
26287
26345
  ]);
26288
- const icon = area ? html`<nldd-icon class="file-field__upload-icon" icon="upload-to-cloud" aria-hidden="true"></nldd-icon>` : nothing;
26346
+ const icon = html`<nldd-icon class="file-field__upload-icon" icon="upload-to-cloud" aria-hidden="true"></nldd-icon>`;
26289
26347
  const buttons = buttonGroup && !refused ? renderChooseButtonGroup(component) : nothing;
26290
26348
  const accepted = types ? html`<span class="file-field__accepted-types">${component._t("components.file-field.accepted-types-text", { types })}</span>` : nothing;
26291
26349
  const content = area && reading ? html`${renderReadingIndicator(component)}${renderValidationIcon$5(component)}` : html`${icon}${buttons}${stack}${accepted}${renderValidationIcon$5(component)}`;
@@ -26433,6 +26491,7 @@ function renderChosen(component) {
26433
26491
  icon="dismiss"
26434
26492
  text=${component._t("components.file-field.clear-action")}
26435
26493
  accessible-label=${component._clearAccessibleLabel()}
26494
+ tooltip-timing="never"
26436
26495
  ?disabled=${component.disabled}
26437
26496
  @click=${component._handleClear}
26438
26497
  ></nldd-icon-button>
@@ -26445,7 +26504,7 @@ function renderChosen(component) {
26445
26504
  "file-field__replace-area": true,
26446
26505
  "is-active": replaced
26447
26506
  })}>
26448
- ${area ? html`<nldd-icon class="file-field__upload-icon" icon="upload-to-cloud" aria-hidden="true"></nldd-icon>` : nothing}
26507
+ <nldd-icon class="file-field__upload-icon" icon="upload-to-cloud" aria-hidden="true"></nldd-icon>
26449
26508
  ${renderStack("text", [...drags, ...reservedVariants(component)])}
26450
26509
  ${renderValidationIcon$5(component)}
26451
26510
  </div>
@@ -28361,8 +28420,8 @@ function renderValidationIcon$3(component) {
28361
28420
  }
28362
28421
  function renderVisibilityToggle(component) {
28363
28422
  const buttonSize = component.size === "sm" ? "xs" : "sm";
28364
- const label = component.masked ? component.showButtonText : component.hideButtonText;
28365
- const accessibleLabel = component.masked ? component.showButtonAccessibleLabel : component.hideButtonAccessibleLabel;
28423
+ const label = component._t(component.masked ? "components.password-field.show-action" : "components.password-field.hide-action");
28424
+ const accessibleLabel = component._t(component.masked ? "components.password-field.show-accessible-label" : "components.password-field.hide-accessible-label");
28366
28425
  return html`
28367
28426
  <div class="password-field__visibility-toggle-button">
28368
28427
  <nldd-button
@@ -28422,10 +28481,7 @@ function passwordFieldTemplate(component) {
28422
28481
  * @attr {boolean} invalid - Marks the field as invalid
28423
28482
  * @attr {boolean} disabled - Disabled state
28424
28483
  * @attr {boolean} masked - Whether the password is masked (default: true)
28425
- * @attr {string} show-button-text - Visible toggle button text when masked (default: 'Toon')
28426
- * @attr {string} hide-button-text - Visible toggle button text when unmasked (default: 'Verberg')
28427
- * @attr {string} show-button-accessible-label - aria-label for toggle when masked (default: 'Toon wachtwoord')
28428
- * @attr {string} hide-button-accessible-label - aria-label for toggle when unmasked (default: 'Verberg wachtwoord')
28484
+ * @attr {object} translations - Override translation keys; unset keys fall back to Dutch
28429
28485
  * @attr {boolean} readonly - Readonly state
28430
28486
  * @attr {boolean} required - Required state
28431
28487
  * @attr {string} name - Input name for form submission
@@ -28451,10 +28507,7 @@ var _NLDDPasswordField = class NLDDPasswordField extends DescribedBy(FormAssocia
28451
28507
  this.invalid = false;
28452
28508
  this.disabled = false;
28453
28509
  this.masked = true;
28454
- this.showButtonText = "Toon";
28455
- this.hideButtonText = "Verberg";
28456
- this.showButtonAccessibleLabel = "Toon wachtwoord";
28457
- this.hideButtonAccessibleLabel = "Verberg wachtwoord";
28510
+ this.translations = {};
28458
28511
  this.readonly = false;
28459
28512
  this.required = false;
28460
28513
  this.name = "";
@@ -28482,6 +28535,9 @@ var _NLDDPasswordField = class NLDDPasswordField extends DescribedBy(FormAssocia
28482
28535
  formStateRestoreCallback(state) {
28483
28536
  if (typeof state === "string") this.value = state;
28484
28537
  }
28538
+ _t(key) {
28539
+ return translate(this.translations, nlddPasswordFieldTranslations, key);
28540
+ }
28485
28541
  /** Enter submits the form this field belongs to, the way the browser would
28486
28542
  * if the input were not in a shadow root. */
28487
28543
  _handleKeydown(e) {
@@ -28555,22 +28611,7 @@ __decorate([property({
28555
28611
  type: Boolean,
28556
28612
  reflect: true
28557
28613
  })], NLDDPasswordField.prototype, "masked", void 0);
28558
- __decorate([property({
28559
- type: String,
28560
- attribute: "show-button-text"
28561
- })], NLDDPasswordField.prototype, "showButtonText", void 0);
28562
- __decorate([property({
28563
- type: String,
28564
- attribute: "hide-button-text"
28565
- })], NLDDPasswordField.prototype, "hideButtonText", void 0);
28566
- __decorate([property({
28567
- type: String,
28568
- attribute: "show-button-accessible-label"
28569
- })], NLDDPasswordField.prototype, "showButtonAccessibleLabel", void 0);
28570
- __decorate([property({
28571
- type: String,
28572
- attribute: "hide-button-accessible-label"
28573
- })], NLDDPasswordField.prototype, "hideButtonAccessibleLabel", void 0);
28614
+ __decorate([property({ type: Object })], NLDDPasswordField.prototype, "translations", void 0);
28574
28615
  __decorate([property({
28575
28616
  type: Boolean,
28576
28617
  reflect: true
@@ -28620,17 +28661,17 @@ var radioButtonStyles = css`
28620
28661
  --_radio-button-border-color: light-dark(var(--primitives-color-neutral-550), var(--primitives-color-neutral-650));
28621
28662
  --_radio-button-background-color: var(--semantics-surfaces-base-background-color);
28622
28663
  --_radio-button-is-selected-inner-shape-border-width: var(--primitives-border-width-regular);
28623
- --_radio-button-is-selected-inner-shape-border-color: var(--context-selected-contrast-color, var(--semantics-controls-is-selected-mark-color));
28624
- --_radio-button-is-selected-border-color: var(--context-selected-indicator-color, var(--semantics-controls-is-selected-indicator-color));
28625
- --_radio-button-is-selected-background-color: var(--context-selected-indicator-color, var(--semantics-controls-is-selected-indicator-color));
28664
+ --_radio-button-is-selected-inner-shape-border-color: var(--semantics-controls-is-selected-mark-color);
28665
+ --_radio-button-is-selected-border-color: var(--semantics-controls-is-selected-indicator-color);
28666
+ --_radio-button-is-selected-background-color: var(--semantics-controls-is-selected-indicator-color);
28626
28667
  --_radio-button-is-hovered-border-color: light-dark(var(--primitives-color-neutral-600), var(--primitives-color-neutral-700));
28627
- --_radio-button-is-selected-is-hovered-border-color: var(--context-selected-indicator-color, var(--semantics-controls-is-selected-is-hovered-indicator-color));
28628
- --_radio-button-is-selected-is-hovered-background-color: var(--context-selected-indicator-color, var(--semantics-controls-is-selected-is-hovered-indicator-color));
28629
- --_radio-button-is-selected-is-hovered-inner-shape-border-color: var(--context-selected-contrast-color, var(--semantics-controls-is-selected-mark-color));
28668
+ --_radio-button-is-selected-is-hovered-border-color: var(--semantics-controls-is-selected-is-hovered-indicator-color);
28669
+ --_radio-button-is-selected-is-hovered-background-color: var(--semantics-controls-is-selected-is-hovered-indicator-color);
28670
+ --_radio-button-is-selected-is-hovered-inner-shape-border-color: var(--semantics-controls-is-selected-mark-color);
28630
28671
  --_radio-button-is-active-border-color: light-dark(var(--primitives-color-neutral-650), var(--primitives-color-neutral-750));
28631
- --_radio-button-is-selected-is-active-border-color: var(--context-selected-indicator-color, var(--semantics-controls-is-selected-is-active-indicator-color));
28632
- --_radio-button-is-selected-is-active-background-color: var(--context-selected-indicator-color, var(--semantics-controls-is-selected-is-active-indicator-color));
28633
- --_radio-button-is-selected-is-active-inner-shape-border-color: var(--context-selected-contrast-color, var(--semantics-controls-is-selected-mark-color));
28672
+ --_radio-button-is-selected-is-active-border-color: var(--semantics-controls-is-selected-is-active-indicator-color);
28673
+ --_radio-button-is-selected-is-active-background-color: var(--semantics-controls-is-selected-is-active-indicator-color);
28674
+ --_radio-button-is-selected-is-active-inner-shape-border-color: var(--semantics-controls-is-selected-mark-color);
28634
28675
 
28635
28676
  display: inline-flex;
28636
28677
  position: relative;
@@ -28914,11 +28955,6 @@ var RadioGrouping = class RadioGrouping {
28914
28955
  * <nldd-radio-button name="options" value="2" accessible-label="Optie 2"></nldd-radio-button>
28915
28956
  * </fieldset>
28916
28957
  *
28917
- * On a selected row of nldd-list-item a checked control takes the colors of the
28918
- * row: the row sets `--context-selected-indicator-color` and
28919
- * `--context-selected-contrast-color`, because the accent can fall below 3:1 on
28920
- * the gray of a selected row.
28921
- *
28922
28958
  * @element nldd-radio-button
28923
28959
  * @attr {boolean} checked - Checked state
28924
28960
  * @attr {boolean} disabled - Disabled state
@@ -30981,6 +31017,617 @@ __decorate([property({
30981
31017
  attribute: "accessible-labeled-by"
30982
31018
  })], NLDDSegmentedControl.prototype, "accessibleLabeledBy", void 0);
30983
31019
  NLDDSegmentedControl = _NLDDSegmentedControl = __decorate([customElement("nldd-segmented-control")], NLDDSegmentedControl);
31020
+ // src/components/inputs/swatch-picker/swatch-picker.styles.ts
31021
+ var swatchPickerStyles = css`
31022
+
31023
+
31024
+ /* # Host */
31025
+
31026
+ :host {
31027
+ --_swatch-picker-gap: var(--primitives-space-8);
31028
+
31029
+ box-sizing: border-box;
31030
+ display: block;
31031
+ }
31032
+
31033
+ :host([size="xs"]),
31034
+ :host([size="sm"]) {
31035
+ --_swatch-picker-gap: var(--primitives-space-6);
31036
+ }
31037
+
31038
+ :host([hidden]) {
31039
+ display: none;
31040
+ }
31041
+
31042
+
31043
+ /* # Block */
31044
+
31045
+ .swatch-picker {
31046
+ display: flex;
31047
+ flex-wrap: wrap;
31048
+ gap: var(--_swatch-picker-gap);
31049
+ }
31050
+ `;
31051
+ var swatchPickerItemStyles = css`
31052
+
31053
+
31054
+ /* # Host */
31055
+
31056
+ :host {
31057
+ --_swatch-picker-item-size: var(--semantics-controls-md-min-size);
31058
+ --_swatch-picker-item-custom-color: transparent;
31059
+ --_swatch-picker-item-background-color: var(--_swatch-picker-item-custom-color);
31060
+ --_swatch-picker-item-highlight-border-width: var(--primitives-border-width-thin);
31061
+ --_swatch-picker-item-highlight-border-color: light-dark(rgba(0, 0, 0, 0.15), rgba(255, 255, 255, 0.20));
31062
+ --_swatch-picker-item-indicator-size: 60%;
31063
+ --_swatch-picker-item-indicator-background-color: light-dark(rgba(255, 255, 255, 0.90), rgba(0, 0, 0, 0.60));
31064
+ --_swatch-picker-item-indicator-icon-size: 88%;
31065
+ --_swatch-picker-item-indicator-content-color: var(--primitives-color-neutral-1000);
31066
+ --context-tooltip-fingertip-size: var(--semantics-fingertip-size);
31067
+
31068
+ box-sizing: border-box;
31069
+ display: inline-flex;
31070
+ border-radius: 50%;
31071
+ outline: none;
31072
+ -webkit-tap-highlight-color: transparent;
31073
+ }
31074
+
31075
+ :host([size="xs"]) {
31076
+ --_swatch-picker-item-size: var(--semantics-controls-xs-min-size);
31077
+ --_swatch-picker-item-indicator-icon-size: 100%;
31078
+ }
31079
+
31080
+ :host([size="sm"]) {
31081
+ --_swatch-picker-item-size: var(--semantics-controls-sm-min-size);
31082
+ --_swatch-picker-item-indicator-icon-size: 94%;
31083
+ }
31084
+
31085
+ :host([color="lintblauw"]) { --_swatch-picker-item-background-color: var(--semantics-categories-lintblauw-filled-background-color); }
31086
+ :host([color="donkerblauw"]) { --_swatch-picker-item-background-color: var(--semantics-categories-donkerblauw-filled-background-color); }
31087
+ :host([color="hemelblauw"]) { --_swatch-picker-item-background-color: var(--semantics-categories-hemelblauw-filled-background-color); }
31088
+ :host([color="lichtblauw"]) { --_swatch-picker-item-background-color: var(--semantics-categories-lichtblauw-filled-background-color); }
31089
+ :host([color="paars"]) { --_swatch-picker-item-background-color: var(--semantics-categories-paars-filled-background-color); }
31090
+ :host([color="violet"]) { --_swatch-picker-item-background-color: var(--semantics-categories-violet-filled-background-color); }
31091
+ :host([color="robijnrood"]) { --_swatch-picker-item-background-color: var(--semantics-categories-robijnrood-filled-background-color); }
31092
+ :host([color="roze"]) { --_swatch-picker-item-background-color: var(--semantics-categories-roze-filled-background-color); }
31093
+ :host([color="rood"]) { --_swatch-picker-item-background-color: var(--semantics-categories-rood-filled-background-color); }
31094
+ :host([color="oranje"]) { --_swatch-picker-item-background-color: var(--semantics-categories-oranje-filled-background-color); }
31095
+ :host([color="donkergeel"]) { --_swatch-picker-item-background-color: var(--semantics-categories-donkergeel-filled-background-color); }
31096
+ :host([color="geel"]) { --_swatch-picker-item-background-color: var(--semantics-categories-geel-filled-background-color); }
31097
+ :host([color="donkerbruin"]) { --_swatch-picker-item-background-color: var(--semantics-categories-donkerbruin-filled-background-color); }
31098
+ :host([color="bruin"]) { --_swatch-picker-item-background-color: var(--semantics-categories-bruin-filled-background-color); }
31099
+ :host([color="donkergroen"]) { --_swatch-picker-item-background-color: var(--semantics-categories-donkergroen-filled-background-color); }
31100
+ :host([color="groen"]) { --_swatch-picker-item-background-color: var(--semantics-categories-groen-filled-background-color); }
31101
+ :host([color="mosgroen"]) { --_swatch-picker-item-background-color: var(--semantics-categories-mosgroen-filled-background-color); }
31102
+ :host([color="mintgroen"]) { --_swatch-picker-item-background-color: var(--semantics-categories-mintgroen-filled-background-color); }
31103
+
31104
+ :host([hidden]) {
31105
+ display: none;
31106
+ }
31107
+
31108
+ :host([disabled]) {
31109
+ opacity: var(--primitives-opacity-disabled);
31110
+ pointer-events: none;
31111
+ }
31112
+
31113
+
31114
+ /* # Block */
31115
+
31116
+ .swatch-picker__item {
31117
+ box-sizing: border-box;
31118
+ display: block;
31119
+ position: relative;
31120
+ border-radius: 50%;
31121
+ background-color: var(--_swatch-picker-item-background-color);
31122
+ width: var(--_swatch-picker-item-size);
31123
+ height: var(--_swatch-picker-item-size);
31124
+ overflow: hidden;
31125
+ forced-color-adjust: none;
31126
+ }
31127
+
31128
+ .swatch-picker__item::after {
31129
+ content: '';
31130
+ position: absolute;
31131
+ inset: 0;
31132
+ border-radius: inherit;
31133
+ box-shadow: inset 0 0 0 var(--_swatch-picker-item-highlight-border-width) var(--_swatch-picker-item-highlight-border-color);
31134
+ pointer-events: none;
31135
+ }
31136
+
31137
+ :host(:focus-visible) .swatch-picker__item {
31138
+ outline: var(--semantics-focus-ring-outline);
31139
+ outline-offset: var(--semantics-focus-ring-outline-offset);
31140
+ box-shadow: var(--semantics-focus-ring-box-shadow);
31141
+ }
31142
+
31143
+ @media (forced-colors: active) {
31144
+ :host(:focus-visible) .swatch-picker__item {
31145
+ outline: 2px solid Highlight;
31146
+ outline-offset: 2px;
31147
+ }
31148
+ }
31149
+
31150
+
31151
+ /* # Image */
31152
+
31153
+ .swatch-picker__item-image {
31154
+ display: block;
31155
+ position: absolute;
31156
+ inset: 0;
31157
+ border-radius: inherit;
31158
+ width: 100%;
31159
+ height: 100%;
31160
+ object-fit: cover;
31161
+ }
31162
+
31163
+
31164
+ /* # Indicator */
31165
+
31166
+ .swatch-picker__item-indicator {
31167
+ display: flex;
31168
+ position: absolute;
31169
+ top: 50%;
31170
+ left: 50%;
31171
+ visibility: hidden;
31172
+ z-index: 1;
31173
+ border-radius: 50%;
31174
+ box-shadow: 0 0 0 var(--_swatch-picker-item-highlight-border-width) var(--_swatch-picker-item-highlight-border-color);
31175
+ background-color: var(--_swatch-picker-item-indicator-background-color);
31176
+ width: var(--_swatch-picker-item-indicator-size);
31177
+ height: var(--_swatch-picker-item-indicator-size);
31178
+ align-items: center;
31179
+ justify-content: center;
31180
+ color: var(--_swatch-picker-item-indicator-content-color);
31181
+ transform: translate(-50%, -50%);
31182
+ }
31183
+
31184
+ :host([selected]) .swatch-picker__item-indicator {
31185
+ visibility: visible;
31186
+ }
31187
+
31188
+ .swatch-picker__item-indicator-icon {
31189
+ display: flex;
31190
+ width: var(--_swatch-picker-item-indicator-icon-size);
31191
+ height: var(--_swatch-picker-item-indicator-icon-size);
31192
+ }
31193
+ `;
31194
+ // src/components/inputs/swatch-picker/swatch-picker.template.ts
31195
+ function swatchPickerTemplate(component) {
31196
+ return html`
31197
+ <input class="swatch-picker__validation-input"
31198
+ type="radio"
31199
+ name="nldd-validation"
31200
+ hidden
31201
+ ?required=${component.required}
31202
+ ?disabled=${component.disabled}
31203
+ .checked=${!!component.value}
31204
+ >
31205
+ <div class="swatch-picker">
31206
+ <slot @slotchange=${component._onSlotChange}></slot>
31207
+ </div>
31208
+ `;
31209
+ }
31210
+ function swatchPickerItemTemplate(component) {
31211
+ return html`
31212
+ <nldd-tooltip
31213
+ text=${component._name || nothing}
31214
+ placement="top"
31215
+ timing="instant"
31216
+ >
31217
+ <span class="swatch-picker__item">
31218
+ ${component.image ? html`<img class="swatch-picker__item-image" src=${component.image} srcset=${component.imageSrcset || nothing} alt="">` : nothing}
31219
+ <span class="swatch-picker__item-indicator"
31220
+ aria-hidden="true"
31221
+ >
31222
+ <span class="swatch-picker__item-indicator-icon">
31223
+ <nldd-icon icon="check-mark-small"></nldd-icon>
31224
+ </span>
31225
+ </span>
31226
+ </span>
31227
+ </nldd-tooltip>
31228
+ `;
31229
+ }
31230
+ // src/components/inputs/swatch-picker/swatch-picker.ts
31231
+ /**
31232
+ * Nederlandse Digitale Dienst Swatch Picker Component (Lit + TypeScript)
31233
+ *
31234
+ * A row of swatches to choose one from: a color, or an image of a pattern or a
31235
+ * material. The row wraps onto the next line when the swatches do not fit.
31236
+ *
31237
+ * It is a radio group: Tab enters and leaves it in one stop, the arrow keys
31238
+ * choose, and the value goes with a form under `name`. The chosen swatch shows
31239
+ * a check mark. Put it in an `nldd-form-field`, which names the group.
31240
+ *
31241
+ * Every swatch needs a name, since a color or an image says nothing to a screen
31242
+ * reader. A swatch with a category `color` takes the name of that color from
31243
+ * the translations ("Rood"); one with a `custom-color` or an `image` has to say
31244
+ * it in `text`. The name shows as a tooltip.
31245
+ *
31246
+ * Exports both NLDDSwatchPicker and NLDDSwatchPickerItem.
31247
+ *
31248
+ * @element nldd-swatch-picker
31249
+ * @attr {string} size - Swatch size, on the control scale: 'xs' (24px) | 'sm' (32px) | 'md' (44px) (default: 'md')
31250
+ * @attr {string} accessible-label - Accessible name for the group, set as aria-label. In an nldd-form-field the field names it.
31251
+ * @attr {string} accessible-labeled-by - Id of an external label element, set as aria-labelledby on the group
31252
+ * @attr {boolean} invalid - Marks the group as invalid. Announced with aria-invalid; nothing is drawn for it.
31253
+ * @attr {boolean} disabled - Disabled state for all swatches
31254
+ * @attr {string} name - Name for form submission
31255
+ * @attr {string} value - Value of the chosen swatch
31256
+ * @attr {boolean} required - Something has to be chosen
31257
+ *
31258
+ * @fires change - When the choice changes; detail: { value: string }
31259
+ *
31260
+ * @slot - nldd-swatch-picker-item elements
31261
+ *
31262
+ * ---
31263
+ *
31264
+ * @element nldd-swatch-picker-item
31265
+ * @attr {string} color - Category color: 'lintblauw' | 'donkerblauw' | 'hemelblauw' | 'lichtblauw' | 'paars' | 'violet' | 'robijnrood' | 'roze' | 'rood' | 'oranje' | 'donkergeel' | 'geel' | 'donkerbruin' | 'bruin' | 'donkergroen' | 'groen' | 'mosgroen' | 'mintgroen'. Brings its name along, so `text` is optional.
31266
+ * @attr {string} custom-color - Any CSS color of your own (e.g. '#7a1f3d' or 'var(--brand-color)'), for a color outside the categories. Needs `text`.
31267
+ * @attr {string} image - URL of an image that fills the swatch, for a pattern or a material. Needs `text`.
31268
+ * @attr {string} image-srcset - Sources of the image at other pixel densities, with x descriptors (e.g. '/oak.jpg 1x, /oak@2x.jpg 2x'). The swatch has a fixed size, so there are no widths to choose from.
31269
+ * @attr {string} text - Name of the swatch, for screen readers and the tooltip. Overrides the name of a category `color`.
31270
+ * @attr {boolean} selected - Whether this swatch is chosen (set by the picker)
31271
+ * @attr {boolean} disabled - Disabled state
31272
+ * @attr {string} value - Value for this swatch
31273
+ * @attr {string} size - Swatch size: 'xs' | 'sm' | 'md' (set by the picker, default: 'md')
31274
+ * @attr {object} translations - Override translation keys (the names of the category colors); unset keys fall back to Dutch.
31275
+ */
31276
+ var _NLDDSwatchPickerItem;
31277
+ var _NLDDSwatchPicker;
31278
+ /** How long the name stays after a tap, in ms. */
31279
+ var NAME_AFTER_TAP_MS = 1500;
31280
+ var NLDDSwatchPickerItem = (_NLDDSwatchPickerItem = class NLDDSwatchPickerItem extends withTranslations(LitElement, nlddSwatchPickerItemTranslations) {
31281
+ constructor(..._args) {
31282
+ super(..._args);
31283
+ this.color = "";
31284
+ this.customColor = "";
31285
+ this.image = "";
31286
+ this.imageSrcset = "";
31287
+ this.text = "";
31288
+ this.selected = false;
31289
+ this.disabled = false;
31290
+ this.value = "";
31291
+ this.size = "md";
31292
+ this._groupPosition = null;
31293
+ this._appliedLabel = null;
31294
+ this._nameTimer = 0;
31295
+ this._pointerType = "";
31296
+ this._onFocus = () => {
31297
+ this._tooltip?._handleFocusIn();
31298
+ };
31299
+ this._onBlur = () => {
31300
+ this._tooltip?._handleTriggerLeave();
31301
+ };
31302
+ this._onClick = () => {
31303
+ this._select();
31304
+ this._showName();
31305
+ };
31306
+ this._onPointerDown = (e) => {
31307
+ this._pointerType = e.pointerType;
31308
+ if (e.pointerType !== "touch") this._showName();
31309
+ };
31310
+ this._onPointerLeave = (e) => {
31311
+ if (e.pointerType !== "touch") this._hideName();
31312
+ };
31313
+ this._onScroll = () => {
31314
+ this._hideName();
31315
+ };
31316
+ this._onKeyDown = (e) => {
31317
+ if (this.disabled) return;
31318
+ if (e.key === " ") {
31319
+ e.preventDefault();
31320
+ this._select();
31321
+ }
31322
+ };
31323
+ }
31324
+ /** The name of the swatch: its own text, or that of its category color. */
31325
+ get _name() {
31326
+ if (this.text) return this.text;
31327
+ if (!this.color) return "";
31328
+ return this._t(`components.swatch-picker-item.${this.color}-text`);
31329
+ }
31330
+ connectedCallback() {
31331
+ super.connectedCallback();
31332
+ this.addEventListener("pointerdown", this._onPointerDown);
31333
+ this.addEventListener("pointerleave", this._onPointerLeave);
31334
+ this.addEventListener("click", this._onClick);
31335
+ this.addEventListener("keydown", this._onKeyDown);
31336
+ this.addEventListener("focus", this._onFocus);
31337
+ this.addEventListener("blur", this._onBlur);
31338
+ }
31339
+ disconnectedCallback() {
31340
+ super.disconnectedCallback();
31341
+ this.removeEventListener("pointerdown", this._onPointerDown);
31342
+ this.removeEventListener("pointerleave", this._onPointerLeave);
31343
+ this.removeEventListener("click", this._onClick);
31344
+ this.removeEventListener("keydown", this._onKeyDown);
31345
+ this.removeEventListener("focus", this._onFocus);
31346
+ this.removeEventListener("blur", this._onBlur);
31347
+ this._hideName();
31348
+ }
31349
+ updated(changedProperties) {
31350
+ if (changedProperties.has("customColor")) {
31351
+ if (this.customColor && CSS.supports("color", this.customColor)) this.style.setProperty("--_swatch-picker-item-custom-color", this.customColor);
31352
+ else this.style.removeProperty("--_swatch-picker-item-custom-color");
31353
+ }
31354
+ this._syncAria();
31355
+ }
31356
+ /**
31357
+ * The swatch is the radio itself. A native radio in a shadow root of its own
31358
+ * is a group of one: a screen reader counts it as "1 of 1" and Tab stops at
31359
+ * every option. The role on the element puts the group back in one tree,
31360
+ * under the radiogroup the picker carries.
31361
+ */
31362
+ _syncAria() {
31363
+ this.setAttribute("role", "radio");
31364
+ this.setAttribute("aria-checked", String(this.selected));
31365
+ this._appliedLabel = setOwnedAttribute(this, "aria-label", this._name, this._appliedLabel);
31366
+ if (this.disabled) this.setAttribute("aria-disabled", "true");
31367
+ else this.removeAttribute("aria-disabled");
31368
+ const position = this._groupPosition;
31369
+ if (position) {
31370
+ this.setAttribute("aria-posinset", String(position.posInSet));
31371
+ this.setAttribute("aria-setsize", String(position.setSize));
31372
+ } else {
31373
+ this.removeAttribute("aria-posinset");
31374
+ this.removeAttribute("aria-setsize");
31375
+ }
31376
+ const tabbable = !this.disabled && position?.tabbable !== false;
31377
+ this.setAttribute("tabindex", tabbable ? "0" : "-1");
31378
+ }
31379
+ /** The tooltip, which shows itself when focus moves into it. The focus is on
31380
+ * this element, outside it, so it hears about focus from here. */
31381
+ get _tooltip() {
31382
+ return this.shadowRoot?.querySelector("nldd-tooltip") ?? null;
31383
+ }
31384
+ /** Chosen, the way a click, the space bar or an arrow key in the group does
31385
+ * it. A radio never unchecks itself, so a chosen swatch says nothing.
31386
+ *
31387
+ * @internal */
31388
+ _select() {
31389
+ if (this.disabled || this.selected) return;
31390
+ this.dispatchEvent(new CustomEvent("item-change", {
31391
+ detail: { value: this.value },
31392
+ bubbles: true,
31393
+ composed: true
31394
+ }));
31395
+ }
31396
+ /**
31397
+ * Keeps the name in view after a click or a tap: a click hides a tooltip,
31398
+ * and a tap never shows one, while the name is the only label a swatch has.
31399
+ * After a click it stays until the pointer leaves the swatch. After a tap it
31400
+ * stays a moment, clear of the finger.
31401
+ */
31402
+ _showName() {
31403
+ const tooltip = this._tooltip;
31404
+ if (!tooltip || !this._name) return;
31405
+ tooltip.open = true;
31406
+ clearTimeout(this._nameTimer);
31407
+ this._nameTimer = this._pointerType === "touch" ? window.setTimeout(() => this._hideName(), NAME_AFTER_TAP_MS) : 0;
31408
+ document.addEventListener("scroll", this._onScroll, {
31409
+ capture: true,
31410
+ passive: true
31411
+ });
31412
+ }
31413
+ _hideName() {
31414
+ document.removeEventListener("scroll", this._onScroll, { capture: true });
31415
+ clearTimeout(this._nameTimer);
31416
+ this._nameTimer = 0;
31417
+ const tooltip = this._tooltip;
31418
+ if (tooltip) tooltip.open = false;
31419
+ }
31420
+ focus(options) {
31421
+ if (deferFocus(this, options)) return;
31422
+ super.focus(options);
31423
+ }
31424
+ render() {
31425
+ return swatchPickerItemTemplate(this);
31426
+ }
31427
+ }, _NLDDSwatchPickerItem.styles = swatchPickerItemStyles, _NLDDSwatchPickerItem);
31428
+ __decorate([property({
31429
+ reflect: true,
31430
+ converter: reflectNonDefault("")
31431
+ })], NLDDSwatchPickerItem.prototype, "color", void 0);
31432
+ __decorate([property({
31433
+ reflect: true,
31434
+ attribute: "custom-color",
31435
+ converter: reflectNonDefault("")
31436
+ })], NLDDSwatchPickerItem.prototype, "customColor", void 0);
31437
+ __decorate([property({ type: String })], NLDDSwatchPickerItem.prototype, "image", void 0);
31438
+ __decorate([property({
31439
+ type: String,
31440
+ attribute: "image-srcset"
31441
+ })], NLDDSwatchPickerItem.prototype, "imageSrcset", void 0);
31442
+ __decorate([property({
31443
+ reflect: true,
31444
+ converter: reflectNonDefault("")
31445
+ })], NLDDSwatchPickerItem.prototype, "text", void 0);
31446
+ __decorate([property({
31447
+ type: Boolean,
31448
+ reflect: true
31449
+ })], NLDDSwatchPickerItem.prototype, "selected", void 0);
31450
+ __decorate([property({
31451
+ type: Boolean,
31452
+ reflect: true
31453
+ })], NLDDSwatchPickerItem.prototype, "disabled", void 0);
31454
+ __decorate([property({ type: String })], NLDDSwatchPickerItem.prototype, "value", void 0);
31455
+ __decorate([property({
31456
+ reflect: true,
31457
+ converter: reflectNonDefault("md")
31458
+ })], NLDDSwatchPickerItem.prototype, "size", void 0);
31459
+ __decorate([state()], NLDDSwatchPickerItem.prototype, "_groupPosition", void 0);
31460
+ NLDDSwatchPickerItem = __decorate([customElement("nldd-swatch-picker-item")], NLDDSwatchPickerItem);
31461
+ var NLDDSwatchPicker = (_NLDDSwatchPicker = class NLDDSwatchPicker extends FormAssociated(LitElement) {
31462
+ constructor(..._args2) {
31463
+ super(..._args2);
31464
+ this.size = "md";
31465
+ this.accessibleLabel = "";
31466
+ this.accessibleLabeledBy = "";
31467
+ this.invalid = false;
31468
+ this.disabled = false;
31469
+ this.name = "";
31470
+ this.value = "";
31471
+ this.required = false;
31472
+ this._initialValue = "";
31473
+ this._appliedLabel = null;
31474
+ this._handleItemChange = (e) => {
31475
+ e.stopPropagation();
31476
+ if (this.disabled || e.detail.value === this.value) return;
31477
+ this.value = e.detail.value;
31478
+ this._syncItems();
31479
+ this.commitFormValue();
31480
+ this.dispatchEvent(new CustomEvent("change", {
31481
+ detail: { value: this.value },
31482
+ bubbles: true,
31483
+ composed: true
31484
+ }));
31485
+ };
31486
+ this._handleKeydown = (e) => {
31487
+ if (this.disabled) return;
31488
+ if (e.key === "Enter") {
31489
+ submitOnEnter(this, e);
31490
+ return;
31491
+ }
31492
+ const items = this._getItems().filter((item) => !item.disabled);
31493
+ if (items.length === 0) return;
31494
+ const current = items.findIndex((item) => item.selected);
31495
+ let next;
31496
+ switch (e.key) {
31497
+ case "ArrowLeft":
31498
+ case "ArrowUp":
31499
+ next = current <= 0 ? items.length - 1 : current - 1;
31500
+ break;
31501
+ case "ArrowRight":
31502
+ case "ArrowDown":
31503
+ next = current >= items.length - 1 ? 0 : current + 1;
31504
+ break;
31505
+ case "Home":
31506
+ next = 0;
31507
+ break;
31508
+ case "End":
31509
+ next = items.length - 1;
31510
+ break;
31511
+ default: return;
31512
+ }
31513
+ e.preventDefault();
31514
+ if (next === current || !items[next]) return;
31515
+ items[next].focus();
31516
+ items[next]._select();
31517
+ };
31518
+ }
31519
+ connectedCallback() {
31520
+ super.connectedCallback();
31521
+ this.setAttribute("role", "radiogroup");
31522
+ this.addEventListener("item-change", this._handleItemChange);
31523
+ this.addEventListener("keydown", this._handleKeydown);
31524
+ }
31525
+ disconnectedCallback() {
31526
+ super.disconnectedCallback();
31527
+ this.removeEventListener("item-change", this._handleItemChange);
31528
+ this.removeEventListener("keydown", this._handleKeydown);
31529
+ }
31530
+ firstUpdated() {
31531
+ this._syncItems();
31532
+ this._initialValue = this.value;
31533
+ }
31534
+ formValue() {
31535
+ return this.value || null;
31536
+ }
31537
+ formResetCallback() {
31538
+ this.value = this._initialValue;
31539
+ }
31540
+ formStateRestoreCallback(state) {
31541
+ if (typeof state === "string") this.value = state;
31542
+ }
31543
+ /** The group has no focus of its own, so an invalid submit lands where Tab
31544
+ * would: on the chosen swatch, or the first one that is enabled. */
31545
+ validationAnchor() {
31546
+ const items = this._getItems().filter((item) => !item.disabled);
31547
+ return items.find((item) => item.selected) ?? items[0];
31548
+ }
31549
+ updated(changedProperties) {
31550
+ if (changedProperties.has("value") || changedProperties.has("size") || changedProperties.has("disabled") || changedProperties.has("required") || changedProperties.has("invalid")) this._syncItems();
31551
+ if (changedProperties.has("value")) this.commitFormValue();
31552
+ if (changedProperties.has("accessibleLabel")) this._appliedLabel = setOwnedAttribute(this, "aria-label", this.accessibleLabel, this._appliedLabel);
31553
+ if (changedProperties.has("accessibleLabeledBy")) {
31554
+ if (this.accessibleLabeledBy) this.setAttribute("aria-labelledby", this.accessibleLabeledBy);
31555
+ else this.removeAttribute("aria-labelledby");
31556
+ }
31557
+ }
31558
+ _getItems() {
31559
+ const slot = this.shadowRoot?.querySelector("slot");
31560
+ if (!slot) return [];
31561
+ return slot.assignedElements().filter((el) => el.localName === "nldd-swatch-picker-item");
31562
+ }
31563
+ _syncItems() {
31564
+ const items = this._getItems();
31565
+ this.toggleAttribute("aria-required", this.required);
31566
+ if (this.invalid) this.setAttribute("aria-invalid", "true");
31567
+ else this.removeAttribute("aria-invalid");
31568
+ for (const item of items) {
31569
+ if (this.disabled && !item.hasAttribute("disabled")) {
31570
+ item.setAttribute("group-disabled", "");
31571
+ item.disabled = true;
31572
+ } else if (!this.disabled && item.hasAttribute("group-disabled")) {
31573
+ item.removeAttribute("group-disabled");
31574
+ item.disabled = false;
31575
+ }
31576
+ item.size = this.size;
31577
+ item.selected = !!this.value && item.value === this.value;
31578
+ }
31579
+ const positions = radioPositions(items, (item) => item.selected, (item) => item.disabled);
31580
+ items.forEach((item, index) => {
31581
+ item._groupPosition = positions[index] ?? null;
31582
+ });
31583
+ }
31584
+ /** @internal */
31585
+ _onSlotChange() {
31586
+ this._syncItems();
31587
+ }
31588
+ /** Focus goes to the chosen swatch, or the first enabled one: where Tab lands. */
31589
+ focus(options) {
31590
+ if (deferFocus(this, options)) return;
31591
+ const items = this._getItems().filter((item) => !item.disabled);
31592
+ (items.find((item) => item.selected) ?? items[0])?.focus(options);
31593
+ }
31594
+ render() {
31595
+ return swatchPickerTemplate(this);
31596
+ }
31597
+ }, _NLDDSwatchPicker.styles = swatchPickerStyles, _NLDDSwatchPicker.isFormInput = true, _NLDDSwatchPicker);
31598
+ __decorate([property({
31599
+ reflect: true,
31600
+ converter: reflectNonDefault("md")
31601
+ })], NLDDSwatchPicker.prototype, "size", void 0);
31602
+ __decorate([property({
31603
+ type: String,
31604
+ attribute: "accessible-label"
31605
+ })], NLDDSwatchPicker.prototype, "accessibleLabel", void 0);
31606
+ __decorate([property({
31607
+ type: String,
31608
+ attribute: "accessible-labeled-by"
31609
+ })], NLDDSwatchPicker.prototype, "accessibleLabeledBy", void 0);
31610
+ __decorate([property({
31611
+ type: Boolean,
31612
+ reflect: true
31613
+ })], NLDDSwatchPicker.prototype, "invalid", void 0);
31614
+ __decorate([property({
31615
+ type: Boolean,
31616
+ reflect: true
31617
+ })], NLDDSwatchPicker.prototype, "disabled", void 0);
31618
+ __decorate([property({
31619
+ reflect: true,
31620
+ converter: reflectNonDefault("")
31621
+ })], NLDDSwatchPicker.prototype, "name", void 0);
31622
+ __decorate([property({
31623
+ type: String,
31624
+ reflect: true
31625
+ })], NLDDSwatchPicker.prototype, "value", void 0);
31626
+ __decorate([property({
31627
+ type: Boolean,
31628
+ reflect: true
31629
+ })], NLDDSwatchPicker.prototype, "required", void 0);
31630
+ NLDDSwatchPicker = __decorate([customElement("nldd-swatch-picker")], NLDDSwatchPicker);
30984
31631
  // src/components/inputs/stepper/stepper.styles.ts
30985
31632
  var stepperStyles = css`
30986
31633
  :host {
@@ -31278,11 +31925,11 @@ var switchStyles = css`
31278
31925
  --_switch-border-width: var(--primitives-border-width-regular);
31279
31926
  --_switch-border-color: light-dark(var(--primitives-color-neutral-550), var(--primitives-color-neutral-650));
31280
31927
  --_switch-background-color: var(--semantics-surfaces-base-background-color);
31281
- --_switch-is-selected-background-color: var(--context-selected-indicator-color, var(--semantics-controls-is-selected-indicator-color));
31928
+ --_switch-is-selected-background-color: var(--semantics-controls-is-selected-indicator-color);
31282
31929
  --_switch-thumb-border-width: var(--primitives-border-width-regular);
31283
31930
  --_switch-thumb-border-color: light-dark(var(--primitives-color-neutral-550), var(--primitives-color-neutral-650));
31284
31931
  --_switch-thumb-background-color: var(--semantics-surfaces-base-background-color);
31285
- --_switch-is-selected-thumb-background-color: var(--context-selected-contrast-color, var(--semantics-controls-is-selected-mark-color));
31932
+ --_switch-is-selected-thumb-background-color: var(--semantics-controls-is-selected-mark-color);
31286
31933
 
31287
31934
  display: inline-block;
31288
31935
  position: relative;
@@ -31437,11 +32084,6 @@ function switchTemplate(component) {
31437
32084
  * Prefer nldd-switch-field for labeled usage — it combines the switch with a visible label.
31438
32085
  * Direct use of nldd-switch requires an accessible-label attribute for screen reader accessibility.
31439
32086
  *
31440
- * On a selected row of nldd-list-item a checked control takes the colors of the
31441
- * row: the row sets `--context-selected-indicator-color` and
31442
- * `--context-selected-contrast-color`, because the accent can fall below 3:1 on
31443
- * the gray of a selected row.
31444
- *
31445
32087
  * @element nldd-switch
31446
32088
  * @attr {boolean} checked - Whether the switch is on/off
31447
32089
  * @attr {boolean} disabled - Disabled state
@@ -43443,7 +44085,7 @@ var sliderStyles = css`
43443
44085
  --_slider-track-color: light-dark(var(--primitives-color-neutral-50), var(--primitives-color-neutral-150));
43444
44086
  --_slider-track-border-color: light-dark(var(--primitives-color-neutral-100), var(--primitives-color-neutral-200));
43445
44087
  --_slider-track-border-width: var(--primitives-border-width-thin);
43446
- --_slider-fill-color: var(--context-selected-indicator-color, var(--semantics-controls-is-selected-indicator-color));
44088
+ --_slider-fill-color: var(--semantics-controls-is-selected-indicator-color);
43447
44089
  --_slider-fill-highlight-border-color: var(--semantics-controls-is-selected-indicator-highlight-border-color);
43448
44090
  --_slider-thumb-size: var(--primitives-space-28);
43449
44091
  --_slider-thumb-hit-size: var(--_slider-control-height);
@@ -43464,7 +44106,7 @@ var sliderStyles = css`
43464
44106
  --_slider-histogram-bar-corner-radius: var(--primitives-space-2);
43465
44107
  --_slider-histogram-bar-height: 0;
43466
44108
  --_slider-tooltip-offset: var(--primitives-space-8);
43467
- --_slider-tooltip-touch-offset: var(--primitives-space-32);
44109
+ --_slider-tooltip-touch-offset: calc(var(--semantics-fingertip-size) / 2);
43468
44110
  --_slider-tooltip-shift: 0px;
43469
44111
  --_slider-tooltip-background-color: var(--semantics-tooltips-background-color);
43470
44112
  --_slider-tooltip-content-color: var(--semantics-tooltips-content-color);
@@ -43631,6 +44273,15 @@ var sliderStyles = css`
43631
44273
  z-index: 2;
43632
44274
  }
43633
44275
 
44276
+ .slider__input:focus {
44277
+ z-index: 3;
44278
+ }
44279
+
44280
+ .slider__control.is-holding-start .slider__input--start,
44281
+ .slider__control.is-holding-end .slider__input--end {
44282
+ z-index: 4;
44283
+ }
44284
+
43634
44285
  .slider__control.is-stacked .slider__input::-webkit-slider-thumb {
43635
44286
  pointer-events: none;
43636
44287
  }
@@ -43681,21 +44332,27 @@ var sliderStyles = css`
43681
44332
  height: var(--_slider-thumb-hit-size);
43682
44333
  }
43683
44334
 
44335
+ /* While a thumb is held, the native :hover and :active stay on the input a
44336
+ drag began on, also once it has passed the other thumb and drags that. */
43684
44337
  @media (hover: hover) {
43685
- .slider__input::-webkit-slider-thumb:hover {
44338
+ .slider__control:not(.is-holding) .slider__input::-webkit-slider-thumb:hover {
43686
44339
  --_slider-thumb-border-color: var(--_slider-thumb-is-hovered-border-color);
43687
44340
  }
43688
44341
 
43689
- .slider__input::-moz-range-thumb:hover {
44342
+ .slider__control:not(.is-holding) .slider__input::-moz-range-thumb:hover {
43690
44343
  --_slider-thumb-border-color: var(--_slider-thumb-is-hovered-border-color);
43691
44344
  }
43692
44345
  }
43693
44346
 
43694
- .slider__input:active::-webkit-slider-thumb {
44347
+ .slider__control.is-holding-value .slider__input--value::-webkit-slider-thumb,
44348
+ .slider__control.is-holding-start .slider__input--start::-webkit-slider-thumb,
44349
+ .slider__control.is-holding-end .slider__input--end::-webkit-slider-thumb {
43695
44350
  --_slider-thumb-border-color: var(--_slider-thumb-is-active-border-color);
43696
44351
  }
43697
44352
 
43698
- .slider__input:active::-moz-range-thumb {
44353
+ .slider__control.is-holding-value .slider__input--value::-moz-range-thumb,
44354
+ .slider__control.is-holding-start .slider__input--start::-moz-range-thumb,
44355
+ .slider__control.is-holding-end .slider__input--end::-moz-range-thumb {
43699
44356
  --_slider-thumb-border-color: var(--_slider-thumb-is-active-border-color);
43700
44357
  }
43701
44358
 
@@ -43867,6 +44524,10 @@ function sliderTemplate(component) {
43867
44524
  "slider__control": true,
43868
44525
  "has-histogram": component.histogram.length > 0,
43869
44526
  "is-active": component._active,
44527
+ "is-holding": !!component._held,
44528
+ "is-holding-value": component._held === "value",
44529
+ "is-holding-start": component._held === "start",
44530
+ "is-holding-end": component._held === "end",
43870
44531
  "is-start-on-top": startOnTop,
43871
44532
  "is-stacked": range && start === end
43872
44533
  })}
@@ -43919,8 +44580,11 @@ function sliderTemplate(component) {
43919
44580
  * Page Down, Home and End), touch, the form and a screen reader work as they do
43920
44581
  * for any slider. A range is two of them over each other, each with its own
43921
44582
  * name for a screen reader ("Prijs, minimum"), and a press on the track moves
43922
- * the nearer thumb there. The thumbs do not pass each other; where they lie
43923
- * on one value, the first move picks one, to the left the start one.
44583
+ * the nearer thumb there. A thumb dragged or moved with an arrow key (also
44584
+ * with Shift) past the other one becomes that end of the range, and focus goes with it, so its name
44585
+ * still says which end it is. Home, End, Page Up and Page Down stop at the
44586
+ * other thumb, so they never turn the range around. Where the thumbs lie on
44587
+ * one value, the first move picks one, to the left the start one.
43924
44588
  *
43925
44589
  * The value shows in a tooltip above the thumb while the pointer is over the
43926
44590
  * slider or its icons, while a thumb has keyboard focus and while it or an icon
@@ -44016,16 +44680,26 @@ var NLDDSlider = (_NLDDSlider = class NLDDSlider extends DescribedBy(FormAssocia
44016
44680
  this.translations = {};
44017
44681
  this.formatValue = null;
44018
44682
  this._active = false;
44683
+ this._held = null;
44019
44684
  this._initial = {};
44020
44685
  this._resizeObserver = null;
44021
44686
  this._trackThumb = null;
44022
44687
  this._stackedPress = null;
44688
+ this._dragInput = null;
44689
+ this._dragThumb = null;
44690
+ this._arrowKey = false;
44023
44691
  this._handlePointerDown = (event) => {
44024
44692
  if (this.disabled || event.button !== 0) return;
44025
44693
  this._active = true;
44026
44694
  window.addEventListener("pointerup", this._handlePointerUp, { once: true });
44027
44695
  window.addEventListener("pointercancel", this._handlePointerUp, { once: true });
44028
44696
  const target = event.target;
44697
+ this._arrowKey = false;
44698
+ if (target.matches(".slider__input")) this._held = target.matches(".slider__input--start") ? "start" : target.matches(".slider__input--end") ? "end" : "value";
44699
+ if (this.range && target.matches(".slider__input")) {
44700
+ this._dragInput = target;
44701
+ this._dragThumb = this._held;
44702
+ }
44029
44703
  if (!this.range || !target.closest(".slider__control") || target.matches(".slider__input")) return;
44030
44704
  window.addEventListener("pointermove", this._handleTrackMove);
44031
44705
  event.preventDefault();
@@ -44049,7 +44723,8 @@ var NLDDSlider = (_NLDDSlider = class NLDDSlider extends DescribedBy(FormAssocia
44049
44723
  this._stackedPress = null;
44050
44724
  }
44051
44725
  if (!this._trackThumb) return;
44052
- this._set(this._trackThumb, this._valueAt(event.clientX));
44726
+ const landed = this._set(this._trackThumb, this._valueAt(event.clientX), void 0, true);
44727
+ if (landed !== this._trackThumb && landed !== "value") this._grab(landed);
44053
44728
  this._emit("input");
44054
44729
  };
44055
44730
  this._handlePointerUp = () => {
@@ -44182,7 +44857,17 @@ var NLDDSlider = (_NLDDSlider = class NLDDSlider extends DescribedBy(FormAssocia
44182
44857
  /** @internal */
44183
44858
  _handleInput(event, thumb) {
44184
44859
  event.stopPropagation();
44185
- this._set(thumb, parseFloat(event.target.value), event.target);
44860
+ const input = event.target;
44861
+ const dragged = input === this._dragInput && this._dragThumb;
44862
+ const moved = dragged || thumb;
44863
+ const landed = this._set(moved, parseFloat(input.value), input, !!dragged || this._arrowKey);
44864
+ if (landed !== moved && landed !== "value") {
44865
+ if (dragged) {
44866
+ this._dragThumb = landed;
44867
+ this._held = landed;
44868
+ }
44869
+ this._focusThumb(landed);
44870
+ }
44186
44871
  this._emit("input");
44187
44872
  }
44188
44873
  /** @internal */
@@ -44200,6 +44885,13 @@ var NLDDSlider = (_NLDDSlider = class NLDDSlider extends DescribedBy(FormAssocia
44200
44885
  * takes one step for it.
44201
44886
  * @internal */
44202
44887
  _handleKeyDown(event, thumb) {
44888
+ const arrow = [
44889
+ "ArrowUp",
44890
+ "ArrowDown",
44891
+ "ArrowLeft",
44892
+ "ArrowRight"
44893
+ ].includes(event.key);
44894
+ this._arrowKey = arrow && !event.shiftKey && !event.altKey && !event.ctrlKey && !event.metaKey;
44203
44895
  if (!event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return;
44204
44896
  const rtl = getComputedStyle(this).direction === "rtl";
44205
44897
  const direction = {
@@ -44210,16 +44902,18 @@ var NLDDSlider = (_NLDDSlider = class NLDDSlider extends DescribedBy(FormAssocia
44210
44902
  }[event.key];
44211
44903
  if (!direction) return;
44212
44904
  event.preventDefault();
44213
- this._page(thumb, direction);
44905
+ this._page(thumb, direction, true);
44214
44906
  }
44215
44907
  /** Moves a thumb a tenth of the range, at least one step, the jump the
44216
44908
  * native input takes on Page Up and Page Down. */
44217
- _page(thumb, direction) {
44909
+ _page(thumb, direction, pass = false) {
44218
44910
  const page = Math.max(this.step > 0 ? this.step : 1, (this.max - this.min) / 10);
44219
- const current = () => thumb === "value" ? this._value : thumb === "start" ? this._start : this._end;
44911
+ const current = () => thumb === "value" ? this._value : [this._start, this._end].join();
44220
44912
  const before = current();
44221
44913
  const input = this.shadowRoot?.querySelector(`.slider__input--${thumb}`) ?? void 0;
44222
- this._set(thumb, before + direction * page, input);
44914
+ const from = thumb === "value" ? this._value : thumb === "start" ? this._start : this._end;
44915
+ const landed = this._set(thumb, from + direction * page, input, pass);
44916
+ if (landed !== thumb && landed !== "value") this._focusThumb(landed);
44223
44917
  if (current() === before) return;
44224
44918
  this._emit("input");
44225
44919
  this._emit("change");
@@ -44227,6 +44921,10 @@ var NLDDSlider = (_NLDDSlider = class NLDDSlider extends DescribedBy(FormAssocia
44227
44921
  /** Makes a thumb the one a press drags, and gives it focus. */
44228
44922
  _grab(thumb) {
44229
44923
  this._trackThumb = thumb;
44924
+ this._held = thumb;
44925
+ this._focusThumb(thumb);
44926
+ }
44927
+ _focusThumb(thumb) {
44230
44928
  this.shadowRoot?.querySelector(`.slider__input--${thumb}`)?.focus();
44231
44929
  }
44232
44930
  /** Ends a press: its listeners on the window, and the thumb it drags. */
@@ -44236,6 +44934,9 @@ var NLDDSlider = (_NLDDSlider = class NLDDSlider extends DescribedBy(FormAssocia
44236
44934
  window.removeEventListener("pointercancel", this._handlePointerUp);
44237
44935
  this._trackThumb = null;
44238
44936
  this._stackedPress = null;
44937
+ this._dragInput = null;
44938
+ this._dragThumb = null;
44939
+ this._held = null;
44239
44940
  }
44240
44941
  /** Where the middle of the native thumb runs: from `start` over `length`
44241
44942
  * pixels, in the direction of the text, and how wide it takes a press. */
@@ -44264,16 +44965,38 @@ var NLDDSlider = (_NLDDSlider = class NLDDSlider extends DescribedBy(FormAssocia
44264
44965
  const fraction = this._fraction(this._start);
44265
44966
  return Math.abs(x - (start + length * (rtl ? 1 - fraction : fraction))) <= hit / 2;
44266
44967
  }
44267
- /** Sets a thumb, keeps the thumbs of a range from passing each other, and
44268
- * puts the native input back where the value landed. */
44269
- _set(thumb, raw, input) {
44968
+ /** Sets a thumb and puts the native inputs back where the values landed.
44969
+ * With `pass`, a thumb moved past the other one becomes the other end of
44970
+ * the range, and the other thumb takes its place; without, it stops at the
44971
+ * other thumb. Returns the end the value landed on. */
44972
+ _set(thumb, raw, input, pass = false) {
44270
44973
  const value = this._snap(raw);
44271
- if (thumb === "value") this.value = value;
44272
- if (thumb === "start") this.startValue = Math.min(value, this._end);
44273
- if (thumb === "end") this.endValue = Math.max(value, this._start);
44274
- const settled = thumb === "value" ? this.value : thumb === "start" ? this.startValue : this.endValue;
44275
- if (input && parseFloat(input.value) !== settled) input.value = String(settled);
44974
+ let landed = thumb;
44975
+ if (thumb === "value") {
44976
+ this.value = value;
44977
+ if (input && parseFloat(input.value) !== value) input.value = String(value);
44978
+ } else {
44979
+ const start = this._start;
44980
+ const end = this._end;
44981
+ if (thumb === "start" && value > end && pass) [this.startValue, this.endValue, landed] = [
44982
+ end,
44983
+ value,
44984
+ "end"
44985
+ ];
44986
+ else if (thumb === "end" && value < start && pass) [this.startValue, this.endValue, landed] = [
44987
+ value,
44988
+ start,
44989
+ "start"
44990
+ ];
44991
+ else if (thumb === "start") this.startValue = Math.min(value, end);
44992
+ else this.endValue = Math.max(value, start);
44993
+ for (const el of this._inputs ?? []) {
44994
+ const settled = el.classList.contains("slider__input--start") ? this._start : this._end;
44995
+ if (parseFloat(el.value) !== settled) el.value = String(settled);
44996
+ }
44997
+ }
44276
44998
  this.commitFormValue();
44999
+ return landed;
44277
45000
  }
44278
45001
  _emit(type) {
44279
45002
  const detail = this.range ? {
@@ -44346,6 +45069,7 @@ __decorate([property({ type: Number })], NLDDSlider.prototype, "step", void 0);
44346
45069
  __decorate([property({ type: Object })], NLDDSlider.prototype, "translations", void 0);
44347
45070
  __decorate([property({ attribute: false })], NLDDSlider.prototype, "formatValue", void 0);
44348
45071
  __decorate([state()], NLDDSlider.prototype, "_active", void 0);
45072
+ __decorate([state()], NLDDSlider.prototype, "_held", void 0);
44349
45073
  __decorate([queryAll(".slider__input")], NLDDSlider.prototype, "_inputs", void 0);
44350
45074
  NLDDSlider = __decorate([customElement("nldd-slider")], NLDDSlider);
44351
45075
  // src/components/layout/shell/shell.styles.ts
@@ -46892,7 +47616,7 @@ var heroStyles = css`
46892
47616
 
46893
47617
  @container (max-width: ${smMax$12}) {
46894
47618
  padding-inline: var(--semantics-page-sections-sm-margin-inline);
46895
- padding-top: var(--_hero-sm-padding-top, var(--_hero-padding-top, var(--semantics-page-sections-sm-margin-block)));
47619
+ padding-top: var(--_hero-sm-padding-top, var(--_hero-padding-top, calc(var(--semantics-page-sections-sm-margin-block) / 2)));
46896
47620
  padding-bottom: var(--_hero-sm-padding-bottom, var(--_hero-padding-bottom, var(--semantics-page-sections-sm-margin-block)));
46897
47621
  }
46898
47622
 
@@ -51258,6 +51982,12 @@ var pageFooterStyles = css`
51258
51982
  padding-top: calc(var(--primitives-space-16) + var(--_page-footer-ribbon-height));
51259
51983
  }
51260
51984
 
51985
+ :host([single-slot]:not([no-ribbon])) .page-footer__body > div:not([hidden]) {
51986
+ @container (max-width: ${smMax$3}) {
51987
+ padding-block: var(--primitives-space-32);
51988
+ }
51989
+ }
51990
+
51261
51991
  .page-footer__breadcrumbs[hidden],
51262
51992
  .page-footer__main[hidden],
51263
51993
  .page-footer__legal-bar[hidden],
@@ -51291,7 +52021,7 @@ var pageFooterLegalBarStyles = css`
51291
52021
  .page-footer__legal-bar {
51292
52022
  display: flex;
51293
52023
  flex-wrap: wrap;
51294
- row-gap: var(--primitives-space-4);
52024
+ row-gap: var(--primitives-space-8);
51295
52025
  column-gap: var(--primitives-space-16);
51296
52026
  align-items: flex-start;
51297
52027
  justify-content: space-between;
@@ -51300,14 +52030,16 @@ var pageFooterLegalBarStyles = css`
51300
52030
  .page-footer__legal-bar-start {
51301
52031
  display: flex;
51302
52032
  flex-wrap: wrap;
51303
- gap: var(--primitives-space-12);
52033
+ row-gap: var(--primitives-space-8);
52034
+ column-gap: var(--primitives-space-12);
51304
52035
  order: 0;
51305
52036
  }
51306
52037
 
51307
52038
  .page-footer__legal-bar-end {
51308
52039
  display: flex;
51309
52040
  flex-wrap: wrap;
51310
- gap: var(--primitives-space-12);
52041
+ row-gap: var(--primitives-space-8);
52042
+ column-gap: var(--primitives-space-12);
51311
52043
  order: 1;
51312
52044
  }
51313
52045
 
@@ -52132,6 +52864,9 @@ var TOUCH_HOLD_MS = 300;
52132
52864
  /** How close to an edge the pointer scrolls the board or a column, and how fast. */
52133
52865
  var SCROLL_EDGE = 48;
52134
52866
  var SCROLL_SPEED = 12;
52867
+ /** How long the pointer rests on a column cut off at a side before the board
52868
+ * brings the whole column into view. */
52869
+ var COLUMN_REVEAL_DELAY_MS = 300;
52135
52870
  /** How long the note at an item a readonly board did not move stays. */
52136
52871
  var DENIED_MS = 1500;
52137
52872
  /** How long the pointer stays outside the board before the copy says it goes back. */
@@ -52206,6 +52941,7 @@ var NLDDTaskBoard = (_NLDDTaskBoard = class NLDDTaskBoard extends withTranslatio
52206
52941
  return;
52207
52942
  }
52208
52943
  this._move(item, from, fromIndex, to, Math.min(fromIndex, to.items.length));
52944
+ requestAnimationFrame(() => this._revealColumn(to));
52209
52945
  };
52210
52946
  this._onPointerDown = (event) => {
52211
52947
  if (this._press || this._drag || !event.isPrimary || event.button !== 0) return;
@@ -52281,6 +53017,7 @@ var NLDDTaskBoard = (_NLDDTaskBoard = class NLDDTaskBoard extends withTranslatio
52281
53017
  left: dx,
52282
53018
  behavior: "instant"
52283
53019
  });
53020
+ this._followColumnReveal(dx !== 0);
52284
53021
  const main = drag.target?._main;
52285
53022
  if (main) {
52286
53023
  const rect = main.getBoundingClientRect();
@@ -52490,7 +53227,9 @@ var NLDDTaskBoard = (_NLDDTaskBoard = class NLDDTaskBoard extends withTranslatio
52490
53227
  index: 0,
52491
53228
  frame: requestAnimationFrame(this._scrollLoop),
52492
53229
  note: null,
52493
- noteTimer: 0
53230
+ noteTimer: 0,
53231
+ columnToReveal: null,
53232
+ columnRevealTimer: 0
52494
53233
  };
52495
53234
  this._follow();
52496
53235
  }
@@ -52562,6 +53301,50 @@ var NLDDTaskBoard = (_NLDDTaskBoard = class NLDDTaskBoard extends withTranslatio
52562
53301
  const y = drag.y - drag.offsetY;
52563
53302
  drag.note.style.transform = `translate(${x}px, ${y}px) translate(-50%, calc(-100% - var(--primitives-space-8)))`;
52564
53303
  }
53304
+ /** At an edge the board scrolls on; away from it, the column under the
53305
+ * pointer comes fully into view once the pointer rests on it a moment. */
53306
+ _followColumnReveal(atEdge) {
53307
+ const drag = this._drag;
53308
+ if (!drag) return;
53309
+ const column = atEdge ? null : drag.target;
53310
+ if (column === drag.columnToReveal) return;
53311
+ clearTimeout(drag.columnRevealTimer);
53312
+ drag.columnRevealTimer = 0;
53313
+ drag.columnToReveal = column;
53314
+ if (!column || this._columnRevealLeft(column) === void 0) return;
53315
+ drag.columnRevealTimer = window.setTimeout(() => {
53316
+ if (this._drag === drag && drag.columnToReveal === column) this._revealColumn(column);
53317
+ }, COLUMN_REVEAL_DELAY_MS);
53318
+ }
53319
+ /** The smallest scroll that shows all of a column clear of the fade, or
53320
+ * nothing when it is in view already; a column wider than the board shows
53321
+ * its start. The smallest, so the column stays under the pointer. */
53322
+ _columnRevealLeft(column) {
53323
+ const el = this._scroller;
53324
+ const styles = getComputedStyle(el);
53325
+ const insetStart = parseFloat(styles.getPropertyValue("--_task-board-fade-size")) || 0;
53326
+ const insetEnd = insetStart;
53327
+ const current = el.scrollLeft;
53328
+ const rect = column.getBoundingClientRect();
53329
+ const offset = el.getBoundingClientRect().left - current;
53330
+ const start = rect.left - offset - insetStart;
53331
+ const end = rect.right - offset + insetEnd - el.clientWidth;
53332
+ let left;
53333
+ if (start < current - 1 || end > start) left = start;
53334
+ else if (end > current + 1) left = end;
53335
+ else return void 0;
53336
+ left = Math.round(Math.min(el.scrollWidth - el.clientWidth, Math.max(0, left)));
53337
+ return Math.abs(left - current) > 1 ? left : void 0;
53338
+ }
53339
+ _revealColumn(column) {
53340
+ const left = this._columnRevealLeft(column);
53341
+ if (left === void 0) return;
53342
+ const reduce = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
53343
+ this._scroller.scrollTo({
53344
+ left,
53345
+ behavior: reduce ? "instant" : "smooth"
53346
+ });
53347
+ }
52565
53348
  _drop() {
52566
53349
  const drag = this._drag;
52567
53350
  if (!drag) return;
@@ -52587,6 +53370,7 @@ var NLDDTaskBoard = (_NLDDTaskBoard = class NLDDTaskBoard extends withTranslatio
52587
53370
  if (!drag) return;
52588
53371
  cancelAnimationFrame(drag.frame);
52589
53372
  clearTimeout(drag.noteTimer);
53373
+ clearTimeout(drag.columnRevealTimer);
52590
53374
  drag.note?.remove();
52591
53375
  drag.ghost.remove();
52592
53376
  drag.item.removeAttribute("data-task-board-dragging");
@@ -52874,7 +53658,7 @@ var listItemSegmentStyles = css`
52874
53658
  }
52875
53659
  `;
52876
53660
  // src/components/lists-and-tables/list-item-segment/list-item-segment.template.ts
52877
- function template$9(control, href, target, rel, download, checked, expanded, current, disabled, accessibleLabel, actionTabindex, popupType, popoverTargetElement, popoverTargetAction, linkHint = "") {
53661
+ function template$10(control, href, target, rel, download, checked, expanded, current, disabled, accessibleLabel, actionTabindex, popupType, popoverTargetElement, popoverTargetAction, linkHint = "") {
52878
53662
  const content = html`<slot></slot>`;
52879
53663
  const ariaExpanded = expanded === void 0 ? popupType ? "false" : nothing : String(expanded);
52880
53664
  const ariaCurrent = current ?? nothing;
@@ -52929,7 +53713,10 @@ var _NLDDListItemSegment = class NLDDListItemSegment extends withTranslations(Li
52929
53713
  e.stopPropagation();
52930
53714
  return;
52931
53715
  }
52932
- if (this._control instanceof HTMLButtonElement) this._control.popoverTargetElement = popoverTargetOf(this, this.popovertarget, this.popoverTargetElement);
53716
+ if (this._control instanceof HTMLButtonElement) {
53717
+ this._control.popoverTargetElement = popoverTargetOf(this, this.popovertarget, this.popoverTargetElement);
53718
+ anchorPopoverTarget(this, this._control.popoverTargetElement);
53719
+ }
52933
53720
  this._control?.focus();
52934
53721
  if (this._controlType !== "checkbox") return;
52935
53722
  if (!e.composedPath().includes(this._control)) return;
@@ -52973,6 +53760,7 @@ var _NLDDListItemSegment = class NLDDListItemSegment extends withTranslations(Li
52973
53760
  }
52974
53761
  disconnectedCallback() {
52975
53762
  super.disconnectedCallback();
53763
+ anchorPopoverTarget(this, null);
52976
53764
  this.removeEventListener("focusin", this._handleFocusIn);
52977
53765
  this.removeEventListener("focusout", this._handleFocusOut);
52978
53766
  this.removeEventListener("click", this._handleClick);
@@ -53007,13 +53795,14 @@ var _NLDDListItemSegment = class NLDDListItemSegment extends withTranslations(Li
53007
53795
  * row's, for a disclosure segment) that CSS cannot see. A host class is the
53008
53796
  * hook — the same mechanism nldd-list already uses for .is-boxed / .is-first. */
53009
53797
  updated() {
53798
+ anchorPopoverTarget(this, popoverTargetOf(this, this.popovertarget, this.popoverTargetElement));
53010
53799
  const expanded = this.disclosure ? this._rowExpanded : this.expanded;
53011
53800
  this.classList.toggle("is-expanded", expanded === true);
53012
53801
  }
53013
53802
  render() {
53014
53803
  const hintKey = this._controlType === "link" ? downloadLinkHintKey(this.href, this.target, this.download) : null;
53015
53804
  if (this._controlType === "link") markDownloadTarget(this, this.download, this.target);
53016
- return template$9(this._controlType, this.href, this.target, this.rel, this.download, this.checked, this.disclosure ? this._rowExpanded : this.expanded, this.current ? this.currentType : void 0, this.disabled, this.accessibleLabel, this._tabbable === void 0 ? void 0 : this._tabbable ? "0" : "-1", this.popupType, popoverTargetOf(this, this.popovertarget, this.popoverTargetElement), this.popoverTargetAction, hintKey ? this._t(`components.list-item-segment.${hintKey}`) : "");
53805
+ return template$10(this._controlType, this.href, this.target, this.rel, this.download, this.checked, this.disclosure ? this._rowExpanded : this.expanded, this.current ? this.currentType : void 0, this.disabled, this.accessibleLabel, this._tabbable === void 0 ? void 0 : this._tabbable ? "0" : "-1", this.popupType, popoverTargetOf(this, this.popovertarget, this.popoverTargetElement), this.popoverTargetAction, hintKey ? this._t(`components.list-item-segment.${hintKey}`) : "");
53017
53806
  }
53018
53807
  };
53019
53808
  var NLDDListItemSegment = (_NLDDListItemSegment.styles = [listItemSegmentStyles], _NLDDListItemSegment);
@@ -53751,7 +54540,7 @@ function renderTitle(component) {
53751
54540
  ?hidden=${isHidden}
53752
54541
  >${fallback}<slot @slotchange=${component._onSlotChange}></slot></p>`;
53753
54542
  }
53754
- var template$8 = function() {
54543
+ var template$9 = function() {
53755
54544
  return html`
53756
54545
  <p
53757
54546
  class="title-cell__overline"
@@ -53883,7 +54672,7 @@ var _NLDDTitleCell = class NLDDTitleCell extends RowHeaderMixin(VisibilityMixin(
53883
54672
  else this.style.removeProperty("--_title-cell-min-height");
53884
54673
  }
53885
54674
  render() {
53886
- return template$8.call(this);
54675
+ return template$9.call(this);
53887
54676
  }
53888
54677
  };
53889
54678
  var NLDDTitleCell = (_NLDDTitleCell.styles = [titleCellStyles], _NLDDTitleCell);
@@ -54073,7 +54862,7 @@ var descriptionCellStyles = css`
54073
54862
  }
54074
54863
  `;
54075
54864
  // src/components/lists-and-tables/cells/description-cell/description-cell.template.ts
54076
- var template$7 = () => html`
54865
+ var template$8 = () => html`
54077
54866
  <slot name="title"></slot>
54078
54867
  <slot name="description"></slot>
54079
54868
  `;
@@ -54124,7 +54913,7 @@ var _NLDDDescriptionCell = class NLDDDescriptionCell extends RowHeaderMixin(Visi
54124
54913
  else this.style.removeProperty("--_description-cell-min-height");
54125
54914
  }
54126
54915
  render() {
54127
- return template$7();
54916
+ return template$8();
54128
54917
  }
54129
54918
  };
54130
54919
  var NLDDDescriptionCell = (_NLDDDescriptionCell.styles = [descriptionCellStyles], _NLDDDescriptionCell);
@@ -54328,7 +55117,7 @@ var gripSm = svg`
54328
55117
  />
54329
55118
  </svg>
54330
55119
  `;
54331
- function template$6(size, label) {
55120
+ function template$7(size, label) {
54332
55121
  return html`
54333
55122
  <button class="drag-handle-cell__control"
54334
55123
  type="button"
@@ -54376,7 +55165,7 @@ var _NLDDDragHandleCell = class NLDDDragHandleCell extends LitElement {
54376
55165
  }
54377
55166
  render() {
54378
55167
  const label = this._t("components.drag-handle-cell.accessible-label");
54379
- return template$6(this.size, label);
55168
+ return template$7(this.size, label);
54380
55169
  }
54381
55170
  };
54382
55171
  var NLDDDragHandleCell = (_NLDDDragHandleCell.styles = dragHandleCellStyles, _NLDDDragHandleCell);
@@ -54988,7 +55777,7 @@ var menuBarStyles = css`
54988
55777
  }
54989
55778
  `;
54990
55779
  // src/components/navigation/menu-bar/menu-bar.template.ts
54991
- function template$5(component) {
55780
+ function template$6(component) {
54992
55781
  return html`
54993
55782
  <nav class="menu-bar"
54994
55783
  aria-label=${component.accessibleLabel || nothing}
@@ -55224,7 +56013,7 @@ var menuBarItemStyles = css`
55224
56013
  }
55225
56014
  `;
55226
56015
  // src/components/navigation/menu-bar-item/menu-bar-item.template.ts
55227
- function template$4(component) {
56016
+ function template$5(component) {
55228
56017
  const safeHref = sanitizeUrl(component.href);
55229
56018
  const isLink = Boolean(safeHref);
55230
56019
  const hasIcon = Boolean(component.icon) || component._hasSlottedIcon;
@@ -55454,7 +56243,7 @@ var _NLDDMenuBarItem = class NLDDMenuBarItem extends LitElement {
55454
56243
  else this._menu.showPopover();
55455
56244
  }
55456
56245
  render() {
55457
- return template$4(this);
56246
+ return template$5(this);
55458
56247
  }
55459
56248
  };
55460
56249
  var NLDDMenuBarItem = (_NLDDMenuBarItem.styles = menuBarItemStyles, _NLDDMenuBarItem);
@@ -55758,7 +56547,7 @@ var _NLDDMenuBar = class NLDDMenuBar extends withTranslations(LitElement, nlddMe
55758
56547
  }
55759
56548
  }
55760
56549
  render() {
55761
- return template$5(this);
56550
+ return template$6(this);
55762
56551
  }
55763
56552
  };
55764
56553
  var NLDDMenuBar = (_NLDDMenuBar.styles = menuBarStyles, _NLDDMenuBar);
@@ -55935,7 +56724,7 @@ var linkStyles = css`
55935
56724
  }
55936
56725
  `;
55937
56726
  // src/components/navigation/link/link.template.ts
55938
- function template$3(helpers) {
56727
+ function template$4(helpers) {
55939
56728
  const resolvedRel = linkRel(this.rel, this.target);
55940
56729
  const hintKey = this.disabled ? null : downloadLinkHintKey(this.href, this.target, this.download);
55941
56730
  if (this.href) markDownloadTarget(this, this.download, this.target);
@@ -56026,7 +56815,7 @@ var _NLDDLink = class NLDDLink extends withTranslations(LitElement, nlddLinkTran
56026
56815
  }
56027
56816
  }
56028
56817
  render() {
56029
- return template$3.call(this, {
56818
+ return template$4.call(this, {
56030
56819
  handleClick: this._handleClick.bind(this),
56031
56820
  handleSlotChange: this._handleSlotChange.bind(this)
56032
56821
  });
@@ -56072,6 +56861,145 @@ __decorate([property({
56072
56861
  __decorate([state()], NLDDLink.prototype, "_hasStartSlot", void 0);
56073
56862
  __decorate([state()], NLDDLink.prototype, "_hasEndSlot", void 0);
56074
56863
  NLDDLink = __decorate([customElement("nldd-link")], NLDDLink);
56864
+ // src/components/navigation/link-group/link-group.styles.ts
56865
+ var linkGroupStyles = css`
56866
+
56867
+
56868
+ /* # Host */
56869
+
56870
+ :host {
56871
+ --_link-group-flex-direction: row;
56872
+ --_link-group-flex-wrap: wrap;
56873
+ --_link-group-row-gap: var(--primitives-space-12);
56874
+ --_link-group-column-gap: var(--primitives-space-16);
56875
+ --_link-group-align-items: baseline;
56876
+ --_link-group-justify-content: flex-start;
56877
+
56878
+ box-sizing: border-box;
56879
+ display: block;
56880
+ }
56881
+
56882
+ :host([size="xs"]),
56883
+ :host([size="sm"]) {
56884
+ --_link-group-row-gap: var(--primitives-space-8);
56885
+ --_link-group-column-gap: var(--primitives-space-12);
56886
+ }
56887
+
56888
+ :host([orientation="vertical"]) {
56889
+ --_link-group-flex-direction: column;
56890
+ --_link-group-flex-wrap: nowrap;
56891
+ --_link-group-align-items: flex-start;
56892
+ }
56893
+
56894
+ :host([horizontal-alignment="center"]) {
56895
+ --_link-group-justify-content: center;
56896
+ }
56897
+
56898
+ :host([horizontal-alignment="center"][orientation="vertical"]) {
56899
+ --_link-group-align-items: center;
56900
+ }
56901
+
56902
+ :host([hidden]) {
56903
+ display: none;
56904
+ }
56905
+
56906
+
56907
+ /* # Block */
56908
+
56909
+ .link-group__items {
56910
+ display: flex;
56911
+ flex-direction: var(--_link-group-flex-direction);
56912
+ flex-wrap: var(--_link-group-flex-wrap);
56913
+ row-gap: var(--_link-group-row-gap);
56914
+ column-gap: var(--_link-group-column-gap);
56915
+ align-items: var(--_link-group-align-items);
56916
+ justify-content: var(--_link-group-justify-content);
56917
+ }
56918
+
56919
+ :host([horizontal-alignment="center"]) .link-group__items {
56920
+ text-align: center;
56921
+ }
56922
+ `;
56923
+ // src/components/navigation/link-group/link-group.template.ts
56924
+ function template$3(component) {
56925
+ return html`
56926
+ <nav class="link-group"
56927
+ aria-label=${component.accessibleLabel || nothing}
56928
+ >
56929
+ <div class="link-group__items"
56930
+ role="list"
56931
+ >
56932
+ <slot @slotchange=${component._handleSlotChange}></slot>
56933
+ </div>
56934
+ </nav>
56935
+ `;
56936
+ }
56937
+ // src/components/navigation/link-group/link-group.ts
56938
+ /**
56939
+ * Nederlandse Digitale Dienst Link Group Component (Lit + TypeScript)
56940
+ *
56941
+ * A set of related `nldd-link` elements, such as the links under the name of a
56942
+ * service in a footer or the links to the other parts of a site. The links sit
56943
+ * in a row that wraps onto the next line when they do not fit, or stacked with
56944
+ * `orientation="vertical"`. With `horizontal-alignment="center"` the whole set
56945
+ * is centered, line by line, so a short list reads as one cloud in the middle.
56946
+ *
56947
+ * The group is a `nav` landmark with the links as a list, so a screen reader
56948
+ * says how many there are. Give it an `accessible-label` as soon as a page has
56949
+ * more than one `nav`, so each landmark can be told apart.
56950
+ *
56951
+ * The group sets its `size` on every link in it: links in one group are the
56952
+ * same size.
56953
+ *
56954
+ * @element nldd-link-group
56955
+ * @attr {string} size - Text size, set on every link in it: 'xs' | 'sm' | 'md' | 'lg' (default: 'md')
56956
+ * @attr {string} orientation - Layout direction: 'horizontal' (a row that wraps) | 'vertical' (default: 'horizontal')
56957
+ * @attr {string} horizontal-alignment - Alignment of the links: 'left' | 'center' (default: 'left')
56958
+ * @attr {string} accessible-label - Accessible name of the nav landmark
56959
+ *
56960
+ * @slot - nldd-link elements
56961
+ */
56962
+ var _NLDDLinkGroup = class NLDDLinkGroup extends LitElement {
56963
+ constructor(..._args) {
56964
+ super(..._args);
56965
+ this.size = "md";
56966
+ this.orientation = "horizontal";
56967
+ this.horizontalAlignment = "left";
56968
+ this.accessibleLabel = "";
56969
+ }
56970
+ /** @internal */
56971
+ _handleSlotChange() {
56972
+ const assigned = this._slot.assignedElements({ flatten: true });
56973
+ markListItems(assigned);
56974
+ for (const el of assigned) el.setAttribute("size", this.size);
56975
+ }
56976
+ updated(changedProperties) {
56977
+ if (changedProperties.has("size") && this._slot) this._handleSlotChange();
56978
+ }
56979
+ render() {
56980
+ return template$3(this);
56981
+ }
56982
+ };
56983
+ var NLDDLinkGroup = (_NLDDLinkGroup.styles = linkGroupStyles, _NLDDLinkGroup);
56984
+ __decorate([property({
56985
+ reflect: true,
56986
+ converter: reflectNonDefault("md")
56987
+ })], NLDDLinkGroup.prototype, "size", void 0);
56988
+ __decorate([property({
56989
+ reflect: true,
56990
+ converter: reflectNonDefault("horizontal")
56991
+ })], NLDDLinkGroup.prototype, "orientation", void 0);
56992
+ __decorate([property({
56993
+ attribute: "horizontal-alignment",
56994
+ reflect: true,
56995
+ converter: reflectNonDefault("left")
56996
+ })], NLDDLinkGroup.prototype, "horizontalAlignment", void 0);
56997
+ __decorate([property({
56998
+ type: String,
56999
+ attribute: "accessible-label"
57000
+ })], NLDDLinkGroup.prototype, "accessibleLabel", void 0);
57001
+ __decorate([query("slot")], NLDDLinkGroup.prototype, "_slot", void 0);
57002
+ NLDDLinkGroup = __decorate([customElement("nldd-link-group")], NLDDLinkGroup);
56075
57003
  // src/components/navigation/skip-link/skip-link.styles.ts
56076
57004
  var skipLinkStyles = css`
56077
57005
  :host {
@@ -56482,6 +57410,9 @@ var topNavigationBarStyles = css`
56482
57410
  display: grid;
56483
57411
  grid-column: 2 / 4;
56484
57412
  grid-template-columns: subgrid;
57413
+ /* Safari keeps the height of a columns-only subgrid when its width
57414
+ changes; taking the row from the bar too makes it measure again. */
57415
+ grid-template-rows: subgrid;
56485
57416
  align-items: center;
56486
57417
  }
56487
57418
 
@@ -56536,11 +57467,9 @@ var topNavigationBarStyles = css`
56536
57467
 
56537
57468
  /* The distance the text keeps from the top edge once it outgrows the
56538
57469
  ribbon. Only at the top: space under it would raise the bar for
56539
- nothing. The minimum gives up the same 16, so the text still centres
56540
- on the middle of the ribbon rather than 8px below it. */
57470
+ nothing. */
56541
57471
  @container (max-width: ${smMax$2}) {
56542
57472
  align-self: start;
56543
- min-height: calc(var(--_top-navigation-bar-logo-height) - var(--primitives-space-16));
56544
57473
  padding-block-start: var(--primitives-space-16);
56545
57474
  }
56546
57475
  }
@@ -56568,14 +57497,14 @@ var topNavigationBarStyles = css`
56568
57497
  ellipsis cannot be read at all. */
56569
57498
  overflow-wrap: anywhere;
56570
57499
 
56571
- /* Centred against the ribbon, and what does not fit grows downward: an
57500
+ /* On the bottom of the ribbon, and what does not fit grows downward: an
56572
57501
  auto margin takes positive free space and never negative, so the text
56573
57502
  cannot ride up past the top. Growing is the flex item's job here, and
56574
- an item that grows leaves nothing for the margins to centre with. */
57503
+ an item that grows leaves nothing for the margin to push with. */
56575
57504
  @container (max-width: ${smMax$2}) {
56576
57505
  flex-grow: 0;
56577
57506
  flex-basis: auto;
56578
- margin-block: auto;
57507
+ margin-block-start: auto;
56579
57508
  }
56580
57509
  }
56581
57510
 
@@ -57062,7 +57991,7 @@ async function loadDependencies() {
57062
57991
  Promise.resolve().then(() => list_item_exports),
57063
57992
  Promise.resolve().then(() => text_cell_exports),
57064
57993
  Promise.resolve().then(() => icon_cell_exports),
57065
- import("./icon-BPNDyhu9.js").then((n) => n.n)
57994
+ import("./icon-BQjRjtKH.js").then((n) => n.n)
57066
57995
  ]);
57067
57996
  }
57068
57997
  /** The rows of a level, read from its container: the global menu bar's items
@@ -65445,4 +66374,4 @@ __decorate([property({
65445
66374
  attribute: "no-arrow"
65446
66375
  })], NLDDJustInTimeEducation.prototype, "noArrow", void 0);
65447
66376
  NLDDJustInTimeEducation = _NLDDJustInTimeEducation = __decorate([customElement("nldd-just-in-time-education")], NLDDJustInTimeEducation);
65448
- export { NLDDActivityIndicator, NLDDAvatar, NLDDAvatarGroup, NLDDBadge, NLDDBanner, NLDDBarSplitView, NLDDBlockquote, NLDDBox, NLDDBreadcrumbs, NLDDBreadcrumbsItem, NLDDButton, NLDDButtonBar, NLDDButtonGroup, NLDDCard, NLDDCell, NLDDCheckbox, NLDDCheckboxField, NLDDCodeEditor, NLDDCodeViewer, NLDDCollection, NLDDComboBox, NLDDContainer, NLDDDateField, NLDDDatePicker, NLDDDescriptionCell, NLDDDivider, NLDDDocumentTabBar, NLDDDragHandleCell, NLDDDropdown, NLDDFileField, NLDDForm, NLDDFormActions, NLDDFormField, NLDDFormSection, NLDDFullBleedSection, NLDDHero, NLDDIcon, NLDDIconButton, NLDDIconCell, NLDDIdentity, NLDDImage, NLDDInlineDialog, NLDDJustInTimeEducation, NLDDKeyboardShortcut, NLDDLink, NLDDList, NLDDListItem, NLDDListItemSegment, NLDDMenu, NLDDMenuBar, NLDDMenuBarItem, NLDDModalDialog, NLDDMultiLineTextField, NLDDNavigationSplitView, NLDDNotification, NLDDNumberField, NLDDOneHalfOneHalfSection, NLDDOneThirdTwoThirdsSection, NLDDPage, NLDDPageFooter, NLDDPageFooterLegalBar, NLDDPageFooterLegalBarItem, NLDDPagination, NLDDPasswordField, NLDDPopover, NLDDProgressBar, NLDDProgressBarSegmentIndicator, NLDDProgressCircle, NLDDProgressCircleSegmentIndicator, NLDDRadioButton, NLDDRadioButtonField, NLDDRadioButtonGroup, NLDDRichText, NLDDSearchField, NLDDSegmentedControl, NLDDSheet, NLDDShell, NLDDSideBySideSplitView, NLDDSidebarSection, NLDDSimpleSection, NLDDSkipLink, NLDDSlider, NLDDSpacer, NLDDSpacerCell, NLDDSplitButton, NLDDSplitViewDivider, NLDDSplitViewPane, NLDDStackedSplitView, NLDDStatusBar, NLDDStepBar, NLDDStepBarItem, NLDDStepCell, NLDDStepper, NLDDSwitch, NLDDSwitchField, NLDDTabBar, NLDDTable, NLDDTableRow, NLDDTag, NLDDTaskBoard, NLDDTaskBoardColumn, NLDDText, NLDDTextCell, NLDDTextEditor, NLDDTextField, NLDDTimeField, NLDDTimePicker, NLDDTitle, NLDDTitleCell, NLDDToggleButton, NLDDToggleButtonGroup, NLDDToken, NLDDTokenField, NLDDToolbar, NLDDTooltip, NLDDTopNavigationBar, NLDDTopTitleBar, NLDDTwoThirdsOneThirdSection, NLDDValidationList, NLDDVisuallyHidden, NLDDWindow, setTranslations };
66377
+ export { NLDDActivityIndicator, NLDDAvatar, NLDDAvatarGroup, NLDDBadge, NLDDBanner, NLDDBarSplitView, NLDDBlockquote, NLDDBox, NLDDBreadcrumbs, NLDDBreadcrumbsItem, NLDDButton, NLDDButtonBar, NLDDButtonGroup, NLDDCard, NLDDCell, NLDDCheckbox, NLDDCheckboxField, NLDDCodeEditor, NLDDCodeViewer, NLDDCollection, NLDDComboBox, NLDDContainer, NLDDDateField, NLDDDatePicker, NLDDDescriptionCell, NLDDDivider, NLDDDocumentTabBar, NLDDDragHandleCell, NLDDDropdown, NLDDFileField, NLDDForm, NLDDFormActions, NLDDFormField, NLDDFormSection, NLDDFullBleedSection, NLDDHero, NLDDIcon, NLDDIconButton, NLDDIconCell, NLDDIdentity, NLDDImage, NLDDInlineDialog, NLDDJustInTimeEducation, NLDDKeyboardShortcut, NLDDLink, NLDDLinkGroup, NLDDList, NLDDListItem, NLDDListItemSegment, NLDDMenu, NLDDMenuBar, NLDDMenuBarItem, NLDDModalDialog, NLDDMultiLineTextField, NLDDNavigationSplitView, NLDDNotification, NLDDNumberField, NLDDOneHalfOneHalfSection, NLDDOneThirdTwoThirdsSection, NLDDPage, NLDDPageFooter, NLDDPageFooterLegalBar, NLDDPageFooterLegalBarItem, NLDDPagination, NLDDPasswordField, NLDDPopover, NLDDProgressBar, NLDDProgressBarSegmentIndicator, NLDDProgressCircle, NLDDProgressCircleSegmentIndicator, NLDDRadioButton, NLDDRadioButtonField, NLDDRadioButtonGroup, NLDDRichText, NLDDSearchField, NLDDSegmentedControl, NLDDSheet, NLDDShell, NLDDSideBySideSplitView, NLDDSidebarSection, NLDDSimpleSection, NLDDSkipLink, NLDDSlider, NLDDSpacer, NLDDSpacerCell, NLDDSplitButton, NLDDSplitViewDivider, NLDDSplitViewPane, NLDDStackedSplitView, NLDDStatusBar, NLDDStepBar, NLDDStepBarItem, NLDDStepCell, NLDDStepper, NLDDSwatchPicker, NLDDSwatchPickerItem, NLDDSwitch, NLDDSwitchField, NLDDTabBar, NLDDTable, NLDDTableRow, NLDDTag, NLDDTaskBoard, NLDDTaskBoardColumn, NLDDText, NLDDTextCell, NLDDTextEditor, NLDDTextField, NLDDTimeField, NLDDTimePicker, NLDDTitle, NLDDTitleCell, NLDDToggleButton, NLDDToggleButtonGroup, NLDDToken, NLDDTokenField, NLDDToolbar, NLDDTooltip, NLDDTopNavigationBar, NLDDTopTitleBar, NLDDTwoThirdsOneThirdSection, NLDDValidationList, NLDDVisuallyHidden, NLDDWindow, setTranslations };