@nldd/design-system 0.8.42 → 0.8.43

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 (254) hide show
  1. package/README.md +1 -1
  2. package/dist/components/actions/button/button.d.ts +18 -5
  3. package/dist/components/actions/button/button.d.ts.map +1 -1
  4. package/dist/components/actions/button/button.js +38 -6
  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 +136 -50
  8. package/dist/components/actions/button/button.styles.js.map +1 -1
  9. package/dist/components/actions/button/button.template.d.ts.map +1 -1
  10. package/dist/components/actions/button/button.template.js +12 -1
  11. package/dist/components/actions/button/button.template.js.map +1 -1
  12. package/dist/components/actions/button-group/button-group.js +2 -2
  13. package/dist/components/actions/button-group/button-group.js.map +1 -1
  14. package/dist/components/actions/icon-button/icon-button.d.ts +16 -5
  15. package/dist/components/actions/icon-button/icon-button.d.ts.map +1 -1
  16. package/dist/components/actions/icon-button/icon-button.js +33 -6
  17. package/dist/components/actions/icon-button/icon-button.js.map +1 -1
  18. package/dist/components/actions/icon-button/icon-button.styles.d.ts.map +1 -1
  19. package/dist/components/actions/icon-button/icon-button.styles.js +153 -96
  20. package/dist/components/actions/icon-button/icon-button.styles.js.map +1 -1
  21. package/dist/components/actions/icon-button/icon-button.template.d.ts.map +1 -1
  22. package/dist/components/actions/icon-button/icon-button.template.js +11 -0
  23. package/dist/components/actions/icon-button/icon-button.template.js.map +1 -1
  24. package/dist/components/actions/split-button/split-button.template.js +2 -2
  25. package/dist/components/actions/split-button/split-button.template.js.map +1 -1
  26. package/dist/components/actions/toolbar/toolbar.d.ts +4 -4
  27. package/dist/components/actions/toolbar/toolbar.d.ts.map +1 -1
  28. package/dist/components/actions/toolbar/toolbar.js +11 -11
  29. package/dist/components/actions/toolbar/toolbar.js.map +1 -1
  30. package/dist/components/actions/toolbar/toolbar.template.d.ts +2 -2
  31. package/dist/components/actions/toolbar/toolbar.template.d.ts.map +1 -1
  32. package/dist/components/actions/toolbar/toolbar.template.js +4 -4
  33. package/dist/components/actions/toolbar/toolbar.template.js.map +1 -1
  34. package/dist/components/components.js +1 -1
  35. package/dist/components/content/blockquote/blockquote.styles.js +1 -1
  36. package/dist/components/content/blockquote/blockquote.styles.js.map +1 -1
  37. package/dist/components/content/tag/tag.d.ts +3 -3
  38. package/dist/components/content/tag/tag.d.ts.map +1 -1
  39. package/dist/components/content/tag/tag.js +3 -3
  40. package/dist/components/content/tag/tag.js.map +1 -1
  41. package/dist/components/content/tag/tag.styles.d.ts.map +1 -1
  42. package/dist/components/content/tag/tag.styles.js +107 -9
  43. package/dist/components/content/tag/tag.styles.js.map +1 -1
  44. package/dist/components/content/title/title.styles.js +18 -18
  45. package/dist/components/content/title/title.styles.js.map +1 -1
  46. package/dist/components/content/tooltip/tooltip.d.ts +13 -7
  47. package/dist/components/content/tooltip/tooltip.d.ts.map +1 -1
  48. package/dist/components/content/tooltip/tooltip.js +34 -22
  49. package/dist/components/content/tooltip/tooltip.js.map +1 -1
  50. package/dist/components/{index-CJ3mdHHo.js → index-By2jYHEw.js} +1438 -908
  51. package/dist/components/inputs/combo-box/combo-box.d.ts +1 -1
  52. package/dist/components/inputs/combo-box/combo-box.d.ts.map +1 -1
  53. package/dist/components/inputs/combo-box/combo-box.js +8 -2
  54. package/dist/components/inputs/combo-box/combo-box.js.map +1 -1
  55. package/dist/components/inputs/combo-box/combo-box.styles.d.ts.map +1 -1
  56. package/dist/components/inputs/combo-box/combo-box.styles.js +2 -0
  57. package/dist/components/inputs/combo-box/combo-box.styles.js.map +1 -1
  58. package/dist/components/inputs/combo-box/combo-box.template.d.ts.map +1 -1
  59. package/dist/components/inputs/combo-box/combo-box.template.js +2 -0
  60. package/dist/components/inputs/combo-box/combo-box.template.js.map +1 -1
  61. package/dist/components/inputs/dropdown/dropdown.d.ts +11 -1
  62. package/dist/components/inputs/dropdown/dropdown.d.ts.map +1 -1
  63. package/dist/components/inputs/dropdown/dropdown.js +31 -2
  64. package/dist/components/inputs/dropdown/dropdown.js.map +1 -1
  65. package/dist/components/inputs/dropdown/dropdown.styles.d.ts.map +1 -1
  66. package/dist/components/inputs/dropdown/dropdown.styles.js +3 -1
  67. package/dist/components/inputs/dropdown/dropdown.styles.js.map +1 -1
  68. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.d.ts +1 -1
  69. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.d.ts.map +1 -1
  70. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.js +8 -2
  71. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.js.map +1 -1
  72. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.d.ts.map +1 -1
  73. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.js +2 -0
  74. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.js.map +1 -1
  75. package/dist/components/inputs/number-field/number-field.d.ts +2 -4
  76. package/dist/components/inputs/number-field/number-field.d.ts.map +1 -1
  77. package/dist/components/inputs/number-field/number-field.js +8 -12
  78. package/dist/components/inputs/number-field/number-field.js.map +1 -1
  79. package/dist/components/inputs/number-field/number-field.styles.js +3 -3
  80. package/dist/components/inputs/password-field/password-field.d.ts +1 -1
  81. package/dist/components/inputs/password-field/password-field.d.ts.map +1 -1
  82. package/dist/components/inputs/password-field/password-field.js +8 -2
  83. package/dist/components/inputs/password-field/password-field.js.map +1 -1
  84. package/dist/components/inputs/password-field/password-field.styles.d.ts.map +1 -1
  85. package/dist/components/inputs/password-field/password-field.styles.js +2 -0
  86. package/dist/components/inputs/password-field/password-field.styles.js.map +1 -1
  87. package/dist/components/inputs/search-field/search-field.d.ts +1 -1
  88. package/dist/components/inputs/search-field/search-field.d.ts.map +1 -1
  89. package/dist/components/inputs/search-field/search-field.js +8 -2
  90. package/dist/components/inputs/search-field/search-field.js.map +1 -1
  91. package/dist/components/inputs/search-field/search-field.styles.d.ts.map +1 -1
  92. package/dist/components/inputs/search-field/search-field.styles.js +2 -0
  93. package/dist/components/inputs/search-field/search-field.styles.js.map +1 -1
  94. package/dist/components/inputs/segmented-control/segmented-control.d.ts +8 -2
  95. package/dist/components/inputs/segmented-control/segmented-control.d.ts.map +1 -1
  96. package/dist/components/inputs/segmented-control/segmented-control.js +25 -4
  97. package/dist/components/inputs/segmented-control/segmented-control.js.map +1 -1
  98. package/dist/components/inputs/segmented-control/segmented-control.styles.d.ts.map +1 -1
  99. package/dist/components/inputs/segmented-control/segmented-control.styles.js +65 -64
  100. package/dist/components/inputs/segmented-control/segmented-control.styles.js.map +1 -1
  101. package/dist/components/inputs/segmented-control/segmented-control.template.js +1 -1
  102. package/dist/components/inputs/text-field/text-field.d.ts +1 -1
  103. package/dist/components/inputs/text-field/text-field.d.ts.map +1 -1
  104. package/dist/components/inputs/text-field/text-field.js +8 -2
  105. package/dist/components/inputs/text-field/text-field.js.map +1 -1
  106. package/dist/components/inputs/text-field/text-field.styles.d.ts.map +1 -1
  107. package/dist/components/inputs/text-field/text-field.styles.js +2 -0
  108. package/dist/components/inputs/text-field/text-field.styles.js.map +1 -1
  109. package/dist/components/inputs/toggle-button/toggle-button.styles.d.ts.map +1 -1
  110. package/dist/components/inputs/toggle-button/toggle-button.styles.js +26 -6
  111. package/dist/components/inputs/toggle-button/toggle-button.styles.js.map +1 -1
  112. package/dist/components/inputs/token/token.d.ts +3 -3
  113. package/dist/components/inputs/token/token.d.ts.map +1 -1
  114. package/dist/components/inputs/token/token.js +6 -6
  115. package/dist/components/inputs/token/token.js.map +1 -1
  116. package/dist/components/inputs/token/token.styles.js +2 -2
  117. package/dist/components/inputs/token/token.template.js +1 -1
  118. package/dist/components/inputs/token/token.template.js.map +1 -1
  119. package/dist/components/layout/card/card.js +1 -1
  120. package/dist/components/layout/card/card.js.map +1 -1
  121. package/dist/components/layout/container/container.d.ts +4 -4
  122. package/dist/components/layout/container/container.js +4 -4
  123. package/dist/components/layout/container/container.styles.js +399 -399
  124. package/dist/components/layout/container/container.styles.js.map +1 -1
  125. package/dist/components/layout/page/page.js +1 -1
  126. package/dist/components/layout/page/page.js.map +1 -1
  127. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.d.ts +6 -3
  128. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.d.ts.map +1 -1
  129. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.js +21 -5
  130. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.js.map +1 -1
  131. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.styles.js +9 -9
  132. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.styles.js.map +1 -1
  133. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.d.ts +6 -3
  134. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.d.ts.map +1 -1
  135. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.js +21 -5
  136. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.js.map +1 -1
  137. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.styles.js +12 -12
  138. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.styles.js.map +1 -1
  139. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.d.ts +6 -3
  140. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.d.ts.map +1 -1
  141. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.js +21 -5
  142. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.js.map +1 -1
  143. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.styles.js +12 -12
  144. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.styles.js.map +1 -1
  145. package/dist/components/layout/page-sections/simple-section/simple-section.d.ts +6 -3
  146. package/dist/components/layout/page-sections/simple-section/simple-section.d.ts.map +1 -1
  147. package/dist/components/layout/page-sections/simple-section/simple-section.js +21 -5
  148. package/dist/components/layout/page-sections/simple-section/simple-section.js.map +1 -1
  149. package/dist/components/layout/page-sections/simple-section/simple-section.styles.js +9 -9
  150. package/dist/components/layout/page-sections/simple-section/simple-section.styles.js.map +1 -1
  151. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.d.ts +6 -3
  152. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.d.ts.map +1 -1
  153. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.js +21 -5
  154. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.js.map +1 -1
  155. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.styles.js +12 -12
  156. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.styles.js.map +1 -1
  157. package/dist/components/layout/popover/popover.js +1 -1
  158. package/dist/components/layout/popover/popover.js.map +1 -1
  159. package/dist/components/layout/sheet/sheet.js +3 -3
  160. package/dist/components/layout/sheet/sheet.js.map +1 -1
  161. package/dist/components/layout/sheet/sheet.styles.js +5 -5
  162. package/dist/components/layout/split-views/split-view-pane/split-view-pane.js +1 -1
  163. package/dist/components/layout/split-views/split-view-pane/split-view-pane.js.map +1 -1
  164. package/dist/components/layout/window/window.js +1 -1
  165. package/dist/components/layout/window/window.js.map +1 -1
  166. package/dist/components/lists-and-menus/cells/cell/cell.d.ts +4 -2
  167. package/dist/components/lists-and-menus/cells/cell/cell.d.ts.map +1 -1
  168. package/dist/components/lists-and-menus/cells/cell/cell.js +17 -6
  169. package/dist/components/lists-and-menus/cells/cell/cell.js.map +1 -1
  170. package/dist/components/lists-and-menus/cells/cell/cell.styles.d.ts.map +1 -1
  171. package/dist/components/lists-and-menus/cells/cell/cell.styles.js +22 -11
  172. package/dist/components/lists-and-menus/cells/cell/cell.styles.js.map +1 -1
  173. package/dist/components/lists-and-menus/cells/description-cell/description-cell.d.ts +2 -2
  174. package/dist/components/lists-and-menus/cells/description-cell/description-cell.d.ts.map +1 -1
  175. package/dist/components/lists-and-menus/cells/description-cell/description-cell.js +12 -7
  176. package/dist/components/lists-and-menus/cells/description-cell/description-cell.js.map +1 -1
  177. package/dist/components/lists-and-menus/cells/description-cell/description-cell.styles.d.ts.map +1 -1
  178. package/dist/components/lists-and-menus/cells/description-cell/description-cell.styles.js +4 -3
  179. package/dist/components/lists-and-menus/cells/description-cell/description-cell.styles.js.map +1 -1
  180. package/dist/components/lists-and-menus/cells/icon-cell/icon-cell.d.ts.map +1 -1
  181. package/dist/components/lists-and-menus/cells/icon-cell/icon-cell.js +1 -1
  182. package/dist/components/lists-and-menus/cells/icon-cell/icon-cell.js.map +1 -1
  183. package/dist/components/lists-and-menus/cells/spacer-cell/spacer-cell.d.ts.map +1 -1
  184. package/dist/components/lists-and-menus/cells/spacer-cell/spacer-cell.js +1 -1
  185. package/dist/components/lists-and-menus/cells/spacer-cell/spacer-cell.js.map +1 -1
  186. package/dist/components/lists-and-menus/cells/text-cell/text-cell.d.ts +3 -4
  187. package/dist/components/lists-and-menus/cells/text-cell/text-cell.d.ts.map +1 -1
  188. package/dist/components/lists-and-menus/cells/text-cell/text-cell.js +13 -9
  189. package/dist/components/lists-and-menus/cells/text-cell/text-cell.js.map +1 -1
  190. package/dist/components/lists-and-menus/cells/text-cell/text-cell.styles.d.ts.map +1 -1
  191. package/dist/components/lists-and-menus/cells/text-cell/text-cell.styles.js +20 -3
  192. package/dist/components/lists-and-menus/cells/text-cell/text-cell.styles.js.map +1 -1
  193. package/dist/components/lists-and-menus/cells/title-cell/title-cell.d.ts +3 -4
  194. package/dist/components/lists-and-menus/cells/title-cell/title-cell.d.ts.map +1 -1
  195. package/dist/components/lists-and-menus/cells/title-cell/title-cell.js +12 -8
  196. package/dist/components/lists-and-menus/cells/title-cell/title-cell.js.map +1 -1
  197. package/dist/components/lists-and-menus/cells/title-cell/title-cell.styles.d.ts.map +1 -1
  198. package/dist/components/lists-and-menus/cells/title-cell/title-cell.styles.js +20 -3
  199. package/dist/components/lists-and-menus/cells/title-cell/title-cell.styles.js.map +1 -1
  200. package/dist/components/lists-and-menus/list/list.d.ts.map +1 -1
  201. package/dist/components/lists-and-menus/list/list.i18n.js +1 -1
  202. package/dist/components/lists-and-menus/list/list.i18n.js.map +1 -1
  203. package/dist/components/lists-and-menus/list/list.js +7 -0
  204. package/dist/components/lists-and-menus/list/list.js.map +1 -1
  205. package/dist/components/navigation/document-tab-bar/document-tab-bar.template.js +1 -1
  206. package/dist/components/navigation/document-tab-bar/document-tab-bar.template.js.map +1 -1
  207. package/dist/components/navigation/menu-bar/menu-bar.js +4 -4
  208. package/dist/components/navigation/menu-bar/menu-bar.js.map +1 -1
  209. package/dist/components/navigation/menu-bar-item/menu-bar-item.d.ts +1 -1
  210. package/dist/components/navigation/menu-bar-item/menu-bar-item.d.ts.map +1 -1
  211. package/dist/components/navigation/menu-bar-item/menu-bar-item.js +6 -6
  212. package/dist/components/navigation/menu-bar-item/menu-bar-item.js.map +1 -1
  213. package/dist/components/navigation/menu-bar-item/menu-bar-item.styles.js +2 -2
  214. package/dist/components/navigation/menu-bar-item/menu-bar-item.template.js +1 -1
  215. package/dist/components/navigation/menu-bar-item/menu-bar-item.template.js.map +1 -1
  216. package/dist/components/navigation/pagination/pagination.d.ts +3 -2
  217. package/dist/components/navigation/pagination/pagination.d.ts.map +1 -1
  218. package/dist/components/navigation/pagination/pagination.js +5 -4
  219. package/dist/components/navigation/pagination/pagination.js.map +1 -1
  220. package/dist/components/navigation/pagination/pagination.styles.d.ts.map +1 -1
  221. package/dist/components/navigation/pagination/pagination.styles.js +5 -3
  222. package/dist/components/navigation/pagination/pagination.styles.js.map +1 -1
  223. package/dist/components/navigation/tab-bar/tab-bar.d.ts +3 -1
  224. package/dist/components/navigation/tab-bar/tab-bar.d.ts.map +1 -1
  225. package/dist/components/navigation/tab-bar/tab-bar.js +5 -3
  226. package/dist/components/navigation/tab-bar/tab-bar.js.map +1 -1
  227. package/dist/components/navigation/tab-bar/tab-bar.styles.d.ts.map +1 -1
  228. package/dist/components/navigation/tab-bar/tab-bar.styles.js +35 -15
  229. package/dist/components/navigation/tab-bar/tab-bar.styles.js.map +1 -1
  230. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js +2 -2
  231. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js.map +1 -1
  232. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js +6 -6
  233. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js.map +1 -1
  234. package/dist/components/navigation/top-title-bar/top-title-bar.styles.d.ts.map +1 -1
  235. package/dist/components/navigation/top-title-bar/top-title-bar.styles.js +2 -0
  236. package/dist/components/navigation/top-title-bar/top-title-bar.styles.js.map +1 -1
  237. package/dist/components/navigation/top-title-bar/top-title-bar.template.d.ts.map +1 -1
  238. package/dist/components/navigation/top-title-bar/top-title-bar.template.js +1 -0
  239. package/dist/components/navigation/top-title-bar/top-title-bar.template.js.map +1 -1
  240. package/dist/components/{prism-typescript-Cdpexfvg.js → prism-typescript-BlIir5CV.js} +1 -1
  241. package/dist/components/status-and-feedback/badge/badge.d.ts +3 -3
  242. package/dist/components/status-and-feedback/badge/badge.d.ts.map +1 -1
  243. package/dist/components/status-and-feedback/badge/badge.js +3 -3
  244. package/dist/components/status-and-feedback/badge/badge.js.map +1 -1
  245. package/dist/components/status-and-feedback/badge/badge.styles.js +6 -6
  246. package/dist/css/global.css +1 -0
  247. package/dist/css/reset.css +7 -0
  248. package/dist/css/rich-text.css +21 -21
  249. package/dist/css/settings.css +110 -81
  250. package/dist/utilities/visibility-mixin.d.ts +18 -12
  251. package/dist/utilities/visibility-mixin.d.ts.map +1 -1
  252. package/dist/utilities/visibility-mixin.js +21 -14
  253. package/dist/utilities/visibility-mixin.js.map +1 -1
  254. package/package.json +2 -2
package/README.md CHANGED
@@ -51,7 +51,7 @@ npm run storybook
51
51
  | Attribuut | Type | Default | Beschrijving |
52
52
  | ------------------ | ------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
53
53
  | `text` | string | `''` | Tekst van de button |
54
- | `variant` | string | `neutral-tinted` | `primary`, `secondary`, `destructive`, `accent-filled`, `accent-outlined`, `accent-transparent`, `neutral-tinted`, `neutral-transparent`, `critical-tinted` |
54
+ | `variant` | string | `neutral-tinted` | `primary`, `secondary`, `destructive`, `accent-filled`, `accent-transparent`, `neutral-tinted`, `neutral-transparent`, `critical-tinted`, `critical-transparent` |
55
55
  | `size` | string | `md` | `xs`, `sm`, `md` |
56
56
  | `disabled` | boolean | `false` | Uitgeschakelde staat |
57
57
  | `type` | string | `button` | `button`, `submit`, `reset` |
@@ -2,13 +2,16 @@
2
2
  * Nederlandse Digitale Dienst Button Component (Lit + TypeScript)
3
3
  *
4
4
  * @element nldd-button
5
- * @attr {string} variant - Button variant: 'primary' | 'secondary' | 'destructive' | 'accent-filled' | 'accent-outlined' | 'accent-transparent' | 'neutral-tinted' | 'neutral-transparent' | 'critical-tinted'
5
+ * @attr {string} variant - Button variant: 'primary' | 'secondary' | 'destructive' | 'accent-filled' | 'accent-transparent' | 'neutral-tinted' | 'neutral-transparent' | 'critical-tinted' | 'critical-transparent'
6
6
  * @attr {string} size - Button size: 'xs' | 'sm' | 'md' (default: 'md')
7
7
  * @attr {boolean} disabled - Disabled state
8
8
  * @attr {string} type - Button type for form submission: 'button' | 'submit' | 'reset' (ignored when href is set)
9
9
  * @attr {boolean} expandable - Whether the button has a icon to indicate it opens a menu or popover
10
- * @attr {boolean} full-width - Whether the button stretches to fill its container width
10
+ * @attr {boolean} expanded - Whether the popover/menu controlled by this button is currently open. Forwarded as aria-expanded on the inner button; toggles the is-open visual state.
11
+ * @attr {string} popup-type - Type of popup container this button opens: 'menu' | 'listbox' | 'dialog' | 'tree' | 'grid'. Sets aria-haspopup on the inner button and forces aria-expanded to always be present (true/false) so screen readers know the popup state.
12
+ * @attr {string} width - Width mode: 'full' (stretches to container) or any CSS length (e.g. '240px')
11
13
  * @attr {string} text - Button text
14
+ * @attr {boolean} single-line - When true, truncates overflowing text with an ellipsis instead of letting it wrap. Requires the button (or an ancestor) to constrain the width.
12
15
  * @attr {string} start-icon - Icon name for the start icon (before text)
13
16
  * @attr {string} end-icon - Icon name for the end icon (after text)
14
17
  * @attr {string} accessible-label - Accessible label for the button, overrides text for screen readers
@@ -23,20 +26,30 @@
23
26
  */
24
27
  import { LitElement } from 'lit';
25
28
  import './../../content/icon/icon.js';
26
- type Variant = 'primary' | 'secondary' | 'destructive' | 'accent-filled' | 'accent-outlined' | 'accent-transparent' | 'neutral-tinted' | 'neutral-transparent' | 'critical-tinted';
29
+ type Variant = 'primary' | 'secondary' | 'destructive' | 'accent-filled' | 'accent-transparent' | 'neutral-tinted' | 'neutral-transparent' | 'critical-tinted' | 'critical-transparent';
27
30
  type Size = 'xs' | 'sm' | 'md';
28
31
  type ButtonType = 'button' | 'submit' | 'reset';
32
+ type PopupType = 'menu' | 'listbox' | 'dialog' | 'tree' | 'grid';
29
33
  export declare class NLDDButton extends LitElement {
30
34
  static styles: import("lit").CSSResult;
31
35
  variant: Variant;
32
36
  size: Size;
33
- fullWidth: boolean;
37
+ /** Width mode: 'full' (stretch to container) or any CSS length. */
38
+ width: string;
34
39
  expandable: boolean;
40
+ expanded: boolean;
41
+ /**
42
+ * Type of popup container this button opens. Sets `aria-haspopup` on the
43
+ * inner button and forces `aria-expanded` to always be present (true/false)
44
+ * so screen readers can announce both the popup type and its current state.
45
+ */
46
+ popupType?: PopupType;
35
47
  type: ButtonType;
36
48
  popovertarget: string | undefined;
37
49
  disabled: boolean;
38
50
  /** Button text. */
39
51
  text: string;
52
+ singleLine: boolean;
40
53
  /** Icon name for the start icon (before text). When not set, the start-icon slot is used. */
41
54
  startIcon: string;
42
55
  /** Icon name for the end icon (after text). When not set, the end-icon slot is used. */
@@ -53,7 +66,7 @@ export declare class NLDDButton extends LitElement {
53
66
  */
54
67
  rel: string | undefined;
55
68
  private _warnedA11y;
56
- updated(): void;
69
+ updated(changedProperties: Map<string, unknown>): void;
57
70
  private _handleClick;
58
71
  /** Resolves the effective rel value for link rendering. */
59
72
  _resolvedRel(): string;
@@ -1 +1 @@
1
- {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/button/button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAIjC,OAAO,8BAA8B,CAAC;AAEtC,KAAK,OAAO,GACT,SAAS,GACT,WAAW,GACX,aAAa,GACb,eAAe,GACf,iBAAiB,GACjB,oBAAoB,GACpB,gBAAgB,GAChB,qBAAqB,GACrB,iBAAiB,CAAC;AACrB,KAAK,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAC/B,KAAK,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEhD,qBACa,UAAW,SAAQ,UAAU;IACzC,OAAgB,MAAM,0BAAgB;IAGtC,OAAO,EAAE,OAAO,CAAoB;IAGpC,IAAI,EAAE,IAAI,CAAQ;IAGlB,SAAS,UAAS;IAGlB,UAAU,UAAS;IAGnB,IAAI,EAAE,UAAU,CAAY;IAG5B,aAAa,EAAE,MAAM,GAAG,SAAS,CAAa;IAG9C,QAAQ,UAAS;IAEjB,mBAAmB;IAEnB,IAAI,SAAM;IAEV,6FAA6F;IAE7F,SAAS,SAAM;IAEf,wFAAwF;IAExF,OAAO,SAAM;IAEb,0GAA0G;IAE1G,eAAe,SAAM;IAErB,4DAA4D;IAE5D,IAAI,EAAE,MAAM,GAAG,SAAS,CAAa;IAErC,+DAA+D;IAE/D,MAAM,EAAE,MAAM,GAAG,SAAS,CAAa;IAEvC;;;OAGG;IAEH,GAAG,EAAE,MAAM,GAAG,SAAS,CAAa;IAEpC,OAAO,CAAC,WAAW,CAAS;IAEnB,OAAO,IAAI,IAAI;IAUxB,OAAO,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OAAO,SAAM;IAEb,0GAA0G;IAE1G,eAAe,SAAM;IAErB,4DAA4D;IAE5D,IAAI,EAAE,MAAM,GAAG,SAAS,CAAa;IAErC,+DAA+D;IAE/D,MAAM,EAAE,MAAM,GAAG,SAAS,CAAa;IAEvC;;;OAGG;IAEH,GAAG,EAAE,MAAM,GAAG,SAAS,CAAa;IAEpC,OAAO,CAAC,WAAW,CAAS;IAEnB,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IA0B/D,OAAO,CAAC,YAAY;IAQpB,2DAA2D;IAC3D,YAAY,IAAI,MAAM;IAMtB;;;OAGG;IACM,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI;IAInC,MAAM;CAKf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,aAAa,EAAE,UAAU,CAAC;KAC1B;CACD"}
@@ -2,13 +2,16 @@
2
2
  * Nederlandse Digitale Dienst Button Component (Lit + TypeScript)
3
3
  *
4
4
  * @element nldd-button
5
- * @attr {string} variant - Button variant: 'primary' | 'secondary' | 'destructive' | 'accent-filled' | 'accent-outlined' | 'accent-transparent' | 'neutral-tinted' | 'neutral-transparent' | 'critical-tinted'
5
+ * @attr {string} variant - Button variant: 'primary' | 'secondary' | 'destructive' | 'accent-filled' | 'accent-transparent' | 'neutral-tinted' | 'neutral-transparent' | 'critical-tinted' | 'critical-transparent'
6
6
  * @attr {string} size - Button size: 'xs' | 'sm' | 'md' (default: 'md')
7
7
  * @attr {boolean} disabled - Disabled state
8
8
  * @attr {string} type - Button type for form submission: 'button' | 'submit' | 'reset' (ignored when href is set)
9
9
  * @attr {boolean} expandable - Whether the button has a icon to indicate it opens a menu or popover
10
- * @attr {boolean} full-width - Whether the button stretches to fill its container width
10
+ * @attr {boolean} expanded - Whether the popover/menu controlled by this button is currently open. Forwarded as aria-expanded on the inner button; toggles the is-open visual state.
11
+ * @attr {string} popup-type - Type of popup container this button opens: 'menu' | 'listbox' | 'dialog' | 'tree' | 'grid'. Sets aria-haspopup on the inner button and forces aria-expanded to always be present (true/false) so screen readers know the popup state.
12
+ * @attr {string} width - Width mode: 'full' (stretches to container) or any CSS length (e.g. '240px')
11
13
  * @attr {string} text - Button text
14
+ * @attr {boolean} single-line - When true, truncates overflowing text with an ellipsis instead of letting it wrap. Requires the button (or an ancestor) to constrain the width.
12
15
  * @attr {string} start-icon - Icon name for the start icon (before text)
13
16
  * @attr {string} end-icon - Icon name for the end icon (after text)
14
17
  * @attr {string} accessible-label - Accessible label for the button, overrides text for screen readers
@@ -37,13 +40,16 @@ let NLDDButton = class NLDDButton extends LitElement {
37
40
  super(...arguments);
38
41
  this.variant = 'neutral-tinted';
39
42
  this.size = 'md';
40
- this.fullWidth = false;
43
+ /** Width mode: 'full' (stretch to container) or any CSS length. */
44
+ this.width = '';
41
45
  this.expandable = false;
46
+ this.expanded = false;
42
47
  this.type = 'button';
43
48
  this.popovertarget = undefined;
44
49
  this.disabled = false;
45
50
  /** Button text. */
46
51
  this.text = '';
52
+ this.singleLine = false;
47
53
  /** Icon name for the start icon (before text). When not set, the start-icon slot is used. */
48
54
  this.startIcon = '';
49
55
  /** Icon name for the end icon (after text). When not set, the end-icon slot is used. */
@@ -61,7 +67,24 @@ let NLDDButton = class NLDDButton extends LitElement {
61
67
  this.rel = undefined;
62
68
  this._warnedA11y = false;
63
69
  }
64
- updated() {
70
+ updated(changedProperties) {
71
+ if (changedProperties.has('width')) {
72
+ const w = this.width;
73
+ // 'full' switches host to block + 100% via CSS attribute selector.
74
+ // A valid CSS length is applied as inline style.width on the host.
75
+ // In either case the inner button stretches via --_width, so
76
+ // a custom width on the host translates to a wide button instead of
77
+ // leaving the inner shrink-to-fit. Invalid values do nothing.
78
+ const isFull = w === 'full';
79
+ const isValidLength = !!w && !isFull && CSS.supports('width', w);
80
+ this.style.width = isValidLength ? w : '';
81
+ if (isFull || isValidLength) {
82
+ this.style.setProperty('--_width', '100%');
83
+ }
84
+ else {
85
+ this.style.removeProperty('--_width');
86
+ }
87
+ }
65
88
  const isEmpty = !this.text && !this.accessibleLabel;
66
89
  if (import.meta.env?.DEV && isEmpty && !this._warnedA11y) {
67
90
  this._warnedA11y = true;
@@ -107,11 +130,17 @@ __decorate([
107
130
  property({ type: String, reflect: true })
108
131
  ], NLDDButton.prototype, "size", void 0);
109
132
  __decorate([
110
- property({ type: Boolean, reflect: true, attribute: 'full-width' })
111
- ], NLDDButton.prototype, "fullWidth", void 0);
133
+ property({ type: String, reflect: true })
134
+ ], NLDDButton.prototype, "width", void 0);
112
135
  __decorate([
113
136
  property({ type: Boolean, reflect: true, attribute: 'expandable' })
114
137
  ], NLDDButton.prototype, "expandable", void 0);
138
+ __decorate([
139
+ property({ type: Boolean, reflect: true })
140
+ ], NLDDButton.prototype, "expanded", void 0);
141
+ __decorate([
142
+ property({ type: String, reflect: true, attribute: 'popup-type' })
143
+ ], NLDDButton.prototype, "popupType", void 0);
115
144
  __decorate([
116
145
  property({ type: String, reflect: true })
117
146
  ], NLDDButton.prototype, "type", void 0);
@@ -124,6 +153,9 @@ __decorate([
124
153
  __decorate([
125
154
  property({ type: String })
126
155
  ], NLDDButton.prototype, "text", void 0);
156
+ __decorate([
157
+ property({ type: Boolean, reflect: true, attribute: 'single-line' })
158
+ ], NLDDButton.prototype, "singleLine", void 0);
127
159
  __decorate([
128
160
  property({ type: String, attribute: 'start-icon' })
129
161
  ], NLDDButton.prototype, "startIcon", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"button.js","sourceRoot":"","sources":["../../../../src/components/actions/button/button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,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AE,CAAC;mDACrC;AAIrB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wCACL;AAIrC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CACY;AAOvC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uCACS;AApExB,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CA8HtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"button.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/button/button.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,yBA6TxB,CAAC"}
1
+ {"version":3,"file":"button.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/button/button.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,yBAmZxB,CAAC"}
@@ -5,11 +5,23 @@ export const buttonStyles = css `
5
5
  /* # Host */
6
6
 
7
7
  :host {
8
+ --_width: auto;
9
+ --_disclosure-icon-size: var(--primitives-space-20);
10
+
8
11
  display: inline-block;
12
+ max-width: 100%;
9
13
  -webkit-tap-highlight-color: transparent;
10
14
  }
11
15
 
12
- :host([full-width]) {
16
+ :host([size="sm"]) {
17
+ --_disclosure-icon-size: var(--primitives-space-18);
18
+ }
19
+
20
+ :host([size="xs"]) {
21
+ --_disclosure-icon-size: var(--primitives-space-16);
22
+ }
23
+
24
+ :host([width="full"]) {
13
25
  display: block;
14
26
  width: 100%;
15
27
  flex-grow: 1;
@@ -39,7 +51,8 @@ export const buttonStyles = css `
39
51
  display: inline-flex;
40
52
  align-items: center;
41
53
  justify-content: center;
42
- width: 100%;
54
+ width: var(--_width);
55
+ max-width: 100%;
43
56
  text-wrap: pretty;
44
57
  transition:
45
58
  background-color var(--primitives-transition-duration-fast) var(--primitives-transition-easing-default),
@@ -110,7 +123,9 @@ export const buttonStyles = css `
110
123
 
111
124
  /* # Variants */
112
125
 
113
- /* ## Variant: Neutral Tintend (Secondary, Default) */
126
+ /* ## Neutral Tintend (Secondary, Default) */
127
+
128
+ /* ### Default neutral tinted button */
114
129
 
115
130
  :host([variant="neutral-tinted"]) .button,
116
131
  :host([variant="secondary"]) .button,
@@ -119,6 +134,8 @@ export const buttonStyles = css `
119
134
  color: var(--semantics-buttons-neutral-tinted-content-color);
120
135
  }
121
136
 
137
+ /* ### Hovered neutral tinted button */
138
+
122
139
  @media (hover: hover) {
123
140
  :host([variant="neutral-tinted"]) .button:hover,
124
141
  :host([variant="secondary"]) .button:hover,
@@ -128,6 +145,8 @@ export const buttonStyles = css `
128
145
  }
129
146
  }
130
147
 
148
+ /* ### Active neutral tinted button */
149
+
131
150
  :host([variant="neutral-tinted"]) .button:active,
132
151
  :host([variant="secondary"]) .button:active,
133
152
  :host(:not([variant])) .button:active {
@@ -135,24 +154,61 @@ export const buttonStyles = css `
135
154
  color: var(--semantics-buttons-neutral-tinted-is-active-content-color);
136
155
  }
137
156
 
138
- /* ## Variant: Neutral Transparent */
157
+ /* ### Open neutral tinted button */
158
+
159
+ :host([expanded][variant="neutral-tinted"]) .button,
160
+ :host([expanded][variant="secondary"]) .button,
161
+ :host([expanded]:not([variant])) .button {
162
+ background-color: var(--semantics-buttons-neutral-tinted-is-open-background-color);
163
+ color: var(--semantics-buttons-neutral-tinted-is-open-content-color);
164
+ }
165
+
166
+ /* ### Open hovered neutral tinted button */
167
+
168
+ @media (hover: hover) {
169
+ :host([expanded][variant="neutral-tinted"]) .button:hover,
170
+ :host([expanded][variant="secondary"]) .button:hover,
171
+ :host([expanded]:not([variant])) .button:hover {
172
+ background-color: var(--semantics-buttons-neutral-tinted-is-open-is-hovered-background-color);
173
+ color: var(--semantics-buttons-neutral-tinted-is-open-is-hovered-content-color);
174
+ }
175
+ }
176
+
177
+ /* ### Open active neutral tinted button */
178
+
179
+ :host([expanded][variant="neutral-tinted"]) .button:active,
180
+ :host([expanded][variant="secondary"]) .button:active,
181
+ :host([expanded]:not([variant])) .button:active {
182
+ background-color: var(--semantics-buttons-neutral-tinted-is-open-is-active-background-color);
183
+ color: var(--semantics-buttons-neutral-tinted-is-open-is-active-content-color);
184
+ }
185
+
186
+ /* ## Neutral Transparent */
187
+
188
+ /* ### Default neutral transparent button */
139
189
 
140
190
  :host([variant="neutral-transparent"]) .button {
141
191
  background-color: transparent;
142
192
  color: var(--semantics-buttons-neutral-transparent-content-color);
143
193
  }
144
194
 
195
+ /* ### Hovered neutral transparent button */
196
+
145
197
  @media (hover: hover) {
146
198
  :host([variant="neutral-transparent"]) .button:hover {
147
199
  color: var(--semantics-buttons-neutral-transparent-is-hovered-content-color);
148
200
  }
149
201
  }
150
202
 
203
+ /* ### Active neutral transparent button */
204
+
151
205
  :host([variant="neutral-transparent"]) .button:active {
152
206
  color: var(--semantics-buttons-neutral-transparent-is-active-content-color);
153
207
  }
154
208
 
155
- /* ## Variant: Accent Filled (Primary) */
209
+ /* ## Accent Filled (Primary) */
210
+
211
+ /* ### Default accent filled button */
156
212
 
157
213
  :host([variant="accent-filled"]) .button,
158
214
  :host([variant="primary"]) .button {
@@ -160,6 +216,8 @@ export const buttonStyles = css `
160
216
  color: var(--semantics-buttons-accent-filled-content-color);
161
217
  }
162
218
 
219
+ /* ### Hovered accent filled button */
220
+
163
221
  @media (hover: hover) {
164
222
  :host([variant="accent-filled"]) .button:hover,
165
223
  :host([variant="primary"]) .button:hover {
@@ -168,71 +226,66 @@ export const buttonStyles = css `
168
226
  }
169
227
  }
170
228
 
229
+ /* ### Active accent filled button */
230
+
171
231
  :host([variant="accent-filled"]) .button:active,
172
232
  :host([variant="primary"]) .button:active {
173
233
  background-color: var(--semantics-buttons-accent-filled-is-active-background-color);
174
234
  color: var(--semantics-buttons-accent-filled-is-active-content-color);
175
235
  }
176
236
 
177
- /* ## Variant: Accent Outlined */
178
-
179
- :host([variant="accent-outlined"]) .button {
180
- background-color: transparent;
181
- padding: calc(var(--primitives-space-12) - var(--semantics-buttons-accent-outlined-border-thickness));
182
- color: var(--semantics-buttons-accent-outlined-content-color);
183
- border-width: var(--semantics-buttons-accent-outlined-border-thickness);
184
- border-style: solid;
185
- border-color: var(--semantics-buttons-accent-outlined-border-color);
186
- }
187
-
188
- :host([variant="accent-outlined"][size="md"]) .button {
189
- padding: calc(var(--primitives-space-12) - var(--semantics-buttons-accent-outlined-border-thickness));
190
- }
237
+ /* ### Open accent filled button */
191
238
 
192
- :host([variant="accent-outlined"][size="sm"]) .button {
193
- padding:
194
- calc(var(--primitives-space-6) - var(--semantics-buttons-accent-outlined-border-thickness))
195
- calc(var(--primitives-space-10) - var(--semantics-buttons-accent-outlined-border-thickness))
196
- ;
239
+ :host([expanded][variant="accent-filled"]) .button,
240
+ :host([expanded][variant="primary"]) .button {
241
+ background-color: var(--semantics-buttons-accent-filled-is-open-background-color);
242
+ color: var(--semantics-buttons-accent-filled-is-open-content-color);
197
243
  }
198
244
 
199
- :host([variant="accent-outlined"][size="xs"]) .button {
200
- padding:
201
- calc(var(--primitives-space-4) - var(--semantics-buttons-accent-outlined-border-thickness))
202
- calc(var(--primitives-space-6) - var(--semantics-buttons-accent-outlined-border-thickness))
203
- ;
204
- }
245
+ /* ### Open hovered accent filled button */
205
246
 
206
247
  @media (hover: hover) {
207
- :host([variant="accent-outlined"]) .button:hover {
208
- color: var(--semantics-buttons-accent-outlined-is-hovered-content-color);
209
- border-color: var(--semantics-buttons-accent-outlined-is-hovered-border-color);
248
+ :host([expanded][variant="accent-filled"]) .button:hover,
249
+ :host([expanded][variant="primary"]) .button:hover {
250
+ background-color: var(--semantics-buttons-accent-filled-is-open-is-hovered-background-color);
251
+ color: var(--semantics-buttons-accent-filled-is-open-is-hovered-content-color);
210
252
  }
211
253
  }
212
254
 
213
- :host([variant="accent-outlined"]) .button:active {
214
- color: var(--semantics-buttons-accent-outlined-is-active-content-color);
215
- border-color: var(--semantics-buttons-accent-outlined-is-active-border-color);
255
+ /* ### Open active accent filled button */
256
+
257
+ :host([expanded][variant="accent-filled"]) .button:active,
258
+ :host([expanded][variant="primary"]) .button:active {
259
+ background-color: var(--semantics-buttons-accent-filled-is-open-is-active-background-color);
260
+ color: var(--semantics-buttons-accent-filled-is-open-is-active-content-color);
216
261
  }
217
262
 
218
- /* ## Variant: Accent Transparent */
263
+ /* ## Accent Transparent */
264
+
265
+ /* ### Default accent transparent button */
219
266
 
220
267
  :host([variant="accent-transparent"]) .button {
221
268
  background-color: transparent;
222
269
  color: var(--semantics-buttons-accent-transparent-content-color);
223
270
  }
224
271
 
272
+ /* ### Hovered accent transparent button */
273
+
225
274
  @media (hover: hover) {
226
275
  :host([variant="accent-transparent"]) .button:hover {
227
276
  color: var(--semantics-buttons-accent-transparent-is-hovered-content-color);
228
277
  }
229
278
  }
230
279
 
280
+ /* ### Active accent transparent button */
281
+
231
282
  :host([variant="accent-transparent"]) .button:active {
232
283
  color: var(--semantics-buttons-accent-transparent-is-active-content-color);
233
284
  }
234
285
 
235
- /* ## Variant: Critical Tinted */
286
+ /* ## Critical Tinted */
287
+
288
+ /* ### Default critical tinted button */
236
289
 
237
290
  :host([variant="critical-tinted"]) .button,
238
291
  :host([variant="destructive"]) .button {
@@ -240,6 +293,8 @@ export const buttonStyles = css `
240
293
  color: var(--semantics-buttons-critical-tinted-content-color);
241
294
  }
242
295
 
296
+ /* ### Hovered critical tinted button */
297
+
243
298
  @media (hover: hover) {
244
299
  :host([variant="critical-tinted"]) .button:hover,
245
300
  :host([variant="destructive"]) .button:hover {
@@ -248,12 +303,37 @@ export const buttonStyles = css `
248
303
  }
249
304
  }
250
305
 
306
+ /* ### Active critical tinted button */
307
+
251
308
  :host([variant="critical-tinted"]) .button:active,
252
309
  :host([variant="destructive"]) .button:active {
253
310
  background-color: var(--semantics-buttons-critical-tinted-is-active-background-color);
254
311
  color: var(--semantics-buttons-critical-tinted-is-active-content-color);
255
312
  }
256
313
 
314
+ /* ## Critical Transparent */
315
+
316
+ /* ### Default critical transparent button */
317
+
318
+ :host([variant="critical-transparent"]) .button {
319
+ background-color: transparent;
320
+ color: var(--semantics-buttons-critical-transparent-content-color);
321
+ }
322
+
323
+ /* ### Hovered critical transparent button */
324
+
325
+ @media (hover: hover) {
326
+ :host([variant="critical-transparent"]) .button:hover {
327
+ color: var(--semantics-buttons-critical-transparent-is-hovered-content-color);
328
+ }
329
+ }
330
+
331
+ /* ### Active critical transparent button */
332
+
333
+ :host([variant="critical-transparent"]) .button:active {
334
+ color: var(--semantics-buttons-critical-transparent-is-active-content-color);
335
+ }
336
+
257
337
  /* ## Elements */
258
338
 
259
339
  .button__content {
@@ -264,6 +344,16 @@ export const buttonStyles = css `
264
344
  display: none;
265
345
  }
266
346
 
347
+ .button__text {
348
+ min-width: 0;
349
+ }
350
+
351
+ :host([single-line]) .button__text {
352
+ overflow: hidden;
353
+ text-overflow: ellipsis;
354
+ white-space: nowrap;
355
+ }
356
+
267
357
  .button__start-icon,
268
358
  .button__end-icon {
269
359
  display: block;
@@ -274,45 +364,41 @@ export const buttonStyles = css `
274
364
  :host(:not([size])) .button__start-icon,
275
365
  :host([size="md"]) .button__end-icon,
276
366
  :host(:not([size])) .button__end-icon {
277
- width: var(--primitives-space-20);
278
- height: var(--primitives-space-20);
367
+ width: var(--semantics-buttons-md-icon-size);
368
+ height: var(--semantics-buttons-md-icon-size);
279
369
  }
280
370
 
281
371
  :host([size="sm"]) .button__start-icon,
282
372
  :host([size="sm"]) .button__end-icon {
283
- width: var(--primitives-space-18);
284
- height: var(--primitives-space-18);
373
+ width: var(--semantics-buttons-sm-icon-size);
374
+ height: var(--semantics-buttons-sm-icon-size);
285
375
  }
286
376
 
287
377
  :host([size="xs"]) .button__start-icon,
288
378
  :host([size="xs"]) .button__end-icon {
289
- width: var(--primitives-space-16);
290
- height: var(--primitives-space-16);
379
+ width: var(--semantics-buttons-xs-icon-size);
380
+ height: var(--semantics-buttons-xs-icon-size);
291
381
  }
292
382
 
293
383
  .button__disclosure-icon {
294
384
  display: block;
295
385
  flex-shrink: 0;
386
+ width: var(--_disclosure-icon-size);
387
+ height: var(--_disclosure-icon-size);
296
388
  }
297
389
 
298
390
  :host([size="md"]) .button__disclosure-icon,
299
391
  :host(:not([size])) .button__disclosure-icon {
300
- width: var(--primitives-space-20);
301
- height: var(--primitives-space-20);
302
392
  margin-left: -2px;
303
393
  margin-right: -2px;
304
394
  }
305
395
 
306
396
  :host([size="sm"]) .button__disclosure-icon {
307
- width: var(--primitives-space-18);
308
- height: var(--primitives-space-18);
309
397
  margin-left: -1px;
310
398
  margin-right: -2px;
311
399
  }
312
400
 
313
401
  :host([size="xs"]) .button__disclosure-icon {
314
- width: var(--primitives-space-16);
315
- height: var(--primitives-space-16);
316
402
  margin-left: -1px;
317
403
  margin-right: -2px;
318
404
  }
@@ -1 +1 @@
1
- {"version":3,"file":"button.styles.js","sourceRoot":"","sources":["../../../../src/components/actions/button/button.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6T9B,CAAC"}
1
+ {"version":3,"file":"button.styles.js","sourceRoot":"","sources":["../../../../src/components/actions/button/button.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmZ9B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"button.template.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/button/button.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,UAAU,eAAe;IACxB,WAAW,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;CACrC;AAyBD,wBAAgB,QAAQ,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,eAAe,wCA+BlE"}
1
+ {"version":3,"file":"button.template.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/button/button.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,UAAU,eAAe;IACxB,WAAW,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;CACrC;AAyBD,wBAAgB,QAAQ,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,eAAe,wCA2ClE"}
@@ -7,7 +7,7 @@ function renderContent(component) {
7
7
  name=${component.startIcon}
8
8
  ></nldd-icon>
9
9
  ` : html `<slot name="start-icon"></slot>`}
10
- ${component.text}
10
+ <span class="button__text">${component.text}</span>
11
11
  ${component.endIcon ? html `
12
12
  <nldd-icon class="button__end-icon"
13
13
  name=${component.endIcon}
@@ -23,6 +23,13 @@ function renderContent(component) {
23
23
  }
24
24
  export function template(helpers) {
25
25
  const content = renderContent(this);
26
+ // `expandable` (disclosure widget signal) or `popup-type` (popup container
27
+ // signal) both require aria-expanded to always be present so screen
28
+ // readers know the current open/closed state. Without one of these, only
29
+ // open=true forwards aria-expanded — keeps plain buttons free of
30
+ // irrelevant ARIA attributes.
31
+ const isDisclosure = this.expandable || !!this.popupType;
32
+ const ariaExpanded = isDisclosure ? String(this.expanded) : (this.expanded ? 'true' : nothing);
26
33
  if (this.href) {
27
34
  const resolvedRel = this._resolvedRel();
28
35
  return html `
@@ -32,6 +39,8 @@ export function template(helpers) {
32
39
  rel=${resolvedRel || nothing}
33
40
  aria-disabled=${this.disabled ? 'true' : nothing}
34
41
  aria-label=${this.accessibleLabel || nothing}
42
+ aria-haspopup=${this.popupType || nothing}
43
+ aria-expanded=${ariaExpanded}
35
44
  @click=${helpers.handleClick}
36
45
  >
37
46
  ${content}
@@ -44,6 +53,8 @@ export function template(helpers) {
44
53
  ?disabled=${this.disabled}
45
54
  aria-disabled=${this.disabled ? 'true' : nothing}
46
55
  aria-label=${this.accessibleLabel || nothing}
56
+ aria-haspopup=${this.popupType || nothing}
57
+ aria-expanded=${ariaExpanded}
47
58
  popovertarget=${this.popovertarget || nothing}
48
59
  @click=${helpers.handleClick}
49
60
  >
@@ -1 +1 @@
1
- {"version":3,"file":"button.template.js","sourceRoot":"","sources":["../../../../src/components/actions/button/button.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAOpC,SAAS,aAAa,CAAC,SAAqB;IAC3C,OAAO,IAAI,CAAA;;KAEP,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAA;;YAEnB,SAAS,CAAC,SAAS;;IAE3B,CAAC,CAAC,CAAC,IAAI,CAAA,iCAAiC;KACvC,SAAS,CAAC,IAAI;KACd,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAA;;YAEjB,SAAS,CAAC,OAAO;;IAEzB,CAAC,CAAC,CAAC,IAAI,CAAA,+BAA+B;KACrC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAA;;;;IAI5B,CAAC,CAAC,CAAC,OAAO;;EAEZ,CAAC;AACH,CAAC;AAED,MAAM,UAAU,QAAQ,CAAmB,OAAwB;IAClE,MAAM,OAAO,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IAEpC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;QACf,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QACxC,OAAO,IAAI,CAAA;;WAEF,IAAI,CAAC,IAAI;aACP,IAAI,CAAC,MAAM,IAAI,OAAO;UACzB,WAAW,IAAI,OAAO;oBACZ,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;iBACnC,IAAI,CAAC,eAAe,IAAI,OAAO;aACnC,OAAO,CAAC,WAAW;;MAE1B,OAAO;;GAEV,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAA;;UAEF,IAAI,CAAC,IAAI;eACJ,IAAI,CAAC,QAAQ;mBACT,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;gBACnC,IAAI,CAAC,eAAe,IAAI,OAAO;mBAC5B,IAAI,CAAC,aAAa,IAAI,OAAO;YACpC,OAAO,CAAC,WAAW;;KAE1B,OAAO;;EAEV,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"button.template.js","sourceRoot":"","sources":["../../../../src/components/actions/button/button.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAOpC,SAAS,aAAa,CAAC,SAAqB;IA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B,OAAO,CAAC,WAAW;;MAE1B,OAAO;;GAEV,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAA;;UAEF,IAAI,CAAC,IAAI;eACJ,IAAI,CAAC,QAAQ;mBACT,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;gBACnC,IAAI,CAAC,eAAe,IAAI,OAAO;mBAC5B,IAAI,CAAC,SAAS,IAAI,OAAO;mBACzB,YAAY;mBACZ,IAAI,CAAC,aAAa,IAAI,OAAO;YACpC,OAAO,CAAC,WAAW;;KAE1B,OAAO;;EAEV,CAAC;AACH,CAAC"}
@@ -38,10 +38,10 @@ let NLDDButtonGroup = class NLDDButtonGroup extends LitElement {
38
38
  console.warn('nldd-button-group: Only 3 buttons are allowed. Extra buttons will be hidden.');
39
39
  }
40
40
  if (this.orientation === 'vertical') {
41
- el.setAttribute('full-width', '');
41
+ el.setAttribute('width', 'full');
42
42
  }
43
43
  else {
44
- el.removeAttribute('full-width');
44
+ el.removeAttribute('width');
45
45
  }
46
46
  el.setAttribute('size', this.size);
47
47
  });
@@ -1 +1 @@
1
- {"version":3,"file":"button-group.js","sourceRoot":"","sources":["../../../../src/components/actions/button-group/button-group.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAM/C,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,UAAU;IAAxC;;QAIN,SAAI,GAAS,IAAI,CAAC;QAGlB,gBAAW,GAAgB,UAAU,CAAC;IAmCvC,CAAC;IA9BA,gBAAgB;QACf,MAAM,QAAQ,GAAG,IAAI,CAAC,KAA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