@nldd/design-system 0.24.0 → 0.25.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 (283) hide show
  1. package/custom-elements.json +211 -27
  2. package/dist/assets/styles/shadow-resets.d.ts +9 -0
  3. package/dist/assets/styles/shadow-resets.d.ts.map +1 -1
  4. package/dist/assets/styles/shadow-resets.js +13 -0
  5. package/dist/assets/styles/shadow-resets.js.map +1 -1
  6. package/dist/cdn/autoloader.js +137 -137
  7. package/dist/cdn/chunks/{activity-indicator-DWBG1Csi.js → activity-indicator-Dc6c9HtC.js} +12 -12
  8. package/dist/cdn/chunks/{avatar-CRZLseMs.js → avatar-CHXRpWWk.js} +17 -17
  9. package/dist/cdn/chunks/{avatar-group-coYbMhot.js → avatar-group-B76E8oC6.js} +20 -20
  10. package/dist/cdn/chunks/{badge-DAXG-uIw.js → badge-tO7gHhdi.js} +5 -5
  11. package/dist/cdn/chunks/{banner-BbR0rebp.js → banner-D4kFQYXF.js} +15 -15
  12. package/dist/cdn/chunks/{bar-split-view-DoklVwuj.js → bar-split-view-C9bYdWSR.js} +7 -7
  13. package/dist/cdn/chunks/{blockquote-DfIl4wTC.js → blockquote-DRJajjBB.js} +9 -9
  14. package/dist/cdn/chunks/{box-CXICi_Gs.js → box-D10mS19t.js} +3 -3
  15. package/dist/cdn/chunks/{breadcrumbs-CVoNqsU2.js → breadcrumbs-BUdQJG3z.js} +6 -6
  16. package/dist/cdn/chunks/{button-DWzqSerk.js → button-CwY9fWCg.js} +8 -8
  17. package/dist/cdn/chunks/{button-bar-DwFLuumP.js → button-bar-DkqbRvff.js} +30 -30
  18. package/dist/cdn/chunks/{button-group-D-nEY7Wz.js → button-group-p364JgTR.js} +2 -2
  19. package/dist/cdn/chunks/{card-CIVLEFhz.js → card-B7TaSaw7.js} +9 -9
  20. package/dist/cdn/chunks/{cell-C79LmCOU.js → cell-BTIpXf1T.js} +6 -6
  21. package/dist/cdn/chunks/{checkbox-BQepKdVv.js → checkbox-BLEK0rAV.js} +4 -4
  22. package/dist/cdn/chunks/{checkbox-field-ColaTYKE.js → checkbox-field-CDtlpN-u.js} +5 -5
  23. package/dist/cdn/chunks/{class-map-9VgiG_zt.js → class-map-5WYS_nCb.js} +1 -1
  24. package/dist/cdn/chunks/{code-editor-FNmK9xRx.js → code-editor-CanGMLIo.js} +5 -5
  25. package/dist/cdn/chunks/{code-viewer-C5whEGq6.js → code-viewer-DCZ3wjMd.js} +16 -16
  26. package/dist/cdn/chunks/{codemirror-input-SKGbh9LP.js → codemirror-input-CtvDBy25.js} +4 -4
  27. package/dist/cdn/chunks/{collection-Dq6Z66UX.js → collection-D8K79X0H.js} +20 -20
  28. package/dist/cdn/chunks/{combo-box-CoOSPICd.js → combo-box-BeWoeEY8.js} +25 -25
  29. package/dist/cdn/chunks/{container-CtwuWO3a.js → container-Be2J-GhB.js} +48 -48
  30. package/dist/cdn/chunks/{custom-element-BVKCDhPV.js → custom-element-DGlHv_OV.js} +4 -2
  31. package/dist/cdn/chunks/{date-field-CqnGM7GR.js → date-field-BLaGVd4x.js} +26 -26
  32. package/dist/cdn/chunks/{date-picker-C2iGHw2u.js → date-picker-C4mLZKWF.js} +16 -16
  33. package/dist/cdn/chunks/{decorate-CK3hc5C5.js → decorate-Czy-wI4F.js} +1 -1
  34. package/dist/cdn/chunks/{described-by-mixin-DGAPpEdM.js → described-by-mixin-fLi4Nmt7.js} +2 -2
  35. package/dist/cdn/chunks/{description-cell-B08Ma5EJ.js → description-cell-aQyLX0U0.js} +6 -6
  36. package/dist/cdn/chunks/{dev-checks-BwWYGVrJ.js → dev-checks-qTR6tciJ.js} +79 -17
  37. package/dist/cdn/chunks/{dist-CWN_qz9z.js → dist-BLnIbkqH.js} +1 -1
  38. package/dist/cdn/chunks/{dist-DP5DQSlX.js → dist-BNS6C8sP.js} +2 -2
  39. package/dist/cdn/chunks/{dist-D1t9kkjo.js → dist-B_fXtXqM.js} +1 -1
  40. package/dist/cdn/chunks/{dist-B2YK3eT2.js → dist-CX0g6sV1.js} +3 -3
  41. package/dist/cdn/chunks/{dist-DzcXDSFC.js → dist-CZOXq9aZ.js} +1 -1
  42. package/dist/cdn/chunks/{dist-CKeY28-M.js → dist-CdF0c6UD.js} +2 -2
  43. package/dist/cdn/chunks/{dist-CQ5kBaGZ.js → dist-DHK9tNd7.js} +1 -1
  44. package/dist/cdn/chunks/{dist-BThgPtD7.js → dist-WQv_JUmB.js} +2 -2
  45. package/dist/cdn/chunks/{dist-jAq440y0.js → dist-_QFa91Kz.js} +1 -1
  46. package/dist/cdn/chunks/{dist-B8vBP_Xz.js → dist-fDpuYq7K.js} +1 -1
  47. package/dist/cdn/chunks/{dist-B4vELUJW.js → dist-p1FcXq9E.js} +3 -3
  48. package/dist/cdn/chunks/{divider-KgHxRNV9.js → divider-2hHcSIga.js} +2 -2
  49. package/dist/cdn/chunks/{document-tab-bar-CTIcETDr.js → document-tab-bar-CIWiZUB5.js} +18 -18
  50. package/dist/cdn/chunks/{dropdown-BhrCadMW.js → dropdown-Bwn6dQrK.js} +5 -5
  51. package/dist/cdn/chunks/{file-field-DzH4Yrj5.js → file-field-CtQ6Fzkj.js} +25 -25
  52. package/dist/cdn/chunks/{form-actions-CDQW1p3w.js → form-actions-DSL0qce-.js} +3 -3
  53. package/dist/cdn/chunks/{form-field-D_qJpPAS.js → form-field--t3Bz1pc.js} +7 -7
  54. package/dist/cdn/chunks/{form-section-Jy5b5Qtp.js → form-section-D1n8Sdmt.js} +16 -16
  55. package/dist/cdn/chunks/{form-CzmdlZ0i.js → form-vSM2SOrK.js} +10 -10
  56. package/dist/cdn/chunks/{full-bleed-section-BDIuXLGU.js → full-bleed-section-w2pDVC5v.js} +4 -4
  57. package/dist/cdn/chunks/{hero-BPHFHrUT.js → hero-BypUmnRi.js} +22 -22
  58. package/dist/cdn/chunks/{icon-BE2ojX0S.js → icon-BydOAoVO.js} +7 -7
  59. package/dist/cdn/chunks/{icon-button-CFMhdG1B.js → icon-button-C_MZ-jXt.js} +9 -9
  60. package/dist/cdn/chunks/{icon-cell-CQ-e1GB2.js → icon-cell-jiYNsV84.js} +6 -6
  61. package/dist/cdn/chunks/{identity-7wQDjeGb.js → identity-D1Sw6OdG.js} +55 -39
  62. package/dist/cdn/chunks/{if-defined-G1P3HUvi.js → if-defined-pKQLIQvK.js} +1 -1
  63. package/dist/cdn/chunks/{image-QPbmNKvZ.js → image-DEI0hogS.js} +20 -20
  64. package/dist/cdn/chunks/{inline-dialog-DP3AXfJV.js → inline-dialog-CTjJ8Tl_.js} +15 -15
  65. package/dist/cdn/chunks/{just-in-time-education-DnaF_sLc.js → just-in-time-education-pUUxdKPR.js} +5 -5
  66. package/dist/cdn/chunks/{kanban-o2GMLjsq.js → kanban-KSLBcCb4.js} +9 -9
  67. package/dist/cdn/chunks/{kanban-column-B_Jrut9s.js → kanban-column-RNSdiBIT.js} +8 -8
  68. package/dist/cdn/chunks/{keyboard-shortcut-Dm366Dra.js → keyboard-shortcut-D9TYAQu1.js} +3 -3
  69. package/dist/cdn/chunks/{languages-Dlh_tbAH.js → languages-DGZO3jTf.js} +12 -12
  70. package/dist/cdn/chunks/{link-DhTY3Sjh.js → link-C4K1qVcb.js} +70 -21
  71. package/dist/cdn/chunks/{link-group-YuwD1m6-.js → link-group-BEYO7nTK.js} +2 -2
  72. package/dist/cdn/chunks/{list-item-vO3GwQWa.js → list-item-CotWNKc1.js} +19 -19
  73. package/dist/cdn/chunks/{list-item-segment-F3av0jxz.js → list-item-segment-C-yl2GAS.js} +15 -15
  74. package/dist/cdn/chunks/{list-Cdvib5Y-.js → list-rMBdnf1f.js} +15 -15
  75. package/dist/cdn/chunks/{menu-bar-imOaTlGm.js → menu-bar-D9IxDwC2.js} +10 -10
  76. package/dist/cdn/chunks/{menu-bar-item-ChQbM1ER.js → menu-bar-item-768OWJdt.js} +18 -18
  77. package/dist/cdn/chunks/{menu-divider-D7s6f49y.js → menu-divider-BHAGnkBl.js} +3 -3
  78. package/dist/cdn/chunks/{menu-group-BcEmoNvL.js → menu-group-B5MAz_Yk.js} +6 -6
  79. package/dist/cdn/chunks/{menu-item-BGlVTfe6.js → menu-item-Ba581zRi.js} +22 -22
  80. package/dist/cdn/chunks/{menu-dTVlz6mn.js → menu-rE6tDSAy.js} +39 -35
  81. package/dist/cdn/chunks/{menu.template-syBthjEV.js → menu.template-Eb7J7UrL.js} +20 -5
  82. package/dist/cdn/chunks/{modal-dialog-BBK25tjm.js → modal-dialog-Djln8pr7.js} +5 -5
  83. package/dist/cdn/chunks/{multi-line-text-field-DuL6nLG_.js → multi-line-text-field-Omt0oidK.js} +5 -5
  84. package/dist/cdn/chunks/{navigation-split-view-CdZNbX91.js → navigation-split-view-DDng9DdF.js} +11 -11
  85. package/dist/cdn/chunks/{notification-Dwhfnjb2.js → notification-DB6JOmCC.js} +13 -13
  86. package/dist/cdn/chunks/{number-field-Dl4zZvVe.js → number-field-xgr4dysX.js} +7 -7
  87. package/dist/cdn/chunks/{one-half-one-half-section-BJxLZfiK.js → one-half-one-half-section-CFhmSDDa.js} +4 -4
  88. package/dist/cdn/chunks/{one-third-two-thirds-section-CARh_hdH.js → one-third-two-thirds-section-D0JV0GJ_.js} +4 -4
  89. package/dist/cdn/chunks/{one-time-code-field-FaxqiiD6.js → one-time-code-field-CqgKQqdE.js} +20 -20
  90. package/dist/cdn/chunks/{page-Cc5bb6VU.js → page-DXWHG-hD.js} +10 -10
  91. package/dist/cdn/chunks/{page-footer-Df1cS-ks.js → page-footer-GexGY_m-.js} +15 -15
  92. package/dist/cdn/chunks/{page-section-mixin-BzgAU2sX.js → page-section-mixin-CtiPKCqL.js} +3 -3
  93. package/dist/cdn/chunks/{pagination-BcnkrWV_.js → pagination-DJkfE8t9.js} +6 -6
  94. package/dist/cdn/chunks/{password-field-CeIJm406.js → password-field-gKiiE_5e.js} +7 -7
  95. package/dist/cdn/chunks/{popover-BIMt3aqW.js → popover-C-jxcCHx.js} +6 -6
  96. package/dist/cdn/chunks/{progress-bar-C9CWhkse.js → progress-bar-CBWQRWkE.js} +24 -24
  97. package/dist/cdn/chunks/{progress-circle-CJL1aFbS.js → progress-circle-CCcRDOOJ.js} +22 -22
  98. package/dist/cdn/chunks/{radio-button-DKo5kdLW.js → radio-button-B8xwJO3_.js} +3 -3
  99. package/dist/cdn/chunks/{radio-button-field-DPZajMnT.js → radio-button-field-B9lRNOXJ.js} +12 -12
  100. package/dist/cdn/chunks/{radio-button-group-BBZhU3bn.js → radio-button-group-Cy7Ya28w.js} +3 -3
  101. package/dist/cdn/chunks/{render-marked-Bkoq5vNH.js → render-marked-DjXBoUGY.js} +1 -1
  102. package/dist/cdn/chunks/{reorder-handle-cell-CEW8Cg1r.js → reorder-handle-cell-B6V85qYk.js} +4 -4
  103. package/dist/cdn/chunks/{reorder-handle-mixin-BkksqjmK.js → reorder-handle-mixin-DTmEmT-V.js} +2 -2
  104. package/dist/cdn/chunks/{repeat-C5V9E9Ta.js → repeat-Ck8L8Iy9.js} +1 -1
  105. package/dist/cdn/chunks/{rich-text-DEFr_Niu.js → rich-text-CqQeOXwL.js} +3 -3
  106. package/dist/cdn/chunks/{row-header-mixin-BSORP0i7.js → row-header-mixin-XRu3gHMf.js} +2 -2
  107. package/dist/cdn/chunks/{scroll-fade-B7kZVxmh.js → scroll-fade-e6d1wo3D.js} +4 -4
  108. package/dist/cdn/chunks/{search-field-Dr0MLD_z.js → search-field-Cz7Ucf6x.js} +9 -9
  109. package/dist/cdn/chunks/{segmented-control-aOIkoklF.js → segmented-control-CLzKU4SX.js} +33 -33
  110. package/dist/cdn/chunks/{shadow-resets-CRBumQjX.js → shadow-resets-CodxnaUh.js} +11 -7
  111. package/dist/cdn/chunks/{sheet-BCPE_pDl.js → sheet-DkmSsRV3.js} +4 -4
  112. package/dist/cdn/chunks/{shell-ZCsqW56P.js → shell-Ex_f7Ov3.js} +3 -3
  113. package/dist/cdn/chunks/{side-by-side-split-view-BWIyZmzo.js → side-by-side-split-view-C8aSEGRc.js} +7 -7
  114. package/dist/cdn/chunks/{sidebar-section-Di3mQROc.js → sidebar-section-CnD-3i7r.js} +8 -8
  115. package/dist/cdn/chunks/{simple-section-sOkNMsbz.js → simple-section-CeKnmobI.js} +4 -4
  116. package/dist/cdn/chunks/{skip-link-mcskOuFr.js → skip-link-DwtFm_NJ.js} +4 -4
  117. package/dist/cdn/chunks/{slider-CkPk4lBA.js → slider-BVdkwNW3.js} +21 -21
  118. package/dist/cdn/chunks/slot-content-2qH2vEC_.js +22 -0
  119. package/dist/cdn/chunks/slotted-block-xNpJoXLz.js +14 -0
  120. package/dist/cdn/chunks/{spacer-RB_KBaTr.js → spacer-H4zmoDr_.js} +3 -3
  121. package/dist/cdn/chunks/{spacer-cell-V1UaaPcO.js → spacer-cell-BES4eJH1.js} +4 -4
  122. package/dist/cdn/chunks/{split-button-BUEhYiI5.js → split-button-Caa30uTx.js} +7 -7
  123. package/dist/cdn/chunks/{split-view-divider-Rmb9cG9K.js → split-view-divider-klvZ8lgP.js} +2 -2
  124. package/dist/cdn/chunks/{split-view-pane-DQRZ9tE0.js → split-view-pane-Cnx56S5C.js} +4 -4
  125. package/dist/cdn/chunks/{stacked-split-view-BaeQhWmd.js → stacked-split-view-CYdGBY7Q.js} +7 -7
  126. package/dist/cdn/chunks/{static-html-CAczcbUD.js → static-html--Xd5vkAU.js} +1 -1
  127. package/dist/cdn/chunks/{status-bar-D3-IYqUp.js → status-bar-CJybViWL.js} +4 -4
  128. package/dist/cdn/chunks/{step-bar-BfNXoHds.js → step-bar-BO6Y1BrK.js} +21 -21
  129. package/dist/cdn/chunks/{step-cell-BN2ZKsQ4.js → step-cell-BQ8EHZVR.js} +5 -5
  130. package/dist/cdn/chunks/{stepper-DuPRMxBx.js → stepper-COTaJwSU.js} +6 -6
  131. package/dist/cdn/chunks/{style-map-LFqo5rE_.js → style-map-BwtZr74h.js} +1 -1
  132. package/dist/cdn/chunks/{swatch-picker-BVKCFzpO.js → swatch-picker-5fxe3QB1.js} +21 -21
  133. package/dist/cdn/chunks/{switch-CgUZ0WlQ.js → switch-BUxGg2ww.js} +4 -4
  134. package/dist/cdn/chunks/{switch-field-B4c8-L61.js → switch-field-DOsEK534.js} +5 -5
  135. package/dist/cdn/chunks/{tab-bar-D-1g8fdF.js → tab-bar-CZ9Z9qV9.js} +21 -21
  136. package/dist/cdn/chunks/{table-jrJ4EJpq.js → table-SAsB1kDN.js} +5 -5
  137. package/dist/cdn/chunks/{tag-JYwa5l-A.js → tag-xuCeECO3.js} +10 -10
  138. package/dist/cdn/chunks/{term-NyLmTWnF.js → term-DHEvoltZ.js} +20 -22
  139. package/dist/cdn/chunks/text-CiFzQPQw.js +260 -0
  140. package/dist/cdn/chunks/{text-cell-BXLFcD_e.js → text-cell-DQNzo2Rp.js} +74 -62
  141. package/dist/cdn/chunks/{text-editor-rLc5H6kD.js → text-editor-DCYF_nqz.js} +10 -10
  142. package/dist/cdn/chunks/{text-field-B7M4VwCe.js → text-field-BiPeMi6s.js} +22 -22
  143. package/dist/cdn/chunks/{time-field-BtQRsvpR.js → time-field-C-Euaiy0.js} +27 -27
  144. package/dist/cdn/chunks/{time-picker-BKLwibb9.js → time-picker-DYkxhEYm.js} +9 -9
  145. package/dist/cdn/chunks/{title-DLD3RW7l.js → title-DkS07R_v.js} +113 -98
  146. package/dist/cdn/chunks/{title-cell-BCUBuKIO.js → title-cell-CJevv6Vg.js} +83 -74
  147. package/dist/cdn/chunks/{toggle-button-Etx8hKQS.js → toggle-button-DDqd56_3.js} +25 -25
  148. package/dist/cdn/chunks/{toggle-button-group-Ph1kcTqj.js → toggle-button-group-ByxgMVzH.js} +2 -2
  149. package/dist/cdn/chunks/{token-BQtumlDT.js → token-YpVKK1g4.js} +13 -13
  150. package/dist/cdn/chunks/{token-field-BrV2RZHi.js → token-field-vLdJSvUz.js} +21 -21
  151. package/dist/cdn/chunks/{toolbar-w_2rxcNu.js → toolbar-C-5H46y9.js} +12 -12
  152. package/dist/cdn/chunks/{toolbar-item-x-y_AxHu.js → toolbar-item-CvPtoAoQ.js} +3 -3
  153. package/dist/cdn/chunks/{toolbar-title-g47zMdG2.js → toolbar-title-HElUvLeY.js} +4 -4
  154. package/dist/cdn/chunks/{toolbar.styles-EP0gu8kg.js → toolbar.styles-BuJIgj1E.js} +3 -3
  155. package/dist/cdn/chunks/{tooltip-D47hF_iD.js → tooltip-BF4HkWOi.js} +16 -16
  156. package/dist/cdn/chunks/{top-navigation-bar-DO7JsQVs.js → top-navigation-bar-ngF2MF40.js} +18 -18
  157. package/dist/cdn/chunks/{top-title-bar-CVEOoXhu.js → top-title-bar-BUjpi-w6.js} +14 -14
  158. package/dist/cdn/chunks/{translations-eWWV6weF.js → translations-BWgmZCAK.js} +1 -1
  159. package/dist/cdn/chunks/{two-thirds-one-third-section-x3dadNwz.js → two-thirds-one-third-section-Ci6O8SwP.js} +4 -4
  160. package/dist/cdn/chunks/{validation-list-krcQHzP3.js → validation-list-BBNFz_2I.js} +10 -10
  161. package/dist/cdn/chunks/{visibility-mixin-CXBa-fVi.js → visibility-mixin-BP5T5qYB.js} +4 -4
  162. package/dist/cdn/chunks/{visually-hidden-Cd1_FE1J.js → visually-hidden-BqYWVy4n.js} +2 -2
  163. package/dist/cdn/chunks/{window-JbrLuRjR.js → window-CvgGg1Ib.js} +4 -4
  164. package/dist/cdn/chunks/{with-translations-DhRk5rH-.js → with-translations-8SmMZkGa.js} +3 -3
  165. package/dist/components/actions/button-bar/button-bar.js +2 -2
  166. package/dist/components/actions/button-bar/button-bar.js.map +1 -1
  167. package/dist/components/actions/menu/menu.d.ts +13 -3
  168. package/dist/components/actions/menu/menu.d.ts.map +1 -1
  169. package/dist/components/actions/menu/menu.js +31 -4
  170. package/dist/components/actions/menu/menu.js.map +1 -1
  171. package/dist/components/actions/menu/menu.styles.d.ts.map +1 -1
  172. package/dist/components/actions/menu/menu.styles.js +16 -1
  173. package/dist/components/actions/menu/menu.styles.js.map +1 -1
  174. package/dist/components/content/identity/identity.d.ts +17 -10
  175. package/dist/components/content/identity/identity.d.ts.map +1 -1
  176. package/dist/components/content/identity/identity.js +33 -19
  177. package/dist/components/content/identity/identity.js.map +1 -1
  178. package/dist/components/content/identity/identity.styles.d.ts.map +1 -1
  179. package/dist/components/content/identity/identity.styles.js +5 -1
  180. package/dist/components/content/identity/identity.styles.js.map +1 -1
  181. package/dist/components/content/identity/identity.template.d.ts +1 -1
  182. package/dist/components/content/identity/identity.template.d.ts.map +1 -1
  183. package/dist/components/content/identity/identity.template.js +11 -5
  184. package/dist/components/content/identity/identity.template.js.map +1 -1
  185. package/dist/components/content/term/term.template.d.ts.map +1 -1
  186. package/dist/components/content/term/term.template.js +6 -8
  187. package/dist/components/content/term/term.template.js.map +1 -1
  188. package/dist/components/content/text/text.d.ts +15 -2
  189. package/dist/components/content/text/text.d.ts.map +1 -1
  190. package/dist/components/content/text/text.js +19 -3
  191. package/dist/components/content/text/text.js.map +1 -1
  192. package/dist/components/content/text/text.styles.d.ts.map +1 -1
  193. package/dist/components/content/text/text.styles.js +7 -155
  194. package/dist/components/content/text/text.styles.js.map +1 -1
  195. package/dist/components/content/text/text.template.d.ts +3 -2
  196. package/dist/components/content/text/text.template.d.ts.map +1 -1
  197. package/dist/components/content/text/text.template.js +3 -4
  198. package/dist/components/content/text/text.template.js.map +1 -1
  199. package/dist/components/content/title/title.d.ts +22 -7
  200. package/dist/components/content/title/title.d.ts.map +1 -1
  201. package/dist/components/content/title/title.js +43 -19
  202. package/dist/components/content/title/title.js.map +1 -1
  203. package/dist/components/content/tooltip/tooltip.d.ts.map +1 -1
  204. package/dist/components/content/tooltip/tooltip.js +8 -7
  205. package/dist/components/content/tooltip/tooltip.js.map +1 -1
  206. package/dist/components/forms/form/form.d.ts +2 -2
  207. package/dist/components/forms/form/form.d.ts.map +1 -1
  208. package/dist/components/forms/form/form.js +2 -2
  209. package/dist/components/forms/form/form.js.map +1 -1
  210. package/dist/components/forms/form-section/form-section.d.ts +2 -2
  211. package/dist/components/forms/form-section/form-section.d.ts.map +1 -1
  212. package/dist/components/forms/form-section/form-section.js +2 -2
  213. package/dist/components/forms/form-section/form-section.js.map +1 -1
  214. package/dist/components/lists-and-tables/cells/text-cell/text-cell.d.ts +24 -13
  215. package/dist/components/lists-and-tables/cells/text-cell/text-cell.d.ts.map +1 -1
  216. package/dist/components/lists-and-tables/cells/text-cell/text-cell.js +40 -31
  217. package/dist/components/lists-and-tables/cells/text-cell/text-cell.js.map +1 -1
  218. package/dist/components/lists-and-tables/cells/text-cell/text-cell.styles.d.ts.map +1 -1
  219. package/dist/components/lists-and-tables/cells/text-cell/text-cell.styles.js +5 -1
  220. package/dist/components/lists-and-tables/cells/text-cell/text-cell.styles.js.map +1 -1
  221. package/dist/components/lists-and-tables/cells/text-cell/text-cell.template.d.ts +1 -1
  222. package/dist/components/lists-and-tables/cells/text-cell/text-cell.template.d.ts.map +1 -1
  223. package/dist/components/lists-and-tables/cells/text-cell/text-cell.template.js +15 -8
  224. package/dist/components/lists-and-tables/cells/text-cell/text-cell.template.js.map +1 -1
  225. package/dist/components/lists-and-tables/cells/title-cell/title-cell.d.ts +23 -11
  226. package/dist/components/lists-and-tables/cells/title-cell/title-cell.d.ts.map +1 -1
  227. package/dist/components/lists-and-tables/cells/title-cell/title-cell.js +39 -29
  228. package/dist/components/lists-and-tables/cells/title-cell/title-cell.js.map +1 -1
  229. package/dist/components/lists-and-tables/cells/title-cell/title-cell.styles.d.ts.map +1 -1
  230. package/dist/components/lists-and-tables/cells/title-cell/title-cell.styles.js +5 -1
  231. package/dist/components/lists-and-tables/cells/title-cell/title-cell.styles.js.map +1 -1
  232. package/dist/components/lists-and-tables/cells/title-cell/title-cell.template.d.ts +1 -1
  233. package/dist/components/lists-and-tables/cells/title-cell/title-cell.template.d.ts.map +1 -1
  234. package/dist/components/lists-and-tables/cells/title-cell/title-cell.template.js +15 -16
  235. package/dist/components/lists-and-tables/cells/title-cell/title-cell.template.js.map +1 -1
  236. package/dist/components/navigation/link/link.d.ts +60 -1
  237. package/dist/components/navigation/link/link.d.ts.map +1 -1
  238. package/dist/components/navigation/link/link.js +145 -2
  239. package/dist/components/navigation/link/link.js.map +1 -1
  240. package/dist/components/navigation/link/link.styles.d.ts.map +1 -1
  241. package/dist/components/navigation/link/link.styles.js +4 -0
  242. package/dist/components/navigation/link/link.styles.js.map +1 -1
  243. package/dist/components/navigation/link/link.template.d.ts +1 -0
  244. package/dist/components/navigation/link/link.template.d.ts.map +1 -1
  245. package/dist/components/navigation/link/link.template.js +4 -1
  246. package/dist/components/navigation/link/link.template.js.map +1 -1
  247. package/dist/css/global-open-font.css +2 -0
  248. package/dist/css/global.css +2 -0
  249. package/dist/css/link.css +93 -0
  250. package/dist/css/text.css +159 -0
  251. package/dist/css/title.css +10 -10
  252. package/dist/nldd.min.js +878 -999
  253. package/dist/types/react.d.ts +9 -7
  254. package/dist/types/vue.d.ts +9 -7
  255. package/dist/utilities/custom-element.d.ts +10 -0
  256. package/dist/utilities/custom-element.d.ts.map +1 -1
  257. package/dist/utilities/custom-element.js +11 -0
  258. package/dist/utilities/custom-element.js.map +1 -1
  259. package/dist/utilities/dev-checks.d.ts +8 -0
  260. package/dist/utilities/dev-checks.d.ts.map +1 -1
  261. package/dist/utilities/dev-checks.js +36 -0
  262. package/dist/utilities/dev-checks.js.map +1 -1
  263. package/dist/utilities/dev-rules.generated.d.ts.map +1 -1
  264. package/dist/utilities/dev-rules.generated.js +37 -2
  265. package/dist/utilities/dev-rules.generated.js.map +1 -1
  266. package/dist/utilities/slot-content.d.ts +18 -7
  267. package/dist/utilities/slot-content.d.ts.map +1 -1
  268. package/dist/utilities/slot-content.js +25 -4
  269. package/dist/utilities/slot-content.js.map +1 -1
  270. package/dist/utilities/slotted-block.d.ts +20 -0
  271. package/dist/utilities/slotted-block.d.ts.map +1 -0
  272. package/dist/utilities/slotted-block.js +30 -0
  273. package/dist/utilities/slotted-block.js.map +1 -0
  274. package/lint/data.generated.json +1 -1
  275. package/lint/fix.js +43 -2
  276. package/lint/frontends.js +149 -15
  277. package/lint/linter.js +3 -2
  278. package/lint/main.js +17 -3
  279. package/lint/project.js +2 -2
  280. package/lint/rule.schema.json +2 -1
  281. package/package.json +7 -2
  282. package/dist/cdn/chunks/slot-content-BLuPqVXw.js +0 -13
  283. package/dist/cdn/chunks/text-gy-gkfSS.js +0 -406
@@ -1 +1 @@
1
- {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../../src/components/content/text/text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAQtD,KAAK,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;AAClI,KAAK,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;AAC5C,KAAK,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;AACtD,KAAK,KAAK,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;AACrF,KAAK,mBAAmB,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEvD,qBACa,QAAS,SAAQ,UAAU;IACvC,OAAgB,MAAM,0BAAc;IAGpC,IAAI,EAAE,IAAI,CAAQ;IAGlB,YAAY,SAAM;IAGlB,YAAY,SAAM;IAGlB,YAAY,SAAM;IAGlB,MAAM,EAAE,MAAM,CAAa;IAO3B,UAAU,EAAE,UAAU,CAAU;IAGhC,KAAK,EAAE,KAAK,CAAa;IAOzB,mBAAmB,EAAE,mBAAmB,CAAU;IAElD,+EAA+E;IAC/E,OAAO,CAAC,YAAY,CAA2C;IAEtD,UAAU,CAAC,OAAO,EAAE,c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AU;IAElD,+EAA+E;IAC/E,OAAO,CAAC,YAAY,CAA2C;IAEtD,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAMzC,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAQtC,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,WAAW,EAAE,QAAQ,CAAC;KACtB;CACD"}
@@ -9,6 +9,14 @@
9
9
  * — it only names what the scale already has. The three axes are the same three
10
10
  * the tokens carry: size, weight and line height.
11
11
  *
12
+ * Plain text goes in `text`, and the component draws a `<p>` for it. Text with
13
+ * a link, a `<strong>` or a tag goes in the slot, in a `<p>` of your own, or a
14
+ * `<span>` where the text is no paragraph, such as a label or a number. What
15
+ * is in the slot is in the HTML before any script runs; `text` is drawn in the
16
+ * browser. On a page of a website that has to read without script, use the
17
+ * slot. The element in the slot takes the text style of the component: a font,
18
+ * margin or other style the page sets on it does not apply.
19
+ *
12
20
  * Not for headings, which is `nldd-title`, and not for a block of prose with its
13
21
  * own rhythm, spacing and media widths, which is `nldd-rich-text`. This is one
14
22
  * run of text and nothing around it.
@@ -41,8 +49,9 @@
41
49
  * @attr {string} color - Text color: 'content' (the default) | 'secondary' | 'accent' | 'success' | 'warning' | 'critical'. Each follows the surface the text sits on, through the `--context-content-*` it passes on; an area of your own that sets `color` sets `--context-content-color` too.
42
50
  * @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.
43
51
  *
44
- * @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, `<mark>` is highlighted, `<q>` is quoted in italics, and an element with `data-mention` is a mention (`<a href="…" data-mention>` as the tinted token, `<span data-mention>` without the tint; write the name without the `@`). 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.
45
- * @accepts strong, b, em, i, a, code, mark, q, span
52
+ * @attr {string} text - The text, when it is plain text. The component draws it as a `<p>`. Content in the slot wins.
53
+ * @slot - Text that is more than plain text, in a `<p>` of your own, or a `<span>` for text that is no paragraph (a label, a number). Inline elements in it 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, `<mark>` is highlighted, `<q>` is quoted in italics, and an element with `data-mention` is a mention (`<a href="…" data-mention>` as the tinted token, `<span data-mention>` without the tint; write the name without the `@`). Components such as `nldd-tag` are left alone. That styling comes from a global stylesheet, `dist/css/text.css` or `global.css`, which includes it: a shadow root cannot reach inside a slotted element.
54
+ * @accepts p, span, strong, b, em, i, a, code, mark, q
46
55
  */
47
56
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
48
57
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -52,6 +61,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
52
61
  };
53
62
  import { LitElement } from 'lit';
54
63
  import { property } from 'lit/decorators.js';
64
+ import { SlotContent } from '../../../utilities/slot-content.js';
55
65
  import { customElement } from '../../../utilities/custom-element.js';
56
66
  import { applyCustomFontSizes, checkCustomFontSizeFloor, DISPLAY_1_FONT_SIZE } from '../../../utilities/custom-font-size.js';
57
67
  import { reflectNonDefault } from '../../../utilities/reflect-non-default.js';
@@ -60,7 +70,10 @@ import { template } from './text.template.js';
60
70
  let NLDDText = class NLDDText extends LitElement {
61
71
  constructor() {
62
72
  super(...arguments);
73
+ this.text = '';
63
74
  this.size = 'md';
75
+ /** @internal Whether the slot holds something, which wins over `text`. */
76
+ this._textSlot = new SlotContent(this);
64
77
  this.smCustomSize = '';
65
78
  this.mdCustomSize = '';
66
79
  this.lgCustomSize = '';
@@ -86,10 +99,13 @@ let NLDDText = class NLDDText extends LitElement {
86
99
  }
87
100
  }
88
101
  render() {
89
- return template();
102
+ return template.call(this);
90
103
  }
91
104
  };
92
105
  NLDDText.styles = textStyles;
106
+ __decorate([
107
+ property({ reflect: true, converter: reflectNonDefault('') })
108
+ ], NLDDText.prototype, "text", void 0);
93
109
  __decorate([
94
110
  property({ reflect: true, converter: reflectNonDefault('md') })
95
111
  ], NLDDText.prototype, "size", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"text.js","sourceRoot":"","sources":["../../../../src/components/content/text/text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAuB,MAAM,KAAK,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,mBAAmB,EAAmB,MAAM,wCAAwC,CAAC;AAC9I,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AASvC,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,UAAU;IAAjC;;QAIN,SAAI,GAAS,IAAI,CAAC;QAGlB,iBAAY,GAAG,EAAE,CAAC;QAGlB,iBAAY,GAAG,EAAE,CAAC;QAGlB,iBAAY,GAAG,EAAE,CAAC;QAGlB,WAAM,GAAW,SAAS,CAAC;QAO3B,eAAU,GAAe,MAAM,CAAC;QAGhC,UAAK,GAAU,SAAS,CAAC;QAOzB,wBAAmB,GAAwB,MAAM,CAAC;QAElD,+EAA+E;QACvE,iBAAY,GAAwC,EAAE,CAAC;IAmBhE,CAAC;IAjBS,UAAU,CAAC,OAAuB;QAC1C,KAAK,CAAC,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QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,CAAQ,SAAS,CAAC,EAAE,CAAC;uCACnD;AAOzB;IALC,QAAQ,CAAC;QACT,OAAO,EAAE,IAAI;QACb,SAAS,EAAE,sBAAsB;QACjC,SAAS,EAAE,iBAAiB,CAAsB,MAAM,CAAC;KACzD,CAAC;qDACgD;AAvCtC,QAAQ;IADpB,aAAa,CAAC,WAAW,CAAC;GACd,QAAQ,CA6DpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"text.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/content/text/text.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,KAAK,CAAC;AAoDrD,eAAO,MAAM,UAAU,WA2StB,CAAC"}
1
+ {"version":3,"file":"text.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/content/text/text.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,KAAK,CAAC;AAqDrD,eAAO,MAAM,UAAU,WAsJtB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { css, unsafeCSS } from 'lit';
2
2
  import { queryBreakpoints } from '../../../assets/styles/breakpoints.js';
3
+ import { slottedBlockReset } from '../../../assets/styles/shadow-resets.js';
3
4
  const smMax = unsafeCSS(queryBreakpoints.smMax);
4
5
  const mdMin = unsafeCSS(queryBreakpoints.mdMin);
5
6
  const mdMax = unsafeCSS(queryBreakpoints.mdMax);
@@ -66,31 +67,6 @@ export const textStyles = css `
66
67
  --_text-lg-custom-font: var(--primitives-font-weight-display-bold) max(var(--_text-lg-custom-size), var(--primitives-font-size-1000)) / var(--primitives-line-height-flat) var(--primitives-font-family-display);
67
68
  --_text-color: var(--context-content-color);
68
69
  --_text-align: left;
69
- --_text-link-color: var(--context-link-color);
70
- --_text-link-is-hovered-color: var(--context-link-is-hovered-color);
71
- --_text-link-is-active-color: var(--context-link-is-active-color);
72
- --_text-link-underline-offset: var(--primitives-space-2);
73
- --_text-link-corner-radius: var(--primitives-corner-radius-xxs);
74
- --_text-mention-color: var(--semantics-mentions-content-color);
75
- --_text-mention-icon-size: 0.95em;
76
- --_text-mention-inline-padding: 0.3em;
77
- --_text-mention-corner-radius: var(--primitives-corner-radius-sm);
78
- --_text-mention-border-width: var(--semantics-surfaces-highlight-border-width);
79
- --_text-mention-border-color: var(--semantics-mentions-highlight-border-color);
80
- --_text-mention-background-color: var(--semantics-mentions-background-color);
81
- --_text-mention-is-hovered-background-color: var(--semantics-mentions-is-hovered-background-color);
82
- --_text-mention-is-active-background-color: var(--semantics-mentions-is-active-background-color);
83
- --_text-code-padding: var(--primitives-space-2) var(--primitives-space-4);
84
- --_text-code-corner-radius: var(--semantics-controls-xs-corner-radius);
85
- --_text-code-border-width: var(--semantics-surfaces-highlight-border-width);
86
- --_text-code-border-color: var(--semantics-surfaces-tinted-highlight-border-color);
87
- --_text-code-background-color: var(--semantics-surfaces-tinted-background-color);
88
- --_text-code-font-family: var(--primitives-font-family-monospace);
89
- --_text-code-font-size: var(--semantics-code-inline-font-size);
90
- --_text-mark-padding: var(--primitives-space-1) var(--primitives-space-2);
91
- --_text-mark-corner-radius: var(--semantics-controls-xs-corner-radius);
92
- --_text-mark-background-color: var(--semantics-content-mark-background-color);
93
- --_text-mark-color: var(--semantics-content-mark-color);
94
70
 
95
71
  display: block;
96
72
  max-width: var(--_text-max-width);
@@ -160,140 +136,16 @@ export const textStyles = css `
160
136
  --_text-font-weight: var(--primitives-font-weight-body-bold);
161
137
  }
162
138
 
163
- /* Not the browser's "bolder", which is relative: from medium it lands on 700
164
- and from bold it asks for a weight this font does not have, so the browser
165
- thickens the glyphs itself. */
166
- ::slotted(strong),
167
- ::slotted(b) {
168
- color: inherit;
169
- font-weight: var(--primitives-font-weight-body-bold);
170
- }
171
-
172
- :host([size^="display-"]) ::slotted(strong),
173
- :host([size^="display-"]) ::slotted(b) {
174
- font-weight: inherit;
175
- }
176
-
177
-
178
- /* # Inline elements */
179
-
180
- ::slotted(em),
181
- ::slotted(i) {
182
- color: inherit;
183
- font-style: italic;
184
- }
185
-
186
- ::slotted(a) {
187
- border-radius: var(--_text-link-corner-radius);
188
- --context-content-color: var(--_text-link-color);
189
- color: var(--_text-link-color);
190
- text-decoration: underline;
191
- text-underline-offset: var(--_text-link-underline-offset);
192
- cursor: pointer;
193
- }
194
-
195
- ::slotted(a:hover) {
196
- --context-content-color: var(--_text-link-is-hovered-color);
197
- color: var(--_text-link-is-hovered-color);
198
- }
199
-
200
- ::slotted(a:active) {
201
- --context-content-color: var(--_text-link-is-active-color);
202
- color: var(--_text-link-is-active-color);
203
- }
204
-
205
- ::slotted(:focus-visible) {
206
- outline: var(--semantics-focus-ring-outline);
207
- outline-offset: var(--semantics-focus-ring-outline-offset);
208
- box-shadow: var(--semantics-focus-ring-box-shadow);
209
- }
210
-
211
- ::slotted(:focus:not(:focus-visible)) {
212
- outline: none;
213
- }
214
-
215
- ::slotted([data-mention]) {
216
- --context-content-color: var(--_text-mention-color);
217
- color: var(--_text-mention-color);
218
- font-weight: var(--primitives-font-weight-body-bold);
219
- white-space: nowrap;
220
- }
221
-
222
- ::slotted([data-mention])::before {
223
- content: '';
224
- display: inline-block;
225
- margin-inline-end: 0.1em;
226
- background-color: currentColor;
227
- width: var(--_text-mention-icon-size);
228
- height: var(--_text-mention-icon-size);
229
- vertical-align: -0.16em;
230
- mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16 12c0 2.73 1.3 3.5 2 3.5s2-.77 2-3.5a8 8 0 1 0-5.93 7.73l.52 1.93A10 10 0 1 1 22 12c0 3.27-1.7 5.5-4 5.5-1.36 0-2.5-.78-3.22-2.08A4.3 4.3 0 0 1 11.5 17C9 17 7 14.76 7 12s2-5 4.5-5c.92 0 1.78.31 2.5.84V7h2zm-4.5-3C10.3 9 9 10.14 9 12s1.31 3 2.5 3 2.5-1.14 2.5-3-1.31-3-2.5-3'/%3E%3C/svg%3E") center / contain no-repeat;
231
-
232
- @media (forced-colors: active) {
233
- forced-color-adjust: none;
234
- background-color: CanvasText;
235
- }
236
- }
237
-
238
- ::slotted(a[data-mention]) {
239
- padding-block: max(0em, (1lh - 1.2em) / 2);
240
- padding-inline: max(0em, (max(1.2em, 1lh) - var(--_text-mention-icon-size)) / 2) var(--_text-mention-inline-padding);
241
- border-radius: var(--_text-mention-corner-radius);
242
- box-shadow: inset 0 0 0 var(--_text-mention-border-width) var(--_text-mention-border-color);
243
- background-color: var(--_text-mention-background-color);
244
- --context-content-color: var(--_text-mention-color);
245
- color: var(--_text-mention-color);
246
- text-decoration: none;
247
- cursor: default;
248
- -webkit-box-decoration-break: clone;
249
- box-decoration-break: clone;
250
- }
251
-
252
- ::slotted(a[data-mention]:hover) {
253
- background-color: var(--_text-mention-is-hovered-background-color);
254
- --context-content-color: var(--_text-mention-color);
255
- color: var(--_text-mention-color);
256
- }
257
-
258
- ::slotted(a[data-mention]:active) {
259
- background-color: var(--_text-mention-is-active-background-color);
260
- --context-content-color: var(--_text-mention-color);
261
- color: var(--_text-mention-color);
262
- }
263
139
 
264
- @media (forced-colors: active) {
265
- ::slotted(a[data-mention])::before {
266
- background-color: LinkText;
267
- }
268
- }
269
-
270
- ::slotted(code) {
271
- border-radius: var(--_text-code-corner-radius);
272
- box-shadow: inset 0 0 0 var(--_text-code-border-width) var(--_text-code-border-color);
273
- background-color: var(--_text-code-background-color);
274
- padding: var(--_text-code-padding);
275
- font-family: var(--_text-code-font-family);
276
- font-size: var(--_text-code-font-size);
277
- }
278
-
279
- ::slotted(q) {
280
- font-style: italic;
281
- }
282
-
283
- ::slotted(q)::before {
284
- content: open-quote;
285
- }
140
+ /* # Slot */
286
141
 
287
- ::slotted(q)::after {
288
- content: close-quote;
142
+ ::slotted(:is(p, span)) {
143
+ ${slottedBlockReset}
289
144
  }
290
145
 
291
- ::slotted(mark) {
292
- border-radius: var(--_text-mark-corner-radius);
293
- background-color: var(--_text-mark-background-color);
294
- padding: var(--_text-mark-padding);
295
- --context-content-color: var(--_text-mark-color);
296
- color: var(--_text-mark-color);
146
+ .text {
147
+ margin: 0;
148
+ font: inherit;
297
149
  }
298
150
 
299
151
 
@@ -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,SAAS,EAAkB,MAAM,KAAK,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAEzE,MAAM,KAAK,GAAG,SAAS,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;AAChD,MAAM,KAAK,GAAG,SAAS,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;AAChD,MAAM,KAAK,GAAG,SAAS,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;AAChD,MAAM,KAAK,GAAG,SAAS,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;AAEhD,iHAAiH;AACjH,MAAM,iBAAiB,GAAG,CAAC,IAAY,EAAE,EAAU,EAAE,EAAU,EAAE,EAAU,EAAa,EAAE,CAAC,GAAG,CAAA;GAC3F,SAAS,CAAC,IAAI,CAAC;uBACK,KAAK;mBACT,SAAS,CAAC,EAAE,CAAC;;;uBAGT,KAAK,qBAAqB,KAAK;mBACnC,SAAS,CAAC,EAAE,CAAC;;;uBAGT,KAAK;mBACT,SAAS,CAAC,EAAE,CAAC;;;4CAGY,KAAK;mBAC9B,SAAS,CAAC,EAAE,CAAC;;;4CAGY,KAAK,qBAAqB,KAAK;mBACxD,SAAS,CAAC,EAAE,CAAC;;;4CAGY,KAAK;mBAC9B,SAAS,CAAC,EAAE,CAAC;;;CAG/B,CAAC;AAEF,mEAAmE;AACnE,MAAM,MAAM,GAAG,CAAC,IAAY,EAAE,KAAgB,EAAE,cAAyB,EAAE,IAAY,EAAa,EAAE,CAAC,GAAG,C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ACG,SAAS,CAAC,IAAI,CAAC;;;gCAGF,cAAc;mBAC3B,SAAS,CAAC,IAAI,CAAC;;;CAGjC,CAAC;AAEF,MAAM,aAAa,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAEzC,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuD1B,SAAS,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,wBAAwB,CAAC,KAAK,EAAE,iCAAiC,CAAC,MAAM,EAAE,iCAAiC,CAAC,MAAM,EAAE,iCAAiC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;;;;GAIvO,MAAM,CAAC,8BAA8B,EAAE,GAAG,CAAA,eAAe,KAAK,GAAG,EAAE,GAAG,CAAA,eAAe,KAAK,GAAG,EAAE,6BAA6B,CAAC;GAC7H,MAAM,CAAC,8BAA8B,EAAE,GAAG,CAAA,eAAe,KAAK,qBAAqB,KAAK,GAAG,EAAE,GAAG,CAAA,eAAe,KAAK,qBAAqB,KAAK,GAAG,EAAE,6BAA6B,CAAC;GACjL,MAAM,CAAC,8BAA8B,EAAE,GAAG,CAAA,eAAe,KAAK,GAAG,EAAE,GAAG,CAAA,eAAe,KAAK,GAAG,EAAE,6BAA6B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiC5H,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDpB,CAAC"}
@@ -1,3 +1,4 @@
1
- import { TemplateResult } from 'lit';
2
- export declare function template(): TemplateResult;
1
+ import { type TemplateResult } from 'lit';
2
+ import type { NLDDText } from './text.js';
3
+ export declare function template(this: NLDDText): TemplateResult;
3
4
  //# sourceMappingURL=text.template.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"text.template.d.ts","sourceRoot":"","sources":["../../../../src/components/content/text/text.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,cAAc,EAAE,MAAM,KAAK,CAAC;AAE3C,wBAAgB,QAAQ,IAAI,cAAc,CAIzC"}
1
+ {"version":3,"file":"text.template.d.ts","sourceRoot":"","sources":["../../../../src/components/content/text/text.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C,wBAAgB,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,cAAc,CAGvD"}
@@ -1,7 +1,6 @@
1
- import { html } from 'lit';
1
+ import { html, nothing } from 'lit';
2
2
  export function template() {
3
- return html `
4
- <slot></slot>
5
- `;
3
+ // What is in the slot wins; `text` shows while it is empty.
4
+ return html `${this.text && !this._textSlot.has ? html `<p class="text">${this.text}</p>` : nothing}<slot @slotchange=${this._textSlot.onChange}></slot>`;
6
5
  }
7
6
  //# sourceMappingURL=text.template.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"text.template.js","sourceRoot":"","sources":["../../../../src/components/content/text/text.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAC;AAE3C,MAAM,UAAU,QAAQ;IACvB,OAAO,IAAI,CAAA;;EAEV,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"text.template.js","sourceRoot":"","sources":["../../../../src/components/content/text/text.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAC;AAGzD,MAAM,UAAU,QAAQ;IACvB,4DAA4D;IAC5D,OAAO,IAAI,CAAA,GAAG,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAA,mBAAmB,IAAI,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,OAAO,qBAAqB,IAAI,CAAC,SAAS,CAAC,QAAQ,UAAU,CAAC;AACzJ,CAAC"}
@@ -13,12 +13,21 @@
13
13
  * and shows as body text, whatever its `size`: give it a level, or for large
14
14
  * letters that are not a heading use nldd-text with a display size.
15
15
  * `overline` and `supporting-text` go above and below it. Each of the three
16
- * has a slot in the same place for content that is more than text, and a
17
- * filled slot takes the place of the attribute. Both grow and shrink with the
16
+ * has a slot in the same place for content that is more than text. The slot
17
+ * takes the element the attribute draws: a heading, or a `<p>` for a title
18
+ * that is no heading, and a `<p>` for the overline and the supporting text.
19
+ * Put inline markup inside that element. A filled slot takes the place of the
20
+ * attribute. Each of the three chooses for itself, so a heading in the slot can
21
+ * go with plain `supporting-text`. Both grow and shrink with the
18
22
  * size of the title, and keep to the width of a line of reading (40em), with
19
23
  * balanced lines. The supporting text is a line or two, not a paragraph.
20
24
  *
21
- * Inline elements in a slotted heading (a link, strong, em, code, mark, q) look
25
+ * What is in a slot is in the HTML the server sends; what comes from an
26
+ * attribute is drawn in the browser. On a page of a website, which search
27
+ * engines, link previews and reader mode read without script, put the heading
28
+ * in the default slot. In an application `text` with `heading-level` is enough.
29
+ *
30
+ * Inline elements in a slotted heading or `<p>` (a link, strong, em, code, mark, q) look
22
31
  * as they do in nldd-text. A shadow root cannot reach inside a slotted element,
23
32
  * so that styling comes from a global stylesheet: `dist/css/title.css`, or
24
33
  * `global.css`, which includes it.
@@ -42,10 +51,10 @@
42
51
  * @attr {string} overline - Text above the title. Content in the overline slot takes its place.
43
52
  * @attr {1|2|3|4|5|6} heading-level - Renders text as h1–h6, and sets the default size. Absent renders a p in body text, unless the default slot brings its own heading.
44
53
  *
45
- * @slot overline - Overline that is more than text. Takes the place of the overline attribute.
46
- * @slot - Title that is more than text, such as a link. Takes the place of text, and brings its own h1–h6 for semantics.
47
- * @accepts h1, h2, h3, h4, h5, h6, a, strong, b, em, i, code, mark, q
48
- * @slot supporting-text - Supporting text that is more than text. Takes the place of the supporting-text attribute.
54
+ * @slot overline - Overline that is more than text, in a `<p>` of its own as the attribute draws it. Takes the place of the overline attribute.
55
+ * @slot - A heading (`h1`–`h6`) of your own for a title that is more than text, such as a link, or a `<p>` for a title that is no heading. Takes the place of text.
56
+ * @accepts h1, h2, h3, h4, h5, h6, p, a, strong, b, em, i, code, mark, q
57
+ * @slot supporting-text - Supporting text that is more than text, in a `<p>` of its own as the attribute draws it. Takes the place of the supporting-text attribute.
49
58
  * @slot end - One thing 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. More than one action goes in an nldd-toolbar below the title, not in this slot: the line has no room for a row of buttons on a narrow screen, and a toolbar moves what does not fit to its overflow menu.
50
59
  */
51
60
  import { LitElement, type PropertyValues } from 'lit';
@@ -69,8 +78,14 @@ export declare class NLDDTitle extends LitElement {
69
78
  _hasSupportingTextSlotted: boolean;
70
79
  /** @internal The level of a heading in the default slot. */
71
80
  _slottedLevel: HeadingLevel | null;
81
+ private _looseText;
72
82
  /** @internal */
73
83
  _onSlotChange: (e: Event) => void;
84
+ /** Reads the children as the title connects, so the first render already
85
+ * knows the level of a slotted heading and leaves out the attribute a slot
86
+ * replaces. */
87
+ connectedCallback(): void;
88
+ private _readSlot;
74
89
  /** The valid custom size per breakpoint, worked out before the first paint. */
75
90
  private _customSizes;
76
91
  willUpdate(changed: PropertyValues): void;
@@ -1 +1 @@
1
- {"version":3,"file":"title.d.ts","sourceRoot":"","sources":["../../../../src/components/content/title/title.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAQtD,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,G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C,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAE1C,qBACa,SAAU,SAAQ,UAAU;IACxC,OAAgB,MAAM,0BAAe;IAGrC,IAAI,CAAC,EAAE,SAAS,CAAC;IAGjB,YAAY,SAAM;IAGlB,YAAY,SAAM;IAGlB,YAAY,SAAM;IAGlB,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;IAC3C,4DAA4D;IACnD,aAAa,EAAE,YAAY,GAAG,IAAI,CAAQ;IACnD,OAAO,CAAC,UAAU,CAAuB;IAEzC,gBAAgB;IAChB,aAAa,GAAI,GAAG,KAAK,KAAG,IAAI,CAG9B;IAEF;;oBAEgB;IACP,iBAAiB,IAAI,IAAI;IAKlC,OAAO,CAAC,SAAS;IAcjB,+EAA+E;IAC/E,OAAO,CAAC,YAAY,CAA2C;IAEtD,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAUzC,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAQtC,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,YAAY,EAAE,SAAS,CAAC;KACxB;CACD"}
@@ -19,12 +19,21 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
19
19
  * and shows as body text, whatever its `size`: give it a level, or for large
20
20
  * letters that are not a heading use nldd-text with a display size.
21
21
  * `overline` and `supporting-text` go above and below it. Each of the three
22
- * has a slot in the same place for content that is more than text, and a
23
- * filled slot takes the place of the attribute. Both grow and shrink with the
22
+ * has a slot in the same place for content that is more than text. The slot
23
+ * takes the element the attribute draws: a heading, or a `<p>` for a title
24
+ * that is no heading, and a `<p>` for the overline and the supporting text.
25
+ * Put inline markup inside that element. A filled slot takes the place of the
26
+ * attribute. Each of the three chooses for itself, so a heading in the slot can
27
+ * go with plain `supporting-text`. Both grow and shrink with the
24
28
  * size of the title, and keep to the width of a line of reading (40em), with
25
29
  * balanced lines. The supporting text is a line or two, not a paragraph.
26
30
  *
27
- * Inline elements in a slotted heading (a link, strong, em, code, mark, q) look
31
+ * What is in a slot is in the HTML the server sends; what comes from an
32
+ * attribute is drawn in the browser. On a page of a website, which search
33
+ * engines, link previews and reader mode read without script, put the heading
34
+ * in the default slot. In an application `text` with `heading-level` is enough.
35
+ *
36
+ * Inline elements in a slotted heading or `<p>` (a link, strong, em, code, mark, q) look
28
37
  * as they do in nldd-text. A shadow root cannot reach inside a slotted element,
29
38
  * so that styling comes from a global stylesheet: `dist/css/title.css`, or
30
39
  * `global.css`, which includes it.
@@ -48,14 +57,16 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
48
57
  * @attr {string} overline - Text above the title. Content in the overline slot takes its place.
49
58
  * @attr {1|2|3|4|5|6} heading-level - Renders text as h1–h6, and sets the default size. Absent renders a p in body text, unless the default slot brings its own heading.
50
59
  *
51
- * @slot overline - Overline that is more than text. Takes the place of the overline attribute.
52
- * @slot - Title that is more than text, such as a link. Takes the place of text, and brings its own h1–h6 for semantics.
53
- * @accepts h1, h2, h3, h4, h5, h6, a, strong, b, em, i, code, mark, q
54
- * @slot supporting-text - Supporting text that is more than text. Takes the place of the supporting-text attribute.
60
+ * @slot overline - Overline that is more than text, in a `<p>` of its own as the attribute draws it. Takes the place of the overline attribute.
61
+ * @slot - A heading (`h1`–`h6`) of your own for a title that is more than text, such as a link, or a `<p>` for a title that is no heading. Takes the place of text.
62
+ * @accepts h1, h2, h3, h4, h5, h6, p, a, strong, b, em, i, code, mark, q
63
+ * @slot supporting-text - Supporting text that is more than text, in a `<p>` of its own as the attribute draws it. Takes the place of the supporting-text attribute.
55
64
  * @slot end - One thing 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. More than one action goes in an nldd-toolbar below the title, not in this slot: the line has no room for a row of buttons on a narrow screen, and a toolbar moves what does not fit to its overflow menu.
56
65
  */
57
66
  import { LitElement } from 'lit';
58
67
  import { property, state } from 'lit/decorators.js';
68
+ import { LooseText } from '../../../utilities/slotted-block.js';
69
+ import { holdsContent, slottedNodes } from '../../../utilities/slot-content.js';
59
70
  import { customElement } from '../../../utilities/custom-element.js';
60
71
  import { reflectNonDefault } from '../../../utilities/reflect-non-default.js';
61
72
  import { titleStyles } from './title.styles.js';
@@ -79,25 +90,38 @@ let NLDDTitle = class NLDDTitle extends LitElement {
79
90
  this._hasSupportingTextSlotted = false;
80
91
  /** @internal The level of a heading in the default slot. */
81
92
  this._slottedLevel = null;
93
+ this._looseText = new LooseText(this);
82
94
  /** @internal */
83
95
  this._onSlotChange = (e) => {
84
96
  const slot = e.target;
85
- // Whitespace between the tags is not content: without this check the text
86
- // would vanish behind a slot that only holds a newline.
87
- const hasContent = slot.assignedNodes().some((node) => node.nodeType === Node.ELEMENT_NODE || (node.textContent ?? '').trim().length > 0);
88
- if (slot.name === 'overline')
89
- this._hasOverlineSlotted = hasContent;
90
- else if (slot.name === 'supporting-text')
91
- this._hasSupportingTextSlotted = hasContent;
92
- else {
93
- this._hasDefaultSlotted = hasContent;
94
- const heading = slot.assignedElements().find((el) => /^H[1-6]$/.test(el.tagName));
95
- this._slottedLevel = heading ? Number(heading.tagName[1]) : null;
96
- }
97
+ this._readSlot(slot.name, slot.assignedNodes());
97
98
  };
98
99
  /** The valid custom size per breakpoint, worked out before the first paint. */
99
100
  this._customSizes = {};
100
101
  }
102
+ /** Reads the children as the title connects, so the first render already
103
+ * knows the level of a slotted heading and leaves out the attribute a slot
104
+ * replaces. */
105
+ connectedCallback() {
106
+ super.connectedCallback();
107
+ for (const name of ['overline', '', 'supporting-text'])
108
+ this._readSlot(name, slottedNodes(this, name));
109
+ }
110
+ _readSlot(name, nodes) {
111
+ this._looseText.read(name, nodes);
112
+ // Whitespace between the tags is not content: without this check the text
113
+ // would vanish behind a slot that only holds a newline.
114
+ const hasContent = holdsContent(nodes);
115
+ if (name === 'overline')
116
+ this._hasOverlineSlotted = hasContent;
117
+ else if (name === 'supporting-text')
118
+ this._hasSupportingTextSlotted = hasContent;
119
+ else {
120
+ this._hasDefaultSlotted = hasContent;
121
+ const heading = nodes.find((node) => node instanceof Element && /^H[1-6]$/.test(node.tagName));
122
+ this._slottedLevel = heading ? Number(heading.tagName[1]) : null;
123
+ }
124
+ }
101
125
  willUpdate(changed) {
102
126
  super.willUpdate(changed);
103
127
  // The level the styles size by: the attribute, or the slotted heading.
@@ -1 +1 @@
1
- {"version":3,"file":"title.js","sourceRoot":"","sources":["../../../../src/components/content/title/title.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,OAAO,EAAE,UAAU,EAAuB,MAAM,KAAK,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,mBAAmB,EAAmB,MAAM,wCAAwC,CAAC;AAMvI,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,UAAU;IAAlC;;QAON,iBAAY,GAAG,EAAE,CAAC;QAGlB,iBAAY,GAAG,EAAE,CAAC;QAGlB,iBAAY,GAAG,EAAE,CAAC;QAGlB,SAAI,GAAG,EAAE,CAAC;QAGV,mBAAc,GAAG,EAAE,CAAC;QAGpB,aAAQ,GAAG,EAAE,CAAC;QAGd,iBAAY,GAAwB,IAAI,CAAC;QAEzC,gBAAgB;QACP,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,CAAC,gBAAgB,CAAqC;IAC7D,wGAAwG;IACxG,OAAO,CAAC,qBAAqB,CAA+E;IAC5G,OAAO,CAAC,gBAAgB,CAAK;IAC7B;qFACiF;IACjF,OAAO,CAAC,aAAa,CAAS;IAErB,iBAAiB,IAAI,IAAI;IAYzB,YAAY,IAAI,IAAI;IAIpB,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAiE/C,OAAO,CAAC,oBAAoB;IAyD5B,OAAO,CAAC,kBAAkB;IAM1B,OAAO,CAAC,kBAAkB;IAI1B;0BACsB;IACtB,OAAO,KAAK,WAAW,GAEtB;IAED,mBAAmB,IAAI,IAAI;IAiC3B,cAAc,IAAI,IAAI;IAqBtB,mBAAmB,IAAI,IAAI;IAkB3B,4EAA4E;IAC5E,eAAe,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;IAiBpC,sBAAsB,IAAI,IAAI;IAa9B,mBAAmB,IAAI,IAAI;IAO3B,mBAAmB,IAAI,IAAI;IAI3B;;6EAEyE;IACzE,OAAO,CAAC,aAAa,CAUnB;IAEF,OAAO,CAAC,cAAc,CA6BpB;YAEY,eAAe;IAoDpB,oBAAoB,IAAI,IAAI;IAoB5B,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,cAAc,EAAE,WAAW,CAAC;KAC5B;CACD"}
@@ -69,12 +69,13 @@ import { ShortcutAvailabilityController, shortcutLabel } from '../../../utilitie
69
69
  import '../keyboard-shortcut/keyboard-shortcut.js';
70
70
  import { carryContext } from '../../../utilities/carried-context.js';
71
71
  let tooltipCounter = 0;
72
- const coarsePointerQuery = matchMedia('(pointer: coarse)');
72
+ // On a server there is no matchMedia; a tooltip only shows in a browser anyway.
73
+ const coarsePointerQuery = typeof matchMedia === 'function' ? matchMedia('(pointer: coarse)') : null;
73
74
  // Defaults mirror the values in tooltip.styles.ts. Used as fallback when the
74
- // CSS variable is unset or non-numeric — most often in SSR / early-load
75
- // environments where styles haven't reached the element yet. Without the
76
- // fallback, parseInt('') returns NaN and setTimeout silently coerces it to
77
- // 0ms, so the tooltip would show instantly. Keep these in sync with CSS.
75
+ // CSS variable is unset or non-numeric, most often while the styles have not
76
+ // reached the element yet. Without the fallback, parseInt('') returns NaN and
77
+ // setTimeout silently coerces it to 0ms, so the tooltip would show instantly.
78
+ // Keep these in sync with CSS.
78
79
  const DEFAULT_SHOW_DELAY_MS = 700;
79
80
  const DEFAULT_HIDE_DELAY_MS = 50;
80
81
  let NLDDTooltip = class NLDDTooltip extends LitElement {
@@ -311,7 +312,7 @@ let NLDDTooltip = class NLDDTooltip extends LitElement {
311
312
  this._syncAriaDescribedBy();
312
313
  if (!this._hasContent)
313
314
  return;
314
- if (coarsePointerQuery.matches)
315
+ if (coarsePointerQuery?.matches)
315
316
  return;
316
317
  if (this._hideTimeout) {
317
318
  clearTimeout(this._hideTimeout);
@@ -450,7 +451,7 @@ let NLDDTooltip = class NLDDTooltip extends LitElement {
450
451
  // center of the trigger, whatever the trigger's size. Unset, nothing changes.
451
452
  const gap = parseInt(styles.getPropertyValue('--_tooltip-offset'), 10);
452
453
  const fingertip = parseFloat(styles.getPropertyValue('--context-tooltip-fingertip-size'));
453
- const distance = coarsePointerQuery.matches && Number.isFinite(fingertip)
454
+ const distance = coarsePointerQuery?.matches && Number.isFinite(fingertip)
454
455
  ? ({ placement, rects }) => {
455
456
  const across = /^(top|bottom)/.test(placement) ? rects.reference.height : rects.reference.width;
456
457
  return Math.max(gap, (fingertip - across) / 2);