@nldd/design-system 0.22.0 → 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.
- package/README.md +5 -3
- package/custom-elements.json +194 -185
- package/dist/assets/styles/shadow-resets.d.ts +19 -0
- package/dist/assets/styles/shadow-resets.d.ts.map +1 -1
- package/dist/assets/styles/shadow-resets.js +35 -0
- package/dist/assets/styles/shadow-resets.js.map +1 -1
- package/dist/cdn/autoloader.js +136 -136
- package/dist/cdn/chunks/{activity-indicator-BTnpfsIt.js → activity-indicator-D86Mv6SL.js} +8 -7
- package/dist/cdn/chunks/{avatar--5c37XVW.js → avatar-BISv6tzp.js} +20 -19
- package/dist/cdn/chunks/{avatar-group-BNfmY5CU.js → avatar-group-D7IN6DxU.js} +17 -16
- package/dist/cdn/chunks/{badge-YAvIVoRy.js → badge-R3PZUsqZ.js} +13 -10
- package/dist/cdn/chunks/{banner-BpCK57yd.js → banner-DRANlf5k.js} +9 -7
- package/dist/cdn/chunks/{bar-split-view-BgYo4YJw.js → bar-split-view-B-Y2nqgS.js} +27 -24
- package/dist/cdn/chunks/{blockquote-BOu-31f3.js → blockquote-pUgJLPY1.js} +4 -3
- package/dist/cdn/chunks/{box-YipFNjJh.js → box-BbXHpBQy.js} +12 -10
- package/dist/cdn/chunks/{breadcrumbs-DSVAVozW.js → breadcrumbs-BdF4m3DB.js} +13 -8
- package/dist/cdn/chunks/{button-XtEOeBEq.js → button-CsqNHH3w.js} +48 -35
- package/dist/cdn/chunks/{button-bar-D1i71rRQ.js → button-bar-CnYIw4fN.js} +15 -11
- package/dist/cdn/chunks/{button-group-un5QDbqK.js → button-group-xaHghyon.js} +2 -2
- package/dist/cdn/chunks/{card-D5yTAdts.js → card-Bbf0aCIh.js} +24 -22
- package/dist/cdn/chunks/{cell-BbtB9C2Z.js → cell-Dggt5oYG.js} +6 -6
- package/dist/cdn/chunks/{checkbox-oYX8b8iy.js → checkbox-DmFAS8ec.js} +25 -20
- package/dist/cdn/chunks/{checkbox-field-Cmc6Aagc.js → checkbox-field-fOWPH8Q7.js} +9 -7
- package/dist/cdn/chunks/{class-map-DKd4N9Wz.js → class-map-BWGTUNv4.js} +1 -1
- package/dist/cdn/chunks/{code-editor-BZwpTu4O.js → code-editor-CANFZX66.js} +7 -6
- package/dist/cdn/chunks/{code-viewer-C4XDF03i.js → code-viewer-C_vUEx7J.js} +136 -99
- package/dist/cdn/chunks/{codemirror-input-Sen5OmAF.js → codemirror-input-wexTiqWw.js} +4 -4
- package/dist/cdn/chunks/{collection-BnZstW7U.js → collection-_emTry5U.js} +8 -8
- package/dist/cdn/chunks/{combo-box-BpaGeypm.js → combo-box-CGwj1u4a.js} +17 -8
- package/dist/cdn/chunks/{container-DuV5d7Eb.js → container-D5Dz-j6a.js} +14 -6
- package/dist/cdn/chunks/{custom-element-DsfOrnOD.js → custom-element-DbwbPetH.js} +1 -1
- package/dist/cdn/chunks/{date-field-FactdbhC.js → date-field-ChmyLtTj.js} +21 -11
- package/dist/cdn/chunks/{date-picker-BtlBTKvh.js → date-picker-CUQKdjS4.js} +18 -10
- package/dist/cdn/chunks/{decorate-CJCfz_g6.js → decorate-_JGq4E_7.js} +1 -1
- package/dist/cdn/chunks/{described-by-mixin-CPultP0p.js → described-by-mixin-DbnuGktP.js} +2 -2
- package/dist/cdn/chunks/{description-cell-DFc0_dWI.js → description-cell-BgcO7ObI.js} +9 -8
- package/dist/cdn/chunks/{dev-checks-DGwOQoR3.js → dev-checks-KAnKlxY0.js} +115 -57
- package/dist/cdn/chunks/{dist-ClsiJytN.js → dist-BF9euKgj.js} +2 -2
- package/dist/cdn/chunks/{dist-D-9cbJjq.js → dist-BHMubC6P.js} +3 -3
- package/dist/cdn/chunks/{dist-CxdoWiwX.js → dist-BJrN5nEM.js} +1 -1
- package/dist/cdn/chunks/{dist-CtdONv3x.js → dist-Bz3Isx60.js} +1 -1
- package/dist/cdn/chunks/{dist-BuquxOFD.js → dist-CBnQQ6kV.js} +2 -2
- package/dist/cdn/chunks/{dist-CM5DHMaz.js → dist-CJLBwJx0.js} +1 -1
- package/dist/cdn/chunks/{dist-BUqkX3a-.js → dist-CKZ98PMy.js} +3 -3
- package/dist/cdn/chunks/{dist-6xUfJUfa.js → dist-CLKJ5z0x.js} +1 -1
- package/dist/cdn/chunks/{dist-AQ1Gehx3.js → dist-D7Wubc1l.js} +1 -1
- package/dist/cdn/chunks/{dist-BWSiWu4t.js → dist-DADIyiX-.js} +2 -2
- package/dist/cdn/chunks/{dist-Bmb_H8Sp.js → dist-HgRt6IKh.js} +1 -1
- package/dist/cdn/chunks/{divider-CZ8Hn1om.js → divider-pO5O6wL4.js} +2 -2
- package/dist/cdn/chunks/{document-tab-bar-BBnyyiEA.js → document-tab-bar-C_-iuaUc.js} +27 -13
- package/dist/cdn/chunks/{dropdown-Bbbgy8mT.js → dropdown-DYO6049g.js} +10 -5
- package/dist/cdn/chunks/{file-field-CddG_e0F.js → file-field-C-Fk92rD.js} +30 -12
- package/dist/cdn/chunks/{form-DIIMIq0q.js → form-ChXBrKw6.js} +1 -1
- package/dist/cdn/chunks/{form-actions-BICy0Sgp.js → form-actions-DrOX7nX8.js} +2 -2
- package/dist/cdn/chunks/{form-field-Bnei2EQO.js → form-field-CR2Py09O.js} +15 -8
- package/dist/cdn/chunks/{form-section-Cv0tr0pm.js → form-section-s1mkLzaC.js} +1 -1
- package/dist/cdn/chunks/{full-bleed-section-LOfo_1Aj.js → full-bleed-section-vOVI_f86.js} +3 -3
- package/dist/cdn/chunks/{hero-BABWpYs5.js → hero-Cb3qIvvh.js} +106 -97
- package/dist/cdn/chunks/{icon-D5dJm51v.js → icon-DBhTZrnl.js} +52 -29
- package/dist/cdn/chunks/{icon-button-DtxIRaQy.js → icon-button-bDuQ_6W_.js} +37 -28
- package/dist/cdn/chunks/{icon-cell-Be5awZV7.js → icon-cell-DlSZNTF3.js} +11 -11
- package/dist/cdn/chunks/{identity-B4KtbT8h.js → identity-CJTVNI9J.js} +7 -5
- package/dist/cdn/chunks/{if-defined-BirFs11D.js → if-defined-28B8DYUB.js} +1 -1
- package/dist/cdn/chunks/{image-BpVEir6U.js → image-DlTxyeL3.js} +44 -34
- package/dist/cdn/chunks/{inline-dialog-B627fZmT.js → inline-dialog-BJlOrD6M.js} +9 -6
- package/dist/cdn/chunks/{just-in-time-education-Nw5ido3N.js → just-in-time-education-DWBDshKs.js} +8 -5
- package/dist/cdn/chunks/{kanban-9HGexCJx.js → kanban-DIXY8FcZ.js} +5 -5
- package/dist/cdn/chunks/{kanban-column-v5rfv8fN.js → kanban-column-DmnxctX6.js} +6 -4
- package/dist/cdn/chunks/{keyboard-shortcut-CVNilmgr.js → keyboard-shortcut-kYOKwBqs.js} +8 -6
- package/dist/cdn/chunks/{languages-Ce4h7R1-.js → languages-DGtcUhLc.js} +12 -12
- package/dist/cdn/chunks/{link-BQQwp17j.js → link-DhnhhTOg.js} +11 -8
- package/dist/cdn/chunks/{link-group-CQhEcQIV.js → link-group-Bx2nkQcS.js} +2 -2
- package/dist/cdn/chunks/{list-DDxjOe38.js → list-CXCG_IEc.js} +48 -13
- package/dist/cdn/chunks/{list-item-Da6-fFDs.js → list-item-CSNBaRlK.js} +110 -103
- package/dist/cdn/chunks/{list-item-segment-CnGHU6G-.js → list-item-segment-D6WvAh3A.js} +14 -12
- package/dist/cdn/chunks/{menu-uOExHS1i.js → menu-CKxKVA36.js} +13 -13
- package/dist/cdn/chunks/{menu-bar-item-BuZ-VvnR.js → menu-bar-item-C950rfSt.js} +7 -6
- package/dist/cdn/chunks/{menu-bar-MPNB2ovW.js → menu-bar-xahTEYTX.js} +6 -6
- package/dist/cdn/chunks/{menu-divider-CcOTQxx5.js → menu-divider-XlYJ4zQz.js} +3 -3
- package/dist/cdn/chunks/{menu-group-DGgbYejF.js → menu-group-E6hIEtLj.js} +4 -4
- package/dist/cdn/chunks/{menu-item-DgM4RmyD.js → menu-item-2y0VC5Gb.js} +32 -30
- package/dist/cdn/chunks/menu-item.i18n-CKUJBOeE.js +7 -0
- package/dist/cdn/chunks/{menu.template-DkbfQRQ6.js → menu.template-ZBhUFgBJ.js} +55 -34
- package/dist/cdn/chunks/{modal-dialog-BRYfJ7Vf.js → modal-dialog-DdFpcRLJ.js} +27 -26
- package/dist/cdn/chunks/{multi-line-text-field-CWOPY6sF.js → multi-line-text-field-okvEa54Q.js} +9 -5
- package/dist/cdn/chunks/{navigation-split-view-BRiplUXM.js → navigation-split-view-dNRQDSpy.js} +50 -69
- package/dist/cdn/chunks/{nl.generated-fkFCex7n.js → nl.generated-Bo4bmwYF.js} +5 -3
- package/dist/cdn/chunks/{notification-DhnzrUQp.js → notification-2tnwXEY1.js} +9 -6
- package/dist/cdn/chunks/{number-field-DgRrXCiv.js → number-field-CH7EvpSq.js} +13 -7
- package/dist/cdn/chunks/{one-half-one-half-section-D7tzDw-p.js → one-half-one-half-section-UZDP-KO-.js} +3 -3
- package/dist/cdn/chunks/{one-third-two-thirds-section-E8xOdcsf.js → one-third-two-thirds-section-8KtESdXO.js} +3 -3
- package/dist/cdn/chunks/{one-time-code-field-BoJdVvNN.js → one-time-code-field-Bvm3ND6e.js} +10 -6
- package/dist/cdn/chunks/{page-DDm193hL.js → page-PK1FWuKJ.js} +35 -32
- package/dist/cdn/chunks/{page-footer-32oZSwvG.js → page-footer-BamWKHwH.js} +45 -42
- package/dist/cdn/chunks/{page-section-mixin-CmsW9L1S.js → page-section-mixin-3q59_Jo_.js} +39 -35
- package/dist/cdn/chunks/{pagination-Co1BlFTP.js → pagination-47zAyQhM.js} +13 -6
- package/dist/cdn/chunks/{password-field-BxKQRE4K.js → password-field-FaU02DSW.js} +11 -7
- package/dist/cdn/chunks/{popover-DpCE_XjR.js → popover-642mOFR5.js} +44 -42
- package/dist/cdn/chunks/{progress-bar-5WAVf0HV.js → progress-bar-BivaNkIY.js} +11 -9
- package/dist/cdn/chunks/{progress-circle-D7Mn6WZv.js → progress-circle-ewL0JIcz.js} +9 -7
- package/dist/cdn/chunks/{radio-button-pd8lwtEO.js → radio-button-DvrYYSnm.js} +16 -16
- package/dist/cdn/chunks/{radio-button-field-Dxnahic-.js → radio-button-field-BVi0YrTF.js} +9 -7
- package/dist/cdn/chunks/{radio-button-group-D_4lI2U-.js → radio-button-group-DZ9OWUNe.js} +3 -3
- package/dist/cdn/chunks/{render-marked-CAskRZMx.js → render-marked-CO31_4GS.js} +1 -1
- package/dist/cdn/chunks/{reorder-handle-cell-BL8ECfi5.js → reorder-handle-cell-Doetg58W.js} +5 -4
- package/dist/cdn/chunks/{reorder-handle-mixin-BDRPLv58.js → reorder-handle-mixin-DCjwUXr0.js} +2 -2
- package/dist/cdn/chunks/{repeat-D5W3dDCY.js → repeat-Wb4hkVZc.js} +1 -1
- package/dist/cdn/chunks/{rich-text-diNxNddp.js → rich-text-Do08iiIz.js} +4 -7
- package/dist/cdn/chunks/{row-header-mixin-Dj6t4nYI.js → row-header-mixin-CKR5rHBA.js} +2 -2
- package/dist/cdn/chunks/{search-field-CLuQnvBU.js → search-field-CCeeGiJM.js} +17 -9
- package/dist/cdn/chunks/{segmented-control-B0z5J7r9.js → segmented-control-CWIPxEBq.js} +12 -6
- package/dist/cdn/chunks/shadow-resets-NKr5gQCc.js +28 -0
- package/dist/cdn/chunks/{sheet-CKfFzUCu.js → sheet-WOjBtZvN.js} +38 -36
- package/dist/cdn/chunks/{shell-CglPjEWB.js → shell-Brn0Dr8F.js} +24 -21
- package/dist/cdn/chunks/{side-by-side-split-view-DU4ODEBX.js → side-by-side-split-view-DGIMsyma.js} +22 -19
- package/dist/cdn/chunks/{sidebar-section-DzJw-MHs.js → sidebar-section-BXHeI8GN.js} +23 -18
- package/dist/cdn/chunks/{simple-section-BfhBYqMa.js → simple-section-C8lJZLAO.js} +3 -3
- package/dist/cdn/chunks/{skip-link-DwVvD9XL.js → skip-link-QdRgHljr.js} +5 -4
- package/dist/cdn/chunks/{slider-BBxKxr-H.js → slider-BhjBeWqc.js} +11 -9
- package/dist/cdn/chunks/{spacer-CqK1xVh2.js → spacer-BgkOjuUj.js} +2 -2
- package/dist/cdn/chunks/{spacer-cell-DS7Tphdm.js → spacer-cell-DBI0PVd7.js} +4 -4
- package/dist/cdn/chunks/{split-button-Brh7EmIA.js → split-button-DfD9vxPe.js} +19 -15
- package/dist/cdn/chunks/{split-view-divider-Bh3XLobi.js → split-view-divider-B4NFlri5.js} +2 -2
- package/dist/cdn/chunks/{split-view-pane-BPKlAR4d.js → split-view-pane-CwFf13hX.js} +23 -20
- package/dist/cdn/chunks/{stacked-split-view-SrIHWkKW.js → stacked-split-view-BmbzTinq.js} +22 -19
- package/dist/cdn/chunks/{static-html-OvWm15yg.js → static-html-CZrcQRgC.js} +1 -1
- package/dist/cdn/chunks/{status-bar-IqyLnoMx.js → status-bar-CTOf_bDL.js} +5 -4
- package/dist/cdn/chunks/{step-bar-DltkU-AG.js → step-bar-B5vzvhz-.js} +13 -6
- package/dist/cdn/chunks/{step-cell-BHW3t6nn.js → step-cell-CUA-HUZv.js} +9 -6
- package/dist/cdn/chunks/{stepper-DMlk7A-Y.js → stepper-LxPTQ6HJ.js} +6 -6
- package/dist/cdn/chunks/{style-map-CNYX1L3t.js → style-map-DiIQAb_L.js} +1 -1
- package/dist/cdn/chunks/{swatch-picker-BAKkJFgt.js → swatch-picker-Cxv9HK3A.js} +6 -5
- package/dist/cdn/chunks/{switch-B3d_1Leh.js → switch-CbNSJQPp.js} +11 -10
- package/dist/cdn/chunks/{switch-field-BXJj1PHC.js → switch-field-B8vOvcKc.js} +9 -7
- package/dist/cdn/chunks/{tab-bar-C7T0XL0u.js → tab-bar-D4ot_wZ4.js} +14 -8
- package/dist/cdn/chunks/{table-CVyPmXfX.js → table-uh4YPqda.js} +5 -5
- package/dist/cdn/chunks/{tag-KdbJbRcK.js → tag-D2dCXT7A.js} +5 -4
- package/dist/cdn/chunks/{text-lQLJJw1m.js → text-BX4Xm40t.js} +19 -34
- package/dist/cdn/chunks/{text-cell-CUH5Tf5F.js → text-cell-DNCpmw9h.js} +21 -18
- package/dist/cdn/chunks/{text-editor-Bsfygq28.js → text-editor-C6UKAmPL.js} +37 -11
- package/dist/cdn/chunks/{text-field-BQxQe0ch.js → text-field-Dmkd4mHV.js} +14 -5
- package/dist/cdn/chunks/{time-field-kdMQ7qaa.js → time-field-BfgNZbEb.js} +17 -13
- package/dist/cdn/chunks/{time-picker-T1bZ4zxP.js → time-picker-C1SBkU-e.js} +10 -5
- package/dist/cdn/chunks/{title-yXmufzsm.js → title-DFrd-Fsh.js} +15 -34
- package/dist/cdn/chunks/{title-cell-CyJr9OiV.js → title-cell-CC1dQyth.js} +22 -19
- package/dist/cdn/chunks/{toggle-button-DiZaFEAk.js → toggle-button-bAX6uzgz.js} +13 -7
- package/dist/cdn/chunks/{toggle-button-group-DRai7q0C.js → toggle-button-group-B7CHBww5.js} +2 -2
- package/dist/cdn/chunks/{token-C6EudIjw.js → token-CicHNqIk.js} +9 -7
- package/dist/cdn/chunks/{token-field-OCw3wLIW.js → token-field-BFynQ-T-.js} +19 -11
- package/dist/cdn/chunks/{toolbar-K5UY_y15.js → toolbar-hAmL7o23.js} +8 -8
- package/dist/cdn/chunks/{toolbar-item-CI3OVQuq.js → toolbar-item-CjgkcYJ2.js} +3 -3
- package/dist/cdn/chunks/{toolbar-title-xvfrEhvQ.js → toolbar-title-B1acxCGx.js} +4 -4
- package/dist/cdn/chunks/{toolbar.styles-BBj5j7Iq.js → toolbar.styles-xiyZx5D0.js} +7 -3
- package/dist/cdn/chunks/{tooltip-B6XDYQNn.js → tooltip-Mj47t8v7.js} +49 -36
- package/dist/cdn/chunks/{top-navigation-bar-D7JkgCQi.js → top-navigation-bar-vP5QGBXd.js} +19 -17
- package/dist/cdn/chunks/{top-title-bar-BMSTl1Z7.js → top-title-bar-Yt6cmRLj.js} +8 -6
- package/dist/cdn/chunks/translations-BMMzf2sX.js +14 -0
- package/dist/cdn/chunks/{two-thirds-one-third-section-Cc1Mh9TT.js → two-thirds-one-third-section-BHN98jET.js} +3 -3
- package/dist/cdn/chunks/{validation-list-xF6yTpz8.js → validation-list-CUPzu9_z.js} +4 -3
- package/dist/cdn/chunks/{visibility-mixin-LkgEnUqn.js → visibility-mixin-DPuxf-sj.js} +2 -2
- package/dist/cdn/chunks/{visually-hidden-CMo9yGtA.js → visually-hidden-CvjJIBhz.js} +2 -2
- package/dist/cdn/chunks/{window-CclQ8SHn.js → window-BqGlzGaS.js} +40 -39
- package/dist/cdn/chunks/{with-translations-DdCPcavT.js → with-translations-CRvWJWep.js} +3 -3
- package/dist/components/actions/button/button.d.ts +2 -2
- package/dist/components/actions/button/button.js +1 -1
- package/dist/components/actions/button/button.styles.d.ts.map +1 -1
- package/dist/components/actions/button/button.styles.js +39 -26
- package/dist/components/actions/button/button.styles.js.map +1 -1
- package/dist/components/actions/button/button.template.js +1 -1
- package/dist/components/actions/button-bar/button-bar.d.ts +1 -1
- package/dist/components/actions/button-bar/button-bar.js +1 -1
- package/dist/components/actions/button-bar/button-bar.styles.d.ts.map +1 -1
- package/dist/components/actions/button-bar/button-bar.styles.js +12 -8
- package/dist/components/actions/button-bar/button-bar.styles.js.map +1 -1
- package/dist/components/actions/icon-button/icon-button.d.ts +2 -2
- package/dist/components/actions/icon-button/icon-button.js +1 -1
- package/dist/components/actions/icon-button/icon-button.styles.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.styles.js +29 -20
- package/dist/components/actions/icon-button/icon-button.styles.js.map +1 -1
- package/dist/components/actions/menu/menu-item.d.ts +15 -1
- package/dist/components/actions/menu/menu-item.d.ts.map +1 -1
- package/dist/components/actions/menu/menu-item.i18n.d.ts +7 -0
- package/dist/components/actions/menu/menu-item.i18n.d.ts.map +1 -0
- package/dist/components/actions/menu/menu-item.i18n.js +6 -0
- package/dist/components/actions/menu/menu-item.i18n.js.map +1 -0
- package/dist/components/actions/menu/menu-item.js +14 -1
- package/dist/components/actions/menu/menu-item.js.map +1 -1
- package/dist/components/actions/menu/menu.styles.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.styles.js +18 -1
- package/dist/components/actions/menu/menu.styles.js.map +1 -1
- package/dist/components/actions/menu/menu.template.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.template.js +8 -2
- package/dist/components/actions/menu/menu.template.js.map +1 -1
- package/dist/components/actions/split-button/split-button.d.ts +2 -2
- package/dist/components/actions/split-button/split-button.d.ts.map +1 -1
- package/dist/components/actions/split-button/split-button.js +1 -1
- package/dist/components/actions/split-button/split-button.styles.d.ts.map +1 -1
- package/dist/components/actions/split-button/split-button.styles.js +12 -8
- package/dist/components/actions/split-button/split-button.styles.js.map +1 -1
- package/dist/components/actions/toolbar/toolbar.styles.d.ts.map +1 -1
- package/dist/components/actions/toolbar/toolbar.styles.js +4 -0
- package/dist/components/actions/toolbar/toolbar.styles.js.map +1 -1
- package/dist/components/content/avatar/avatar.d.ts +7 -5
- package/dist/components/content/avatar/avatar.d.ts.map +1 -1
- package/dist/components/content/avatar/avatar.js +7 -5
- package/dist/components/content/avatar/avatar.js.map +1 -1
- package/dist/components/content/avatar/avatar.styles.d.ts.map +1 -1
- package/dist/components/content/avatar/avatar.styles.js +13 -12
- package/dist/components/content/avatar/avatar.styles.js.map +1 -1
- package/dist/components/content/avatar-group/avatar-group.d.ts +1 -1
- package/dist/components/content/avatar-group/avatar-group.js +1 -1
- package/dist/components/content/avatar-group/avatar-group.styles.d.ts.map +1 -1
- package/dist/components/content/avatar-group/avatar-group.styles.js +2 -1
- package/dist/components/content/avatar-group/avatar-group.styles.js.map +1 -1
- package/dist/components/content/blockquote/blockquote.styles.d.ts.map +1 -1
- package/dist/components/content/blockquote/blockquote.styles.js +1 -0
- package/dist/components/content/blockquote/blockquote.styles.js.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.d.ts +5 -0
- package/dist/components/content/code-viewer/code-viewer.d.ts.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.js +16 -1
- package/dist/components/content/code-viewer/code-viewer.js.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.styles.d.ts.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.styles.js +37 -8
- package/dist/components/content/code-viewer/code-viewer.styles.js.map +1 -1
- package/dist/components/content/icon/icon.d.ts +17 -15
- package/dist/components/content/icon/icon.d.ts.map +1 -1
- package/dist/components/content/icon/icon.js +19 -17
- package/dist/components/content/icon/icon.js.map +1 -1
- package/dist/components/content/icon/icon.styles.d.ts.map +1 -1
- package/dist/components/content/icon/icon.styles.js +47 -24
- package/dist/components/content/icon/icon.styles.js.map +1 -1
- package/dist/components/content/identity/identity.styles.d.ts.map +1 -1
- package/dist/components/content/identity/identity.styles.js +2 -0
- package/dist/components/content/identity/identity.styles.js.map +1 -1
- package/dist/components/content/image/image.styles.d.ts.map +1 -1
- package/dist/components/content/image/image.styles.js +33 -23
- package/dist/components/content/image/image.styles.js.map +1 -1
- package/dist/components/content/image/image.template.d.ts.map +1 -1
- package/dist/components/content/image/image.template.js +6 -8
- package/dist/components/content/image/image.template.js.map +1 -1
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.d.ts +5 -5
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.js +4 -4
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.styles.d.ts.map +1 -1
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.styles.js +5 -3
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.styles.js.map +1 -1
- package/dist/components/content/rich-text/rich-text.d.ts +0 -7
- package/dist/components/content/rich-text/rich-text.d.ts.map +1 -1
- package/dist/components/content/rich-text/rich-text.js +0 -10
- package/dist/components/content/rich-text/rich-text.js.map +1 -1
- package/dist/components/content/tag/tag.styles.d.ts.map +1 -1
- package/dist/components/content/tag/tag.styles.js +1 -0
- package/dist/components/content/tag/tag.styles.js.map +1 -1
- package/dist/components/content/text/text.d.ts +2 -2
- package/dist/components/content/text/text.d.ts.map +1 -1
- package/dist/components/content/text/text.js +1 -1
- package/dist/components/content/text/text.styles.d.ts.map +1 -1
- package/dist/components/content/text/text.styles.js +17 -32
- package/dist/components/content/text/text.styles.js.map +1 -1
- package/dist/components/content/title/title.d.ts +0 -6
- package/dist/components/content/title/title.d.ts.map +1 -1
- package/dist/components/content/title/title.js +0 -8
- package/dist/components/content/title/title.js.map +1 -1
- package/dist/components/content/title/title.styles.d.ts.map +1 -1
- package/dist/components/content/title/title.styles.js +10 -26
- package/dist/components/content/title/title.styles.js.map +1 -1
- package/dist/components/content/token/token.styles.d.ts.map +1 -1
- package/dist/components/content/token/token.styles.js +4 -2
- package/dist/components/content/token/token.styles.js.map +1 -1
- package/dist/components/content/tooltip/tooltip.styles.d.ts.map +1 -1
- package/dist/components/content/tooltip/tooltip.styles.js +18 -5
- package/dist/components/content/tooltip/tooltip.styles.js.map +1 -1
- package/dist/components/content/tooltip/tooltip.template.js +1 -1
- package/dist/components/forms/form-field/form-field.styles.d.ts.map +1 -1
- package/dist/components/forms/form-field/form-field.styles.js +10 -3
- package/dist/components/forms/form-field/form-field.styles.js.map +1 -1
- package/dist/components/forms/validation-list/validation-list.styles.d.ts.map +1 -1
- package/dist/components/forms/validation-list/validation-list.styles.js +1 -0
- package/dist/components/forms/validation-list/validation-list.styles.js.map +1 -1
- package/dist/components/inputs/checkbox/checkbox.d.ts +3 -3
- package/dist/components/inputs/checkbox/checkbox.js +2 -2
- package/dist/components/inputs/checkbox/checkbox.styles.d.ts.map +1 -1
- package/dist/components/inputs/checkbox/checkbox.styles.js +23 -18
- package/dist/components/inputs/checkbox/checkbox.styles.js.map +1 -1
- package/dist/components/inputs/checkbox-field/checkbox-field.d.ts +3 -3
- package/dist/components/inputs/checkbox-field/checkbox-field.js +2 -2
- package/dist/components/inputs/checkbox-field/checkbox-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/checkbox-field/checkbox-field.styles.js +4 -2
- package/dist/components/inputs/checkbox-field/checkbox-field.styles.js.map +1 -1
- package/dist/components/inputs/code-editor/code-editor.styles.d.ts.map +1 -1
- package/dist/components/inputs/code-editor/code-editor.styles.js +2 -1
- package/dist/components/inputs/code-editor/code-editor.styles.js.map +1 -1
- package/dist/components/inputs/combo-box/combo-box.styles.d.ts.map +1 -1
- package/dist/components/inputs/combo-box/combo-box.styles.js +9 -0
- package/dist/components/inputs/combo-box/combo-box.styles.js.map +1 -1
- package/dist/components/inputs/date-field/date-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/date-field/date-field.styles.js +10 -0
- package/dist/components/inputs/date-field/date-field.styles.js.map +1 -1
- package/dist/components/inputs/date-picker/date-picker.styles.d.ts.map +1 -1
- package/dist/components/inputs/date-picker/date-picker.styles.js +8 -0
- package/dist/components/inputs/date-picker/date-picker.styles.js.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.styles.d.ts.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.styles.js +5 -0
- package/dist/components/inputs/dropdown/dropdown.styles.js.map +1 -1
- package/dist/components/inputs/file-field/file-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/file-field/file-field.styles.js +18 -0
- package/dist/components/inputs/file-field/file-field.styles.js.map +1 -1
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.js +4 -0
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.js.map +1 -1
- package/dist/components/inputs/number-field/number-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/number-field/number-field.styles.js +6 -0
- package/dist/components/inputs/number-field/number-field.styles.js.map +1 -1
- package/dist/components/inputs/one-time-code-field/one-time-code-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/one-time-code-field/one-time-code-field.styles.js +4 -0
- package/dist/components/inputs/one-time-code-field/one-time-code-field.styles.js.map +1 -1
- package/dist/components/inputs/password-field/password-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/password-field/password-field.styles.js +4 -0
- package/dist/components/inputs/password-field/password-field.styles.js.map +1 -1
- package/dist/components/inputs/radio-button/radio-button.d.ts +3 -3
- package/dist/components/inputs/radio-button/radio-button.js +2 -2
- package/dist/components/inputs/radio-button/radio-button.styles.js +13 -13
- package/dist/components/inputs/radio-button-field/radio-button-field.d.ts +3 -3
- package/dist/components/inputs/radio-button-field/radio-button-field.js +2 -2
- package/dist/components/inputs/radio-button-field/radio-button-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/radio-button-field/radio-button-field.styles.js +4 -2
- package/dist/components/inputs/radio-button-field/radio-button-field.styles.js.map +1 -1
- package/dist/components/inputs/search-field/search-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/search-field/search-field.styles.js +8 -0
- package/dist/components/inputs/search-field/search-field.styles.js.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.styles.d.ts.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.styles.js +6 -0
- package/dist/components/inputs/segmented-control/segmented-control.styles.js.map +1 -1
- package/dist/components/inputs/slider/slider.styles.d.ts.map +1 -1
- package/dist/components/inputs/slider/slider.styles.js +3 -1
- package/dist/components/inputs/slider/slider.styles.js.map +1 -1
- package/dist/components/inputs/swatch-picker/swatch-picker.styles.d.ts.map +1 -1
- package/dist/components/inputs/swatch-picker/swatch-picker.styles.js +1 -0
- package/dist/components/inputs/swatch-picker/swatch-picker.styles.js.map +1 -1
- package/dist/components/inputs/switch/switch.d.ts +3 -3
- package/dist/components/inputs/switch/switch.js +2 -2
- package/dist/components/inputs/switch/switch.styles.d.ts.map +1 -1
- package/dist/components/inputs/switch/switch.styles.js +7 -6
- package/dist/components/inputs/switch/switch.styles.js.map +1 -1
- package/dist/components/inputs/switch-field/switch-field.d.ts +3 -3
- package/dist/components/inputs/switch-field/switch-field.js +2 -2
- package/dist/components/inputs/switch-field/switch-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/switch-field/switch-field.styles.js +4 -2
- package/dist/components/inputs/switch-field/switch-field.styles.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.js +6 -0
- package/dist/components/inputs/text-editor/text-editor.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.markdown.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.markdown.js +3 -1
- package/dist/components/inputs/text-editor/text-editor.markdown.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.styles.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.styles.js +26 -0
- package/dist/components/inputs/text-editor/text-editor.styles.js.map +1 -1
- package/dist/components/inputs/text-field/text-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/text-field/text-field.styles.js +9 -0
- package/dist/components/inputs/text-field/text-field.styles.js.map +1 -1
- package/dist/components/inputs/time-field/time-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/time-field/time-field.styles.js +4 -0
- package/dist/components/inputs/time-field/time-field.styles.js.map +1 -1
- package/dist/components/inputs/time-picker/time-picker.styles.d.ts.map +1 -1
- package/dist/components/inputs/time-picker/time-picker.styles.js +5 -0
- package/dist/components/inputs/time-picker/time-picker.styles.js.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.styles.d.ts.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.styles.js +6 -0
- package/dist/components/inputs/toggle-button/toggle-button.styles.js.map +1 -1
- package/dist/components/inputs/token-field/token-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/token-field/token-field.styles.js +9 -1
- package/dist/components/inputs/token-field/token-field.styles.js.map +1 -1
- package/dist/components/layout/box/box.styles.d.ts.map +1 -1
- package/dist/components/layout/box/box.styles.js +3 -1
- package/dist/components/layout/box/box.styles.js.map +1 -1
- package/dist/components/layout/card/card.styles.d.ts.map +1 -1
- package/dist/components/layout/card/card.styles.js +5 -3
- package/dist/components/layout/card/card.styles.js.map +1 -1
- package/dist/components/layout/container/container.d.ts +7 -0
- package/dist/components/layout/container/container.d.ts.map +1 -1
- package/dist/components/layout/container/container.js +30 -0
- package/dist/components/layout/container/container.js.map +1 -1
- package/dist/components/layout/kanban/kanban.styles.d.ts.map +1 -1
- package/dist/components/layout/kanban/kanban.styles.js +2 -0
- package/dist/components/layout/kanban/kanban.styles.js.map +1 -1
- package/dist/components/layout/page/page.styles.d.ts.map +1 -1
- package/dist/components/layout/page/page.styles.js +8 -5
- package/dist/components/layout/page/page.styles.js.map +1 -1
- package/dist/components/layout/page-footer/page-footer.styles.d.ts.map +1 -1
- package/dist/components/layout/page-footer/page-footer.styles.js +5 -2
- package/dist/components/layout/page-footer/page-footer.styles.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.d.ts +3 -4
- package/dist/components/layout/page-sections/hero/hero.d.ts.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.js +3 -4
- package/dist/components/layout/page-sections/hero/hero.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.styles.d.ts.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.styles.js +14 -5
- package/dist/components/layout/page-sections/hero/hero.styles.js.map +1 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts +2 -2
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js +21 -2
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js.map +1 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.styles.js +1 -1
- package/dist/components/layout/popover/popover.styles.d.ts.map +1 -1
- package/dist/components/layout/popover/popover.styles.js +3 -1
- package/dist/components/layout/popover/popover.styles.js.map +1 -1
- package/dist/components/layout/sheet/sheet.styles.d.ts.map +1 -1
- package/dist/components/layout/sheet/sheet.styles.js +3 -1
- package/dist/components/layout/sheet/sheet.styles.js.map +1 -1
- package/dist/components/layout/shell/shell.d.ts +1 -1
- package/dist/components/layout/shell/shell.js +1 -1
- package/dist/components/layout/shell/shell.styles.d.ts.map +1 -1
- package/dist/components/layout/shell/shell.styles.js +6 -3
- package/dist/components/layout/shell/shell.styles.js.map +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.d.ts +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.js +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.styles.d.ts.map +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.styles.js +8 -5
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.styles.js.map +1 -1
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.d.ts +0 -28
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.d.ts.map +1 -1
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.js +10 -57
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.js.map +1 -1
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.styles.d.ts.map +1 -1
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.styles.js +8 -5
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.styles.js.map +1 -1
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.template.d.ts.map +1 -1
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.template.js +2 -4
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.template.js.map +1 -1
- package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.styles.d.ts.map +1 -1
- package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.styles.js +8 -5
- package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.styles.js.map +1 -1
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.d.ts +2 -2
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.js +2 -2
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.styles.d.ts.map +1 -1
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.styles.js +8 -5
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.styles.js.map +1 -1
- package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.styles.d.ts.map +1 -1
- package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.styles.js +8 -5
- package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.styles.js.map +1 -1
- package/dist/components/layout/window/window.styles.d.ts.map +1 -1
- package/dist/components/layout/window/window.styles.js +3 -2
- package/dist/components/layout/window/window.styles.js.map +1 -1
- package/dist/components/lists-and-tables/cells/description-cell/description-cell.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/description-cell/description-cell.styles.js +3 -2
- package/dist/components/lists-and-tables/cells/description-cell/description-cell.styles.js.map +1 -1
- package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.styles.js +6 -6
- package/dist/components/lists-and-tables/cells/reorder-handle-cell/reorder-handle-cell.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/reorder-handle-cell/reorder-handle-cell.styles.js +1 -0
- package/dist/components/lists-and-tables/cells/reorder-handle-cell/reorder-handle-cell.styles.js.map +1 -1
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.styles.js +4 -1
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.styles.js.map +1 -1
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.d.ts +5 -3
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.js +5 -3
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.js.map +1 -1
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.styles.js +14 -11
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.styles.js.map +1 -1
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.styles.js +14 -11
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.styles.js.map +1 -1
- package/dist/components/lists-and-tables/list/list.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list/list.styles.js +40 -5
- package/dist/components/lists-and-tables/list/list.styles.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.d.ts +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.styles.js +27 -20
- package/dist/components/lists-and-tables/list-item/list-item.styles.js.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.js +11 -9
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.js.map +1 -1
- package/dist/components/navigation/breadcrumbs/breadcrumbs.styles.d.ts.map +1 -1
- package/dist/components/navigation/breadcrumbs/breadcrumbs.styles.js +8 -3
- package/dist/components/navigation/breadcrumbs/breadcrumbs.styles.js.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.js +18 -4
- package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.js.map +1 -1
- package/dist/components/navigation/link/link.styles.d.ts.map +1 -1
- package/dist/components/navigation/link/link.styles.js +6 -3
- package/dist/components/navigation/link/link.styles.js.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.styles.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.styles.js +1 -0
- package/dist/components/navigation/menu-bar-item/menu-bar-item.styles.js.map +1 -1
- package/dist/components/navigation/pagination/pagination.styles.d.ts.map +1 -1
- package/dist/components/navigation/pagination/pagination.styles.js +7 -0
- package/dist/components/navigation/pagination/pagination.styles.js.map +1 -1
- package/dist/components/navigation/skip-link/skip-link.styles.d.ts.map +1 -1
- package/dist/components/navigation/skip-link/skip-link.styles.js +1 -0
- package/dist/components/navigation/skip-link/skip-link.styles.js.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.styles.js +6 -0
- package/dist/components/navigation/tab-bar/tab-bar.styles.js.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js +2 -0
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js.map +1 -1
- package/dist/components/navigation/top-title-bar/top-title-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/top-title-bar/top-title-bar.styles.js +2 -0
- package/dist/components/navigation/top-title-bar/top-title-bar.styles.js.map +1 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.d.ts +4 -6
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.d.ts.map +1 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.js +4 -6
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.js.map +1 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.styles.js +3 -2
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.styles.js.map +1 -1
- package/dist/components/status-and-feedback/badge/badge.d.ts +3 -3
- package/dist/components/status-and-feedback/badge/badge.js +3 -3
- package/dist/components/status-and-feedback/badge/badge.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/badge/badge.styles.js +7 -4
- package/dist/components/status-and-feedback/badge/badge.styles.js.map +1 -1
- package/dist/components/status-and-feedback/banner/banner.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/banner/banner.styles.js +2 -0
- package/dist/components/status-and-feedback/banner/banner.styles.js.map +1 -1
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.js +3 -0
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.js.map +1 -1
- package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.styles.js +3 -0
- package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.styles.js.map +1 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.styles.js +3 -2
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.styles.js.map +1 -1
- package/dist/components/status-and-feedback/notification/notification.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/notification/notification.styles.js +3 -0
- package/dist/components/status-and-feedback/notification/notification.styles.js.map +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.js +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.js.map +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.styles.js +3 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.styles.js.map +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.styles.js +2 -0
- package/dist/components/status-and-feedback/progress-circle/progress-circle.styles.js.map +1 -1
- package/dist/components/status-and-feedback/status-bar/status-bar.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/status-bar/status-bar.styles.js +1 -0
- package/dist/components/status-and-feedback/status-bar/status-bar.styles.js.map +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.styles.js +8 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.styles.js.map +1 -1
- package/dist/css/form-section.css +2 -0
- package/dist/css/rich-text.css +14 -38
- package/dist/css/title.css +7 -15
- package/dist/css/variables.css +41 -24
- package/dist/nldd.min.js +1597 -1148
- package/dist/translations/en-US.d.ts.map +1 -1
- package/dist/translations/en-US.js +3 -0
- package/dist/translations/en-US.js.map +1 -1
- package/dist/translations/fy.d.ts.map +1 -1
- package/dist/translations/fy.js +3 -0
- package/dist/translations/fy.js.map +1 -1
- package/dist/translations/nl.generated.d.ts +3 -0
- package/dist/translations/nl.generated.d.ts.map +1 -1
- package/dist/translations/nl.generated.js +2 -0
- package/dist/translations/nl.generated.js.map +1 -1
- package/dist/translations/pap-AW.d.ts.map +1 -1
- package/dist/translations/pap-AW.js +3 -0
- package/dist/translations/pap-AW.js.map +1 -1
- package/dist/translations/pap-CW.d.ts.map +1 -1
- package/dist/translations/pap-CW.js +3 -0
- package/dist/translations/pap-CW.js.map +1 -1
- package/dist/types/react.d.ts +44 -40
- package/dist/types/vue.d.ts +50 -46
- package/dist/utilities/dev-checks.d.ts +5 -0
- package/dist/utilities/dev-checks.d.ts.map +1 -1
- package/dist/utilities/dev-checks.js +14 -0
- package/dist/utilities/dev-checks.js.map +1 -1
- package/dist/utilities/dev-rules.generated.d.ts.map +1 -1
- package/dist/utilities/dev-rules.generated.js +89 -39
- package/dist/utilities/dev-rules.generated.js.map +1 -1
- package/dist/utilities/page-section-mixin.d.ts +2 -2
- package/dist/utilities/page-section-mixin.d.ts.map +1 -1
- package/dist/utilities/page-section-mixin.js +10 -6
- package/dist/utilities/page-section-mixin.js.map +1 -1
- package/dist/utilities/translations.d.ts.map +1 -1
- package/dist/utilities/translations.js +9 -0
- package/dist/utilities/translations.js.map +1 -1
- package/lint/css.js +224 -0
- package/lint/data.generated.json +1 -1
- package/lint/engine.js +5 -2
- package/lint/frontends.js +67 -42
- package/lint/linter.js +188 -7
- package/lint/main.js +20 -7
- package/lint/project.js +2 -2
- package/lint/rule-data.js +20 -0
- package/package.json +1 -1
- package/dist/cdn/chunks/shadow-resets-BeVmf7ky.js +0 -12
- package/dist/cdn/chunks/translations-wxBSz213.js +0 -8
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/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
|
|
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(
|
|
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
|
-
/**
|
|
228
|
-
function
|
|
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
|
-
|
|
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(
|
|
253
|
+
function stylesheetRoot(blocks) {
|
|
235
254
|
const root = createRoot();
|
|
236
|
-
for (const
|
|
255
|
+
for (const block of blocks) appendChild(root, styleNode(block));
|
|
237
256
|
return root;
|
|
238
257
|
}
|
|
239
258
|
|
|
240
259
|
/**
|
|
241
|
-
* The stylesheet with
|
|
242
|
-
*
|
|
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
|
-
|
|
252
|
-
|
|
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
|
|
285
|
-
return
|
|
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
|
-
|
|
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 =
|
|
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
|
-
|
|
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));
|
|
@@ -205,8 +380,9 @@ export function createLinter(data = loadData(), { wrappers = {}, severities: con
|
|
|
205
380
|
/** @returns {Promise<{ findings: object[], counts: object }>} */
|
|
206
381
|
async function lintSource(source, filename) {
|
|
207
382
|
const parsed = applyWrappers(await parseSource(source, filename), wrappers);
|
|
208
|
-
const isPlainHtml = /\.(html?|j2|jinja2
|
|
383
|
+
const isPlainHtml = /\.(html?|j2|jinja2?|tmpl|gohtml)$/.test(filename);
|
|
209
384
|
const roots = readPropertyNames(parsed, data.tags, isPlainHtml);
|
|
385
|
+
readLinkedStylesheets(roots, filename);
|
|
210
386
|
const { findings, counts } = lintRoots(roots, isPlainHtml);
|
|
211
387
|
const { suppressed, missingReason } = readSuppressions(source, canonical);
|
|
212
388
|
const position = createPositions(source);
|
|
@@ -226,7 +402,12 @@ export function createLinter(data = loadData(), { wrappers = {}, severities: con
|
|
|
226
402
|
offset: node.offset,
|
|
227
403
|
endOffset: node.endOffset,
|
|
228
404
|
...position(node.offset),
|
|
229
|
-
}))
|
|
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
|
+
);
|
|
230
411
|
const stuck = stuckTags(source, all, /\.[jt]sx$/.test(filename));
|
|
231
412
|
for (const finding of all) {
|
|
232
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
|
|
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 =
|
|
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
|
-
|
|
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 ${
|
|
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:
|
|
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
|
-
/**
|
|
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.',
|
package/package.json
CHANGED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { i as e } from "./custom-element-DsfOrnOD.js";
|
|
2
|
-
import "./decorate-CJCfz_g6.js";
|
|
3
|
-
// src/assets/styles/shadow-resets.ts
|
|
4
|
-
var t = e`
|
|
5
|
-
all: revert !important;
|
|
6
|
-
`, n = e`
|
|
7
|
-
text-align: start !important;
|
|
8
|
-
letter-spacing: normal !important;
|
|
9
|
-
word-spacing: normal !important;
|
|
10
|
-
text-transform: none !important;
|
|
11
|
-
`;
|
|
12
|
-
export { t as n, n as t };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// src/utilities/translations.ts
|
|
2
|
-
var e, t = Symbol.for("nldd.translations"), n = (e = globalThis)[t] ?? (e[t] = { translations: {} });
|
|
3
|
-
function r(e, t, r, i) {
|
|
4
|
-
let a = r, o = e?.[r] ?? n.translations[a] ?? t[r] ?? a;
|
|
5
|
-
if (i) for (let [e, t] of Object.entries(i)) o = o.split(`{${e}}`).join(String(t));
|
|
6
|
-
return o;
|
|
7
|
-
}
|
|
8
|
-
export { r as t };
|