@nldd/design-system 0.21.1 → 0.23.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 (757) hide show
  1. package/README.md +5 -3
  2. package/custom-elements.json +900 -414
  3. package/dist/assets/styles/shadow-resets.d.ts +19 -0
  4. package/dist/assets/styles/shadow-resets.d.ts.map +1 -1
  5. package/dist/assets/styles/shadow-resets.js +35 -0
  6. package/dist/assets/styles/shadow-resets.js.map +1 -1
  7. package/dist/cdn/autoloader.js +136 -136
  8. package/dist/cdn/chunks/{activity-indicator-JglZJ8dh.js → activity-indicator-D86Mv6SL.js} +25 -24
  9. package/dist/cdn/chunks/{avatar-ASqePVhU.js → avatar-BISv6tzp.js} +58 -56
  10. package/dist/cdn/chunks/{avatar-group-GinEMPm9.js → avatar-group-D7IN6DxU.js} +43 -42
  11. package/dist/cdn/chunks/{badge-Cc2Nufoc.js → badge-R3PZUsqZ.js} +36 -33
  12. package/dist/cdn/chunks/{banner-BLVKM07M.js → banner-DRANlf5k.js} +43 -37
  13. package/dist/cdn/chunks/{bar-split-view-Clbg-p9H.js → bar-split-view-B-Y2nqgS.js} +33 -30
  14. package/dist/cdn/chunks/blockquote-pUgJLPY1.js +241 -0
  15. package/dist/cdn/chunks/{box-WkhyjQVy.js → box-BbXHpBQy.js} +14 -12
  16. package/dist/cdn/chunks/{breadcrumbs-D9YxZzRj.js → breadcrumbs-BdF4m3DB.js} +41 -36
  17. package/dist/cdn/chunks/{button-DO90Lo6q.js → button-CsqNHH3w.js} +141 -127
  18. package/dist/cdn/chunks/{button-bar-Bxgdbyh3.js → button-bar-CnYIw4fN.js} +25 -21
  19. package/dist/cdn/chunks/{button-group-BYGPPLmZ.js → button-group-xaHghyon.js} +10 -10
  20. package/dist/cdn/chunks/{card-BP0jfOkS.js → card-Bbf0aCIh.js} +35 -33
  21. package/dist/cdn/chunks/{cell-BRD2ilQh.js → cell-Dggt5oYG.js} +24 -23
  22. package/dist/cdn/chunks/{checkbox-Cazx8CQn.js → checkbox-DmFAS8ec.js} +49 -43
  23. package/dist/cdn/chunks/{checkbox-field-DDZ-B6vH.js → checkbox-field-fOWPH8Q7.js} +37 -32
  24. package/dist/cdn/chunks/{class-map-CXSdNjt8.js → class-map-BWGTUNv4.js} +1 -1
  25. package/dist/cdn/chunks/{code-editor-D6Q55oaY.js → code-editor-CANFZX66.js} +56 -57
  26. package/dist/cdn/chunks/{code-viewer-DspLH2T1.js → code-viewer-C_vUEx7J.js} +160 -123
  27. package/dist/cdn/chunks/{codemirror-input-Db65x22n.js → codemirror-input-wexTiqWw.js} +5 -5
  28. package/dist/cdn/chunks/{collection-NVtkvDls.js → collection-_emTry5U.js} +36 -36
  29. package/dist/cdn/chunks/{combo-box-OywRKaWj.js → combo-box-CGwj1u4a.js} +77 -68
  30. package/dist/cdn/chunks/{container-rrbwk0z4.js → container-D5Dz-j6a.js} +62 -54
  31. package/dist/cdn/chunks/{custom-element-q6NzoL5b.js → custom-element-DbwbPetH.js} +1 -1
  32. package/dist/cdn/chunks/{date-field-vmZLo80s.js → date-field-ChmyLtTj.js} +93 -83
  33. package/dist/cdn/chunks/{date-picker-CXDzSBoL.js → date-picker-CUQKdjS4.js} +86 -78
  34. package/dist/cdn/chunks/{decorate-TduJMFD_.js → decorate-_JGq4E_7.js} +2 -2
  35. package/dist/cdn/chunks/{described-by-mixin-daRE7orX.js → described-by-mixin-DbnuGktP.js} +2 -2
  36. package/dist/cdn/chunks/{description-cell-CQwOj_rN.js → description-cell-BgcO7ObI.js} +27 -25
  37. package/dist/cdn/chunks/{dev-checks-zW_W-hnh.js → dev-checks-KAnKlxY0.js} +188 -80
  38. package/dist/cdn/chunks/{dist-C_dGY6zR.js → dist-BF9euKgj.js} +43 -43
  39. package/dist/cdn/chunks/{dist-BEfLdOvy.js → dist-BHMubC6P.js} +190 -196
  40. package/dist/cdn/chunks/{dist-ChmCRv39.js → dist-BJrN5nEM.js} +50 -50
  41. package/dist/cdn/chunks/{dist-D2qap2OY.js → dist-Bz3Isx60.js} +13 -13
  42. package/dist/cdn/chunks/{dist-DrTzvgE7.js → dist-CBnQQ6kV.js} +178 -188
  43. package/dist/cdn/chunks/{dist-EM4MWLQq.js → dist-CJLBwJx0.js} +120 -125
  44. package/dist/cdn/chunks/{dist-DPUBF0MZ.js → dist-CKZ98PMy.js} +362 -371
  45. package/dist/cdn/chunks/{dist-EgIBI-FG.js → dist-CLKJ5z0x.js} +26 -26
  46. package/dist/cdn/chunks/{dist-A7_1pHX0.js → dist-D7Wubc1l.js} +25 -25
  47. package/dist/cdn/chunks/{dist-Rm6FvrSR.js → dist-DADIyiX-.js} +55 -55
  48. package/dist/cdn/chunks/{dist-CP3G1pSK.js → dist-HgRt6IKh.js} +1 -1
  49. package/dist/cdn/chunks/{divider-CCNbnplA.js → divider-pO5O6wL4.js} +6 -6
  50. package/dist/cdn/chunks/{document-tab-bar-A2DFWrP9.js → document-tab-bar-C_-iuaUc.js} +74 -60
  51. package/dist/cdn/chunks/{dropdown-DZTZtkm5.js → dropdown-DYO6049g.js} +36 -31
  52. package/dist/cdn/chunks/{file-field-DQ52qq5L.js → file-field-C-Fk92rD.js} +134 -116
  53. package/dist/cdn/chunks/{form-hXLgy_tY.js → form-ChXBrKw6.js} +23 -9
  54. package/dist/cdn/chunks/{form-actions-C_7hINq-.js → form-actions-DrOX7nX8.js} +7 -7
  55. package/dist/cdn/chunks/{form-associated-mixin--GIbl98p.js → form-associated-mixin-BtStDDYA.js} +14 -3
  56. package/dist/cdn/chunks/{form-field--4nWJ_DK.js → form-field-CR2Py09O.js} +46 -39
  57. package/dist/cdn/chunks/{form-section-By-D4un0.js → form-section-s1mkLzaC.js} +1 -1
  58. package/dist/cdn/chunks/{full-bleed-section-Dg4sIJG1.js → full-bleed-section-vOVI_f86.js} +10 -10
  59. package/dist/cdn/chunks/{hero-CQQMNCT_.js → hero-Cb3qIvvh.js} +125 -116
  60. package/dist/cdn/chunks/{icon-BORlalt0.js → icon-DBhTZrnl.js} +89 -72
  61. package/dist/cdn/chunks/{icon-button-rKiIHs7A.js → icon-button-bDuQ_6W_.js} +109 -99
  62. package/dist/cdn/chunks/{icon-cell-rk4NQid2.js → icon-cell-DlSZNTF3.js} +32 -30
  63. package/dist/cdn/chunks/{identity-BLXecYsZ.js → identity-CJTVNI9J.js} +28 -26
  64. package/dist/cdn/chunks/{if-defined-CaKKERku.js → if-defined-28B8DYUB.js} +1 -1
  65. package/dist/cdn/chunks/{image-DZMW6JgL.js → image-DlTxyeL3.js} +100 -85
  66. package/dist/cdn/chunks/{inline-dialog-WlqtPBPJ.js → inline-dialog-BJlOrD6M.js} +32 -28
  67. package/dist/cdn/chunks/{just-in-time-education-DRcb5g7x.js → just-in-time-education-DWBDshKs.js} +47 -48
  68. package/dist/cdn/chunks/{kanban-Ca_mfqsA.js → kanban-DIXY8FcZ.js} +24 -24
  69. package/dist/cdn/chunks/{kanban-column-fgIMc7pw.js → kanban-column-DmnxctX6.js} +15 -13
  70. package/dist/cdn/chunks/{keyboard-shortcut-EknnW7Ub.js → keyboard-shortcut-kYOKwBqs.js} +25 -23
  71. package/dist/cdn/chunks/{languages-yKikVFv_.js → languages-DGtcUhLc.js} +12 -12
  72. package/dist/cdn/chunks/{link-FBSAJ3UC.js → link-DhnhhTOg.js} +42 -39
  73. package/dist/cdn/chunks/{link-group-90qVfKa0.js → link-group-Bx2nkQcS.js} +11 -11
  74. package/dist/cdn/chunks/{list-CaWl3q0Z.js → list-CXCG_IEc.js} +81 -44
  75. package/dist/cdn/chunks/{list-item-Cagnf6eG.js → list-item-CSNBaRlK.js} +185 -124
  76. package/dist/cdn/chunks/{list-item-segment-BRzBF1y_.js → list-item-segment-D6WvAh3A.js} +55 -53
  77. package/dist/cdn/chunks/{menu-BtxzRedh.js → menu-CKxKVA36.js} +58 -57
  78. package/dist/cdn/chunks/{menu-bar-item-C7LQ0NI_.js → menu-bar-item-C950rfSt.js} +35 -34
  79. package/dist/cdn/chunks/{menu-bar-BU3Hjk1b.js → menu-bar-xahTEYTX.js} +21 -21
  80. package/dist/cdn/chunks/{menu-divider-CLLRgMll.js → menu-divider-XlYJ4zQz.js} +6 -6
  81. package/dist/cdn/chunks/{menu-group-BL24ChpR.js → menu-group-E6hIEtLj.js} +8 -8
  82. package/dist/cdn/chunks/{menu-item-CooKfrFa.js → menu-item-2y0VC5Gb.js} +38 -36
  83. package/dist/cdn/chunks/menu-item.i18n-CKUJBOeE.js +7 -0
  84. package/dist/cdn/chunks/{menu.template-C6rbfI-u.js → menu.template-ZBhUFgBJ.js} +55 -34
  85. package/dist/cdn/chunks/{modal-dialog-BrUMP4Jm.js → modal-dialog-DdFpcRLJ.js} +37 -36
  86. package/dist/cdn/chunks/{multi-line-text-field-D7hXhyOn.js → multi-line-text-field-okvEa54Q.js} +51 -47
  87. package/dist/cdn/chunks/{navigation-split-view-B2ZQhxEb.js → navigation-split-view-dNRQDSpy.js} +72 -91
  88. package/dist/cdn/chunks/nl.generated-Bo4bmwYF.js +114 -0
  89. package/dist/cdn/chunks/{notification-DSGP14d1.js → notification-2tnwXEY1.js} +28 -25
  90. package/dist/cdn/chunks/{number-field-B8op14Y_.js → number-field-CH7EvpSq.js} +45 -39
  91. package/dist/cdn/chunks/{one-half-one-half-section-ZYmHYf4Q.js → one-half-one-half-section-UZDP-KO-.js} +11 -11
  92. package/dist/cdn/chunks/{one-third-two-thirds-section-Ds10K6AS.js → one-third-two-thirds-section-8KtESdXO.js} +11 -11
  93. package/dist/cdn/chunks/{one-time-code-field-Cgy_tTS4.js → one-time-code-field-Bvm3ND6e.js} +58 -54
  94. package/dist/cdn/chunks/{page-CBf_Decp.js → page-PK1FWuKJ.js} +44 -41
  95. package/dist/cdn/chunks/{page-footer-CSv1dU7M.js → page-footer-BamWKHwH.js} +68 -80
  96. package/dist/cdn/chunks/{page-section-mixin-Dp6X8GKd.js → page-section-mixin-3q59_Jo_.js} +39 -35
  97. package/dist/cdn/chunks/{pagination-CMUcFB53.js → pagination-47zAyQhM.js} +52 -45
  98. package/dist/cdn/chunks/{password-field-C76Vm3rm.js → password-field-FaU02DSW.js} +58 -54
  99. package/dist/cdn/chunks/{popover-CGbeEv_-.js → popover-642mOFR5.js} +97 -61
  100. package/dist/cdn/chunks/{progress-bar-BLiHaRUS.js → progress-bar-BivaNkIY.js} +57 -55
  101. package/dist/cdn/chunks/{progress-circle-CjkovRbL.js → progress-circle-ewL0JIcz.js} +57 -55
  102. package/dist/cdn/chunks/{radio-button-GHyO-GQB.js → radio-button-DvrYYSnm.js} +42 -42
  103. package/dist/cdn/chunks/{radio-button-field-C-Z6Lnd4.js → radio-button-field-BVi0YrTF.js} +29 -27
  104. package/dist/cdn/chunks/{radio-button-group-ChTqBCnQ.js → radio-button-group-DZ9OWUNe.js} +18 -18
  105. package/dist/cdn/chunks/{render-marked-DX_5ISZE.js → render-marked-CO31_4GS.js} +1 -1
  106. package/dist/cdn/chunks/{drag-handle-cell-CbzDYebG.js → reorder-handle-cell-Doetg58W.js} +39 -37
  107. package/dist/cdn/chunks/reorder-handle-cell.i18n-DlH2aVwd.js +3 -0
  108. package/dist/cdn/chunks/reorder-handle-mixin-DCjwUXr0.js +16 -0
  109. package/dist/cdn/chunks/{repeat-Ch_5OsXE.js → repeat-Wb4hkVZc.js} +1 -1
  110. package/dist/cdn/chunks/rich-text-Do08iiIz.js +58 -0
  111. package/dist/cdn/chunks/rolldown-runtime-CGnMp29N.js +10 -0
  112. package/dist/cdn/chunks/{row-header-mixin-CgqvREoV.js → row-header-mixin-CKR5rHBA.js} +2 -2
  113. package/dist/cdn/chunks/{search-field-BGNfERhn.js → search-field-CCeeGiJM.js} +75 -67
  114. package/dist/cdn/chunks/{segmented-control-BYAG4VRp.js → segmented-control-CWIPxEBq.js} +92 -82
  115. package/dist/cdn/chunks/shadow-resets-NKr5gQCc.js +28 -0
  116. package/dist/cdn/chunks/{sheet-CqN7ViYV.js → sheet-WOjBtZvN.js} +41 -39
  117. package/dist/cdn/chunks/{shell-C9rds_D9.js → shell-Brn0Dr8F.js} +26 -23
  118. package/dist/cdn/chunks/{side-by-side-split-view-C5oX4c6Z.js → side-by-side-split-view-DGIMsyma.js} +33 -30
  119. package/dist/cdn/chunks/{sidebar-section-CFPBdETU.js → sidebar-section-BXHeI8GN.js} +37 -32
  120. package/dist/cdn/chunks/{simple-section-qrCqXeBa.js → simple-section-C8lJZLAO.js} +12 -12
  121. package/dist/cdn/chunks/{skip-link-DWh4W6-J.js → skip-link-QdRgHljr.js} +20 -19
  122. package/dist/cdn/chunks/{slider--hODfOwh.js → slider-BhjBeWqc.js} +90 -84
  123. package/dist/cdn/chunks/{spacer-CFzq_JCh.js → spacer-BgkOjuUj.js} +11 -11
  124. package/dist/cdn/chunks/{spacer-cell-DuVOgIj8.js → spacer-cell-DBI0PVd7.js} +13 -12
  125. package/dist/cdn/chunks/{split-button-DH19p8So.js → split-button-DfD9vxPe.js} +45 -41
  126. package/dist/cdn/chunks/{split-view-divider-jzcPmnMh.js → split-view-divider-B4NFlri5.js} +10 -10
  127. package/dist/cdn/chunks/{split-view-pane-BLsZz263.js → split-view-pane-CwFf13hX.js} +27 -24
  128. package/dist/cdn/chunks/{stacked-split-view-CcOR8LrJ.js → stacked-split-view-BmbzTinq.js} +32 -29
  129. package/dist/cdn/chunks/{static-html-Cf4ccUIg.js → static-html-CZrcQRgC.js} +1 -1
  130. package/dist/cdn/chunks/{status-bar-CINbOihq.js → status-bar-CTOf_bDL.js} +25 -24
  131. package/dist/cdn/chunks/{step-bar-6FvZL1Ti.js → step-bar-B5vzvhz-.js} +64 -57
  132. package/dist/cdn/chunks/{step-cell-CejRisgS.js → step-cell-CUA-HUZv.js} +44 -40
  133. package/dist/cdn/chunks/{stepper-CY2rJWOJ.js → stepper-LxPTQ6HJ.js} +30 -30
  134. package/dist/cdn/chunks/{style-map-DsIw6lkq.js → style-map-DiIQAb_L.js} +1 -1
  135. package/dist/cdn/chunks/{swatch-picker-BY3DBIl6.js → swatch-picker-Cxv9HK3A.js} +48 -47
  136. package/dist/cdn/chunks/{switch-DDSsZFwK.js → switch-CbNSJQPp.js} +34 -32
  137. package/dist/cdn/chunks/{switch-field-CMoM9I38.js → switch-field-B8vOvcKc.js} +51 -30
  138. package/dist/cdn/chunks/{tab-bar-CA8K1XjU.js → tab-bar-D4ot_wZ4.js} +76 -70
  139. package/dist/cdn/chunks/{table-DwXjCSD5.js → table-uh4YPqda.js} +31 -31
  140. package/dist/cdn/chunks/{tag-DM3APy3B.js → tag-D2dCXT7A.js} +26 -25
  141. package/dist/cdn/chunks/{text-B1CatNR1.js → text-BX4Xm40t.js} +62 -77
  142. package/dist/cdn/chunks/{text-cell-BkEsGI3g.js → text-cell-DNCpmw9h.js} +57 -53
  143. package/dist/cdn/chunks/{text-editor-BvTiMeNV.js → text-editor-C6UKAmPL.js} +97 -71
  144. package/dist/cdn/chunks/{text-field-CUyh1-V8.js → text-field-Dmkd4mHV.js} +65 -56
  145. package/dist/cdn/chunks/{time-field--5K0YTcr.js → time-field-BfgNZbEb.js} +64 -60
  146. package/dist/cdn/chunks/{time-picker-W0xYXLy8.js → time-picker-C1SBkU-e.js} +91 -79
  147. package/dist/cdn/chunks/{title-BuT7tWqN.js → title-DFrd-Fsh.js} +119 -102
  148. package/dist/cdn/chunks/{title-cell-8d8psUBX.js → title-cell-CC1dQyth.js} +75 -74
  149. package/dist/cdn/chunks/{toggle-button-DNXWXZpE.js → toggle-button-bAX6uzgz.js} +80 -74
  150. package/dist/cdn/chunks/{toggle-button-group-ByowJYgs.js → toggle-button-group-B7CHBww5.js} +20 -20
  151. package/dist/cdn/chunks/{token-CnkEB3hB.js → token-CicHNqIk.js} +34 -32
  152. package/dist/cdn/chunks/{token-field-BpyxOGmU.js → token-field-BFynQ-T-.js} +78 -70
  153. package/dist/cdn/chunks/{toolbar-C24LqAzK.js → toolbar-hAmL7o23.js} +26 -26
  154. package/dist/cdn/chunks/{toolbar-item-DpPfPxCi.js → toolbar-item-CjgkcYJ2.js} +13 -13
  155. package/dist/cdn/chunks/{toolbar-title-KBMpfL9d.js → toolbar-title-B1acxCGx.js} +31 -31
  156. package/dist/cdn/chunks/{toolbar.styles-BQkG4gVc.js → toolbar.styles-xiyZx5D0.js} +7 -3
  157. package/dist/cdn/chunks/{tooltip-BsAHJjci.js → tooltip-Mj47t8v7.js} +72 -62
  158. package/dist/cdn/chunks/{top-navigation-bar-C_kLPVKD.js → top-navigation-bar-vP5QGBXd.js} +88 -86
  159. package/dist/cdn/chunks/{top-title-bar-iNFB2zQL.js → top-title-bar-Yt6cmRLj.js} +52 -44
  160. package/dist/cdn/chunks/translations-BMMzf2sX.js +14 -0
  161. package/dist/cdn/chunks/{two-thirds-one-third-section-D-UANbHC.js → two-thirds-one-third-section-BHN98jET.js} +11 -11
  162. package/dist/cdn/chunks/{validation-list-C5BhHZIG.js → validation-list-CUPzu9_z.js} +20 -19
  163. package/dist/cdn/chunks/{visibility-mixin-COAZ9pON.js → visibility-mixin-DPuxf-sj.js} +2 -2
  164. package/dist/cdn/chunks/{visually-hidden-BPgATaH0.js → visually-hidden-CvjJIBhz.js} +6 -6
  165. package/dist/cdn/chunks/{window-CxV6ELE9.js → window-BqGlzGaS.js} +41 -40
  166. package/dist/cdn/chunks/with-translations-CRvWJWep.js +16 -0
  167. package/dist/components/actions/button/button.d.ts +2 -2
  168. package/dist/components/actions/button/button.js +1 -1
  169. package/dist/components/actions/button/button.styles.d.ts.map +1 -1
  170. package/dist/components/actions/button/button.styles.js +39 -26
  171. package/dist/components/actions/button/button.styles.js.map +1 -1
  172. package/dist/components/actions/button/button.template.js +1 -1
  173. package/dist/components/actions/button-bar/button-bar.d.ts +1 -1
  174. package/dist/components/actions/button-bar/button-bar.js +1 -1
  175. package/dist/components/actions/button-bar/button-bar.styles.d.ts.map +1 -1
  176. package/dist/components/actions/button-bar/button-bar.styles.js +12 -8
  177. package/dist/components/actions/button-bar/button-bar.styles.js.map +1 -1
  178. package/dist/components/actions/icon-button/icon-button.d.ts +2 -2
  179. package/dist/components/actions/icon-button/icon-button.js +1 -1
  180. package/dist/components/actions/icon-button/icon-button.styles.d.ts.map +1 -1
  181. package/dist/components/actions/icon-button/icon-button.styles.js +29 -20
  182. package/dist/components/actions/icon-button/icon-button.styles.js.map +1 -1
  183. package/dist/components/actions/menu/menu-item.d.ts +15 -1
  184. package/dist/components/actions/menu/menu-item.d.ts.map +1 -1
  185. package/dist/components/actions/menu/menu-item.i18n.d.ts +7 -0
  186. package/dist/components/actions/menu/menu-item.i18n.d.ts.map +1 -0
  187. package/dist/components/actions/menu/menu-item.i18n.js +6 -0
  188. package/dist/components/actions/menu/menu-item.i18n.js.map +1 -0
  189. package/dist/components/actions/menu/menu-item.js +14 -1
  190. package/dist/components/actions/menu/menu-item.js.map +1 -1
  191. package/dist/components/actions/menu/menu.styles.d.ts.map +1 -1
  192. package/dist/components/actions/menu/menu.styles.js +18 -1
  193. package/dist/components/actions/menu/menu.styles.js.map +1 -1
  194. package/dist/components/actions/menu/menu.template.d.ts.map +1 -1
  195. package/dist/components/actions/menu/menu.template.js +8 -2
  196. package/dist/components/actions/menu/menu.template.js.map +1 -1
  197. package/dist/components/actions/split-button/split-button.d.ts +2 -2
  198. package/dist/components/actions/split-button/split-button.d.ts.map +1 -1
  199. package/dist/components/actions/split-button/split-button.js +1 -1
  200. package/dist/components/actions/split-button/split-button.styles.d.ts.map +1 -1
  201. package/dist/components/actions/split-button/split-button.styles.js +12 -8
  202. package/dist/components/actions/split-button/split-button.styles.js.map +1 -1
  203. package/dist/components/actions/toolbar/toolbar.story-sync.js +1 -1
  204. package/dist/components/actions/toolbar/toolbar.story-sync.js.map +1 -1
  205. package/dist/components/actions/toolbar/toolbar.styles.d.ts.map +1 -1
  206. package/dist/components/actions/toolbar/toolbar.styles.js +4 -0
  207. package/dist/components/actions/toolbar/toolbar.styles.js.map +1 -1
  208. package/dist/components/content/avatar/avatar.d.ts +7 -5
  209. package/dist/components/content/avatar/avatar.d.ts.map +1 -1
  210. package/dist/components/content/avatar/avatar.js +7 -5
  211. package/dist/components/content/avatar/avatar.js.map +1 -1
  212. package/dist/components/content/avatar/avatar.styles.d.ts.map +1 -1
  213. package/dist/components/content/avatar/avatar.styles.js +13 -12
  214. package/dist/components/content/avatar/avatar.styles.js.map +1 -1
  215. package/dist/components/content/avatar-group/avatar-group.d.ts +1 -1
  216. package/dist/components/content/avatar-group/avatar-group.js +1 -1
  217. package/dist/components/content/avatar-group/avatar-group.styles.d.ts.map +1 -1
  218. package/dist/components/content/avatar-group/avatar-group.styles.js +2 -1
  219. package/dist/components/content/avatar-group/avatar-group.styles.js.map +1 -1
  220. package/dist/components/content/blockquote/blockquote.d.ts +9 -1
  221. package/dist/components/content/blockquote/blockquote.d.ts.map +1 -1
  222. package/dist/components/content/blockquote/blockquote.js +23 -7
  223. package/dist/components/content/blockquote/blockquote.js.map +1 -1
  224. package/dist/components/content/blockquote/blockquote.styles.d.ts.map +1 -1
  225. package/dist/components/content/blockquote/blockquote.styles.js +52 -10
  226. package/dist/components/content/blockquote/blockquote.styles.js.map +1 -1
  227. package/dist/components/content/code-viewer/code-viewer.d.ts +5 -0
  228. package/dist/components/content/code-viewer/code-viewer.d.ts.map +1 -1
  229. package/dist/components/content/code-viewer/code-viewer.js +20 -1
  230. package/dist/components/content/code-viewer/code-viewer.js.map +1 -1
  231. package/dist/components/content/code-viewer/code-viewer.styles.d.ts.map +1 -1
  232. package/dist/components/content/code-viewer/code-viewer.styles.js +37 -8
  233. package/dist/components/content/code-viewer/code-viewer.styles.js.map +1 -1
  234. package/dist/components/content/code-viewer/code-viewer.template.js +1 -1
  235. package/dist/components/content/code-viewer/code-viewer.template.js.map +1 -1
  236. package/dist/components/content/icon/icon.d.ts +17 -15
  237. package/dist/components/content/icon/icon.d.ts.map +1 -1
  238. package/dist/components/content/icon/icon.js +19 -17
  239. package/dist/components/content/icon/icon.js.map +1 -1
  240. package/dist/components/content/icon/icon.styles.d.ts.map +1 -1
  241. package/dist/components/content/icon/icon.styles.js +47 -24
  242. package/dist/components/content/icon/icon.styles.js.map +1 -1
  243. package/dist/components/content/identity/identity.styles.d.ts.map +1 -1
  244. package/dist/components/content/identity/identity.styles.js +2 -0
  245. package/dist/components/content/identity/identity.styles.js.map +1 -1
  246. package/dist/components/content/image/image.d.ts +6 -2
  247. package/dist/components/content/image/image.d.ts.map +1 -1
  248. package/dist/components/content/image/image.js +28 -15
  249. package/dist/components/content/image/image.js.map +1 -1
  250. package/dist/components/content/image/image.styles.d.ts.map +1 -1
  251. package/dist/components/content/image/image.styles.js +34 -25
  252. package/dist/components/content/image/image.styles.js.map +1 -1
  253. package/dist/components/content/image/image.template.d.ts.map +1 -1
  254. package/dist/components/content/image/image.template.js +6 -8
  255. package/dist/components/content/image/image.template.js.map +1 -1
  256. package/dist/components/content/keyboard-shortcut/keyboard-shortcut.d.ts +5 -5
  257. package/dist/components/content/keyboard-shortcut/keyboard-shortcut.js +4 -4
  258. package/dist/components/content/keyboard-shortcut/keyboard-shortcut.styles.d.ts.map +1 -1
  259. package/dist/components/content/keyboard-shortcut/keyboard-shortcut.styles.js +5 -3
  260. package/dist/components/content/keyboard-shortcut/keyboard-shortcut.styles.js.map +1 -1
  261. package/dist/components/content/rich-text/rich-text.d.ts +9 -7
  262. package/dist/components/content/rich-text/rich-text.d.ts.map +1 -1
  263. package/dist/components/content/rich-text/rich-text.js +40 -12
  264. package/dist/components/content/rich-text/rich-text.js.map +1 -1
  265. package/dist/components/content/tag/tag.styles.d.ts.map +1 -1
  266. package/dist/components/content/tag/tag.styles.js +1 -0
  267. package/dist/components/content/tag/tag.styles.js.map +1 -1
  268. package/dist/components/content/text/text.d.ts +2 -2
  269. package/dist/components/content/text/text.d.ts.map +1 -1
  270. package/dist/components/content/text/text.js +1 -1
  271. package/dist/components/content/text/text.styles.d.ts.map +1 -1
  272. package/dist/components/content/text/text.styles.js +17 -32
  273. package/dist/components/content/text/text.styles.js.map +1 -1
  274. package/dist/components/content/title/title.d.ts +26 -17
  275. package/dist/components/content/title/title.d.ts.map +1 -1
  276. package/dist/components/content/title/title.js +38 -20
  277. package/dist/components/content/title/title.js.map +1 -1
  278. package/dist/components/content/title/title.styles.d.ts.map +1 -1
  279. package/dist/components/content/title/title.styles.js +84 -69
  280. package/dist/components/content/title/title.styles.js.map +1 -1
  281. package/dist/components/content/token/token.styles.d.ts.map +1 -1
  282. package/dist/components/content/token/token.styles.js +4 -2
  283. package/dist/components/content/token/token.styles.js.map +1 -1
  284. package/dist/components/content/tooltip/tooltip.d.ts +1 -1
  285. package/dist/components/content/tooltip/tooltip.d.ts.map +1 -1
  286. package/dist/components/content/tooltip/tooltip.js +5 -3
  287. package/dist/components/content/tooltip/tooltip.js.map +1 -1
  288. package/dist/components/content/tooltip/tooltip.styles.d.ts.map +1 -1
  289. package/dist/components/content/tooltip/tooltip.styles.js +18 -5
  290. package/dist/components/content/tooltip/tooltip.styles.js.map +1 -1
  291. package/dist/components/content/tooltip/tooltip.template.js +1 -1
  292. package/dist/components/forms/form/form.d.ts +11 -0
  293. package/dist/components/forms/form/form.d.ts.map +1 -1
  294. package/dist/components/forms/form/form.js +56 -4
  295. package/dist/components/forms/form/form.js.map +1 -1
  296. package/dist/components/forms/form-field/form-field.styles.d.ts.map +1 -1
  297. package/dist/components/forms/form-field/form-field.styles.js +10 -3
  298. package/dist/components/forms/form-field/form-field.styles.js.map +1 -1
  299. package/dist/components/forms/validation-list/validation-list.styles.d.ts.map +1 -1
  300. package/dist/components/forms/validation-list/validation-list.styles.js +1 -0
  301. package/dist/components/forms/validation-list/validation-list.styles.js.map +1 -1
  302. package/dist/components/index.d.ts +1 -1
  303. package/dist/components/index.d.ts.map +1 -1
  304. package/dist/components/index.js +1 -1
  305. package/dist/components/index.js.map +1 -1
  306. package/dist/components/inputs/checkbox/checkbox.d.ts +3 -3
  307. package/dist/components/inputs/checkbox/checkbox.js +2 -2
  308. package/dist/components/inputs/checkbox/checkbox.styles.d.ts.map +1 -1
  309. package/dist/components/inputs/checkbox/checkbox.styles.js +23 -18
  310. package/dist/components/inputs/checkbox/checkbox.styles.js.map +1 -1
  311. package/dist/components/inputs/checkbox-field/checkbox-field.d.ts +7 -4
  312. package/dist/components/inputs/checkbox-field/checkbox-field.d.ts.map +1 -1
  313. package/dist/components/inputs/checkbox-field/checkbox-field.js +8 -3
  314. package/dist/components/inputs/checkbox-field/checkbox-field.js.map +1 -1
  315. package/dist/components/inputs/checkbox-field/checkbox-field.styles.d.ts.map +1 -1
  316. package/dist/components/inputs/checkbox-field/checkbox-field.styles.js +4 -2
  317. package/dist/components/inputs/checkbox-field/checkbox-field.styles.js.map +1 -1
  318. package/dist/components/inputs/code-editor/code-editor.d.ts +9 -11
  319. package/dist/components/inputs/code-editor/code-editor.d.ts.map +1 -1
  320. package/dist/components/inputs/code-editor/code-editor.js +3 -3
  321. package/dist/components/inputs/code-editor/code-editor.js.map +1 -1
  322. package/dist/components/inputs/code-editor/code-editor.styles.d.ts.map +1 -1
  323. package/dist/components/inputs/code-editor/code-editor.styles.js +24 -25
  324. package/dist/components/inputs/code-editor/code-editor.styles.js.map +1 -1
  325. package/dist/components/inputs/combo-box/combo-box.styles.d.ts.map +1 -1
  326. package/dist/components/inputs/combo-box/combo-box.styles.js +9 -0
  327. package/dist/components/inputs/combo-box/combo-box.styles.js.map +1 -1
  328. package/dist/components/inputs/date-field/date-field.styles.d.ts.map +1 -1
  329. package/dist/components/inputs/date-field/date-field.styles.js +10 -0
  330. package/dist/components/inputs/date-field/date-field.styles.js.map +1 -1
  331. package/dist/components/inputs/date-picker/date-picker.styles.d.ts.map +1 -1
  332. package/dist/components/inputs/date-picker/date-picker.styles.js +8 -0
  333. package/dist/components/inputs/date-picker/date-picker.styles.js.map +1 -1
  334. package/dist/components/inputs/dropdown/dropdown.styles.d.ts.map +1 -1
  335. package/dist/components/inputs/dropdown/dropdown.styles.js +5 -0
  336. package/dist/components/inputs/dropdown/dropdown.styles.js.map +1 -1
  337. package/dist/components/inputs/file-field/file-field.styles.d.ts.map +1 -1
  338. package/dist/components/inputs/file-field/file-field.styles.js +18 -0
  339. package/dist/components/inputs/file-field/file-field.styles.js.map +1 -1
  340. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.d.ts.map +1 -1
  341. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.js +4 -0
  342. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.js.map +1 -1
  343. package/dist/components/inputs/number-field/number-field.styles.d.ts.map +1 -1
  344. package/dist/components/inputs/number-field/number-field.styles.js +6 -0
  345. package/dist/components/inputs/number-field/number-field.styles.js.map +1 -1
  346. package/dist/components/inputs/one-time-code-field/one-time-code-field.d.ts +3 -3
  347. package/dist/components/inputs/one-time-code-field/one-time-code-field.d.ts.map +1 -1
  348. package/dist/components/inputs/one-time-code-field/one-time-code-field.js +4 -4
  349. package/dist/components/inputs/one-time-code-field/one-time-code-field.js.map +1 -1
  350. package/dist/components/inputs/one-time-code-field/one-time-code-field.styles.d.ts.map +1 -1
  351. package/dist/components/inputs/one-time-code-field/one-time-code-field.styles.js +4 -0
  352. package/dist/components/inputs/one-time-code-field/one-time-code-field.styles.js.map +1 -1
  353. package/dist/components/inputs/password-field/password-field.styles.d.ts.map +1 -1
  354. package/dist/components/inputs/password-field/password-field.styles.js +4 -0
  355. package/dist/components/inputs/password-field/password-field.styles.js.map +1 -1
  356. package/dist/components/inputs/radio-button/radio-button.d.ts +3 -3
  357. package/dist/components/inputs/radio-button/radio-button.js +2 -2
  358. package/dist/components/inputs/radio-button/radio-button.styles.js +13 -13
  359. package/dist/components/inputs/radio-button-field/radio-button-field.d.ts +3 -3
  360. package/dist/components/inputs/radio-button-field/radio-button-field.js +2 -2
  361. package/dist/components/inputs/radio-button-field/radio-button-field.styles.d.ts.map +1 -1
  362. package/dist/components/inputs/radio-button-field/radio-button-field.styles.js +4 -2
  363. package/dist/components/inputs/radio-button-field/radio-button-field.styles.js.map +1 -1
  364. package/dist/components/inputs/search-field/search-field.styles.d.ts.map +1 -1
  365. package/dist/components/inputs/search-field/search-field.styles.js +8 -0
  366. package/dist/components/inputs/search-field/search-field.styles.js.map +1 -1
  367. package/dist/components/inputs/segmented-control/segmented-control.styles.d.ts.map +1 -1
  368. package/dist/components/inputs/segmented-control/segmented-control.styles.js +10 -0
  369. package/dist/components/inputs/segmented-control/segmented-control.styles.js.map +1 -1
  370. package/dist/components/inputs/slider/slider.styles.d.ts.map +1 -1
  371. package/dist/components/inputs/slider/slider.styles.js +7 -1
  372. package/dist/components/inputs/slider/slider.styles.js.map +1 -1
  373. package/dist/components/inputs/swatch-picker/swatch-picker.d.ts +1 -1
  374. package/dist/components/inputs/swatch-picker/swatch-picker.js +1 -1
  375. package/dist/components/inputs/swatch-picker/swatch-picker.styles.d.ts.map +1 -1
  376. package/dist/components/inputs/swatch-picker/swatch-picker.styles.js +1 -0
  377. package/dist/components/inputs/swatch-picker/swatch-picker.styles.js.map +1 -1
  378. package/dist/components/inputs/switch/switch.d.ts +3 -3
  379. package/dist/components/inputs/switch/switch.js +2 -2
  380. package/dist/components/inputs/switch/switch.styles.d.ts.map +1 -1
  381. package/dist/components/inputs/switch/switch.styles.js +7 -6
  382. package/dist/components/inputs/switch/switch.styles.js.map +1 -1
  383. package/dist/components/inputs/switch-field/switch-field.d.ts +15 -4
  384. package/dist/components/inputs/switch-field/switch-field.d.ts.map +1 -1
  385. package/dist/components/inputs/switch-field/switch-field.js +26 -4
  386. package/dist/components/inputs/switch-field/switch-field.js.map +1 -1
  387. package/dist/components/inputs/switch-field/switch-field.styles.d.ts.map +1 -1
  388. package/dist/components/inputs/switch-field/switch-field.styles.js +4 -2
  389. package/dist/components/inputs/switch-field/switch-field.styles.js.map +1 -1
  390. package/dist/components/inputs/text-editor/text-editor.d.ts +2 -3
  391. package/dist/components/inputs/text-editor/text-editor.d.ts.map +1 -1
  392. package/dist/components/inputs/text-editor/text-editor.js +24 -17
  393. package/dist/components/inputs/text-editor/text-editor.js.map +1 -1
  394. package/dist/components/inputs/text-editor/text-editor.markdown.d.ts.map +1 -1
  395. package/dist/components/inputs/text-editor/text-editor.markdown.js +3 -1
  396. package/dist/components/inputs/text-editor/text-editor.markdown.js.map +1 -1
  397. package/dist/components/inputs/text-editor/text-editor.mentions.d.ts +1 -1
  398. package/dist/components/inputs/text-editor/text-editor.styles.d.ts.map +1 -1
  399. package/dist/components/inputs/text-editor/text-editor.styles.js +45 -19
  400. package/dist/components/inputs/text-editor/text-editor.styles.js.map +1 -1
  401. package/dist/components/inputs/text-field/text-field.styles.d.ts.map +1 -1
  402. package/dist/components/inputs/text-field/text-field.styles.js +9 -0
  403. package/dist/components/inputs/text-field/text-field.styles.js.map +1 -1
  404. package/dist/components/inputs/time-field/time-field.styles.d.ts.map +1 -1
  405. package/dist/components/inputs/time-field/time-field.styles.js +4 -0
  406. package/dist/components/inputs/time-field/time-field.styles.js.map +1 -1
  407. package/dist/components/inputs/time-picker/time-picker.d.ts +28 -19
  408. package/dist/components/inputs/time-picker/time-picker.d.ts.map +1 -1
  409. package/dist/components/inputs/time-picker/time-picker.js +78 -51
  410. package/dist/components/inputs/time-picker/time-picker.js.map +1 -1
  411. package/dist/components/inputs/time-picker/time-picker.styles.d.ts.map +1 -1
  412. package/dist/components/inputs/time-picker/time-picker.styles.js +7 -1
  413. package/dist/components/inputs/time-picker/time-picker.styles.js.map +1 -1
  414. package/dist/components/inputs/time-picker/time-picker.template.d.ts.map +1 -1
  415. package/dist/components/inputs/time-picker/time-picker.template.js +1 -0
  416. package/dist/components/inputs/time-picker/time-picker.template.js.map +1 -1
  417. package/dist/components/inputs/toggle-button/toggle-button.styles.d.ts.map +1 -1
  418. package/dist/components/inputs/toggle-button/toggle-button.styles.js +6 -0
  419. package/dist/components/inputs/toggle-button/toggle-button.styles.js.map +1 -1
  420. package/dist/components/inputs/token-field/token-field.styles.d.ts.map +1 -1
  421. package/dist/components/inputs/token-field/token-field.styles.js +9 -1
  422. package/dist/components/inputs/token-field/token-field.styles.js.map +1 -1
  423. package/dist/components/layout/box/box.styles.d.ts.map +1 -1
  424. package/dist/components/layout/box/box.styles.js +3 -1
  425. package/dist/components/layout/box/box.styles.js.map +1 -1
  426. package/dist/components/layout/card/card.styles.d.ts.map +1 -1
  427. package/dist/components/layout/card/card.styles.js +5 -3
  428. package/dist/components/layout/card/card.styles.js.map +1 -1
  429. package/dist/components/layout/container/container.d.ts +7 -0
  430. package/dist/components/layout/container/container.d.ts.map +1 -1
  431. package/dist/components/layout/container/container.js +30 -0
  432. package/dist/components/layout/container/container.js.map +1 -1
  433. package/dist/components/layout/kanban/kanban-column.d.ts +1 -1
  434. package/dist/components/layout/kanban/kanban-column.js +1 -1
  435. package/dist/components/layout/kanban/kanban.d.ts +7 -7
  436. package/dist/components/layout/kanban/kanban.js +9 -9
  437. package/dist/components/layout/kanban/kanban.js.map +1 -1
  438. package/dist/components/layout/kanban/kanban.styles.d.ts.map +1 -1
  439. package/dist/components/layout/kanban/kanban.styles.js +2 -0
  440. package/dist/components/layout/kanban/kanban.styles.js.map +1 -1
  441. package/dist/components/layout/page/page.styles.d.ts.map +1 -1
  442. package/dist/components/layout/page/page.styles.js +8 -5
  443. package/dist/components/layout/page/page.styles.js.map +1 -1
  444. package/dist/components/layout/page-footer/page-footer.d.ts +4 -0
  445. package/dist/components/layout/page-footer/page-footer.d.ts.map +1 -1
  446. package/dist/components/layout/page-footer/page-footer.js +7 -12
  447. package/dist/components/layout/page-footer/page-footer.js.map +1 -1
  448. package/dist/components/layout/page-footer/page-footer.styles.d.ts.map +1 -1
  449. package/dist/components/layout/page-footer/page-footer.styles.js +9 -21
  450. package/dist/components/layout/page-footer/page-footer.styles.js.map +1 -1
  451. package/dist/components/layout/page-footer/page-footer.template.d.ts.map +1 -1
  452. package/dist/components/layout/page-footer/page-footer.template.js +1 -4
  453. package/dist/components/layout/page-footer/page-footer.template.js.map +1 -1
  454. package/dist/components/layout/page-sections/hero/hero.d.ts +3 -4
  455. package/dist/components/layout/page-sections/hero/hero.d.ts.map +1 -1
  456. package/dist/components/layout/page-sections/hero/hero.js +3 -4
  457. package/dist/components/layout/page-sections/hero/hero.js.map +1 -1
  458. package/dist/components/layout/page-sections/hero/hero.styles.d.ts.map +1 -1
  459. package/dist/components/layout/page-sections/hero/hero.styles.js +14 -5
  460. package/dist/components/layout/page-sections/hero/hero.styles.js.map +1 -1
  461. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts +2 -2
  462. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts.map +1 -1
  463. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js +21 -2
  464. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js.map +1 -1
  465. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.styles.js +1 -1
  466. package/dist/components/layout/popover/popover.d.ts +24 -2
  467. package/dist/components/layout/popover/popover.d.ts.map +1 -1
  468. package/dist/components/layout/popover/popover.js +106 -11
  469. package/dist/components/layout/popover/popover.js.map +1 -1
  470. package/dist/components/layout/popover/popover.styles.d.ts.map +1 -1
  471. package/dist/components/layout/popover/popover.styles.js +9 -1
  472. package/dist/components/layout/popover/popover.styles.js.map +1 -1
  473. package/dist/components/layout/sheet/sheet.styles.d.ts.map +1 -1
  474. package/dist/components/layout/sheet/sheet.styles.js +3 -1
  475. package/dist/components/layout/sheet/sheet.styles.js.map +1 -1
  476. package/dist/components/layout/shell/shell.d.ts +1 -1
  477. package/dist/components/layout/shell/shell.js +1 -1
  478. package/dist/components/layout/shell/shell.styles.d.ts.map +1 -1
  479. package/dist/components/layout/shell/shell.styles.js +6 -3
  480. package/dist/components/layout/shell/shell.styles.js.map +1 -1
  481. package/dist/components/layout/split-views/bar-split-view/bar-split-view.d.ts +1 -1
  482. package/dist/components/layout/split-views/bar-split-view/bar-split-view.js +1 -1
  483. package/dist/components/layout/split-views/bar-split-view/bar-split-view.styles.d.ts.map +1 -1
  484. package/dist/components/layout/split-views/bar-split-view/bar-split-view.styles.js +8 -5
  485. package/dist/components/layout/split-views/bar-split-view/bar-split-view.styles.js.map +1 -1
  486. package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.d.ts +0 -28
  487. package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.d.ts.map +1 -1
  488. package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.js +10 -57
  489. package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.js.map +1 -1
  490. package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.styles.d.ts.map +1 -1
  491. package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.styles.js +8 -5
  492. package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.styles.js.map +1 -1
  493. package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.template.d.ts.map +1 -1
  494. package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.template.js +2 -4
  495. package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.template.js.map +1 -1
  496. package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.styles.d.ts.map +1 -1
  497. package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.styles.js +8 -5
  498. package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.styles.js.map +1 -1
  499. package/dist/components/layout/split-views/split-view-pane/split-view-pane.d.ts +2 -2
  500. package/dist/components/layout/split-views/split-view-pane/split-view-pane.js +2 -2
  501. package/dist/components/layout/split-views/split-view-pane/split-view-pane.styles.d.ts.map +1 -1
  502. package/dist/components/layout/split-views/split-view-pane/split-view-pane.styles.js +8 -5
  503. package/dist/components/layout/split-views/split-view-pane/split-view-pane.styles.js.map +1 -1
  504. package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.styles.d.ts.map +1 -1
  505. package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.styles.js +8 -5
  506. package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.styles.js.map +1 -1
  507. package/dist/components/layout/window/window.styles.d.ts.map +1 -1
  508. package/dist/components/layout/window/window.styles.js +3 -2
  509. package/dist/components/layout/window/window.styles.js.map +1 -1
  510. package/dist/components/lists-and-tables/cells/cell/cell.d.ts +2 -0
  511. package/dist/components/lists-and-tables/cells/cell/cell.d.ts.map +1 -1
  512. package/dist/components/lists-and-tables/cells/cell/cell.js +2 -1
  513. package/dist/components/lists-and-tables/cells/cell/cell.js.map +1 -1
  514. package/dist/components/lists-and-tables/cells/description-cell/description-cell.d.ts +2 -0
  515. package/dist/components/lists-and-tables/cells/description-cell/description-cell.d.ts.map +1 -1
  516. package/dist/components/lists-and-tables/cells/description-cell/description-cell.js +2 -1
  517. package/dist/components/lists-and-tables/cells/description-cell/description-cell.js.map +1 -1
  518. package/dist/components/lists-and-tables/cells/description-cell/description-cell.styles.d.ts.map +1 -1
  519. package/dist/components/lists-and-tables/cells/description-cell/description-cell.styles.js +3 -2
  520. package/dist/components/lists-and-tables/cells/description-cell/description-cell.styles.js.map +1 -1
  521. package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.d.ts +2 -0
  522. package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.d.ts.map +1 -1
  523. package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.js +2 -1
  524. package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.js.map +1 -1
  525. package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.styles.js +6 -6
  526. package/dist/components/lists-and-tables/cells/reorder-handle-cell/reorder-handle-cell.d.ts +46 -0
  527. package/dist/components/lists-and-tables/cells/reorder-handle-cell/reorder-handle-cell.d.ts.map +1 -0
  528. package/dist/components/lists-and-tables/cells/reorder-handle-cell/reorder-handle-cell.i18n.d.ts +5 -0
  529. package/dist/components/lists-and-tables/cells/reorder-handle-cell/reorder-handle-cell.i18n.d.ts.map +1 -0
  530. package/dist/components/lists-and-tables/cells/reorder-handle-cell/reorder-handle-cell.i18n.js +4 -0
  531. package/dist/components/lists-and-tables/cells/reorder-handle-cell/reorder-handle-cell.i18n.js.map +1 -0
  532. package/dist/components/lists-and-tables/cells/{drag-handle-cell/drag-handle-cell.js → reorder-handle-cell/reorder-handle-cell.js} +24 -24
  533. package/dist/components/lists-and-tables/cells/reorder-handle-cell/reorder-handle-cell.js.map +1 -0
  534. package/dist/components/lists-and-tables/cells/reorder-handle-cell/reorder-handle-cell.styles.d.ts +2 -0
  535. package/dist/components/lists-and-tables/cells/reorder-handle-cell/reorder-handle-cell.styles.d.ts.map +1 -0
  536. package/dist/components/lists-and-tables/cells/{drag-handle-cell/drag-handle-cell.styles.js → reorder-handle-cell/reorder-handle-cell.styles.js} +15 -14
  537. package/dist/components/lists-and-tables/cells/reorder-handle-cell/reorder-handle-cell.styles.js.map +1 -0
  538. package/dist/components/lists-and-tables/cells/{drag-handle-cell/drag-handle-cell.template.d.ts → reorder-handle-cell/reorder-handle-cell.template.d.ts} +1 -1
  539. package/dist/components/lists-and-tables/cells/reorder-handle-cell/reorder-handle-cell.template.d.ts.map +1 -0
  540. package/dist/components/lists-and-tables/cells/{drag-handle-cell/drag-handle-cell.template.js → reorder-handle-cell/reorder-handle-cell.template.js} +4 -4
  541. package/dist/components/lists-and-tables/cells/reorder-handle-cell/reorder-handle-cell.template.js.map +1 -0
  542. package/dist/components/lists-and-tables/cells/spacer-cell/spacer-cell.d.ts +2 -0
  543. package/dist/components/lists-and-tables/cells/spacer-cell/spacer-cell.d.ts.map +1 -1
  544. package/dist/components/lists-and-tables/cells/spacer-cell/spacer-cell.js +2 -1
  545. package/dist/components/lists-and-tables/cells/spacer-cell/spacer-cell.js.map +1 -1
  546. package/dist/components/lists-and-tables/cells/step-cell/step-cell.d.ts +2 -0
  547. package/dist/components/lists-and-tables/cells/step-cell/step-cell.d.ts.map +1 -1
  548. package/dist/components/lists-and-tables/cells/step-cell/step-cell.js +2 -1
  549. package/dist/components/lists-and-tables/cells/step-cell/step-cell.js.map +1 -1
  550. package/dist/components/lists-and-tables/cells/step-cell/step-cell.styles.d.ts.map +1 -1
  551. package/dist/components/lists-and-tables/cells/step-cell/step-cell.styles.js +4 -1
  552. package/dist/components/lists-and-tables/cells/step-cell/step-cell.styles.js.map +1 -1
  553. package/dist/components/lists-and-tables/cells/text-cell/text-cell.d.ts +7 -3
  554. package/dist/components/lists-and-tables/cells/text-cell/text-cell.d.ts.map +1 -1
  555. package/dist/components/lists-and-tables/cells/text-cell/text-cell.js +7 -4
  556. package/dist/components/lists-and-tables/cells/text-cell/text-cell.js.map +1 -1
  557. package/dist/components/lists-and-tables/cells/text-cell/text-cell.styles.d.ts.map +1 -1
  558. package/dist/components/lists-and-tables/cells/text-cell/text-cell.styles.js +14 -11
  559. package/dist/components/lists-and-tables/cells/text-cell/text-cell.styles.js.map +1 -1
  560. package/dist/components/lists-and-tables/cells/title-cell/title-cell.d.ts +7 -5
  561. package/dist/components/lists-and-tables/cells/title-cell/title-cell.d.ts.map +1 -1
  562. package/dist/components/lists-and-tables/cells/title-cell/title-cell.js +4 -3
  563. package/dist/components/lists-and-tables/cells/title-cell/title-cell.js.map +1 -1
  564. package/dist/components/lists-and-tables/cells/title-cell/title-cell.styles.d.ts.map +1 -1
  565. package/dist/components/lists-and-tables/cells/title-cell/title-cell.styles.js +19 -16
  566. package/dist/components/lists-and-tables/cells/title-cell/title-cell.styles.js.map +1 -1
  567. package/dist/components/lists-and-tables/list/list.d.ts +3 -2
  568. package/dist/components/lists-and-tables/list/list.d.ts.map +1 -1
  569. package/dist/components/lists-and-tables/list/list.js +15 -21
  570. package/dist/components/lists-and-tables/list/list.js.map +1 -1
  571. package/dist/components/lists-and-tables/list/list.styles.d.ts.map +1 -1
  572. package/dist/components/lists-and-tables/list/list.styles.js +40 -5
  573. package/dist/components/lists-and-tables/list/list.styles.js.map +1 -1
  574. package/dist/components/lists-and-tables/list-item/list-item.d.ts +31 -15
  575. package/dist/components/lists-and-tables/list-item/list-item.d.ts.map +1 -1
  576. package/dist/components/lists-and-tables/list-item/list-item.js +107 -154
  577. package/dist/components/lists-and-tables/list-item/list-item.js.map +1 -1
  578. package/dist/components/lists-and-tables/list-item/list-item.styles.d.ts.map +1 -1
  579. package/dist/components/lists-and-tables/list-item/list-item.styles.js +30 -23
  580. package/dist/components/lists-and-tables/list-item/list-item.styles.js.map +1 -1
  581. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.d.ts.map +1 -1
  582. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.js +11 -9
  583. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.js.map +1 -1
  584. package/dist/components/lists-and-tables/table/table.d.ts +4 -4
  585. package/dist/components/lists-and-tables/table/table.js +5 -5
  586. package/dist/components/lists-and-tables/table/table.js.map +1 -1
  587. package/dist/components/navigation/breadcrumbs/breadcrumbs.styles.d.ts.map +1 -1
  588. package/dist/components/navigation/breadcrumbs/breadcrumbs.styles.js +8 -3
  589. package/dist/components/navigation/breadcrumbs/breadcrumbs.styles.js.map +1 -1
  590. package/dist/components/navigation/document-tab-bar/document-tab-bar.d.ts +6 -6
  591. package/dist/components/navigation/document-tab-bar/document-tab-bar.d.ts.map +1 -1
  592. package/dist/components/navigation/document-tab-bar/document-tab-bar.js +16 -24
  593. package/dist/components/navigation/document-tab-bar/document-tab-bar.js.map +1 -1
  594. package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.d.ts.map +1 -1
  595. package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.js +18 -4
  596. package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.js.map +1 -1
  597. package/dist/components/navigation/link/link.styles.d.ts.map +1 -1
  598. package/dist/components/navigation/link/link.styles.js +6 -3
  599. package/dist/components/navigation/link/link.styles.js.map +1 -1
  600. package/dist/components/navigation/menu-bar-item/menu-bar-item.styles.d.ts.map +1 -1
  601. package/dist/components/navigation/menu-bar-item/menu-bar-item.styles.js +1 -0
  602. package/dist/components/navigation/menu-bar-item/menu-bar-item.styles.js.map +1 -1
  603. package/dist/components/navigation/pagination/pagination.styles.d.ts.map +1 -1
  604. package/dist/components/navigation/pagination/pagination.styles.js +7 -0
  605. package/dist/components/navigation/pagination/pagination.styles.js.map +1 -1
  606. package/dist/components/navigation/skip-link/skip-link.styles.d.ts.map +1 -1
  607. package/dist/components/navigation/skip-link/skip-link.styles.js +1 -0
  608. package/dist/components/navigation/skip-link/skip-link.styles.js.map +1 -1
  609. package/dist/components/navigation/tab-bar/tab-bar.d.ts +2 -2
  610. package/dist/components/navigation/tab-bar/tab-bar.d.ts.map +1 -1
  611. package/dist/components/navigation/tab-bar/tab-bar.js +4 -4
  612. package/dist/components/navigation/tab-bar/tab-bar.js.map +1 -1
  613. package/dist/components/navigation/tab-bar/tab-bar.styles.d.ts.map +1 -1
  614. package/dist/components/navigation/tab-bar/tab-bar.styles.js +6 -0
  615. package/dist/components/navigation/tab-bar/tab-bar.styles.js.map +1 -1
  616. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.menu-sheet.js +1 -1
  617. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.menu-sheet.js.map +1 -1
  618. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.d.ts.map +1 -1
  619. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js +2 -0
  620. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js.map +1 -1
  621. package/dist/components/navigation/top-title-bar/top-title-bar.d.ts +1 -0
  622. package/dist/components/navigation/top-title-bar/top-title-bar.d.ts.map +1 -1
  623. package/dist/components/navigation/top-title-bar/top-title-bar.js +12 -0
  624. package/dist/components/navigation/top-title-bar/top-title-bar.js.map +1 -1
  625. package/dist/components/navigation/top-title-bar/top-title-bar.styles.d.ts.map +1 -1
  626. package/dist/components/navigation/top-title-bar/top-title-bar.styles.js +2 -0
  627. package/dist/components/navigation/top-title-bar/top-title-bar.styles.js.map +1 -1
  628. package/dist/components/status-and-feedback/activity-indicator/activity-indicator.d.ts +4 -6
  629. package/dist/components/status-and-feedback/activity-indicator/activity-indicator.d.ts.map +1 -1
  630. package/dist/components/status-and-feedback/activity-indicator/activity-indicator.js +4 -6
  631. package/dist/components/status-and-feedback/activity-indicator/activity-indicator.js.map +1 -1
  632. package/dist/components/status-and-feedback/activity-indicator/activity-indicator.styles.d.ts.map +1 -1
  633. package/dist/components/status-and-feedback/activity-indicator/activity-indicator.styles.js +3 -2
  634. package/dist/components/status-and-feedback/activity-indicator/activity-indicator.styles.js.map +1 -1
  635. package/dist/components/status-and-feedback/badge/badge.d.ts +3 -3
  636. package/dist/components/status-and-feedback/badge/badge.js +3 -3
  637. package/dist/components/status-and-feedback/badge/badge.styles.d.ts.map +1 -1
  638. package/dist/components/status-and-feedback/badge/badge.styles.js +7 -4
  639. package/dist/components/status-and-feedback/badge/badge.styles.js.map +1 -1
  640. package/dist/components/status-and-feedback/banner/banner.d.ts +1 -1
  641. package/dist/components/status-and-feedback/banner/banner.js +1 -1
  642. package/dist/components/status-and-feedback/banner/banner.styles.d.ts.map +1 -1
  643. package/dist/components/status-and-feedback/banner/banner.styles.js +8 -2
  644. package/dist/components/status-and-feedback/banner/banner.styles.js.map +1 -1
  645. package/dist/components/status-and-feedback/inline-dialog/inline-dialog.d.ts +1 -1
  646. package/dist/components/status-and-feedback/inline-dialog/inline-dialog.js +1 -1
  647. package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.d.ts.map +1 -1
  648. package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.js +3 -0
  649. package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.js.map +1 -1
  650. package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.d.ts +2 -2
  651. package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.d.ts.map +1 -1
  652. package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.js +5 -7
  653. package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.js.map +1 -1
  654. package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.styles.d.ts.map +1 -1
  655. package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.styles.js +3 -0
  656. package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.styles.js.map +1 -1
  657. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.d.ts +1 -1
  658. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js +1 -1
  659. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.styles.d.ts.map +1 -1
  660. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.styles.js +3 -2
  661. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.styles.js.map +1 -1
  662. package/dist/components/status-and-feedback/notification/notification.styles.d.ts.map +1 -1
  663. package/dist/components/status-and-feedback/notification/notification.styles.js +3 -0
  664. package/dist/components/status-and-feedback/notification/notification.styles.js.map +1 -1
  665. package/dist/components/status-and-feedback/progress-bar/progress-bar.js +1 -1
  666. package/dist/components/status-and-feedback/progress-bar/progress-bar.js.map +1 -1
  667. package/dist/components/status-and-feedback/progress-bar/progress-bar.styles.d.ts.map +1 -1
  668. package/dist/components/status-and-feedback/progress-bar/progress-bar.styles.js +3 -1
  669. package/dist/components/status-and-feedback/progress-bar/progress-bar.styles.js.map +1 -1
  670. package/dist/components/status-and-feedback/progress-circle/progress-circle.styles.d.ts.map +1 -1
  671. package/dist/components/status-and-feedback/progress-circle/progress-circle.styles.js +2 -0
  672. package/dist/components/status-and-feedback/progress-circle/progress-circle.styles.js.map +1 -1
  673. package/dist/components/status-and-feedback/status-bar/status-bar.styles.d.ts.map +1 -1
  674. package/dist/components/status-and-feedback/status-bar/status-bar.styles.js +1 -0
  675. package/dist/components/status-and-feedback/status-bar/status-bar.styles.js.map +1 -1
  676. package/dist/components/status-and-feedback/step-bar/step-bar.styles.d.ts.map +1 -1
  677. package/dist/components/status-and-feedback/step-bar/step-bar.styles.js +8 -1
  678. package/dist/components/status-and-feedback/step-bar/step-bar.styles.js.map +1 -1
  679. package/dist/css/form-section.css +2 -0
  680. package/dist/css/global-open-font.css +1 -0
  681. package/dist/css/global.css +1 -0
  682. package/dist/css/rich-text.css +14 -38
  683. package/dist/css/title.css +80 -0
  684. package/dist/css/variables.css +43 -27
  685. package/dist/nldd.min.js +1803 -1280
  686. package/dist/translations/en-US.d.ts.map +1 -1
  687. package/dist/translations/en-US.js +4 -1
  688. package/dist/translations/en-US.js.map +1 -1
  689. package/dist/translations/fy.d.ts.map +1 -1
  690. package/dist/translations/fy.js +4 -1
  691. package/dist/translations/fy.js.map +1 -1
  692. package/dist/translations/nl.generated.d.ts +4 -1
  693. package/dist/translations/nl.generated.d.ts.map +1 -1
  694. package/dist/translations/nl.generated.js +4 -2
  695. package/dist/translations/nl.generated.js.map +1 -1
  696. package/dist/translations/pap-AW.d.ts.map +1 -1
  697. package/dist/translations/pap-AW.js +4 -1
  698. package/dist/translations/pap-AW.js.map +1 -1
  699. package/dist/translations/pap-CW.d.ts.map +1 -1
  700. package/dist/translations/pap-CW.js +4 -1
  701. package/dist/translations/pap-CW.js.map +1 -1
  702. package/dist/types/react.d.ts +88 -76
  703. package/dist/types/vue.d.ts +123 -104
  704. package/dist/utilities/autoloader.generated.js +1 -1
  705. package/dist/utilities/autoloader.generated.js.map +1 -1
  706. package/dist/utilities/dev-checks.d.ts +5 -0
  707. package/dist/utilities/dev-checks.d.ts.map +1 -1
  708. package/dist/utilities/dev-checks.js +14 -0
  709. package/dist/utilities/dev-checks.js.map +1 -1
  710. package/dist/utilities/dev-rules.generated.d.ts.map +1 -1
  711. package/dist/utilities/dev-rules.generated.js +162 -62
  712. package/dist/utilities/dev-rules.generated.js.map +1 -1
  713. package/dist/utilities/form-associated-mixin.d.ts +10 -0
  714. package/dist/utilities/form-associated-mixin.d.ts.map +1 -1
  715. package/dist/utilities/form-associated-mixin.js +17 -0
  716. package/dist/utilities/form-associated-mixin.js.map +1 -1
  717. package/dist/utilities/page-section-mixin.d.ts +2 -2
  718. package/dist/utilities/page-section-mixin.d.ts.map +1 -1
  719. package/dist/utilities/page-section-mixin.js +10 -6
  720. package/dist/utilities/page-section-mixin.js.map +1 -1
  721. package/dist/utilities/reorder-handle-mixin.d.ts +21 -0
  722. package/dist/utilities/reorder-handle-mixin.d.ts.map +1 -0
  723. package/dist/utilities/reorder-handle-mixin.js +34 -0
  724. package/dist/utilities/reorder-handle-mixin.js.map +1 -0
  725. package/dist/utilities/translations.d.ts.map +1 -1
  726. package/dist/utilities/translations.js +9 -0
  727. package/dist/utilities/translations.js.map +1 -1
  728. package/lint/css.js +224 -0
  729. package/lint/data.generated.json +1 -1
  730. package/lint/engine.js +5 -2
  731. package/lint/fix.js +11 -0
  732. package/lint/frontends.js +67 -42
  733. package/lint/linter.js +193 -8
  734. package/lint/main.js +20 -7
  735. package/lint/project.js +2 -2
  736. package/lint/rule-data.js +20 -0
  737. package/lint/rule.schema.json +1 -0
  738. package/package.json +6 -6
  739. package/dist/cdn/chunks/blockquote-BoOqbGdm.js +0 -189
  740. package/dist/cdn/chunks/drag-handle-cell.i18n-CKUrbm2q.js +0 -3
  741. package/dist/cdn/chunks/nl.generated-D6T41jG3.js +0 -112
  742. package/dist/cdn/chunks/rich-text-CQ2uwMSp.js +0 -47
  743. package/dist/cdn/chunks/shadow-resets-6SToDsPu.js +0 -12
  744. package/dist/cdn/chunks/translations-wxBSz213.js +0 -8
  745. package/dist/cdn/chunks/with-translations-XX14GKFh.js +0 -16
  746. package/dist/components/lists-and-tables/cells/drag-handle-cell/drag-handle-cell.d.ts +0 -44
  747. package/dist/components/lists-and-tables/cells/drag-handle-cell/drag-handle-cell.d.ts.map +0 -1
  748. package/dist/components/lists-and-tables/cells/drag-handle-cell/drag-handle-cell.i18n.d.ts +0 -5
  749. package/dist/components/lists-and-tables/cells/drag-handle-cell/drag-handle-cell.i18n.d.ts.map +0 -1
  750. package/dist/components/lists-and-tables/cells/drag-handle-cell/drag-handle-cell.i18n.js +0 -4
  751. package/dist/components/lists-and-tables/cells/drag-handle-cell/drag-handle-cell.i18n.js.map +0 -1
  752. package/dist/components/lists-and-tables/cells/drag-handle-cell/drag-handle-cell.js.map +0 -1
  753. package/dist/components/lists-and-tables/cells/drag-handle-cell/drag-handle-cell.styles.d.ts +0 -2
  754. package/dist/components/lists-and-tables/cells/drag-handle-cell/drag-handle-cell.styles.d.ts.map +0 -1
  755. package/dist/components/lists-and-tables/cells/drag-handle-cell/drag-handle-cell.styles.js.map +0 -1
  756. package/dist/components/lists-and-tables/cells/drag-handle-cell/drag-handle-cell.template.d.ts.map +0 -1
  757. package/dist/components/lists-and-tables/cells/drag-handle-cell/drag-handle-cell.template.js.map +0 -1
package/lint/engine.js CHANGED
@@ -11,6 +11,7 @@
11
11
 
12
12
  import { compile } from 'css-select';
13
13
  import { parse } from 'css-what';
14
+ import { isDesignSystemCss } from './css.js';
14
15
  import { BOUND, adapter, walk } from './tree.js';
15
16
 
16
17
  /** In W+ a sibling behind a condition might not show, as with `v-if`, `v-else` and tabs on `v-show`. */
@@ -71,7 +72,7 @@ function createFieldLabelCheck(isInput, allowMaybe) {
71
72
  * with `@accepts` in its JSDoc.
72
73
  *
73
74
  * What a file renders is judged in that file: that a parent elsewhere might put it
74
- * inside an nldd-rich-text does not make plain HTML written here the system's. A
75
+ * inside an nldd-rich-text does not make plain HTML written here the design system's. A
75
76
  * tree the file builds under a name (a helper component, a variable) is judged where
76
77
  * the file uses that name. Used nowhere here, or under a component of the app, it is
77
78
  * unknown.
@@ -141,7 +142,7 @@ function forWorld(tokens, classes, widen) {
141
142
  });
142
143
  }
143
144
 
144
- export function createEngine({ classes = {}, tags = {} } = {}) {
145
+ export function createEngine({ classes = {}, tags = {}, designSystemCss = {} } = {}) {
145
146
  const shared = classPseudos(classes);
146
147
  const pseudos = {
147
148
  ...shared,
@@ -154,6 +155,8 @@ export function createEngine({ classes = {}, tags = {} } = {}) {
154
155
  for (let parent = node.parent; parent; parent = parent.parent) if (parent.name === name) return true;
155
156
  return false;
156
157
  },
158
+ // CSS the design system ships: a block it recognizes, or a stylesheet with nothing else in it.
159
+ 'design-system': (node) => node.designSystem ?? (node.css !== undefined && isDesignSystemCss(node.css, designSystemCss)),
157
160
  // No element and no text: an empty mount point such as <div id="app"></div>.
158
161
  blank: (node) => node.children.length === 0 && !node.text,
159
162
  // Only exists on a running page, so in source it is never true.
package/lint/fix.js CHANGED
@@ -129,6 +129,16 @@ function removeEdits(source, offset, name) {
129
129
  return [{ from, to: end, text: '' }];
130
130
  }
131
131
 
132
+ /** A value written out in the markup that became a boolean: the whole attribute
133
+ * turns into the new name. The rule's context says which value that is. */
134
+ function flagEdits(source, offset, from, to) {
135
+ const found = findAttribute(source, offset, from);
136
+ if (!found || found.prefix || findAttribute(source, offset, to)) return [];
137
+ const end = endOfValue(source, found.end);
138
+ if (end === undefined) return [];
139
+ return [{ from: found.start, to: end, text: to }];
140
+ }
141
+
132
142
  /**
133
143
  * The parser says where an element ends: a comment or a string that looks like its
134
144
  * closing tag does not count. Without a closing tag of its own it stays as it is.
@@ -150,6 +160,7 @@ function editsOf(source, { fix, offset, endOffset, tag }) {
150
160
  ...Object.entries(fix.rename ?? {}).flatMap(([from, to]) => renameEdits(source, offset, from, to)),
151
161
  ...Object.entries(fix.value ?? {}).flatMap(([name, values]) => valueEdits(source, offset, name, values)),
152
162
  ...(fix.remove ?? []).flatMap((name) => removeEdits(source, offset, name)),
163
+ ...Object.entries(fix.flag ?? {}).flatMap(([from, to]) => flagEdits(source, offset, from, to)),
153
164
  ...(fix.tag ? tagEdits(source, offset, endOffset, tag, fix.tag) : []),
154
165
  ];
155
166
  }
package/lint/frontends.js CHANGED
@@ -8,6 +8,7 @@
8
8
  */
9
9
 
10
10
  import { parseDocument } from 'htmlparser2';
11
+ import { cssBlocks } from './css.js';
11
12
  import {
12
13
  BOUND,
13
14
  appendChild,
@@ -38,6 +39,16 @@ const REPEATED = new Set(['v-for', '*ngFor']);
38
39
  /** A value a template language fills in: `{{ x }}`, `{% x %}`, `${x}`, `<%= x %>` or `{x}`. */
39
40
  const TEMPLATE_VALUE = /\{\{|\{%|\$\{|<%|^\{.*\}$/;
40
41
 
42
+ /** A JSON object, such as a `translations` attribute, is written out and not filled in. */
43
+ const isJsonObject = (value) => {
44
+ if (!/^\{\s*("|\})/.test(value)) return false;
45
+ try {
46
+ return JSON.parse(value) !== null;
47
+ } catch {
48
+ return false;
49
+ }
50
+ };
51
+
41
52
  /** Jinja, Django, Handlebars and Angular control flow, written between the tags. */
42
53
  const TEMPLATE_TEXT = /\{%|\{\{|@(if|else|for|switch|defer)\b/;
43
54
 
@@ -71,7 +82,7 @@ function readAttribute(element, name, value) {
71
82
  } else if (!PLAIN_ATTRIBUTE.test(name)) {
72
83
  element.spread = true;
73
84
  element.templated = true;
74
- } else element.attrs.set(name, TEMPLATE_VALUE.test(value) ? BOUND : value);
85
+ } else element.attrs.set(name, TEMPLATE_VALUE.test(value) && !isJsonObject(value) ? BOUND : value);
75
86
  }
76
87
 
77
88
  function hasSlotName(attribs) {
@@ -90,7 +101,7 @@ function readHtmlChildren(children, parent, given) {
90
101
  if (node.type === 'text' && node.data.trim()) parent.text = true;
91
102
  // htmlparser2 gives <style> a type of its own. The group pure reads every block in it.
92
103
  if (node.type === 'style') {
93
- for (const offset of styleBlockOffsets(node)) appendChild(parent, createNode('style', offset));
104
+ for (const block of styleBlocks(node)) appendChild(parent, styleNode(block));
94
105
  continue;
95
106
  }
96
107
  if (node.type !== 'tag') continue;
@@ -219,59 +230,42 @@ export function parseVue(source) {
219
230
  roots.push(root);
220
231
  }
221
232
  // A style block is the component's own stylesheet, so it stands as the element it is.
222
- const blocks = documentNode.children.filter((each) => each.name === 'style').flatMap(styleBlockOffsets);
233
+ const blocks = documentNode.children.filter((each) => each.name === 'style').flatMap(styleBlocks);
223
234
  if (blocks.length > 0) roots.push(stylesheetRoot(blocks));
224
235
  return roots;
225
236
  }
226
237
 
227
- /** Where each block of a <style> element starts in the file. */
228
- function styleBlockOffsets(node) {
238
+ /** Each block of a <style> element, at its place in the file. */
239
+ function styleBlocks(node) {
229
240
  const text = node.children?.find((child) => child.type === 'text');
230
- return text ? cssBlockOffsets(text.data).map((offset) => (text.startIndex ?? 0) + offset) : [];
241
+ const start = text?.startIndex ?? 0;
242
+ return text ? ownCssBlocks(text.data).map((block) => ({ ...block, offset: start + block.offset })) : [];
243
+ }
244
+
245
+ /** A block of CSS stands as a <style> element that carries its text, so the linter can tell whose it is. */
246
+ function styleNode({ offset, css }) {
247
+ const node = createNode('style', offset);
248
+ node.css = css;
249
+ return node;
231
250
  }
232
251
 
233
252
  /** One <style> element per block, so a suppression or a baseline count covers one block and not the whole sheet. */
234
- function stylesheetRoot(offsets) {
253
+ function stylesheetRoot(blocks) {
235
254
  const root = createRoot();
236
- for (const offset of offsets) appendChild(root, createNode('style', offset));
255
+ for (const block of blocks) appendChild(root, styleNode(block));
237
256
  return root;
238
257
  }
239
258
 
240
259
  /**
241
- * The stylesheet with comments and imports of the design system blanked out, so
242
- * what is left is the app's own and every offset still points at the source.
260
+ * The stylesheet with imports of the design system blanked out, so what is left is
261
+ * the app's own and every offset still points at the source.
243
262
  */
244
263
  const ownCss = (source) =>
245
- source
246
- .replace(/\/\*[\s\S]*?\*\//g, (comment) => comment.replace(/[^\n]/g, ' '))
247
- .replace(/^\s*\/\/.*$/gm, (comment) => ' '.repeat(comment.length))
248
- .replace(/@(import|use|forward)\s+(url\()?['"]?[^'";)]*(@nldd\/design-system|\/nldd\/css\/)[^;]*;/g, (line) => ' '.repeat(line.length));
264
+ source.replace(/@(import|use|forward)\s+(url\()?['"]?[^'";)]*(@nldd\/design-system|\/nldd\/css\/)[^;]*;/g, (line) => ' '.repeat(line.length));
249
265
 
250
- /**
251
- * Where each top-level block of the app's own CSS starts: a rule with its braces,
252
- * or a statement up to its semicolon.
253
- */
254
- function cssBlockOffsets(source, indented = false) {
255
- // Strings and url() can hold a brace or a semicolon, so their contents are blanked first.
256
- const own = ownCss(source).replace(/(["'])(?:\\.|(?!\1).)*\1|url\([^)]*\)/g, (text) => text[0] + ' '.repeat(text.length - 1));
257
- // Sass without braces: a block is a line that starts at the margin.
258
- if (indented) return [...own.matchAll(/^\S/gm)].map((match) => match.index);
259
- const offsets = [];
260
- let depth = 0;
261
- let inBlock = false;
262
- for (let at = 0; at < own.length; at++) {
263
- const char = own[at];
264
- if (!inBlock && depth === 0 && /\S/.test(char)) {
265
- offsets.push(at);
266
- inBlock = true;
267
- }
268
- if (char === '{') depth += 1;
269
- else if (char === '}') {
270
- depth = Math.max(0, depth - 1);
271
- if (depth === 0) inBlock = false;
272
- } else if (char === ';' && depth === 0) inBlock = false;
273
- }
274
- return offsets;
266
+ /** The top-level blocks of the app's own CSS, each with where it starts and its text. */
267
+ function ownCssBlocks(source, indented = false) {
268
+ return cssBlocks(ownCss(source), indented).map(({ start, end }) => ({ offset: start, css: source.slice(start, end) }));
275
269
  }
276
270
 
277
271
  /**
@@ -281,8 +275,8 @@ function cssBlockOffsets(source, indented = false) {
281
275
  * a block suppresses that block.
282
276
  */
283
277
  export function parseStylesheet(source, filename = '') {
284
- const offsets = cssBlockOffsets(source, filename.endsWith('.sass'));
285
- return offsets.length === 0 ? [] : [stylesheetRoot(offsets)];
278
+ const blocks = ownCssBlocks(source, filename.endsWith('.sass'));
279
+ return blocks.length === 0 ? [] : [stylesheetRoot(blocks)];
286
280
  }
287
281
 
288
282
  /** Every code block and inline tag in a Markdown file is a tree of its own. */
@@ -496,6 +490,22 @@ function staticJsxValue(value) {
496
490
  return BOUND;
497
491
  }
498
492
 
493
+ /**
494
+ * `translations={{ 'components.x.y': '…' }}` as JSON, so its keys can be checked. Only
495
+ * the keys need to be static; a value that is filled in counts as an empty text.
496
+ */
497
+ function staticJsxObject(value) {
498
+ const expression = value?.type === 'JSXExpressionContainer' ? value.expression : undefined;
499
+ if (expression?.type !== 'ObjectExpression') return BOUND;
500
+ const entries = [];
501
+ for (const property of expression.properties) {
502
+ if (property.type !== 'Property' || property.computed || property.key.type !== 'Literal') return BOUND;
503
+ const text = property.value.type === 'Literal' ? property.value.value : '';
504
+ entries.push([String(property.key.value), String(text)]);
505
+ }
506
+ return JSON.stringify(Object.fromEntries(entries));
507
+ }
508
+
499
509
  /** Props React keeps to itself: they never reach the element. */
500
510
  const REACT_ONLY = new Set(['key', 'ref', 'dangerouslySetInnerHTML', 'suppressHydrationWarning', 'suppressContentEditableWarning']);
501
511
 
@@ -507,7 +517,7 @@ function readJsxAttributes(element, attributes, roots) {
507
517
  }
508
518
  const name = jsxName(attribute.name);
509
519
  const isHandler = /^on[A-Z]/.test(name) || REACT_ONLY.has(name);
510
- const value = staticJsxValue(attribute.value);
520
+ const value = name === 'translations' ? staticJsxObject(attribute.value) : staticJsxValue(attribute.value);
511
521
  if (!isHandler && value !== undefined) element.attrs.set(name === 'className' ? 'class' : name, value);
512
522
  // An element passed as a prop renders elsewhere, so it is a tree of its own.
513
523
  const nested = [];
@@ -670,6 +680,8 @@ const PARSERS = {
670
680
  '.html': parseHtml,
671
681
  '.htm': parseHtml,
672
682
  '.j2': parseHtml,
683
+ '.tmpl': parseHtml,
684
+ '.gohtml': parseHtml,
673
685
  '.jinja': parseHtml,
674
686
  '.jinja2': parseHtml,
675
687
  '.vue': parseVue,
@@ -677,12 +689,25 @@ const PARSERS = {
677
689
  '.jsx': parseJsx,
678
690
  '.tsx': parseJsx,
679
691
  '.ts': parseLit,
692
+ '.js': parseLit,
693
+ '.mjs': parseLit,
680
694
  '.css': parseStylesheet,
681
695
  '.scss': parseStylesheet,
682
696
  '.sass': parseStylesheet,
683
697
  '.less': parseStylesheet,
684
698
  };
685
699
 
700
+ /**
701
+ * How much of a file the linter reads: all its markup, only the `html` templates in
702
+ * a script, or nothing, for a file type it has no parser for.
703
+ * @returns {'markup' | 'templates' | 'none'}
704
+ */
705
+ export function readerOf(filename) {
706
+ const parser = PARSERS[filename.slice(filename.lastIndexOf('.'))];
707
+ if (!parser) return 'none';
708
+ return parser === parseLit ? 'templates' : 'markup';
709
+ }
710
+
686
711
  /** @returns {Promise<import('./tree.js').TreeNode[]>} */
687
712
  export async function parseSource(source, filename) {
688
713
  const extension = filename.slice(filename.lastIndexOf('.'));
package/lint/linter.js CHANGED
@@ -3,9 +3,12 @@
3
3
  * rules from src/rules/, then the suppressions written in the file.
4
4
  */
5
5
 
6
+ import { existsSync, readFileSync } from 'node:fs';
7
+ import { dirname, extname, join } from 'node:path';
8
+ import { declarations, enclosingBlock, isDesignSystemCss, TOKEN_PREFIX, tokenReferences, withoutComments } from './css.js';
6
9
  import { createEngine } from './engine.js';
7
10
  import { canFix, stuckTags } from './fix.js';
8
- import { applyWrappers, parseSource } from './frontends.js';
11
+ import { applyWrappers, parseSource, parseStylesheet, readerOf } from './frontends.js';
9
12
  import { BUILT_IN_RULES, createCanonical, loadData, OPT_IN_GROUPS } from './rule-data.js';
10
13
  import { BOUND, walk } from './tree.js';
11
14
 
@@ -44,11 +47,25 @@ function readPropertyNames(roots, tags, isPlainHtml) {
44
47
  return roots;
45
48
  }
46
49
 
47
- function checkAttributes(node, { tags, icons, anyChildAttrs, isPlainHtml }, report) {
50
+ /** What the components around a node read off anything inside them, such as `sidebar-section-only`. */
51
+ function fromAncestors(node, tags, anyDescendantAttrs) {
52
+ const attrs = {};
53
+ for (let ancestor = node.parent; ancestor; ancestor = ancestor.parent) {
54
+ // An ancestor in another file may be the one reading it.
55
+ if (ancestor.opaque) return { ...anyDescendantAttrs, ...attrs };
56
+ Object.assign(attrs, tags[ancestor.name]?.descendantAttrs);
57
+ }
58
+ return attrs;
59
+ }
60
+
61
+ function checkAttributes(node, { tags, icons, anyChildAttrs, anyDescendantAttrs, isPlainHtml }, report) {
48
62
  if (node.templated) return;
49
63
  const contract = tags[node.name];
50
64
  // A parent in another file may be the one reading it, so any child attribute goes.
51
- const fromParent = node.parent.opaque ? anyChildAttrs : (tags[node.parent.name]?.childAttrs ?? {});
65
+ const fromParent = {
66
+ ...fromAncestors(node, tags, anyDescendantAttrs),
67
+ ...(node.parent.opaque ? anyChildAttrs : (tags[node.parent.name]?.childAttrs ?? {})),
68
+ };
52
69
  for (const [name, value] of node.attrs) {
53
70
  const attribute = contract.attrs[name] ?? fromParent[name];
54
71
  if (ICON_ATTRIBUTES.has(name) && attribute && typeof value === 'string' && value !== '') {
@@ -80,6 +97,35 @@ function checkAttributes(node, { tags, icons, anyChildAttrs, isPlainHtml }, repo
80
97
  }
81
98
  }
82
99
 
100
+ /**
101
+ * The keys in a `translations` attribute written as JSON. An element reads only its
102
+ * own keys, so a key another component has, or one that was renamed, does nothing.
103
+ */
104
+ function checkTranslationKeys(node, { translations, removedKeys }, report) {
105
+ const value = node.attrs.get('translations');
106
+ const own = translations[node.name];
107
+ if (typeof value !== 'string' || !own) return;
108
+ let keys;
109
+ try {
110
+ const parsed = JSON.parse(value);
111
+ if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) return;
112
+ keys = Object.keys(parsed);
113
+ } catch {
114
+ return;
115
+ }
116
+ for (const key of keys) {
117
+ if (own.includes(key)) continue;
118
+ const removed = removedKeys[key];
119
+ const owner = Object.keys(translations).find((tag) => translations[tag].includes(key));
120
+ const message = removed
121
+ ? `\`${key}\` was removed after ${removed.last}.${removed.use && own.includes(removed.use) ? ` Use \`${removed.use}\`.` : ''}`
122
+ : owner
123
+ ? `\`${key}\` belongs to ${owner}, so ${node.name} does not read it.`
124
+ : `${node.name} has no translation key \`${key}\`.`;
125
+ report('translation-key-not-found', message, 'translations');
126
+ }
127
+ }
128
+
83
129
  function checkSlot(node, tags, report) {
84
130
  const slot = node.attrs.get('slot');
85
131
  const parent = node.parent;
@@ -103,6 +149,7 @@ function builtInFindings(root, context) {
103
149
  return;
104
150
  }
105
151
  checkAttributes(node, context, report);
152
+ checkTranslationKeys(node, context, report);
106
153
  checkSlot(node, tags, report);
107
154
  });
108
155
  return findings;
@@ -144,15 +191,143 @@ function createPositions(source) {
144
191
  }
145
192
 
146
193
 
147
- export function createLinter(data = loadData(), { wrappers = {}, severities: configured = {} } = {}) {
194
+ /** Files where `//` is no comment: in markup it starts a url, and a built page is one line. */
195
+ const MARKUP_FILE = /\.(html?|j2|jinja2?|tmpl|gohtml|vue|md)$/;
196
+
197
+ /**
198
+ * A stylesheet a page links to, on disk next to it: relative to the page, or from the
199
+ * root of the site for a path that starts with a slash, as in a built site.
200
+ */
201
+ function linkedFile(href, filename) {
202
+ if (typeof href !== 'string' || !href || /^([a-z]+:|\/\/)/i.test(href)) return undefined;
203
+ const path = decodeURI(href.replace(/[?#].*$/, ''));
204
+ if (extname(path) !== '.css') return undefined;
205
+ if (!path.startsWith('/')) {
206
+ const file = join(dirname(filename), path);
207
+ return existsSync(file) ? file : undefined;
208
+ }
209
+ for (let directory = dirname(filename); ; directory = dirname(directory)) {
210
+ const file = join(directory, path);
211
+ if (existsSync(file)) return file;
212
+ if (dirname(directory) === directory) return undefined;
213
+ }
214
+ }
215
+
216
+ export function createLinter(data = loadData(), { wrappers = {}, severities: configured = {}, projectTokens = [] } = {}) {
148
217
  const canonical = createCanonical(data);
149
218
  const severities = Object.fromEntries(Object.entries(configured).map(([id, level]) => [canonical(id), level]));
150
219
  const context = {
151
220
  tags: data.tags,
152
221
  icons: new Set(data.icons),
153
222
  anyChildAttrs: Object.assign({}, ...Object.values(data.tags).map((tag) => tag.childAttrs)),
223
+ anyDescendantAttrs: Object.assign({}, ...Object.values(data.tags).map((tag) => tag.descendantAttrs ?? {})),
224
+ translations: data.translations ?? {},
225
+ removedKeys: data.removedKeys ?? {},
154
226
  };
155
- const engine = createEngine({ classes: data.classes, tags: data.tags });
227
+ const engine = createEngine({ classes: data.classes, tags: data.tags, designSystemCss: data.designSystemCss });
228
+ const isDesignSystemBlock = (css) => isDesignSystemCss(css, data.designSystemCss ?? {});
229
+ const tokens = new Set([...(data.tokens ?? []), ...projectTokens]);
230
+ const removedTokens = data.removedTokens ?? {};
231
+ // Longest first, so --_button-group-gap belongs to button-group and not to button.
232
+ const components = Object.keys(data.tags)
233
+ .filter((tag) => tag.startsWith('nldd-'))
234
+ .map((tag) => tag.slice('nldd-'.length))
235
+ .sort((a, b) => b.length - a.length);
236
+
237
+ /** A stylesheet on disk is the design system's when every block in it is. */
238
+ const linkedSheets = new Map();
239
+ function isDesignSystemSheet(file) {
240
+ if (!linkedSheets.has(file)) {
241
+ const blocks = parseStylesheet(readFileSync(file, 'utf8')).flatMap((root) => root.children);
242
+ linkedSheets.set(file, blocks.every((block) => isDesignSystemBlock(block.css)));
243
+ }
244
+ return linkedSheets.get(file);
245
+ }
246
+
247
+ /** A link to a stylesheet this page ships itself is judged by what is in that file, not by its name. */
248
+ function readLinkedStylesheets(roots, filename) {
249
+ for (const root of roots) {
250
+ walk(root, (node) => {
251
+ if (node.name !== 'link' || !/(^|\s)stylesheet(\s|$)/i.test(String(node.attrs.get('rel') ?? ''))) return;
252
+ const file = linkedFile(node.attrs.get('href'), filename);
253
+ if (file) node.designSystem = isDesignSystemSheet(file);
254
+ });
255
+ }
256
+ }
257
+
258
+ /** Where the design system's own CSS sits in this file: a bundle or a page can hold it next to the app's. */
259
+ function designSystemRanges(roots) {
260
+ const ranges = [];
261
+ for (const root of roots) {
262
+ walk(root, (node) => {
263
+ if (node.name === 'style' && node.css !== undefined && isDesignSystemBlock(node.css)) {
264
+ ranges.push([node.offset, node.offset + node.css.length]);
265
+ }
266
+ });
267
+ }
268
+ return (offset) => ranges.some(([start, end]) => offset >= start && offset < end);
269
+ }
270
+
271
+ const LINK_CONTEXT = ['--context-link-color', '--context-link-is-hovered-color', '--context-link-is-active-color'];
272
+
273
+ /**
274
+ * The design system's tokens the app names, and the internal variables of a component it
275
+ * sets. Read from the text, so a stylesheet, a style attribute and a style object
276
+ * in a script all count. A token the file or the project declares itself is its own.
277
+ */
278
+ function cssFindings(source, filename, roots) {
279
+ const lineComments = !MARKUP_FILE.test(filename);
280
+ const inDesignSystemCss = designSystemRanges(roots);
281
+ const declared = declarations(source, lineComments).filter((each) => !inDesignSystemCss(each.offset));
282
+ const ownTokens = new Set(declared.map(({ name }) => name).filter((name) => TOKEN_PREFIX.test(name)));
283
+ const findings = [];
284
+ const report = (rule, message, { name, offset }) =>
285
+ findings.push({ rule, severity: BUILT_IN_RULES[rule].severity, message, tag: name, offset, endOffset: offset + name.length });
286
+ for (const reference of tokenReferences(source, lineComments)) {
287
+ const { name, offset } = reference;
288
+ if (tokens.has(name) || ownTokens.has(name) || inDesignSystemCss(offset)) continue;
289
+ const removed = removedTokens[name];
290
+ const instead = removed?.use ? ` Use \`${removed.use}\`.` : '';
291
+ const message = removed
292
+ ? `\`${name}\` was removed after ${removed.last}.${instead}`
293
+ : `There is no token \`${name}\` in this version.`;
294
+ report('token-not-found', message, reference);
295
+ }
296
+ for (const declaration of declared) {
297
+ if (!declaration.name.startsWith('--_')) continue;
298
+ const component = components.find((name) => declaration.name.startsWith(`--_${name}-`));
299
+ if (!component) continue;
300
+ report('local-variable-no-override', `\`${declaration.name}\` is internal to nldd-${component}, so setting it is not supported.`, declaration);
301
+ }
302
+ const plain = withoutComments(source, lineComments);
303
+ const linkBlocks = new Set();
304
+ for (const declaration of declared) {
305
+ if (!LINK_CONTEXT.includes(declaration.name)) continue;
306
+ const { start, end } = enclosingBlock(plain, declaration.offset);
307
+ if (linkBlocks.has(start)) continue;
308
+ linkBlocks.add(start);
309
+ const set = new Set(declared.filter(({ offset }) => offset >= start && offset < end).map(({ name }) => name));
310
+ const missing = LINK_CONTEXT.filter((name) => !set.has(name));
311
+ if (missing.length === 0) continue;
312
+ report('link-context-needs-states', `Set ${missing.map((name) => `\`${name}\``).join(' and ')} here too, or a link on this surface turns back to the default color.`, declaration);
313
+ }
314
+ return findings;
315
+ }
316
+
317
+ /**
318
+ * Markup of ours in a file the linter cannot read: a type it has no parser for, or a
319
+ * script without an `html` template, where `<nldd-` sits in a plain string. What a
320
+ * markup parser skips on purpose, such as a comment or an inert template, is not this.
321
+ */
322
+ function unreadMarkup(source, filename, roots) {
323
+ const reader = readerOf(filename);
324
+ if (reader === 'markup' || (reader === 'templates' && roots.length > 0)) return [];
325
+ const offset = withoutComments(source, !MARKUP_FILE.test(filename)).search(/<nldd-[a-z]/);
326
+ if (offset < 0) return [];
327
+ const rule = 'file-not-read';
328
+ return [{ rule, severity: BUILT_IN_RULES[rule].severity, message: BUILT_IN_RULES[rule].description, tag: '', offset }];
329
+ }
330
+
156
331
  // An opt-in group runs only where a level was given for it, never by default.
157
332
  const isOn = (rule) => (OPT_IN_GROUPS.includes(rule.group) ? Boolean(severities[rule.id]) : true) && severities[rule.id] !== 'off';
158
333
  const rules = data.rules.filter((rule) => !rule.runtime && isOn(rule));
@@ -173,6 +348,10 @@ export function createLinter(data = loadData(), { wrappers = {}, severities: con
173
348
  return !node.wrapped && !maybeInput;
174
349
  }
175
350
 
351
+ /** A rule whose context picks a value of a name that is gone: its fix is only right for that value. */
352
+ const testsRemovedValue = (rule) =>
353
+ rule.removed?.some((name) => new RegExp(`\\[${name.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}\\s*[~|^$*]?=`).test(rule.context));
354
+
176
355
  function lintRoots(roots, isPlainHtml) {
177
356
  const findings = [];
178
357
  const counts = { failed: 0, passed: 0, cantTell: 0 };
@@ -190,7 +369,7 @@ export function createLinter(data = loadData(), { wrappers = {}, severities: con
190
369
  message: rule.message,
191
370
  node,
192
371
  covers: [...(rule.removed ?? []), ...Object.keys(rule.fix?.value ?? {})],
193
- fix: isOurs(node, rule, isPlainHtml) ? rule.fix : undefined,
372
+ fix: isOurs(node, rule, isPlainHtml) && !(outcome === 'cantTell' && testsRemovedValue(rule)) ? rule.fix : undefined,
194
373
  });
195
374
  }
196
375
  }
@@ -201,8 +380,9 @@ export function createLinter(data = loadData(), { wrappers = {}, severities: con
201
380
  /** @returns {Promise<{ findings: object[], counts: object }>} */
202
381
  async function lintSource(source, filename) {
203
382
  const parsed = applyWrappers(await parseSource(source, filename), wrappers);
204
- const isPlainHtml = /\.(html?|j2|jinja2?)$/.test(filename);
383
+ const isPlainHtml = /\.(html?|j2|jinja2?|tmpl|gohtml)$/.test(filename);
205
384
  const roots = readPropertyNames(parsed, data.tags, isPlainHtml);
385
+ readLinkedStylesheets(roots, filename);
206
386
  const { findings, counts } = lintRoots(roots, isPlainHtml);
207
387
  const { suppressed, missingReason } = readSuppressions(source, canonical);
208
388
  const position = createPositions(source);
@@ -222,7 +402,12 @@ export function createLinter(data = loadData(), { wrappers = {}, severities: con
222
402
  offset: node.offset,
223
403
  endOffset: node.endOffset,
224
404
  ...position(node.offset),
225
- }));
405
+ }))
406
+ .concat(
407
+ [...cssFindings(source, filename, roots), ...unreadMarkup(source, filename, parsed)]
408
+ .filter(({ rule }) => ranInSource(rule))
409
+ .map((finding) => ({ ...finding, ...position(finding.offset) })),
410
+ );
226
411
  const stuck = stuckTags(source, all, /\.[jt]sx$/.test(filename));
227
412
  for (const finding of all) {
228
413
  if (finding.fix && (!canFix(source, finding) || (finding.fix.tag && stuck.has(finding.tag)))) finding.fix = undefined;
package/lint/main.js CHANGED
@@ -4,6 +4,7 @@ import { existsSync, readFileSync, writeFileSync } from 'node:fs';
4
4
  import { dirname, extname, join, relative, resolve, sep } from 'node:path';
5
5
  import { parseArgs } from 'node:util';
6
6
  import { applyFixes, linesNaming, renameReferences } from './fix.js';
7
+ import { declarations, TOKEN_PREFIX } from './css.js';
7
8
  import { formatGithub, formatJson, formatStatistics, formatText } from './format.js';
8
9
  import { BUILT_IN_RULES, createCanonical, loadData, GROUPS, OPT_IN_GROUPS, resolveSeverities } from './rule-data.js';
9
10
  import { rulesAboutTag } from './rule-index.js';
@@ -13,7 +14,7 @@ const USAGE = `Usage:
13
14
  nldd lint [paths...] check files; without paths, the whole project
14
15
  --format text|json|github default: text
15
16
  --fix apply the fixes that are certain: what only got another name
16
- --pure also check that everything comes from the system: no class,
17
+ --pure also check that everything comes from the design system: no class,
17
18
  style, plain HTML or stylesheet of your own (the group pure).
18
19
  Reads every file, stylesheets included, so it takes longer
19
20
  --update-baseline accept what is there now, report only new findings
@@ -75,7 +76,7 @@ function installedVersion(directory) {
75
76
 
76
77
  /**
77
78
  * The linter knows the API of its own version, so a project's own `nldd` is always
78
- * right. A newer one, through `npx @nldd/design-system@latest`, is how you see what
79
+ * right. A newer one, through `npx @nldd/design-system@<version>`, is how you see what
79
80
  * an upgrade will break: useful, as long as it is clear that is what you are looking at.
80
81
  */
81
82
  function noteOtherVersion(root) {
@@ -166,7 +167,7 @@ async function runLint(data, paths, options) {
166
167
  // An app that is to be pure has to be read in full: a file without a single component
167
168
  // is the least pure of all, and a stylesheet is one too.
168
169
  const pure = data.rules.some((rule) => OPT_IN_GROUPS.includes(rule.group) && severities[rule.id] !== 'off');
169
- const extensions = pure ? [...DEFAULT_EXTENSIONS, ...STYLESHEET_EXTENSIONS] : DEFAULT_EXTENSIONS;
170
+ const extensions = [...DEFAULT_EXTENSIONS, ...STYLESHEET_EXTENSIONS];
170
171
 
171
172
  const inputs = options.stdin
172
173
  ? [{ filename: resolve(root, options.filename ?? 'stdin.html'), source: readFileSync(0, 'utf8') }]
@@ -178,14 +179,26 @@ async function runLint(data, paths, options) {
178
179
  // Most files in an app use no component at all, and those need no parser either.
179
180
  // Tightening has to see every file the baseline names, also one without a component left.
180
181
  const inBaseline = options['tighten-baseline'] ? new Set(Object.keys(readBaseline(root, canonical))) : new Set();
181
- const relevant = pure ? inputs : inputs.filter(({ filename, source }) => /nldd-|Nldd/.test(source) || config.wrappers || inBaseline.has(relative(root, filename)));
182
+ // A stylesheet counts for the tokens it names and the variables it sets, and only then.
183
+ const isStylesheet = (filename) => STYLESHEET_EXTENSIONS.includes(extname(filename));
184
+ const namesTokens = (source) => /var\(\s*--(primitives|semantics|components|context)-|--_[a-z]/.test(source);
185
+ const relevant = pure
186
+ ? inputs
187
+ : inputs.filter(({ filename, source }) =>
188
+ isStylesheet(filename)
189
+ ? namesTokens(source) || inBaseline.has(relative(root, filename))
190
+ : /nldd-|Nldd/.test(source) || namesTokens(source) || config.wrappers || inBaseline.has(relative(root, filename)),
191
+ );
192
+ const counted = pure ? inputs.length : inputs.filter(({ filename }) => !isStylesheet(filename)).length + relevant.filter(({ filename }) => isStylesheet(filename)).length;
193
+ // What the project declares itself, in any file read, is its own token and not a typo.
194
+ const projectTokens = [...new Set(inputs.flatMap(({ source }) => (/--(primitives|semantics|components|context)-/.test(source) ? declarations(source).map(({ name }) => name) : [])).filter((name) => TOKEN_PREFIX.test(name)))];
182
195
  const results = [];
183
196
  let fixed = 0;
184
197
  let fixedFiles = 0;
185
198
  const renamedTags = new Map();
186
199
  if (relevant.length > 0) {
187
200
  const { createLinter } = await import('./linter.js');
188
- const linter = createLinter(data, { wrappers: config.wrappers, severities });
201
+ const linter = createLinter(data, { wrappers: config.wrappers, severities, projectTokens });
189
202
  for (const { filename, source } of relevant) {
190
203
  const canWrite = options.fix && isUtf8(filename);
191
204
  if (options.fix && !canWrite) console.error(`Skipped ${relative(root, filename)}: it is not UTF-8.`);
@@ -203,7 +216,7 @@ async function runLint(data, paths, options) {
203
216
  results.push({ filename, source: change.source, findings: change.findings });
204
217
  }
205
218
  }
206
- if (options.fix) console.error(`Fixed ${fixed} in ${fixedFiles} of ${inputs.length} files.`);
219
+ if (options.fix) console.error(`Fixed ${fixed} in ${fixedFiles} of ${counted} files.`);
207
220
  if (renamedTags.size > 0) {
208
221
  const references = fixReferences(renamedTags, paths, root, config.exclude);
209
222
  if (references.fixed > 0) console.error(`Renamed ${references.fixed} imports, classes and selectors of old tags in ${references.files} files.`);
@@ -238,7 +251,7 @@ async function runLint(data, paths, options) {
238
251
 
239
252
  const context = {
240
253
  root,
241
- files: inputs.length,
254
+ files: counted,
242
255
  ms: Math.round(performance.now() - started),
243
256
  skipped,
244
257
  loose: looseInBaseline(results, baseline, root, ran),
package/lint/project.js CHANGED
@@ -6,9 +6,9 @@ import { extname, join, relative, resolve } from 'node:path';
6
6
 
7
7
  export const IGNORED_DIRECTORIES = new Set(['node_modules', 'dist', 'build', 'coverage', '.git', '.next', '.nuxt']);
8
8
  /** Markdown is linted on request: documentation is full of deliberately wrong examples. */
9
- export const DEFAULT_EXTENSIONS = ['.html', '.htm', '.j2', '.jinja', '.jinja2', '.vue', '.jsx', '.tsx'];
9
+ export const DEFAULT_EXTENSIONS = ['.html', '.htm', '.j2', '.jinja', '.jinja2', '.tmpl', '.gohtml', '.vue', '.jsx', '.tsx'];
10
10
 
11
- /** Read only when a rule about an app's own stylesheets is on. */
11
+ /** An app's own stylesheets: read for the tokens they name, and in full when the group pure is on. */
12
12
  export const STYLESHEET_EXTENSIONS = ['.css', '.scss', '.sass', '.less'];
13
13
 
14
14
  /** Where a tag name stands outside markup: the linter does not read these, a renamed tag does. */
package/lint/rule-data.js CHANGED
@@ -77,6 +77,26 @@ export const BUILT_IN_RULES = {
77
77
  severity: 'warn',
78
78
  description: 'This still works, but will go away in a later version.',
79
79
  },
80
+ 'token-not-found': {
81
+ severity: 'warn',
82
+ description: 'The design system has no token with this name, so the declaration that uses it does nothing.',
83
+ },
84
+ 'translation-key-not-found': {
85
+ severity: 'warn',
86
+ description: 'The element has no translation key with this name, so the text stays Dutch.',
87
+ },
88
+ 'local-variable-no-override': {
89
+ severity: 'warn',
90
+ description: 'A `--_` variable belongs to the inside of one component and can change in any release. Use the component\'s attributes, or open an issue for what is missing.',
91
+ },
92
+ 'link-context-needs-states': {
93
+ severity: 'warn',
94
+ description: 'A surface that gives links a color sets all three link colors, or a link on it turns back to the default blue on hover or press.',
95
+ },
96
+ 'file-not-read': {
97
+ severity: 'warn',
98
+ description: 'This file has nldd-* markup the linter cannot read, so it was not checked.',
99
+ },
80
100
  'suppression-needs-reason': {
81
101
  severity: 'warn',
82
102
  description: 'Say why after `--`, so the next reader knows why this rule is off here.',