@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,83 +1,112 @@
1
1
  /**
2
2
  * Nederlandse Digitale Dienst Split Button Component (Lit + TypeScript)
3
3
  *
4
- * A split button combines a primary action button with a dropdown trigger.
5
- * The main button performs the default action, while the icon button opens a
6
- * menu or popover.
4
+ * A split button combines a primary action with a chevron that opens its
5
+ * alternatives. The main button performs the default action; the chevron opens
6
+ * a menu or popover of variants of that same action.
7
7
  *
8
- * Provide the dropdown by slotting an `nldd-menu` (with its `nldd-menu-item` /
9
- * `nldd-menu-divider` children) or an `nldd-popover` directly:
8
+ * The overlay is required. Put an `nldd-menu` or `nldd-popover` in the `popup`
9
+ * slot, as on nldd-button and nldd-icon-button:
10
10
  *
11
11
  * ```html
12
- * <nldd-split-button text="Opslaan">
13
- * <nldd-menu>
12
+ * <nldd-split-button text="Bewaar">
13
+ * <nldd-menu slot="popup">
14
14
  * <nldd-menu-item text="Opslaan als…"></nldd-menu-item>
15
15
  * </nldd-menu>
16
16
  * </nldd-split-button>
17
17
  * ```
18
18
  *
19
- * The slotted overlay stays in the light DOM — no item-moving — so consumers
20
- * keep their references and the full overlay API. The split-button anchors it
21
- * to the chevron and opens it on click. When no overlay is slotted, the chevron
22
- * dispatches `menu-click` and the consumer manages their own popover.
19
+ * The split button has no other slots, so an overlay without `slot="popup"`
20
+ * works too. When both hold one, the one in `popup` wins. For an overlay that
21
+ * lives elsewhere, point `popovertarget` at it instead.
22
+ *
23
+ * The chevron is the overlay's invoker: it anchors it, opens and closes it, and
24
+ * takes `aria-expanded` and `aria-haspopup` from it, exactly as an
25
+ * nldd-icon-button with a slotted overlay does. Its accessible name says which
26
+ * action it belongs to ("Meer opties voor Bewaar").
27
+ *
28
+ * The API is narrower than nldd-button on purpose: a split button is an action
29
+ * with variants, so it has no supporting text, no end icon and no link target.
30
+ * Its label always stays on one line, without an ellipsis: keep it short.
23
31
  *
24
32
  * @element nldd-split-button
25
33
  * @attr {string} size - Button size: 'xs' | 'sm' | 'md' | 'lg' (default: 'md')
26
- * @attr {string} appearance - Visual style (default: 'neutral-tinted'; 'inherit-tinted' and 'inherit-filled' for a colored surface)
34
+ * @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.
27
35
  * @attr {boolean} disabled - Disabled state. Avoid it: let the action run and say afterwards what is missing; the design guidelines say why.
36
+ * @attr {boolean} loading - Loading state of the main action, as on nldd-button. The chevron stays available.
37
+ * @attr {string} loading-text - What the screen reader announces while `loading` is on, as on nldd-button.
28
38
  * @attr {string} width - Width mode: 'full' (stretches to container) or any CSS length; the main action button fills the available space
29
39
  * @attr {string} text - Button text for the primary action
30
40
  * @attr {string} icon - Icon name shown before the text on the primary action button
41
+ * @attr {string} type - What the main action does in a form: 'button' (default) | 'submit' | 'reset'. Ignored when `href` is set.
42
+ * @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.
43
+ * @attr {string} href - Turns the main action into a link, as on nldd-button.
44
+ * @attr {string} download - Saves the file `href` points at instead of opening it, as on nldd-button. Only used with `href`.
45
+ * @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.
31
46
  * @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.
32
47
  * @attr {string} shortcut-mac - Override of `shortcut` on macOS, where the keys differ (falls back to `shortcut`).
33
48
  * @attr {string} shortcut-windows - Override of `shortcut` on Windows (falls back to `shortcut`).
34
49
  * @attr {string} shortcut-linux - Override of `shortcut` on Linux (falls back to `shortcut`).
35
50
  * @attr {object} translations - Translations; unset keys fall back to Dutch
36
51
  *
37
- * @slot - A single `nldd-menu` or `nldd-popover` that the chevron opens.
52
+ * @slot popup - The `nldd-menu` or `nldd-popover` the chevron opens.
53
+ * @slot - Fallback for the overlay when it has no `slot="popup"`. Anything that is not an `nldd-menu` or `nldd-popover` does nothing here.
38
54
  *
39
55
  * @fires action-click - Fired when the main button is clicked
40
- * @fires menu-click - Fired when the dropdown trigger is clicked and no overlay is slotted
41
56
  */
42
- import { LitElement } from 'lit';
57
+ import { LitElement, type PropertyValues } from 'lit';
43
58
  import type { NLDDSplitButtonTranslations } from './split-button.i18n.js';
44
59
  import './../button/button.js';
45
60
  import './../icon-button/icon-button.js';
46
61
  import '../../actions/menu/menu.js';
47
- import { PopupAnchorController } from '../../../utilities/popup-anchor-controller.js';
48
- /** A floating overlay the split-button chevron anchors and toggles. */
49
62
  export type Size = 'xs' | 'sm' | 'md' | 'lg';
63
+ export type SplitButtonAppearance = 'neutral-tinted' | 'neutral-base' | 'accent-filled' | 'primary' | 'secondary' | 'inherit-tinted' | 'inherit-filled';
50
64
  export declare class NLDDSplitButton extends LitElement {
51
65
  static styles: import("lit").CSSResult;
66
+ /** Form-associated, so a submit split button finds the form it sits in:
67
+ * its action button is in this shadow root and has no form owner. */
68
+ static formAssociated: boolean;
69
+ private _internals;
52
70
  size: Size;
53
- appearance: string;
71
+ appearance: SplitButtonAppearance;
54
72
  disabled: boolean;
73
+ /** Loading state of the main action. The chevron stays available. */
74
+ loading: boolean;
75
+ /** What the screen reader announces while `loading` is on. */
76
+ loadingText: string;
55
77
  /** Width mode: 'full' (stretch to container) or any CSS length. The main action button fills the available space. */
56
78
  width: string;
57
79
  /** Button text for the primary action. */
58
80
  text: string;
81
+ /** Icon name shown before the text on the primary action button. */
82
+ icon: string;
83
+ /** What the main action does in a form. Ignored when `href` is set. */
84
+ type: 'button' | 'submit' | 'reset';
85
+ /** Turns the main action into a link. */
86
+ href?: string;
87
+ /** Saves the file `href` points at instead of opening it. */
88
+ download?: string;
89
+ /** ID of an overlay elsewhere in this tree that the chevron opens. */
90
+ popovertarget?: string;
91
+ /** Direct reference to that overlay, for one in another tree. */
92
+ popoverTargetElement: Element | null;
59
93
  shortcut: string;
60
94
  shortcutMac: string;
61
95
  shortcutWindows: string;
62
96
  shortcutLinux: string;
63
- /** Icon name shown before the text on the primary action button. */
64
- icon: string;
65
97
  translations: Partial<NLDDSplitButtonTranslations>;
66
- private _popupButtonWrapper?;
67
- _menuIsOpen: boolean;
68
- /** Shared wiring for the consumer-slotted overlay. Anchors to the chevron's
69
- * wrapper rather than the host, and keeps `_menuIsOpen` (the chevron's
70
- * expanded visual) in step via `toggle`. Not private: the template module
71
- * binds its slotchange handler. */
72
- _popup: PopupAnchorController;
73
- _t(key: keyof NLDDSplitButtonTranslations): string;
74
- firstUpdated(): void;
75
- disconnectedCallback(): void;
76
- private _handleMenuToggle;
98
+ _t(key: keyof NLDDSplitButtonTranslations, vars?: Record<string, string | number>): string;
99
+ /** The appearance for the two buttons inside: they take the aliases'
100
+ * meaning, not the alias, so 'secondary' is never a fall-through there. */
101
+ _buttonAppearance(): string;
102
+ /** The overlay `popovertarget` names, for the chevron. Looked up in the tree
103
+ * of this host: in the chevron's own tree the id would find nothing. */
104
+ _popoverTarget(): Element | null;
77
105
  _handleActionClick(e: MouseEvent): void;
78
- _handleMenuClick(e: MouseEvent): void;
79
- willUpdate(changedProperties: Map<string, unknown>): void;
80
- render(): import("lit-html").TemplateResult<1>;
106
+ firstUpdated(): void;
107
+ private _refreshPopoverTarget;
108
+ willUpdate(changed: PropertyValues<this>): void;
109
+ render(): import("lit-html").TemplateResult;
81
110
  }
82
111
  declare global {
83
112
  interface HTMLElementTagNameMap {
@@ -1 +1 @@
1
- {"version":3,"file":"split-button.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/split-button/split-button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAOjC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,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jB,eAAe,SAAM;IAGrB,aAAa,SAAM;IAGnB,YAAY,EAAE,OAAO,CAAC,2BAA2B,CAAC,CAAM;IAIjD,EAAE,CAAC,GAAG,EAAE,MAAM,2BAA2B,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,MAAM;IAIjG;gFAC4E;IACrE,iBAAiB,IAAI,MAAM;IAQlC;6EACyE;IAClE,cAAc,IAAI,OAAO,GAAG,IAAI;IAMhC,kBAAkB,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;IAYrC,YAAY,IAAI,IAAI;IAO7B,OAAO,CAAC,qBAAqB,CAG3B;IAEO,UAAU,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAgB/C,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,mBAAmB,EAAE,eAAe,CAAC;KACrC;CACD"}
@@ -1,5 +1,5 @@
1
1
  export declare const nlddSplitButtonTranslations: {
2
- 'components.split-button.menu-action': string;
2
+ 'components.split-button.show-options-action': string;
3
3
  };
4
4
  export type NLDDSplitButtonTranslations = typeof nlddSplitButtonTranslations;
5
5
  //# sourceMappingURL=split-button.i18n.d.ts.map
@@ -1,4 +1,4 @@
1
1
  export const nlddSplitButtonTranslations = {
2
- 'components.split-button.menu-action': 'Meer opties',
2
+ 'components.split-button.show-options-action': 'Meer opties voor {text}',
3
3
  };
4
4
  //# sourceMappingURL=split-button.i18n.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"split-button.i18n.js","sourceRoot":"","sources":["../../../../src/components/actions/split-button/split-button.i18n.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,2BAA2B,GAAG;IAC1C,qCAAqC,EAAE,aAAa;CACpD,CAAC"}
1
+ {"version":3,"file":"split-button.i18n.js","sourceRoot":"","sources":["../../../../src/components/actions/split-button/split-button.i18n.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,2BAA2B,GAAG;IAC1C,6CAA6C,EAAE,yBAAyB;CACxE,CAAC"}
@@ -7,144 +7,169 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  /**
8
8
  * Nederlandse Digitale Dienst Split Button Component (Lit + TypeScript)
9
9
  *
10
- * A split button combines a primary action button with a dropdown trigger.
11
- * The main button performs the default action, while the icon button opens a
12
- * menu or popover.
10
+ * A split button combines a primary action with a chevron that opens its
11
+ * alternatives. The main button performs the default action; the chevron opens
12
+ * a menu or popover of variants of that same action.
13
13
  *
14
- * Provide the dropdown by slotting an `nldd-menu` (with its `nldd-menu-item` /
15
- * `nldd-menu-divider` children) or an `nldd-popover` directly:
14
+ * The overlay is required. Put an `nldd-menu` or `nldd-popover` in the `popup`
15
+ * slot, as on nldd-button and nldd-icon-button:
16
16
  *
17
17
  * ```html
18
- * <nldd-split-button text="Opslaan">
19
- * <nldd-menu>
18
+ * <nldd-split-button text="Bewaar">
19
+ * <nldd-menu slot="popup">
20
20
  * <nldd-menu-item text="Opslaan als…"></nldd-menu-item>
21
21
  * </nldd-menu>
22
22
  * </nldd-split-button>
23
23
  * ```
24
24
  *
25
- * The slotted overlay stays in the light DOM — no item-moving — so consumers
26
- * keep their references and the full overlay API. The split-button anchors it
27
- * to the chevron and opens it on click. When no overlay is slotted, the chevron
28
- * dispatches `menu-click` and the consumer manages their own popover.
25
+ * The split button has no other slots, so an overlay without `slot="popup"`
26
+ * works too. When both hold one, the one in `popup` wins. For an overlay that
27
+ * lives elsewhere, point `popovertarget` at it instead.
28
+ *
29
+ * The chevron is the overlay's invoker: it anchors it, opens and closes it, and
30
+ * takes `aria-expanded` and `aria-haspopup` from it, exactly as an
31
+ * nldd-icon-button with a slotted overlay does. Its accessible name says which
32
+ * action it belongs to ("Meer opties voor Bewaar").
33
+ *
34
+ * The API is narrower than nldd-button on purpose: a split button is an action
35
+ * with variants, so it has no supporting text, no end icon and no link target.
36
+ * Its label always stays on one line, without an ellipsis: keep it short.
29
37
  *
30
38
  * @element nldd-split-button
31
39
  * @attr {string} size - Button size: 'xs' | 'sm' | 'md' | 'lg' (default: 'md')
32
- * @attr {string} appearance - Visual style (default: 'neutral-tinted'; 'inherit-tinted' and 'inherit-filled' for a colored surface)
40
+ * @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.
33
41
  * @attr {boolean} disabled - Disabled state. Avoid it: let the action run and say afterwards what is missing; the design guidelines say why.
42
+ * @attr {boolean} loading - Loading state of the main action, as on nldd-button. The chevron stays available.
43
+ * @attr {string} loading-text - What the screen reader announces while `loading` is on, as on nldd-button.
34
44
  * @attr {string} width - Width mode: 'full' (stretches to container) or any CSS length; the main action button fills the available space
35
45
  * @attr {string} text - Button text for the primary action
36
46
  * @attr {string} icon - Icon name shown before the text on the primary action button
47
+ * @attr {string} type - What the main action does in a form: 'button' (default) | 'submit' | 'reset'. Ignored when `href` is set.
48
+ * @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.
49
+ * @attr {string} href - Turns the main action into a link, as on nldd-button.
50
+ * @attr {string} download - Saves the file `href` points at instead of opening it, as on nldd-button. Only used with `href`.
51
+ * @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.
37
52
  * @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.
38
53
  * @attr {string} shortcut-mac - Override of `shortcut` on macOS, where the keys differ (falls back to `shortcut`).
39
54
  * @attr {string} shortcut-windows - Override of `shortcut` on Windows (falls back to `shortcut`).
40
55
  * @attr {string} shortcut-linux - Override of `shortcut` on Linux (falls back to `shortcut`).
41
56
  * @attr {object} translations - Translations; unset keys fall back to Dutch
42
57
  *
43
- * @slot - A single `nldd-menu` or `nldd-popover` that the chevron opens.
58
+ * @slot popup - The `nldd-menu` or `nldd-popover` the chevron opens.
59
+ * @slot - Fallback for the overlay when it has no `slot="popup"`. Anything that is not an `nldd-menu` or `nldd-popover` does nothing here.
44
60
  *
45
61
  * @fires action-click - Fired when the main button is clicked
46
- * @fires menu-click - Fired when the dropdown trigger is clicked and no overlay is slotted
47
62
  */
48
63
  import { LitElement } from 'lit';
49
- import { property, query, state } from 'lit/decorators.js';
64
+ import { property } from 'lit/decorators.js';
50
65
  import { customElement } from '../../../utilities/custom-element.js';
51
66
  import { reflectNonDefault } from '../../../utilities/reflect-non-default.js';
67
+ import { internalsOf } from '../../../utilities/element-state.js';
68
+ import { ownerForm } from '../../../utilities/owner-form.js';
69
+ import { popoverTargetOf } from '../../../utilities/popover-target.js';
70
+ import { translate } from '../../../utilities/translations.js';
52
71
  import { splitButtonStyles } from './split-button.styles.js';
53
- import { template } from './split-button.template.js';
72
+ import { splitButtonTemplate } from './split-button.template.js';
54
73
  import { nlddSplitButtonTranslations } from './split-button.i18n.js';
55
74
  import './../button/button.js';
56
75
  import './../icon-button/icon-button.js';
57
76
  import '../../actions/menu/menu.js';
58
- import { PopupAnchorController } from '../../../utilities/popup-anchor-controller.js';
59
- import { translate } from '../../../utilities/translations.js';
60
77
  let NLDDSplitButton = class NLDDSplitButton extends LitElement {
61
78
  constructor() {
62
79
  super(...arguments);
80
+ this._internals = internalsOf(this);
63
81
  this.size = 'md';
64
82
  this.appearance = 'neutral-tinted';
65
83
  this.disabled = false;
84
+ /** Loading state of the main action. The chevron stays available. */
85
+ this.loading = false;
86
+ /** What the screen reader announces while `loading` is on. */
87
+ this.loadingText = '';
66
88
  /** Width mode: 'full' (stretch to container) or any CSS length. The main action button fills the available space. */
67
89
  this.width = '';
68
90
  /** Button text for the primary action. */
69
91
  this.text = '';
92
+ /** Icon name shown before the text on the primary action button. */
93
+ this.icon = '';
94
+ /** What the main action does in a form. Ignored when `href` is set. */
95
+ this.type = 'button';
96
+ /** Direct reference to that overlay, for one in another tree. */
97
+ this.popoverTargetElement = null;
70
98
  this.shortcut = '';
71
99
  this.shortcutMac = '';
72
100
  this.shortcutWindows = '';
73
101
  this.shortcutLinux = '';
74
- /** Icon name shown before the text on the primary action button. */
75
- this.icon = '';
76
102
  this.translations = {};
77
- this._menuIsOpen = false;
78
- /** Shared wiring for the consumer-slotted overlay. Anchors to the chevron's
79
- * wrapper rather than the host, and keeps `_menuIsOpen` (the chevron's
80
- * expanded visual) in step via `toggle`. Not private: the template module
81
- * binds its slotchange handler. */
82
- this._popup = new PopupAnchorController(this, {
83
- anchorFor: () => this._popupButtonWrapper ?? null,
84
- onChange: (overlay, previous) => {
85
- previous?.removeEventListener('toggle', this._handleMenuToggle);
86
- this._menuIsOpen = false;
87
- overlay?.addEventListener('toggle', this._handleMenuToggle);
88
- },
89
- });
90
- this._handleMenuToggle = (event) => {
91
- this._menuIsOpen = event.newState === 'open';
103
+ this._refreshPopoverTarget = () => {
104
+ const chevron = this.renderRoot.querySelector('.split-button__popup-button nldd-icon-button');
105
+ if (chevron)
106
+ chevron.popoverTargetElement = this._popoverTarget();
92
107
  };
93
108
  }
94
109
  // — i18n —————————————————————————————————————————————————————————————————
95
- _t(key) {
96
- return translate(this.translations, nlddSplitButtonTranslations, key);
110
+ _t(key, vars) {
111
+ return translate(this.translations, nlddSplitButtonTranslations, key, vars);
97
112
  }
98
- // — Lifecycle ————————————————————————————————————————————————————————————
99
- firstUpdated() {
100
- this._popupButtonWrapper?.addEventListener('pointerdown', this._popup.handlePointerdown);
101
- // A declaratively-slotted overlay is adopted before @query resolves the
102
- // wrapper, so it couldn't be anchored yet. The wrapper exists now.
103
- this._popup.anchor();
113
+ /** The appearance for the two buttons inside: they take the aliases'
114
+ * meaning, not the alias, so 'secondary' is never a fall-through there. */
115
+ _buttonAppearance() {
116
+ if (this.appearance === 'primary')
117
+ return 'accent-filled';
118
+ if (this.appearance === 'secondary')
119
+ return 'neutral-tinted';
120
+ return this.appearance;
104
121
  }
105
- disconnectedCallback() {
106
- super.disconnectedCallback();
107
- this._popup.overlay?.removeEventListener('toggle', this._handleMenuToggle);
122
+ // — Popover target ———————————————————————————————————————————————————————
123
+ /** The overlay `popovertarget` names, for the chevron. Looked up in the tree
124
+ * of this host: in the chevron's own tree the id would find nothing. */
125
+ _popoverTarget() {
126
+ return popoverTargetOf(this, this.popovertarget, this.popoverTargetElement);
108
127
  }
128
+ // — Handlers —————————————————————————————————————————————————————————————
109
129
  _handleActionClick(e) {
110
- if (this.disabled)
130
+ if (this.disabled || this.loading)
111
131
  return;
112
132
  e.stopPropagation();
113
133
  this.dispatchEvent(new CustomEvent('action-click', { bubbles: true, composed: true }));
114
- }
115
- _handleMenuClick(e) {
116
- if (this.disabled)
117
- return;
118
- e.stopPropagation();
119
- if (this._popup.handleClick(e))
134
+ if (this.href)
120
135
  return;
121
- this.dispatchEvent(new CustomEvent('menu-click', { bubbles: true, composed: true }));
136
+ const form = ownerForm(this, this._internals);
137
+ if (this.type === 'submit')
138
+ form?.requestSubmit();
139
+ else if (this.type === 'reset')
140
+ form?.reset();
141
+ }
142
+ // — Lifecycle ————————————————————————————————————————————————————————————
143
+ firstUpdated() {
144
+ // Capture, so it runs before the chevron's own click handler reads its
145
+ // target, for a keyboard click as well: an overlay rendered after this
146
+ // split button was not there on its last render.
147
+ this.renderRoot.querySelector('.split-button__popup-button')?.addEventListener('click', this._refreshPopoverTarget, true);
122
148
  }
123
- // willUpdate (not updated) so the host width is resolved before the first
124
- // render rather than one frame after it — otherwise an explicit width
125
- // briefly flashes at the auto default.
126
- willUpdate(changedProperties) {
127
- if (changedProperties.has('width')) {
128
- // 'full' switches the host to block + 100% via CSS; a valid CSS length
129
- // is applied inline. Either way --_split-button-width drives the inner layout so the
130
- // split-button stretches and the main button fills the free space.
149
+ willUpdate(changed) {
150
+ if (changed.has('width')) {
151
+ // 'full' is CSS on the host. A CSS length goes into local variables
152
+ // only, so a width the app sets on the host itself still wins. Set
153
+ // before the render, so an explicit width never shows at auto first.
131
154
  const w = this.width;
132
- const isFull = w === 'full';
133
- const isValidLength = !!w && !isFull && CSS.supports('width', w);
134
- this.style.width = isValidLength ? w : '';
135
- if (isFull || isValidLength) {
155
+ if (w && w !== 'full' && CSS.supports('width', w)) {
156
+ this.style.setProperty('--_split-button-host-width', w);
136
157
  this.style.setProperty('--_split-button-width', '100%');
137
158
  }
138
159
  else {
160
+ this.style.removeProperty('--_split-button-host-width');
139
161
  this.style.removeProperty('--_split-button-width');
140
162
  }
141
163
  }
142
164
  }
143
165
  render() {
144
- return template.call(this);
166
+ return splitButtonTemplate(this);
145
167
  }
146
168
  };
147
169
  NLDDSplitButton.styles = splitButtonStyles;
170
+ /** Form-associated, so a submit split button finds the form it sits in:
171
+ * its action button is in this shadow root and has no form owner. */
172
+ NLDDSplitButton.formAssociated = true;
148
173
  __decorate([
149
174
  property({ reflect: true, converter: reflectNonDefault('md') })
150
175
  ], NLDDSplitButton.prototype, "size", void 0);
@@ -154,12 +179,36 @@ __decorate([
154
179
  __decorate([
155
180
  property({ type: Boolean, reflect: true })
156
181
  ], NLDDSplitButton.prototype, "disabled", void 0);
182
+ __decorate([
183
+ property({ type: Boolean, reflect: true })
184
+ ], NLDDSplitButton.prototype, "loading", void 0);
185
+ __decorate([
186
+ property({ attribute: 'loading-text' })
187
+ ], NLDDSplitButton.prototype, "loadingText", void 0);
157
188
  __decorate([
158
189
  property({ reflect: true, converter: reflectNonDefault('') })
159
190
  ], NLDDSplitButton.prototype, "width", void 0);
160
191
  __decorate([
161
192
  property({ reflect: true, converter: reflectNonDefault('') })
162
193
  ], NLDDSplitButton.prototype, "text", void 0);
194
+ __decorate([
195
+ property({ type: String })
196
+ ], NLDDSplitButton.prototype, "icon", void 0);
197
+ __decorate([
198
+ property({ reflect: true, converter: reflectNonDefault('button') })
199
+ ], NLDDSplitButton.prototype, "type", void 0);
200
+ __decorate([
201
+ property()
202
+ ], NLDDSplitButton.prototype, "href", void 0);
203
+ __decorate([
204
+ property()
205
+ ], NLDDSplitButton.prototype, "download", void 0);
206
+ __decorate([
207
+ property()
208
+ ], NLDDSplitButton.prototype, "popovertarget", void 0);
209
+ __decorate([
210
+ property({ attribute: false })
211
+ ], NLDDSplitButton.prototype, "popoverTargetElement", void 0);
163
212
  __decorate([
164
213
  property({ reflect: true, converter: reflectNonDefault('') })
165
214
  ], NLDDSplitButton.prototype, "shortcut", void 0);
@@ -172,18 +221,9 @@ __decorate([
172
221
  __decorate([
173
222
  property({ reflect: true, attribute: 'shortcut-linux', converter: reflectNonDefault('') })
174
223
  ], NLDDSplitButton.prototype, "shortcutLinux", void 0);
175
- __decorate([
176
- property({ type: String })
177
- ], NLDDSplitButton.prototype, "icon", void 0);
178
224
  __decorate([
179
225
  property({ type: Object })
180
226
  ], NLDDSplitButton.prototype, "translations", void 0);
181
- __decorate([
182
- query('.split-button__popup-button')
183
- ], NLDDSplitButton.prototype, "_popupButtonWrapper", void 0);
184
- __decorate([
185
- state()
186
- ], NLDDSplitButton.prototype, "_menuIsOpen", void 0);
187
227
  NLDDSplitButton = __decorate([
188
228
  customElement('nldd-split-button')
189
229
  ], NLDDSplitButton);
@@ -1 +1 @@
1
- {"version":3,"file":"split-button.js","sourceRoot":"","sources":["../../../../src/components/actions/split-button/split-button.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EA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EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,CAAS,EAAE,CAAC,EAAE,CAAC;8CAC3D;AAIX;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,CAAS,EAAE,CAAC,EAAE,CAAC;6CAC5D;AAGV;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,CAAS,EAAE,CAAC,EAAE,CAAC;iDACxD;AAGd;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,iBAAiB,CAAS,EAAE,CAAC,EAAE,CAAC;oDAChF;AAGjB;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,kBAAkB,EAAE,SAAS,EAAE,iBAAiB,CAAS,EAAE,CAAC,EAAE,CAAC;wDAChF;AAGrB;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,gBAAgB,EAAE,SAAS,EAAE,iBAAiB,CAAS,EAAE,CAAC,EAAE,CAAC;sDAChF;AAInB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CACjB;AAGV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qDAC6B;AAKhD;IADP,KAAK,CAAC,6BAA6B,CAAC;4DACQ;AAG7C;IADC,KAAK,EAAE;oDACY;AA7CR,eAAe;IAD3B,aAAa,CAAC,mBAAmB,CAAC;GACtB,eAAe,CAwH3B"}
1
+ {"version":3,"file":"split-button.js","sourceRoot":"","sources":["../../../../src/components/actions/split-button/split-button.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,OAAO,EAAE,UAAU,EAAuB,MAAM,KAAK,CAAC;AACtD,OA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;AAGjB;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,kBAAkB,EAAE,SAAS,EAAE,iBAAiB,CAAS,EAAE,CAAC,EAAE,CAAC;wDAChF;AAGrB;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,gBAAgB,EAAE,SAAS,EAAE,iBAAiB,CAAS,EAAE,CAAC,EAAE,CAAC;sDAChF;AAGnB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qDAC6B;AAtE5C,eAAe;IAD3B,aAAa,CAAC,mBAAmB,CAAC;GACtB,eAAe,CA2I3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"split-button.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/split-button/split-button.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,yBAiI7B,CAAC"}
1
+ {"version":3,"file":"split-button.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/split-button/split-button.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,yBAqI7B,CAAC"}
@@ -15,9 +15,11 @@ export const splitButtonStyles = css `
15
15
  --_split-button-highlight-border-color: var(--semantics-buttons-neutral-tinted-highlight-border-color);
16
16
  --_split-button-divider-length: var(--semantics-buttons-md-divider-length);
17
17
  --_split-button-width: auto;
18
+ --_split-button-host-width: auto;
18
19
 
19
20
  ${inheritedTextReset}
20
21
  display: inline-flex;
22
+ width: var(--_split-button-host-width);
21
23
  isolation: isolate;
22
24
  -webkit-tap-highlight-color: transparent;
23
25
  }
@@ -76,6 +78,8 @@ export const splitButtonStyles = css `
76
78
  display: none;
77
79
  }
78
80
 
81
+ /* The host fades, not its buttons: the highlight border is drawn here and
82
+ has to fade with them. */
79
83
  :host([disabled]) {
80
84
  opacity: var(--primitives-opacity-disabled);
81
85
  pointer-events: none;
@@ -1 +1 @@
1
- {"version":3,"file":"split-button.styles.js","sourceRoot":"","sources":["../../../../src/components/actions/split-button/split-button.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;IAgBhC,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiHrB,CAAC"}
1
+ {"version":3,"file":"split-button.styles.js","sourceRoot":"","sources":["../../../../src/components/actions/split-button/split-button.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;IAiBhC,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoHrB,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { type TemplateResult } from 'lit';
1
2
  import type { NLDDSplitButton } from './split-button.js';
2
- export declare function template(this: NLDDSplitButton): import("lit-html").TemplateResult<1>;
3
+ export declare function splitButtonTemplate(component: NLDDSplitButton): TemplateResult;
3
4
  //# sourceMappingURL=split-button.template.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"split-button.template.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/split-button/split-button.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,wBAAgB,QAAQ,CAAC,IAAI,EAAE,eAAe,wCAqC7C"}
1
+ {"version":3,"file":"split-button.template.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/split-button/split-button.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,eAAe,GAAG,cAAc,CA0C9E"}
@@ -1,40 +1,45 @@
1
1
  import { html, nothing } from 'lit';
2
- export function template() {
2
+ export function splitButtonTemplate(component) {
3
3
  return html `
4
4
  <div class="split-button">
5
5
  <nldd-button
6
- appearance=${this.appearance}
7
- size=${this.size}
8
- text=${this.text}
9
- start-icon=${this.icon || nothing}
10
- shortcut=${this.shortcut || nothing}
11
- shortcut-mac=${this.shortcutMac || nothing}
12
- shortcut-windows=${this.shortcutWindows || nothing}
13
- shortcut-linux=${this.shortcutLinux || nothing}
6
+ appearance=${component._buttonAppearance()}
7
+ size=${component.size}
8
+ text=${component.text}
9
+ start-icon=${component.icon || nothing}
10
+ shortcut=${component.shortcut || nothing}
11
+ shortcut-mac=${component.shortcutMac || nothing}
12
+ shortcut-windows=${component.shortcutWindows || nothing}
13
+ shortcut-linux=${component.shortcutLinux || nothing}
14
+ href=${component.href || nothing}
15
+ download=${component.download ?? nothing}
16
+ loading-text=${component.loadingText || nothing}
14
17
  horizontal-alignment="left"
15
18
  width="full"
16
19
  no-highlight-border
17
- ?disabled=${this.disabled}
18
- @click=${this._handleActionClick}
20
+ single-line
21
+ ?loading=${component.loading}
22
+ ?disabled=${component.disabled}
23
+ @click=${component._handleActionClick}
19
24
  ></nldd-button>
20
25
  <div class="split-button__divider"></div>
21
26
  <div class="split-button__popup-button">
22
27
  <nldd-icon-button
23
- appearance=${this.appearance}
24
- size=${this.size}
28
+ appearance=${component._buttonAppearance()}
29
+ size=${component.size}
25
30
  icon="chevron-down-small"
26
- text=${this._t('components.split-button.menu-action')}
31
+ text=${component._t('components.split-button.show-options-action', { text: component.text })}
27
32
  tooltip-timing="never"
28
33
  no-highlight-border
29
34
  hide-lg-text
30
- ?disabled=${this.disabled}
31
- ?expanded=${this._menuIsOpen}
32
- popup-type="menu"
33
- @click=${this._handleMenuClick}
34
- ></nldd-icon-button>
35
+ ?disabled=${component.disabled}
36
+ .popoverTargetElement=${component._popoverTarget()}
37
+ >
38
+ <slot name="popup" slot="popup"></slot>
39
+ <slot slot="popup"></slot>
40
+ </nldd-icon-button>
35
41
  </div>
36
42
  </div>
37
- <slot @slotchange=${this._popup.handleSlotChange}></slot>
38
43
  `;
39
44
  }
40
45
  //# sourceMappingURL=split-button.template.js.map