@nldd/design-system 0.26.5 → 0.27.1

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 (471) hide show
  1. package/custom-elements.json +460 -37
  2. package/dist/cdn/autoloader.js +141 -141
  3. package/dist/cdn/chunks/{accordion-item-BXEHwzcv.js → accordion-item-Db9LW8AG.js} +4 -4
  4. package/dist/cdn/chunks/{accordion-qXirmNBj.js → accordion-tLICRUFs.js} +4 -4
  5. package/dist/cdn/chunks/{activity-indicator-DP61AhsJ.js → activity-indicator-CMNIikEV.js} +5 -5
  6. package/dist/cdn/chunks/{admonition-RnRSNAri.js → admonition-DEXVkTJm.js} +4 -4
  7. package/dist/cdn/chunks/after-parse-BSKUm67Q.js +9 -0
  8. package/dist/cdn/chunks/{avatar-group-BrfrpXvd.js → avatar-group-DMU0HLBL.js} +71 -49
  9. package/dist/cdn/chunks/{avatar-DsexiOhH.js → avatar-nLrlfh4s.js} +75 -41
  10. package/dist/cdn/chunks/{badge-BiQFOq2l.js → badge-D1XadmOE.js} +5 -5
  11. package/dist/cdn/chunks/{banner-42zIYAEN.js → banner-B4kFQlHx.js} +7 -7
  12. package/dist/cdn/chunks/{bar-split-view-CjYEp276.js → bar-split-view-DtD4zmoP.js} +28 -21
  13. package/dist/cdn/chunks/{blockquote-qf4hJYvm.js → blockquote-DbFjwox8.js} +3 -3
  14. package/dist/cdn/chunks/{box-CWyg7sbR.js → box-BlwaDicI.js} +3 -3
  15. package/dist/cdn/chunks/{breadcrumbs-BaHjYdz8.js → breadcrumbs-DJS9-8wX.js} +5 -5
  16. package/dist/cdn/chunks/{button-CKV-jwGY.js → button-BK8CmshL.js} +8 -8
  17. package/dist/cdn/chunks/{button-bar-DeJ81759.js → button-bar-5RtXjgGl.js} +3 -3
  18. package/dist/cdn/chunks/{button-group-CuRkiHR5.js → button-group-BYMkQNhT.js} +2 -2
  19. package/dist/cdn/chunks/{card-DxeUNE3V.js → card-NNl0PxBY.js} +4 -4
  20. package/dist/cdn/chunks/{cell-QaG8b-Qk.js → cell-D2NzCBVZ.js} +6 -6
  21. package/dist/cdn/chunks/{checkbox-V0YerUKf.js → checkbox-CXFA_up4.js} +5 -5
  22. package/dist/cdn/chunks/{checkbox-field-DeySECgv.js → checkbox-field-sFs7GvAq.js} +7 -7
  23. package/dist/cdn/chunks/{checkbox-group-DFNy1y-A.js → checkbox-group-BPN4eRCX.js} +3 -3
  24. package/dist/cdn/chunks/{class-map-CmgI2Tu-.js → class-map-1XjgYGeg.js} +1 -1
  25. package/dist/cdn/chunks/{code-editor-BBMbUJ4d.js → code-editor-KZEaMAN7.js} +5 -5
  26. package/dist/cdn/chunks/{code-viewer-B8jse0-5.js → code-viewer-CJwpLKb1.js} +94 -87
  27. package/dist/cdn/chunks/{codemirror-input-BEotDTtZ.js → codemirror-input-CYBNNf0-.js} +5 -5
  28. package/dist/cdn/chunks/{collection-DRoS7Ona.js → collection-BdUB8qeL.js} +61 -42
  29. package/dist/cdn/chunks/{combo-box-DA1ZQJJS.js → combo-box-DxWW-zeE.js} +20 -14
  30. package/dist/cdn/chunks/{container-F1i2pmko.js → container-Dhf1Ahi8.js} +14 -10
  31. package/dist/cdn/chunks/{custom-element-DD4ffKRs.js → custom-element-DtLjpays.js} +1 -1
  32. package/dist/cdn/chunks/{date-field-DVgisQnm.js → date-field-D83r9gjY.js} +12 -12
  33. package/dist/cdn/chunks/{date-picker-BaDTota3.js → date-picker-D8qv2iuG.js} +21 -15
  34. package/dist/cdn/chunks/{decorate-CeGXihRM.js → decorate-BhnGmemK.js} +1 -1
  35. package/dist/cdn/chunks/{described-by-mixin-qFatR9dF.js → described-by-mixin-Jh_PTTde.js} +2 -2
  36. package/dist/cdn/chunks/{description-cell-D45N4P1X.js → description-cell-nQKMluy8.js} +6 -6
  37. package/dist/cdn/chunks/{dev-checks-CkCD0tPh.js → dev-checks-Bet7bhMS.js} +99 -49
  38. package/dist/cdn/chunks/{directive-helpers-B9pcQxsE.js → directive-helpers-dLE2M1R1.js} +1 -1
  39. package/dist/cdn/chunks/{dist-n8aCu6Kg.js → dist-BTuJ-NyU.js} +2 -2
  40. package/dist/cdn/chunks/{dist-BS_pQgb6.js → dist-BbwC3zHR.js} +2 -2
  41. package/dist/cdn/chunks/{dist-Dsyc1RGG.js → dist-BpqJqkl_.js} +1 -1
  42. package/dist/cdn/chunks/{dist-mxb0NzAU.js → dist-C9xmfEc_.js} +1 -1
  43. package/dist/cdn/chunks/{dist-v7yvd26H.js → dist-CYKK2xXE.js} +3 -3
  44. package/dist/cdn/chunks/{dist-rjQNj-KZ.js → dist-Cdmhq-4P.js} +2 -2
  45. package/dist/cdn/chunks/{dist-v62GtoI6.js → dist-DJSiRJRL.js} +1 -1
  46. package/dist/cdn/chunks/{dist-Cl-rXzh7.js → dist-DwevYbXo.js} +1 -1
  47. package/dist/cdn/chunks/{dist-DjlGttcc.js → dist-Dzlvec4O.js} +1 -1
  48. package/dist/cdn/chunks/{dist-jTL_Kil1.js → dist-EP5KATv0.js} +1 -1
  49. package/dist/cdn/chunks/{dist-DJQUgOKW.js → dist-u6MS5-M8.js} +3 -3
  50. package/dist/cdn/chunks/{divider-CtMx3Byp.js → divider-DjT76fuO.js} +2 -2
  51. package/dist/cdn/chunks/{document-tab-bar-SKSf69FX.js → document-tab-bar-CO2M1bFc.js} +95 -56
  52. package/dist/cdn/chunks/{dropdown-se1zjYlw.js → dropdown-CdQ1beF2.js} +5 -5
  53. package/dist/cdn/chunks/{file-field-DW_Xt5O3.js → file-field-D0UlnM9R.js} +14 -14
  54. package/dist/cdn/chunks/{form-C9-eW3zc.js → form-BV9wifov.js} +1 -1
  55. package/dist/cdn/chunks/{form-actions-Cy5tH1nk.js → form-actions-DDeF8urg.js} +2 -2
  56. package/dist/cdn/chunks/{form-associated-mixin-CA0F9CPx.js → form-associated-mixin-Cm1N24gR.js} +2 -2
  57. package/dist/cdn/chunks/{form-field-BMWm8VGS.js → form-field-IeKadcwe.js} +6 -6
  58. package/dist/cdn/chunks/{form-section-DrrXc4wZ.js → form-section-C350G5wg.js} +1 -1
  59. package/dist/cdn/chunks/frame-pass-C0RUoFMc.js +17 -0
  60. package/dist/cdn/chunks/{full-bleed-section-6QL0av4x.js → full-bleed-section-CR3zsX7K.js} +9 -10
  61. package/dist/cdn/chunks/{hero-BThWV3MR.js → hero-Ch5el5J5.js} +73 -68
  62. package/dist/cdn/chunks/{icon-CVM6X_F1.js → icon-Dj98ov4G.js} +2 -2
  63. package/dist/cdn/chunks/{icon-button-h_sEz0Ia.js → icon-button-HKoCqWG3.js} +9 -9
  64. package/dist/cdn/chunks/{icon-cell-C3Ygercd.js → icon-cell-C1I-oIWn.js} +5 -5
  65. package/dist/cdn/chunks/{identity-BR0KxjM5.js → identity-DNkEDJ8m.js} +6 -6
  66. package/dist/cdn/chunks/{if-defined-CvQli6P0.js → if-defined-CZ1Fmb74.js} +1 -1
  67. package/dist/cdn/chunks/{image-D8H73DIj.js → image-KXTd-hL-.js} +8 -8
  68. package/dist/cdn/chunks/{inline-dialog-Dlu3bneh.js → inline-dialog-BTI0xmIT.js} +6 -6
  69. package/dist/cdn/chunks/{just-in-time-education-DG0teV5g.js → just-in-time-education-BtjbYffu.js} +5 -5
  70. package/dist/cdn/chunks/{kanban-MNLyqki_.js → kanban-DNXtL34O.js} +35 -30
  71. package/dist/cdn/chunks/{kanban-column-CGF_4Q0N.js → kanban-column-D0ujQ2_W.js} +37 -25
  72. package/dist/cdn/chunks/{keyboard-shortcut-DZDtndhS.js → keyboard-shortcut-BikzmCBH.js} +3 -3
  73. package/dist/cdn/chunks/{languages-BCn4J5Ck.js → languages-CPd7_I8H.js} +12 -12
  74. package/dist/cdn/chunks/layout-pass-Cq85kSHX.js +45 -0
  75. package/dist/cdn/chunks/{link-CTj3dTmJ.js → link-DqMeRYFm.js} +6 -6
  76. package/dist/cdn/chunks/{link-group--C486tYV.js → link-group-BKn4MHA-.js} +2 -2
  77. package/dist/cdn/chunks/{list-DApLHKj-.js → list-C8Dnks-q.js} +48 -34
  78. package/dist/cdn/chunks/{list-item-BN9uuvXr.js → list-item-CSP1a_cN.js} +5 -6
  79. package/dist/cdn/chunks/{list-item-segment-CvdZT9Ni.js → list-item-segment-BvFqXXnA.js} +3 -3
  80. package/dist/cdn/chunks/{menu-2-9LtMLY.js → menu-LZ0DmVCe.js} +20 -19
  81. package/dist/cdn/chunks/{menu-bar-item-tOFEx-lS.js → menu-bar-item-DENdrp0m.js} +6 -6
  82. package/dist/cdn/chunks/{menu-bar-g-O3_TNl.js → menu-bar-rsGd3kKq.js} +62 -46
  83. package/dist/cdn/chunks/{menu-divider-Dmv0lMHV.js → menu-divider-BptK2nug.js} +3 -3
  84. package/dist/cdn/chunks/{menu-group-Ci9QUUwZ.js → menu-group-0B34NyN5.js} +4 -4
  85. package/dist/cdn/chunks/{menu-item-BnIbV4yo.js → menu-item-55vjckz2.js} +16 -12
  86. package/dist/cdn/chunks/{menu.template-sPjaMfc8.js → menu.template-B_HMnBsa.js} +105 -76
  87. package/dist/cdn/chunks/{modal-dialog-D-jAbabe.js → modal-dialog-DQY_0Qlk.js} +4 -4
  88. package/dist/cdn/chunks/{multi-line-text-field-uBZqAdr6.js → multi-line-text-field-DB4Vflno.js} +6 -6
  89. package/dist/cdn/chunks/{navigation-split-view-DARbBPq-.js → navigation-split-view-Dbhrxni9.js} +59 -47
  90. package/dist/cdn/chunks/{notification-CntIGoYh.js → notification-dtrMLORo.js} +6 -6
  91. package/dist/cdn/chunks/{number-field-C0MTabLP.js → number-field-Ctxk40as.js} +8 -8
  92. package/dist/cdn/chunks/{one-half-one-half-section-DYzf6LtU.js → one-half-one-half-section-Bx6KLSY5.js} +15 -16
  93. package/dist/cdn/chunks/{one-third-two-thirds-section-AAiaxCHH.js → one-third-two-thirds-section-Bql0Xrsc.js} +15 -16
  94. package/dist/cdn/chunks/{one-time-code-field-CCILuCy1.js → one-time-code-field-B-y5gRLi.js} +103 -64
  95. package/dist/cdn/chunks/{overflow-menu-DFoh3xL_.js → overflow-menu-Cs1VLcX7.js} +1 -1
  96. package/dist/cdn/chunks/{page-BDXLREou.js → page-Bdkit86l.js} +78 -56
  97. package/dist/cdn/chunks/{page-footer-BsVMZCXs.js → page-footer-D68JiIFE.js} +4 -4
  98. package/dist/cdn/chunks/{page-section-mixin-L0bl3wCm.js → page-section-mixin-Bmlpcmrw.js} +3 -3
  99. package/dist/cdn/chunks/{pagination-DLwbSZdO.js → pagination-BH6UQbby.js} +6 -6
  100. package/dist/cdn/chunks/{password-field-DKTJgEyb.js → password-field-Dz0znv2L.js} +8 -8
  101. package/dist/cdn/chunks/{popover-RB7uLASo.js → popover-C6j3sO70.js} +5 -5
  102. package/dist/cdn/chunks/{progress-bar-DnXWbmiw.js → progress-bar-BA_5dDXK.js} +10 -7
  103. package/dist/cdn/chunks/{progress-circle-S89MUtU8.js → progress-circle-DsCyTyw-.js} +10 -7
  104. package/dist/cdn/chunks/{radio-button-field-BF4MHiOQ.js → radio-button-field-JsQalrMs.js} +8 -7
  105. package/dist/cdn/chunks/{radio-button-group-BQUqV8wJ.js → radio-button-group-Bqn43LYh.js} +3 -3
  106. package/dist/cdn/chunks/{radio-button-B31lAjlk.js → radio-button-pcE5Vo5k.js} +92 -51
  107. package/dist/cdn/chunks/{render-marked-ChJNzktf.js → render-marked-DAVGoeYa.js} +1 -1
  108. package/dist/cdn/chunks/{reorder-handle-cell-SEERkeh7.js → reorder-handle-cell-r4OuA45S.js} +4 -4
  109. package/dist/cdn/chunks/{reorder-handle-mixin-tWe9XTjZ.js → reorder-handle-mixin-Co5E_Y7l.js} +2 -2
  110. package/dist/cdn/chunks/{repeat-CdCK17GF.js → repeat-DoLR8W_a.js} +2 -2
  111. package/dist/cdn/chunks/{rich-text-vVWOndD2.js → rich-text-CEmzxZRC.js} +3 -3
  112. package/dist/cdn/chunks/{row-header-mixin-6MoJ5Mjq.js → row-header-mixin-BCYXiXva.js} +2 -2
  113. package/dist/cdn/chunks/{scroll-fade-Cr7_IXpU.js → scroll-fade-OSFrYTum.js} +2 -2
  114. package/dist/cdn/chunks/scroll-mode-controller-Dl5hddJo.js +52 -0
  115. package/dist/cdn/chunks/{search-field-C9urWH_J.js → search-field-CT483s7J.js} +10 -10
  116. package/dist/cdn/chunks/{segmented-control-DkILAMOJ.js → segmented-control-5zMasjz7.js} +7 -7
  117. package/dist/cdn/chunks/{shadow-resets-9v6K-Fie.js → shadow-resets-DR73IFIL.js} +2 -2
  118. package/dist/cdn/chunks/{sheet-D89xI-KY.js → sheet-CDXX61d_.js} +3 -3
  119. package/dist/cdn/chunks/{shell-CFmfUD0_.js → shell-C4vAeA49.js} +4 -4
  120. package/dist/cdn/chunks/{side-by-side-split-view-ir9c0mwZ.js → side-by-side-split-view-D9_u1TIS.js} +38 -29
  121. package/dist/cdn/chunks/{sidebar-section-BhJXels3.js → sidebar-section-vWX-ymIa.js} +70 -48
  122. package/dist/cdn/chunks/{simple-section-CMoYuLYV.js → simple-section-CEw2oC7K.js} +9 -10
  123. package/dist/cdn/chunks/{skip-link-rUQq0D-l.js → skip-link-DcOGlfM9.js} +4 -4
  124. package/dist/cdn/chunks/{slider-CIQqjKUo.js → slider-B108QDlz.js} +9 -9
  125. package/dist/cdn/chunks/{spacer-CD85egxE.js → spacer-CpfTNtbZ.js} +2 -2
  126. package/dist/cdn/chunks/{spacer-cell-B33mGdru.js → spacer-cell-DBm7_AUi.js} +4 -4
  127. package/dist/cdn/chunks/{split-button-COL7r-wa.js → split-button-DxgDxdan.js} +7 -7
  128. package/dist/cdn/chunks/{split-view-divider-DVBuBzeO.js → split-view-divider-6_RDvANN.js} +2 -2
  129. package/dist/cdn/chunks/{split-view-pane-CSvIzeBg.js → split-view-pane-9tEGLRZC.js} +4 -4
  130. package/dist/cdn/chunks/{stacked-split-view-onSk2QEi.js → stacked-split-view-CRMEMwtv.js} +29 -25
  131. package/dist/cdn/chunks/{static-html-Cyhp44gp.js → static-html-CmXnRyP6.js} +1 -1
  132. package/dist/cdn/chunks/{status-bar-CjYXOQAX.js → status-bar-Blk_iYSD.js} +29 -17
  133. package/dist/cdn/chunks/{step-bar-D-To0TEw.js → step-bar-DM4a_0PG.js} +5 -5
  134. package/dist/cdn/chunks/{step-cell-B7sVGixc.js → step-cell-CUs8AKJq.js} +5 -5
  135. package/dist/cdn/chunks/{stepper-h6boMOhz.js → stepper-JwxPNJRc.js} +7 -7
  136. package/dist/cdn/chunks/{style-map-BrdTV34-.js → style-map-DUDIMhuW.js} +1 -1
  137. package/dist/cdn/chunks/{swatch-picker-gQ3m3y9U.js → swatch-picker-BXs7Ob4o.js} +6 -6
  138. package/dist/cdn/chunks/{switch-DC-BTi9E.js → switch-CWKoOyz7.js} +5 -5
  139. package/dist/cdn/chunks/{switch-field-D82mLobj.js → switch-field-BgX9mNOA.js} +6 -6
  140. package/dist/cdn/chunks/{tab-bar-sKiFzvfj.js → tab-bar-BNaJSB38.js} +85 -49
  141. package/dist/cdn/chunks/{table-CuxZfCZD.js → table-dgJdHR92.js} +111 -54
  142. package/dist/cdn/chunks/{tag-DP_ome5l.js → tag-DHHf_gxq.js} +4 -4
  143. package/dist/cdn/chunks/{term-BdiTV-Jk.js → term-DNLqQErM.js} +12 -12
  144. package/dist/cdn/chunks/{text-C-b1ygHI.js → text-CK1-qJ6d.js} +3 -3
  145. package/dist/cdn/chunks/{text-cell-DfRh7JqZ.js → text-cell-CrKBqL5A.js} +8 -8
  146. package/dist/cdn/chunks/{text-editor-DuT9Rrpv.js → text-editor-B0A2vNpD.js} +191 -191
  147. package/dist/cdn/chunks/{text-field-kAbXzkUj.js → text-field-CqYxSiKy.js} +6 -6
  148. package/dist/cdn/chunks/{time-field-DUz9ifmn.js → time-field-DHm6KQsG.js} +14 -14
  149. package/dist/cdn/chunks/{time-picker-DGOKwC9T.js → time-picker-C_BE5oNq.js} +170 -99
  150. package/dist/cdn/chunks/{title-BA-SUyAq.js → title-BpREzeX9.js} +4 -4
  151. package/dist/cdn/chunks/{title-cell-Cu5NFNUu.js → title-cell-C4ZL3mJo.js} +8 -8
  152. package/dist/cdn/chunks/{toggle-button-J6UapeqB.js → toggle-button-COQdr-hZ.js} +8 -8
  153. package/dist/cdn/chunks/{toggle-button-group-wrps-tL9.js → toggle-button-group-D4vTcGce.js} +2 -2
  154. package/dist/cdn/chunks/{token-DJkyJz-k.js → token-1DfHVSVj.js} +5 -5
  155. package/dist/cdn/chunks/{token-field-SiBFPD8-.js → token-field-s_mCjtcZ.js} +12 -12
  156. package/dist/cdn/chunks/toolbar-Bz_8d1v-.js +441 -0
  157. package/dist/cdn/chunks/{toolbar-item-DPizdgYi.js → toolbar-item-B-EDYaPf.js} +3 -3
  158. package/dist/cdn/chunks/{toolbar-title-CB4IJFGv.js → toolbar-title-Cl8VPHYK.js} +4 -4
  159. package/dist/cdn/chunks/{toolbar.styles-vmMPyzS_.js → toolbar.styles-BiT7JPsr.js} +3 -3
  160. package/dist/cdn/chunks/{tooltip-Bg2ovCCg.js → tooltip-DhPeqDvL.js} +4 -4
  161. package/dist/cdn/chunks/{top-navigation-bar-vA8wpJXS.js → top-navigation-bar-CHWqoNms.js} +121 -104
  162. package/dist/cdn/chunks/{top-title-bar-BAJGmgnj.js → top-title-bar-DUp0bSIU.js} +43 -30
  163. package/dist/cdn/chunks/{translations-Cjd13Xb6.js → translations-C6WKR-hE.js} +1 -1
  164. package/dist/cdn/chunks/{two-thirds-one-third-section-D1FvorKO.js → two-thirds-one-third-section-CftZqodu.js} +15 -16
  165. package/dist/cdn/chunks/{validation-list-D3rKnfTu.js → validation-list-BdTSfsD6.js} +3 -3
  166. package/dist/cdn/chunks/{visibility-mixin-BRMACV1l.js → visibility-mixin-DL737l0g.js} +2 -2
  167. package/dist/cdn/chunks/{visually-hidden-BukWRiJA.js → visually-hidden-DvU3wAD4.js} +2 -2
  168. package/dist/cdn/chunks/{window-C9njVzzK.js → window-7XYqha2V.js} +4 -4
  169. package/dist/cdn/chunks/{with-translations-BLzHPSUF.js → with-translations-nT8q6ELU.js} +3 -3
  170. package/dist/components/actions/menu/menu-item.d.ts +11 -0
  171. package/dist/components/actions/menu/menu-item.d.ts.map +1 -1
  172. package/dist/components/actions/menu/menu-item.js +28 -13
  173. package/dist/components/actions/menu/menu-item.js.map +1 -1
  174. package/dist/components/actions/menu/menu.d.ts +6 -0
  175. package/dist/components/actions/menu/menu.d.ts.map +1 -1
  176. package/dist/components/actions/menu/menu.js +14 -4
  177. package/dist/components/actions/menu/menu.js.map +1 -1
  178. package/dist/components/actions/menu/menu.styles.d.ts.map +1 -1
  179. package/dist/components/actions/menu/menu.styles.js +63 -3
  180. package/dist/components/actions/menu/menu.styles.js.map +1 -1
  181. package/dist/components/actions/menu/menu.template.d.ts.map +1 -1
  182. package/dist/components/actions/menu/menu.template.js +18 -47
  183. package/dist/components/actions/menu/menu.template.js.map +1 -1
  184. package/dist/components/actions/toolbar/toolbar.d.ts +56 -16
  185. package/dist/components/actions/toolbar/toolbar.d.ts.map +1 -1
  186. package/dist/components/actions/toolbar/toolbar.js +263 -95
  187. package/dist/components/actions/toolbar/toolbar.js.map +1 -1
  188. package/dist/components/actions/toolbar/toolbar.steps.d.ts +16 -0
  189. package/dist/components/actions/toolbar/toolbar.steps.d.ts.map +1 -0
  190. package/dist/components/actions/toolbar/toolbar.steps.js +33 -0
  191. package/dist/components/actions/toolbar/toolbar.steps.js.map +1 -0
  192. package/dist/components/content/avatar/avatar.d.ts +22 -10
  193. package/dist/components/content/avatar/avatar.d.ts.map +1 -1
  194. package/dist/components/content/avatar/avatar.js +122 -29
  195. package/dist/components/content/avatar/avatar.js.map +1 -1
  196. package/dist/components/content/avatar-group/avatar-group.d.ts +25 -10
  197. package/dist/components/content/avatar-group/avatar-group.d.ts.map +1 -1
  198. package/dist/components/content/avatar-group/avatar-group.js +97 -26
  199. package/dist/components/content/avatar-group/avatar-group.js.map +1 -1
  200. package/dist/components/content/avatar-group/avatar-group.template.d.ts.map +1 -1
  201. package/dist/components/content/avatar-group/avatar-group.template.js +5 -4
  202. package/dist/components/content/avatar-group/avatar-group.template.js.map +1 -1
  203. package/dist/components/content/code-viewer/code-viewer.d.ts +4 -2
  204. package/dist/components/content/code-viewer/code-viewer.d.ts.map +1 -1
  205. package/dist/components/content/code-viewer/code-viewer.js +35 -32
  206. package/dist/components/content/code-viewer/code-viewer.js.map +1 -1
  207. package/dist/components/content/image/image.d.ts +1 -4
  208. package/dist/components/content/image/image.d.ts.map +1 -1
  209. package/dist/components/content/image/image.js +1 -4
  210. package/dist/components/content/image/image.js.map +1 -1
  211. package/dist/components/content/tooltip/tooltip.d.ts +1 -4
  212. package/dist/components/content/tooltip/tooltip.d.ts.map +1 -1
  213. package/dist/components/content/tooltip/tooltip.js +1 -4
  214. package/dist/components/content/tooltip/tooltip.js.map +1 -1
  215. package/dist/components/forms/form-field/form-field.d.ts.map +1 -1
  216. package/dist/components/forms/form-field/form-field.js +4 -0
  217. package/dist/components/forms/form-field/form-field.js.map +1 -1
  218. package/dist/components/inputs/combo-box/combo-box.d.ts +8 -0
  219. package/dist/components/inputs/combo-box/combo-box.d.ts.map +1 -1
  220. package/dist/components/inputs/combo-box/combo-box.js +28 -9
  221. package/dist/components/inputs/combo-box/combo-box.js.map +1 -1
  222. package/dist/components/inputs/date-picker/date-picker.d.ts +11 -0
  223. package/dist/components/inputs/date-picker/date-picker.d.ts.map +1 -1
  224. package/dist/components/inputs/date-picker/date-picker.js +23 -0
  225. package/dist/components/inputs/date-picker/date-picker.js.map +1 -1
  226. package/dist/components/inputs/date-picker/date-picker.template.d.ts.map +1 -1
  227. package/dist/components/inputs/date-picker/date-picker.template.js +4 -2
  228. package/dist/components/inputs/date-picker/date-picker.template.js.map +1 -1
  229. package/dist/components/inputs/file-field/file-field.d.ts.map +1 -1
  230. package/dist/components/inputs/file-field/file-field.js +6 -1
  231. package/dist/components/inputs/file-field/file-field.js.map +1 -1
  232. package/dist/components/inputs/one-time-code-field/one-time-code-field.d.ts +27 -5
  233. package/dist/components/inputs/one-time-code-field/one-time-code-field.d.ts.map +1 -1
  234. package/dist/components/inputs/one-time-code-field/one-time-code-field.js +128 -30
  235. package/dist/components/inputs/one-time-code-field/one-time-code-field.js.map +1 -1
  236. package/dist/components/inputs/radio-button/radio-button.d.ts.map +1 -1
  237. package/dist/components/inputs/radio-button/radio-button.js +5 -2
  238. package/dist/components/inputs/radio-button/radio-button.js.map +1 -1
  239. package/dist/components/inputs/radio-button-field/radio-button-field.d.ts.map +1 -1
  240. package/dist/components/inputs/radio-button-field/radio-button-field.js +5 -2
  241. package/dist/components/inputs/radio-button-field/radio-button-field.js.map +1 -1
  242. package/dist/components/inputs/text-editor/text-editor.annotations.js +1 -1
  243. package/dist/components/inputs/text-editor/text-editor.annotations.js.map +1 -1
  244. package/dist/components/inputs/text-editor/text-editor.js +2 -2
  245. package/dist/components/inputs/text-editor/text-editor.js.map +1 -1
  246. package/dist/components/inputs/text-editor/text-editor.selection.js +1 -1
  247. package/dist/components/inputs/text-editor/text-editor.selection.js.map +1 -1
  248. package/dist/components/inputs/text-editor/text-editor.toolbar.d.ts.map +1 -1
  249. package/dist/components/inputs/text-editor/text-editor.toolbar.js +18 -12
  250. package/dist/components/inputs/text-editor/text-editor.toolbar.js.map +1 -1
  251. package/dist/components/inputs/time-picker/time-picker.d.ts +23 -0
  252. package/dist/components/inputs/time-picker/time-picker.d.ts.map +1 -1
  253. package/dist/components/inputs/time-picker/time-picker.js +132 -12
  254. package/dist/components/inputs/time-picker/time-picker.js.map +1 -1
  255. package/dist/components/inputs/time-picker/time-picker.styles.d.ts.map +1 -1
  256. package/dist/components/inputs/time-picker/time-picker.styles.js +27 -6
  257. package/dist/components/inputs/time-picker/time-picker.styles.js.map +1 -1
  258. package/dist/components/inputs/time-picker/time-picker.template.d.ts.map +1 -1
  259. package/dist/components/inputs/time-picker/time-picker.template.js +1 -0
  260. package/dist/components/inputs/time-picker/time-picker.template.js.map +1 -1
  261. package/dist/components/inputs/token-field/token-field.d.ts.map +1 -1
  262. package/dist/components/inputs/token-field/token-field.js +3 -0
  263. package/dist/components/inputs/token-field/token-field.js.map +1 -1
  264. package/dist/components/layout/collection/collection.d.ts +9 -1
  265. package/dist/components/layout/collection/collection.d.ts.map +1 -1
  266. package/dist/components/layout/collection/collection.js +96 -38
  267. package/dist/components/layout/collection/collection.js.map +1 -1
  268. package/dist/components/layout/container/container.d.ts +1 -0
  269. package/dist/components/layout/container/container.d.ts.map +1 -1
  270. package/dist/components/layout/container/container.js +22 -16
  271. package/dist/components/layout/container/container.js.map +1 -1
  272. package/dist/components/layout/kanban/kanban-column.d.ts +7 -2
  273. package/dist/components/layout/kanban/kanban-column.d.ts.map +1 -1
  274. package/dist/components/layout/kanban/kanban-column.js +49 -17
  275. package/dist/components/layout/kanban/kanban-column.js.map +1 -1
  276. package/dist/components/layout/kanban/kanban.d.ts +4 -1
  277. package/dist/components/layout/kanban/kanban.d.ts.map +1 -1
  278. package/dist/components/layout/kanban/kanban.js +25 -7
  279. package/dist/components/layout/kanban/kanban.js.map +1 -1
  280. package/dist/components/layout/kanban/kanban.template.js +1 -1
  281. package/dist/components/layout/kanban/kanban.template.js.map +1 -1
  282. package/dist/components/layout/page/page.d.ts +43 -12
  283. package/dist/components/layout/page/page.d.ts.map +1 -1
  284. package/dist/components/layout/page/page.js +116 -66
  285. package/dist/components/layout/page/page.js.map +1 -1
  286. package/dist/components/layout/page/page.styles.js +2 -2
  287. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.d.ts +3 -1
  288. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.d.ts.map +1 -1
  289. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.js +3 -1
  290. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.js.map +1 -1
  291. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.styles.d.ts.map +1 -1
  292. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.styles.js +6 -7
  293. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.styles.js.map +1 -1
  294. package/dist/components/layout/page-sections/hero/hero-corner.d.ts.map +1 -1
  295. package/dist/components/layout/page-sections/hero/hero-corner.js +24 -1
  296. package/dist/components/layout/page-sections/hero/hero-corner.js.map +1 -1
  297. package/dist/components/layout/page-sections/hero/hero-corner.styles.js +22 -22
  298. package/dist/components/layout/page-sections/hero/hero-corner.styles.js.map +1 -1
  299. package/dist/components/layout/page-sections/hero/hero.d.ts +2 -0
  300. package/dist/components/layout/page-sections/hero/hero.d.ts.map +1 -1
  301. package/dist/components/layout/page-sections/hero/hero.js +2 -0
  302. package/dist/components/layout/page-sections/hero/hero.js.map +1 -1
  303. package/dist/components/layout/page-sections/hero/hero.styles.d.ts.map +1 -1
  304. package/dist/components/layout/page-sections/hero/hero.styles.js +8 -11
  305. package/dist/components/layout/page-sections/hero/hero.styles.js.map +1 -1
  306. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.d.ts +4 -2
  307. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.d.ts.map +1 -1
  308. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.js +4 -2
  309. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.js.map +1 -1
  310. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.styles.d.ts.map +1 -1
  311. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.styles.js +12 -13
  312. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.styles.js.map +1 -1
  313. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.d.ts +4 -2
  314. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.d.ts.map +1 -1
  315. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.js +4 -2
  316. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.js.map +1 -1
  317. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.styles.d.ts.map +1 -1
  318. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.styles.js +12 -13
  319. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.styles.js.map +1 -1
  320. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts +12 -9
  321. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts.map +1 -1
  322. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js +66 -21
  323. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js.map +1 -1
  324. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.styles.d.ts.map +1 -1
  325. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.styles.js +23 -17
  326. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.styles.js.map +1 -1
  327. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.template.d.ts.map +1 -1
  328. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.template.js +5 -0
  329. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.template.js.map +1 -1
  330. package/dist/components/layout/page-sections/simple-section/simple-section.d.ts +4 -3
  331. package/dist/components/layout/page-sections/simple-section/simple-section.d.ts.map +1 -1
  332. package/dist/components/layout/page-sections/simple-section/simple-section.js +4 -3
  333. package/dist/components/layout/page-sections/simple-section/simple-section.js.map +1 -1
  334. package/dist/components/layout/page-sections/simple-section/simple-section.styles.d.ts.map +1 -1
  335. package/dist/components/layout/page-sections/simple-section/simple-section.styles.js +6 -7
  336. package/dist/components/layout/page-sections/simple-section/simple-section.styles.js.map +1 -1
  337. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.d.ts +4 -2
  338. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.d.ts.map +1 -1
  339. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.js +4 -2
  340. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.js.map +1 -1
  341. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.styles.d.ts.map +1 -1
  342. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.styles.js +12 -13
  343. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.styles.js.map +1 -1
  344. package/dist/components/layout/shell/shell.d.ts +2 -0
  345. package/dist/components/layout/shell/shell.d.ts.map +1 -1
  346. package/dist/components/layout/shell/shell.js +2 -0
  347. package/dist/components/layout/shell/shell.js.map +1 -1
  348. package/dist/components/layout/split-views/bar-split-view/bar-split-view.d.ts +2 -1
  349. package/dist/components/layout/split-views/bar-split-view/bar-split-view.d.ts.map +1 -1
  350. package/dist/components/layout/split-views/bar-split-view/bar-split-view.js +30 -17
  351. package/dist/components/layout/split-views/bar-split-view/bar-split-view.js.map +1 -1
  352. package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.d.ts +8 -3
  353. package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.d.ts.map +1 -1
  354. package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.js +35 -20
  355. package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.js.map +1 -1
  356. package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.styles.js +1 -1
  357. package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.d.ts +6 -2
  358. package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.d.ts.map +1 -1
  359. package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.js +30 -15
  360. package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.js.map +1 -1
  361. package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.styles.js +1 -1
  362. package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.d.ts +6 -3
  363. package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.d.ts.map +1 -1
  364. package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.js +28 -16
  365. package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.js.map +1 -1
  366. package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.styles.js +1 -1
  367. package/dist/components/lists-and-tables/list/list.d.ts +19 -0
  368. package/dist/components/lists-and-tables/list/list.d.ts.map +1 -1
  369. package/dist/components/lists-and-tables/list/list.js +47 -15
  370. package/dist/components/lists-and-tables/list/list.js.map +1 -1
  371. package/dist/components/lists-and-tables/list/list.roving.d.ts +2 -1
  372. package/dist/components/lists-and-tables/list/list.roving.d.ts.map +1 -1
  373. package/dist/components/lists-and-tables/list/list.roving.js +7 -3
  374. package/dist/components/lists-and-tables/list/list.roving.js.map +1 -1
  375. package/dist/components/lists-and-tables/list-item/list-item.styles.d.ts.map +1 -1
  376. package/dist/components/lists-and-tables/list-item/list-item.styles.js +0 -1
  377. package/dist/components/lists-and-tables/list-item/list-item.styles.js.map +1 -1
  378. package/dist/components/lists-and-tables/table/table.d.ts +34 -6
  379. package/dist/components/lists-and-tables/table/table.d.ts.map +1 -1
  380. package/dist/components/lists-and-tables/table/table.js +143 -40
  381. package/dist/components/lists-and-tables/table/table.js.map +1 -1
  382. package/dist/components/lists-and-tables/table/table.styles.d.ts.map +1 -1
  383. package/dist/components/lists-and-tables/table/table.styles.js +13 -0
  384. package/dist/components/lists-and-tables/table/table.styles.js.map +1 -1
  385. package/dist/components/lists-and-tables/table/table.template.d.ts.map +1 -1
  386. package/dist/components/lists-and-tables/table/table.template.js +6 -0
  387. package/dist/components/lists-and-tables/table/table.template.js.map +1 -1
  388. package/dist/components/navigation/document-tab-bar/document-tab-bar.d.ts +33 -2
  389. package/dist/components/navigation/document-tab-bar/document-tab-bar.d.ts.map +1 -1
  390. package/dist/components/navigation/document-tab-bar/document-tab-bar.js +136 -38
  391. package/dist/components/navigation/document-tab-bar/document-tab-bar.js.map +1 -1
  392. package/dist/components/navigation/menu-bar/menu-bar.d.ts +21 -3
  393. package/dist/components/navigation/menu-bar/menu-bar.d.ts.map +1 -1
  394. package/dist/components/navigation/menu-bar/menu-bar.js +61 -29
  395. package/dist/components/navigation/menu-bar/menu-bar.js.map +1 -1
  396. package/dist/components/navigation/tab-bar/tab-bar.d.ts +26 -4
  397. package/dist/components/navigation/tab-bar/tab-bar.d.ts.map +1 -1
  398. package/dist/components/navigation/tab-bar/tab-bar.js +99 -24
  399. package/dist/components/navigation/tab-bar/tab-bar.js.map +1 -1
  400. package/dist/components/navigation/tab-bar/tab-bar.template.d.ts.map +1 -1
  401. package/dist/components/navigation/tab-bar/tab-bar.template.js +1 -0
  402. package/dist/components/navigation/tab-bar/tab-bar.template.js.map +1 -1
  403. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.d.ts +23 -14
  404. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.d.ts.map +1 -1
  405. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js +126 -83
  406. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js.map +1 -1
  407. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js +28 -28
  408. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js.map +1 -1
  409. package/dist/components/navigation/top-title-bar/top-title-bar.d.ts +5 -1
  410. package/dist/components/navigation/top-title-bar/top-title-bar.d.ts.map +1 -1
  411. package/dist/components/navigation/top-title-bar/top-title-bar.js +36 -13
  412. package/dist/components/navigation/top-title-bar/top-title-bar.js.map +1 -1
  413. package/dist/components/status-and-feedback/progress-bar/progress-bar.d.ts +1 -0
  414. package/dist/components/status-and-feedback/progress-bar/progress-bar.d.ts.map +1 -1
  415. package/dist/components/status-and-feedback/progress-bar/progress-bar.js +6 -0
  416. package/dist/components/status-and-feedback/progress-bar/progress-bar.js.map +1 -1
  417. package/dist/components/status-and-feedback/progress-circle/progress-circle.d.ts +1 -0
  418. package/dist/components/status-and-feedback/progress-circle/progress-circle.d.ts.map +1 -1
  419. package/dist/components/status-and-feedback/progress-circle/progress-circle.js +6 -0
  420. package/dist/components/status-and-feedback/progress-circle/progress-circle.js.map +1 -1
  421. package/dist/components/status-and-feedback/status-bar/status-bar.d.ts +0 -1
  422. package/dist/components/status-and-feedback/status-bar/status-bar.d.ts.map +1 -1
  423. package/dist/components/status-and-feedback/status-bar/status-bar.js +26 -6
  424. package/dist/components/status-and-feedback/status-bar/status-bar.js.map +1 -1
  425. package/dist/nldd.min.js +882 -816
  426. package/dist/types/react.d.ts +8 -8
  427. package/dist/types/vue.d.ts +8 -8
  428. package/dist/utilities/after-parse.d.ts +30 -0
  429. package/dist/utilities/after-parse.d.ts.map +1 -0
  430. package/dist/utilities/after-parse.js +44 -0
  431. package/dist/utilities/after-parse.js.map +1 -0
  432. package/dist/utilities/dev-checks.d.ts +6 -0
  433. package/dist/utilities/dev-checks.d.ts.map +1 -1
  434. package/dist/utilities/dev-checks.js +42 -16
  435. package/dist/utilities/dev-checks.js.map +1 -1
  436. package/dist/utilities/dev-rules.generated.d.ts.map +1 -1
  437. package/dist/utilities/dev-rules.generated.js +39 -2
  438. package/dist/utilities/dev-rules.generated.js.map +1 -1
  439. package/dist/utilities/frame-pass.d.ts +28 -0
  440. package/dist/utilities/frame-pass.d.ts.map +1 -0
  441. package/dist/utilities/frame-pass.js +41 -0
  442. package/dist/utilities/frame-pass.js.map +1 -0
  443. package/dist/utilities/layout-pass.d.ts +49 -0
  444. package/dist/utilities/layout-pass.d.ts.map +1 -0
  445. package/dist/utilities/layout-pass.js +103 -0
  446. package/dist/utilities/layout-pass.js.map +1 -0
  447. package/dist/utilities/radio-grouping.d.ts +30 -4
  448. package/dist/utilities/radio-grouping.d.ts.map +1 -1
  449. package/dist/utilities/radio-grouping.js +98 -17
  450. package/dist/utilities/radio-grouping.js.map +1 -1
  451. package/dist/utilities/scroll-mode-controller.d.ts +13 -6
  452. package/dist/utilities/scroll-mode-controller.d.ts.map +1 -1
  453. package/dist/utilities/scroll-mode-controller.js +47 -21
  454. package/dist/utilities/scroll-mode-controller.js.map +1 -1
  455. package/lint/css.js +58 -26
  456. package/lint/data.generated.json +1 -1
  457. package/lint/engine.js +29 -12
  458. package/lint/fix.js +103 -12
  459. package/lint/format.js +4 -3
  460. package/lint/frontends.js +153 -35
  461. package/lint/linter.js +174 -25
  462. package/lint/main.js +7 -2
  463. package/lint/project.js +50 -12
  464. package/lint/rule-compiler.js +20 -11
  465. package/lint/rule-data.js +8 -0
  466. package/lint/rule.schema.json +2 -1
  467. package/lint/session.js +42 -18
  468. package/lint/tree.js +5 -2
  469. package/package.json +1 -1
  470. package/dist/cdn/chunks/scroll-mode-controller-COUD1-3P.js +0 -42
  471. package/dist/cdn/chunks/toolbar-be8hoSAz.js +0 -364
package/lint/session.js CHANGED
@@ -6,11 +6,11 @@
6
6
  * corpus measures the linter consumers run.
7
7
  */
8
8
 
9
- import { readFileSync, statSync, writeFileSync } from 'node:fs';
9
+ import { lstatSync, readFileSync, statSync, writeFileSync } from 'node:fs';
10
10
  import { extname, relative, resolve, sep } from 'node:path';
11
11
  import { applyFixes, linesNaming, renameReferences } from './fix.js';
12
12
  import { BUILT_IN_RULES, GROUPS, OPT_IN_GROUPS } from './rule-data.js';
13
- import { DEFAULT_EXTENSIONS, findFiles, IGNORED_DIRECTORIES, isBundle, isRelevant, projectTokens, REFERENCE_EXTENSIONS, STYLESHEET_EXTENSIONS, UNREAD_EXTENSIONS } from './project.js';
13
+ import { DEFAULT_EXTENSIONS, findFiles, IGNORED_DIRECTORIES, partialExcludes, isBundle, isRelevant, projectTokens, REFERENCE_EXTENSIONS, SCRIPT_EXTENSIONS, STYLESHEET_EXTENSIONS, UNREAD_EXTENSIONS } from './project.js';
14
14
 
15
15
  /** Every name `--select`, `--ignore` and .nldd-lint.json may use: rule ids, aliases and groups. */
16
16
  export function knownKeys(data) {
@@ -28,22 +28,29 @@ export function isUtf8(filename) {
28
28
  return bytes.equals(Buffer.from(bytes.toString('utf8')));
29
29
  }
30
30
 
31
+ /** Writing through a link would change a file somewhere else, maybe outside the project. */
32
+ const isSymlink = (filename) => lstatSync(filename, { throwIfNoEntry: false })?.isSymbolicLink() ?? false;
33
+
31
34
  const MAX_FIX_PASSES = 10;
32
35
 
33
- /** One fix can open the way for the next: a renamed tag has rules of its own. */
34
- async function fixUntilStable(linter, original, filename) {
36
+ /**
37
+ * One fix can open the way for the next: a renamed tag has rules of its own.
38
+ * `unstable` says the passes ran out with fixes still to apply.
39
+ */
40
+ export async function fixUntilStable(linter, original, filename, options) {
35
41
  let source = original;
36
42
  let fixed = 0;
37
43
  const renamedTags = new Map();
38
44
  for (let pass = 0; pass < MAX_FIX_PASSES; pass++) {
39
- const { findings } = await linter.lintSource(source, filename);
45
+ const { findings } = await linter.lintSource(source, filename, options);
40
46
  const change = applyFixes(source, findings);
41
- if (change.fixed === 0) return { source, fixed, renamedTags, findings };
47
+ if (change.fixed === 0) return { source, fixed, renamedTags, findings, unstable: false };
42
48
  source = change.source;
43
49
  fixed += change.fixed;
44
50
  for (const [from, to] of change.renamedTags) renamedTags.set(from, to);
45
51
  }
46
- return { source, fixed, renamedTags, findings: (await linter.lintSource(source, filename)).findings };
52
+ const { findings } = await linter.lintSource(source, filename, options);
53
+ return { source, fixed, renamedTags, findings, unstable: applyFixes(source, findings).fixed > 0 };
47
54
  }
48
55
 
49
56
  const isUnread = (filename) => UNREAD_EXTENSIONS.includes(extname(filename));
@@ -68,10 +75,12 @@ function fixReferences(renamedTags, paths, root, exclude) {
68
75
  const remaining = [];
69
76
  const kindOf = (file) => (/\.(css|scss|less)$/.test(file) ? 'styles' : /\.[cm]?[jt]s$/.test(file) || !inMarkup.includes(file) ? 'script' : 'markup');
70
77
  for (const list of [inMarkup, elsewhere]) {
71
- for (const filename of list.filter((file) => !/\.min\.[cm]?js$/.test(file))) {
78
+ for (const filename of list) {
72
79
  const source = readFileSync(filename, 'utf8');
80
+ // The lint pass skips a bundle, so a rename leaves it alone too.
81
+ if (isBundle(filename, source)) continue;
73
82
  const change = isBuilt(filename, root) ? { source, fixed: 0 } : renameReferences(source, renamedTags, kindOf(filename));
74
- if (change.fixed > 0 && isUtf8(filename)) {
83
+ if (change.fixed > 0 && !isSymlink(filename) && isUtf8(filename)) {
75
84
  writeFileSync(filename, change.source);
76
85
  fixed += change.fixed;
77
86
  files += 1;
@@ -93,7 +102,7 @@ function fixReferences(renamedTags, paths, root, exclude) {
93
102
  * @param {boolean} [options.fix] - write the fixes that are certain
94
103
  * @param {(filename: string) => boolean} [options.keep] - read this file even without a component
95
104
  * @returns {Promise<{ results: object[], files: number, unread: number, fixed: number, fixedFiles: number,
96
- * notUtf8: string[], references?: { fixed: number, files: number, remaining: string[] } }>}
105
+ * notUtf8: string[], symlinks: string[], unstable: string[], partialExcludes: { entry: string, file: string }[], references?: { fixed: number, files: number, remaining: string[] } }>}
97
106
  */
98
107
  export async function lintProject(data, { root, paths = [], config = {}, severities, input, fix = false, keep = () => false }) {
99
108
  const everything = readsEverything(data, severities);
@@ -101,7 +110,7 @@ export async function lintProject(data, { root, paths = [], config = {}, severit
101
110
  const named = new Set(paths.map((path) => resolve(root, path)).filter((path) => statSync(path, { throwIfNoEntry: false })?.isFile()));
102
111
  const inputs = input
103
112
  ? [{ filename: resolve(root, input.filename), source: input.source }]
104
- : findFiles(paths, root, config.exclude, [...DEFAULT_EXTENSIONS, ...STYLESHEET_EXTENSIONS, ...UNREAD_EXTENSIONS])
113
+ : findFiles(paths, root, config.exclude, [...DEFAULT_EXTENSIONS, ...STYLESHEET_EXTENSIONS, ...UNREAD_EXTENSIONS, ...SCRIPT_EXTENSIONS])
105
114
  .filter((filename) => named.has(resolve(filename)) || !isBuiltScript(filename, root))
106
115
  .map((filename) => ({ filename, source: readFileSync(filename, 'utf8') }))
107
116
  // A template the linter cannot read matters only with our markup; the rest is let go.
@@ -111,13 +120,23 @@ export async function lintProject(data, { root, paths = [], config = {}, severit
111
120
  // Most files in an app use no component at all, and those need no parser either.
112
121
  // A stylesheet is still read for the tokens it declares.
113
122
  const isStylesheet = (filename) => STYLESHEET_EXTENSIONS.includes(extname(filename));
114
- const relevant = everything ? inputs : inputs.filter((one) => isRelevant(one, { wrappers: config.wrappers, keep }));
123
+ // A script found by the scan is read only for a listener on a renamed event; one named on the command line is read in full.
124
+ const removedEvents = Object.keys(data.removedEvents ?? {});
125
+ const events = removedEvents.length > 0 ? new RegExp(removedEvents.map((name) => name.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')).join('|')) : undefined;
126
+ const eventsOnly = (filename) => SCRIPT_EXTENSIONS.includes(extname(filename)) && !named.has(resolve(filename));
127
+ const relevant = (everything ? inputs : inputs.filter((one) => isRelevant(one, { wrappers: config.wrappers, keep, events })))
128
+ .filter((one) => !eventsOnly(one.filename) || events?.test(one.source));
115
129
  // A file without a parser was opened and not checked, so it does not count as one.
116
130
  const checked = inputs.filter(({ filename }) => !isUnread(filename));
117
- const files = everything ? checked.length : checked.filter(({ filename }) => !isStylesheet(filename)).length + relevant.filter(({ filename }) => isStylesheet(filename)).length;
131
+ const countsWhenRelevant = (filename) => isStylesheet(filename) || eventsOnly(filename);
132
+ const files = everything
133
+ ? checked.filter(({ filename }) => !eventsOnly(filename)).length + relevant.filter(({ filename }) => eventsOnly(filename)).length
134
+ : checked.filter(({ filename }) => !countsWhenRelevant(filename)).length + relevant.filter(({ filename }) => countsWhenRelevant(filename)).length;
118
135
 
119
136
  const results = [];
120
137
  const notUtf8 = [];
138
+ const symlinks = [];
139
+ const unstable = [];
121
140
  const renamedTags = new Map();
122
141
  let fixed = 0;
123
142
  let fixedFiles = 0;
@@ -125,13 +144,17 @@ export async function lintProject(data, { root, paths = [], config = {}, severit
125
144
  const { createLinter } = await import('./linter.js');
126
145
  const linter = createLinter(data, { wrappers: config.wrappers, severities, projectTokens: projectTokens(inputs) });
127
146
  for (const { filename, source } of relevant) {
128
- const canWrite = fix && isUtf8(filename);
129
- if (fix && !canWrite) notUtf8.push(filename);
147
+ const options = eventsOnly(filename) ? { only: 'events' } : undefined;
148
+ const linked = fix && isSymlink(filename);
149
+ const canWrite = fix && !linked && isUtf8(filename);
150
+ if (linked) symlinks.push(filename);
151
+ else if (fix && !canWrite) notUtf8.push(filename);
130
152
  if (!canWrite) {
131
- results.push({ filename, source, ...(await linter.lintSource(source, filename)) });
153
+ results.push({ filename, source, ...(await linter.lintSource(source, filename, options)) });
132
154
  continue;
133
155
  }
134
- const change = await fixUntilStable(linter, source, filename);
156
+ const change = await fixUntilStable(linter, source, filename, options);
157
+ if (change.unstable) unstable.push(filename);
135
158
  if (change.fixed > 0) {
136
159
  writeFileSync(filename, change.source);
137
160
  fixed += change.fixed;
@@ -145,5 +168,6 @@ export async function lintProject(data, { root, paths = [], config = {}, severit
145
168
  // Not in `files`: what has our markup and was not read, so the summary can say so.
146
169
  // Counted on the markup, so a suppressed `file-not-read` does not make it read.
147
170
  const unread = inputs.filter(({ filename, source }) => isUnread(filename) && hasOurMarkup(source)).length;
148
- return { results, files, unread, fixed, fixedFiles, notUtf8, references };
171
+ const partial = input ? [] : partialExcludes(paths, root, config.exclude, [...DEFAULT_EXTENSIONS, ...STYLESHEET_EXTENSIONS, ...UNREAD_EXTENSIONS, ...SCRIPT_EXTENSIONS]);
172
+ return { results, files, unread, fixed, fixedFiles, notUtf8, symlinks, unstable, partialExcludes: partial, references };
149
173
  }
package/lint/tree.js CHANGED
@@ -51,7 +51,10 @@ export const BOUND = Symbol('bound');
51
51
  */
52
52
 
53
53
  /** Vue, Alpine, Lit and Angular write a name with a prefix, JSX and HTML bare. */
54
- const WRITTEN = /^(:|v-bind:|x-bind:|\.|\?|\[attr\.|\[\(?)?([A-Za-z_][\w-]*)((?:\.(?:prop|attr|camel))?)(\)?\])?$/;
54
+ const WRITTEN = /^(:|v-bind:|x-bind:|\.|\?|\[attr\.|\[\(?)?([A-Za-z_][\w-]*)((?:\.[a-zA-Z]+)*)(\)?\])?$/;
55
+
56
+ /** Vue and Alpine take any modifier after the name, `:value.sync`; the others only these. */
57
+ const modifiersFit = (prefix = '', modifiers) => !modifiers || /^\.(prop|attr|camel)$/.test(modifiers) || /^(:|v-bind:|x-bind:)$/.test(prefix);
55
58
 
56
59
  /**
57
60
  * The span of an attribute the parser reported from `start` to just before `end`.
@@ -60,7 +63,7 @@ const WRITTEN = /^(:|v-bind:|x-bind:|\.|\?|\[attr\.|\[\(?)?([A-Za-z_][\w-]*)((?:
60
63
  export function attributeSpan(source, written, start, end) {
61
64
  const match = WRITTEN.exec(written);
62
65
  const bracketed = Boolean(match?.[1]?.startsWith('['));
63
- const valid = match && bracketed === Boolean(match[4]);
66
+ const valid = match && bracketed === Boolean(match[4]) && modifiersFit(match[1], match[3]);
64
67
  const prefix = valid ? (match[1] ?? '') : '';
65
68
  const nameStart = start + prefix.length;
66
69
  const nameEnd = valid ? nameStart + match[2].length : start + written.length;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nldd/design-system",
3
- "version": "0.26.5",
3
+ "version": "0.27.1",
4
4
  "description": "Designsysteem voor de Nederlandse Digitale Dienst",
5
5
  "type": "module",
6
6
  "main": "dist/components/index.js",
@@ -1,42 +0,0 @@
1
- // src/utilities/scroll-mode-controller.ts
2
- var e = "nldd-single-column-change", t = "nldd-shell, nldd-sheet, nldd-modal-dialog";
3
- function n(e) {
4
- let n = e.closest?.(t);
5
- return n && "registerScrollConsumer" in n ? n : null;
6
- }
7
- function r(e, r) {
8
- let i = e.closest?.(t);
9
- !i || "registerScrollConsumer" in i || customElements.whenDefined(i.localName).then(() => {
10
- if (!e.isConnected) return;
11
- let t = n(e);
12
- t && t === i && r(t);
13
- });
14
- }
15
- var i = class {
16
- constructor(e, t) {
17
- this.mode = "nested", this._raf = 0, this._provider = null, this._adopt = (e) => {
18
- this._provider || (window.removeEventListener("resize", this._onResize), this._provider = e, e.registerScrollConsumer(this));
19
- }, this._onResize = () => {
20
- this._raf || (this._raf = requestAnimationFrame(() => {
21
- this._raf = 0, this.read();
22
- }));
23
- }, this._host = e, this._onChange = t, e.addController(this);
24
- }
25
- hostConnected() {
26
- this._provider = n(this._host), this._provider ? this._provider.registerScrollConsumer(this) : (window.addEventListener("resize", this._onResize, { passive: !0 }), this.read(), r(this._host, this._adopt));
27
- }
28
- hostDisconnected() {
29
- this._provider ? (this._provider.unregisterScrollConsumer(this), this._provider = null) : window.removeEventListener("resize", this._onResize), this._raf && cancelAnimationFrame(this._raf);
30
- }
31
- readScrollMode(e) {
32
- let t = e ?? this._readVar();
33
- t !== this.mode && (this.mode = t, this._host.dataset.scroll = t, this._onChange?.(t));
34
- }
35
- _readVar() {
36
- return getComputedStyle(this._host).getPropertyValue("--context-scroll-mode").trim() === "root" ? "root" : "nested";
37
- }
38
- read() {
39
- this.readScrollMode();
40
- }
41
- };
42
- export { r as i, i as n, n as r, e as t };
@@ -1,364 +0,0 @@
1
- import { n as e, o as t, r as n, t as r } from "./decorate-CeGXihRM.js";
2
- import { n as i, r as a } from "./custom-element-DD4ffKRs.js";
3
- import { t as o } from "./custom-element-BW8Ua4c7.js";
4
- import { t as s } from "./reflect-non-default-Bu3rpCvg.js";
5
- import { n as c } from "./toolbar.styles-vmMPyzS_.js";
6
- import "./icon-button-h_sEz0Ia.js";
7
- import { t as l } from "./toolbar.i18n-QwS37CBC.js";
8
- import { t as u } from "./translations-Cjd13Xb6.js";
9
- import { t as d } from "./overflow-menu-DFoh3xL_.js";
10
- import { NLDDToolbarItem as f } from "./toolbar-item-DPizdgYi.js";
11
- import { NLDDToolbarTitle as p } from "./toolbar-title-CB4IJFGv.js";
12
- // src/components/actions/toolbar/toolbar.template.ts
13
- function m(e, r, i, a, o, s, c, l, u, d) {
14
- return t`
15
- <div class="toolbar"
16
- role="toolbar"
17
- aria-label=${l || n}
18
- >
19
- <div class="toolbar__items">
20
- <slot name="start"></slot>
21
- ${r ? t`
22
- ${u ? t`
23
- <div class="toolbar__center-fill">
24
- <slot name="center"></slot>
25
- </div>
26
- ` : t`
27
- ${i ? n : t`<div class="toolbar__left-spacer"></div>`}
28
- <slot name="center"></slot>
29
- ${a ? n : t`<div class="toolbar__right-spacer"></div>`}
30
- `}
31
- ` : o ? n : t`
32
- <div class="toolbar__flexible-spacer"></div>
33
- `}
34
- <slot name="end"></slot>
35
- </div>
36
- <div class="toolbar__overflow-button ${s ? "" : "is-hidden"}">
37
- <nldd-icon-button
38
- size=${e.size}
39
- icon="ellipsis"
40
- text=${d("components.toolbar.overflow-action")}
41
- tooltip-timing="never"
42
- popup-type="menu"
43
- ?expanded=${c}
44
- ></nldd-icon-button>
45
- <span class="toolbar__overflow-button-label">${d("components.toolbar.overflow-action")}</span>
46
- </div>
47
- </div>
48
- `;
49
- }
50
- // src/components/actions/toolbar/toolbar.layout.ts
51
- function h(e) {
52
- return e.filter((e) => e.type === "item");
53
- }
54
- function g(e, t, n) {
55
- return [
56
- ...h(n).map((e, t) => ({
57
- item: e,
58
- areaOrder: 0,
59
- index: t
60
- })),
61
- ...h(t).map((e, t) => ({
62
- item: e,
63
- areaOrder: 1,
64
- index: t
65
- })),
66
- ...h(e).map((e, t) => ({
67
- item: e,
68
- areaOrder: 2,
69
- index: t
70
- }))
71
- ].sort((e, t) => e.item.priority === t.item.priority ? e.areaOrder === t.areaOrder ? t.index - e.index : e.areaOrder - t.areaOrder : e.item.priority - t.item.priority).map(({ item: e }) => e);
72
- }
73
- function _(e) {
74
- let t = [], n = /* @__PURE__ */ new Map();
75
- for (let r of e) {
76
- if (!r.hasPriority) {
77
- t.push([r]);
78
- continue;
79
- }
80
- let e = n.get(r.priority);
81
- if (e) {
82
- e.push(r);
83
- continue;
84
- }
85
- let i = [r];
86
- n.set(r.priority, i), t.push(i);
87
- }
88
- return t;
89
- }
90
- function v(e, t, n, r) {
91
- let i = e.filter((e) => !t.has(e.id));
92
- return Math.max(0, i.length - 1) * r + i.reduce((e, t) => t.type === "item" || t.type === "title" ? e + (n.get(t.id) ?? 0) : e, 0);
93
- }
94
- function y(e, t, n, r, i, a) {
95
- if (r === 0 && a === 0) return {
96
- leftZero: !0,
97
- rightZero: !0
98
- };
99
- let o = e / 2 - r - i / 2 - t, s = e / 2 - a - i / 2 - t - n;
100
- return {
101
- leftZero: o <= 0,
102
- rightZero: s <= 0
103
- };
104
- }
105
- function b(e) {
106
- if (e.length !== 1) return !1;
107
- let [t] = e;
108
- return t.type === "title" || t.type === "item" && t.isFluid;
109
- }
110
- // src/components/actions/toolbar/toolbar.ts
111
- var x = class extends e {
112
- constructor(...e) {
113
- super(...e), this.size = "md", this.showItemLabels = !1, this.accessibleLabel = "", this.translations = {}, this._overflowMenu = new d(this, { id: "nldd-toolbar-overflow-menu" }), this._startChildren = [], this._centerChildren = [], this._endChildren = [], this._overflowIds = /* @__PURE__ */ new Set(), this._leftSpacerZero = !1, this._rightSpacerZero = !1, this._centerOnly = !1, this._soloFluid = !1, this._pinnedOverflowItems = [], this._childIds = /* @__PURE__ */ new WeakMap(), this._idCounter = 0, this._itemWidths = /* @__PURE__ */ new Map(), this._observer = null, this._resizeObserver = null, this._isMeasuring = !1, this._childResizeObserver = null, this._lastChildWidths = /* @__PURE__ */ new WeakMap(), this._isBuilding = !1, this._hasMeasured = !1, this._prioritizedItemsCache = null, this._onFontsLoaded = () => {
114
- this._hasMeasured && this._measureAndUpdate();
115
- };
116
- }
117
- _t(e) {
118
- return u(this.translations, l, e);
119
- }
120
- _getId(e) {
121
- return this._childIds.has(e) || this._childIds.set(e, this._idCounter++), this._childIds.get(e);
122
- }
123
- connectedCallback() {
124
- super.connectedCallback(), this._observer = new MutationObserver((e) => {
125
- if (this._isBuilding) return;
126
- let t = !1, n = !1;
127
- for (let r of e) if (r.type === "attributes") {
128
- let e = r.target, i = e.tagName.toLowerCase();
129
- i === "nldd-toolbar-item" || i === "nldd-toolbar-title" ? t = !0 : e.closest?.("[slot=\"overflow\"]") && (n = !0);
130
- } else t = !0;
131
- t ? this._buildChildren() : n && this._syncMenuItems();
132
- }), this._resizeObserver = new ResizeObserver(() => {
133
- this._isMeasuring || (this._overflowMenu.hide(), this._measureAndUpdate());
134
- }), this._resizeObserver.observe(this), setTimeout(() => this._buildChildren(), 0), document.fonts?.addEventListener("loadingdone", this._onFontsLoaded);
135
- }
136
- disconnectedCallback() {
137
- super.disconnectedCallback(), document.fonts?.removeEventListener("loadingdone", this._onFontsLoaded), this._observer?.disconnect(), this._observer = null, this._resizeObserver?.disconnect(), this._resizeObserver = null, this._childResizeObserver?.disconnect(), this._childResizeObserver = null;
138
- }
139
- firstUpdated() {
140
- this._syncHosts();
141
- }
142
- updated(e) {
143
- (e.has("size") || e.has("showItemLabels")) && this._syncHosts(), (e.has("_startChildren") || e.has("_centerChildren") || e.has("_endChildren")) && this.updateComplete.then(() => this._measureAndUpdate()), (e.has("_overflowIds") || e.has("_pinnedOverflowItems")) && (this._syncMenuItems(), this._syncMenuAnchor(), this._hasMeasured || this.updateComplete.then(() => this._updateAreaVars()));
144
- }
145
- _syncMenuAnchor() {
146
- this._overflowMenu.anchorTo(this.shadowRoot?.querySelector(".toolbar__overflow-button nldd-icon-button") ?? null);
147
- }
148
- _syncMenuItems() {
149
- let e = [...this._getPrioritizedItems()].reverse().filter((e) => this._overflowIds.has(e.id)).flatMap((e) => e.overflowItems);
150
- this._overflowMenu.mirror([...e, ...this._pinnedOverflowItems]);
151
- }
152
- _syncHosts() {
153
- this._allHostChildren().forEach((e) => {
154
- if (e.type === "item") {
155
- let t = e.element;
156
- t.setAttribute("size", this.size), t.toggleAttribute("show-item-labels", this.showItemLabels), t.toggleAttribute("fluid", e.isFluid), e.isFluid && e.minWidth ? t.style.setProperty("--_toolbar-item-min-width", e.minWidth) : t.style.removeProperty("--_toolbar-item-min-width"), e.isFluid && e.width ? t.style.setProperty("--_toolbar-item-width", e.width) : t.style.removeProperty("--_toolbar-item-width"), e.isFluid && e.maxWidth ? t.style.setProperty("--_toolbar-item-max-width", e.maxWidth) : t.style.removeProperty("--_toolbar-item-max-width"), Array.from(t.children).forEach((e) => {
157
- e.getAttribute("slot") !== "overflow" && e.setAttribute("size", this.size);
158
- });
159
- } else e.type === "title" && e.element.setAttribute("size", this.size);
160
- });
161
- }
162
- _getPrioritizedItems() {
163
- return this._prioritizedItemsCache ?? (this._prioritizedItemsCache = g(this._startChildren, this._centerChildren, this._endChildren)), this._prioritizedItemsCache;
164
- }
165
- _allHostChildren() {
166
- return [
167
- ...this._startChildren,
168
- ...this._centerChildren,
169
- ...this._endChildren
170
- ];
171
- }
172
- _hostFor(e) {
173
- let t = this._allHostChildren().find((t) => t.id === e);
174
- return t && (t.type === "item" || t.type === "title") ? t.element : null;
175
- }
176
- _measureItemWidths() {
177
- this._allHostChildren().forEach((e) => {
178
- if (e.type === "item" || e.type === "title") {
179
- let t = e.element;
180
- this._itemWidths.set(e.id, t.getBoundingClientRect().width);
181
- }
182
- });
183
- }
184
- _updateAreaVars() {
185
- let e = this.shadowRoot?.querySelector(".toolbar__items");
186
- if (!e) return;
187
- let t = this.getBoundingClientRect().width, n = parseFloat(getComputedStyle(e).gap ?? "0"), r = parseFloat(getComputedStyle(this).gap ?? "0"), i = this.shadowRoot?.querySelector(".toolbar__overflow-button"), a = this.shadowRoot?.querySelector(".toolbar__overflow-button nldd-icon-button"), o = i && !i.classList.contains("is-hidden") && a ? a.getBoundingClientRect().width + r : 0;
188
- this.style.setProperty("--_toolbar-overflow-button-width", `${o}px`);
189
- let s = v(this._startChildren, this._overflowIds, this._itemWidths, n), c = v(this._centerChildren, this._overflowIds, this._itemWidths, n), l = v(this._endChildren, this._overflowIds, this._itemWidths, n);
190
- this.style.setProperty("--_toolbar-start-width", `${s}px`), this.style.setProperty("--_toolbar-center-width", `${c}px`), this.style.setProperty("--_toolbar-end-width", `${l}px`), this.style.setProperty("--_toolbar-left-spacer-gap", s > 0 ? `${n}px` : "0px"), this.style.setProperty("--_toolbar-right-spacer-gap", l > 0 ? `${n}px` : "0px");
191
- let { leftZero: u, rightZero: d } = y(t, n, o, s, c, l);
192
- u !== this._leftSpacerZero && (this._leftSpacerZero = u), d !== this._rightSpacerZero && (this._rightSpacerZero = d);
193
- let f = this._isCenterOnly();
194
- f !== this._centerOnly && (this._centerOnly = f);
195
- let p = b(this._allHostChildren().filter((e) => !this._overflowIds.has(e.id) && e.element.getClientRects().length > 0));
196
- p !== this._soloFluid && (this._soloFluid = p);
197
- }
198
- _isCenterOnly() {
199
- return !this._hasPresentChild(this._startChildren) && !this._hasPresentChild(this._endChildren) && this._centerChildren.length > 0;
200
- }
201
- _hasRenderedChild(e) {
202
- return e.some((e) => e.element.getClientRects().length > 0);
203
- }
204
- _hasPresentChild(e) {
205
- return e.some((e) => this._overflowIds.has(e.id)) || this._hasRenderedChild(e);
206
- }
207
- _measureAndUpdate() {
208
- if (this._isMeasuring) return;
209
- let e = this.shadowRoot?.querySelector(".toolbar__items");
210
- if (!e) return;
211
- this._isMeasuring = !0;
212
- let t = this.getBoundingClientRect().width;
213
- this.style.setProperty("--_toolbar-width", `${t}px`), this._measureOverflow(e), this._hasMeasured = !0, this._isMeasuring = !1;
214
- }
215
- _measureOverflow(e) {
216
- let t = this.shadowRoot?.querySelector(".toolbar__overflow-button"), n = this._allHostChildren(), r = h(n), i = n.filter((e) => e.type === "title");
217
- r.forEach((e) => {
218
- let t = e.element;
219
- t.hidden = !1, this._syncShrinkable(t), t.hasAttribute("solo-fluid") && (t.removeAttribute("solo-fluid"), t.toggleAttribute("fluid", e.isFluid), e.isFluid && e.minWidth && t.style.setProperty("--_toolbar-item-min-width", e.minWidth));
220
- }), i.forEach((e) => {
221
- let t = e.element;
222
- t.removeAttribute("solo-fluid"), t.style.removeProperty("min-width");
223
- }), this._pinnedOverflowItems.length > 0 ? t?.classList.remove("is-hidden") : t?.classList.add("is-hidden"), e.offsetWidth;
224
- let a = this._isCenterOnly(), o = () => e.scrollWidth > e.clientWidth + 1;
225
- if (!o()) {
226
- this._overflowIds.size > 0 && (this._overflowIds = /* @__PURE__ */ new Set()), this._promoteSoloFluid(e, r, i, a), this._measureItemWidths(), this._updateAreaVars();
227
- return;
228
- }
229
- t?.classList.remove("is-hidden"), e.offsetWidth;
230
- let s = this._getPrioritizedItems(), c = /* @__PURE__ */ new Set(), l = _(s);
231
- for (let t of l) {
232
- if (!o()) break;
233
- if (t.some((e) => e.isFluid)) {
234
- let e = new Set(t.map((e) => e.id));
235
- if (r.filter((t) => {
236
- let n = t.element;
237
- return !n.hidden && !n.hasAttribute("fluid") && !n.hasAttribute("solo-fluid") && !e.has(t.id);
238
- }).length === 0) break;
239
- }
240
- let n = t.map((e) => e.element).filter((e) => e.hasAttribute("shrinkable"));
241
- if (n.length > 0 && (n.forEach((e) => e.toggleAttribute("shrunk", !0)), e.offsetWidth, !o())) break;
242
- for (let e of t) {
243
- c.add(e.id);
244
- let t = e.element;
245
- t.hidden = !0, t.removeAttribute("shrunk");
246
- }
247
- e.offsetWidth;
248
- }
249
- c.size === 0 && this._pinnedOverflowItems.length === 0 && t?.classList.add("is-hidden"), this._promoteSoloFluid(e, r, i, a), (c.size !== this._overflowIds.size || [...c].some((e) => !this._overflowIds.has(e))) && (this._overflowIds = c), this._measureItemWidths(), this._updateAreaVars();
250
- }
251
- _syncShrinkable(e) {
252
- e.removeAttribute("shrunk");
253
- let t = Array.from(e.children).find((e) => e.getAttribute("slot") !== "overflow"), n = typeof t?._toolbarWidths == "function" ? t._toolbarWidths() : null;
254
- e.toggleAttribute("shrinkable", !!n), n ? (e.style.setProperty("--_toolbar-item-preferred-width", `${n.preferred}px`), e.style.setProperty("--_toolbar-item-shrunk-min-width", `${n.minimum}px`)) : (e.style.removeProperty("--_toolbar-item-preferred-width"), e.style.removeProperty("--_toolbar-item-shrunk-min-width"));
255
- }
256
- _promoteSoloFluid(e, t, n, r) {
257
- let i = t.filter((e) => e.element.getClientRects().length > 0);
258
- if (!r && i.length === 1 && i[0].element.hasAttribute("fluid")) {
259
- let t = i[0].element;
260
- t.removeAttribute("fluid"), t.setAttribute("solo-fluid", ""), t.style.removeProperty("--_toolbar-item-min-width"), e.offsetWidth;
261
- }
262
- let a = n.filter((e) => !e.element.hidden);
263
- if (i.length === 0 && a.length === 1) {
264
- let t = a[0].element;
265
- t.setAttribute("solo-fluid", ""), t.style.setProperty("min-width", "0px"), e.offsetWidth;
266
- }
267
- e.scrollWidth > e.clientWidth + 1 && (a.forEach((e) => e.element.style.setProperty("min-width", "0px")), e.offsetWidth);
268
- }
269
- _buildChildrenForSlot(e) {
270
- return Array.from(this.children).filter((t) => t.getAttribute("slot") === e).map((e) => {
271
- let t = e.tagName.toLowerCase();
272
- if (t === "nldd-toolbar-title") return {
273
- type: "title",
274
- element: e,
275
- id: this._getId(e)
276
- };
277
- if (t === "nldd-toolbar-item") {
278
- let t = this._getId(e), n = e.getAttribute("label") ?? "", r = e.priority ?? 0, i = r !== 0, a = e, o = a.minWidth || "", s = a.maxWidth || "", c = a.width || "", l = !!(o || s || c), u = Array.from(e.children).filter((e) => {
279
- let t = e.tagName.toLowerCase();
280
- return t === "nldd-menu-item" || t === "nldd-menu-divider" || t === "nldd-menu-group";
281
- });
282
- return u.forEach((e) => e.setAttribute("slot", "overflow")), {
283
- type: "item",
284
- element: e,
285
- label: n,
286
- id: t,
287
- priority: r,
288
- hasPriority: i,
289
- overflowItems: u,
290
- minWidth: o,
291
- maxWidth: s,
292
- width: c,
293
- isFluid: l
294
- };
295
- }
296
- return {
297
- type: "other",
298
- element: e,
299
- id: this._getId(e)
300
- };
301
- });
302
- }
303
- _buildPinnedOverflowItems() {
304
- this._pinnedOverflowItems = Array.from(this.children).filter((e) => {
305
- let t = e.tagName.toLowerCase();
306
- return e.getAttribute("slot") === "overflow" && (t === "nldd-menu-item" || t === "nldd-menu-divider" || t === "nldd-menu-group");
307
- });
308
- }
309
- _buildChildren() {
310
- this._isBuilding || (this._isBuilding = !0, this._observer?.disconnect(), this._startChildren = this._buildChildrenForSlot("start"), this._centerChildren = this._buildChildrenForSlot("center"), this._endChildren = this._buildChildrenForSlot("end"), this._buildPinnedOverflowItems(), this._prioritizedItemsCache = null, this._syncHosts(), this._observer?.observe(this, {
311
- childList: !0,
312
- attributes: !0,
313
- subtree: !0,
314
- attributeFilter: [
315
- "label",
316
- "priority",
317
- "min-width",
318
- "max-width",
319
- "width",
320
- "text",
321
- "disabled",
322
- "selected",
323
- "type"
324
- ]
325
- }), this._watchChildSizes(), this._isBuilding = !1);
326
- }
327
- _watchChildSizes() {
328
- this._childResizeObserver?.disconnect(), this._childResizeObserver ?? (this._childResizeObserver = new ResizeObserver((e) => {
329
- if (this._isMeasuring || this._isBuilding) return;
330
- let t = !1;
331
- for (let n of e) {
332
- let e = n.target;
333
- if (e.hasAttribute("hidden")) continue;
334
- let r = n.contentRect.width;
335
- Math.abs((this._lastChildWidths.get(e) ?? -1) - r) < .5 || (this._lastChildWidths.set(e, r), t = !0);
336
- }
337
- t && this._measureAndUpdate();
338
- })), this._lastChildWidths = /* @__PURE__ */ new WeakMap();
339
- for (let e of this._hostChildElements()) this._childResizeObserver.observe(e);
340
- }
341
- _hostChildElements() {
342
- return Array.from(this.children).filter((e) => {
343
- let t = e.tagName.toLowerCase();
344
- return t === "nldd-toolbar-item" || t === "nldd-toolbar-title";
345
- });
346
- }
347
- render() {
348
- let e = this._soloFluid || b(this._allHostChildren().filter((e) => !this._overflowIds.has(e.id)));
349
- return m(this, this._centerChildren.length > 0, this._leftSpacerZero, this._rightSpacerZero, e, this._pinnedOverflowItems.length > 0 || this._overflowIds.size > 0, this._overflowMenu.open, this.accessibleLabel, this._centerOnly, (e) => this._t(e));
350
- }
351
- }, S = (x.styles = c, x);
352
- r([a({
353
- reflect: !0,
354
- converter: s("md")
355
- })], S.prototype, "size", void 0), r([a({
356
- type: Boolean,
357
- reflect: !0,
358
- attribute: "show-item-labels"
359
- })], S.prototype, "showItemLabels", void 0), r([a({
360
- reflect: !0,
361
- attribute: "accessible-label",
362
- converter: s("")
363
- })], S.prototype, "accessibleLabel", void 0), r([a({ type: Object })], S.prototype, "translations", void 0), r([i()], S.prototype, "_startChildren", void 0), r([i()], S.prototype, "_centerChildren", void 0), r([i()], S.prototype, "_endChildren", void 0), r([i()], S.prototype, "_overflowIds", void 0), r([i()], S.prototype, "_leftSpacerZero", void 0), r([i()], S.prototype, "_rightSpacerZero", void 0), r([i()], S.prototype, "_centerOnly", void 0), r([i()], S.prototype, "_soloFluid", void 0), r([i()], S.prototype, "_pinnedOverflowItems", void 0), S = r([o("nldd-toolbar")], S);
364
- export { S as NLDDToolbar, f as NLDDToolbarItem, p as NLDDToolbarTitle, _ as groupForOverflow };