@nldd/design-system 0.8.41 → 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 (341) hide show
  1. package/README.md +19 -2
  2. package/dist/assets/styles/tokens.d.ts +25 -0
  3. package/dist/assets/styles/tokens.d.ts.map +1 -0
  4. package/dist/assets/styles/tokens.js +25 -0
  5. package/dist/assets/styles/tokens.js.map +1 -0
  6. package/dist/components/actions/button/button.d.ts +23 -5
  7. package/dist/components/actions/button/button.d.ts.map +1 -1
  8. package/dist/components/actions/button/button.js +45 -6
  9. package/dist/components/actions/button/button.js.map +1 -1
  10. package/dist/components/actions/button/button.styles.d.ts.map +1 -1
  11. package/dist/components/actions/button/button.styles.js +136 -50
  12. package/dist/components/actions/button/button.styles.js.map +1 -1
  13. package/dist/components/actions/button/button.template.d.ts.map +1 -1
  14. package/dist/components/actions/button/button.template.js +12 -1
  15. package/dist/components/actions/button/button.template.js.map +1 -1
  16. package/dist/components/actions/button-group/button-group.js +2 -2
  17. package/dist/components/actions/button-group/button-group.js.map +1 -1
  18. package/dist/components/actions/icon-button/icon-button.d.ts +21 -5
  19. package/dist/components/actions/icon-button/icon-button.d.ts.map +1 -1
  20. package/dist/components/actions/icon-button/icon-button.js +40 -6
  21. package/dist/components/actions/icon-button/icon-button.js.map +1 -1
  22. package/dist/components/actions/icon-button/icon-button.styles.d.ts.map +1 -1
  23. package/dist/components/actions/icon-button/icon-button.styles.js +153 -96
  24. package/dist/components/actions/icon-button/icon-button.styles.js.map +1 -1
  25. package/dist/components/actions/icon-button/icon-button.template.d.ts.map +1 -1
  26. package/dist/components/actions/icon-button/icon-button.template.js +11 -0
  27. package/dist/components/actions/icon-button/icon-button.template.js.map +1 -1
  28. package/dist/components/actions/link/link.d.ts +17 -6
  29. package/dist/components/actions/link/link.d.ts.map +1 -1
  30. package/dist/components/actions/link/link.js +15 -5
  31. package/dist/components/actions/link/link.js.map +1 -1
  32. package/dist/components/actions/link/link.styles.d.ts.map +1 -1
  33. package/dist/components/actions/link/link.styles.js +44 -6
  34. package/dist/components/actions/link/link.styles.js.map +1 -1
  35. package/dist/components/actions/link/link.template.d.ts.map +1 -1
  36. package/dist/components/actions/link/link.template.js +7 -9
  37. package/dist/components/actions/link/link.template.js.map +1 -1
  38. package/dist/components/actions/split-button/split-button.template.js +2 -2
  39. package/dist/components/actions/split-button/split-button.template.js.map +1 -1
  40. package/dist/components/actions/toolbar/toolbar.d.ts +4 -4
  41. package/dist/components/actions/toolbar/toolbar.d.ts.map +1 -1
  42. package/dist/components/actions/toolbar/toolbar.js +11 -11
  43. package/dist/components/actions/toolbar/toolbar.js.map +1 -1
  44. package/dist/components/actions/toolbar/toolbar.template.d.ts +2 -2
  45. package/dist/components/actions/toolbar/toolbar.template.d.ts.map +1 -1
  46. package/dist/components/actions/toolbar/toolbar.template.js +4 -4
  47. package/dist/components/actions/toolbar/toolbar.template.js.map +1 -1
  48. package/dist/components/components.js +1 -1
  49. package/dist/components/content/blockquote/blockquote.styles.js +1 -1
  50. package/dist/components/content/blockquote/blockquote.styles.js.map +1 -1
  51. package/dist/components/content/icon/icon-aliases.d.ts.map +1 -1
  52. package/dist/components/content/icon/icon-aliases.js +6 -1
  53. package/dist/components/content/icon/icon-aliases.js.map +1 -1
  54. package/dist/components/content/icon/icon-registry.d.ts.map +1 -1
  55. package/dist/components/content/icon/icon-registry.js +11 -7
  56. package/dist/components/content/icon/icon-registry.js.map +1 -1
  57. package/dist/components/content/tag/tag.d.ts +3 -3
  58. package/dist/components/content/tag/tag.d.ts.map +1 -1
  59. package/dist/components/content/tag/tag.js +3 -3
  60. package/dist/components/content/tag/tag.js.map +1 -1
  61. package/dist/components/content/tag/tag.styles.d.ts.map +1 -1
  62. package/dist/components/content/tag/tag.styles.js +107 -9
  63. package/dist/components/content/tag/tag.styles.js.map +1 -1
  64. package/dist/components/content/title/title.styles.js +18 -18
  65. package/dist/components/content/title/title.styles.js.map +1 -1
  66. package/dist/components/content/tooltip/tooltip.d.ts +13 -7
  67. package/dist/components/content/tooltip/tooltip.d.ts.map +1 -1
  68. package/dist/components/content/tooltip/tooltip.js +34 -22
  69. package/dist/components/content/tooltip/tooltip.js.map +1 -1
  70. package/dist/components/forms/form-field/form-field.styles.js +1 -1
  71. package/dist/components/{index-DMYkp2tq.js → index-By2jYHEw.js} +2934 -1234
  72. package/dist/components/inputs/combo-box/combo-box.d.ts +28 -4
  73. package/dist/components/inputs/combo-box/combo-box.d.ts.map +1 -1
  74. package/dist/components/inputs/combo-box/combo-box.js +86 -23
  75. package/dist/components/inputs/combo-box/combo-box.js.map +1 -1
  76. package/dist/components/inputs/combo-box/combo-box.styles.d.ts.map +1 -1
  77. package/dist/components/inputs/combo-box/combo-box.styles.js +2 -0
  78. package/dist/components/inputs/combo-box/combo-box.styles.js.map +1 -1
  79. package/dist/components/inputs/combo-box/combo-box.template.d.ts.map +1 -1
  80. package/dist/components/inputs/combo-box/combo-box.template.js +4 -2
  81. package/dist/components/inputs/combo-box/combo-box.template.js.map +1 -1
  82. package/dist/components/inputs/dropdown/dropdown.d.ts +11 -1
  83. package/dist/components/inputs/dropdown/dropdown.d.ts.map +1 -1
  84. package/dist/components/inputs/dropdown/dropdown.js +31 -2
  85. package/dist/components/inputs/dropdown/dropdown.js.map +1 -1
  86. package/dist/components/inputs/dropdown/dropdown.styles.d.ts.map +1 -1
  87. package/dist/components/inputs/dropdown/dropdown.styles.js +3 -1
  88. package/dist/components/inputs/dropdown/dropdown.styles.js.map +1 -1
  89. package/dist/components/inputs/dropdown/dropdown.template.js +1 -1
  90. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.d.ts +1 -1
  91. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.d.ts.map +1 -1
  92. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.js +8 -2
  93. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.js.map +1 -1
  94. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.d.ts.map +1 -1
  95. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.js +2 -0
  96. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.js.map +1 -1
  97. package/dist/components/inputs/number-field/number-field.d.ts +7 -4
  98. package/dist/components/inputs/number-field/number-field.d.ts.map +1 -1
  99. package/dist/components/inputs/number-field/number-field.js +15 -12
  100. package/dist/components/inputs/number-field/number-field.js.map +1 -1
  101. package/dist/components/inputs/number-field/number-field.styles.js +3 -3
  102. package/dist/components/inputs/password-field/password-field.d.ts +1 -1
  103. package/dist/components/inputs/password-field/password-field.d.ts.map +1 -1
  104. package/dist/components/inputs/password-field/password-field.js +8 -2
  105. package/dist/components/inputs/password-field/password-field.js.map +1 -1
  106. package/dist/components/inputs/password-field/password-field.styles.d.ts.map +1 -1
  107. package/dist/components/inputs/password-field/password-field.styles.js +2 -0
  108. package/dist/components/inputs/password-field/password-field.styles.js.map +1 -1
  109. package/dist/components/inputs/search-field/search-field.d.ts +6 -1
  110. package/dist/components/inputs/search-field/search-field.d.ts.map +1 -1
  111. package/dist/components/inputs/search-field/search-field.js +15 -2
  112. package/dist/components/inputs/search-field/search-field.js.map +1 -1
  113. package/dist/components/inputs/search-field/search-field.styles.d.ts.map +1 -1
  114. package/dist/components/inputs/search-field/search-field.styles.js +2 -0
  115. package/dist/components/inputs/search-field/search-field.styles.js.map +1 -1
  116. package/dist/components/inputs/segmented-control/segmented-control.d.ts +8 -2
  117. package/dist/components/inputs/segmented-control/segmented-control.d.ts.map +1 -1
  118. package/dist/components/inputs/segmented-control/segmented-control.js +25 -4
  119. package/dist/components/inputs/segmented-control/segmented-control.js.map +1 -1
  120. package/dist/components/inputs/segmented-control/segmented-control.styles.d.ts.map +1 -1
  121. package/dist/components/inputs/segmented-control/segmented-control.styles.js +65 -64
  122. package/dist/components/inputs/segmented-control/segmented-control.styles.js.map +1 -1
  123. package/dist/components/inputs/segmented-control/segmented-control.template.js +1 -1
  124. package/dist/components/inputs/switch/switch.d.ts +5 -0
  125. package/dist/components/inputs/switch/switch.d.ts.map +1 -1
  126. package/dist/components/inputs/switch/switch.js +7 -0
  127. package/dist/components/inputs/switch/switch.js.map +1 -1
  128. package/dist/components/inputs/switch-field/switch-field.d.ts +6 -0
  129. package/dist/components/inputs/switch-field/switch-field.d.ts.map +1 -1
  130. package/dist/components/inputs/switch-field/switch-field.js +8 -0
  131. package/dist/components/inputs/switch-field/switch-field.js.map +1 -1
  132. package/dist/components/inputs/text-field/text-field.d.ts +6 -2
  133. package/dist/components/inputs/text-field/text-field.d.ts.map +1 -1
  134. package/dist/components/inputs/text-field/text-field.js +15 -5
  135. package/dist/components/inputs/text-field/text-field.js.map +1 -1
  136. package/dist/components/inputs/text-field/text-field.styles.d.ts.map +1 -1
  137. package/dist/components/inputs/text-field/text-field.styles.js +2 -0
  138. package/dist/components/inputs/text-field/text-field.styles.js.map +1 -1
  139. package/dist/components/inputs/toggle-button/toggle-button.styles.d.ts.map +1 -1
  140. package/dist/components/inputs/toggle-button/toggle-button.styles.js +26 -6
  141. package/dist/components/inputs/toggle-button/toggle-button.styles.js.map +1 -1
  142. package/dist/components/inputs/token/token.d.ts +3 -3
  143. package/dist/components/inputs/token/token.d.ts.map +1 -1
  144. package/dist/components/inputs/token/token.js +6 -6
  145. package/dist/components/inputs/token/token.js.map +1 -1
  146. package/dist/components/inputs/token/token.styles.js +2 -2
  147. package/dist/components/inputs/token/token.template.js +1 -1
  148. package/dist/components/inputs/token/token.template.js.map +1 -1
  149. package/dist/components/layout/card/card.js +1 -1
  150. package/dist/components/layout/card/card.js.map +1 -1
  151. package/dist/components/layout/container/container.d.ts +4 -4
  152. package/dist/components/layout/container/container.js +4 -4
  153. package/dist/components/layout/container/container.styles.js +399 -399
  154. package/dist/components/layout/container/container.styles.js.map +1 -1
  155. package/dist/components/layout/page/page.js +1 -1
  156. package/dist/components/layout/page/page.js.map +1 -1
  157. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.d.ts +6 -3
  158. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.d.ts.map +1 -1
  159. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.js +21 -5
  160. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.js.map +1 -1
  161. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.styles.js +9 -9
  162. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.styles.js.map +1 -1
  163. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.d.ts +6 -3
  164. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.d.ts.map +1 -1
  165. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.js +21 -5
  166. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.js.map +1 -1
  167. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.styles.js +12 -12
  168. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.styles.js.map +1 -1
  169. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.d.ts +6 -3
  170. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.d.ts.map +1 -1
  171. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.js +21 -5
  172. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.js.map +1 -1
  173. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.styles.js +12 -12
  174. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.styles.js.map +1 -1
  175. package/dist/components/layout/page-sections/simple-section/simple-section.d.ts +6 -3
  176. package/dist/components/layout/page-sections/simple-section/simple-section.d.ts.map +1 -1
  177. package/dist/components/layout/page-sections/simple-section/simple-section.js +21 -5
  178. package/dist/components/layout/page-sections/simple-section/simple-section.js.map +1 -1
  179. package/dist/components/layout/page-sections/simple-section/simple-section.styles.js +9 -9
  180. package/dist/components/layout/page-sections/simple-section/simple-section.styles.js.map +1 -1
  181. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.d.ts +6 -3
  182. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.d.ts.map +1 -1
  183. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.js +21 -5
  184. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.js.map +1 -1
  185. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.styles.js +12 -12
  186. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.styles.js.map +1 -1
  187. package/dist/components/layout/popover/popover.js +1 -1
  188. package/dist/components/layout/popover/popover.js.map +1 -1
  189. package/dist/components/layout/sheet/sheet.js +3 -3
  190. package/dist/components/layout/sheet/sheet.js.map +1 -1
  191. package/dist/components/layout/sheet/sheet.styles.js +5 -5
  192. package/dist/components/layout/spacer/spacer.d.ts +28 -3
  193. package/dist/components/layout/spacer/spacer.d.ts.map +1 -1
  194. package/dist/components/layout/spacer/spacer.js +33 -2
  195. package/dist/components/layout/spacer/spacer.js.map +1 -1
  196. package/dist/components/layout/spacer/spacer.styles.d.ts.map +1 -1
  197. package/dist/components/layout/spacer/spacer.styles.js +157 -110
  198. package/dist/components/layout/spacer/spacer.styles.js.map +1 -1
  199. package/dist/components/layout/split-views/split-view-pane/split-view-pane.js +1 -1
  200. package/dist/components/layout/split-views/split-view-pane/split-view-pane.js.map +1 -1
  201. package/dist/components/layout/window/window.js +1 -1
  202. package/dist/components/layout/window/window.js.map +1 -1
  203. package/dist/components/lists-and-menus/cells/cell/cell.d.ts +4 -2
  204. package/dist/components/lists-and-menus/cells/cell/cell.d.ts.map +1 -1
  205. package/dist/components/lists-and-menus/cells/cell/cell.js +17 -6
  206. package/dist/components/lists-and-menus/cells/cell/cell.js.map +1 -1
  207. package/dist/components/lists-and-menus/cells/cell/cell.styles.d.ts.map +1 -1
  208. package/dist/components/lists-and-menus/cells/cell/cell.styles.js +22 -11
  209. package/dist/components/lists-and-menus/cells/cell/cell.styles.js.map +1 -1
  210. package/dist/components/lists-and-menus/cells/description-cell/description-cell.d.ts +2 -2
  211. package/dist/components/lists-and-menus/cells/description-cell/description-cell.d.ts.map +1 -1
  212. package/dist/components/lists-and-menus/cells/description-cell/description-cell.js +12 -7
  213. package/dist/components/lists-and-menus/cells/description-cell/description-cell.js.map +1 -1
  214. package/dist/components/lists-and-menus/cells/description-cell/description-cell.styles.d.ts.map +1 -1
  215. package/dist/components/lists-and-menus/cells/description-cell/description-cell.styles.js +4 -3
  216. package/dist/components/lists-and-menus/cells/description-cell/description-cell.styles.js.map +1 -1
  217. package/dist/components/lists-and-menus/cells/icon-cell/icon-cell.d.ts +2 -2
  218. package/dist/components/lists-and-menus/cells/icon-cell/icon-cell.d.ts.map +1 -1
  219. package/dist/components/lists-and-menus/cells/icon-cell/icon-cell.js +2 -2
  220. package/dist/components/lists-and-menus/cells/icon-cell/icon-cell.js.map +1 -1
  221. package/dist/components/lists-and-menus/cells/icon-cell/icon-cell.styles.d.ts.map +1 -1
  222. package/dist/components/lists-and-menus/cells/icon-cell/icon-cell.styles.js +50 -14
  223. package/dist/components/lists-and-menus/cells/icon-cell/icon-cell.styles.js.map +1 -1
  224. package/dist/components/lists-and-menus/cells/spacer-cell/spacer-cell.d.ts.map +1 -1
  225. package/dist/components/lists-and-menus/cells/spacer-cell/spacer-cell.js +1 -1
  226. package/dist/components/lists-and-menus/cells/spacer-cell/spacer-cell.js.map +1 -1
  227. package/dist/components/lists-and-menus/cells/text-cell/text-cell.d.ts +31 -9
  228. package/dist/components/lists-and-menus/cells/text-cell/text-cell.d.ts.map +1 -1
  229. package/dist/components/lists-and-menus/cells/text-cell/text-cell.js +71 -14
  230. package/dist/components/lists-and-menus/cells/text-cell/text-cell.js.map +1 -1
  231. package/dist/components/lists-and-menus/cells/text-cell/text-cell.styles.d.ts.map +1 -1
  232. package/dist/components/lists-and-menus/cells/text-cell/text-cell.styles.js +49 -8
  233. package/dist/components/lists-and-menus/cells/text-cell/text-cell.styles.js.map +1 -1
  234. package/dist/components/lists-and-menus/cells/text-cell/text-cell.template.d.ts.map +1 -1
  235. package/dist/components/lists-and-menus/cells/text-cell/text-cell.template.js +33 -3
  236. package/dist/components/lists-and-menus/cells/text-cell/text-cell.template.js.map +1 -1
  237. package/dist/components/lists-and-menus/cells/title-cell/title-cell.d.ts +31 -9
  238. package/dist/components/lists-and-menus/cells/title-cell/title-cell.d.ts.map +1 -1
  239. package/dist/components/lists-and-menus/cells/title-cell/title-cell.js +70 -13
  240. package/dist/components/lists-and-menus/cells/title-cell/title-cell.js.map +1 -1
  241. package/dist/components/lists-and-menus/cells/title-cell/title-cell.styles.d.ts.map +1 -1
  242. package/dist/components/lists-and-menus/cells/title-cell/title-cell.styles.js +68 -8
  243. package/dist/components/lists-and-menus/cells/title-cell/title-cell.styles.js.map +1 -1
  244. package/dist/components/lists-and-menus/cells/title-cell/title-cell.template.d.ts.map +1 -1
  245. package/dist/components/lists-and-menus/cells/title-cell/title-cell.template.js +36 -7
  246. package/dist/components/lists-and-menus/cells/title-cell/title-cell.template.js.map +1 -1
  247. package/dist/components/lists-and-menus/list/list.d.ts.map +1 -1
  248. package/dist/components/lists-and-menus/list/list.i18n.js +1 -1
  249. package/dist/components/lists-and-menus/list/list.i18n.js.map +1 -1
  250. package/dist/components/lists-and-menus/list/list.js +7 -0
  251. package/dist/components/lists-and-menus/list/list.js.map +1 -1
  252. package/dist/components/lists-and-menus/list-item/list-item.d.ts +5 -0
  253. package/dist/components/lists-and-menus/list-item/list-item.d.ts.map +1 -1
  254. package/dist/components/lists-and-menus/list-item/list-item.js +7 -0
  255. package/dist/components/lists-and-menus/list-item/list-item.js.map +1 -1
  256. package/dist/components/lists-and-menus/list-item/list-item.styles.js +1 -1
  257. package/dist/components/lists-and-menus/menu/menu.d.ts +254 -0
  258. package/dist/components/lists-and-menus/menu/menu.d.ts.map +1 -1
  259. package/dist/components/lists-and-menus/menu/menu.i18n.d.ts +1 -0
  260. package/dist/components/lists-and-menus/menu/menu.i18n.d.ts.map +1 -1
  261. package/dist/components/lists-and-menus/menu/menu.i18n.js +1 -0
  262. package/dist/components/lists-and-menus/menu/menu.i18n.js.map +1 -1
  263. package/dist/components/lists-and-menus/menu/menu.js +906 -15
  264. package/dist/components/lists-and-menus/menu/menu.js.map +1 -1
  265. package/dist/components/lists-and-menus/menu/menu.styles.d.ts +1 -0
  266. package/dist/components/lists-and-menus/menu/menu.styles.d.ts.map +1 -1
  267. package/dist/components/lists-and-menus/menu/menu.styles.js +141 -2
  268. package/dist/components/lists-and-menus/menu/menu.styles.js.map +1 -1
  269. package/dist/components/lists-and-menus/menu/menu.template.d.ts +2 -1
  270. package/dist/components/lists-and-menus/menu/menu.template.d.ts.map +1 -1
  271. package/dist/components/lists-and-menus/menu/menu.template.js +60 -0
  272. package/dist/components/lists-and-menus/menu/menu.template.js.map +1 -1
  273. package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.js +1 -1
  274. package/dist/components/navigation/document-tab-bar/document-tab-bar.template.js +1 -1
  275. package/dist/components/navigation/document-tab-bar/document-tab-bar.template.js.map +1 -1
  276. package/dist/components/navigation/menu-bar/menu-bar.js +4 -4
  277. package/dist/components/navigation/menu-bar/menu-bar.js.map +1 -1
  278. package/dist/components/navigation/menu-bar-item/menu-bar-item.d.ts +1 -1
  279. package/dist/components/navigation/menu-bar-item/menu-bar-item.d.ts.map +1 -1
  280. package/dist/components/navigation/menu-bar-item/menu-bar-item.js +6 -6
  281. package/dist/components/navigation/menu-bar-item/menu-bar-item.js.map +1 -1
  282. package/dist/components/navigation/menu-bar-item/menu-bar-item.styles.js +2 -2
  283. package/dist/components/navigation/menu-bar-item/menu-bar-item.template.js +1 -1
  284. package/dist/components/navigation/menu-bar-item/menu-bar-item.template.js.map +1 -1
  285. package/dist/components/navigation/pagination/pagination.d.ts +3 -2
  286. package/dist/components/navigation/pagination/pagination.d.ts.map +1 -1
  287. package/dist/components/navigation/pagination/pagination.js +5 -4
  288. package/dist/components/navigation/pagination/pagination.js.map +1 -1
  289. package/dist/components/navigation/pagination/pagination.styles.d.ts.map +1 -1
  290. package/dist/components/navigation/pagination/pagination.styles.js +5 -3
  291. package/dist/components/navigation/pagination/pagination.styles.js.map +1 -1
  292. package/dist/components/navigation/pagination/pagination.template.js +1 -1
  293. package/dist/components/navigation/tab-bar/tab-bar.d.ts +3 -1
  294. package/dist/components/navigation/tab-bar/tab-bar.d.ts.map +1 -1
  295. package/dist/components/navigation/tab-bar/tab-bar.js +5 -3
  296. package/dist/components/navigation/tab-bar/tab-bar.js.map +1 -1
  297. package/dist/components/navigation/tab-bar/tab-bar.styles.d.ts.map +1 -1
  298. package/dist/components/navigation/tab-bar/tab-bar.styles.js +35 -15
  299. package/dist/components/navigation/tab-bar/tab-bar.styles.js.map +1 -1
  300. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js +2 -2
  301. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js.map +1 -1
  302. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js +6 -6
  303. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js.map +1 -1
  304. package/dist/components/navigation/top-title-bar/top-title-bar.styles.d.ts.map +1 -1
  305. package/dist/components/navigation/top-title-bar/top-title-bar.styles.js +2 -0
  306. package/dist/components/navigation/top-title-bar/top-title-bar.styles.js.map +1 -1
  307. package/dist/components/navigation/top-title-bar/top-title-bar.template.d.ts.map +1 -1
  308. package/dist/components/navigation/top-title-bar/top-title-bar.template.js +1 -0
  309. package/dist/components/navigation/top-title-bar/top-title-bar.template.js.map +1 -1
  310. package/dist/components/{prism-typescript-9LDqHHRS.js → prism-typescript-BlIir5CV.js} +1 -1
  311. package/dist/components/status-and-feedback/badge/badge.d.ts +3 -3
  312. package/dist/components/status-and-feedback/badge/badge.d.ts.map +1 -1
  313. package/dist/components/status-and-feedback/badge/badge.js +3 -3
  314. package/dist/components/status-and-feedback/badge/badge.js.map +1 -1
  315. package/dist/components/status-and-feedback/badge/badge.styles.d.ts.map +1 -1
  316. package/dist/components/status-and-feedback/badge/badge.styles.js +7 -6
  317. package/dist/components/status-and-feedback/badge/badge.styles.js.map +1 -1
  318. package/dist/components/status-and-feedback/inline-dialog/inline-dialog.d.ts +7 -4
  319. package/dist/components/status-and-feedback/inline-dialog/inline-dialog.d.ts.map +1 -1
  320. package/dist/components/status-and-feedback/inline-dialog/inline-dialog.js +10 -3
  321. package/dist/components/status-and-feedback/inline-dialog/inline-dialog.js.map +1 -1
  322. package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.d.ts.map +1 -1
  323. package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.js +12 -2
  324. package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.js.map +1 -1
  325. package/dist/css/global.css +1 -0
  326. package/dist/css/reset.css +7 -0
  327. package/dist/css/rich-text.css +21 -21
  328. package/dist/css/settings.css +140 -98
  329. package/dist/fonts/JetBrainsMono-Italic[wght].woff2 +0 -0
  330. package/dist/fonts/JetBrainsMono[wght].woff2 +0 -0
  331. package/dist/fonts/RijksSansWeb-Italic.woff2 +0 -0
  332. package/dist/fonts/RijksSansWeb-Regular.woff2 +0 -0
  333. package/dist/utilities/visibility-mixin.d.ts +18 -12
  334. package/dist/utilities/visibility-mixin.d.ts.map +1 -1
  335. package/dist/utilities/visibility-mixin.js +21 -14
  336. package/dist/utilities/visibility-mixin.js.map +1 -1
  337. package/package.json +7 -3
  338. package/dist/fonts/IBMPlexMono-Bold.woff2 +0 -0
  339. package/dist/fonts/IBMPlexMono-Regular.woff2 +0 -0
  340. package/dist/fonts/RijksSansVF-Italic.ttf +0 -0
  341. package/dist/fonts/RijksSansVF-Regular.ttf +0 -0
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` |
@@ -101,6 +101,23 @@ CSS variabelen zijn georganiseerd in vijf lagen:
101
101
 
102
102
  Mis je een component of wil je een wijziging voorstellen? [Maak een issue aan](https://github.com/MinBZK/storybook/issues).
103
103
 
104
+ ## Fonts
105
+
106
+ Het design system gebruikt twee fonts, met verschillende licenties:
107
+
108
+ - **JetBrains Mono** (monospace) — vrij te gebruiken onder de
109
+ [SIL Open Font License 1.1](https://openfontlicense.org).
110
+ - **Rijksoverheid Sans** (`RijksSansWeb`) — auteursrechtelijk beschermd
111
+ door de Staat der Nederlanden. **Uitsluitend bedoeld voor publicaties
112
+ van de Rijksoverheid** of partijen die in opdracht van de Rijksoverheid
113
+ werken. Voor ander gebruik is voorafgaande schriftelijke toestemming
114
+ vereist; neem contact op met de Rijksvoorlichtingsdienst.
115
+
116
+ Volledige licentie-informatie staat in [`NOTICES.md`](./NOTICES.md). Door
117
+ de fonts mee te leveren in deze repository wordt geen licentie verleend
118
+ buiten het hierboven beschreven kader.
119
+
104
120
  ## Licentie (License)
105
121
 
106
- EUPL-1.2
122
+ De broncode van dit design system valt onder **EUPL-1.2**. De fontbestanden
123
+ in `src/assets/fonts/` hebben hun eigen licenties — zie [`NOTICES.md`](./NOTICES.md).
@@ -0,0 +1,25 @@
1
+ /**
2
+ * JavaScript-accessible design tokens for `@nldd/design-system`.
3
+ *
4
+ * Most tokens live in `settings.css` as CSS custom properties — that's the
5
+ * right home for anything CSS consumes directly. This module re-exports the
6
+ * subset of tokens that consumers also need from JavaScript: matchMedia
7
+ * thresholds, IntersectionObserver root margins, container-query breakpoints
8
+ * computed in JS, etc.
9
+ *
10
+ * Imported via the package's `./tokens` export:
11
+ *
12
+ * ```ts
13
+ * import { breakpoints } from '@nldd/design-system/tokens';
14
+ *
15
+ * const isDesktop = matchMedia(`(min-width: ${breakpoints.lgMin})`).matches;
16
+ * ```
17
+ *
18
+ * Add re-exports here as new JS-side tokens land. Keep CSS-only tokens out —
19
+ * duplicating them here would invite drift. If something is needed in JS,
20
+ * make the canonical source a `.ts` constants file (like `breakpoints.ts`)
21
+ * and let `settings.css` derive from it via build-time generation, rather
22
+ * than the other way around.
23
+ */
24
+ export { breakpoints } from './breakpoints.js';
25
+ //# sourceMappingURL=tokens.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../src/assets/styles/tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * JavaScript-accessible design tokens for `@nldd/design-system`.
3
+ *
4
+ * Most tokens live in `settings.css` as CSS custom properties — that's the
5
+ * right home for anything CSS consumes directly. This module re-exports the
6
+ * subset of tokens that consumers also need from JavaScript: matchMedia
7
+ * thresholds, IntersectionObserver root margins, container-query breakpoints
8
+ * computed in JS, etc.
9
+ *
10
+ * Imported via the package's `./tokens` export:
11
+ *
12
+ * ```ts
13
+ * import { breakpoints } from '@nldd/design-system/tokens';
14
+ *
15
+ * const isDesktop = matchMedia(`(min-width: ${breakpoints.lgMin})`).matches;
16
+ * ```
17
+ *
18
+ * Add re-exports here as new JS-side tokens land. Keep CSS-only tokens out —
19
+ * duplicating them here would invite drift. If something is needed in JS,
20
+ * make the canonical source a `.ts` constants file (like `breakpoints.ts`)
21
+ * and let `settings.css` derive from it via build-time generation, rather
22
+ * than the other way around.
23
+ */
24
+ export { breakpoints } from './breakpoints.js';
25
+ //# sourceMappingURL=tokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../src/assets/styles/tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
@@ -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,10 +66,15 @@ 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;
73
+ /**
74
+ * Delegates focus to the inner `<button>` (or `<a>` when `href` is set), so
75
+ * consumers can call `buttonEl.focus()` without reaching into shadow DOM.
76
+ */
77
+ focus(options?: FocusOptions): void;
60
78
  render(): import("lit-html").TemplateResult<1>;
61
79
  }
62
80
  declare global {
@@ -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,I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,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;
@@ -86,6 +109,13 @@ let NLDDButton = class NLDDButton extends LitElement {
86
109
  return 'noopener noreferrer';
87
110
  return '';
88
111
  }
112
+ /**
113
+ * Delegates focus to the inner `<button>` (or `<a>` when `href` is set), so
114
+ * consumers can call `buttonEl.focus()` without reaching into shadow DOM.
115
+ */
116
+ focus(options) {
117
+ this.shadowRoot?.querySelector('.button')?.focus(options);
118
+ }
89
119
  render() {
90
120
  return template.call(this, {
91
121
  handleClick: this._handleClick.bind(this),
@@ -100,11 +130,17 @@ __decorate([
100
130
  property({ type: String, reflect: true })
101
131
  ], NLDDButton.prototype, "size", void 0);
102
132
  __decorate([
103
- property({ type: Boolean, reflect: true, attribute: 'full-width' })
104
- ], NLDDButton.prototype, "fullWidth", void 0);
133
+ property({ type: String, reflect: true })
134
+ ], NLDDButton.prototype, "width", void 0);
105
135
  __decorate([
106
136
  property({ type: Boolean, reflect: true, attribute: 'expandable' })
107
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);
108
144
  __decorate([
109
145
  property({ type: String, reflect: true })
110
146
  ], NLDDButton.prototype, "type", void 0);
@@ -117,6 +153,9 @@ __decorate([
117
153
  __decorate([
118
154
  property({ type: String })
119
155
  ], NLDDButton.prototype, "text", void 0);
156
+ __decorate([
157
+ property({ type: Boolean, reflect: true, attribute: 'single-line' })
158
+ ], NLDDButton.prototype, "singleLine", void 0);
120
159
  __decorate([
121
160
  property({ type: String, attribute: 'start-icon' })
122
161
  ], NLDDButton.prototype, "startIcon", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"button.js","sourceRoot":"","sources":["../../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AAE,UAAU,EAAE,CAAC;2CACrC;AAIb;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,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
  }