@nldd/design-system 0.23.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 (445) hide show
  1. package/custom-elements.json +1286 -47
  2. package/dist/assets/styles/scroll-fade.d.ts +13 -0
  3. package/dist/assets/styles/scroll-fade.d.ts.map +1 -0
  4. package/dist/assets/styles/scroll-fade.js +53 -0
  5. package/dist/assets/styles/scroll-fade.js.map +1 -0
  6. package/dist/assets/styles/shadow-resets.d.ts +9 -0
  7. package/dist/assets/styles/shadow-resets.d.ts.map +1 -1
  8. package/dist/assets/styles/shadow-resets.js +13 -0
  9. package/dist/assets/styles/shadow-resets.js.map +1 -1
  10. package/dist/cdn/autoloader.js +137 -136
  11. package/dist/cdn/chunks/{activity-indicator-D86Mv6SL.js → activity-indicator-Dc6c9HtC.js} +12 -12
  12. package/dist/cdn/chunks/{avatar-BISv6tzp.js → avatar-CHXRpWWk.js} +17 -17
  13. package/dist/cdn/chunks/{avatar-group-D7IN6DxU.js → avatar-group-B76E8oC6.js} +20 -20
  14. package/dist/cdn/chunks/{badge-R3PZUsqZ.js → badge-tO7gHhdi.js} +5 -5
  15. package/dist/cdn/chunks/{banner-DRANlf5k.js → banner-D4kFQYXF.js} +15 -15
  16. package/dist/cdn/chunks/{bar-split-view-B-Y2nqgS.js → bar-split-view-C9bYdWSR.js} +7 -7
  17. package/dist/cdn/chunks/{blockquote-pUgJLPY1.js → blockquote-DRJajjBB.js} +9 -9
  18. package/dist/cdn/chunks/{box-BbXHpBQy.js → box-D10mS19t.js} +3 -3
  19. package/dist/cdn/chunks/{breadcrumbs-BdF4m3DB.js → breadcrumbs-BUdQJG3z.js} +6 -6
  20. package/dist/cdn/chunks/{button-CsqNHH3w.js → button-CwY9fWCg.js} +61 -48
  21. package/dist/cdn/chunks/{button-bar-CnYIw4fN.js → button-bar-DkqbRvff.js} +30 -30
  22. package/dist/cdn/chunks/{button-group-xaHghyon.js → button-group-p364JgTR.js} +2 -2
  23. package/dist/cdn/chunks/{card-Bbf0aCIh.js → card-B7TaSaw7.js} +9 -9
  24. package/dist/cdn/chunks/{cell-Dggt5oYG.js → cell-BTIpXf1T.js} +6 -6
  25. package/dist/cdn/chunks/{checkbox-DmFAS8ec.js → checkbox-BLEK0rAV.js} +4 -4
  26. package/dist/cdn/chunks/{checkbox-field-fOWPH8Q7.js → checkbox-field-CDtlpN-u.js} +5 -5
  27. package/dist/cdn/chunks/{class-map-BWGTUNv4.js → class-map-5WYS_nCb.js} +1 -1
  28. package/dist/cdn/chunks/{code-editor-CANFZX66.js → code-editor-CanGMLIo.js} +5 -5
  29. package/dist/cdn/chunks/{code-viewer-C_vUEx7J.js → code-viewer-DCZ3wjMd.js} +29 -21
  30. package/dist/cdn/chunks/{codemirror-input-wexTiqWw.js → codemirror-input-CtvDBy25.js} +4 -4
  31. package/dist/cdn/chunks/{collection-_emTry5U.js → collection-D8K79X0H.js} +20 -20
  32. package/dist/cdn/chunks/{combo-box-CGwj1u4a.js → combo-box-BeWoeEY8.js} +25 -25
  33. package/dist/cdn/chunks/{container-D5Dz-j6a.js → container-Be2J-GhB.js} +48 -48
  34. package/dist/cdn/chunks/{custom-element-DbwbPetH.js → custom-element-DGlHv_OV.js} +4 -2
  35. package/dist/cdn/chunks/{date-field-ChmyLtTj.js → date-field-BLaGVd4x.js} +29 -29
  36. package/dist/cdn/chunks/{date-field.i18n-BTzc0E9a.js → date-field.i18n-BqIx3eyr.js} +1 -1
  37. package/dist/cdn/chunks/{date-picker-CUQKdjS4.js → date-picker-C4mLZKWF.js} +16 -16
  38. package/dist/cdn/chunks/{decorate-_JGq4E_7.js → decorate-Czy-wI4F.js} +1 -1
  39. package/dist/cdn/chunks/{described-by-mixin-DbnuGktP.js → described-by-mixin-fLi4Nmt7.js} +6 -3
  40. package/dist/cdn/chunks/{description-cell-BgcO7ObI.js → description-cell-aQyLX0U0.js} +6 -6
  41. package/dist/cdn/chunks/{dev-checks-KAnKlxY0.js → dev-checks-qTR6tciJ.js} +140 -33
  42. package/dist/cdn/chunks/{dist-HgRt6IKh.js → dist-BLnIbkqH.js} +1 -1
  43. package/dist/cdn/chunks/{dist-DADIyiX-.js → dist-BNS6C8sP.js} +2 -2
  44. package/dist/cdn/chunks/{dist-CLKJ5z0x.js → dist-B_fXtXqM.js} +1 -1
  45. package/dist/cdn/chunks/{dist-CKZ98PMy.js → dist-CX0g6sV1.js} +3 -3
  46. package/dist/cdn/chunks/{dist-CJLBwJx0.js → dist-CZOXq9aZ.js} +1 -1
  47. package/dist/cdn/chunks/{dist-CBnQQ6kV.js → dist-CdF0c6UD.js} +2 -2
  48. package/dist/cdn/chunks/{dist-BJrN5nEM.js → dist-DHK9tNd7.js} +1 -1
  49. package/dist/cdn/chunks/{dist-BF9euKgj.js → dist-WQv_JUmB.js} +2 -2
  50. package/dist/cdn/chunks/{dist-D7Wubc1l.js → dist-_QFa91Kz.js} +1 -1
  51. package/dist/cdn/chunks/{dist-Bz3Isx60.js → dist-fDpuYq7K.js} +1 -1
  52. package/dist/cdn/chunks/{dist-BHMubC6P.js → dist-p1FcXq9E.js} +3 -3
  53. package/dist/cdn/chunks/{divider-pO5O6wL4.js → divider-2hHcSIga.js} +2 -2
  54. package/dist/cdn/chunks/{document-tab-bar-C_-iuaUc.js → document-tab-bar-CIWiZUB5.js} +18 -18
  55. package/dist/cdn/chunks/{dropdown-DYO6049g.js → dropdown-Bwn6dQrK.js} +5 -5
  56. package/dist/cdn/chunks/{file-field-C-Fk92rD.js → file-field-CtQ6Fzkj.js} +25 -25
  57. package/dist/cdn/chunks/{form-actions-DrOX7nX8.js → form-actions-DSL0qce-.js} +3 -3
  58. package/dist/cdn/chunks/{form-field-CR2Py09O.js → form-field--t3Bz1pc.js} +7 -7
  59. package/dist/cdn/chunks/{form-section-s1mkLzaC.js → form-section-D1n8Sdmt.js} +16 -16
  60. package/dist/cdn/chunks/{form-ChXBrKw6.js → form-vSM2SOrK.js} +10 -10
  61. package/dist/cdn/chunks/{full-bleed-section-vOVI_f86.js → full-bleed-section-w2pDVC5v.js} +4 -4
  62. package/dist/cdn/chunks/{hero-Cb3qIvvh.js → hero-BypUmnRi.js} +22 -22
  63. package/dist/cdn/chunks/{icon-DBhTZrnl.js → icon-BydOAoVO.js} +7 -7
  64. package/dist/cdn/chunks/{icon-button-bDuQ_6W_.js → icon-button-C_MZ-jXt.js} +56 -43
  65. package/dist/cdn/chunks/{icon-cell-DlSZNTF3.js → icon-cell-jiYNsV84.js} +6 -6
  66. package/dist/cdn/chunks/{identity-CJTVNI9J.js → identity-D1Sw6OdG.js} +55 -39
  67. package/dist/cdn/chunks/{if-defined-28B8DYUB.js → if-defined-pKQLIQvK.js} +1 -1
  68. package/dist/cdn/chunks/{image-DlTxyeL3.js → image-DEI0hogS.js} +20 -20
  69. package/dist/cdn/chunks/{inline-dialog-BJlOrD6M.js → inline-dialog-CTjJ8Tl_.js} +15 -15
  70. package/dist/cdn/chunks/interest-controller-Ban-3NrX.js +117 -0
  71. package/dist/cdn/chunks/{just-in-time-education-DWBDshKs.js → just-in-time-education-pUUxdKPR.js} +5 -5
  72. package/dist/cdn/chunks/{kanban-DIXY8FcZ.js → kanban-KSLBcCb4.js} +9 -9
  73. package/dist/cdn/chunks/{kanban-column-DmnxctX6.js → kanban-column-RNSdiBIT.js} +8 -8
  74. package/dist/cdn/chunks/{keyboard-shortcut-kYOKwBqs.js → keyboard-shortcut-D9TYAQu1.js} +3 -3
  75. package/dist/cdn/chunks/{languages-DGtcUhLc.js → languages-DGZO3jTf.js} +12 -12
  76. package/dist/cdn/chunks/{link-DhnhhTOg.js → link-C4K1qVcb.js} +88 -24
  77. package/dist/cdn/chunks/{link-group-Bx2nkQcS.js → link-group-BEYO7nTK.js} +2 -2
  78. package/dist/cdn/chunks/{list-item-CSNBaRlK.js → list-item-CotWNKc1.js} +19 -19
  79. package/dist/cdn/chunks/{list-item-segment-D6WvAh3A.js → list-item-segment-C-yl2GAS.js} +15 -15
  80. package/dist/cdn/chunks/{list-CXCG_IEc.js → list-rMBdnf1f.js} +15 -15
  81. package/dist/cdn/chunks/{menu-bar-xahTEYTX.js → menu-bar-D9IxDwC2.js} +10 -10
  82. package/dist/cdn/chunks/{menu-bar-item-C950rfSt.js → menu-bar-item-768OWJdt.js} +18 -18
  83. package/dist/cdn/chunks/{menu-divider-XlYJ4zQz.js → menu-divider-BHAGnkBl.js} +3 -3
  84. package/dist/cdn/chunks/{menu-group-E6hIEtLj.js → menu-group-B5MAz_Yk.js} +6 -6
  85. package/dist/cdn/chunks/{menu-item-2y0VC5Gb.js → menu-item-Ba581zRi.js} +24 -24
  86. package/dist/cdn/chunks/{menu-CKxKVA36.js → menu-rE6tDSAy.js} +48 -27
  87. package/dist/cdn/chunks/{menu.template-ZBhUFgBJ.js → menu.template-Eb7J7UrL.js} +130 -76
  88. package/dist/cdn/chunks/{modal-dialog-DdFpcRLJ.js → modal-dialog-Djln8pr7.js} +5 -5
  89. package/dist/cdn/chunks/{multi-line-text-field-okvEa54Q.js → multi-line-text-field-Omt0oidK.js} +5 -5
  90. package/dist/cdn/chunks/{navigation-split-view-dNRQDSpy.js → navigation-split-view-DDng9DdF.js} +11 -11
  91. package/dist/cdn/chunks/nl.generated-CgRVSEh6.js +116 -0
  92. package/dist/cdn/chunks/{notification-2tnwXEY1.js → notification-DB6JOmCC.js} +13 -13
  93. package/dist/cdn/chunks/{number-field-CH7EvpSq.js → number-field-xgr4dysX.js} +7 -7
  94. package/dist/cdn/chunks/{one-half-one-half-section-UZDP-KO-.js → one-half-one-half-section-CFhmSDDa.js} +4 -4
  95. package/dist/cdn/chunks/{one-third-two-thirds-section-8KtESdXO.js → one-third-two-thirds-section-D0JV0GJ_.js} +4 -4
  96. package/dist/cdn/chunks/{one-time-code-field-Bvm3ND6e.js → one-time-code-field-CqgKQqdE.js} +20 -20
  97. package/dist/cdn/chunks/{page-PK1FWuKJ.js → page-DXWHG-hD.js} +10 -10
  98. package/dist/cdn/chunks/{page-footer-BamWKHwH.js → page-footer-GexGY_m-.js} +15 -15
  99. package/dist/cdn/chunks/{page-section-mixin-3q59_Jo_.js → page-section-mixin-CtiPKCqL.js} +4 -10
  100. package/dist/cdn/chunks/{pagination-47zAyQhM.js → pagination-DJkfE8t9.js} +6 -6
  101. package/dist/cdn/chunks/{password-field-FaU02DSW.js → password-field-gKiiE_5e.js} +7 -7
  102. package/dist/cdn/chunks/{popover-642mOFR5.js → popover-C-jxcCHx.js} +74 -50
  103. package/dist/cdn/chunks/{progress-bar-BivaNkIY.js → progress-bar-CBWQRWkE.js} +24 -24
  104. package/dist/cdn/chunks/{progress-circle-ewL0JIcz.js → progress-circle-CCcRDOOJ.js} +22 -22
  105. package/dist/cdn/chunks/{radio-button-DvrYYSnm.js → radio-button-B8xwJO3_.js} +3 -3
  106. package/dist/cdn/chunks/{radio-button-field-BVi0YrTF.js → radio-button-field-B9lRNOXJ.js} +12 -12
  107. package/dist/cdn/chunks/{radio-button-group-DZ9OWUNe.js → radio-button-group-Cy7Ya28w.js} +3 -3
  108. package/dist/cdn/chunks/{render-marked-CO31_4GS.js → render-marked-DjXBoUGY.js} +1 -1
  109. package/dist/cdn/chunks/{reorder-handle-cell-Doetg58W.js → reorder-handle-cell-B6V85qYk.js} +4 -4
  110. package/dist/cdn/chunks/{reorder-handle-mixin-DCjwUXr0.js → reorder-handle-mixin-DTmEmT-V.js} +2 -2
  111. package/dist/cdn/chunks/{repeat-Wb4hkVZc.js → repeat-Ck8L8Iy9.js} +1 -1
  112. package/dist/cdn/chunks/{rich-text-Do08iiIz.js → rich-text-CqQeOXwL.js} +3 -3
  113. package/dist/cdn/chunks/{row-header-mixin-CKR5rHBA.js → row-header-mixin-XRu3gHMf.js} +2 -2
  114. package/dist/cdn/chunks/scroll-fade-e6d1wo3D.js +41 -0
  115. package/dist/cdn/chunks/{search-field-CCeeGiJM.js → search-field-Cz7Ucf6x.js} +9 -9
  116. package/dist/cdn/chunks/{segmented-control-CWIPxEBq.js → segmented-control-CLzKU4SX.js} +33 -33
  117. package/dist/cdn/chunks/{shadow-resets-NKr5gQCc.js → shadow-resets-CodxnaUh.js} +11 -7
  118. package/dist/cdn/chunks/{sheet-WOjBtZvN.js → sheet-DkmSsRV3.js} +4 -4
  119. package/dist/cdn/chunks/{shell-Brn0Dr8F.js → shell-Ex_f7Ov3.js} +3 -3
  120. package/dist/cdn/chunks/{side-by-side-split-view-DGIMsyma.js → side-by-side-split-view-C8aSEGRc.js} +7 -7
  121. package/dist/cdn/chunks/{sidebar-section-BXHeI8GN.js → sidebar-section-CnD-3i7r.js} +8 -8
  122. package/dist/cdn/chunks/{simple-section-C8lJZLAO.js → simple-section-CeKnmobI.js} +4 -4
  123. package/dist/cdn/chunks/{skip-link-QdRgHljr.js → skip-link-DwtFm_NJ.js} +13 -8
  124. package/dist/cdn/chunks/skip-link.i18n-B7pVqo5u.js +6 -0
  125. package/dist/cdn/chunks/{slider-BhjBeWqc.js → slider-BVdkwNW3.js} +21 -21
  126. package/dist/cdn/chunks/slot-content-2qH2vEC_.js +22 -0
  127. package/dist/cdn/chunks/slotted-block-xNpJoXLz.js +14 -0
  128. package/dist/cdn/chunks/{spacer-BgkOjuUj.js → spacer-H4zmoDr_.js} +3 -3
  129. package/dist/cdn/chunks/{spacer-cell-DBI0PVd7.js → spacer-cell-BES4eJH1.js} +4 -4
  130. package/dist/cdn/chunks/{split-button-DfD9vxPe.js → split-button-Caa30uTx.js} +7 -7
  131. package/dist/cdn/chunks/{split-view-divider-B4NFlri5.js → split-view-divider-klvZ8lgP.js} +2 -2
  132. package/dist/cdn/chunks/{split-view-pane-CwFf13hX.js → split-view-pane-Cnx56S5C.js} +4 -4
  133. package/dist/cdn/chunks/{stacked-split-view-BmbzTinq.js → stacked-split-view-CYdGBY7Q.js} +7 -7
  134. package/dist/cdn/chunks/{static-html-CZrcQRgC.js → static-html--Xd5vkAU.js} +1 -1
  135. package/dist/cdn/chunks/{status-bar-CTOf_bDL.js → status-bar-CJybViWL.js} +4 -4
  136. package/dist/cdn/chunks/{step-bar-B5vzvhz-.js → step-bar-BO6Y1BrK.js} +21 -21
  137. package/dist/cdn/chunks/{step-cell-CUA-HUZv.js → step-cell-BQ8EHZVR.js} +5 -5
  138. package/dist/cdn/chunks/{stepper-LxPTQ6HJ.js → stepper-COTaJwSU.js} +6 -6
  139. package/dist/cdn/chunks/{style-map-DiIQAb_L.js → style-map-BwtZr74h.js} +1 -1
  140. package/dist/cdn/chunks/{swatch-picker-Cxv9HK3A.js → swatch-picker-5fxe3QB1.js} +21 -21
  141. package/dist/cdn/chunks/{switch-CbNSJQPp.js → switch-BUxGg2ww.js} +4 -4
  142. package/dist/cdn/chunks/{switch-field-B8vOvcKc.js → switch-field-DOsEK534.js} +5 -5
  143. package/dist/cdn/chunks/{tab-bar-D4ot_wZ4.js → tab-bar-CZ9Z9qV9.js} +21 -21
  144. package/dist/cdn/chunks/{table-uh4YPqda.js → table-SAsB1kDN.js} +5 -5
  145. package/dist/cdn/chunks/{tag-D2dCXT7A.js → tag-xuCeECO3.js} +16 -12
  146. package/dist/cdn/chunks/term-DHEvoltZ.js +212 -0
  147. package/dist/cdn/chunks/term.i18n-DVEJeOb6.js +3 -0
  148. package/dist/cdn/chunks/text-CiFzQPQw.js +260 -0
  149. package/dist/cdn/chunks/{text-cell-DNCpmw9h.js → text-cell-DQNzo2Rp.js} +74 -62
  150. package/dist/cdn/chunks/{text-editor-C6UKAmPL.js → text-editor-DCYF_nqz.js} +257 -237
  151. package/dist/cdn/chunks/{text-field-Dmkd4mHV.js → text-field-BiPeMi6s.js} +22 -22
  152. package/dist/cdn/chunks/{time-field-BfgNZbEb.js → time-field-C-Euaiy0.js} +125 -99
  153. package/dist/cdn/chunks/{time-field.i18n-CLH5vmS7.js → time-field.i18n-BM6qGbmN.js} +0 -1
  154. package/dist/cdn/chunks/{time-picker-C1SBkU-e.js → time-picker-DYkxhEYm.js} +12 -11
  155. package/dist/cdn/chunks/{title-DFrd-Fsh.js → title-DkS07R_v.js} +113 -98
  156. package/dist/cdn/chunks/{title-cell-CC1dQyth.js → title-cell-CJevv6Vg.js} +83 -74
  157. package/dist/cdn/chunks/{toggle-button-bAX6uzgz.js → toggle-button-DDqd56_3.js} +25 -25
  158. package/dist/cdn/chunks/{toggle-button-group-B7CHBww5.js → toggle-button-group-ByxgMVzH.js} +2 -2
  159. package/dist/cdn/chunks/{token-CicHNqIk.js → token-YpVKK1g4.js} +13 -13
  160. package/dist/cdn/chunks/{token-field-BFynQ-T-.js → token-field-vLdJSvUz.js} +21 -21
  161. package/dist/cdn/chunks/{toolbar-hAmL7o23.js → toolbar-C-5H46y9.js} +12 -12
  162. package/dist/cdn/chunks/{toolbar-item-CjgkcYJ2.js → toolbar-item-CvPtoAoQ.js} +3 -3
  163. package/dist/cdn/chunks/{toolbar-title-B1acxCGx.js → toolbar-title-HElUvLeY.js} +4 -4
  164. package/dist/cdn/chunks/{toolbar.styles-xiyZx5D0.js → toolbar.styles-BuJIgj1E.js} +3 -3
  165. package/dist/cdn/chunks/{tooltip-Mj47t8v7.js → tooltip-BF4HkWOi.js} +16 -16
  166. package/dist/cdn/chunks/{top-navigation-bar-vP5QGBXd.js → top-navigation-bar-ngF2MF40.js} +18 -18
  167. package/dist/cdn/chunks/{top-title-bar-Yt6cmRLj.js → top-title-bar-BUjpi-w6.js} +14 -14
  168. package/dist/cdn/chunks/{translations-BMMzf2sX.js → translations-BWgmZCAK.js} +1 -1
  169. package/dist/cdn/chunks/{two-thirds-one-third-section-BHN98jET.js → two-thirds-one-third-section-Ci6O8SwP.js} +4 -4
  170. package/dist/cdn/chunks/{validation-list-CUPzu9_z.js → validation-list-BBNFz_2I.js} +10 -10
  171. package/dist/cdn/chunks/{visibility-mixin-DPuxf-sj.js → visibility-mixin-BP5T5qYB.js} +4 -4
  172. package/dist/cdn/chunks/{visually-hidden-CvjJIBhz.js → visually-hidden-BqYWVy4n.js} +2 -2
  173. package/dist/cdn/chunks/{window-BqGlzGaS.js → window-CvgGg1Ib.js} +4 -4
  174. package/dist/cdn/chunks/{with-translations-CRvWJWep.js → with-translations-8SmMZkGa.js} +3 -3
  175. package/dist/components/actions/button/button.d.ts +9 -0
  176. package/dist/components/actions/button/button.d.ts.map +1 -1
  177. package/dist/components/actions/button/button.js +16 -0
  178. package/dist/components/actions/button/button.js.map +1 -1
  179. package/dist/components/actions/button/button.styles.d.ts.map +1 -1
  180. package/dist/components/actions/button/button.styles.js +6 -0
  181. package/dist/components/actions/button/button.styles.js.map +1 -1
  182. package/dist/components/actions/button/button.template.js +1 -1
  183. package/dist/components/actions/button/button.template.js.map +1 -1
  184. package/dist/components/actions/button-bar/button-bar.js +2 -2
  185. package/dist/components/actions/button-bar/button-bar.js.map +1 -1
  186. package/dist/components/actions/icon-button/icon-button.d.ts +8 -0
  187. package/dist/components/actions/icon-button/icon-button.d.ts.map +1 -1
  188. package/dist/components/actions/icon-button/icon-button.js +17 -0
  189. package/dist/components/actions/icon-button/icon-button.js.map +1 -1
  190. package/dist/components/actions/icon-button/icon-button.styles.d.ts.map +1 -1
  191. package/dist/components/actions/icon-button/icon-button.styles.js +6 -0
  192. package/dist/components/actions/icon-button/icon-button.styles.js.map +1 -1
  193. package/dist/components/actions/icon-button/icon-button.template.d.ts.map +1 -1
  194. package/dist/components/actions/icon-button/icon-button.template.js +4 -2
  195. package/dist/components/actions/icon-button/icon-button.template.js.map +1 -1
  196. package/dist/components/actions/menu/menu-item.d.ts.map +1 -1
  197. package/dist/components/actions/menu/menu-item.js +3 -1
  198. package/dist/components/actions/menu/menu-item.js.map +1 -1
  199. package/dist/components/actions/menu/menu.d.ts +25 -0
  200. package/dist/components/actions/menu/menu.d.ts.map +1 -1
  201. package/dist/components/actions/menu/menu.js +86 -2
  202. package/dist/components/actions/menu/menu.js.map +1 -1
  203. package/dist/components/actions/menu/menu.styles.d.ts.map +1 -1
  204. package/dist/components/actions/menu/menu.styles.js +55 -3
  205. package/dist/components/actions/menu/menu.styles.js.map +1 -1
  206. package/dist/components/actions/menu/menu.template.d.ts.map +1 -1
  207. package/dist/components/actions/menu/menu.template.js +55 -53
  208. package/dist/components/actions/menu/menu.template.js.map +1 -1
  209. package/dist/components/content/code-viewer/code-viewer.d.ts +2 -1
  210. package/dist/components/content/code-viewer/code-viewer.d.ts.map +1 -1
  211. package/dist/components/content/code-viewer/code-viewer.js +26 -13
  212. package/dist/components/content/code-viewer/code-viewer.js.map +1 -1
  213. package/dist/components/content/code-viewer/code-viewer.template.d.ts.map +1 -1
  214. package/dist/components/content/code-viewer/code-viewer.template.js +2 -0
  215. package/dist/components/content/code-viewer/code-viewer.template.js.map +1 -1
  216. package/dist/components/content/identity/identity.d.ts +17 -10
  217. package/dist/components/content/identity/identity.d.ts.map +1 -1
  218. package/dist/components/content/identity/identity.js +33 -19
  219. package/dist/components/content/identity/identity.js.map +1 -1
  220. package/dist/components/content/identity/identity.styles.d.ts.map +1 -1
  221. package/dist/components/content/identity/identity.styles.js +5 -1
  222. package/dist/components/content/identity/identity.styles.js.map +1 -1
  223. package/dist/components/content/identity/identity.template.d.ts +1 -1
  224. package/dist/components/content/identity/identity.template.d.ts.map +1 -1
  225. package/dist/components/content/identity/identity.template.js +11 -5
  226. package/dist/components/content/identity/identity.template.js.map +1 -1
  227. package/dist/components/content/tag/tag.styles.d.ts.map +1 -1
  228. package/dist/components/content/tag/tag.styles.js +6 -2
  229. package/dist/components/content/tag/tag.styles.js.map +1 -1
  230. package/dist/components/content/term/term.d.ts +115 -0
  231. package/dist/components/content/term/term.d.ts.map +1 -0
  232. package/dist/components/content/term/term.i18n.d.ts +5 -0
  233. package/dist/components/content/term/term.i18n.d.ts.map +1 -0
  234. package/dist/components/content/term/term.i18n.js +5 -0
  235. package/dist/components/content/term/term.i18n.js.map +1 -0
  236. package/dist/components/content/term/term.js +256 -0
  237. package/dist/components/content/term/term.js.map +1 -0
  238. package/dist/components/content/term/term.styles.d.ts +2 -0
  239. package/dist/components/content/term/term.styles.d.ts.map +1 -0
  240. package/dist/components/content/term/term.styles.js +65 -0
  241. package/dist/components/content/term/term.styles.js.map +1 -0
  242. package/dist/components/content/term/term.template.d.ts +4 -0
  243. package/dist/components/content/term/term.template.d.ts.map +1 -0
  244. package/dist/components/content/term/term.template.js +55 -0
  245. package/dist/components/content/term/term.template.js.map +1 -0
  246. package/dist/components/content/text/text.d.ts +15 -2
  247. package/dist/components/content/text/text.d.ts.map +1 -1
  248. package/dist/components/content/text/text.js +19 -3
  249. package/dist/components/content/text/text.js.map +1 -1
  250. package/dist/components/content/text/text.styles.d.ts.map +1 -1
  251. package/dist/components/content/text/text.styles.js +7 -155
  252. package/dist/components/content/text/text.styles.js.map +1 -1
  253. package/dist/components/content/text/text.template.d.ts +3 -2
  254. package/dist/components/content/text/text.template.d.ts.map +1 -1
  255. package/dist/components/content/text/text.template.js +3 -4
  256. package/dist/components/content/text/text.template.js.map +1 -1
  257. package/dist/components/content/title/title.d.ts +22 -7
  258. package/dist/components/content/title/title.d.ts.map +1 -1
  259. package/dist/components/content/title/title.js +43 -19
  260. package/dist/components/content/title/title.js.map +1 -1
  261. package/dist/components/content/tooltip/tooltip.d.ts.map +1 -1
  262. package/dist/components/content/tooltip/tooltip.js +8 -7
  263. package/dist/components/content/tooltip/tooltip.js.map +1 -1
  264. package/dist/components/forms/form/form.d.ts +2 -2
  265. package/dist/components/forms/form/form.d.ts.map +1 -1
  266. package/dist/components/forms/form/form.js +2 -2
  267. package/dist/components/forms/form/form.js.map +1 -1
  268. package/dist/components/forms/form-section/form-section.d.ts +2 -2
  269. package/dist/components/forms/form-section/form-section.d.ts.map +1 -1
  270. package/dist/components/forms/form-section/form-section.js +2 -2
  271. package/dist/components/forms/form-section/form-section.js.map +1 -1
  272. package/dist/components/index.d.ts +1 -0
  273. package/dist/components/index.d.ts.map +1 -1
  274. package/dist/components/index.js +1 -0
  275. package/dist/components/index.js.map +1 -1
  276. package/dist/components/inputs/date-field/date-field.i18n.d.ts +1 -1
  277. package/dist/components/inputs/date-field/date-field.i18n.d.ts.map +1 -1
  278. package/dist/components/inputs/date-field/date-field.i18n.js +3 -2
  279. package/dist/components/inputs/date-field/date-field.i18n.js.map +1 -1
  280. package/dist/components/inputs/date-field/date-field.styles.js +1 -1
  281. package/dist/components/inputs/date-field/date-field.template.js +1 -1
  282. package/dist/components/inputs/date-field/date-field.template.js.map +1 -1
  283. package/dist/components/inputs/text-editor/text-editor.commands.d.ts.map +1 -1
  284. package/dist/components/inputs/text-editor/text-editor.commands.js +2 -0
  285. package/dist/components/inputs/text-editor/text-editor.commands.js.map +1 -1
  286. package/dist/components/inputs/text-editor/text-editor.emphasis.d.ts.map +1 -1
  287. package/dist/components/inputs/text-editor/text-editor.emphasis.js +7 -0
  288. package/dist/components/inputs/text-editor/text-editor.emphasis.js.map +1 -1
  289. package/dist/components/inputs/text-editor/text-editor.focus-selection.d.ts +5 -0
  290. package/dist/components/inputs/text-editor/text-editor.focus-selection.d.ts.map +1 -1
  291. package/dist/components/inputs/text-editor/text-editor.focus-selection.js +17 -1
  292. package/dist/components/inputs/text-editor/text-editor.focus-selection.js.map +1 -1
  293. package/dist/components/inputs/time-field/time-field.d.ts +21 -6
  294. package/dist/components/inputs/time-field/time-field.d.ts.map +1 -1
  295. package/dist/components/inputs/time-field/time-field.i18n.d.ts +0 -1
  296. package/dist/components/inputs/time-field/time-field.i18n.d.ts.map +1 -1
  297. package/dist/components/inputs/time-field/time-field.i18n.js +0 -2
  298. package/dist/components/inputs/time-field/time-field.i18n.js.map +1 -1
  299. package/dist/components/inputs/time-field/time-field.js +69 -13
  300. package/dist/components/inputs/time-field/time-field.js.map +1 -1
  301. package/dist/components/inputs/time-field/time-field.styles.d.ts.map +1 -1
  302. package/dist/components/inputs/time-field/time-field.styles.js +13 -1
  303. package/dist/components/inputs/time-field/time-field.styles.js.map +1 -1
  304. package/dist/components/inputs/time-field/time-field.template.d.ts.map +1 -1
  305. package/dist/components/inputs/time-field/time-field.template.js +13 -10
  306. package/dist/components/inputs/time-field/time-field.template.js.map +1 -1
  307. package/dist/components/inputs/time-picker/time-picker.styles.d.ts.map +1 -1
  308. package/dist/components/inputs/time-picker/time-picker.styles.js +3 -2
  309. package/dist/components/inputs/time-picker/time-picker.styles.js.map +1 -1
  310. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.d.ts +1 -1
  311. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.js +1 -1
  312. package/dist/components/layout/page-sections/hero/hero.d.ts +1 -1
  313. package/dist/components/layout/page-sections/hero/hero.js +1 -1
  314. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.d.ts +1 -1
  315. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.js +1 -1
  316. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.d.ts +1 -1
  317. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.js +1 -1
  318. package/dist/components/layout/page-sections/page-section-controls.js +2 -2
  319. package/dist/components/layout/page-sections/page-section-controls.js.map +1 -1
  320. package/dist/components/layout/page-sections/simple-section/simple-section.d.ts +1 -1
  321. package/dist/components/layout/page-sections/simple-section/simple-section.js +1 -1
  322. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.d.ts +1 -1
  323. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.js +1 -1
  324. package/dist/components/layout/popover/popover.d.ts +29 -0
  325. package/dist/components/layout/popover/popover.d.ts.map +1 -1
  326. package/dist/components/layout/popover/popover.js +70 -8
  327. package/dist/components/layout/popover/popover.js.map +1 -1
  328. package/dist/components/layout/popover/popover.styles.d.ts.map +1 -1
  329. package/dist/components/layout/popover/popover.styles.js +15 -1
  330. package/dist/components/layout/popover/popover.styles.js.map +1 -1
  331. package/dist/components/layout/popover/popover.template.js +1 -1
  332. package/dist/components/layout/popover/popover.template.js.map +1 -1
  333. package/dist/components/lists-and-tables/cells/text-cell/text-cell.d.ts +24 -13
  334. package/dist/components/lists-and-tables/cells/text-cell/text-cell.d.ts.map +1 -1
  335. package/dist/components/lists-and-tables/cells/text-cell/text-cell.js +40 -31
  336. package/dist/components/lists-and-tables/cells/text-cell/text-cell.js.map +1 -1
  337. package/dist/components/lists-and-tables/cells/text-cell/text-cell.styles.d.ts.map +1 -1
  338. package/dist/components/lists-and-tables/cells/text-cell/text-cell.styles.js +5 -1
  339. package/dist/components/lists-and-tables/cells/text-cell/text-cell.styles.js.map +1 -1
  340. package/dist/components/lists-and-tables/cells/text-cell/text-cell.template.d.ts +1 -1
  341. package/dist/components/lists-and-tables/cells/text-cell/text-cell.template.d.ts.map +1 -1
  342. package/dist/components/lists-and-tables/cells/text-cell/text-cell.template.js +15 -8
  343. package/dist/components/lists-and-tables/cells/text-cell/text-cell.template.js.map +1 -1
  344. package/dist/components/lists-and-tables/cells/title-cell/title-cell.d.ts +23 -11
  345. package/dist/components/lists-and-tables/cells/title-cell/title-cell.d.ts.map +1 -1
  346. package/dist/components/lists-and-tables/cells/title-cell/title-cell.js +39 -29
  347. package/dist/components/lists-and-tables/cells/title-cell/title-cell.js.map +1 -1
  348. package/dist/components/lists-and-tables/cells/title-cell/title-cell.styles.d.ts.map +1 -1
  349. package/dist/components/lists-and-tables/cells/title-cell/title-cell.styles.js +5 -1
  350. package/dist/components/lists-and-tables/cells/title-cell/title-cell.styles.js.map +1 -1
  351. package/dist/components/lists-and-tables/cells/title-cell/title-cell.template.d.ts +1 -1
  352. package/dist/components/lists-and-tables/cells/title-cell/title-cell.template.d.ts.map +1 -1
  353. package/dist/components/lists-and-tables/cells/title-cell/title-cell.template.js +15 -16
  354. package/dist/components/lists-and-tables/cells/title-cell/title-cell.template.js.map +1 -1
  355. package/dist/components/navigation/link/link.d.ts +68 -2
  356. package/dist/components/navigation/link/link.d.ts.map +1 -1
  357. package/dist/components/navigation/link/link.js +162 -1
  358. package/dist/components/navigation/link/link.js.map +1 -1
  359. package/dist/components/navigation/link/link.styles.d.ts.map +1 -1
  360. package/dist/components/navigation/link/link.styles.js +9 -0
  361. package/dist/components/navigation/link/link.styles.js.map +1 -1
  362. package/dist/components/navigation/link/link.template.d.ts +1 -0
  363. package/dist/components/navigation/link/link.template.d.ts.map +1 -1
  364. package/dist/components/navigation/link/link.template.js +4 -1
  365. package/dist/components/navigation/link/link.template.js.map +1 -1
  366. package/dist/components/navigation/skip-link/skip-link.d.ts +12 -4
  367. package/dist/components/navigation/skip-link/skip-link.d.ts.map +1 -1
  368. package/dist/components/navigation/skip-link/skip-link.i18n.d.ts +1 -0
  369. package/dist/components/navigation/skip-link/skip-link.i18n.d.ts.map +1 -1
  370. package/dist/components/navigation/skip-link/skip-link.i18n.js +2 -0
  371. package/dist/components/navigation/skip-link/skip-link.i18n.js.map +1 -1
  372. package/dist/components/navigation/skip-link/skip-link.js +18 -4
  373. package/dist/components/navigation/skip-link/skip-link.js.map +1 -1
  374. package/dist/components/navigation/skip-link/skip-link.template.js +1 -1
  375. package/dist/components/navigation/skip-link/skip-link.template.js.map +1 -1
  376. package/dist/css/global-open-font.css +2 -0
  377. package/dist/css/global.css +2 -0
  378. package/dist/css/link.css +93 -0
  379. package/dist/css/text.css +159 -0
  380. package/dist/css/title.css +10 -10
  381. package/dist/nldd.min.js +2207 -2121
  382. package/dist/translations/en-US.d.ts.map +1 -1
  383. package/dist/translations/en-US.js +3 -2
  384. package/dist/translations/en-US.js.map +1 -1
  385. package/dist/translations/fy.d.ts.map +1 -1
  386. package/dist/translations/fy.js +3 -2
  387. package/dist/translations/fy.js.map +1 -1
  388. package/dist/translations/nl.generated.d.ts +3 -2
  389. package/dist/translations/nl.generated.d.ts.map +1 -1
  390. package/dist/translations/nl.generated.js +2 -0
  391. package/dist/translations/nl.generated.js.map +1 -1
  392. package/dist/translations/pap-AW.d.ts.map +1 -1
  393. package/dist/translations/pap-AW.js +3 -2
  394. package/dist/translations/pap-AW.js.map +1 -1
  395. package/dist/translations/pap-CW.d.ts.map +1 -1
  396. package/dist/translations/pap-CW.js +3 -2
  397. package/dist/translations/pap-CW.js.map +1 -1
  398. package/dist/types/react.d.ts +40 -16
  399. package/dist/types/vue.d.ts +42 -16
  400. package/dist/utilities/autoloader.generated.d.ts.map +1 -1
  401. package/dist/utilities/autoloader.generated.js +1 -0
  402. package/dist/utilities/autoloader.generated.js.map +1 -1
  403. package/dist/utilities/custom-element.d.ts +10 -0
  404. package/dist/utilities/custom-element.d.ts.map +1 -1
  405. package/dist/utilities/custom-element.js +11 -0
  406. package/dist/utilities/custom-element.js.map +1 -1
  407. package/dist/utilities/described-by-mixin.d.ts +2 -0
  408. package/dist/utilities/described-by-mixin.d.ts.map +1 -1
  409. package/dist/utilities/described-by-mixin.js +10 -1
  410. package/dist/utilities/described-by-mixin.js.map +1 -1
  411. package/dist/utilities/dev-checks.d.ts +8 -0
  412. package/dist/utilities/dev-checks.d.ts.map +1 -1
  413. package/dist/utilities/dev-checks.js +36 -0
  414. package/dist/utilities/dev-checks.js.map +1 -1
  415. package/dist/utilities/dev-rules.generated.d.ts.map +1 -1
  416. package/dist/utilities/dev-rules.generated.js +102 -17
  417. package/dist/utilities/dev-rules.generated.js.map +1 -1
  418. package/dist/utilities/interest-controller.d.ts +80 -0
  419. package/dist/utilities/interest-controller.d.ts.map +1 -0
  420. package/dist/utilities/interest-controller.js +339 -0
  421. package/dist/utilities/interest-controller.js.map +1 -0
  422. package/dist/utilities/page-section-mixin.d.ts +2 -3
  423. package/dist/utilities/page-section-mixin.d.ts.map +1 -1
  424. package/dist/utilities/page-section-mixin.js +2 -9
  425. package/dist/utilities/page-section-mixin.js.map +1 -1
  426. package/dist/utilities/slot-content.d.ts +18 -7
  427. package/dist/utilities/slot-content.d.ts.map +1 -1
  428. package/dist/utilities/slot-content.js +25 -4
  429. package/dist/utilities/slot-content.js.map +1 -1
  430. package/dist/utilities/slotted-block.d.ts +20 -0
  431. package/dist/utilities/slotted-block.d.ts.map +1 -0
  432. package/dist/utilities/slotted-block.js +30 -0
  433. package/dist/utilities/slotted-block.js.map +1 -0
  434. package/lint/data.generated.json +1 -1
  435. package/lint/fix.js +43 -2
  436. package/lint/frontends.js +149 -15
  437. package/lint/linter.js +3 -2
  438. package/lint/main.js +17 -3
  439. package/lint/project.js +2 -2
  440. package/lint/rule.schema.json +2 -1
  441. package/package.json +11 -2
  442. package/dist/cdn/chunks/nl.generated-Bo4bmwYF.js +0 -114
  443. package/dist/cdn/chunks/skip-link.i18n--PbEdAmJ.js +0 -3
  444. package/dist/cdn/chunks/slot-content-BLuPqVXw.js +0 -13
  445. package/dist/cdn/chunks/text-BX4Xm40t.js +0 -406
@@ -0,0 +1,339 @@
1
+ import { isTouchMode } from './input-modality.js';
2
+ import { popoverTargetOf } from './popover-target.js';
3
+ import { setState } from './element-state.js';
4
+ /** The nldd-popover `interestfor` names, looked up in the tree of the host. */
5
+ export function interestTargetOf(host, id) {
6
+ const target = popoverTargetOf(host, id, null);
7
+ return target?.matches('nldd-popover') ? target : null;
8
+ }
9
+ /** As a page preview on Wikipedia: a pointer passing over does not open it. */
10
+ const SHOW_DELAY_MS = 500;
11
+ /** Long enough to cross the gap between the control and the popover. */
12
+ const HIDE_DELAY_MS = 300;
13
+ /** As a long press on iOS and Android. */
14
+ const LONG_PRESS_MS = 500;
15
+ /** A finger that moves further than this is scrolling, not pressing. */
16
+ const LONG_PRESS_SLOP_PX = 10;
17
+ export class InterestController {
18
+ constructor(host) {
19
+ this._overlay = null;
20
+ this._slotted = null;
21
+ this._hovered = false;
22
+ this._focused = false;
23
+ this._pressed = false;
24
+ /** Escape closed it: hover and focus do not bring it back until both leave. */
25
+ this._dismissed = false;
26
+ /** A long press opened it: the click that ends the press is not an activation. */
27
+ this._swallowClick = false;
28
+ this._showTimer = null;
29
+ this._hideTimer = null;
30
+ this._pressTimer = null;
31
+ this._pressStart = null;
32
+ /** Bind to the interest slot's `slotchange`. */
33
+ this.handleSlotChange = (event) => {
34
+ const slot = event.target;
35
+ this._slotted = slot.assignedElements({ flatten: true }).find((el) => el.matches('nldd-popover')) ?? null;
36
+ this.refresh();
37
+ };
38
+ this._onOverlayClose = () => {
39
+ // A shared popover that moved here closed for the control it left, a
40
+ // task later, when it is already open again for this one.
41
+ if (this._isOpen)
42
+ return;
43
+ this._listenWhileOpen(false);
44
+ // Closed another way (the backdrop of the bottom sheet): start over.
45
+ this._hovered = false;
46
+ this._pressed = false;
47
+ this._clearTimer('_hideTimer');
48
+ };
49
+ // — Hover ———————————————————————————————————————————————————————————————
50
+ this._onPointerEnter = (event) => {
51
+ if (event.currentTarget === this._host)
52
+ this.refresh();
53
+ if (!this._overlay || event.pointerType === 'touch' || this._disabled)
54
+ return;
55
+ // Onto a shared popover that shows for another control.
56
+ if (event.currentTarget !== this._host && !this._isOpen)
57
+ return;
58
+ this._clearTimer('_hideTimer');
59
+ if (this._hovered)
60
+ return;
61
+ // Back from the gap onto the popover, or onto the control while it shows.
62
+ if (this._isOpen) {
63
+ this._hovered = true;
64
+ return;
65
+ }
66
+ this._clearTimer('_showTimer');
67
+ this._showTimer = setTimeout(() => {
68
+ this._showTimer = null;
69
+ this._hovered = true;
70
+ this._update();
71
+ }, SHOW_DELAY_MS);
72
+ };
73
+ this._onPointerLeave = (event) => {
74
+ if (event.pointerType === 'touch')
75
+ return;
76
+ if (event.currentTarget !== this._host && !this._isOpen)
77
+ return;
78
+ this._clearTimer('_showTimer');
79
+ this._dismissed = this._dismissed && this._focused;
80
+ if (!this._hovered)
81
+ return;
82
+ this._hovered = false;
83
+ if (!this._wanted)
84
+ this._scheduleHide();
85
+ };
86
+ // — Focus ———————————————————————————————————————————————————————————————
87
+ this._onFocusIn = () => {
88
+ this.refresh();
89
+ // A tap focuses a button on some platforms; that is no keyboard intent.
90
+ if (!this._overlay || this._focused || isTouchMode() || this._disabled)
91
+ return;
92
+ this._focused = true;
93
+ this._update();
94
+ };
95
+ this._onFocusOut = (event) => {
96
+ const related = event.relatedTarget;
97
+ if (related && (this._host.contains(related) || this._host.shadowRoot?.contains(related)))
98
+ return;
99
+ this._focused = false;
100
+ this._dismissed = this._dismissed && this._hovered;
101
+ this._update();
102
+ };
103
+ // — Long press ————————————————————————————————————————————————————————————
104
+ this._onPointerDown = (event) => {
105
+ this.refresh();
106
+ if (!this._overlay || event.pointerType !== 'touch' || this._disabled)
107
+ return;
108
+ if (this._overlay.contains(event.target))
109
+ return;
110
+ this._swallowClick = false;
111
+ this._pressStart = { x: event.clientX, y: event.clientY };
112
+ this._clearTimer('_pressTimer');
113
+ this._pressTimer = setTimeout(() => {
114
+ this._pressTimer = null;
115
+ this._pressStart = null;
116
+ this._swallowClick = true;
117
+ this._dismissed = false;
118
+ this._pressed = true;
119
+ this._update();
120
+ }, LONG_PRESS_MS);
121
+ };
122
+ this._onPointerMove = (event) => {
123
+ if (!this._pressStart)
124
+ return;
125
+ const dx = event.clientX - this._pressStart.x;
126
+ const dy = event.clientY - this._pressStart.y;
127
+ if (Math.hypot(dx, dy) > LONG_PRESS_SLOP_PX)
128
+ this._cancelPress();
129
+ };
130
+ this._cancelPress = () => {
131
+ this._clearTimer('_pressTimer');
132
+ this._pressStart = null;
133
+ };
134
+ /** Android opens the context menu on a long press, and iOS a link preview. */
135
+ this._onContextMenu = (event) => {
136
+ if (this._pressTimer || this._swallowClick)
137
+ event.preventDefault();
138
+ };
139
+ // — Activation ——————————————————————————————————————————————————————————
140
+ this._onClick = (event) => {
141
+ if (!this._overlay)
142
+ return;
143
+ // A click inside the popover is no activation of the control, though the
144
+ // popover is its child in the DOM.
145
+ if (event.composedPath().includes(this._overlay))
146
+ return;
147
+ // Only the click the long press ends in: a press that ended without one
148
+ // must not take the next keyboard activation with it.
149
+ const swallow = this._swallowClick && event.detail > 0;
150
+ this._swallowClick = false;
151
+ if (swallow) {
152
+ event.preventDefault();
153
+ event.stopImmediatePropagation();
154
+ return;
155
+ }
156
+ // The control does what it does; the description has served its purpose,
157
+ // and would otherwise stay on top of what the click opened.
158
+ this._close();
159
+ };
160
+ // — While open ————————————————————————————————————————————————————————————
161
+ this._onDocumentKeydown = (event) => {
162
+ if (event.key !== 'Escape' || !this._isOpen)
163
+ return;
164
+ // The key stops here: in a dialog, the first press takes the popover and
165
+ // the second the dialog.
166
+ event.preventDefault();
167
+ event.stopPropagation();
168
+ this._dismissed = true;
169
+ this._pressed = false;
170
+ this._update();
171
+ };
172
+ this._onDocumentPointerdown = (event) => {
173
+ if (!this._isOpen)
174
+ return;
175
+ const path = event.composedPath();
176
+ if (path.includes(this._host) || (this._overlay && path.includes(this._overlay)))
177
+ return;
178
+ this._close();
179
+ };
180
+ this._host = host;
181
+ host.addController(this);
182
+ }
183
+ /** The popover this control opens on interest, or null. */
184
+ get overlay() {
185
+ return this._overlay;
186
+ }
187
+ hostConnected() {
188
+ const host = this._host;
189
+ host.addEventListener('pointerenter', this._onPointerEnter);
190
+ host.addEventListener('pointerleave', this._onPointerLeave);
191
+ host.addEventListener('focusin', this._onFocusIn);
192
+ host.addEventListener('focusout', this._onFocusOut);
193
+ host.addEventListener('pointerdown', this._onPointerDown);
194
+ host.addEventListener('pointermove', this._onPointerMove);
195
+ host.addEventListener('pointerup', this._cancelPress);
196
+ host.addEventListener('pointercancel', this._cancelPress);
197
+ host.addEventListener('contextmenu', this._onContextMenu);
198
+ // Capture: the click has to be stopped before the control acts on it.
199
+ host.addEventListener('click', this._onClick, true);
200
+ this.refresh();
201
+ }
202
+ hostDisconnected() {
203
+ const host = this._host;
204
+ host.removeEventListener('pointerenter', this._onPointerEnter);
205
+ host.removeEventListener('pointerleave', this._onPointerLeave);
206
+ host.removeEventListener('focusin', this._onFocusIn);
207
+ host.removeEventListener('focusout', this._onFocusOut);
208
+ host.removeEventListener('pointerdown', this._onPointerDown);
209
+ host.removeEventListener('pointermove', this._onPointerMove);
210
+ host.removeEventListener('pointerup', this._cancelPress);
211
+ host.removeEventListener('pointercancel', this._cancelPress);
212
+ host.removeEventListener('contextmenu', this._onContextMenu);
213
+ host.removeEventListener('click', this._onClick, true);
214
+ // A shared popover outlives the control, as when a framework re-renders
215
+ // a list under the pointer; it must not stay open without its anchor.
216
+ if (this._isOpen)
217
+ this._overlay?.hide();
218
+ this._reset();
219
+ this._listenWhileOpen(false);
220
+ this._setOverlay(null);
221
+ }
222
+ /** Look the popover up again: call when `interestfor` changes. It is also
223
+ * looked up before each use, since one rendered after the control is not
224
+ * there on its first render. */
225
+ refresh() {
226
+ const id = this._host.interestfor;
227
+ const named = interestTargetOf(this._host, id);
228
+ setState(this._host, 'no-interest-target', Boolean(id) && !named);
229
+ this._setOverlay(this._slotted ?? named);
230
+ }
231
+ _setOverlay(overlay) {
232
+ if (overlay === this._overlay)
233
+ return;
234
+ const previous = this._overlay;
235
+ if (previous) {
236
+ previous.removeEventListener('close', this._onOverlayClose);
237
+ previous.removeEventListener('pointerenter', this._onPointerEnter);
238
+ previous.removeEventListener('pointerleave', this._onPointerLeave);
239
+ if (previous.anchorElement === this._host) {
240
+ previous._interest = false;
241
+ previous.anchorElement = null;
242
+ }
243
+ }
244
+ this._reset();
245
+ this._overlay = overlay;
246
+ if (overlay) {
247
+ if (!overlay.anchorElement)
248
+ this._anchor();
249
+ overlay.addEventListener('close', this._onOverlayClose);
250
+ if (!this._host.contains(overlay)) {
251
+ overlay.addEventListener('pointerenter', this._onPointerEnter);
252
+ overlay.addEventListener('pointerleave', this._onPointerLeave);
253
+ }
254
+ }
255
+ // The host describes its control with the popover: by element, since
256
+ // the control sits in a shadow root where an id would not find it.
257
+ this._host.requestUpdate();
258
+ }
259
+ _anchor() {
260
+ const overlay = this._overlay;
261
+ if (!overlay || overlay.anchorElement === this._host)
262
+ return;
263
+ // Before the anchor: the popover reads it when it sets up the anchor.
264
+ overlay._interest = true;
265
+ overlay.anchorElement = this._host;
266
+ }
267
+ // — Open and close ————————————————————————————————————————————————————————
268
+ get _wanted() {
269
+ // Disabled can come in while the hover delay runs.
270
+ return !this._disabled && !this._dismissed && (this._hovered || this._focused || this._pressed);
271
+ }
272
+ /** Open for this control: a shared popover may be open for another. */
273
+ get _isOpen() {
274
+ return Boolean(this._overlay?.matches(':popover-open') && this._overlay.anchorElement === this._host);
275
+ }
276
+ get _disabled() {
277
+ return Boolean(this._host.disabled);
278
+ }
279
+ /** Another overlay of this control is open (the menu in its popup slot):
280
+ * that one has the user's attention. */
281
+ get _otherOverlayOpen() {
282
+ return Array.from(this._host.children).some((child) => child !== this._overlay
283
+ && child.matches('nldd-menu, nldd-popover') && child.matches(':popover-open'));
284
+ }
285
+ _update() {
286
+ this._clearTimer('_hideTimer');
287
+ if (this._wanted) {
288
+ const overlay = this._overlay;
289
+ if (!overlay || this._isOpen || this._otherOverlayOpen)
290
+ return;
291
+ if (overlay.matches(':popover-open'))
292
+ overlay.hidePopover();
293
+ this._anchor();
294
+ overlay.show();
295
+ this._listenWhileOpen(true);
296
+ }
297
+ else if (this._isOpen) {
298
+ this._overlay?.hide();
299
+ }
300
+ }
301
+ _scheduleHide() {
302
+ this._clearTimer('_hideTimer');
303
+ this._hideTimer = setTimeout(() => {
304
+ this._hideTimer = null;
305
+ this._update();
306
+ }, HIDE_DELAY_MS);
307
+ }
308
+ _close() {
309
+ this._hovered = false;
310
+ this._focused = false;
311
+ this._pressed = false;
312
+ this._clearTimer('_showTimer');
313
+ this._update();
314
+ }
315
+ _reset() {
316
+ this._hovered = false;
317
+ this._focused = false;
318
+ this._pressed = false;
319
+ this._dismissed = false;
320
+ this._swallowClick = false;
321
+ this._clearTimer('_showTimer');
322
+ this._clearTimer('_hideTimer');
323
+ this._clearTimer('_pressTimer');
324
+ }
325
+ _clearTimer(name) {
326
+ const timer = this[name];
327
+ if (timer)
328
+ clearTimeout(timer);
329
+ this[name] = null;
330
+ }
331
+ _listenWhileOpen(on) {
332
+ const method = on ? 'addEventListener' : 'removeEventListener';
333
+ // On the document: focus is not in the popover, so a listener on it
334
+ // would never hear the Escape that WCAG 1.4.13 asks for.
335
+ document[method]('keydown', this._onDocumentKeydown, true);
336
+ document[method]('pointerdown', this._onDocumentPointerdown, true);
337
+ }
338
+ }
339
+ //# sourceMappingURL=interest-controller.js.map
@@ -0,0 +1 @@
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I,CAAC,CAAC;QAC5E,QAAQ,CAAC,MAAM,CAAC,CAAC,aAAa,EAAE,IAAI,CAAC,sBAAuC,EAAE,IAAI,CAAC,CAAC;IACrF,CAAC;CA2ID"}
@@ -1,6 +1,6 @@
1
1
  import { LitElement } from 'lit';
2
2
  type Constructor<T = LitElement> = new (...args: any[]) => T;
3
- export type PageSectionBackground = 'inherit' | 'base' | 'tinted' | 'accent-tinted';
3
+ export type PageSectionBackground = 'inherit' | 'base' | 'tinted';
4
4
  export type PageSectionPadding = '0' | '2' | '4' | '6' | '8' | '10' | '12' | '16' | '20' | '24' | '28' | '32' | '40' | '44' | '48' | '56' | '64' | '80' | '96';
5
5
  /**
6
6
  * The surface a `background` paints, and passes on through
@@ -16,8 +16,7 @@ export declare const pageSectionBackgroundStyles: import("lit").CSSResult;
16
16
  * `pageSectionBackgroundStyles`:
17
17
  *
18
18
  * - **background**: `inherit` (the default — transparent, shows the ancestor's
19
- * surface) | `base` (the base surface color) | `tinted` | `accent-tinted`
20
- * (a tint of the theme's accent, with the contrast of `tinted`). Setting
19
+ * surface) | `base` (the base surface color) | `tinted`. Setting
21
20
  * one of those also cascades `--context-background-color` so
22
21
  * descendants (cards, nested sections) read the same surface.
23
22
  * - **block padding**: `padding-block` (both edges) with `padding-top`
@@ -1 +1 @@
1
- {"version":3,"file":"page-section-mixin.d.ts","sourceRoot":"","sources":["../../src/utilities/page-section-mixin.ts"],"names":[],"mappings":"AAEA,OAAO,EAAO,UAAU,EAAuB,MAAM,KAAK,CAAC;AAG3D,KAAK,WAAW,CAAC,CAAC,GAAG,UAAU,IAAI,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;AAE7D,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,eAAe,CAAC;AACpF,MAAM,MAAM,kBAAkB,GAC3B,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAA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CACF"}
@@ -24,14 +24,8 @@ export const pageSectionBackgroundStyles = css `
24
24
  ${surfaceContent}
25
25
  }
26
26
 
27
- :host([background="accent-tinted"]) {
28
- --context-background-color: var(--semantics-surfaces-accent-tinted-background-color);
29
- ${surfaceContent}
30
- }
31
-
32
27
  :host([background="base"]),
33
- :host([background="tinted"]),
34
- :host([background="accent-tinted"]) {
28
+ :host([background="tinted"]) {
35
29
  background-color: var(--context-background-color);
36
30
  }
37
31
  `;
@@ -61,8 +55,7 @@ const PADDING_KEYS = [
61
55
  * `pageSectionBackgroundStyles`:
62
56
  *
63
57
  * - **background**: `inherit` (the default — transparent, shows the ancestor's
64
- * surface) | `base` (the base surface color) | `tinted` | `accent-tinted`
65
- * (a tint of the theme's accent, with the contrast of `tinted`). Setting
58
+ * surface) | `base` (the base surface color) | `tinted`. Setting
66
59
  * one of those also cascades `--context-background-color` so
67
60
  * descendants (cards, nested sections) read the same surface.
68
61
  * - **block padding**: `padding-block` (both edges) with `padding-top`
@@ -1 +1 @@
1
- {"version":3,"file":"page-section-mixin.js","sourceRoot":"","sources":["../../src/utilities/page-section-mixin.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,GAAG,EAAmC,MAAM,KAAK,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAS7D;;;;GAIG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAA;;;IAG1C,cAAc;;;;;IAKd,cAAc;;;;;IAKd,cAAc;;;;;;;;CAQjB,CAAC;AAEF,SAAS,cAAc,CAAC,IAAwB;IAC/C,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,EAAE;QAAE,OAAO,IAAI,CAAC;IACnD,IAAI,IAAI,KAAK,GAAG;QAAE,OAAO,GAAG,CAAC;IAC7B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EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;yDACrC;IAElC;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;4DACrC;IAGrC;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;2DACrC;IAEpC;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;yDACrC;IAElC;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;4DACrC;IAGrC;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;2DACrC;IAEpC;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;yDACrC;IAElC;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;4DACrC;IAiDtC,OAAO,eAoBL,CAAC;AACJ,CAAC"}
@@ -1,3 +1,4 @@
1
+ import type { ReactiveController, ReactiveControllerHost } from 'lit';
1
2
  /**
2
3
  * Whether a slot holds something to show: an element, or text that is more
3
4
  * than whitespace.
@@ -8,23 +9,33 @@
8
9
  * renders the attribute beside the slot, and hides it when this says so.
9
10
  */
10
11
  export declare function hasSlotContent(slot: HTMLSlotElement): boolean;
12
+ /** Whether these nodes hold something to show, by the rule of {@link hasSlotContent}. */
13
+ export declare function holdsContent(nodes: readonly Node[]): boolean;
11
14
  /**
12
- * Tracks whether a slot holds something, for a component whose slot wins over
13
- * an attribute. Pass `onChange` to the slot's `@slotchange` and render the
14
- * attribute only while `has` is false:
15
+ * The children of a host that go to a slot, read from the host itself: before
16
+ * the first render there is no slot to ask. `''` is the default slot, which also
17
+ * takes the text between the tags.
18
+ */
19
+ export declare function slottedNodes(host: Element, name?: string): Node[];
20
+ /**
21
+ * Tracks whether the default slot holds something, for a component whose slot
22
+ * wins over an attribute. Pass `onChange` to the slot's `@slotchange` and render
23
+ * the attribute only while `has` is false:
15
24
  *
16
25
  * ```ts
17
26
  * private _textSlot = new SlotContent(this);
18
27
  * // in the template
19
28
  * html`${this._textSlot.has ? nothing : this.text}<slot @slotchange=${this._textSlot.onChange}></slot>`
20
29
  * ```
30
+ *
31
+ * It reads the children of the host as it connects, so the first render already
32
+ * knows, before the slot reports its first change.
21
33
  */
22
- export declare class SlotContent {
34
+ export declare class SlotContent implements ReactiveController {
23
35
  private readonly _host;
24
36
  has: boolean;
25
- constructor(_host: {
26
- requestUpdate(): void;
27
- });
37
+ constructor(_host: ReactiveControllerHost & HTMLElement);
38
+ hostConnected(): void;
28
39
  onChange: (e: Event) => void;
29
40
  }
30
41
  //# sourceMappingURL=slot-content.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"slot-content.d.ts","sourceRoot":"","sources":["../../src/utilities/slot-content.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAG7D;AAED;;;;;;;;;;GAUG;AACH,qBAAa,WAAW;IAGX,OAAO,CAAC,QAAQ,CAAC,KAAK;IAFlC,GAAG,UAAS;gBAEiB,KAAK,EAAE;QAAE,aAAa,IAAI,IAAI,CAAA;KAAE;IAE7D,QAAQ,GAAI,GAAG,KAAK,KAAG,IAAI,CAKzB;CACF"}
1
+ {"version":3,"file":"slot-content.d.ts","sourceRoot":"","sources":["../../src/utilities/slot-content.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,KAAK,CAAC;AAEtE;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAE7D;AAED,yFAAyF;AACzF,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,GAAG,OAAO,CAG5D;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,SAAK,GAAG,IAAI,EAAE,CAI7D;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,WAAY,YAAW,kBAAkB;IAGzC,OAAO,CAAC,QAAQ,CAAC,KAAK;IAFlC,GAAG,UAAS;gBAEiB,KAAK,EAAE,sBAAsB,GAAG,WAAW;IAIxE,aAAa,IAAI,IAAI;IAIrB,QAAQ,GAAI,GAAG,KAAK,KAAG,IAAI,CAKzB;CACF"}
@@ -8,19 +8,36 @@
8
8
  * renders the attribute beside the slot, and hides it when this says so.
9
9
  */
10
10
  export function hasSlotContent(slot) {
11
- return slot.assignedNodes().some((node) => node.nodeType === Node.ELEMENT_NODE
11
+ return holdsContent(slot.assignedNodes());
12
+ }
13
+ /** Whether these nodes hold something to show, by the rule of {@link hasSlotContent}. */
14
+ export function holdsContent(nodes) {
15
+ return nodes.some((node) => node.nodeType === Node.ELEMENT_NODE
12
16
  || (node.nodeType === Node.TEXT_NODE && (node.textContent ?? '').trim().length > 0));
13
17
  }
14
18
  /**
15
- * Tracks whether a slot holds something, for a component whose slot wins over
16
- * an attribute. Pass `onChange` to the slot's `@slotchange` and render the
17
- * attribute only while `has` is false:
19
+ * The children of a host that go to a slot, read from the host itself: before
20
+ * the first render there is no slot to ask. `''` is the default slot, which also
21
+ * takes the text between the tags.
22
+ */
23
+ export function slottedNodes(host, name = '') {
24
+ return [...host.childNodes].filter((node) => node.nodeType === Node.ELEMENT_NODE
25
+ ? (node.getAttribute('slot') ?? '') === name
26
+ : node.nodeType === Node.TEXT_NODE && name === '');
27
+ }
28
+ /**
29
+ * Tracks whether the default slot holds something, for a component whose slot
30
+ * wins over an attribute. Pass `onChange` to the slot's `@slotchange` and render
31
+ * the attribute only while `has` is false:
18
32
  *
19
33
  * ```ts
20
34
  * private _textSlot = new SlotContent(this);
21
35
  * // in the template
22
36
  * html`${this._textSlot.has ? nothing : this.text}<slot @slotchange=${this._textSlot.onChange}></slot>`
23
37
  * ```
38
+ *
39
+ * It reads the children of the host as it connects, so the first render already
40
+ * knows, before the slot reports its first change.
24
41
  */
25
42
  export class SlotContent {
26
43
  constructor(_host) {
@@ -33,6 +50,10 @@ export class SlotContent {
33
50
  this.has = has;
34
51
  this._host.requestUpdate();
35
52
  };
53
+ _host.addController(this);
54
+ }
55
+ hostConnected() {
56
+ this.has = holdsContent(slottedNodes(this._host));
36
57
  }
37
58
  }
38
59
  //# sourceMappingURL=slot-content.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"slot-content.js","sourceRoot":"","sources":["../../src/utilities/slot-content.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,UAAU,cAAc,CAAC,IAAqB;IACnD,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,YAAY;WAC1E,CAAC,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;AACvF,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,OAAO,WAAW;IAGvB,YAA6B,KAAgC;QAAhC,UAAK,GAAL,KAAK,CAA2B;QAF7D,QAAG,GAAG,KAAK,CAAC;QAIZ,aAAQ,GAAG,CAAC,CAAQ,EAAQ,EAAE;YAC7B,MAAM,GAAG,GAAG,cAAc,CAAC,CAAC,C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AA2C;QAA3C,UAAK,GAAL,KAAK,CAAsC;QAFxE,QAAG,GAAG,KAAK,CAAC;QAUZ,aAAQ,GAAG,CAAC,CAAQ,EAAQ,EAAE;YAC7B,MAAM,GAAG,GAAG,cAAc,CAAC,CAAC,CAAC,MAAyB,CAAC,CAAC;YACxD,IAAI,GAAG,KAAK,IAAI,CAAC,GAAG;gBAAE,OAAO;YAC7B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;YACf,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;QAC5B,CAAC,CAAC;QAZD,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;IAED,aAAa;QACZ,IAAI,CAAC,GAAG,GAAG,YAAY,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACnD,CAAC;CAQD"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * A slot for text holds the element that carries it: a `<p>`, or a heading
3
+ * where the component draws one. The component draws a plain box around what
4
+ * is in the slot, and the page has the paragraph or heading in its HTML before
5
+ * any script runs. Plain text belongs in the attribute.
6
+ *
7
+ * An inline element straight in the slot the rules see in the markup. Text
8
+ * they only see in the browser, so a component says so with the `loose-text`
9
+ * state.
10
+ */
11
+ /** Whether these slotted nodes hold text of their own, outside any element. */
12
+ export declare function holdsLooseText(nodes: readonly Node[]): boolean;
13
+ /** Keeps the `loose-text` state of a host: set while any of its slots holds loose text. */
14
+ export declare class LooseText {
15
+ private readonly _host;
16
+ private readonly _slots;
17
+ constructor(_host: HTMLElement);
18
+ read(name: string, nodes: readonly Node[]): void;
19
+ }
20
+ //# sourceMappingURL=slotted-block.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slotted-block.d.ts","sourceRoot":"","sources":["../../src/utilities/slotted-block.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,+EAA+E;AAC/E,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,GAAG,OAAO,CAE9D;AAED,2FAA2F;AAC3F,qBAAa,SAAS;IAGT,OAAO,CAAC,QAAQ,CAAC,KAAK;IAFlC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;gBAEf,KAAK,EAAE,WAAW;IAE/C,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,IAAI,EAAE,GAAG,IAAI;CAKhD"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * A slot for text holds the element that carries it: a `<p>`, or a heading
3
+ * where the component draws one. The component draws a plain box around what
4
+ * is in the slot, and the page has the paragraph or heading in its HTML before
5
+ * any script runs. Plain text belongs in the attribute.
6
+ *
7
+ * An inline element straight in the slot the rules see in the markup. Text
8
+ * they only see in the browser, so a component says so with the `loose-text`
9
+ * state.
10
+ */
11
+ import { setState } from './element-state.js';
12
+ /** Whether these slotted nodes hold text of their own, outside any element. */
13
+ export function holdsLooseText(nodes) {
14
+ return nodes.some((node) => node.nodeType === Node.TEXT_NODE && (node.textContent ?? '').trim() !== '');
15
+ }
16
+ /** Keeps the `loose-text` state of a host: set while any of its slots holds loose text. */
17
+ export class LooseText {
18
+ constructor(_host) {
19
+ this._host = _host;
20
+ this._slots = new Set();
21
+ }
22
+ read(name, nodes) {
23
+ if (holdsLooseText(nodes))
24
+ this._slots.add(name);
25
+ else
26
+ this._slots.delete(name);
27
+ setState(this._host, 'loose-text', this._slots.size > 0);
28
+ }
29
+ }
30
+ //# sourceMappingURL=slotted-block.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slotted-block.js","sourceRoot":"","sources":["../../src/utilities/slotted-block.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,+EAA+E;AAC/E,MAAM,UAAU,cAAc,CAAC,KAAsB;IACpD,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;AACzG,CAAC;AAED,2FAA2F;AAC3F,MAAM,OAAO,SAAS;IAGrB,YAA6B,KAAkB;QAAlB,UAAK,GAAL,KAAK,CAAa;QAF9B,WAAM,GAAG,IAAI,GAAG,EAAU,CAAC;IAEM,CAAC;IAEnD,IAAI,CAAC,IAAY,EAAE,KAAsB;QACxC,IAAI,cAAc,CAAC,KAAK,CAAC;YAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;;YAC5C,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC9B,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,YAAY,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;IAC1D,CAAC;CACD"}