@nldd/design-system 0.8.99 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. package/custom-elements.json +484 -40
  2. package/dist/components/actions/button/button.d.ts +7 -5
  3. package/dist/components/actions/button/button.d.ts.map +1 -1
  4. package/dist/components/actions/button/button.i18n.d.ts +3 -1
  5. package/dist/components/actions/button/button.i18n.d.ts.map +1 -1
  6. package/dist/components/actions/button/button.i18n.js +3 -1
  7. package/dist/components/actions/button/button.i18n.js.map +1 -1
  8. package/dist/components/actions/button/button.js +3 -3
  9. package/dist/components/actions/button/button.styles.js +2 -2
  10. package/dist/components/actions/button/button.template.d.ts.map +1 -1
  11. package/dist/components/actions/button/button.template.js +9 -10
  12. package/dist/components/actions/button/button.template.js.map +1 -1
  13. package/dist/components/actions/icon-button/icon-button.d.ts +7 -5
  14. package/dist/components/actions/icon-button/icon-button.d.ts.map +1 -1
  15. package/dist/components/actions/icon-button/icon-button.i18n.d.ts +3 -1
  16. package/dist/components/actions/icon-button/icon-button.i18n.d.ts.map +1 -1
  17. package/dist/components/actions/icon-button/icon-button.i18n.js +3 -1
  18. package/dist/components/actions/icon-button/icon-button.i18n.js.map +1 -1
  19. package/dist/components/actions/icon-button/icon-button.js +3 -3
  20. package/dist/components/actions/icon-button/icon-button.template.d.ts.map +1 -1
  21. package/dist/components/actions/icon-button/icon-button.template.js +7 -7
  22. package/dist/components/actions/icon-button/icon-button.template.js.map +1 -1
  23. package/dist/components/actions/menu/menu.d.ts +9 -0
  24. package/dist/components/actions/menu/menu.d.ts.map +1 -1
  25. package/dist/components/actions/menu/menu.js +18 -1
  26. package/dist/components/actions/menu/menu.js.map +1 -1
  27. package/dist/components/actions/split-button/split-button.d.ts +1 -1
  28. package/dist/components/actions/split-button/split-button.js +1 -1
  29. package/dist/components/actions/toolbar/toolbar.d.ts +1 -1
  30. package/dist/components/actions/toolbar/toolbar.i18n.d.ts +3 -1
  31. package/dist/components/actions/toolbar/toolbar.i18n.d.ts.map +1 -1
  32. package/dist/components/actions/toolbar/toolbar.i18n.js +3 -1
  33. package/dist/components/actions/toolbar/toolbar.i18n.js.map +1 -1
  34. package/dist/components/actions/toolbar/toolbar.js +1 -1
  35. package/dist/components/actions/toolbar/toolbar.styles.js +1 -1
  36. package/dist/components/actions/toolbar/toolbar.template.d.ts.map +1 -1
  37. package/dist/components/actions/toolbar/toolbar.template.js +4 -2
  38. package/dist/components/actions/toolbar/toolbar.template.js.map +1 -1
  39. package/dist/components/components.js +1014 -296
  40. package/dist/components/content/avatar/avatar.d.ts +5 -3
  41. package/dist/components/content/avatar/avatar.d.ts.map +1 -1
  42. package/dist/components/content/avatar/avatar.i18n.d.ts +3 -1
  43. package/dist/components/content/avatar/avatar.i18n.d.ts.map +1 -1
  44. package/dist/components/content/avatar/avatar.i18n.js +3 -1
  45. package/dist/components/content/avatar/avatar.i18n.js.map +1 -1
  46. package/dist/components/content/avatar/avatar.js +1 -1
  47. package/dist/components/content/avatar/avatar.template.d.ts.map +1 -1
  48. package/dist/components/content/avatar/avatar.template.js +6 -6
  49. package/dist/components/content/avatar/avatar.template.js.map +1 -1
  50. package/dist/components/content/text/text.d.ts +1 -1
  51. package/dist/components/content/text/text.js +1 -1
  52. package/dist/components/content/text/text.styles.d.ts.map +1 -1
  53. package/dist/components/content/text/text.styles.js +55 -0
  54. package/dist/components/content/text/text.styles.js.map +1 -1
  55. package/dist/components/content/title/title.d.ts +16 -1
  56. package/dist/components/content/title/title.d.ts.map +1 -1
  57. package/dist/components/content/title/title.js +109 -0
  58. package/dist/components/content/title/title.js.map +1 -1
  59. package/dist/components/content/title/title.styles.d.ts.map +1 -1
  60. package/dist/components/content/title/title.styles.js +39 -0
  61. package/dist/components/content/title/title.styles.js.map +1 -1
  62. package/dist/components/content/token/token.d.ts +1 -1
  63. package/dist/components/content/token/token.js +1 -1
  64. package/dist/components/{icon-button-CJIikwyu.js → icon-button-BVhiOwX9.js} +12 -7
  65. package/dist/components/inputs/dropdown/dropdown.d.ts +6 -0
  66. package/dist/components/inputs/dropdown/dropdown.d.ts.map +1 -1
  67. package/dist/components/inputs/dropdown/dropdown.js +6 -0
  68. package/dist/components/inputs/dropdown/dropdown.js.map +1 -1
  69. package/dist/components/layout/card/card.d.ts +6 -4
  70. package/dist/components/layout/card/card.d.ts.map +1 -1
  71. package/dist/components/layout/card/card.i18n.d.ts +3 -1
  72. package/dist/components/layout/card/card.i18n.d.ts.map +1 -1
  73. package/dist/components/layout/card/card.i18n.js +3 -1
  74. package/dist/components/layout/card/card.i18n.js.map +1 -1
  75. package/dist/components/layout/card/card.js +2 -2
  76. package/dist/components/layout/card/card.template.d.ts.map +1 -1
  77. package/dist/components/layout/card/card.template.js +6 -6
  78. package/dist/components/layout/card/card.template.js.map +1 -1
  79. package/dist/components/layout/collection/collection.d.ts +16 -5
  80. package/dist/components/layout/collection/collection.d.ts.map +1 -1
  81. package/dist/components/layout/collection/collection.js +44 -10
  82. package/dist/components/layout/collection/collection.js.map +1 -1
  83. package/dist/components/layout/collection/collection.styles.d.ts.map +1 -1
  84. package/dist/components/layout/collection/collection.styles.js +7 -6
  85. package/dist/components/layout/collection/collection.styles.js.map +1 -1
  86. package/dist/components/layout/container/container.d.ts +1 -1
  87. package/dist/components/layout/container/container.js +1 -1
  88. package/dist/components/layout/container/container.styles.d.ts.map +1 -1
  89. package/dist/components/layout/container/container.styles.js +4 -0
  90. package/dist/components/layout/container/container.styles.js.map +1 -1
  91. package/dist/components/layout/page-sections/hero/hero-corner.d.ts +29 -0
  92. package/dist/components/layout/page-sections/hero/hero-corner.d.ts.map +1 -0
  93. package/dist/components/layout/page-sections/hero/hero-corner.js +131 -0
  94. package/dist/components/layout/page-sections/hero/hero-corner.js.map +1 -0
  95. package/dist/components/layout/page-sections/hero/hero-corner.styles.d.ts +2 -0
  96. package/dist/components/layout/page-sections/hero/hero-corner.styles.d.ts.map +1 -0
  97. package/dist/components/layout/page-sections/hero/hero-corner.styles.js +139 -0
  98. package/dist/components/layout/page-sections/hero/hero-corner.styles.js.map +1 -0
  99. package/dist/components/layout/page-sections/hero/hero.d.ts +13 -5
  100. package/dist/components/layout/page-sections/hero/hero.d.ts.map +1 -1
  101. package/dist/components/layout/page-sections/hero/hero.js +42 -6
  102. package/dist/components/layout/page-sections/hero/hero.js.map +1 -1
  103. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts +16 -0
  104. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts.map +1 -1
  105. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js +61 -1
  106. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js.map +1 -1
  107. package/dist/components/layout/window/window.d.ts +1 -1
  108. package/dist/components/layout/window/window.js +1 -1
  109. package/dist/components/lists-and-tables/cells/step-cell/step-cell.d.ts +5 -0
  110. package/dist/components/lists-and-tables/cells/step-cell/step-cell.d.ts.map +1 -1
  111. package/dist/components/lists-and-tables/cells/step-cell/step-cell.js +25 -0
  112. package/dist/components/lists-and-tables/cells/step-cell/step-cell.js.map +1 -1
  113. package/dist/components/lists-and-tables/cells/step-cell/step-cell.styles.d.ts.map +1 -1
  114. package/dist/components/lists-and-tables/cells/step-cell/step-cell.styles.js +28 -7
  115. package/dist/components/lists-and-tables/cells/step-cell/step-cell.styles.js.map +1 -1
  116. package/dist/components/lists-and-tables/cells/step-cell/step-cell.template.d.ts.map +1 -1
  117. package/dist/components/lists-and-tables/cells/step-cell/step-cell.template.js +8 -4
  118. package/dist/components/lists-and-tables/cells/step-cell/step-cell.template.js.map +1 -1
  119. package/dist/components/lists-and-tables/list/list.d.ts +5 -2
  120. package/dist/components/lists-and-tables/list/list.d.ts.map +1 -1
  121. package/dist/components/lists-and-tables/list/list.js +9 -4
  122. package/dist/components/lists-and-tables/list/list.js.map +1 -1
  123. package/dist/components/lists-and-tables/list-item/list-item.d.ts +12 -5
  124. package/dist/components/lists-and-tables/list-item/list-item.d.ts.map +1 -1
  125. package/dist/components/lists-and-tables/list-item/list-item.i18n.d.ts +3 -1
  126. package/dist/components/lists-and-tables/list-item/list-item.i18n.d.ts.map +1 -1
  127. package/dist/components/lists-and-tables/list-item/list-item.i18n.js +3 -1
  128. package/dist/components/lists-and-tables/list-item/list-item.i18n.js.map +1 -1
  129. package/dist/components/lists-and-tables/list-item/list-item.js +15 -7
  130. package/dist/components/lists-and-tables/list-item/list-item.js.map +1 -1
  131. package/dist/components/lists-and-tables/list-item/list-item.styles.js +1 -1
  132. package/dist/components/lists-and-tables/list-item/list-item.template.d.ts +1 -1
  133. package/dist/components/lists-and-tables/list-item/list-item.template.d.ts.map +1 -1
  134. package/dist/components/lists-and-tables/list-item/list-item.template.js +9 -2
  135. package/dist/components/lists-and-tables/list-item/list-item.template.js.map +1 -1
  136. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts +11 -2
  137. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts.map +1 -1
  138. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.i18n.d.ts +7 -0
  139. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.i18n.d.ts.map +1 -0
  140. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.i18n.js +6 -0
  141. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.i18n.js.map +1 -0
  142. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js +7 -3
  143. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js.map +1 -1
  144. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.d.ts.map +1 -1
  145. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.js +12 -0
  146. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.js.map +1 -1
  147. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.d.ts +1 -1
  148. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.d.ts.map +1 -1
  149. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.js +6 -3
  150. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.js.map +1 -1
  151. package/dist/components/lists-and-tables/table/table.d.ts +8 -5
  152. package/dist/components/lists-and-tables/table/table.d.ts.map +1 -1
  153. package/dist/components/lists-and-tables/table/table.js +19 -10
  154. package/dist/components/lists-and-tables/table/table.js.map +1 -1
  155. package/dist/components/lists-and-tables/table/table.styles.d.ts.map +1 -1
  156. package/dist/components/lists-and-tables/table/table.styles.js +4 -0
  157. package/dist/components/lists-and-tables/table/table.styles.js.map +1 -1
  158. package/dist/components/lists-and-tables/table/table.template.d.ts.map +1 -1
  159. package/dist/components/lists-and-tables/table/table.template.js +5 -1
  160. package/dist/components/lists-and-tables/table/table.template.js.map +1 -1
  161. package/dist/components/navigation/link/link.d.ts +7 -5
  162. package/dist/components/navigation/link/link.d.ts.map +1 -1
  163. package/dist/components/navigation/link/link.i18n.d.ts +3 -1
  164. package/dist/components/navigation/link/link.i18n.d.ts.map +1 -1
  165. package/dist/components/navigation/link/link.i18n.js +3 -1
  166. package/dist/components/navigation/link/link.i18n.js.map +1 -1
  167. package/dist/components/navigation/link/link.js +3 -3
  168. package/dist/components/navigation/link/link.styles.js +2 -2
  169. package/dist/components/navigation/link/link.template.d.ts.map +1 -1
  170. package/dist/components/navigation/link/link.template.js +7 -8
  171. package/dist/components/navigation/link/link.template.js.map +1 -1
  172. package/dist/components/navigation/menu-bar-item/menu-bar-item.d.ts +4 -1
  173. package/dist/components/navigation/menu-bar-item/menu-bar-item.d.ts.map +1 -1
  174. package/dist/components/navigation/menu-bar-item/menu-bar-item.js +11 -1
  175. package/dist/components/navigation/menu-bar-item/menu-bar-item.js.map +1 -1
  176. package/dist/components/navigation/pagination/pagination.d.ts +1 -1
  177. package/dist/components/navigation/pagination/pagination.js +1 -1
  178. package/dist/components/navigation/skip-link/skip-link.d.ts +1 -14
  179. package/dist/components/navigation/skip-link/skip-link.d.ts.map +1 -1
  180. package/dist/components/navigation/skip-link/skip-link.js +7 -55
  181. package/dist/components/navigation/skip-link/skip-link.js.map +1 -1
  182. package/dist/components/navigation/tab-bar/tab-bar.d.ts +1 -1
  183. package/dist/components/navigation/tab-bar/tab-bar.js +1 -1
  184. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.d.ts.map +1 -1
  185. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js +6 -3
  186. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js.map +1 -1
  187. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.d.ts +11 -1
  188. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.d.ts.map +1 -1
  189. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js +21 -1
  190. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js.map +1 -1
  191. package/dist/components/status-and-feedback/step-bar/step-bar.d.ts +1 -1
  192. package/dist/components/status-and-feedback/step-bar/step-bar.js +1 -1
  193. package/dist/components/{with-translations-C8_0-9y8.js → with-translations-C6QfP6_S.js} +24 -1
  194. package/dist/css/rich-text.css +1 -1
  195. package/dist/css/variables.css +1 -0
  196. package/dist/nldd.min.js +962 -683
  197. package/dist/translations/en-US.d.ts.map +1 -1
  198. package/dist/translations/en-US.js +24 -7
  199. package/dist/translations/en-US.js.map +1 -1
  200. package/dist/translations/fy.d.ts.map +1 -1
  201. package/dist/translations/fy.js +24 -7
  202. package/dist/translations/fy.js.map +1 -1
  203. package/dist/translations/nl.generated.d.ts +24 -7
  204. package/dist/translations/nl.generated.d.ts.map +1 -1
  205. package/dist/translations/nl.generated.js +2 -0
  206. package/dist/translations/nl.generated.js.map +1 -1
  207. package/dist/translations/pap-AW.d.ts.map +1 -1
  208. package/dist/translations/pap-AW.js +24 -7
  209. package/dist/translations/pap-AW.js.map +1 -1
  210. package/dist/translations/pap-CW.d.ts.map +1 -1
  211. package/dist/translations/pap-CW.js +24 -7
  212. package/dist/translations/pap-CW.js.map +1 -1
  213. package/dist/types/vue.d.ts +71 -38
  214. package/dist/utilities/focus-target.d.ts +23 -0
  215. package/dist/utilities/focus-target.d.ts.map +1 -0
  216. package/dist/utilities/focus-target.js +70 -0
  217. package/dist/utilities/focus-target.js.map +1 -0
  218. package/dist/utilities/link-hint.d.ts +18 -0
  219. package/dist/utilities/link-hint.d.ts.map +1 -0
  220. package/dist/utilities/link-hint.js +29 -0
  221. package/dist/utilities/link-hint.js.map +1 -0
  222. package/package.json +3 -2
@@ -39,7 +39,7 @@
39
39
  * @attr {string} href - Makes the avatar a link to this URL; the shape itself becomes the link, so the hit area and the focus ring follow it
40
40
  * @attr {boolean} no-tab - Takes the control out of the tab order (tabindex="-1"), for an avatar that is a link or a button inside a roving container (a row of an nldd-list). Does nothing on a decorative avatar.
41
41
  * @attr {boolean} button - Makes the avatar a button; ignored when `href` is set
42
- * @attr {string} target - Link target for href (e.g. '_blank'); completes rel and announces "Opens in a new tab"
42
+ * @attr {string} target - Link target for href (e.g. '_blank'); completes rel and announces "Opens in a new tab". An `href` to another origin than the page (another website, a subdomain too) adds a visually hidden "andere website", in one sentence with the new-tab announcement when both apply; there is no way to switch it off.
43
43
  * @attr {string} rel - Link rel for href; with target '_blank', 'noopener noreferrer' is added to whatever you set
44
44
  * @attr {object} translations - Override translation keys; unset keys fall back to Dutch
45
45
  *
@@ -79,9 +79,11 @@ export type AvatarColor = 'neutral' | 'inherit';
79
79
  export type AvatarSize = 'full' | '16' | '20' | '24' | '28' | '32' | '40' | '44' | '48' | '56' | '64' | '80' | '96';
80
80
  declare const NLDDAvatar_base: (abstract new (...args: any[]) => LitElement & {
81
81
  translations: Partial<{
82
- 'components.avatar.opens-in-new-tab-label': string;
82
+ 'components.avatar.link-hint-new-tab-lowercase-label': string;
83
+ 'components.avatar.link-hint-external-lowercase-label': string;
84
+ 'components.avatar.link-hint-external-new-tab-lowercase-label': string;
83
85
  }>;
84
- _t(key: "components.avatar.opens-in-new-tab-label", vars?: Record<string, string | number>): string;
86
+ _t(key: "components.avatar.link-hint-new-tab-lowercase-label" | "components.avatar.link-hint-external-lowercase-label" | "components.avatar.link-hint-external-new-tab-lowercase-label", vars?: Record<string, string | number>): string;
85
87
  }) & typeof LitElement;
86
88
  export declare class NLDDAvatar extends NLDDAvatar_base {
87
89
  static styles: import("lit").CSSResult;
@@ -1 +1 @@
1
- {"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../../src/components/content/avatar/avatar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AACH,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAOtD,OAAO,iBAAiB,CAAC;AAEzB,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,cAAc,CAAC;AAEnD,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC;AAOhD,qFAAqF;AACrF,MAAM,MAAM,UAAU,GACrB,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;;;;;;;AAE5F,qBACa,UAAW,SAAQ,eAAoD;IACnF,OAAgB,MAAM,0BAAgB;IAGtC,IAAI,EAAE,UAAU,CAAY;IAG5B,IAAI,EAAE,UAAU,CAAU;IAG1B,KAAK,EAAE,WAAW,CAAa;IAG/B,WAAW,UAAS;IAGpB,IAAI,SAAM;IAGV,QAAQ,SAAM;IAGd,GAAG,SAAM;IAGT,MAAM,SAAM;IAGZ,IAAI,SAAM;IAEV;+DAC2D;IAE3D,eAAe,SAAM;IAGrB,UAAU,UAAS;IAEnB;;4EAEwE;IAExE,aAAa,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAAW;IAEvD;iFAC6E;IAE7E,IAAI,SAAM;IAEV;;;wEAGoE;IAEpE,KAAK,UAAS;IAEd;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CAAC;IACd,UAAU,qBAAqB;QAC9B,aAAa,EAAE,UAAU,CAAC;KAC1B;CACD"}
@@ -1,5 +1,7 @@
1
1
  export declare const nlddAvatarTranslations: {
2
- 'components.avatar.opens-in-new-tab-label': string;
2
+ 'components.avatar.link-hint-new-tab-lowercase-label': string;
3
+ 'components.avatar.link-hint-external-lowercase-label': string;
4
+ 'components.avatar.link-hint-external-new-tab-lowercase-label': string;
3
5
  };
4
6
  export type NLDDAvatarTranslations = typeof nlddAvatarTranslations;
5
7
  //# sourceMappingURL=avatar.i18n.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"avatar.i18n.d.ts","sourceRoot":"","sources":["../../../../src/components/content/avatar/avatar.i18n.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB;;CAElC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,OAAO,sBAAsB,CAAC"}
1
+ {"version":3,"file":"avatar.i18n.d.ts","sourceRoot":"","sources":["../../../../src/components/content/avatar/avatar.i18n.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB;;;;CAIlC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,OAAO,sBAAsB,CAAC"}
@@ -1,4 +1,6 @@
1
1
  export const nlddAvatarTranslations = {
2
- 'components.avatar.opens-in-new-tab-label': 'Opent in nieuw tabblad',
2
+ 'components.avatar.link-hint-new-tab-lowercase-label': 'opent in nieuw tabblad',
3
+ 'components.avatar.link-hint-external-lowercase-label': 'andere website',
4
+ 'components.avatar.link-hint-external-new-tab-lowercase-label': 'andere website, opent in nieuw tabblad',
3
5
  };
4
6
  //# sourceMappingURL=avatar.i18n.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"avatar.i18n.js","sourceRoot":"","sources":["../../../../src/components/content/avatar/avatar.i18n.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACrC,0CAA0C,EAAE,wBAAwB;CACpE,CAAC"}
1
+ {"version":3,"file":"avatar.i18n.js","sourceRoot":"","sources":["../../../../src/components/content/avatar/avatar.i18n.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACrC,qDAAqD,EAAE,wBAAwB;IAC/E,sDAAsD,EAAE,gBAAgB;IACxE,8DAA8D,EAAE,wCAAwC;CACxG,CAAC"}
@@ -45,7 +45,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
45
45
  * @attr {string} href - Makes the avatar a link to this URL; the shape itself becomes the link, so the hit area and the focus ring follow it
46
46
  * @attr {boolean} no-tab - Takes the control out of the tab order (tabindex="-1"), for an avatar that is a link or a button inside a roving container (a row of an nldd-list). Does nothing on a decorative avatar.
47
47
  * @attr {boolean} button - Makes the avatar a button; ignored when `href` is set
48
- * @attr {string} target - Link target for href (e.g. '_blank'); completes rel and announces "Opens in a new tab"
48
+ * @attr {string} target - Link target for href (e.g. '_blank'); completes rel and announces "Opens in a new tab". An `href` to another origin than the page (another website, a subdomain too) adds a visually hidden "andere website", in one sentence with the new-tab announcement when both apply; there is no way to switch it off.
49
49
  * @attr {string} rel - Link rel for href; with target '_blank', 'noopener noreferrer' is added to whatever you set
50
50
  * @attr {object} translations - Override translation keys; unset keys fall back to Dutch
51
51
  *
@@ -1 +1 @@
1
- {"version":3,"file":"avatar.template.d.ts","sourceRoot":"","sources":["../../../../src/components/content/avatar/avatar.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,cAAc,EAAE,MAAM,KAAK,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,uBAAuB,CAAC;AAE/B,wBAAgB,cAAc,CAAC,SAAS,EAAE,UAAU,GAAG,cAAc,CA8EpE"}
1
+ {"version":3,"file":"avatar.template.d.ts","sourceRoot":"","sources":["../../../../src/components/content/avatar/avatar.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,cAAc,EAAE,MAAM,KAAK,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,OAAO,uBAAuB,CAAC;AAE/B,wBAAgB,cAAc,CAAC,SAAS,EAAE,UAAU,GAAG,cAAc,CA6EpE"}
@@ -1,18 +1,18 @@
1
1
  import { html, nothing } from 'lit';
2
2
  import { linkRel } from '../../../utilities/link-rel.js';
3
+ import { linkHintKey } from '../../../utilities/link-hint.js';
3
4
  import '../tooltip/tooltip.js';
4
5
  export function avatarTemplate(component) {
5
6
  const showImage = Boolean(component.src) && !component._imageFailed;
6
7
  const initials = component.resolvedInitials;
7
8
  const showInitials = !showImage && initials !== '';
8
9
  const showIcon = !showImage && !showInitials;
9
- // A new-tab link is a change of context, so announce it (WCAG 2.1 SC 3.2.2).
10
- const opensInNewTabHint = component.href && component.target === '_blank'
11
- ? component._t('components.avatar.opens-in-new-tab-label')
12
- : '';
10
+ // A link to another website or a new tab says so (WCAG 2.1 SC 3.2.2).
11
+ const hintKey = linkHintKey(component.href, component.target);
12
+ const linkHint = hintKey ? component._t(`components.avatar.${hintKey}`) : '';
13
13
  // The control shows no text of its own, so its name comes from
14
- // accessible-label (or the name it already carries), plus the new-tab hint.
15
- const controlLabel = [component.accessibleLabel || component.name, opensInNewTabHint]
14
+ // accessible-label (or the name it already carries), plus the link hint.
15
+ const controlLabel = [component.accessibleLabel || component.name, linkHint]
16
16
  .filter(Boolean).join(', ') || nothing;
17
17
  // sizes="auto" (valid because the image is lazy) resolves srcset against the
18
18
  // avatar's real rendered width; without a fixed size we can't know it here,
@@ -1 +1 @@
1
- {"version":3,"file":"avatar.template.js","sourceRoot":"","sources":["../../../../src/components/content/avatar/avatar.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAkB,MAAM,KAAK,CAAC;AAEpD,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,uBAAuB,CAAC;AAE/B,MAAM,UAAU,cAAc,CAAC,SAAqB;IACnD,MAAM,SAAS,G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IAC1B,MAAM,KAAK,GAAG,SAAS,CAAC,IAAI;QAC3B,CAAC,CAAC,IAAI,CAAA;;WAEG,SAAS,CAAC,IAAI;aACZ,SAAS,CAAC,MAAM,IAAI,OAAO;UAC9B,OAAO,CAAC,SAAS,CAAC,GAAG,EAAE,SAAS,CAAC,MAAM,CAAC,IAAI,OAAO;iBAC5C,YAAY;eACd,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO;MACzC,OAAO;GACV;QACD,CAAC,CAAC,SAAS,CAAC,MAAM;YACjB,CAAC,CAAC,IAAI,CAAA;;;kBAGS,YAAY;gBACd,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO;OACzC,OAAO;IACV;YACD,CAAC,CAAC,IAAI,CAAA,uBAAuB,OAAO,QAAQ,CAAC;IAE/C,6EAA6E;IAC7E,4EAA4E;IAC5E,mEAAmE;IACnE,MAAM,WAAW,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,eAAe,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC;IAE9F,OAAO,WAAW,IAAI,SAAS,CAAC,aAAa,KAAK,OAAO;QACxD,CAAC,CAAC,IAAI,CAAA;;WAEG,WAAW;aACT,SAAS,CAAC,aAAa;;MAE9B,KAAK;;GAER;QACD,CAAC,CAAC,KAAK,CAAC;AACV,CAAC"}
1
+ {"version":3,"file":"avatar.template.js","sourceRoot":"","sources":["../../../../src/components/content/avatar/avatar.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAkB,MAAM,KAAK,CAAC;AAEpD,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,uBAAuB,CAAC;AAE/B,MAAM,UAAU,cAAc,CAAC,SAAqB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AC,CAAC,OAAO;EACX,CAAC;IAEF,6EAA6E;IAC7E,6EAA6E;IAC7E,0BAA0B;IAC1B,MAAM,KAAK,GAAG,SAAS,CAAC,IAAI;QAC3B,CAAC,CAAC,IAAI,CAAA;;WAEG,SAAS,CAAC,IAAI;aACZ,SAAS,CAAC,MAAM,IAAI,OAAO;UAC9B,OAAO,CAAC,SAAS,CAAC,GAAG,EAAE,SAAS,CAAC,MAAM,CAAC,IAAI,OAAO;iBAC5C,YAAY;eACd,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO;MACzC,OAAO;GACV;QACD,CAAC,CAAC,SAAS,CAAC,MAAM;YACjB,CAAC,CAAC,IAAI,CAAA;;;kBAGS,YAAY;gBACd,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO;OACzC,OAAO;IACV;YACD,CAAC,CAAC,IAAI,CAAA,uBAAuB,OAAO,QAAQ,CAAC;IAE/C,6EAA6E;IAC7E,4EAA4E;IAC5E,mEAAmE;IACnE,MAAM,WAAW,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,eAAe,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC;IAE9F,OAAO,WAAW,IAAI,SAAS,CAAC,aAAa,KAAK,OAAO;QACxD,CAAC,CAAC,IAAI,CAAA;;WAEG,WAAW;aACT,SAAS,CAAC,aAAa;;MAE9B,KAAK;;GAER;QACD,CAAC,CAAC,KAAK,CAAC;AACV,CAAC"}
@@ -30,7 +30,7 @@
30
30
  * @attr {string} color - Text color: 'content' (the default) | 'secondary' | 'accent' | 'success' | 'warning' | 'critical' | 'inherit'. 'content' and 'secondary' follow the surrounding content channel; 'inherit' takes the color it inherits, for text on a painted surface.
31
31
  * @attr {string} horizontal-alignment - Alignment of the text within the block: 'left' | 'center' | 'right' (default: 'left'). Aligns the words; `horizontal-alignment` on nldd-container moves the box.
32
32
  *
33
- * @slot - The text. Inline elements work as they are: `<strong>` and `<b>` take the bold weight from the scale, `<a>`, `<em>` and components such as `nldd-tag` are left alone.
33
+ * @slot - The text. Inline elements look as they do in nldd-rich-text: `<strong>` and `<b>` take the bold weight from the scale, `<em>` and `<i>` are italic, `<a>` is an underlined link, `<code>` sits on a tinted surface in the monospace font, and `<mark>` is highlighted. This holds for elements directly in the text; one inside another (a link inside `<strong>`) keeps only the outer one's styling. Components such as `nldd-tag` are left alone.
34
34
  */
35
35
  import { LitElement } from 'lit';
36
36
  type Size = 'xxs' | 'xs' | 'sm' | 'md' | 'lg';
@@ -30,7 +30,7 @@
30
30
  * @attr {string} color - Text color: 'content' (the default) | 'secondary' | 'accent' | 'success' | 'warning' | 'critical' | 'inherit'. 'content' and 'secondary' follow the surrounding content channel; 'inherit' takes the color it inherits, for text on a painted surface.
31
31
  * @attr {string} horizontal-alignment - Alignment of the text within the block: 'left' | 'center' | 'right' (default: 'left'). Aligns the words; `horizontal-alignment` on nldd-container moves the box.
32
32
  *
33
- * @slot - The text. Inline elements work as they are: `<strong>` and `<b>` take the bold weight from the scale, `<a>`, `<em>` and components such as `nldd-tag` are left alone.
33
+ * @slot - The text. Inline elements look as they do in nldd-rich-text: `<strong>` and `<b>` take the bold weight from the scale, `<em>` and `<i>` are italic, `<a>` is an underlined link, `<code>` sits on a tinted surface in the monospace font, and `<mark>` is highlighted. This holds for elements directly in the text; one inside another (a link inside `<strong>`) keeps only the outer one's styling. Components such as `nldd-tag` are left alone.
34
34
  */
35
35
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
36
36
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -1 +1 @@
1
- {"version":3,"file":"text.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/content/text/text.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,yBAoHtB,CAAC"}
1
+ {"version":3,"file":"text.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/content/text/text.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,yBA2KtB,CAAC"}
@@ -11,6 +11,19 @@ export const textStyles = css `
11
11
  --_text-max-width: var(--semantics-text-max-width);
12
12
  --_text-color: var(--context-content-color, var(--semantics-content-color));
13
13
  --_text-align: left;
14
+ --_text-link-color: var(--semantics-links-color);
15
+ --_text-link-is-hovered-color: var(--semantics-links-is-hovered-color);
16
+ --_text-link-is-active-color: var(--semantics-links-is-active-color);
17
+ --_text-link-underline-offset: var(--primitives-space-2);
18
+ --_text-code-padding: var(--primitives-space-4);
19
+ --_text-code-corner-radius: var(--semantics-controls-xs-corner-radius);
20
+ --_text-code-background-color: var(--semantics-surfaces-tinted-background-color);
21
+ --_text-code-font-family: var(--primitives-font-family-monospace);
22
+ --_text-code-font-size: var(--semantics-code-inline-font-size);
23
+ --_text-mark-padding: var(--primitives-space-1) var(--primitives-space-2);
24
+ --_text-mark-corner-radius: var(--semantics-controls-xs-corner-radius);
25
+ --_text-mark-background-color: var(--semantics-content-mark-background-color);
26
+ --_text-mark-color: var(--semantics-content-mark-color);
14
27
 
15
28
  display: block;
16
29
  max-width: var(--_text-max-width);
@@ -64,6 +77,48 @@ export const textStyles = css `
64
77
  }
65
78
 
66
79
 
80
+ /* # Inline elements */
81
+
82
+ ::slotted(em),
83
+ ::slotted(i) {
84
+ color: inherit;
85
+ font-style: italic;
86
+ }
87
+
88
+ ::slotted(a) {
89
+ color: var(--_text-link-color);
90
+ text-decoration: underline;
91
+ text-underline-offset: var(--_text-link-underline-offset);
92
+ }
93
+
94
+ ::slotted(a:hover) {
95
+ color: var(--_text-link-is-hovered-color);
96
+ }
97
+
98
+ ::slotted(a:active) {
99
+ color: var(--_text-link-is-active-color);
100
+ }
101
+
102
+ :host([color="inherit"]) ::slotted(a) {
103
+ color: currentColor;
104
+ }
105
+
106
+ ::slotted(code) {
107
+ border-radius: var(--_text-code-corner-radius);
108
+ background-color: var(--_text-code-background-color);
109
+ padding: var(--_text-code-padding);
110
+ font-family: var(--_text-code-font-family);
111
+ font-size: var(--_text-code-font-size);
112
+ }
113
+
114
+ ::slotted(mark) {
115
+ border-radius: var(--_text-mark-corner-radius);
116
+ background-color: var(--_text-mark-background-color);
117
+ padding: var(--_text-mark-padding);
118
+ color: var(--_text-mark-color);
119
+ }
120
+
121
+
67
122
  /* # Line height */
68
123
 
69
124
  :host([line-height="flat"]) {
@@ -1 +1 @@
1
- {"version":3,"file":"text.styles.js","sourceRoot":"","sources":["../../../../src/components/content/text/text.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoH5B,CAAC"}
1
+ {"version":3,"file":"text.styles.js","sourceRoot":"","sources":["../../../../src/components/content/text/text.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2K5B,CAAC"}
@@ -13,6 +13,9 @@
13
13
  * @element nldd-title
14
14
  *
15
15
  * @attr {number} size - Visual size of the title: 1–6 (default: 3)
16
+ * @attr {string} sm-custom-size - A size of your own at sm, any CSS length (e.g. '56px', '3.5rem', 'clamp(3rem, 8vw, 7rem)'), for a statement larger than size 1. A var() works when the variable holds a length; one that is not defined leaves the title without its size, the floor included. For headings use `size`; if a design does not fit the scale, raise it as an issue. Set per breakpoint on purpose: a breakpoint without one keeps the size from `size`, so a title made large for a wide screen never breaks a narrow one. Never smaller than size 1 at the same breakpoint: a smaller value shows as size 1, and a fixed length that is smaller says so in development (a relative value, such as vw, em or a percentage, is not checked there; the floor still holds). Takes the weight, typeface and line height of size 1. An invalid value falls back to `size`
17
+ * @attr {string} md-custom-size - The same, at md
18
+ * @attr {string} lg-custom-size - The same, at lg
16
19
  * @attr {string} color - 'content' (the default) takes the system's own content
17
20
  * colors. 'inherit' lets the title follow the text color of the surface
18
21
  * instead (for colored areas such as the filled categories); overline and
@@ -27,13 +30,16 @@
27
30
  * @slot supporting-text - Supporting text that is more than text. Takes the place of the supporting-text attribute.
28
31
  * @slot end - Whatever belongs at the end of the title line: a button, a menu, a status badge, a version. Named for the position, not for a kind of content, because anything can sit there.
29
32
  */
30
- import { LitElement } from 'lit';
33
+ import { LitElement, type PropertyValues } from 'lit';
31
34
  type Size = 1 | 2 | 3 | 4 | 5 | 6;
32
35
  type TitleColor = 'content' | 'inherit';
33
36
  type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
34
37
  export declare class NLDDTitle extends LitElement {
35
38
  static styles: import("lit").CSSResult;
36
39
  size: Size;
40
+ smCustomSize: string;
41
+ mdCustomSize: string;
42
+ lgCustomSize: string;
37
43
  color: TitleColor;
38
44
  text: string;
39
45
  supportingText: string;
@@ -48,6 +54,15 @@ export declare class NLDDTitle extends LitElement {
48
54
  /** @internal */
49
55
  _onSlotChange: (e: Event) => void;
50
56
  firstUpdated(): void;
57
+ /** The valid custom size per breakpoint, worked out before the first paint. */
58
+ private _customSizes;
59
+ willUpdate(changed: PropertyValues): void;
60
+ updated(changed: PropertyValues): void;
61
+ /** DEV-only: warnings already given, so each says it once per title. */
62
+ private _warned;
63
+ private _warnOnce;
64
+ /** DEV-only: says so when a custom size is smaller than size 1, which then shows instead. */
65
+ private _checkFloor;
51
66
  render(): import("lit-html").TemplateResult;
52
67
  }
53
68
  declare global {
@@ -1 +1 @@
1
- {"version":3,"file":"title.d.ts","sourceRoot":"","sources":["../../../../src/components/content/title/title.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAMjC,KAAK,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAClC,KAAK,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;AACxC,KAAK,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAK1C,qBACa,SAAU,SAAQ,UAAU;IACxC,OAAgB,MAAM,0BAAe;IAGrC,IAAI,EAAE,IAAI,CAAK;IAGf,KAAK,EAAE,UAAU,CAAa;IAG9B,IAAI,SAAM;IAGV,cAAc,SAAM;IAGpB,QAAQ,SAAM;IAGd,YAAY,EAAE,YAAY,GAAG,IAAI,CAAQ;IAEzC,gBAAgB;IACP,mBAAmB,UAAS;IACrC,gBAAgB;IACP,kBAAkB,UAAS;IACpC,gBAAgB;IACP,yBAAyB,UAAS;IAE3C,gBAAgB;IAChB,aAAa,GAAI,GAAG,KAAK,KAAG,IAAI,CAS9B;IAEO,YAAY,IAAI,IAAI;IASpB,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,YAAY,EAAE,SAAS,CAAC;KACxB;CACD"}
1
+ {"version":3,"file":"title.d.ts","sourceRoot":"","sources":["../../../../src/components/content/title/title.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAMtD,KAAK,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAClC,KAAK,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;AACxC,KAAK,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AA6B1C,qBACa,SAAU,SAAQ,UAAU;IACxC,OAAgB,MAAM,0BAAe;IAGrC,IAAI,EAAE,IAAI,CAAK;IAGf,YAAY,SAAM;IAGlB,YAAY,SAAM;IAGlB,YAAY,SAAM;IAGlB,KAAK,EAAE,UAAU,CAAa;IAG9B,IAAI,SAAM;IAGV,cAAc,SAAM;IAGpB,QAAQ,SAAM;IAGd,YAAY,EAAE,YAAY,GAAG,IAAI,CAAQ;IAEzC,gBAAgB;IACP,mBAAmB,UAAS;IACrC,gBAAgB;IACP,kBAAkB,UAAS;IACpC,gBAAgB;IACP,yBAAyB,UAAS;IAE3C,gBAAgB;IAChB,aAAa,GAAI,GAAG,KAAK,KAAG,IAAI,CAS9B;IAEO,YAAY,IAAI,IAAI;IAS7B,+EAA+E;IAC/E,OAAO,CAAC,YAAY,CAA2C;IAEtD,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IA+BzC,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAQ/C,wEAAwE;IACxE,OAAO,CAAC,OAAO,CAAqB;IAEpC,OAAO,CAAC,SAAS;IAMjB,6FAA6F;IAC7F,OAAO,CAAC,WAAW;IAyBV,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,YAAY,EAAE,SAAS,CAAC;KACxB;CACD"}
@@ -19,6 +19,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
19
19
  * @element nldd-title
20
20
  *
21
21
  * @attr {number} size - Visual size of the title: 1–6 (default: 3)
22
+ * @attr {string} sm-custom-size - A size of your own at sm, any CSS length (e.g. '56px', '3.5rem', 'clamp(3rem, 8vw, 7rem)'), for a statement larger than size 1. A var() works when the variable holds a length; one that is not defined leaves the title without its size, the floor included. For headings use `size`; if a design does not fit the scale, raise it as an issue. Set per breakpoint on purpose: a breakpoint without one keeps the size from `size`, so a title made large for a wide screen never breaks a narrow one. Never smaller than size 1 at the same breakpoint: a smaller value shows as size 1, and a fixed length that is smaller says so in development (a relative value, such as vw, em or a percentage, is not checked there; the floor still holds). Takes the weight, typeface and line height of size 1. An invalid value falls back to `size`
23
+ * @attr {string} md-custom-size - The same, at md
24
+ * @attr {string} lg-custom-size - The same, at lg
22
25
  * @attr {string} color - 'content' (the default) takes the system's own content
23
26
  * colors. 'inherit' lets the title follow the text color of the surface
24
27
  * instead (for colored areas such as the filled categories); overline and
@@ -40,10 +43,31 @@ import { titleStyles } from './title.styles.js';
40
43
  import { titleTemplate } from './title.template.js';
41
44
  /** One warning per page: a missed rename is one search-and-replace, not one per title. */
42
45
  let warnedAboutSubtitle = false;
46
+ const BREAKPOINTS = ['sm', 'md', 'lg'];
47
+ /** The font size of size 1 per breakpoint: the floor of a custom size. */
48
+ const SIZE_1_FONT_SIZE = {
49
+ sm: 'var(--primitives-font-size-700)',
50
+ md: 'var(--primitives-font-size-800)',
51
+ lg: 'var(--primitives-font-size-1000)',
52
+ };
53
+ /** Font-size values that are not a length: the CSS-wide keywords and the
54
+ * absolute and relative size keywords. */
55
+ const NOT_A_LENGTH = new Set([
56
+ 'inherit', 'initial', 'unset', 'revert', 'revert-layer',
57
+ 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', 'xxx-large',
58
+ 'larger', 'smaller', 'math',
59
+ ]);
60
+ /** A length font-size takes. A keyword cannot go inside the max() that keeps the floor, so it would void the whole font. */
61
+ function isFontSize(value) {
62
+ return !NOT_A_LENGTH.has(value.toLowerCase()) && CSS.supports('font-size', value);
63
+ }
43
64
  let NLDDTitle = class NLDDTitle extends LitElement {
44
65
  constructor() {
45
66
  super(...arguments);
46
67
  this.size = 3;
68
+ this.smCustomSize = '';
69
+ this.mdCustomSize = '';
70
+ this.lgCustomSize = '';
47
71
  this.color = 'content';
48
72
  this.text = '';
49
73
  this.supportingText = '';
@@ -68,6 +92,10 @@ let NLDDTitle = class NLDDTitle extends LitElement {
68
92
  else
69
93
  this._hasDefaultSlotted = hasContent;
70
94
  };
95
+ /** The valid custom size per breakpoint, worked out before the first paint. */
96
+ this._customSizes = {};
97
+ /** DEV-only: warnings already given, so each says it once per title. */
98
+ this._warned = new Set();
71
99
  }
72
100
  firstUpdated() {
73
101
  // The subtitle slot was renamed to supporting-text. Content in a slot that
@@ -77,6 +105,78 @@ let NLDDTitle = class NLDDTitle extends LitElement {
77
105
  console.warn('NLDDTitle: the subtitle slot is now supporting-text. Rename slot="subtitle" to slot="supporting-text", or use the supporting-text attribute, here and on every other nldd-title.');
78
106
  }
79
107
  }
108
+ willUpdate(changed) {
109
+ super.willUpdate(changed);
110
+ if (!changed.has('smCustomSize') &&
111
+ !changed.has('mdCustomSize') &&
112
+ !changed.has('lgCustomSize'))
113
+ return;
114
+ // Nothing to measure or write when rendered without a DOM, as on a server.
115
+ if (typeof CSS === 'undefined')
116
+ return;
117
+ // Written here rather than in updated(), so the first paint already has
118
+ // the custom size. A breakpoint left without a valid value keeps the
119
+ // size from the scale.
120
+ const own = { sm: this.smCustomSize, md: this.mdCustomSize, lg: this.lgCustomSize };
121
+ this._customSizes = {};
122
+ for (const breakpoint of BREAKPOINTS) {
123
+ const value = (own[breakpoint] || '').trim();
124
+ const valid = value !== '' && isFontSize(value);
125
+ if (valid) {
126
+ this._customSizes[breakpoint] = value;
127
+ this.style.setProperty(`--_title-${breakpoint}-custom-size`, value);
128
+ }
129
+ else {
130
+ this.style.removeProperty(`--_title-${breakpoint}-custom-size`);
131
+ }
132
+ this.toggleAttribute(`data-${breakpoint}-custom-size`, valid);
133
+ if (import.meta.env?.DEV && value !== '' && !valid) {
134
+ this._warnOnce(`invalid-${breakpoint}-${value}`, `<nldd-title>: ${breakpoint}-custom-size="${value}" is not a size the title can use, so it keeps its size from the scale at ${breakpoint}. Use a length such as "96px" or "6rem", not a keyword.`);
135
+ }
136
+ }
137
+ }
138
+ updated(changed) {
139
+ super.updated(changed);
140
+ if (!import.meta.env?.DEV)
141
+ return;
142
+ if (changed.has('smCustomSize') || changed.has('mdCustomSize') || changed.has('lgCustomSize')) {
143
+ this._checkFloor(this._customSizes);
144
+ }
145
+ }
146
+ _warnOnce(key, message) {
147
+ if (this._warned.has(key))
148
+ return;
149
+ this._warned.add(key);
150
+ console.warn(message, this);
151
+ }
152
+ /** DEV-only: says so when a custom size is smaller than size 1, which then shows instead. */
153
+ _checkFloor(sizes) {
154
+ if (!this.shadowRoot || Object.keys(sizes).length === 0)
155
+ return;
156
+ const probe = document.createElement('span');
157
+ probe.style.position = 'absolute';
158
+ probe.style.visibility = 'hidden';
159
+ this.shadowRoot.append(probe);
160
+ const px = (value) => {
161
+ probe.style.fontSize = value;
162
+ return parseFloat(getComputedStyle(probe).fontSize);
163
+ };
164
+ try {
165
+ for (const [breakpoint, value] of Object.entries(sizes)) {
166
+ // A value relative to the viewport, a container or the surrounding
167
+ // text resolves to something else elsewhere, so it is left to the
168
+ // CSS floor rather than measured here.
169
+ if (/%|\d(?:v[whib]|vmin|vmax|cq[whib]|cqmin|cqmax|em|ex|ch|cap|ic|lh)\b/.test(value))
170
+ continue;
171
+ if (px(value) < px(SIZE_1_FONT_SIZE[breakpoint]) - 0.5) {
172
+ this._warnOnce(`floor-${breakpoint}-${value}`, `<nldd-title>: custom size "${value}" is smaller than size 1 at ${breakpoint} and shows as size 1. Use size for headings up to size 1.`);
173
+ }
174
+ }
175
+ }
176
+ finally {
177
+ probe.remove();
178
+ }
179
+ }
80
180
  render() {
81
181
  return titleTemplate(this);
82
182
  }
@@ -85,6 +185,15 @@ NLDDTitle.styles = titleStyles;
85
185
  __decorate([
86
186
  property({ type: Number, reflect: true })
87
187
  ], NLDDTitle.prototype, "size", void 0);
188
+ __decorate([
189
+ property({ reflect: true, attribute: 'sm-custom-size', converter: reflectNonDefault('') })
190
+ ], NLDDTitle.prototype, "smCustomSize", void 0);
191
+ __decorate([
192
+ property({ reflect: true, attribute: 'md-custom-size', converter: reflectNonDefault('') })
193
+ ], NLDDTitle.prototype, "mdCustomSize", void 0);
194
+ __decorate([
195
+ property({ reflect: true, attribute: 'lg-custom-size', converter: reflectNonDefault('') })
196
+ ], NLDDTitle.prototype, "lgCustomSize", void 0);
88
197
  __decorate([
89
198
  property({ reflect: true, converter: reflectNonDefault('content') })
90
199
  ], NLDDTitle.prototype, "color", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"title.js","sourceRoot":"","sources":["../../../../src/components/content/title/title.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAMpD,0FAA0F;AAC1F,IAAI,mBAAmB,GAAG,KAAK,CAAC;AAGzB,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,UAAU;IAAlC;;QAIN,SAAI,GAAS,CAAC,CAAC;QAGf,UAAK,GAAe,SAAS,CAAC;QAG9B,SAAI,GAAG,EAAE,CAAC;QAGV,mBAAc,GAAG,EAAE,CAAC;QAGpB,aAAQ,GAAG,EAAE,CAAC;QAGd,iBAAY,GAAwB,IAAI,CAAC;QAEzC,gBAAgB;QACP,wBAAmB,GAAG,KAAK,CAAC;QACrC,gBAAgB;QACP,uBAAkB,GAAG,KAAK,CAAC;QACpC,gBAAgB;QACP,8BAAyB,GAAG,KAAK,CAAC;QAE3C,gBAAgB;QACh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iBAAiB,CAAS,EAAE,CAAC,EAAE,CAAC;iDAChF;AAGpB;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,CAAS,EAAE,CAAC,EAAE,CAAC;2CACxD;AAGd;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;+CAC7B;AAGhC;IAAR,KAAK,EAAE;sDAA6B;AAE5B;IAAR,KAAK,EAAE;qDAA4B;AAE3B;IAAR,KAAK,EAAE;4DAAmC;AAnC/B,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CA0IrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"title.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/content/title/title.styles.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,WAAW,yBA4RvB,CAAC"}
1
+ {"version":3,"file":"title.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/content/title/title.styles.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,WAAW,yBAmUvB,CAAC"}
@@ -14,6 +14,13 @@ export const titleStyles = css `
14
14
  /* # Host */
15
15
 
16
16
  :host {
17
+ --_title-sm-custom-size: initial;
18
+ --_title-md-custom-size: initial;
19
+ --_title-lg-custom-size: initial;
20
+ --_title-sm-custom-font: var(--primitives-font-weight-display-bold) max(var(--_title-sm-custom-size), var(--primitives-font-size-700)) / var(--primitives-line-height-flat) var(--primitives-font-family-display);
21
+ --_title-md-custom-font: var(--primitives-font-weight-display-bold) max(var(--_title-md-custom-size), var(--primitives-font-size-800)) / var(--primitives-line-height-flat) var(--primitives-font-family-display);
22
+ --_title-lg-custom-font: var(--primitives-font-weight-display-bold) max(var(--_title-lg-custom-size), var(--primitives-font-size-1000)) / var(--primitives-line-height-flat) var(--primitives-font-family-display);
23
+
17
24
  @media (max-width: ${smMax}) {
18
25
  --_title-font: var(--primitives-font-display-3-sm);
19
26
  }
@@ -172,6 +179,38 @@ export const titleStyles = css `
172
179
  }
173
180
  }
174
181
 
182
+ /* ## Custom size */
183
+
184
+ :host([data-sm-custom-size]) {
185
+ @media (max-width: ${smMax}) {
186
+ --_title-font: var(--_title-sm-custom-font);
187
+ }
188
+
189
+ @container layout-container (max-width: ${smMax}) {
190
+ --_title-font: var(--_title-sm-custom-font);
191
+ }
192
+ }
193
+
194
+ :host([data-md-custom-size]) {
195
+ @media (min-width: ${mdMin}) and (max-width: ${mdMax}) {
196
+ --_title-font: var(--_title-md-custom-font);
197
+ }
198
+
199
+ @container layout-container (min-width: ${mdMin}) and (max-width: ${mdMax}) {
200
+ --_title-font: var(--_title-md-custom-font);
201
+ }
202
+ }
203
+
204
+ :host([data-lg-custom-size]) {
205
+ @media (min-width: ${lgMin}) {
206
+ --_title-font: var(--_title-lg-custom-font);
207
+ }
208
+
209
+ @container layout-container (min-width: ${lgMin}) {
210
+ --_title-font: var(--_title-lg-custom-font);
211
+ }
212
+ }
213
+
175
214
  :host([hidden]) {
176
215
  display: none;
177
216
  }
@@ -1 +1 @@
1
- {"version":3,"file":"title.styles.js","sourceRoot":"","sources":["../../../../src/components/content/title/title.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE3F,MAAM,KAAK,GAAG,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC3C,MAAM,KAAK,GAAG,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC3C,MAAM,KAAK,GAAG,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC3C,MAAM,KAAK,GAAG,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3C,MAAM,CAAC,MAAM,W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;;;4CAIgB,KAAK;;;;4CAIL,KAAK,qBAAqB,KAAK;;;;4CAI/B,KAAK;;;;;;;;uBAQ1B,KAAK;;;;4CAIgB,KAAK;;;;;;uBAM1B,KAAK,qBAAqB,KAAK;;;;4CAIV,KAAK,qBAAqB,KAAK;;;;;;uBAMpD,KAAK;;;;4CAIgB,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAwC7C,YAAY;IACZ,kBAAkB;;;;;;;;;;;;;;;;;;;IAmBlB,YAAY;IACZ,kBAAkB;;;;;;;;;;;;;;;;;IAiBlB,YAAY;IACZ,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2CrB,CAAC"}
@@ -17,7 +17,7 @@
17
17
  * @attr {object} translations - Override translation keys; unset keys fall back to Dutch
18
18
  * @attr {boolean} roving - Inside a roving-focus container (e.g. nldd-token-field): the host is the single tab stop, so the trailing control is not separately tabbable.
19
19
  * @attr {boolean} expanded - Reflects whether the token's menu is open (control="menu"); managed by the token.
20
- * @attr {boolean} disabled - Disabled state
20
+ * @attr {boolean} disabled - Disabled state. Avoid it where you can; the design guidelines say why.
21
21
  *
22
22
  * @slot - Token text
23
23
  * @slot menu - An nldd-menu that the token opens from its menu button (control="menu").
@@ -23,7 +23,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
23
23
  * @attr {object} translations - Override translation keys; unset keys fall back to Dutch
24
24
  * @attr {boolean} roving - Inside a roving-focus container (e.g. nldd-token-field): the host is the single tab stop, so the trailing control is not separately tabbable.
25
25
  * @attr {boolean} expanded - Reflects whether the token's menu is open (control="menu"); managed by the token.
26
- * @attr {boolean} disabled - Disabled state
26
+ * @attr {boolean} disabled - Disabled state. Avoid it where you can; the design guidelines say why.
27
27
  *
28
28
  * @slot - Token text
29
29
  * @slot menu - An nldd-menu that the token opens from its menu button (control="menu").
@@ -1,5 +1,5 @@
1
1
  import { t as inheritedTextReset } from "./shadow-resets-CPa58rmc.js";
2
- import { i as linkRel, r as translate, t as withTranslations } from "./with-translations-C8_0-9y8.js";
2
+ import { a as linkRel, i as linkHintKey, r as translate, t as withTranslations } from "./with-translations-C6QfP6_S.js";
3
3
  import { t as __decorate } from "./decorate-CO88j7Lc.js";
4
4
  import { t as reflectNonDefault } from "./reflect-non-default-OLaK60rT.js";
5
5
  import "./icon-D_ZGezHx.js";
@@ -1401,8 +1401,9 @@ function renderContent(component) {
1401
1401
  `;
1402
1402
  }
1403
1403
  function template() {
1404
- const opensInNewTabHint = this.href && this.target === "_blank" ? this._t("components.icon-button.opens-in-new-tab-label") : "";
1405
- const label = [this.accessibleLabel || this.text || "", opensInNewTabHint].filter(Boolean).join(", ") || nothing;
1404
+ const hintKey = linkHintKey(this.href, this.target);
1405
+ const linkHint = hintKey ? this._t(`components.icon-button.${hintKey}`) : "";
1406
+ const label = [this.accessibleLabel || this.text || "", linkHint].filter(Boolean).join(", ") || nothing;
1406
1407
  const content = renderContent(this);
1407
1408
  const tooltipText = this.accessibleLabel || (this.size !== "lg" || this.hideLgText ? this.text : "");
1408
1409
  const ariaExpanded = this.expandable || !!this.popupType ? String(this.expanded) : this.expanded ? "true" : nothing;
@@ -1471,7 +1472,11 @@ function template() {
1471
1472
  }
1472
1473
  //#endregion
1473
1474
  //#region src/components/actions/icon-button/icon-button.i18n.ts
1474
- var nlddIconButtonTranslations = { "components.icon-button.opens-in-new-tab-label": "Opent in nieuw tabblad" };
1475
+ var nlddIconButtonTranslations = {
1476
+ "components.icon-button.link-hint-new-tab-lowercase-label": "opent in nieuw tabblad",
1477
+ "components.icon-button.link-hint-external-lowercase-label": "andere website",
1478
+ "components.icon-button.link-hint-external-new-tab-lowercase-label": "andere website, opent in nieuw tabblad"
1479
+ };
1475
1480
  //#endregion
1476
1481
  //#region src/components/actions/icon-button/icon-button.ts
1477
1482
  /**
@@ -1482,9 +1487,9 @@ var nlddIconButtonTranslations = { "components.icon-button.opens-in-new-tab-labe
1482
1487
  * @attr {string} size - Button size: 'xs' | 'sm' | 'md' | 'lg' (default: 'md')
1483
1488
  * @attr {boolean} hide-lg-text - In lg size, hides the text label and enlarges the icon by one step (28px)
1484
1489
  * @attr {boolean} no-highlight-border - Removes the per-appearance highlight border (e.g. when a control group draws a single border instead).
1485
- * @attr {boolean} loading - Loading state (default: false). Shows an activity indicator over the visually hidden icon, sets aria-busy on the inner control and blocks activation, without dropping the button from the tab order (unlike disabled).
1490
+ * @attr {boolean} loading - Loading state (default: false). Shows an activity indicator over the visually hidden icon, sets aria-busy on the inner control and blocks activation, without dropping the button from the tab order (unlike disabled). Meant for an action that has to wait for the server, such as sending an application. For most actions, show the result right away and confirm in the background, as the design guidelines describe.
1486
1491
  * @attr {string} loading-text - What the screen reader announces while `loading` is on, for a button that does more than load: "Aan het bewaren". Leave it out and the activity indicator says its translated "Laden".
1487
- * @attr {boolean} disabled - Disabled state
1492
+ * @attr {boolean} disabled - Disabled state. Avoid it: let the action run and say afterwards what is missing; the design guidelines say why.
1488
1493
  * @attr {boolean} no-tab - Takes the button out of the tab order (tabindex="-1"), for a control owned by a roving container (an nldd-token in nldd-token-field, a button in a row of an nldd-list) that manages focus itself. Still mouse- and script-focusable.
1489
1494
  * @attr {string} type - Button type for form submission: 'button' | 'submit' | 'reset' (ignored when href is set)
1490
1495
  * @attr {boolean} expandable - Whether the button opens a menu or popover and shows chevron next to the icon
@@ -1496,7 +1501,7 @@ var nlddIconButtonTranslations = { "components.icon-button.opens-in-new-tab-labe
1496
1501
  * @attr {string} accessible-label - Accessible label for screen readers. Overrides text as aria-label and title tooltip. Use when the visible text alone lacks context for screen readers (e.g. text "Toon", accessible-label "Toon wachtwoord"). The text is still shown visually in lg size regardless.
1497
1502
  * @attr {string} tooltip-timing - Forwarded to the inner nldd-tooltip's `timing`: 'delay' (the default, a 700 ms show-delay), 'instant', or 'never' (suppress the visual tooltip; screen readers still get the aria-label). Use 'never' when the surrounding context already explains the button (e.g. spin buttons in nldd-number-field, the chevron in nldd-split-button).
1498
1503
  * @attr {string} href - When set, renders an <a> element instead of <button>
1499
- * @attr {string} target - Link target (e.g. '_blank'); only used when href is set. With '_blank' the "opens in new tab" announcement is folded into the aria-label for screen readers (WCAG 2.1 SC 3.2.2).
1504
+ * @attr {string} target - Link target (e.g. '_blank'); only used when href is set. With '_blank' the "opens in new tab" announcement is folded into the aria-label for screen readers (WCAG 2.1 SC 3.2.2). An `href` to another origin than the page (another website, a subdomain too) adds a visually hidden "andere website", in one sentence with the new-tab announcement when both apply; there is no way to switch it off.
1500
1505
  * @attr {string} rel - Link rel attribute, used with href; with target '_blank', 'noopener noreferrer' is added to whatever you set
1501
1506
  * @attr {object} translations - Override translation keys (e.g. the "opens in new tab" announcement); unset keys fall back to Dutch.
1502
1507
  * @attr {string} popovertarget - ID of a popover element to toggle; forwarded to the inner <button>
@@ -7,6 +7,12 @@
7
7
  * and keyboard navigation, including `<optgroup>`, `data-*` attributes and
8
8
  * dynamic changes to options.
9
9
  *
10
+ * A dropdown hides its options, so it is the last resort for a choice from a
11
+ * fixed set. Show a handful of options with nldd-segmented-control,
12
+ * nldd-toggle-button-group or nldd-radio-button-group, and let the user type
13
+ * in nldd-combo-box when there are many, a list of countries included. The
14
+ * design guidelines explain the order.
15
+ *
10
16
  * @element nldd-dropdown
11
17
  * @attr {string} size - Size: 'xs' | 'sm' | 'md' (default: 'md')
12
18
  * @attr {boolean} valid - Marks the field as valid
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/dropdown/dropdown.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAMjC,OAAO,8BAA8B,CAAC;AAItC,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;;AAE9C,qBACa,YAAa,SAAQ,iBAAuB;IACxD,OAAgB,MAAM,0BAAkB;IAEx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