@nldd/design-system 0.13.1 → 0.13.2

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 (155) hide show
  1. package/NOTICES.md +18 -1
  2. package/README.md +32 -24
  3. package/custom-elements.json +1046 -6
  4. package/dist/components/actions/button-group/button-group.d.ts +22 -7
  5. package/dist/components/actions/button-group/button-group.d.ts.map +1 -1
  6. package/dist/components/actions/button-group/button-group.js +38 -19
  7. package/dist/components/actions/button-group/button-group.js.map +1 -1
  8. package/dist/components/actions/button-group/button-group.styles.d.ts.map +1 -1
  9. package/dist/components/actions/button-group/button-group.styles.js +43 -18
  10. package/dist/components/actions/button-group/button-group.styles.js.map +1 -1
  11. package/dist/components/actions/button-group/button-group.template.js +1 -1
  12. package/dist/components/actions/button-group/button-group.template.js.map +1 -1
  13. package/dist/components/actions/menu/menu.d.ts +14 -0
  14. package/dist/components/actions/menu/menu.d.ts.map +1 -1
  15. package/dist/components/actions/menu/menu.js +41 -0
  16. package/dist/components/actions/menu/menu.js.map +1 -1
  17. package/dist/components/components.js +2432 -97
  18. package/dist/components/content/avatar-group/avatar-group.styles.d.ts.map +1 -1
  19. package/dist/components/content/avatar-group/avatar-group.styles.js +12 -1
  20. package/dist/components/content/avatar-group/avatar-group.styles.js.map +1 -1
  21. package/dist/components/content/icon/icon-aliases.d.ts.map +1 -1
  22. package/dist/components/content/icon/icon-aliases.js +10 -5
  23. package/dist/components/content/icon/icon-aliases.js.map +1 -1
  24. package/dist/components/content/icon/icon-gallery-status.d.ts.map +1 -1
  25. package/dist/components/content/icon/icon-gallery-status.js +4 -0
  26. package/dist/components/content/icon/icon-gallery-status.js.map +1 -1
  27. package/dist/components/content/icon/icon-registry.d.ts.map +1 -1
  28. package/dist/components/content/icon/icon-registry.js +4 -2
  29. package/dist/components/content/icon/icon-registry.js.map +1 -1
  30. package/dist/components/content/text/text.d.ts +1 -1
  31. package/dist/components/content/text/text.js +1 -1
  32. package/dist/components/content/text/text.styles.d.ts.map +1 -1
  33. package/dist/components/content/text/text.styles.js +104 -1
  34. package/dist/components/content/text/text.styles.js.map +1 -1
  35. package/dist/components/content/token/token.styles.d.ts.map +1 -1
  36. package/dist/components/content/token/token.styles.js +2 -1
  37. package/dist/components/content/token/token.styles.js.map +1 -1
  38. package/dist/components/content/tooltip/tooltip.styles.js +7 -7
  39. package/dist/components/forms/form-field/form-field.d.ts +9 -5
  40. package/dist/components/forms/form-field/form-field.d.ts.map +1 -1
  41. package/dist/components/forms/form-field/form-field.js +17 -6
  42. package/dist/components/forms/form-field/form-field.js.map +1 -1
  43. package/dist/components/{icon-DZ1UXCzO.js → icon-DRpTWSIg.js} +12 -6
  44. package/dist/components/{icon-button-984CwkU1.js → icon-button-DUEmWlBD.js} +8 -8
  45. package/dist/components/index.d.ts +2 -0
  46. package/dist/components/index.d.ts.map +1 -1
  47. package/dist/components/index.js +2 -0
  48. package/dist/components/index.js.map +1 -1
  49. package/dist/components/inputs/file-field/file-field.d.ts +12 -0
  50. package/dist/components/inputs/file-field/file-field.d.ts.map +1 -1
  51. package/dist/components/inputs/file-field/file-field.i18n.d.ts +1 -0
  52. package/dist/components/inputs/file-field/file-field.i18n.d.ts.map +1 -1
  53. package/dist/components/inputs/file-field/file-field.i18n.js +1 -0
  54. package/dist/components/inputs/file-field/file-field.i18n.js.map +1 -1
  55. package/dist/components/inputs/file-field/file-field.js +28 -9
  56. package/dist/components/inputs/file-field/file-field.js.map +1 -1
  57. package/dist/components/inputs/file-field/file-field.styles.d.ts.map +1 -1
  58. package/dist/components/inputs/file-field/file-field.styles.js +91 -8
  59. package/dist/components/inputs/file-field/file-field.styles.js.map +1 -1
  60. package/dist/components/inputs/file-field/file-field.template.d.ts +1 -0
  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 +51 -21
  63. package/dist/components/inputs/file-field/file-field.template.js.map +1 -1
  64. package/dist/components/inputs/slider/slider.d.ts +161 -0
  65. package/dist/components/inputs/slider/slider.d.ts.map +1 -0
  66. package/dist/components/inputs/slider/slider.i18n.d.ts +6 -0
  67. package/dist/components/inputs/slider/slider.i18n.d.ts.map +1 -0
  68. package/dist/components/inputs/slider/slider.i18n.js +5 -0
  69. package/dist/components/inputs/slider/slider.i18n.js.map +1 -0
  70. package/dist/components/inputs/slider/slider.js +436 -0
  71. package/dist/components/inputs/slider/slider.js.map +1 -0
  72. package/dist/components/inputs/slider/slider.styles.d.ts +2 -0
  73. package/dist/components/inputs/slider/slider.styles.d.ts.map +1 -0
  74. package/dist/components/inputs/slider/slider.styles.js +360 -0
  75. package/dist/components/inputs/slider/slider.styles.js.map +1 -0
  76. package/dist/components/inputs/slider/slider.template.d.ts +5 -0
  77. package/dist/components/inputs/slider/slider.template.d.ts.map +1 -0
  78. package/dist/components/inputs/slider/slider.template.js +99 -0
  79. package/dist/components/inputs/slider/slider.template.js.map +1 -0
  80. package/dist/components/layout/task-board/task-board-column.d.ts +80 -0
  81. package/dist/components/layout/task-board/task-board-column.d.ts.map +1 -0
  82. package/dist/components/layout/task-board/task-board-column.js +207 -0
  83. package/dist/components/layout/task-board/task-board-column.js.map +1 -0
  84. package/dist/components/layout/task-board/task-board-column.template.d.ts +3 -0
  85. package/dist/components/layout/task-board/task-board-column.template.d.ts.map +1 -0
  86. package/dist/components/layout/task-board/task-board-column.template.js +45 -0
  87. package/dist/components/layout/task-board/task-board-column.template.js.map +1 -0
  88. package/dist/components/layout/task-board/task-board.d.ts +169 -0
  89. package/dist/components/layout/task-board/task-board.d.ts.map +1 -0
  90. package/dist/components/layout/task-board/task-board.i18n.d.ts +11 -0
  91. package/dist/components/layout/task-board/task-board.i18n.d.ts.map +1 -0
  92. package/dist/components/layout/task-board/task-board.i18n.js +10 -0
  93. package/dist/components/layout/task-board/task-board.i18n.js.map +1 -0
  94. package/dist/components/layout/task-board/task-board.js +701 -0
  95. package/dist/components/layout/task-board/task-board.js.map +1 -0
  96. package/dist/components/layout/task-board/task-board.styles.d.ts +3 -0
  97. package/dist/components/layout/task-board/task-board.styles.d.ts.map +1 -0
  98. package/dist/components/layout/task-board/task-board.styles.js +259 -0
  99. package/dist/components/layout/task-board/task-board.styles.js.map +1 -0
  100. package/dist/components/layout/task-board/task-board.template.d.ts +3 -0
  101. package/dist/components/layout/task-board/task-board.template.d.ts.map +1 -0
  102. package/dist/components/layout/task-board/task-board.template.js +25 -0
  103. package/dist/components/layout/task-board/task-board.template.js.map +1 -0
  104. package/dist/components/navigation/link/link.d.ts +5 -0
  105. package/dist/components/navigation/link/link.d.ts.map +1 -1
  106. package/dist/components/navigation/link/link.js +20 -1
  107. package/dist/components/navigation/link/link.js.map +1 -1
  108. package/dist/components/navigation/link/link.template.d.ts +1 -0
  109. package/dist/components/navigation/link/link.template.d.ts.map +1 -1
  110. package/dist/components/navigation/link/link.template.js +16 -14
  111. package/dist/components/navigation/link/link.template.js.map +1 -1
  112. package/dist/components/navigation/tab-bar/tab-bar.template.js +1 -1
  113. package/dist/css/{global-system-font.css → global-open-font.css} +2 -0
  114. package/dist/css/global.css +1 -0
  115. package/dist/css/inter-font.css +47 -0
  116. package/dist/css/jetbrains-mono-font.css +22 -0
  117. package/dist/css/rijksoverheid-fonts.css +4 -21
  118. package/dist/css/themes/bruin.css +1 -0
  119. package/dist/css/themes/donkerblauw.css +1 -0
  120. package/dist/css/themes/donkerbruin.css +1 -0
  121. package/dist/css/themes/donkergeel.css +1 -0
  122. package/dist/css/themes/donkergroen.css +1 -0
  123. package/dist/css/themes/geel.css +1 -0
  124. package/dist/css/themes/groen.css +1 -0
  125. package/dist/css/themes/hemelblauw.css +1 -0
  126. package/dist/css/themes/lichtblauw.css +1 -0
  127. package/dist/css/themes/mintgroen.css +1 -0
  128. package/dist/css/themes/mosgroen.css +1 -0
  129. package/dist/css/themes/oranje.css +1 -0
  130. package/dist/css/themes/paars.css +1 -0
  131. package/dist/css/themes/robijnrood.css +1 -0
  132. package/dist/css/themes/rood.css +1 -0
  133. package/dist/css/themes/roze.css +1 -0
  134. package/dist/css/themes/violet.css +1 -0
  135. package/dist/css/themes.css +17 -0
  136. package/dist/css/tokens.css +1 -0
  137. package/dist/css/variables.css +27 -5
  138. package/dist/fonts/Inter-Latin-Italic[wght].woff2 +0 -0
  139. package/dist/fonts/Inter-LatinExt-Italic[wght].woff2 +0 -0
  140. package/dist/fonts/Inter-LatinExt[wght].woff2 +0 -0
  141. package/dist/fonts/Inter-Latin[wght].woff2 +0 -0
  142. package/dist/nldd.min.js +1765 -804
  143. package/dist/translations/en-US.d.ts.map +1 -1
  144. package/dist/translations/en-US.js +10 -0
  145. package/dist/translations/en-US.js.map +1 -1
  146. package/dist/translations/nl.generated.d.ts +10 -0
  147. package/dist/translations/nl.generated.d.ts.map +1 -1
  148. package/dist/translations/nl.generated.js +4 -0
  149. package/dist/translations/nl.generated.js.map +1 -1
  150. package/dist/types/vue.d.ts +107 -3
  151. package/dist/utilities/tab-order.d.ts +11 -0
  152. package/dist/utilities/tab-order.d.ts.map +1 -0
  153. package/dist/utilities/tab-order.js +55 -0
  154. package/dist/utilities/tab-order.js.map +1 -0
  155. package/package.json +12 -3
@@ -21,34 +21,49 @@
21
21
  * keeps its own size: a bar with a single glyph in the middle is not a bigger
22
22
  * target, only a wider one.
23
23
  *
24
+ * With `width="full"` the buttons fill the row and share it equally. A button
25
+ * whose label does not fit its share takes the width it needs, and the others
26
+ * share what is left. A button that does not fit beside the others moves to the
27
+ * next line and fills it: two buttons stack, three end up as two over one. That
28
+ * replaces the 480px rule of `auto`, and the group is no container then. With
29
+ * `orientation="horizontal"` it stays a row, and a label that does not fit wraps
30
+ * instead. An `nldd-icon-button` takes no share of the row.
31
+ *
32
+ * The group sets its `size` on every button in it: buttons in one group are the
33
+ * same size. It holds three buttons at most and hides the rest.
34
+ *
24
35
  * @element nldd-button-group
25
- * @attr {string} size - Button group size: 'sm' | 'md' (default: 'md')
36
+ * @attr {string} size - Button group size, set on every button in it: 'sm' | 'md' (default: 'md')
26
37
  * @attr {string} orientation - Layout direction: 'auto' | 'horizontal' | 'vertical' (default: 'auto')
38
+ * @attr {string} width - 'full': the buttons fill the row in equal shares, and a button that does not fit moves to a line of its own (default: unset, each button as wide as its label)
27
39
  *
28
40
  * @slot - Default slot for buttons (max 3)
29
- *
30
- * @csspart group - The button group container
31
41
  */
32
42
  import { LitElement } from 'lit';
33
43
  type Size = 'sm' | 'md';
34
44
  type Orientation = 'auto' | 'horizontal' | 'vertical';
45
+ type Width = '' | 'full';
35
46
  export declare class NLDDButtonGroup extends LitElement {
36
47
  static styles: import("lit").CSSResult;
37
48
  size: Size;
38
49
  orientation: Orientation;
50
+ width: Width;
39
51
  private _slot;
40
52
  /** DEV only: watches for the collapse below, then lets itself go. */
41
53
  private _collapseObserver;
42
54
  /** Timer holding a zero-width reading before it counts as a verdict. */
43
55
  private _collapseVerdict;
44
- handleSlotChange(): void;
56
+ /** Buttons whose size the group has set, so a size of their own can be told apart. */
57
+ private _sized;
58
+ /** @internal */
59
+ _handleSlotChange(): void;
45
60
  updated(changedProperties: Map<string, unknown>): void;
46
61
  connectedCallback(): void;
47
62
  disconnectedCallback(): void;
48
63
  /**
49
- * The group is an inline-size container while `orientation` is `auto`, so its
50
- * width has to come from its parent: a container may not size itself from its
51
- * own contents. In a parent that shrink-wraps (inline-flex, a float, a table
64
+ * The group is an inline-size container while `orientation` is `auto` and
65
+ * `width` is not `full`, so its width has to come from its parent: a
66
+ * container may not size itself from its own contents. In a parent that shrink-wraps (inline-flex, a float, a table
52
67
  * cell, a flex item at `width: auto`) there is nothing to take, the group
53
68
  * measures zero and the buttons disappear without an error.
54
69
  *
@@ -1 +1 @@
1
- {"version":3,"file":"button-group.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/button-group/button-group.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAMjC,KAAK,IAAI,GAAG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EAAqE;IACrE,OAAO,CAAC,iBAAiB,CAA+B;IACxD,wEAAwE;IACxE,OAAO,CAAC,gBAAgB,CAAK;IAE7B,sFAAsF;IACtF,OAAO,CAAC,MAAM,CAA0B;IAExC,gBAAgB;IAChB,iBAAiB,IAAI,IAAI;IAehB,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAO/C,iBAAiB,IAAI,IAAI;IAOzB,oBAAoB,IAAI,IAAI;IAKrC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,CAAC,iBAAiB;IAgCzB,OAAO,CAAC,wBAAwB;IAOvB,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,mBAAmB,EAAE,eAAe,CAAC;KACrC;CACD"}
@@ -27,48 +27,64 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
27
27
  * keeps its own size: a bar with a single glyph in the middle is not a bigger
28
28
  * target, only a wider one.
29
29
  *
30
+ * With `width="full"` the buttons fill the row and share it equally. A button
31
+ * whose label does not fit its share takes the width it needs, and the others
32
+ * share what is left. A button that does not fit beside the others moves to the
33
+ * next line and fills it: two buttons stack, three end up as two over one. That
34
+ * replaces the 480px rule of `auto`, and the group is no container then. With
35
+ * `orientation="horizontal"` it stays a row, and a label that does not fit wraps
36
+ * instead. An `nldd-icon-button` takes no share of the row.
37
+ *
38
+ * The group sets its `size` on every button in it: buttons in one group are the
39
+ * same size. It holds three buttons at most and hides the rest.
40
+ *
30
41
  * @element nldd-button-group
31
- * @attr {string} size - Button group size: 'sm' | 'md' (default: 'md')
42
+ * @attr {string} size - Button group size, set on every button in it: 'sm' | 'md' (default: 'md')
32
43
  * @attr {string} orientation - Layout direction: 'auto' | 'horizontal' | 'vertical' (default: 'auto')
44
+ * @attr {string} width - 'full': the buttons fill the row in equal shares, and a button that does not fit moves to a line of its own (default: unset, each button as wide as its label)
33
45
  *
34
46
  * @slot - Default slot for buttons (max 3)
35
- *
36
- * @csspart group - The button group container
37
47
  */
38
48
  import { LitElement } from 'lit';
39
49
  import { customElement, property, query } from 'lit/decorators.js';
40
50
  import { reflectNonDefault } from '../../../utilities/reflect-non-default.js';
41
51
  import { buttonGroupStyles } from './button-group.styles.js';
42
52
  import { template } from './button-group.template.js';
53
+ const MAX_BUTTONS = 3;
43
54
  let NLDDButtonGroup = class NLDDButtonGroup extends LitElement {
44
55
  constructor() {
45
56
  super(...arguments);
46
57
  this.size = 'md';
47
58
  this.orientation = 'auto';
59
+ this.width = '';
48
60
  /** DEV only: watches for the collapse below, then lets itself go. */
49
61
  this._collapseObserver = null;
50
62
  /** Timer holding a zero-width reading before it counts as a verdict. */
51
63
  this._collapseVerdict = 0;
64
+ /** Buttons whose size the group has set, so a size of their own can be told apart. */
65
+ this._sized = new WeakSet();
52
66
  }
53
- handleSlotChange() {
54
- const assigned = this._slot
55
- .assignedElements({ flatten: true })
56
- .filter((el) => el instanceof HTMLElement);
57
- assigned.forEach((el, index) => {
58
- if (index >= 3) {
59
- el.setAttribute('hidden', '');
60
- if (import.meta.env?.DEV)
61
- console.warn('nldd-button-group: Only 3 buttons are allowed. Extra buttons will be hidden.');
67
+ /** @internal */
68
+ _handleSlotChange() {
69
+ const assigned = this._slot.assignedElements({ flatten: true });
70
+ if (import.meta.env?.DEV && assigned.length > MAX_BUTTONS) {
71
+ console.warn(`nldd-button-group: holds ${MAX_BUTTONS} buttons at most; the rest are hidden.`);
72
+ }
73
+ for (const el of assigned) {
74
+ const own = el.getAttribute('size');
75
+ if (import.meta.env?.DEV && own !== null && own !== this.size && !this._sized.has(el)) {
76
+ console.warn(`nldd-button-group: a button has size="${own}", but the group sets size="${this.size}" on all its buttons. Set the size on the group.`);
62
77
  }
63
78
  el.setAttribute('size', this.size);
64
- });
79
+ this._sized.add(el);
80
+ }
65
81
  }
66
82
  updated(changedProperties) {
67
83
  if (changedProperties.has('size'))
68
- this.handleSlotChange();
84
+ this._handleSlotChange();
69
85
  // Switching to auto makes the group a container after the fact, so the
70
86
  // question it can then fail is only worth asking from here on.
71
- if (changedProperties.has('orientation'))
87
+ if (changedProperties.has('orientation') || changedProperties.has('width'))
72
88
  this._watchForCollapse();
73
89
  }
74
90
  connectedCallback() {
@@ -82,9 +98,9 @@ let NLDDButtonGroup = class NLDDButtonGroup extends LitElement {
82
98
  this._stopWatchingForCollapse();
83
99
  }
84
100
  /**
85
- * The group is an inline-size container while `orientation` is `auto`, so its
86
- * width has to come from its parent: a container may not size itself from its
87
- * own contents. In a parent that shrink-wraps (inline-flex, a float, a table
101
+ * The group is an inline-size container while `orientation` is `auto` and
102
+ * `width` is not `full`, so its width has to come from its parent: a
103
+ * container may not size itself from its own contents. In a parent that shrink-wraps (inline-flex, a float, a table
88
104
  * cell, a flex item at `width: auto`) there is nothing to take, the group
89
105
  * measures zero and the buttons disappear without an error.
90
106
  *
@@ -104,7 +120,7 @@ let NLDDButtonGroup = class NLDDButtonGroup extends LitElement {
104
120
  _watchForCollapse() {
105
121
  if (!import.meta.env?.DEV)
106
122
  return;
107
- if (this.orientation !== 'auto') {
123
+ if (this.orientation !== 'auto' || this.width === 'full') {
108
124
  this._stopWatchingForCollapse();
109
125
  return;
110
126
  }
@@ -157,6 +173,9 @@ __decorate([
157
173
  __decorate([
158
174
  property({ reflect: true, converter: reflectNonDefault('auto') })
159
175
  ], NLDDButtonGroup.prototype, "orientation", void 0);
176
+ __decorate([
177
+ property({ reflect: true, converter: reflectNonDefault('') })
178
+ ], NLDDButtonGroup.prototype, "width", void 0);
160
179
  __decorate([
161
180
  query('slot')
162
181
  ], NLDDButtonGroup.prototype, "_slot", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"button-group.js","sourceRoot":"","sources":["../../../../src/components/actions/button-group/button-group.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,aAAa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C,gBAAgB,GAAG,CAAC,CAAC;IAC3B,CAAC;IAEQ,MAAM;QACd,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;;AAtHe,sBAAM,GAAG,iBAAiB,AAApB,CAAqB;AAG3C;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,CAAO,IAAI,CAAC,EAAE,CAAC;6CACpD;AAGlB;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,CAAc,MAAM,CAAC,EAAE,CAAC;oDAC7C;AAGlC;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,CAAQ,EAAE,CAAC,EAAE,CAAC;8CACnD;AAGV;IADP,KAAK,CAAC,MAAM,CAAC;8CACkB;AAbpB,eAAe;IAD3B,aAAa,CAAC,mBAAmB,CAAC;GACtB,eAAe,CAwH3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"button-group.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/button-group/button-group.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,yBA+G7B,CAAC"}
1
+ {"version":3,"file":"button-group.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/button-group/button-group.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,yBAwI7B,CAAC"}
@@ -1,28 +1,24 @@
1
1
  import { css } from 'lit';
2
2
  export const buttonGroupStyles = css `
3
- :host {
4
- box-sizing: border-box;
5
- }
6
3
 
7
4
 
8
5
  /* # Host */
9
6
 
10
7
  :host {
11
- --_button-group-width: 100%;
12
8
  --_button-group-flex-direction: column;
13
9
  --_button-group-flex-wrap: nowrap;
14
10
  --_button-group-gap: var(--primitives-space-8);
15
11
 
12
+ box-sizing: border-box;
16
13
  display: flex;
17
14
  width: 100%;
18
- justify-content: flex-start;
19
15
  }
20
16
 
21
17
  /* Only auto asks its own width a question, so only auto becomes a container.
22
18
  A container may not size itself from its contents, and a group pinned to a
23
19
  row or a stack would then measure zero in a parent that shrink-wraps, for
24
- a query it never runs. */
25
- :host(:not([orientation="horizontal"], [orientation="vertical"])) {
20
+ a query it never runs. width="full" asks what fits instead. */
21
+ :host(:not([orientation="horizontal"], [orientation="vertical"], [width="full"])) {
26
22
  container-type: inline-size;
27
23
  }
28
24
 
@@ -30,6 +26,10 @@ export const buttonGroupStyles = css `
30
26
  --_button-group-gap: var(--primitives-space-6);
31
27
  }
32
28
 
29
+ :host([hidden]) {
30
+ display: none;
31
+ }
32
+
33
33
  /* ## In a row
34
34
  The row keeps the full width (like the stack) so full-width children
35
35
  can actually stretch; content-sized buttons still sit left within
@@ -53,8 +53,8 @@ export const buttonGroupStyles = css `
53
53
  beside it everywhere. */
54
54
 
55
55
  @container (max-width: 30rem) {
56
- :host(:not([orientation="horizontal"], [orientation="vertical"])) .button-group {
57
- flex-direction: column;
56
+ :host(:not([orientation="horizontal"], [orientation="vertical"], [width="full"])) .button-group {
57
+ --_button-group-flex-direction: column;
58
58
  --context-button-width: 100%;
59
59
  }
60
60
 
@@ -63,7 +63,7 @@ export const buttonGroupStyles = css `
63
63
  An icon-only control is the exception: its size is its icon, and a
64
64
  full-width bar with one glyph in the middle is not a bigger target for
65
65
  the thumb, just a wider one. */
66
- :host(:not([orientation="horizontal"], [orientation="vertical"])) ::slotted(:not(nldd-icon-button)) {
66
+ :host(:not([orientation="horizontal"], [orientation="vertical"], [width="full"])) ::slotted(:not(nldd-icon-button)) {
67
67
  display: block;
68
68
  width: 100%;
69
69
  }
@@ -71,11 +71,13 @@ export const buttonGroupStyles = css `
71
71
  /* align-self as well: a column stretches its items across the full width
72
72
  on its own, so without this the icon button is a wide bar regardless of
73
73
  the width rule above. */
74
- :host(:not([orientation="horizontal"], [orientation="vertical"])) ::slotted(nldd-icon-button) {
74
+ :host(:not([orientation="horizontal"], [orientation="vertical"], [width="full"])) ::slotted(nldd-icon-button) {
75
75
  align-self: flex-start;
76
76
  }
77
77
  }
78
78
 
79
+ /* ## Vertical */
80
+
79
81
  :host([orientation="vertical"]) .button-group {
80
82
  --context-button-width: 100%;
81
83
  }
@@ -89,14 +91,37 @@ export const buttonGroupStyles = css `
89
91
  align-self: flex-start;
90
92
  }
91
93
 
92
- :host([hidden]) {
93
- display: none;
94
+ /* ## Full width
95
+ Equal shares from zero. With auto no button shrinks below its label (or the
96
+ group), so one that does not fit wraps and fills the next line. */
97
+
98
+ :host([width="full"]:not([orientation="vertical"])) .button-group {
99
+ --context-button-width: 100%;
100
+ }
101
+
102
+ :host([width="full"][orientation="horizontal"]) .button-group {
103
+ --_button-group-flex-wrap: nowrap;
104
+ }
105
+
106
+ :host([width="full"]:not([orientation="vertical"])) ::slotted(:not(nldd-icon-button)) {
107
+ flex-grow: 1;
108
+ flex-shrink: 1;
109
+ flex-basis: 0;
110
+ }
111
+
112
+ :host([width="full"]:not([orientation="horizontal"], [orientation="vertical"])) ::slotted(:not(nldd-icon-button)) {
113
+ min-width: fit-content;
94
114
  }
95
115
 
96
- /* The stacking rules above set display on every slotted child at a higher
97
- specificity than this selector, so without !important a hidden button in
98
- a stacked group stays in the row. */
99
- ::slotted([hidden]) {
116
+ :host([width="full"]) ::slotted(nldd-icon-button) {
117
+ flex-grow: 0;
118
+ flex-shrink: 0;
119
+ }
120
+
121
+ /* The stack rules set display on slotted children at a higher specificity,
122
+ so without !important a hidden or a fourth button still shows. */
123
+ ::slotted([hidden]),
124
+ ::slotted(:nth-child(n + 4)) {
100
125
  display: none !important;
101
126
  }
102
127
 
@@ -105,7 +130,7 @@ export const buttonGroupStyles = css `
105
130
 
106
131
  .button-group {
107
132
  display: flex;
108
- width: var(--_button-group-width);
133
+ width: 100%;
109
134
  flex-direction: var(--_button-group-flex-direction);
110
135
  flex-wrap: var(--_button-group-flex-wrap);
111
136
  gap: var(--_button-group-gap);
@@ -1 +1 @@
1
- {"version":3,"file":"button-group.styles.js","sourceRoot":"","sources":["../../../../src/components/actions/button-group/button-group.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+GnC,CAAC"}
1
+ {"version":3,"file":"button-group.styles.js","sourceRoot":"","sources":["../../../../src/components/actions/button-group/button-group.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwInC,CAAC"}
@@ -2,7 +2,7 @@ import { html } from 'lit';
2
2
  export function template() {
3
3
  return html `
4
4
  <div class="button-group">
5
- <slot @slotchange=${this.handleSlotChange}></slot>
5
+ <slot @slotchange=${this._handleSlotChange}></slot>
6
6
  </div>
7
7
  `;
8
8
  }
@@ -1 +1 @@
1
- {"version":3,"file":"button-group.template.js","sourceRoot":"","sources":["../../../../src/components/actions/button-group/button-group.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAG3B,MAAM,UAAU,QAAQ;IACvB,OAAO,IAAI,CAAA;;sBAEU,IAAI,CAAC,gBAAgB;;EAEzC,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"button-group.template.js","sourceRoot":"","sources":["../../../../src/components/actions/button-group/button-group.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAG3B,MAAM,UAAU,QAAQ;IACvB,OAAO,IAAI,CAAA;;sBAEU,IAAI,CAAC,iBAAiB;;EAE1C,CAAC;AACH,CAAC"}
@@ -269,6 +269,10 @@ export declare class NLDDMenu extends LitElement {
269
269
  * has already fired (and bailed): it re-triggers activation without
270
270
  * synthesizing a MouseEvent. */
271
271
  activateItemAt(p: Point): void;
272
+ /** Padding, dividers, header and footer are still inside the menu, so
273
+ * mouseleave doesn't fire there: drop the highlight once the pointer is over
274
+ * none of the items. */
275
+ private _handleMouseover;
272
276
  private _handleMouseleave;
273
277
  private _cancelHoverOpen;
274
278
  private _handleMenuItemFocused;
@@ -425,6 +429,16 @@ export declare class NLDDMenu extends LitElement {
425
429
  /** Recalculate position and size relative to the anchor element. */
426
430
  reposition(): Promise<void>;
427
431
  private _handleKeydown;
432
+ /**
433
+ * Tab past the last item, or Shift+Tab before the first, of a menu that
434
+ * hangs off a control. The menu lives in the top layer, often in `<body>`,
435
+ * so left to the browser that Tab goes on from the end of the document and
436
+ * skips everything after the control. It closes the menu and goes on from
437
+ * the control instead: to what follows it, or back to it. A submenu leaves
438
+ * Tab to its root menu, which sees no focused item of its own and lets the
439
+ * browser move between the items.
440
+ */
441
+ private _tabOut;
428
442
  /**
429
443
  * A navigation menu closes when focus leaves it, the way a disclosure in a
430
444
  * site navigation does: Tab past the last link and the menu is gone, with
@@ -1 +1 @@
1
- {"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/menu/menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAKjC,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,qDAAqD,CAAC;AAC7D,OAAO,yDAAyD,CAAC;AACjE,OAAO,qDAAqD,CAAC;AAC7D,OAAO,4BAA4B,CAAC;AACpC,OAAO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CAAC,OAAO;IAcf;;;;;;;;;OASG;IACH,OAAO,CAAC,eAAe,CAMrB;IAEF;;;;;OAKG;IACH,OAAO,CAAC,SAAS;IAMjB,6EAA6E;IAC7E,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,aAAa,CAAC,CAAgC;IAEtD,OAAO,CAAC,gBAAgB,CAAM;IAC9B,OAAO,CAAC,eAAe,CAAuB;IAC9C;;;uBAGmB;IACnB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAO;IAElD;;;;;;;;;;OAUG;IACH,OAAO,CAAC,gBAAgB;IAgCxB;;;;;;;;;;;;;;;;OAgBG;IACI,WAAW,QAAO,IAAI,CAkB3B;IAEF,OAAO,CAAC,0BAA0B,CAAS;IAC3C,OAAO,CAAC,yBAAyB,CAAS;IAE1C,+EAA+E;IAC/E,OAAO,CAAC,0BAA0B;IAQlC,OAAO,CAAC,mBAAmB,CAEzB;IAEF,OAAO,CAAC,aAAa,CA2DnB;IAEO,MAAM;CAGf;AAMD,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,WAAW,EAAE,QAAQ,CAAC;QACtB,gBAAgB,EAAE,YAAY,CAAC;QAC/B,mBAAmB,EAAE,eAAe,CAAC;QACrC,iBAAiB,EAAE,aAAa,CAAC;KACjC;CACD"}
@@ -23,6 +23,7 @@ import { translate } from '../../../utilities/translations.js';
23
23
  import { MenuPointerController } from './menu.pointer.js';
24
24
  import { SubmenuLevel } from './menu.chain.js';
25
25
  import { SafeTriangleController, rectContainsPoint } from './menu.safe-triangle.js';
26
+ import { nextTabbableAfter } from '../../../utilities/tab-order.js';
26
27
  export { NLDDMenuItem } from './menu-item.js';
27
28
  export { NLDDMenuGroup } from './menu-group.js';
28
29
  export { NLDDMenuDivider } from './menu-divider.js';
@@ -309,6 +310,18 @@ export class NLDDMenu extends LitElement {
309
310
  return;
310
311
  this._activateItem(item);
311
312
  };
313
+ /** Padding, dividers, header and footer are still inside the menu, so
314
+ * mouseleave doesn't fire there: drop the highlight once the pointer is over
315
+ * none of the items. */
316
+ this._handleMouseover = (event) => {
317
+ if (isTouchMode() || this.variant === 'listbox')
318
+ return;
319
+ if (this._activeSubmenu || this._safeTriangle.movingToward)
320
+ return;
321
+ if (event.composedPath().some((node) => node instanceof Element && node.localName === 'nldd-menu-item'))
322
+ return;
323
+ this._clearHighlight();
324
+ };
312
325
  this._handleMouseleave = () => {
313
326
  if (this.variant !== 'listbox')
314
327
  this._clearHighlight();
@@ -484,6 +497,8 @@ export class NLDDMenu extends LitElement {
484
497
  };
485
498
  // — Private handlers ——————————————————————————————————————————————————————
486
499
  this._handleKeydown = (event) => {
500
+ if (event.key === 'Tab' && this._tabOut(event))
501
+ return;
487
502
  // Only a navigation menu closes on a Tab out; see _handleFocusOut.
488
503
  if (event.key === 'Tab' && this.variant === 'navigation') {
489
504
  this._tabbing = true;
@@ -998,6 +1013,7 @@ export class NLDDMenu extends LitElement {
998
1013
  this.addEventListener('keydown', this._handleKeydown);
999
1014
  this.addEventListener('focusout', this._handleFocusOut);
1000
1015
  this.addEventListener('mouseenter', this._handleMenuItemMouseenter, true);
1016
+ this.addEventListener('mouseover', this._handleMouseover);
1001
1017
  this.addEventListener('mouseleave', this._handleMouseleave);
1002
1018
  this.addEventListener('menu-item-focused', this._handleMenuItemFocused);
1003
1019
  this.addEventListener('submenu-open', this._handleSubmenuOpen);
@@ -1044,6 +1060,7 @@ export class NLDDMenu extends LitElement {
1044
1060
  clearTimeout(this._tabbingTimer);
1045
1061
  this._tabbing = false;
1046
1062
  this.removeEventListener('mouseenter', this._handleMenuItemMouseenter, true);
1063
+ this.removeEventListener('mouseover', this._handleMouseover);
1047
1064
  this.removeEventListener('mouseleave', this._handleMouseleave);
1048
1065
  this.removeEventListener('menu-item-focused', this._handleMenuItemFocused);
1049
1066
  this.removeEventListener('submenu-open', this._handleSubmenuOpen);
@@ -1319,6 +1336,30 @@ export class NLDDMenu extends LitElement {
1319
1336
  top: `${y}px`,
1320
1337
  });
1321
1338
  }
1339
+ /**
1340
+ * Tab past the last item, or Shift+Tab before the first, of a menu that
1341
+ * hangs off a control. The menu lives in the top layer, often in `<body>`,
1342
+ * so left to the browser that Tab goes on from the end of the document and
1343
+ * skips everything after the control. It closes the menu and goes on from
1344
+ * the control instead: to what follows it, or back to it. A submenu leaves
1345
+ * Tab to its root menu, which sees no focused item of its own and lets the
1346
+ * browser move between the items.
1347
+ */
1348
+ _tabOut(event) {
1349
+ const anchor = this._getAnchorEl();
1350
+ if (!anchor || this._isSubmenu || !this.matches(':popover-open'))
1351
+ return false;
1352
+ const items = this._getVisibleItems();
1353
+ const index = items.findIndex((item) => item.matches(':focus-within'));
1354
+ if (index === -1 || index !== (event.shiftKey ? 0 : items.length - 1))
1355
+ return false;
1356
+ event.preventDefault();
1357
+ event.stopPropagation();
1358
+ const next = event.shiftKey ? anchor : nextTabbableAfter(anchor, this);
1359
+ this.hidePopover();
1360
+ (next ?? anchor).focus();
1361
+ return true;
1362
+ }
1322
1363
  /**
1323
1364
  * Whether focus went to the control that opens this menu. Closing here
1324
1365
  * would hand the click that follows a closed menu, and it would open it