@nldd/design-system 0.10.0 → 0.12.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 (267) hide show
  1. package/custom-elements.json +3084 -784
  2. package/dist/components/actions/button/button.d.ts +10 -0
  3. package/dist/components/actions/button/button.d.ts.map +1 -1
  4. package/dist/components/actions/button/button.js +23 -0
  5. package/dist/components/actions/button/button.js.map +1 -1
  6. package/dist/components/actions/button/button.styles.d.ts.map +1 -1
  7. package/dist/components/actions/button/button.styles.js +22 -0
  8. package/dist/components/actions/button/button.styles.js.map +1 -1
  9. package/dist/components/actions/button/button.template.d.ts +1 -0
  10. package/dist/components/actions/button/button.template.d.ts.map +1 -1
  11. package/dist/components/actions/button/button.template.js +20 -2
  12. package/dist/components/actions/button/button.template.js.map +1 -1
  13. package/dist/components/actions/icon-button/icon-button.d.ts +10 -0
  14. package/dist/components/actions/icon-button/icon-button.d.ts.map +1 -1
  15. package/dist/components/actions/icon-button/icon-button.js +23 -0
  16. package/dist/components/actions/icon-button/icon-button.js.map +1 -1
  17. package/dist/components/actions/icon-button/icon-button.template.d.ts.map +1 -1
  18. package/dist/components/actions/icon-button/icon-button.template.js +10 -3
  19. package/dist/components/actions/icon-button/icon-button.template.js.map +1 -1
  20. package/dist/components/actions/menu/menu.styles.js +1 -1
  21. package/dist/components/actions/split-button/split-button.d.ts +8 -0
  22. package/dist/components/actions/split-button/split-button.d.ts.map +1 -1
  23. package/dist/components/actions/split-button/split-button.js +20 -0
  24. package/dist/components/actions/split-button/split-button.js.map +1 -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 +4 -0
  27. package/dist/components/actions/split-button/split-button.template.js.map +1 -1
  28. package/dist/components/components.js +2857 -1993
  29. package/dist/components/content/code-viewer/code-viewer.d.ts +14 -1
  30. package/dist/components/content/code-viewer/code-viewer.d.ts.map +1 -1
  31. package/dist/components/content/code-viewer/code-viewer.diff.d.ts +40 -0
  32. package/dist/components/content/code-viewer/code-viewer.diff.d.ts.map +1 -0
  33. package/dist/components/content/code-viewer/code-viewer.diff.js +261 -0
  34. package/dist/components/content/code-viewer/code-viewer.diff.js.map +1 -0
  35. package/dist/components/content/code-viewer/code-viewer.i18n.d.ts +5 -0
  36. package/dist/components/content/code-viewer/code-viewer.i18n.d.ts.map +1 -1
  37. package/dist/components/content/code-viewer/code-viewer.i18n.js +9 -0
  38. package/dist/components/content/code-viewer/code-viewer.i18n.js.map +1 -1
  39. package/dist/components/content/code-viewer/code-viewer.js +98 -6
  40. package/dist/components/content/code-viewer/code-viewer.js.map +1 -1
  41. package/dist/components/content/code-viewer/code-viewer.styles.d.ts.map +1 -1
  42. package/dist/components/content/code-viewer/code-viewer.styles.js +134 -1
  43. package/dist/components/content/code-viewer/code-viewer.styles.js.map +1 -1
  44. package/dist/components/content/code-viewer/code-viewer.template.d.ts.map +1 -1
  45. package/dist/components/content/code-viewer/code-viewer.template.js +5 -4
  46. package/dist/components/content/code-viewer/code-viewer.template.js.map +1 -1
  47. package/dist/components/content/icon/icon-aliases.d.ts.map +1 -1
  48. package/dist/components/content/icon/icon-aliases.js +13 -4
  49. package/dist/components/content/icon/icon-aliases.js.map +1 -1
  50. package/dist/components/content/icon/icon-gallery-status.d.ts.map +1 -1
  51. package/dist/components/content/icon/icon-gallery-status.js +9 -0
  52. package/dist/components/content/icon/icon-gallery-status.js.map +1 -1
  53. package/dist/components/content/icon/icon-registry.d.ts.map +1 -1
  54. package/dist/components/content/icon/icon-registry.js +9 -2
  55. package/dist/components/content/icon/icon-registry.js.map +1 -1
  56. package/dist/components/content/keyboard-shortcut/keyboard-shortcut.d.ts +3 -3
  57. package/dist/components/content/keyboard-shortcut/keyboard-shortcut.d.ts.map +1 -1
  58. package/dist/components/content/keyboard-shortcut/keyboard-shortcut.js +6 -21
  59. package/dist/components/content/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
  60. package/dist/components/content/keyboard-shortcut/keyboard-shortcut.styles.d.ts.map +1 -1
  61. package/dist/components/content/keyboard-shortcut/keyboard-shortcut.styles.js +3 -0
  62. package/dist/components/content/keyboard-shortcut/keyboard-shortcut.styles.js.map +1 -1
  63. package/dist/components/content/rich-text/rich-text.d.ts +10 -0
  64. package/dist/components/content/rich-text/rich-text.d.ts.map +1 -1
  65. package/dist/components/content/rich-text/rich-text.js +10 -0
  66. package/dist/components/content/rich-text/rich-text.js.map +1 -1
  67. package/dist/components/content/tooltip/tooltip.d.ts +14 -0
  68. package/dist/components/content/tooltip/tooltip.d.ts.map +1 -1
  69. package/dist/components/content/tooltip/tooltip.js +45 -6
  70. package/dist/components/content/tooltip/tooltip.js.map +1 -1
  71. package/dist/components/content/tooltip/tooltip.styles.d.ts.map +1 -1
  72. package/dist/components/content/tooltip/tooltip.styles.js +13 -0
  73. package/dist/components/content/tooltip/tooltip.styles.js.map +1 -1
  74. package/dist/components/content/tooltip/tooltip.template.d.ts.map +1 -1
  75. package/dist/components/content/tooltip/tooltip.template.js +18 -2
  76. package/dist/components/content/tooltip/tooltip.template.js.map +1 -1
  77. package/dist/components/{dist-Bo5Jeyfn.js → dist-B5E3q-ea.js} +2 -1
  78. package/dist/components/{dist-DbNhCpS5.js → dist-BFw_yEMS.js} +2 -1
  79. package/dist/components/{dist-DnZmcpbQ.js → dist-BNLAXAyO.js} +2 -1
  80. package/dist/components/{dist-DkqAbJH8.js → dist-BOVSVPSz.js} +1 -1
  81. package/dist/components/{dist-Ch3gNAuT.js → dist-BPB3rWnd.js} +2 -1
  82. package/dist/components/{dist-Bud_7w5g.js → dist-BWlUmyq3.js} +34 -2869
  83. package/dist/components/dist-CC8oiVtm.js +366 -0
  84. package/dist/components/dist-COKR0tYU.js +2860 -0
  85. package/dist/components/{dist-CaxHkqR2.js → dist-Co-tsc9S.js} +4 -3
  86. package/dist/components/{dist-iC2RTM0V.js → dist-D_9ZyZ5v.js} +3 -2
  87. package/dist/components/{dist-BB5mlo7D.js → dist-Dn9pjiud.js} +3 -2
  88. package/dist/components/{dist-B2QcygzG.js → dist-Dz28se9B.js} +2 -1
  89. package/dist/components/{dist-CA0yDFIt.js → dist-IPm8ilWf.js} +3 -2
  90. package/dist/components/{icon-D_ZGezHx.js → icon-DFhgRf3P.js} +19 -7
  91. package/dist/components/{icon-button-BVhiOwX9.js → icon-button-Sxkh5cVr.js} +526 -61
  92. package/dist/components/inputs/code-editor/code-editor.d.ts +4 -54
  93. package/dist/components/inputs/code-editor/code-editor.d.ts.map +1 -1
  94. package/dist/components/inputs/code-editor/code-editor.js +22 -262
  95. package/dist/components/inputs/code-editor/code-editor.js.map +1 -1
  96. package/dist/components/inputs/code-editor/code-editor.styles.d.ts.map +1 -1
  97. package/dist/components/inputs/code-editor/code-editor.styles.js +9 -1
  98. package/dist/components/inputs/code-editor/code-editor.styles.js.map +1 -1
  99. package/dist/components/inputs/date-picker/date-picker.styles.d.ts.map +1 -1
  100. package/dist/components/inputs/date-picker/date-picker.styles.js +29 -5
  101. package/dist/components/inputs/date-picker/date-picker.styles.js.map +1 -1
  102. package/dist/components/inputs/search-field/search-field.d.ts +11 -0
  103. package/dist/components/inputs/search-field/search-field.d.ts.map +1 -1
  104. package/dist/components/inputs/search-field/search-field.js +30 -1
  105. package/dist/components/inputs/search-field/search-field.js.map +1 -1
  106. package/dist/components/inputs/search-field/search-field.styles.d.ts.map +1 -1
  107. package/dist/components/inputs/search-field/search-field.styles.js +18 -0
  108. package/dist/components/inputs/search-field/search-field.styles.js.map +1 -1
  109. package/dist/components/inputs/search-field/search-field.template.d.ts.map +1 -1
  110. package/dist/components/inputs/search-field/search-field.template.js +12 -0
  111. package/dist/components/inputs/search-field/search-field.template.js.map +1 -1
  112. package/dist/components/inputs/segmented-control/segmented-control.d.ts +10 -0
  113. package/dist/components/inputs/segmented-control/segmented-control.d.ts.map +1 -1
  114. package/dist/components/inputs/segmented-control/segmented-control.js +25 -1
  115. package/dist/components/inputs/segmented-control/segmented-control.js.map +1 -1
  116. package/dist/components/inputs/segmented-control/segmented-control.template.d.ts.map +1 -1
  117. package/dist/components/inputs/segmented-control/segmented-control.template.js +20 -3
  118. package/dist/components/inputs/segmented-control/segmented-control.template.js.map +1 -1
  119. package/dist/components/inputs/text-editor/text-editor.annotation-sentinels.d.ts.map +1 -1
  120. package/dist/components/inputs/text-editor/text-editor.annotation-sentinels.js +9 -7
  121. package/dist/components/inputs/text-editor/text-editor.annotation-sentinels.js.map +1 -1
  122. package/dist/components/inputs/text-editor/text-editor.annotations.js +1 -1
  123. package/dist/components/inputs/text-editor/text-editor.annotations.js.map +1 -1
  124. package/dist/components/inputs/text-editor/text-editor.clipboard.d.ts +16 -0
  125. package/dist/components/inputs/text-editor/text-editor.clipboard.d.ts.map +1 -0
  126. package/dist/components/inputs/text-editor/text-editor.clipboard.js +50 -0
  127. package/dist/components/inputs/text-editor/text-editor.clipboard.js.map +1 -0
  128. package/dist/components/inputs/text-editor/text-editor.commands.d.ts.map +1 -1
  129. package/dist/components/inputs/text-editor/text-editor.commands.js +31 -58
  130. package/dist/components/inputs/text-editor/text-editor.commands.js.map +1 -1
  131. package/dist/components/inputs/text-editor/text-editor.d.ts +17 -64
  132. package/dist/components/inputs/text-editor/text-editor.d.ts.map +1 -1
  133. package/dist/components/inputs/text-editor/text-editor.drag.d.ts.map +1 -1
  134. package/dist/components/inputs/text-editor/text-editor.drag.js +2 -1
  135. package/dist/components/inputs/text-editor/text-editor.drag.js.map +1 -1
  136. package/dist/components/inputs/text-editor/text-editor.focus-selection.d.ts +3 -0
  137. package/dist/components/inputs/text-editor/text-editor.focus-selection.d.ts.map +1 -0
  138. package/dist/components/inputs/text-editor/text-editor.focus-selection.js +55 -0
  139. package/dist/components/inputs/text-editor/text-editor.focus-selection.js.map +1 -0
  140. package/dist/components/inputs/text-editor/text-editor.hidden-syntax.d.ts +6 -0
  141. package/dist/components/inputs/text-editor/text-editor.hidden-syntax.d.ts.map +1 -0
  142. package/dist/components/inputs/text-editor/text-editor.hidden-syntax.js +257 -0
  143. package/dist/components/inputs/text-editor/text-editor.hidden-syntax.js.map +1 -0
  144. package/dist/components/inputs/text-editor/text-editor.js +93 -313
  145. package/dist/components/inputs/text-editor/text-editor.js.map +1 -1
  146. package/dist/components/inputs/text-editor/text-editor.keymap.d.ts +6 -0
  147. package/dist/components/inputs/text-editor/text-editor.keymap.d.ts.map +1 -0
  148. package/dist/components/inputs/text-editor/text-editor.keymap.js +38 -0
  149. package/dist/components/inputs/text-editor/text-editor.keymap.js.map +1 -0
  150. package/dist/components/inputs/text-editor/text-editor.links.d.ts.map +1 -1
  151. package/dist/components/inputs/text-editor/text-editor.links.js +11 -9
  152. package/dist/components/inputs/text-editor/text-editor.links.js.map +1 -1
  153. package/dist/components/inputs/text-editor/text-editor.markdown.d.ts +1 -17
  154. package/dist/components/inputs/text-editor/text-editor.markdown.d.ts.map +1 -1
  155. package/dist/components/inputs/text-editor/text-editor.markdown.js +26 -186
  156. package/dist/components/inputs/text-editor/text-editor.markdown.js.map +1 -1
  157. package/dist/components/inputs/text-editor/text-editor.mention.d.ts +52 -0
  158. package/dist/components/inputs/text-editor/text-editor.mention.d.ts.map +1 -0
  159. package/dist/components/inputs/text-editor/text-editor.mention.js +186 -0
  160. package/dist/components/inputs/text-editor/text-editor.mention.js.map +1 -0
  161. package/dist/components/inputs/text-editor/text-editor.mentions.d.ts +0 -16
  162. package/dist/components/inputs/text-editor/text-editor.mentions.d.ts.map +1 -1
  163. package/dist/components/inputs/text-editor/text-editor.mentions.js +1 -41
  164. package/dist/components/inputs/text-editor/text-editor.mentions.js.map +1 -1
  165. package/dist/components/inputs/text-editor/text-editor.selection.d.ts +13 -0
  166. package/dist/components/inputs/text-editor/text-editor.selection.d.ts.map +1 -0
  167. package/dist/components/inputs/text-editor/text-editor.selection.js +62 -0
  168. package/dist/components/inputs/text-editor/text-editor.selection.js.map +1 -0
  169. package/dist/components/inputs/text-editor/text-editor.spellcheck.d.ts.map +1 -1
  170. package/dist/components/inputs/text-editor/text-editor.spellcheck.js +4 -6
  171. package/dist/components/inputs/text-editor/text-editor.spellcheck.js.map +1 -1
  172. package/dist/components/inputs/text-editor/text-editor.styles.d.ts.map +1 -1
  173. package/dist/components/inputs/text-editor/text-editor.styles.js +185 -64
  174. package/dist/components/inputs/text-editor/text-editor.styles.js.map +1 -1
  175. package/dist/components/inputs/text-editor/text-editor.syntax.d.ts +22 -0
  176. package/dist/components/inputs/text-editor/text-editor.syntax.d.ts.map +1 -1
  177. package/dist/components/inputs/text-editor/text-editor.syntax.js +44 -0
  178. package/dist/components/inputs/text-editor/text-editor.syntax.js.map +1 -1
  179. package/dist/components/inputs/toggle-button/toggle-button.d.ts +10 -0
  180. package/dist/components/inputs/toggle-button/toggle-button.d.ts.map +1 -1
  181. package/dist/components/inputs/toggle-button/toggle-button.js +25 -1
  182. package/dist/components/inputs/toggle-button/toggle-button.js.map +1 -1
  183. package/dist/components/inputs/toggle-button/toggle-button.template.d.ts.map +1 -1
  184. package/dist/components/inputs/toggle-button/toggle-button.template.js +21 -7
  185. package/dist/components/inputs/toggle-button/toggle-button.template.js.map +1 -1
  186. package/dist/components/layout/card/card.styles.js +4 -4
  187. package/dist/components/layout/container/container.d.ts +2 -0
  188. package/dist/components/layout/container/container.d.ts.map +1 -1
  189. package/dist/components/layout/container/container.js +9 -0
  190. package/dist/components/layout/container/container.js.map +1 -1
  191. package/dist/components/layout/container/container.styles.d.ts.map +1 -1
  192. package/dist/components/layout/container/container.styles.js +13 -0
  193. package/dist/components/layout/container/container.styles.js.map +1 -1
  194. package/dist/components/lists-and-tables/cells/step-cell/step-cell.styles.d.ts.map +1 -1
  195. package/dist/components/lists-and-tables/cells/step-cell/step-cell.styles.js +9 -5
  196. package/dist/components/lists-and-tables/cells/step-cell/step-cell.styles.js.map +1 -1
  197. package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.d.ts.map +1 -1
  198. package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.js +16 -15
  199. package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.js.map +1 -1
  200. package/dist/components/navigation/menu-bar-item/menu-bar-item.styles.js +2 -2
  201. package/dist/components/navigation/tab-bar/tab-bar.styles.js +9 -9
  202. package/dist/components/status-and-feedback/activity-indicator/activity-indicator.d.ts +16 -9
  203. package/dist/components/status-and-feedback/activity-indicator/activity-indicator.d.ts.map +1 -1
  204. package/dist/components/status-and-feedback/activity-indicator/activity-indicator.js +16 -9
  205. package/dist/components/status-and-feedback/activity-indicator/activity-indicator.js.map +1 -1
  206. package/dist/components/status-and-feedback/activity-indicator/activity-indicator.styles.d.ts.map +1 -1
  207. package/dist/components/status-and-feedback/activity-indicator/activity-indicator.styles.js +23 -18
  208. package/dist/components/status-and-feedback/activity-indicator/activity-indicator.styles.js.map +1 -1
  209. package/dist/components/status-and-feedback/activity-indicator/activity-indicator.template.d.ts.map +1 -1
  210. package/dist/components/status-and-feedback/activity-indicator/activity-indicator.template.js +19 -21
  211. package/dist/components/status-and-feedback/activity-indicator/activity-indicator.template.js.map +1 -1
  212. package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.js +1 -1
  213. package/dist/components/status-and-feedback/notification/notification.d.ts +2 -1
  214. package/dist/components/status-and-feedback/notification/notification.d.ts.map +1 -1
  215. package/dist/components/status-and-feedback/notification/notification.js +5 -2
  216. package/dist/components/status-and-feedback/notification/notification.js.map +1 -1
  217. package/dist/components/status-and-feedback/notification/notification.styles.d.ts.map +1 -1
  218. package/dist/components/status-and-feedback/notification/notification.styles.js +19 -1
  219. package/dist/components/status-and-feedback/notification/notification.styles.js.map +1 -1
  220. package/dist/components/status-and-feedback/notification/notifications-area.d.ts.map +1 -1
  221. package/dist/components/status-and-feedback/notification/notifications-area.js +14 -0
  222. package/dist/components/status-and-feedback/notification/notifications-area.js.map +1 -1
  223. package/dist/components/status-and-feedback/progress-bar/progress-bar.styles.js +4 -4
  224. package/dist/components/status-and-feedback/progress-circle/progress-circle.styles.js +3 -3
  225. package/dist/components/status-and-feedback/progress-circle/progress-circle.template.js +1 -1
  226. package/dist/components/status-and-feedback/progress-circle/progress-circle.template.js.map +1 -1
  227. package/dist/components/status-and-feedback/step-bar/step-bar.styles.d.ts.map +1 -1
  228. package/dist/components/status-and-feedback/step-bar/step-bar.styles.js +7 -5
  229. package/dist/components/status-and-feedback/step-bar/step-bar.styles.js.map +1 -1
  230. package/dist/css/rich-text.css +61 -1
  231. package/dist/css/themes/bruin.css +108 -64
  232. package/dist/css/themes/donkerblauw.css +108 -64
  233. package/dist/css/themes/donkerbruin.css +88 -64
  234. package/dist/css/themes/donkergeel.css +149 -94
  235. package/dist/css/themes/donkergroen.css +93 -64
  236. package/dist/css/themes/geel.css +149 -94
  237. package/dist/css/themes/groen.css +108 -64
  238. package/dist/css/themes/hemelblauw.css +108 -64
  239. package/dist/css/themes/lichtblauw.css +111 -64
  240. package/dist/css/themes/mintgroen.css +111 -64
  241. package/dist/css/themes/mosgroen.css +108 -64
  242. package/dist/css/themes/oranje.css +162 -99
  243. package/dist/css/themes/paars.css +115 -64
  244. package/dist/css/themes/robijnrood.css +159 -96
  245. package/dist/css/themes/rood.css +159 -96
  246. package/dist/css/themes/roze.css +118 -64
  247. package/dist/css/themes/violet.css +93 -64
  248. package/dist/css/themes.css +2047 -1247
  249. package/dist/css/variables.css +142 -70
  250. package/dist/nldd.min.js +1468 -998
  251. package/dist/translations/en-US.d.ts.map +1 -1
  252. package/dist/translations/en-US.js +5 -0
  253. package/dist/translations/en-US.js.map +1 -1
  254. package/dist/translations/nl.generated.d.ts +5 -0
  255. package/dist/translations/nl.generated.d.ts.map +1 -1
  256. package/dist/types/vue.d.ts +138 -32
  257. package/dist/utilities/codemirror/codemirror-input.d.ts +90 -0
  258. package/dist/utilities/codemirror/codemirror-input.d.ts.map +1 -0
  259. package/dist/utilities/codemirror/codemirror-input.js +250 -0
  260. package/dist/utilities/codemirror/codemirror-input.js.map +1 -0
  261. package/dist/utilities/codemirror/theme.js +1 -1
  262. package/dist/utilities/codemirror/theme.js.map +1 -1
  263. package/dist/utilities/shortcut.d.ts +50 -0
  264. package/dist/utilities/shortcut.d.ts.map +1 -0
  265. package/dist/utilities/shortcut.js +77 -0
  266. package/dist/utilities/shortcut.js.map +1 -0
  267. package/package.json +2 -1
@@ -1,13 +1,372 @@
1
1
  import { t as inheritedTextReset } from "./shadow-resets-CPa58rmc.js";
2
2
  import { a as linkRel, i as linkHintKey, r as translate, t as withTranslations } from "./with-translations-C6QfP6_S.js";
3
- import { t as __decorate } from "./decorate-CO88j7Lc.js";
4
3
  import { t as reflectNonDefault } from "./reflect-non-default-OLaK60rT.js";
5
- import "./icon-D_ZGezHx.js";
4
+ import { t as __decorate } from "./decorate-CO88j7Lc.js";
5
+ import "./icon-DFhgRf3P.js";
6
6
  import { r as isTouchMode } from "./input-modality-DhTeUxKi.js";
7
7
  import { LitElement, css, html, nothing } from "lit";
8
8
  import { customElement, property, state } from "lit/decorators.js";
9
9
  import { classMap } from "lit/directives/class-map.js";
10
10
  import { computePosition, flip, offset, shift } from "@floating-ui/dom";
11
+ //#region src/utilities/os.ts
12
+ var cached = null;
13
+ var override = null;
14
+ function classify(platform) {
15
+ const p = platform.toLowerCase();
16
+ if (/mac|iphone|ipad|ipod|ios/.test(p)) return "mac";
17
+ if (/win/.test(p)) return "windows";
18
+ if (/android/.test(p)) return "other";
19
+ if (/linux|cros/.test(p)) return "linux";
20
+ return "other";
21
+ }
22
+ function detectOS() {
23
+ if (override !== null) return override;
24
+ if (cached !== null) return cached;
25
+ if (typeof navigator === "undefined") {
26
+ cached = "other";
27
+ return cached;
28
+ }
29
+ const nav = navigator;
30
+ cached = classify(nav.userAgentData?.platform || nav.platform || "");
31
+ return cached;
32
+ }
33
+ //#endregion
34
+ //#region src/utilities/shortcut.ts
35
+ function hasShortcut(hint) {
36
+ return Boolean(hint.shortcut || hint.shortcutMac || hint.shortcutWindows || hint.shortcutLinux);
37
+ }
38
+ /** The key spec for this OS, with `keys` as the fallback. */
39
+ function resolveKeys(spec, os) {
40
+ if (os === "mac" && spec.macKeys) return spec.macKeys;
41
+ if (os === "windows" && spec.windowsKeys) return spec.windowsKeys;
42
+ if (os === "linux" && spec.linuxKeys) return spec.linuxKeys;
43
+ return spec.keys;
44
+ }
45
+ /** Splits 'Ctrl+Shift+P' into keys; a trailing '++' ('Ctrl++') or '+++' is a literal '+' key. */
46
+ function parseKeys(spec) {
47
+ if (!spec) return [];
48
+ const compact = spec.trim().replace(/\s*\+\s*/g, "+");
49
+ if (compact === "+") return ["+"];
50
+ const MARKER = "\0";
51
+ return compact.replace(/\+\+\+/g, `+${MARKER}+`).replace(/\+\+$/, `+${MARKER}`).split("+").map((k) => k.trim().split(MARKER).join("+")).filter(Boolean);
52
+ }
53
+ var NO_SHORTCUTS_QUERY = "(any-hover: none)";
54
+ /** Whether a keyboard shortcut can be used on this device, so a hint for it is worth showing. */
55
+ function shortcutsAvailable() {
56
+ return typeof matchMedia !== "function" || !matchMedia(NO_SHORTCUTS_QUERY).matches;
57
+ }
58
+ /**
59
+ * Renders the host again when shortcuts become available or unavailable, such
60
+ * as when a pointer is attached or removed, so a shortcut in its accessible
61
+ * name follows the visible hint. Pass `onChange` for work that a render does
62
+ * not redo.
63
+ */
64
+ var ShortcutAvailabilityController = class {
65
+ constructor(host, onChange) {
66
+ this._query = typeof matchMedia === "function" ? matchMedia(NO_SHORTCUTS_QUERY) : null;
67
+ this._handleChange = () => this._onChange();
68
+ this._onChange = onChange ?? (() => host.requestUpdate());
69
+ host.addController(this);
70
+ }
71
+ hostConnected() {
72
+ this._query?.addEventListener("change", this._handleChange);
73
+ }
74
+ hostDisconnected() {
75
+ this._query?.removeEventListener("change", this._handleChange);
76
+ }
77
+ };
78
+ /**
79
+ * The shortcut as words for an accessible name ("Ctrl Z"), matching how
80
+ * nldd-menu-item is announced. Empty without a shortcut, and where
81
+ * shortcutsAvailable() says the key cannot be pressed, as the hint is hidden
82
+ * there too. Read when the component renders; ShortcutAvailabilityController
83
+ * renders it again when that changes.
84
+ */
85
+ function shortcutLabel(hint) {
86
+ if (!hasShortcut(hint) || !shortcutsAvailable()) return "";
87
+ return parseKeys(resolveKeys({
88
+ keys: hint.shortcut,
89
+ macKeys: hint.shortcutMac,
90
+ windowsKeys: hint.shortcutWindows,
91
+ linuxKeys: hint.shortcutLinux
92
+ }, detectOS())).join(" ");
93
+ }
94
+ //#endregion
95
+ //#region src/components/content/keyboard-shortcut/keyboard-shortcut.styles.ts
96
+ var keyboardShortcutStyles = css`
97
+ :host {
98
+ box-sizing: border-box;
99
+ }
100
+
101
+
102
+ /* # Host */
103
+
104
+ :host {
105
+ --_keyboard-shortcut-size: var(--primitives-space-24);
106
+ --_keyboard-shortcut-inline-padding: var(--primitives-space-4);
107
+ --_keyboard-shortcut-font-family: var(--primitives-font-family-monospace);
108
+ --_keyboard-shortcut-font-size: var(--primitives-font-size-80);
109
+ --_keyboard-shortcut-font-weight: var(--primitives-font-weight-body-regular);
110
+ --_keyboard-shortcut-line-height: var(--primitives-line-height-flat);
111
+ --_keyboard-shortcut-content-color: var(--semantics-content-color);
112
+ --_keyboard-shortcut-separator-color: var(--semantics-content-secondary-color);
113
+ --_keyboard-shortcut-highlight-border-color: light-dark(var(--primitives-color-neutral-150), var(--primitives-color-neutral-250));
114
+ --_keyboard-shortcut-background-color: var(--semantics-surfaces-tinted-background-color);
115
+ --_keyboard-shortcut-border-width: var(--primitives-border-width-thin);
116
+ --_keyboard-shortcut-corner-radius: var(--primitives-corner-radius-xs);
117
+
118
+ ${inheritedTextReset}
119
+ display: inline-flex;
120
+ vertical-align: middle;
121
+ }
122
+
123
+ :host([color="inherit"]) {
124
+ --_keyboard-shortcut-content-color: currentColor;
125
+ --_keyboard-shortcut-separator-color: currentColor;
126
+ --_keyboard-shortcut-highlight-border-color: color-mix(in oklab, var(--semantics-content-contrast-color) 10%, transparent);
127
+ --_keyboard-shortcut-background-color: color-mix(in oklab, var(--semantics-content-contrast-color) 20%, transparent);
128
+ }
129
+
130
+ :host([size="sm"]) {
131
+ --_keyboard-shortcut-size: var(--primitives-space-20);
132
+ --_keyboard-shortcut-font-size: var(--primitives-font-size-70);
133
+ }
134
+
135
+ :host([size="inherit"]) {
136
+ --_keyboard-shortcut-size: 1.5em;
137
+ --_keyboard-shortcut-inline-padding: 0.35em;
138
+ --_keyboard-shortcut-font-size: 0.75em;
139
+ }
140
+
141
+ :host([appearance="simple"]) {
142
+ --_keyboard-shortcut-font-family: var(--primitives-font-family-body);
143
+ --_keyboard-shortcut-font-size: var(--primitives-font-size-100);
144
+
145
+ vertical-align: baseline;
146
+ }
147
+
148
+ :host([appearance="simple"][size="sm"]) {
149
+ --_keyboard-shortcut-font-size: var(--primitives-font-size-90);
150
+ }
151
+
152
+ :host([appearance="simple"][size="inherit"]) {
153
+ --_keyboard-shortcut-font-size: inherit;
154
+ }
155
+
156
+ :host([hidden]) {
157
+ display: none;
158
+ }
159
+
160
+ /* Same query as shortcutsAvailable() in utilities/shortcut.ts. */
161
+ @media (any-hover: none) {
162
+ :host(:not([always-visible])) {
163
+ display: none;
164
+ }
165
+ }
166
+
167
+
168
+ /* # Block */
169
+
170
+ .keyboard-shortcut {
171
+ display: inline-flex;
172
+ gap: var(--primitives-space-2);
173
+ align-items: center;
174
+ }
175
+
176
+ :host([size="inherit"]) .keyboard-shortcut {
177
+ position: relative;
178
+ top: -0.05em;
179
+ }
180
+
181
+ :host([size="inherit"][appearance="simple"]) .keyboard-shortcut {
182
+ position: static;
183
+ }
184
+
185
+
186
+ /* # Elements */
187
+
188
+ .keyboard-shortcut__key {
189
+ box-sizing: border-box;
190
+ display: inline-flex;
191
+ box-shadow: inset 0 0 0 var(--_keyboard-shortcut-border-width) var(--_keyboard-shortcut-highlight-border-color);
192
+ border-radius: var(--_keyboard-shortcut-corner-radius);
193
+ background-color: var(--_keyboard-shortcut-background-color);
194
+ min-width: var(--_keyboard-shortcut-size);
195
+ height: var(--_keyboard-shortcut-size);
196
+ padding: 0 var(--_keyboard-shortcut-inline-padding);
197
+ align-items: center;
198
+ justify-content: center;
199
+ color: var(--_keyboard-shortcut-content-color);
200
+ font-family: var(--_keyboard-shortcut-font-family);
201
+ font-size: var(--_keyboard-shortcut-font-size);
202
+ font-weight: var(--_keyboard-shortcut-font-weight);
203
+ line-height: var(--_keyboard-shortcut-line-height);
204
+ white-space: nowrap;
205
+ }
206
+
207
+ :host([appearance="simple"]) .keyboard-shortcut {
208
+ gap: 0;
209
+ }
210
+
211
+ :host([appearance="simple"]) .keyboard-shortcut__key {
212
+ box-shadow: none;
213
+ background-color: transparent;
214
+ border-radius: 0;
215
+ min-width: 0;
216
+ height: auto;
217
+ padding: 0;
218
+ }
219
+
220
+ @media (forced-colors: active) {
221
+ .keyboard-shortcut__key {
222
+ color: CanvasText;
223
+ }
224
+
225
+ :host(:not([appearance="simple"])) .keyboard-shortcut__key {
226
+ border: var(--_keyboard-shortcut-border-width) solid CanvasText;
227
+ background-color: Canvas;
228
+ }
229
+ }
230
+
231
+ .keyboard-shortcut__separator {
232
+ color: var(--_keyboard-shortcut-separator-color);
233
+ font-family: var(--_keyboard-shortcut-font-family);
234
+ font-size: var(--_keyboard-shortcut-font-size);
235
+ font-weight: var(--_keyboard-shortcut-font-weight);
236
+ line-height: var(--_keyboard-shortcut-line-height);
237
+ }
238
+ `;
239
+ //#endregion
240
+ //#region src/components/content/keyboard-shortcut/keyboard-shortcut.template.ts
241
+ function template$1(component) {
242
+ const keys = component._parsedKeys;
243
+ if (keys.length === 0) return html`
244
+ <kbd class="keyboard-shortcut">
245
+ <slot></slot>
246
+ </kbd>
247
+ `;
248
+ return html`
249
+ <kbd class="keyboard-shortcut">
250
+ ${keys.map((key, index) => html`
251
+ ${index > 0 ? html`<span class="keyboard-shortcut__separator"
252
+ aria-hidden="true"
253
+ >+</span>` : ""}
254
+ <kbd class="keyboard-shortcut__key">${key}</kbd>
255
+ `)}
256
+ </kbd>
257
+ `;
258
+ }
259
+ //#endregion
260
+ //#region src/components/content/keyboard-shortcut/keyboard-shortcut.ts
261
+ /**
262
+ * Nederlandse Digitale Dienst Keyboard Shortcut Component (Lit + TypeScript)
263
+ *
264
+ * Shows a key combination (such as Cmd+K or Ctrl+Shift+P) in one combined
265
+ * container with a semantic <kbd> element per key.
266
+ *
267
+ * On touch-only devices (no hover-capable input) the shortcut is hidden by
268
+ * default, because it cannot be invoked there. Use the `always-visible`
269
+ * attribute when the shortcut is purely informative and should stay visible.
270
+ *
271
+ * For cross-platform shortcuts you can set `mac-keys`, `windows-keys` and
272
+ * `linux-keys`. The component picks the right one from the detected OS, with
273
+ * `keys` as the fallback for unknown platforms.
274
+ *
275
+ * @element nldd-keyboard-shortcut
276
+ * @attr {string} keys - Keys separated by '+' (e.g. 'Cmd+K' or 'Ctrl+Shift+P').
277
+ * End with '++' for a literal '+' key: 'Ctrl++' becomes 'Ctrl' + '+' ('Ctrl+++'
278
+ * works too). For more complex cases, such as a combo with several '+' keys,
279
+ * use the default slot with your own <kbd> elements instead of the keys attribute.
280
+ * @attr {string} mac-keys - Optional override for macOS (iPhone/iPad/iPod included).
281
+ * @attr {string} windows-keys - Optional override for Windows.
282
+ * @attr {string} linux-keys - Optional override for Linux/ChromeOS.
283
+ * @attr {string} size - Size: 'sm' | 'md' | 'inherit' (default: 'md'). 'inherit' takes the
284
+ * font-size from the container; in the box variant the keycaps then scale along in em.
285
+ * @attr {string} appearance - 'box' (default) shows each key as a keycap with a fill and a
286
+ * highlight edge. 'simple' shows the keys as plain text with separators: lighter, for
287
+ * inline use such as in a menu item.
288
+ * @attr {boolean} always-visible - Show on touch-only devices too, where shortcuts cannot be invoked.
289
+ * @attr {string} color - 'neutral' (default) uses the component colors of its own. 'inherit'
290
+ * lets the keys and separators follow the surrounding text color (currentColor), with a
291
+ * translucent contrast fill and highlight edge. Useful on a filled surface color or a
292
+ * highlighted row.
293
+ * @attr {'mac'|'windows'|'linux'|'other'} debug-os - Development aid: overrides the OS
294
+ * detection for this instance, so you can show several platform variants side by side in
295
+ * Storybook or documentation. Not meant for production use; leave it empty (default) so
296
+ * the real OS detection applies.
297
+ *
298
+ * @slot - Optional custom <kbd> elements. Ignored when keys is set.
299
+ */
300
+ var _NLDDKeyboardShortcut = class NLDDKeyboardShortcut extends LitElement {
301
+ constructor(..._args) {
302
+ super(..._args);
303
+ this.keys = "";
304
+ this.macKeys = "";
305
+ this.windowsKeys = "";
306
+ this.linuxKeys = "";
307
+ this.size = "md";
308
+ this.appearance = "box";
309
+ this.color = "neutral";
310
+ this.alwaysVisible = false;
311
+ this.debugOS = "";
312
+ }
313
+ /** @internal Resolved OS — the debug override when set, else detection. */
314
+ get _resolvedOS() {
315
+ return this.debugOS || detectOS();
316
+ }
317
+ get _resolvedKeys() {
318
+ return resolveKeys(this, this._resolvedOS);
319
+ }
320
+ get _parsedKeys() {
321
+ return parseKeys(this._resolvedKeys);
322
+ }
323
+ render() {
324
+ return template$1(this);
325
+ }
326
+ };
327
+ var NLDDKeyboardShortcut = (_NLDDKeyboardShortcut.styles = keyboardShortcutStyles, _NLDDKeyboardShortcut);
328
+ __decorate([property({
329
+ reflect: true,
330
+ converter: reflectNonDefault("")
331
+ })], NLDDKeyboardShortcut.prototype, "keys", void 0);
332
+ __decorate([property({
333
+ reflect: true,
334
+ attribute: "mac-keys",
335
+ converter: reflectNonDefault("")
336
+ })], NLDDKeyboardShortcut.prototype, "macKeys", void 0);
337
+ __decorate([property({
338
+ reflect: true,
339
+ attribute: "windows-keys",
340
+ converter: reflectNonDefault("")
341
+ })], NLDDKeyboardShortcut.prototype, "windowsKeys", void 0);
342
+ __decorate([property({
343
+ reflect: true,
344
+ attribute: "linux-keys",
345
+ converter: reflectNonDefault("")
346
+ })], NLDDKeyboardShortcut.prototype, "linuxKeys", void 0);
347
+ __decorate([property({
348
+ reflect: true,
349
+ converter: reflectNonDefault("md")
350
+ })], NLDDKeyboardShortcut.prototype, "size", void 0);
351
+ __decorate([property({
352
+ reflect: true,
353
+ converter: reflectNonDefault("box")
354
+ })], NLDDKeyboardShortcut.prototype, "appearance", void 0);
355
+ __decorate([property({
356
+ reflect: true,
357
+ converter: reflectNonDefault("neutral")
358
+ })], NLDDKeyboardShortcut.prototype, "color", void 0);
359
+ __decorate([property({
360
+ type: Boolean,
361
+ reflect: true,
362
+ attribute: "always-visible"
363
+ })], NLDDKeyboardShortcut.prototype, "alwaysVisible", void 0);
364
+ __decorate([property({
365
+ type: String,
366
+ attribute: "debug-os"
367
+ })], NLDDKeyboardShortcut.prototype, "debugOS", void 0);
368
+ NLDDKeyboardShortcut = __decorate([customElement("nldd-keyboard-shortcut")], NLDDKeyboardShortcut);
369
+ //#endregion
11
370
  //#region src/utilities/popup-anchor-controller.ts
12
371
  var OVERLAY_SELECTOR = "nldd-menu, nldd-popover";
13
372
  var PopupAnchorController = class {
@@ -78,7 +437,7 @@ var activityIndicatorStyles = css`
78
437
  --_activity-indicator-pulse-easing: ease-in-out;
79
438
  --_activity-indicator-max-width: var(--primitives-area-240);
80
439
  --_activity-indicator-gap: var(--primitives-space-4);
81
- --_activity-indicator-text-font: var(--primitives-font-body-sm-regular-flat);
440
+ --_activity-indicator-text-font: var(--primitives-font-body-md-regular-flat);
82
441
  --_activity-indicator-backdrop-blur: 3px;
83
442
  --_activity-indicator-overlay-panel-padding: var(--primitives-space-12);
84
443
  --_activity-indicator-overlay-panel-corner-radius: var(--primitives-corner-radius-md);
@@ -123,20 +482,28 @@ var activityIndicatorStyles = css`
123
482
  :host([size="80"]) { --_activity-indicator-circle-size: var(--primitives-space-80); }
124
483
  :host([size="96"]) { --_activity-indicator-circle-size: var(--primitives-space-96); }
125
484
 
485
+ :host([size="16"]),
486
+ :host([size="20"]) {
487
+ --_activity-indicator-text-font: var(--primitives-font-body-xs-regular-flat);
488
+ }
489
+
490
+ :host([size="24"]),
491
+ :host([size="28"]) {
492
+ --_activity-indicator-text-font: var(--primitives-font-body-sm-regular-flat);
493
+ }
494
+
126
495
 
127
496
  /* # Block
128
- Stacks the default circle + label as a centered column. width:100% +
129
- max-width gives a slotted progress-bar a width to fill; the fixed-size
130
- circle and the label stay centered via align-items. */
497
+ Stacks the circle + label as a centered column; max-width wraps a long
498
+ label. */
131
499
 
132
500
  .activity-indicator {
133
501
  /* position:relative so it paints above the absolutely-positioned backdrop
134
- (both are z-index:auto; the backdrop comes first in the DOM). Hidden by
135
- default; the loading host attribute fades it (and the backdrop) in and
136
- out — opacity + display via transition-behavior: allow-discrete, with a
137
- starting-style for the entry. */
502
+ (both are z-index:auto; the backdrop comes first in the DOM). Laid out
503
+ but invisible during the delay, so the host holds its size until complete. */
138
504
  position: relative;
139
- display: none;
505
+ display: flex;
506
+ visibility: hidden;
140
507
  opacity: 0;
141
508
  pointer-events: none;
142
509
  width: 100%;
@@ -144,17 +511,21 @@ var activityIndicatorStyles = css`
144
511
  flex-direction: column;
145
512
  align-items: center;
146
513
  gap: var(--_activity-indicator-gap);
147
- transition-property: opacity, display;
514
+ transition-property: opacity, visibility, display;
148
515
  transition-duration: var(--_activity-indicator-fade-duration);
149
516
  transition-timing-function: var(--_activity-indicator-fade-easing);
150
517
  transition-behavior: allow-discrete;
151
518
  }
152
519
 
153
520
  :host([loading]) .activity-indicator {
154
- display: flex;
521
+ visibility: visible;
155
522
  opacity: 1;
156
523
  }
157
524
 
525
+ :host([complete]) .activity-indicator {
526
+ display: none;
527
+ }
528
+
158
529
  @starting-style {
159
530
  :host([loading]) .activity-indicator {
160
531
  opacity: 0;
@@ -220,13 +591,6 @@ var activityIndicatorStyles = css`
220
591
  }
221
592
  }
222
593
 
223
- /* display:contents so the default circle + label (or a slotted override)
224
- are direct flex items of the block. */
225
- slot {
226
- display: contents;
227
- }
228
-
229
-
230
594
  /* # Elements */
231
595
 
232
596
  /* The whole SVG (stroke included) scales with the size, like an icon. */
@@ -313,30 +677,28 @@ function activityIndicatorTemplate(component) {
313
677
  </div>
314
678
  ${renderBackdrop ? html`<div class="activity-indicator__backdrop" aria-hidden="true"></div>` : nothing}
315
679
  <div class="activity-indicator">
316
- <slot name="indicator">
317
- <svg class="activity-indicator__circle"
318
- viewBox="0 0 24 24"
319
- fill="none"
320
- aria-hidden="true"
321
- focusable="false"
322
- >
323
- <circle class="activity-indicator__track"
324
- cx="12"
325
- cy="12"
326
- r="9"
327
- ></circle>
328
- <circle class="activity-indicator__indicator"
329
- cx="12"
330
- cy="12"
331
- r="9"
332
- pathLength="100"
333
- ></circle>
334
- </svg>
335
- <span class=${classMap({
680
+ <svg class="activity-indicator__circle"
681
+ viewBox="0 0 24 24"
682
+ fill="none"
683
+ aria-hidden="true"
684
+ focusable="false"
685
+ >
686
+ <circle class="activity-indicator__track"
687
+ cx="12"
688
+ cy="12"
689
+ r="9"
690
+ ></circle>
691
+ <circle class="activity-indicator__indicator"
692
+ cx="12"
693
+ cy="12"
694
+ r="9"
695
+ pathLength="100"
696
+ ></circle>
697
+ </svg>
698
+ <span class=${classMap({
336
699
  "activity-indicator__text": true,
337
700
  "activity-indicator__text--visually-hidden": !component.showText
338
701
  })}>${text}</span>
339
- </slot>
340
702
  </div>
341
703
  `;
342
704
  }
@@ -354,15 +716,27 @@ var nlddActivityIndicatorTranslations = { "components.activity-indicator.loading
354
716
  * `timing="instant"` to skip the delay (the fade-in still plays) — this is
355
717
  * what embedding components such as `nldd-button` use for their loading state.
356
718
  *
719
+ * Sizing: fills its parent where the parent lets it (a flex column such as
720
+ * `nldd-container`, a grid, or a fixed height) and centers itself there. Where
721
+ * the parent has no height of its own, give it one: a `min-height` matching
722
+ * the content you expect, such as `<nldd-container min-height="240px">`. As a
723
+ * safety net the host already takes the indicator's size (circle, plus the
724
+ * label with `show-text`) during the delay, so nothing shifts when it fades
725
+ * in; once `complete` is set it gives that space up.
726
+ *
727
+ * Label size follows `size`, not the surrounding text, so the circle and its
728
+ * label keep the same proportion everywhere: body-xs at 16 and 20, body-sm at
729
+ * 24 and 28, body-md from 32. Keep the label short; a longer explanation
730
+ * belongs in the area as regular text.
731
+ *
357
732
  * The default indicator is a simple icon-sized circle that follows the shared
358
733
  * `--context-content-color` channel (set by list-item / table / menu on their
359
734
  * content), falling back to `currentColor` wherever that channel is unset
360
735
  * (buttons, rich-text, standalone) — so a spinner inside a cell tracks the
361
736
  * row's state-aware content color, while embedders relying on currentColor are
362
737
  * unaffected. An optional label sits below (hidden unless `show-text` is set).
363
- * Drop a
364
- * `<nldd-progress-circle>`, `<nldd-progress-bar>` or any element in the
365
- * `indicator` slot to override it.
738
+ * The indicator is always indeterminate; when you know the progress, show
739
+ * `nldd-progress-bar` or `nldd-progress-circle` instead.
366
740
  *
367
741
  * Icon alignment: the visible ring already sits at 5/6 of its box (the SVG's
368
742
  * r=9 plus a 2-unit stroke in a 24 view-box, the same optical inset a filled
@@ -402,13 +776,8 @@ var nlddActivityIndicatorTranslations = { "components.activity-indicator.loading
402
776
  *
403
777
  * @slot - Content to wrap (overlay mode); made inert while loading. Leave empty
404
778
  * for the standalone placeholder.
405
- * @slot indicator - Optional custom indicator; overrides the default circle (and
406
- * its visually-hidden label). Consumers replacing it supply their own indicator
407
- * semantics; the host's role="status" still marks the loading region.
408
779
  *
409
- * @migration The custom-indicator override moved from the default slot to the
410
- * `indicator` slot, since the default slot now holds wrapped content:
411
- * `<nldd-progress-bar slot="indicator">`.
780
+ * @migration The `indicator` slot has been removed. Show a known progress with `nldd-progress-bar` or `nldd-progress-circle` directly, without the activity indicator around it.
412
781
  */
413
782
  var _NLDDActivityIndicator;
414
783
  /** Delay before the indicator fades in. Brief loading states finish within
@@ -965,6 +1334,7 @@ var tooltipStyles = css`
965
1334
  --_tooltip-box-shadow: var(--primitives-box-shadows-level-2);
966
1335
  --_tooltip-background-color: light-dark(var(--primitives-color-neutral-600), var(--primitives-color-neutral-750));
967
1336
  --_tooltip-content-color: var(--primitives-color-neutral-0);
1337
+ --_tooltip-shortcut-gap: var(--primitives-space-8);
968
1338
  --_tooltip-hide-delay: 50; /* unitless ms, read by JavaScript */
969
1339
  --_tooltip-offset: 4; /* px, unitless — read by JS */
970
1340
  --_tooltip-shift-padding: 8; /* px, unitless — read by JS */
@@ -1030,6 +1400,7 @@ var tooltipStyles = css`
1030
1400
  /* ## Tooltip body */
1031
1401
 
1032
1402
  .tooltip__body {
1403
+ display: flex;
1033
1404
  border-radius: var(--primitives-corner-radius-xs);
1034
1405
  box-shadow: var(--_tooltip-box-shadow);
1035
1406
  background-color: var(--_tooltip-background-color);
@@ -1037,11 +1408,22 @@ var tooltipStyles = css`
1037
1408
  max-width: var(--_tooltip-max-width);
1038
1409
  padding-block: var(--primitives-space-4);
1039
1410
  padding-inline: var(--primitives-space-8);
1411
+ flex-wrap: wrap;
1412
+ column-gap: var(--_tooltip-shortcut-gap);
1413
+ align-items: baseline;
1040
1414
  color: var(--_tooltip-content-color);
1041
1415
  font: var(--primitives-font-body-xs-regular-tight);
1042
1416
  overflow-wrap: break-word;
1043
1417
  }
1044
1418
 
1419
+ .tooltip__text {
1420
+ min-width: 0;
1421
+ }
1422
+
1423
+ .tooltip__shortcut {
1424
+ white-space: nowrap;
1425
+ }
1426
+
1045
1427
  @media (forced-colors: active) {
1046
1428
  .tooltip__body {
1047
1429
  border: 1px solid CanvasText;
@@ -1065,7 +1447,22 @@ function tooltipTemplate(component) {
1065
1447
  @mouseenter=${component._handleTooltipEnter}
1066
1448
  @mouseleave=${component._handleTooltipLeave}
1067
1449
  >
1068
- <div class="tooltip__body">${component.text}</div>
1450
+ <div class="tooltip__body">
1451
+ ${component.text ? html`<span class="tooltip__text">${component.text}</span>` : nothing}
1452
+ ${hasShortcut(component) ? html`
1453
+ <span class="tooltip__shortcut">
1454
+ <nldd-keyboard-shortcut
1455
+ size="inherit"
1456
+ appearance="simple"
1457
+ color="inherit"
1458
+ keys=${component.shortcut || nothing}
1459
+ mac-keys=${component.shortcutMac || nothing}
1460
+ windows-keys=${component.shortcutWindows || nothing}
1461
+ linux-keys=${component.shortcutLinux || nothing}
1462
+ ></nldd-keyboard-shortcut>
1463
+ </span>
1464
+ ` : nothing}
1465
+ </div>
1069
1466
  </div>
1070
1467
  `;
1071
1468
  }
@@ -1079,6 +1476,10 @@ function tooltipTemplate(component) {
1079
1476
  *
1080
1477
  * @element nldd-tooltip
1081
1478
  * @attr {string} text - Tooltip text
1479
+ * @attr {string} shortcut - Keyboard shortcut hint shown after the text, e.g. 'Cmd+P'. Display only (rendered via nldd-keyboard-shortcut): it does not bind the key. Joins the description of a light-DOM trigger. Hidden on touch-only devices, where it isn't invokable.
1480
+ * @attr {string} shortcut-mac - Override of `shortcut` on macOS, where the keys differ (falls back to `shortcut`).
1481
+ * @attr {string} shortcut-windows - Override of `shortcut` on Windows (falls back to `shortcut`).
1482
+ * @attr {string} shortcut-linux - Override of `shortcut` on Linux (falls back to `shortcut`).
1082
1483
  * @attr {boolean} open - Forces the tooltip visible, whatever hover or focus does. Use it for programmatic feedback ("Copied", for instance). Reset it to false to restore the hover behavior.
1083
1484
  * @attr {string} placement - Position: 'top' | 'bottom' | 'left' | 'right' (default: 'bottom'; automatically 'top' on touch devices)
1084
1485
  * @attr {string} timing - When the tooltip appears on hover: 'instant' — right away, without a show delay. 'delay' (the default) — after the standard show delay (700ms). 'never' — the tooltip is never shown; hover and focus events are ignored, aria-describedby is suppressed, and a tooltip that is already visible disappears. The hide delay and the touch suppression stay in force under every value. A focus trigger is always instant.
@@ -1124,6 +1525,10 @@ var NLDDTooltip = (_NLDDTooltip = class NLDDTooltip extends LitElement {
1124
1525
  constructor(..._args) {
1125
1526
  super(..._args);
1126
1527
  this.text = "";
1528
+ this.shortcut = "";
1529
+ this.shortcutMac = "";
1530
+ this.shortcutWindows = "";
1531
+ this.shortcutLinux = "";
1127
1532
  this.open = false;
1128
1533
  this.placement = "bottom";
1129
1534
  this.timing = "delay";
@@ -1134,6 +1539,7 @@ var NLDDTooltip = (_NLDDTooltip = class NLDDTooltip extends LitElement {
1134
1539
  this._descriptionEl = null;
1135
1540
  this._currentTrigger = null;
1136
1541
  this._boundSlotChange = () => this._syncAriaDescribedBy();
1542
+ this._shortcutAvailability = new ShortcutAvailabilityController(this, () => this._syncAriaDescribedBy());
1137
1543
  this._positionVersion = 0;
1138
1544
  this._handleKeyDown = (e) => {
1139
1545
  if (e.key !== "Escape" || !this._visible) return;
@@ -1191,7 +1597,7 @@ var NLDDTooltip = (_NLDDTooltip = class NLDDTooltip extends LitElement {
1191
1597
  } else if (tooltip.matches(":popover-open")) tooltip.hidePopover();
1192
1598
  }
1193
1599
  }
1194
- if (changed.has("text") || changed.has("timing")) this._syncAriaDescribedBy();
1600
+ if (changed.has("text") || changed.has("timing") || changed.has("shortcut") || changed.has("shortcutMac") || changed.has("shortcutWindows") || changed.has("shortcutLinux")) this._syncAriaDescribedBy();
1195
1601
  if (changed.has("text") && this._visible) this._updatePosition();
1196
1602
  if (changed.has("timing") && this.timing === "never") {
1197
1603
  if (this._showTimeout) {
@@ -1207,7 +1613,8 @@ var NLDDTooltip = (_NLDDTooltip = class NLDDTooltip extends LitElement {
1207
1613
  this._currentTrigger = trigger;
1208
1614
  if (!trigger) return;
1209
1615
  if (trigger.getRootNode() !== document) return;
1210
- if (this.text && this.timing !== "never") {
1616
+ const description = [this.text, shortcutLabel(this)].filter(Boolean).join(" ");
1617
+ if (description && this.timing !== "never") {
1211
1618
  if (!this._descriptionEl) {
1212
1619
  this._descriptionEl = document.createElement("span");
1213
1620
  this._descriptionEl.id = this._tooltipId;
@@ -1223,8 +1630,8 @@ var NLDDTooltip = (_NLDDTooltip = class NLDDTooltip extends LitElement {
1223
1630
  });
1224
1631
  document.body.appendChild(this._descriptionEl);
1225
1632
  }
1226
- this._descriptionEl.textContent = this.text;
1227
- trigger.setAttribute("aria-describedby", this._tooltipId);
1633
+ if (this._descriptionEl.textContent !== description) this._descriptionEl.textContent = description;
1634
+ if (trigger.getAttribute("aria-describedby") !== this._tooltipId) trigger.setAttribute("aria-describedby", this._tooltipId);
1228
1635
  } else {
1229
1636
  trigger.removeAttribute("aria-describedby");
1230
1637
  this._descriptionEl?.remove();
@@ -1237,9 +1644,15 @@ var NLDDTooltip = (_NLDDTooltip = class NLDDTooltip extends LitElement {
1237
1644
  _getTooltipElement() {
1238
1645
  return this.shadowRoot?.querySelector(".tooltip") ?? null;
1239
1646
  }
1647
+ /** Whether there is anything to show: the text, or a shortcut on a device
1648
+ * that shows one. */
1649
+ get _hasContent() {
1650
+ return Boolean(this.text || shortcutLabel(this));
1651
+ }
1240
1652
  _handleTriggerEnter() {
1241
1653
  if (this.timing === "never") return;
1242
- if (!this.text) return;
1654
+ this._syncAriaDescribedBy();
1655
+ if (!this._hasContent) return;
1243
1656
  if (coarsePointerQuery.matches) return;
1244
1657
  if (this._hideTimeout) {
1245
1658
  clearTimeout(this._hideTimeout);
@@ -1260,7 +1673,8 @@ var NLDDTooltip = (_NLDDTooltip = class NLDDTooltip extends LitElement {
1260
1673
  }
1261
1674
  _handleFocusIn() {
1262
1675
  if (this.timing === "never") return;
1263
- if (!this.text) return;
1676
+ this._syncAriaDescribedBy();
1677
+ if (!this._hasContent) return;
1264
1678
  if (isTouchMode()) return;
1265
1679
  if (this._hideTimeout) {
1266
1680
  clearTimeout(this._hideTimeout);
@@ -1365,6 +1779,25 @@ __decorate([property({
1365
1779
  reflect: true,
1366
1780
  converter: reflectNonDefault("")
1367
1781
  })], NLDDTooltip.prototype, "text", void 0);
1782
+ __decorate([property({
1783
+ reflect: true,
1784
+ converter: reflectNonDefault("")
1785
+ })], NLDDTooltip.prototype, "shortcut", void 0);
1786
+ __decorate([property({
1787
+ reflect: true,
1788
+ attribute: "shortcut-mac",
1789
+ converter: reflectNonDefault("")
1790
+ })], NLDDTooltip.prototype, "shortcutMac", void 0);
1791
+ __decorate([property({
1792
+ reflect: true,
1793
+ attribute: "shortcut-windows",
1794
+ converter: reflectNonDefault("")
1795
+ })], NLDDTooltip.prototype, "shortcutWindows", void 0);
1796
+ __decorate([property({
1797
+ reflect: true,
1798
+ attribute: "shortcut-linux",
1799
+ converter: reflectNonDefault("")
1800
+ })], NLDDTooltip.prototype, "shortcutLinux", void 0);
1368
1801
  __decorate([property({
1369
1802
  type: Boolean,
1370
1803
  reflect: true
@@ -1403,7 +1836,7 @@ function renderContent(component) {
1403
1836
  function template() {
1404
1837
  const hintKey = linkHintKey(this.href, this.target);
1405
1838
  const linkHint = hintKey ? this._t(`components.icon-button.${hintKey}`) : "";
1406
- const label = [this.accessibleLabel || this.text || "", linkHint].filter(Boolean).join(", ") || nothing;
1839
+ const label = [[this.accessibleLabel || this.text, shortcutLabel(this)].filter(Boolean).join(" "), linkHint].filter(Boolean).join(", ") || nothing;
1407
1840
  const content = renderContent(this);
1408
1841
  const tooltipText = this.accessibleLabel || (this.size !== "lg" || this.hideLgText ? this.text : "");
1409
1842
  const ariaExpanded = this.expandable || !!this.popupType ? String(this.expanded) : this.expanded ? "true" : nothing;
@@ -1459,10 +1892,14 @@ function template() {
1459
1892
  </button>
1460
1893
  `;
1461
1894
  };
1462
- const control = tooltipText && this.tooltipTiming !== "never" ? html`
1895
+ const control = (tooltipText || hasShortcut(this)) && this.tooltipTiming !== "never" ? html`
1463
1896
  <nldd-tooltip
1464
- text=${tooltipText}
1897
+ text=${tooltipText || nothing}
1465
1898
  timing=${this.tooltipTiming}
1899
+ shortcut=${this.shortcut || nothing}
1900
+ shortcut-mac=${this.shortcutMac || nothing}
1901
+ shortcut-windows=${this.shortcutWindows || nothing}
1902
+ shortcut-linux=${this.shortcutLinux || nothing}
1466
1903
  >
1467
1904
  ${renderButton()}
1468
1905
  </nldd-tooltip>
@@ -1500,6 +1937,10 @@ var nlddIconButtonTranslations = {
1500
1937
  * @attr {string} icon - Icon name for the nldd-icon element. Defaults to a placeholder icon when neither this attribute nor the icon slot is set.
1501
1938
  * @attr {string} accessible-label - Accessible label for screen readers. Overrides text as aria-label and title tooltip. Use when the visible text alone lacks context for screen readers (e.g. text "Toon", accessible-label "Toon wachtwoord"). The text is still shown visually in lg size regardless.
1502
1939
  * @attr {string} tooltip-timing - Forwarded to the inner nldd-tooltip's `timing`: 'delay' (the default, a 700 ms show-delay), 'instant', or 'never' (suppress the visual tooltip; screen readers still get the aria-label). Use 'never' when the surrounding context already explains the button (e.g. spin buttons in nldd-number-field, the chevron in nldd-split-button).
1940
+ * @attr {string} shortcut - Keyboard shortcut hint shown in the tooltip after the text, e.g. 'Alt+P'. Display only (rendered via nldd-keyboard-shortcut): it does not bind the key, wire up the handling in your app. Part of the accessible name ("Presentatiemodus Alt P"), as in nldd-menu-item. Hidden on touch-only devices, where it isn't invokable.
1941
+ * @attr {string} shortcut-mac - Override of `shortcut` on macOS, where the keys differ (falls back to `shortcut`).
1942
+ * @attr {string} shortcut-windows - Override of `shortcut` on Windows (falls back to `shortcut`).
1943
+ * @attr {string} shortcut-linux - Override of `shortcut` on Linux (falls back to `shortcut`).
1503
1944
  * @attr {string} href - When set, renders an <a> element instead of <button>
1504
1945
  * @attr {string} target - Link target (e.g. '_blank'); only used when href is set. With '_blank' the "opens in new tab" announcement is folded into the aria-label for screen readers (WCAG 2.1 SC 3.2.2). An `href` to another origin than the page (another website, a subdomain too) adds a visually hidden "andere website", in one sentence with the new-tab announcement when both apply; there is no way to switch it off.
1505
1946
  * @attr {string} rel - Link rel attribute, used with href; with target '_blank', 'noopener noreferrer' is added to whatever you set
@@ -1542,11 +1983,16 @@ var _NLDDIconButton = class NLDDIconButton extends withTranslations(LitElement,
1542
1983
  this.icon = "";
1543
1984
  this.accessibleLabel = "";
1544
1985
  this.tooltipTiming = "delay";
1986
+ this.shortcut = "";
1987
+ this.shortcutMac = "";
1988
+ this.shortcutWindows = "";
1989
+ this.shortcutLinux = "";
1545
1990
  this.href = void 0;
1546
1991
  this.target = void 0;
1547
1992
  this.rel = void 0;
1548
1993
  this._warnedA11y = false;
1549
1994
  this._popup = new PopupAnchorController(this);
1995
+ this._shortcutAvailability = new ShortcutAvailabilityController(this);
1550
1996
  }
1551
1997
  /** Whether an icon is present via attribute or slot. */
1552
1998
  get _hasIcon() {
@@ -1664,6 +2110,25 @@ __decorate([property({
1664
2110
  attribute: "tooltip-timing",
1665
2111
  converter: reflectNonDefault("delay")
1666
2112
  })], NLDDIconButton.prototype, "tooltipTiming", void 0);
2113
+ __decorate([property({
2114
+ reflect: true,
2115
+ converter: reflectNonDefault("")
2116
+ })], NLDDIconButton.prototype, "shortcut", void 0);
2117
+ __decorate([property({
2118
+ reflect: true,
2119
+ attribute: "shortcut-mac",
2120
+ converter: reflectNonDefault("")
2121
+ })], NLDDIconButton.prototype, "shortcutMac", void 0);
2122
+ __decorate([property({
2123
+ reflect: true,
2124
+ attribute: "shortcut-windows",
2125
+ converter: reflectNonDefault("")
2126
+ })], NLDDIconButton.prototype, "shortcutWindows", void 0);
2127
+ __decorate([property({
2128
+ reflect: true,
2129
+ attribute: "shortcut-linux",
2130
+ converter: reflectNonDefault("")
2131
+ })], NLDDIconButton.prototype, "shortcutLinux", void 0);
1667
2132
  __decorate([property({
1668
2133
  type: String,
1669
2134
  reflect: true
@@ -1672,4 +2137,4 @@ __decorate([property({ type: String })], NLDDIconButton.prototype, "target", voi
1672
2137
  __decorate([property({ type: String })], NLDDIconButton.prototype, "rel", void 0);
1673
2138
  NLDDIconButton = __decorate([customElement("nldd-icon-button")], NLDDIconButton);
1674
2139
  //#endregion
1675
- export { PopupAnchorController as i, NLDDTooltip as n, NLDDActivityIndicator as r, NLDDIconButton as t };
2140
+ export { NLDDKeyboardShortcut as a, shortcutLabel as c, PopupAnchorController as i, shortcutsAvailable as l, NLDDTooltip as n, ShortcutAvailabilityController as o, NLDDActivityIndicator as r, hasShortcut as s, NLDDIconButton as t };