@nldd/design-system 0.8.42 → 0.8.44

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 (381) hide show
  1. package/README.md +1 -1
  2. package/dist/components/actions/button/button.d.ts +36 -5
  3. package/dist/components/actions/button/button.d.ts.map +1 -1
  4. package/dist/components/actions/button/button.js +62 -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 +149 -63
  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 +19 -1
  11. package/dist/components/actions/button/button.template.js.map +1 -1
  12. package/dist/components/actions/button-bar/button-bar.styles.js +4 -4
  13. package/dist/components/actions/button-group/button-group.js +2 -2
  14. package/dist/components/actions/button-group/button-group.js.map +1 -1
  15. package/dist/components/actions/button-group/button-group.styles.js +1 -1
  16. package/dist/components/actions/icon-button/icon-button.d.ts +43 -11
  17. package/dist/components/actions/icon-button/icon-button.d.ts.map +1 -1
  18. package/dist/components/actions/icon-button/icon-button.js +68 -14
  19. package/dist/components/actions/icon-button/icon-button.js.map +1 -1
  20. package/dist/components/actions/icon-button/icon-button.styles.d.ts.map +1 -1
  21. package/dist/components/actions/icon-button/icon-button.styles.js +163 -106
  22. package/dist/components/actions/icon-button/icon-button.styles.js.map +1 -1
  23. package/dist/components/actions/icon-button/icon-button.template.d.ts.map +1 -1
  24. package/dist/components/actions/icon-button/icon-button.template.js +20 -2
  25. package/dist/components/actions/icon-button/icon-button.template.js.map +1 -1
  26. package/dist/components/actions/split-button/split-button.d.ts +5 -5
  27. package/dist/components/actions/split-button/split-button.d.ts.map +1 -1
  28. package/dist/components/actions/split-button/split-button.js +19 -15
  29. package/dist/components/actions/split-button/split-button.js.map +1 -1
  30. package/dist/components/actions/split-button/split-button.styles.js +1 -1
  31. package/dist/components/actions/split-button/split-button.template.d.ts.map +1 -1
  32. package/dist/components/actions/split-button/split-button.template.js +14 -12
  33. package/dist/components/actions/split-button/split-button.template.js.map +1 -1
  34. package/dist/components/actions/toolbar/toolbar.d.ts +4 -6
  35. package/dist/components/actions/toolbar/toolbar.d.ts.map +1 -1
  36. package/dist/components/actions/toolbar/toolbar.js +31 -28
  37. package/dist/components/actions/toolbar/toolbar.js.map +1 -1
  38. package/dist/components/actions/toolbar/toolbar.styles.js +17 -17
  39. package/dist/components/actions/toolbar/toolbar.template.d.ts +3 -3
  40. package/dist/components/actions/toolbar/toolbar.template.d.ts.map +1 -1
  41. package/dist/components/actions/toolbar/toolbar.template.js +17 -9
  42. package/dist/components/actions/toolbar/toolbar.template.js.map +1 -1
  43. package/dist/components/components.js +1 -1
  44. package/dist/components/content/blockquote/blockquote.styles.js +6 -6
  45. package/dist/components/content/blockquote/blockquote.styles.js.map +1 -1
  46. package/dist/components/content/code/code.styles.js +3 -3
  47. package/dist/components/content/icon/icon-aliases.d.ts.map +1 -1
  48. package/dist/components/content/icon/icon-aliases.js +15 -0
  49. package/dist/components/content/icon/icon-aliases.js.map +1 -1
  50. package/dist/components/content/icon/icon-registry.d.ts.map +1 -1
  51. package/dist/components/content/icon/icon-registry.js +11 -5
  52. package/dist/components/content/icon/icon-registry.js.map +1 -1
  53. package/dist/components/content/icon/icon.styles.js +1 -1
  54. package/dist/components/content/keyboard-shortcut/keyboard-shortcut.d.ts +22 -0
  55. package/dist/components/content/keyboard-shortcut/keyboard-shortcut.d.ts.map +1 -1
  56. package/dist/components/content/keyboard-shortcut/keyboard-shortcut.js +46 -2
  57. package/dist/components/content/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
  58. package/dist/components/content/keyboard-shortcut/keyboard-shortcut.styles.js +5 -5
  59. package/dist/components/content/rich-text/rich-text.d.ts +3 -1
  60. package/dist/components/content/rich-text/rich-text.d.ts.map +1 -1
  61. package/dist/components/content/rich-text/rich-text.js +6 -1
  62. package/dist/components/content/rich-text/rich-text.js.map +1 -1
  63. package/dist/components/content/tag/tag.d.ts +3 -3
  64. package/dist/components/content/tag/tag.d.ts.map +1 -1
  65. package/dist/components/content/tag/tag.js +3 -3
  66. package/dist/components/content/tag/tag.js.map +1 -1
  67. package/dist/components/content/tag/tag.styles.d.ts.map +1 -1
  68. package/dist/components/content/tag/tag.styles.js +113 -15
  69. package/dist/components/content/tag/tag.styles.js.map +1 -1
  70. package/dist/components/content/title/title.styles.js +20 -20
  71. package/dist/components/content/title/title.styles.js.map +1 -1
  72. package/dist/components/content/tooltip/tooltip.d.ts +13 -7
  73. package/dist/components/content/tooltip/tooltip.d.ts.map +1 -1
  74. package/dist/components/content/tooltip/tooltip.js +34 -22
  75. package/dist/components/content/tooltip/tooltip.js.map +1 -1
  76. package/dist/components/content/tooltip/tooltip.styles.js +8 -8
  77. package/dist/components/forms/form-actions/form-actions.styles.js +2 -2
  78. package/dist/components/forms/form-field/form-field.styles.js +6 -6
  79. package/dist/components/{index-CJ3mdHHo.js → index-1v33GjGX.js} +4134 -3286
  80. package/dist/components/index.d.ts +1 -1
  81. package/dist/components/index.d.ts.map +1 -1
  82. package/dist/components/index.js +1 -1
  83. package/dist/components/index.js.map +1 -1
  84. package/dist/components/inputs/checkbox/checkbox.styles.js +9 -9
  85. package/dist/components/inputs/checkbox-field/checkbox-field.styles.js +4 -4
  86. package/dist/components/inputs/code-editor/code-editor.styles.js +14 -14
  87. package/dist/components/inputs/combo-box/combo-box.d.ts +1 -1
  88. package/dist/components/inputs/combo-box/combo-box.d.ts.map +1 -1
  89. package/dist/components/inputs/combo-box/combo-box.js +8 -2
  90. package/dist/components/inputs/combo-box/combo-box.js.map +1 -1
  91. package/dist/components/inputs/combo-box/combo-box.styles.d.ts.map +1 -1
  92. package/dist/components/inputs/combo-box/combo-box.styles.js +17 -14
  93. package/dist/components/inputs/combo-box/combo-box.styles.js.map +1 -1
  94. package/dist/components/inputs/combo-box/combo-box.template.d.ts.map +1 -1
  95. package/dist/components/inputs/combo-box/combo-box.template.js +4 -2
  96. package/dist/components/inputs/combo-box/combo-box.template.js.map +1 -1
  97. package/dist/components/inputs/dropdown/dropdown.d.ts +13 -1
  98. package/dist/components/inputs/dropdown/dropdown.d.ts.map +1 -1
  99. package/dist/components/inputs/dropdown/dropdown.js +33 -2
  100. package/dist/components/inputs/dropdown/dropdown.js.map +1 -1
  101. package/dist/components/inputs/dropdown/dropdown.styles.d.ts.map +1 -1
  102. package/dist/components/inputs/dropdown/dropdown.styles.js +24 -16
  103. package/dist/components/inputs/dropdown/dropdown.styles.js.map +1 -1
  104. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.d.ts +1 -1
  105. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.d.ts.map +1 -1
  106. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.js +8 -2
  107. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.js.map +1 -1
  108. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.d.ts.map +1 -1
  109. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.js +14 -11
  110. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.js.map +1 -1
  111. package/dist/components/inputs/number-field/number-field.d.ts +2 -4
  112. package/dist/components/inputs/number-field/number-field.d.ts.map +1 -1
  113. package/dist/components/inputs/number-field/number-field.js +8 -12
  114. package/dist/components/inputs/number-field/number-field.js.map +1 -1
  115. package/dist/components/inputs/number-field/number-field.styles.d.ts.map +1 -1
  116. package/dist/components/inputs/number-field/number-field.styles.js +19 -18
  117. package/dist/components/inputs/number-field/number-field.styles.js.map +1 -1
  118. package/dist/components/inputs/number-field/number-field.template.js +2 -2
  119. package/dist/components/inputs/password-field/password-field.d.ts +9 -9
  120. package/dist/components/inputs/password-field/password-field.d.ts.map +1 -1
  121. package/dist/components/inputs/password-field/password-field.js +24 -18
  122. package/dist/components/inputs/password-field/password-field.js.map +1 -1
  123. package/dist/components/inputs/password-field/password-field.styles.d.ts.map +1 -1
  124. package/dist/components/inputs/password-field/password-field.styles.js +20 -17
  125. package/dist/components/inputs/password-field/password-field.styles.js.map +1 -1
  126. package/dist/components/inputs/password-field/password-field.template.js +3 -3
  127. package/dist/components/inputs/password-field/password-field.template.js.map +1 -1
  128. package/dist/components/inputs/radio-button/radio-button.styles.js +11 -11
  129. package/dist/components/inputs/radio-button-field/radio-button-field.styles.js +4 -4
  130. package/dist/components/inputs/search-field/search-field.d.ts +1 -1
  131. package/dist/components/inputs/search-field/search-field.d.ts.map +1 -1
  132. package/dist/components/inputs/search-field/search-field.js +8 -2
  133. package/dist/components/inputs/search-field/search-field.js.map +1 -1
  134. package/dist/components/inputs/search-field/search-field.styles.d.ts.map +1 -1
  135. package/dist/components/inputs/search-field/search-field.styles.js +19 -16
  136. package/dist/components/inputs/search-field/search-field.styles.js.map +1 -1
  137. package/dist/components/inputs/segmented-control/segmented-control.d.ts +8 -2
  138. package/dist/components/inputs/segmented-control/segmented-control.d.ts.map +1 -1
  139. package/dist/components/inputs/segmented-control/segmented-control.js +25 -4
  140. package/dist/components/inputs/segmented-control/segmented-control.js.map +1 -1
  141. package/dist/components/inputs/segmented-control/segmented-control.styles.d.ts.map +1 -1
  142. package/dist/components/inputs/segmented-control/segmented-control.styles.js +78 -107
  143. package/dist/components/inputs/segmented-control/segmented-control.styles.js.map +1 -1
  144. package/dist/components/inputs/segmented-control/segmented-control.template.js +1 -1
  145. package/dist/components/inputs/stepper/stepper.styles.js +2 -2
  146. package/dist/components/inputs/stepper/stepper.template.js +2 -2
  147. package/dist/components/inputs/switch/switch.styles.js +13 -13
  148. package/dist/components/inputs/switch-field/switch-field.styles.js +4 -4
  149. package/dist/components/inputs/text-field/text-field.d.ts +1 -1
  150. package/dist/components/inputs/text-field/text-field.d.ts.map +1 -1
  151. package/dist/components/inputs/text-field/text-field.js +8 -2
  152. package/dist/components/inputs/text-field/text-field.js.map +1 -1
  153. package/dist/components/inputs/text-field/text-field.styles.d.ts.map +1 -1
  154. package/dist/components/inputs/text-field/text-field.styles.js +19 -16
  155. package/dist/components/inputs/text-field/text-field.styles.js.map +1 -1
  156. package/dist/components/inputs/toggle-button/toggle-button.styles.d.ts.map +1 -1
  157. package/dist/components/inputs/toggle-button/toggle-button.styles.js +38 -18
  158. package/dist/components/inputs/toggle-button/toggle-button.styles.js.map +1 -1
  159. package/dist/components/inputs/token/token.d.ts +3 -3
  160. package/dist/components/inputs/token/token.d.ts.map +1 -1
  161. package/dist/components/inputs/token/token.js +6 -6
  162. package/dist/components/inputs/token/token.js.map +1 -1
  163. package/dist/components/inputs/token/token.styles.js +7 -7
  164. package/dist/components/inputs/token/token.template.js +2 -2
  165. package/dist/components/inputs/token/token.template.js.map +1 -1
  166. package/dist/components/layout/app-view/app-view.styles.js +4 -4
  167. package/dist/components/layout/box/box.styles.js +2 -2
  168. package/dist/components/layout/card/card.js +1 -1
  169. package/dist/components/layout/card/card.js.map +1 -1
  170. package/dist/components/layout/card/card.styles.js +4 -4
  171. package/dist/components/layout/collection/collection.styles.js +6 -6
  172. package/dist/components/layout/container/container.d.ts +4 -4
  173. package/dist/components/layout/container/container.js +4 -4
  174. package/dist/components/layout/container/container.styles.js +399 -399
  175. package/dist/components/layout/container/container.styles.js.map +1 -1
  176. package/dist/components/layout/divider/divider.styles.js +2 -2
  177. package/dist/components/layout/page/page.js +1 -1
  178. package/dist/components/layout/page/page.js.map +1 -1
  179. package/dist/components/layout/page/page.styles.js +9 -9
  180. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.d.ts +6 -3
  181. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.d.ts.map +1 -1
  182. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.js +21 -5
  183. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.js.map +1 -1
  184. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.styles.d.ts.map +1 -1
  185. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.styles.js +24 -23
  186. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.styles.js.map +1 -1
  187. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.d.ts +6 -3
  188. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.d.ts.map +1 -1
  189. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.js +21 -5
  190. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.js.map +1 -1
  191. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.styles.js +18 -18
  192. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.styles.js.map +1 -1
  193. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.d.ts +6 -3
  194. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.d.ts.map +1 -1
  195. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.js +21 -5
  196. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.js.map +1 -1
  197. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.styles.js +18 -18
  198. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.styles.js.map +1 -1
  199. package/dist/components/layout/page-sections/simple-section/simple-section.d.ts +6 -3
  200. package/dist/components/layout/page-sections/simple-section/simple-section.d.ts.map +1 -1
  201. package/dist/components/layout/page-sections/simple-section/simple-section.js +21 -5
  202. package/dist/components/layout/page-sections/simple-section/simple-section.js.map +1 -1
  203. package/dist/components/layout/page-sections/simple-section/simple-section.styles.js +23 -23
  204. package/dist/components/layout/page-sections/simple-section/simple-section.styles.js.map +1 -1
  205. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.d.ts +6 -3
  206. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.d.ts.map +1 -1
  207. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.js +21 -5
  208. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.js.map +1 -1
  209. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.styles.js +18 -18
  210. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.styles.js.map +1 -1
  211. package/dist/components/layout/popover/popover.js +1 -1
  212. package/dist/components/layout/popover/popover.js.map +1 -1
  213. package/dist/components/layout/popover/popover.styles.js +4 -4
  214. package/dist/components/layout/sheet/sheet.d.ts +17 -4
  215. package/dist/components/layout/sheet/sheet.d.ts.map +1 -1
  216. package/dist/components/layout/sheet/sheet.js +43 -9
  217. package/dist/components/layout/sheet/sheet.js.map +1 -1
  218. package/dist/components/layout/sheet/sheet.styles.d.ts.map +1 -1
  219. package/dist/components/layout/sheet/sheet.styles.js +33 -40
  220. package/dist/components/layout/sheet/sheet.styles.js.map +1 -1
  221. package/dist/components/layout/spacer/spacer.styles.js +5 -5
  222. package/dist/components/layout/split-views/bar-split-view/bar-split-view.styles.js +9 -9
  223. package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.styles.js +34 -34
  224. package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.styles.js +6 -6
  225. package/dist/components/layout/split-views/split-view-divider/split-view-divider.styles.js +4 -4
  226. package/dist/components/layout/split-views/split-view-pane/split-view-pane.js +1 -1
  227. package/dist/components/layout/split-views/split-view-pane/split-view-pane.js.map +1 -1
  228. package/dist/components/layout/split-views/split-view-pane/split-view-pane.styles.js +3 -3
  229. package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.styles.js +7 -7
  230. package/dist/components/layout/window/window.js +1 -1
  231. package/dist/components/layout/window/window.js.map +1 -1
  232. package/dist/components/layout/window/window.styles.js +8 -8
  233. package/dist/components/lists-and-menus/cells/cell/cell.d.ts +4 -2
  234. package/dist/components/lists-and-menus/cells/cell/cell.d.ts.map +1 -1
  235. package/dist/components/lists-and-menus/cells/cell/cell.js +17 -6
  236. package/dist/components/lists-and-menus/cells/cell/cell.js.map +1 -1
  237. package/dist/components/lists-and-menus/cells/cell/cell.styles.d.ts.map +1 -1
  238. package/dist/components/lists-and-menus/cells/cell/cell.styles.js +26 -15
  239. package/dist/components/lists-and-menus/cells/cell/cell.styles.js.map +1 -1
  240. package/dist/components/lists-and-menus/cells/description-cell/description-cell.d.ts +2 -2
  241. package/dist/components/lists-and-menus/cells/description-cell/description-cell.d.ts.map +1 -1
  242. package/dist/components/lists-and-menus/cells/description-cell/description-cell.js +12 -7
  243. package/dist/components/lists-and-menus/cells/description-cell/description-cell.js.map +1 -1
  244. package/dist/components/lists-and-menus/cells/description-cell/description-cell.styles.d.ts.map +1 -1
  245. package/dist/components/lists-and-menus/cells/description-cell/description-cell.styles.js +9 -8
  246. package/dist/components/lists-and-menus/cells/description-cell/description-cell.styles.js.map +1 -1
  247. package/dist/components/lists-and-menus/cells/drag-handle-cell/drag-handle-cell.styles.js +9 -9
  248. package/dist/components/lists-and-menus/cells/icon-cell/icon-cell.d.ts.map +1 -1
  249. package/dist/components/lists-and-menus/cells/icon-cell/icon-cell.js +1 -1
  250. package/dist/components/lists-and-menus/cells/icon-cell/icon-cell.js.map +1 -1
  251. package/dist/components/lists-and-menus/cells/spacer-cell/spacer-cell.d.ts.map +1 -1
  252. package/dist/components/lists-and-menus/cells/spacer-cell/spacer-cell.js +1 -1
  253. package/dist/components/lists-and-menus/cells/spacer-cell/spacer-cell.js.map +1 -1
  254. package/dist/components/lists-and-menus/cells/spacer-cell/spacer-cell.styles.js +1 -1
  255. package/dist/components/lists-and-menus/cells/text-cell/text-cell.d.ts +3 -4
  256. package/dist/components/lists-and-menus/cells/text-cell/text-cell.d.ts.map +1 -1
  257. package/dist/components/lists-and-menus/cells/text-cell/text-cell.js +13 -9
  258. package/dist/components/lists-and-menus/cells/text-cell/text-cell.js.map +1 -1
  259. package/dist/components/lists-and-menus/cells/text-cell/text-cell.styles.d.ts.map +1 -1
  260. package/dist/components/lists-and-menus/cells/text-cell/text-cell.styles.js +26 -9
  261. package/dist/components/lists-and-menus/cells/text-cell/text-cell.styles.js.map +1 -1
  262. package/dist/components/lists-and-menus/cells/title-cell/title-cell.d.ts +3 -4
  263. package/dist/components/lists-and-menus/cells/title-cell/title-cell.d.ts.map +1 -1
  264. package/dist/components/lists-and-menus/cells/title-cell/title-cell.js +12 -8
  265. package/dist/components/lists-and-menus/cells/title-cell/title-cell.js.map +1 -1
  266. package/dist/components/lists-and-menus/cells/title-cell/title-cell.styles.d.ts.map +1 -1
  267. package/dist/components/lists-and-menus/cells/title-cell/title-cell.styles.js +26 -9
  268. package/dist/components/lists-and-menus/cells/title-cell/title-cell.styles.js.map +1 -1
  269. package/dist/components/lists-and-menus/list/list.d.ts.map +1 -1
  270. package/dist/components/lists-and-menus/list/list.i18n.js +1 -1
  271. package/dist/components/lists-and-menus/list/list.i18n.js.map +1 -1
  272. package/dist/components/lists-and-menus/list/list.js +7 -0
  273. package/dist/components/lists-and-menus/list/list.js.map +1 -1
  274. package/dist/components/lists-and-menus/list/list.styles.js +13 -13
  275. package/dist/components/lists-and-menus/list-item/list-item.styles.js +21 -21
  276. package/dist/components/lists-and-menus/menu/menu.d.ts +160 -29
  277. package/dist/components/lists-and-menus/menu/menu.d.ts.map +1 -1
  278. package/dist/components/lists-and-menus/menu/menu.i18n.d.ts +2 -0
  279. package/dist/components/lists-and-menus/menu/menu.i18n.d.ts.map +1 -1
  280. package/dist/components/lists-and-menus/menu/menu.i18n.js +2 -0
  281. package/dist/components/lists-and-menus/menu/menu.i18n.js.map +1 -1
  282. package/dist/components/lists-and-menus/menu/menu.js +534 -102
  283. package/dist/components/lists-and-menus/menu/menu.js.map +1 -1
  284. package/dist/components/lists-and-menus/menu/menu.styles.d.ts.map +1 -1
  285. package/dist/components/lists-and-menus/menu/menu.styles.js +93 -32
  286. package/dist/components/lists-and-menus/menu/menu.styles.js.map +1 -1
  287. package/dist/components/lists-and-menus/menu/menu.template.d.ts.map +1 -1
  288. package/dist/components/lists-and-menus/menu/menu.template.js +13 -0
  289. package/dist/components/lists-and-menus/menu/menu.template.js.map +1 -1
  290. package/dist/components/navigation/document-tab-bar/document-tab-bar.d.ts +0 -2
  291. package/dist/components/navigation/document-tab-bar/document-tab-bar.d.ts.map +1 -1
  292. package/dist/components/navigation/document-tab-bar/document-tab-bar.js +20 -22
  293. package/dist/components/navigation/document-tab-bar/document-tab-bar.js.map +1 -1
  294. package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.js +48 -48
  295. package/dist/components/navigation/document-tab-bar/document-tab-bar.template.d.ts.map +1 -1
  296. package/dist/components/navigation/document-tab-bar/document-tab-bar.template.js +12 -10
  297. package/dist/components/navigation/document-tab-bar/document-tab-bar.template.js.map +1 -1
  298. package/dist/components/navigation/link/link.d.ts.map +1 -0
  299. package/dist/components/navigation/link/link.js.map +1 -0
  300. package/dist/components/navigation/link/link.styles.d.ts.map +1 -0
  301. package/dist/components/{actions → navigation}/link/link.styles.js +4 -4
  302. package/dist/components/navigation/link/link.styles.js.map +1 -0
  303. package/dist/components/navigation/link/link.template.d.ts.map +1 -0
  304. package/dist/components/navigation/link/link.template.js.map +1 -0
  305. package/dist/components/navigation/menu-bar/menu-bar.d.ts +17 -5
  306. package/dist/components/navigation/menu-bar/menu-bar.d.ts.map +1 -1
  307. package/dist/components/navigation/menu-bar/menu-bar.js +80 -35
  308. package/dist/components/navigation/menu-bar/menu-bar.js.map +1 -1
  309. package/dist/components/navigation/menu-bar/menu-bar.styles.js +2 -2
  310. package/dist/components/navigation/menu-bar/menu-bar.template.d.ts.map +1 -1
  311. package/dist/components/navigation/menu-bar/menu-bar.template.js +12 -2
  312. package/dist/components/navigation/menu-bar/menu-bar.template.js.map +1 -1
  313. package/dist/components/navigation/menu-bar-item/menu-bar-item.d.ts +17 -1
  314. package/dist/components/navigation/menu-bar-item/menu-bar-item.d.ts.map +1 -1
  315. package/dist/components/navigation/menu-bar-item/menu-bar-item.js +28 -6
  316. package/dist/components/navigation/menu-bar-item/menu-bar-item.js.map +1 -1
  317. package/dist/components/navigation/menu-bar-item/menu-bar-item.styles.js +21 -21
  318. package/dist/components/navigation/menu-bar-item/menu-bar-item.template.d.ts.map +1 -1
  319. package/dist/components/navigation/menu-bar-item/menu-bar-item.template.js +3 -1
  320. package/dist/components/navigation/menu-bar-item/menu-bar-item.template.js.map +1 -1
  321. package/dist/components/navigation/pagination/pagination.d.ts +15 -2
  322. package/dist/components/navigation/pagination/pagination.d.ts.map +1 -1
  323. package/dist/components/navigation/pagination/pagination.js +24 -4
  324. package/dist/components/navigation/pagination/pagination.js.map +1 -1
  325. package/dist/components/navigation/pagination/pagination.styles.d.ts.map +1 -1
  326. package/dist/components/navigation/pagination/pagination.styles.js +48 -76
  327. package/dist/components/navigation/pagination/pagination.styles.js.map +1 -1
  328. package/dist/components/navigation/pagination/pagination.template.d.ts.map +1 -1
  329. package/dist/components/navigation/pagination/pagination.template.js +23 -16
  330. package/dist/components/navigation/pagination/pagination.template.js.map +1 -1
  331. package/dist/components/navigation/skip-link/skip-link.styles.js +9 -9
  332. package/dist/components/navigation/tab-bar/tab-bar.d.ts +3 -1
  333. package/dist/components/navigation/tab-bar/tab-bar.d.ts.map +1 -1
  334. package/dist/components/navigation/tab-bar/tab-bar.js +5 -3
  335. package/dist/components/navigation/tab-bar/tab-bar.js.map +1 -1
  336. package/dist/components/navigation/tab-bar/tab-bar.styles.d.ts.map +1 -1
  337. package/dist/components/navigation/tab-bar/tab-bar.styles.js +55 -58
  338. package/dist/components/navigation/tab-bar/tab-bar.styles.js.map +1 -1
  339. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js +2 -2
  340. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js.map +1 -1
  341. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.d.ts.map +1 -1
  342. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js +57 -70
  343. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js.map +1 -1
  344. package/dist/components/navigation/top-title-bar/top-title-bar.styles.d.ts.map +1 -1
  345. package/dist/components/navigation/top-title-bar/top-title-bar.styles.js +16 -14
  346. package/dist/components/navigation/top-title-bar/top-title-bar.styles.js.map +1 -1
  347. package/dist/components/navigation/top-title-bar/top-title-bar.template.d.ts.map +1 -1
  348. package/dist/components/navigation/top-title-bar/top-title-bar.template.js +1 -0
  349. package/dist/components/navigation/top-title-bar/top-title-bar.template.js.map +1 -1
  350. package/dist/components/{prism-typescript-Cdpexfvg.js → prism-typescript-D2EqsCqV.js} +1 -1
  351. package/dist/components/status-and-feedback/badge/badge.d.ts +3 -3
  352. package/dist/components/status-and-feedback/badge/badge.d.ts.map +1 -1
  353. package/dist/components/status-and-feedback/badge/badge.js +3 -3
  354. package/dist/components/status-and-feedback/badge/badge.js.map +1 -1
  355. package/dist/components/status-and-feedback/badge/badge.styles.js +13 -13
  356. package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.js +7 -7
  357. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.styles.js +5 -5
  358. package/dist/css/global.css +1 -0
  359. package/dist/css/reset.css +7 -0
  360. package/dist/css/rich-text.css +106 -79
  361. package/dist/css/settings.css +121 -89
  362. package/dist/utilities/os.d.ts +27 -0
  363. package/dist/utilities/os.d.ts.map +1 -0
  364. package/dist/utilities/os.js +60 -0
  365. package/dist/utilities/os.js.map +1 -0
  366. package/dist/utilities/visibility-mixin.d.ts +18 -12
  367. package/dist/utilities/visibility-mixin.d.ts.map +1 -1
  368. package/dist/utilities/visibility-mixin.js +21 -14
  369. package/dist/utilities/visibility-mixin.js.map +1 -1
  370. package/package.json +6 -6
  371. package/dist/components/actions/link/link.d.ts.map +0 -1
  372. package/dist/components/actions/link/link.js.map +0 -1
  373. package/dist/components/actions/link/link.styles.d.ts.map +0 -1
  374. package/dist/components/actions/link/link.styles.js.map +0 -1
  375. package/dist/components/actions/link/link.template.d.ts.map +0 -1
  376. package/dist/components/actions/link/link.template.js.map +0 -1
  377. /package/dist/components/{actions → navigation}/link/link.d.ts +0 -0
  378. /package/dist/components/{actions → navigation}/link/link.js +0 -0
  379. /package/dist/components/{actions → navigation}/link/link.styles.d.ts +0 -0
  380. /package/dist/components/{actions → navigation}/link/link.template.d.ts +0 -0
  381. /package/dist/components/{actions → navigation}/link/link.template.js +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` |
@@ -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-expanded 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,48 @@
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;
49
+ /**
50
+ * Direct element reference to the popover this button invokes — IDL-only
51
+ * counterpart to `popovertarget` that works across shadow boundaries.
52
+ * Use this when the popover lives in a different tree (e.g. an
53
+ * `nldd-menu` reparented to `<body>`) so the browser still recognises
54
+ * this button as the popover's invoker and excludes it from the popover
55
+ * light-dismiss algorithm. Set programmatically; not reflected to an
56
+ * HTML attribute (the attribute form is `popovertarget`, ID-based).
57
+ */
58
+ popoverTargetElement: Element | null;
59
+ /**
60
+ * Action the browser performs when the button is clicked, mirroring the
61
+ * standard `popovertargetaction` attribute. Defaults to `'toggle'`. Use
62
+ * `'show'` when a separate handler owns the close path (e.g. the
63
+ * consumer toggles the popover programmatically) so the browser's
64
+ * default action doesn't double-fire.
65
+ */
66
+ popoverTargetAction: 'toggle' | 'show' | 'hide';
37
67
  disabled: boolean;
38
68
  /** Button text. */
39
69
  text: string;
70
+ singleLine: boolean;
40
71
  /** Icon name for the start icon (before text). When not set, the start-icon slot is used. */
41
72
  startIcon: string;
42
73
  /** Icon name for the end icon (after text). When not set, the end-icon slot is used. */
@@ -53,7 +84,7 @@ export declare class NLDDButton extends LitElement {
53
84
  */
54
85
  rel: string | undefined;
55
86
  private _warnedA11y;
56
- updated(): void;
87
+ updated(changedProperties: Map<string, unknown>): void;
57
88
  private _handleClick;
58
89
  /** Resolves the effective rel value for link rendering. */
59
90
  _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,I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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-expanded 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,34 @@ 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;
49
+ /**
50
+ * Direct element reference to the popover this button invokes — IDL-only
51
+ * counterpart to `popovertarget` that works across shadow boundaries.
52
+ * Use this when the popover lives in a different tree (e.g. an
53
+ * `nldd-menu` reparented to `<body>`) so the browser still recognises
54
+ * this button as the popover's invoker and excludes it from the popover
55
+ * light-dismiss algorithm. Set programmatically; not reflected to an
56
+ * HTML attribute (the attribute form is `popovertarget`, ID-based).
57
+ */
58
+ this.popoverTargetElement = null;
59
+ /**
60
+ * Action the browser performs when the button is clicked, mirroring the
61
+ * standard `popovertargetaction` attribute. Defaults to `'toggle'`. Use
62
+ * `'show'` when a separate handler owns the close path (e.g. the
63
+ * consumer toggles the popover programmatically) so the browser's
64
+ * default action doesn't double-fire.
65
+ */
66
+ this.popoverTargetAction = 'toggle';
44
67
  this.disabled = false;
45
68
  /** Button text. */
46
69
  this.text = '';
70
+ this.singleLine = false;
47
71
  /** Icon name for the start icon (before text). When not set, the start-icon slot is used. */
48
72
  this.startIcon = '';
49
73
  /** Icon name for the end icon (after text). When not set, the end-icon slot is used. */
@@ -61,7 +85,24 @@ let NLDDButton = class NLDDButton extends LitElement {
61
85
  this.rel = undefined;
62
86
  this._warnedA11y = false;
63
87
  }
64
- updated() {
88
+ updated(changedProperties) {
89
+ if (changedProperties.has('width')) {
90
+ const w = this.width;
91
+ // 'full' switches host to block + 100% via CSS attribute selector.
92
+ // A valid CSS length is applied as inline style.width on the host.
93
+ // In either case the inner button stretches via --_width, so
94
+ // a custom width on the host translates to a wide button instead of
95
+ // leaving the inner shrink-to-fit. Invalid values do nothing.
96
+ const isFull = w === 'full';
97
+ const isValidLength = !!w && !isFull && CSS.supports('width', w);
98
+ this.style.width = isValidLength ? w : '';
99
+ if (isFull || isValidLength) {
100
+ this.style.setProperty('--_width', '100%');
101
+ }
102
+ else {
103
+ this.style.removeProperty('--_width');
104
+ }
105
+ }
65
106
  const isEmpty = !this.text && !this.accessibleLabel;
66
107
  if (import.meta.env?.DEV && isEmpty && !this._warnedA11y) {
67
108
  this._warnedA11y = true;
@@ -107,23 +148,38 @@ __decorate([
107
148
  property({ type: String, reflect: true })
108
149
  ], NLDDButton.prototype, "size", void 0);
109
150
  __decorate([
110
- property({ type: Boolean, reflect: true, attribute: 'full-width' })
111
- ], NLDDButton.prototype, "fullWidth", void 0);
151
+ property({ type: String, reflect: true })
152
+ ], NLDDButton.prototype, "width", void 0);
112
153
  __decorate([
113
154
  property({ type: Boolean, reflect: true, attribute: 'expandable' })
114
155
  ], NLDDButton.prototype, "expandable", void 0);
156
+ __decorate([
157
+ property({ type: Boolean, reflect: true })
158
+ ], NLDDButton.prototype, "expanded", void 0);
159
+ __decorate([
160
+ property({ type: String, reflect: true, attribute: 'popup-type' })
161
+ ], NLDDButton.prototype, "popupType", void 0);
115
162
  __decorate([
116
163
  property({ type: String, reflect: true })
117
164
  ], NLDDButton.prototype, "type", void 0);
118
165
  __decorate([
119
166
  property({ type: String })
120
167
  ], NLDDButton.prototype, "popovertarget", void 0);
168
+ __decorate([
169
+ property({ attribute: false })
170
+ ], NLDDButton.prototype, "popoverTargetElement", void 0);
171
+ __decorate([
172
+ property({ attribute: false })
173
+ ], NLDDButton.prototype, "popoverTargetAction", void 0);
121
174
  __decorate([
122
175
  property({ type: Boolean, reflect: true })
123
176
  ], NLDDButton.prototype, "disabled", void 0);
124
177
  __decorate([
125
178
  property({ type: String })
126
179
  ], NLDDButton.prototype, "text", void 0);
180
+ __decorate([
181
+ property({ type: Boolean, reflect: true, attribute: 'single-line' })
182
+ ], NLDDButton.prototype, "singleLine", void 0);
127
183
  __decorate([
128
184
  property({ type: String, attribute: 'start-icon' })
129
185
  ], 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,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,8BAA8B,CAAC;AAgB/B,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,UAAU;IAAnC;;QAIN,YAAO,GAAY,gBAAgB,CAAC;QAGpC,SAAI,GAAS,IAAI,CAAC;QAGlB,cAAS,GAAG,KAAK,CAAC;QAGlB,eAAU,GAAG,KAAK,CAAC;QAGnB,SAAI,GAAe,QAAQ,CAAC;QAG5B,kBAAa,GAAuB,SAAS,CAAC;QAG9C,aAAQ,GAAG,KAAK,CAAC;QAEjB,mBAAmB;QAEnB,SAAI,GAAG,EAAE,CAAC;QAEV,6FAA6F;QAE7F,cAAS,GAAG,EAAE,CAAC;QAEf,wFAAwF;QAExF,YAAO,GAAG,EAAE,CAAC;QAEb,0GAA0G;QAE1G,oBAAe,GAAG,EAAE,CAAC;QAErB,4DAA4D;QAE5D,SAAI,GAAuB,SAAS,CAAC;QAErC,+DAA+D;QAE/D,WAAM,GAAuB,SAAS,CAAC;QAEvC;;;WAGG;QAEH,QAAG,GAAuB,SAAS,CAAC;QAE5B,gBAAW,GAAG,KAAK,CAAC;IAwC7B,CAAC;IAtCS,OAAO;QACf,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC;QACpD,IAAI,MAAM,CAAC,IAAI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AAE,CAAC;wDACa;AAU5C;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;uDAC4B;AAG3D;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CAC1B;AAIjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCACjB;AAGV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;8CAClD;AAInB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;6CACrC;AAIf;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,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;AA1FxB,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CAoJtB"}
@@ -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;
@@ -28,19 +40,20 @@ export const buttonStyles = css `
28
40
  /* # Block */
29
41
 
30
42
  .button {
31
- appearance: none;
32
- border: none;
33
- margin: 0;
34
- padding: 0;
35
- background: none;
36
- font: inherit;
37
43
  box-sizing: border-box;
38
- text-decoration: none;
39
44
  display: inline-flex;
45
+ margin: 0;
46
+ border: none;
47
+ background: none;
48
+ width: var(--_width);
49
+ max-width: 100%;
50
+ padding: 0;
40
51
  align-items: center;
41
52
  justify-content: center;
42
- width: 100%;
53
+ font: inherit;
54
+ text-decoration: none;
43
55
  text-wrap: pretty;
56
+ appearance: none;
44
57
  transition:
45
58
  background-color var(--primitives-transition-duration-fast) var(--primitives-transition-easing-default),
46
59
  color var(--primitives-transition-duration-fast) var(--primitives-transition-easing-default)
@@ -76,41 +89,43 @@ export const buttonStyles = css `
76
89
  /* ## Size: XS */
77
90
 
78
91
  :host([size="xs"]) .button {
92
+ border-radius: var(--semantics-controls-xs-corner-radius);
79
93
  min-height: var(--semantics-controls-xs-min-size);
80
94
  min-width: var(--semantics-controls-xs-min-size);
81
95
  padding: var(--semantics-controls-xs-block-padding) var(--semantics-controls-xs-inline-padding);
82
- font: var(--semantics-buttons-xs-font);
83
- border-radius: var(--semantics-controls-xs-corner-radius);
84
96
  gap: var(--semantics-buttons-xs-gap);
97
+ font: var(--semantics-buttons-xs-font);
85
98
  }
86
99
 
87
100
  /* ## Size: SM */
88
101
 
89
102
  :host([size="sm"]) .button {
103
+ border-radius: var(--semantics-controls-sm-corner-radius);
90
104
  min-height: var(--semantics-controls-sm-min-size);
91
105
  min-width: var(--semantics-controls-sm-min-size);
92
106
  padding: var(--semantics-controls-sm-block-padding) var(--semantics-controls-sm-inline-padding);
93
- font: var(--semantics-buttons-sm-font);
94
- border-radius: var(--semantics-controls-sm-corner-radius);
95
107
  gap: var(--semantics-buttons-sm-gap);
108
+ font: var(--semantics-buttons-sm-font);
96
109
  }
97
110
 
98
111
  /* ## Size: MD (Default) */
99
112
 
100
113
  :host([size="md"]) .button,
101
114
  :host(:not([size])) .button {
115
+ border-radius: var(--semantics-controls-md-corner-radius);
102
116
  min-height: var(--semantics-controls-md-min-size);
103
117
  min-width: var(--semantics-controls-md-min-size);
104
118
  padding: var(--semantics-controls-md-block-padding) var(--semantics-controls-md-inline-padding);
105
- font: var(--semantics-buttons-md-font);
106
- border-radius: var(--semantics-controls-md-corner-radius);
107
119
  gap: var(--semantics-buttons-md-gap);
120
+ font: var(--semantics-buttons-md-font);
108
121
  }
109
122
 
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-expanded-background-color);
163
+ color: var(--semantics-buttons-neutral-tinted-is-expanded-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-expanded-is-hovered-background-color);
173
+ color: var(--semantics-buttons-neutral-tinted-is-expanded-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-expanded-is-active-background-color);
183
+ color: var(--semantics-buttons-neutral-tinted-is-expanded-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 */
237
+ /* ### Open accent filled button */
178
238
 
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);
239
+ :host([expanded][variant="accent-filled"]) .button,
240
+ :host([expanded][variant="primary"]) .button {
241
+ background-color: var(--semantics-buttons-accent-filled-is-expanded-background-color);
242
+ color: var(--semantics-buttons-accent-filled-is-expanded-content-color);
186
243
  }
187
244
 
188
- :host([variant="accent-outlined"][size="md"]) .button {
189
- padding: calc(var(--primitives-space-12) - var(--semantics-buttons-accent-outlined-border-thickness));
190
- }
191
-
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
- ;
197
- }
198
-
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-expanded-is-hovered-background-color);
251
+ color: var(--semantics-buttons-accent-filled-is-expanded-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-expanded-is-active-background-color);
260
+ color: var(--semantics-buttons-accent-filled-is-expanded-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;
385
+ width: var(--_disclosure-icon-size);
386
+ height: var(--_disclosure-icon-size);
295
387
  flex-shrink: 0;
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"}