@nldd/design-system 0.29.2 → 0.30.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/custom-elements.json +486 -214
- package/dist/assets/styles/shadow-resets.d.ts +22 -7
- package/dist/assets/styles/shadow-resets.d.ts.map +1 -1
- package/dist/assets/styles/shadow-resets.js +30 -1
- package/dist/assets/styles/shadow-resets.js.map +1 -1
- package/dist/assets/styles/text-wrap.d.ts +20 -4
- package/dist/assets/styles/text-wrap.d.ts.map +1 -1
- package/dist/assets/styles/text-wrap.js +27 -5
- package/dist/assets/styles/text-wrap.js.map +1 -1
- package/dist/cdn/autoloader.js +139 -140
- package/dist/cdn/chunks/{accordion-BIgPiBgT.js → accordion-DgR70Lf-.js} +4 -4
- package/dist/cdn/chunks/{accordion-item-YHiK4fhb.js → accordion-item-BDevWF9t.js} +6 -5
- package/dist/cdn/chunks/{activity-indicator-BiuU--e6.js → activity-indicator-B-iqA8XF.js} +6 -9
- package/dist/cdn/chunks/{admonition-CpxxWW6f.js → admonition-PKX7ePb3.js} +6 -5
- package/dist/cdn/chunks/{avatar-DeeEjbzl.js → avatar-Bm_cbn5X.js} +6 -6
- package/dist/cdn/chunks/{avatar-group-Ey17PhOt.js → avatar-group-5XxwtbbC.js} +15 -15
- package/dist/cdn/chunks/{badge-B0K1AVec.js → badge-CpxDQfHS.js} +31 -29
- package/dist/cdn/chunks/{banner-YQpzU7Yz.js → banner-Ccc9LgDk.js} +8 -8
- package/dist/cdn/chunks/{bar-split-view-DNWrGLv3.js → bar-split-view-0yxggCZe.js} +5 -5
- package/dist/cdn/chunks/{blockquote-zBgtNbdZ.js → blockquote-CmbDjlPB.js} +32 -31
- package/dist/cdn/chunks/{box-CLEd1Y-1.js → box-DQjgR2YI.js} +3 -3
- package/dist/cdn/chunks/{breadcrumbs-DCwiSLxQ.js → breadcrumbs-C8yzb9pA.js} +6 -6
- package/dist/cdn/chunks/{button-DpSJe6ns.js → button-D_KfPyHS.js} +113 -90
- package/dist/cdn/chunks/{button-bar-Bw46AWOo.js → button-bar-f-qcw_zA.js} +3 -3
- package/dist/cdn/chunks/{button-group-Bd5CZm4t.js → button-group-Dq3q44jB.js} +2 -2
- package/dist/cdn/chunks/{card-xq9jqLek.js → card-CDT7nkKG.js} +4 -4
- package/dist/cdn/chunks/{cell-CNGu9Srs.js → cell-B7ksoCyd.js} +6 -6
- package/dist/cdn/chunks/{checkbox-DJU2ntYs.js → checkbox-CUReiYVg.js} +5 -5
- package/dist/cdn/chunks/{checkbox-field-36mh4uD-.js → checkbox-field-CkQ8WLSq.js} +8 -8
- package/dist/cdn/chunks/{checkbox-group-CaoyYQC1.js → checkbox-group-BpDzGuFk.js} +3 -3
- package/dist/cdn/chunks/{class-map-07EioFee.js → class-map-BQWXee9F.js} +1 -1
- package/dist/cdn/chunks/{code-editor-CqHXUdbC.js → code-editor-CwLcukqn.js} +15 -5
- package/dist/cdn/chunks/{code-viewer-ro55V04o.js → code-viewer-CvSF5fyg.js} +37 -10
- package/dist/cdn/chunks/{codemirror-input-D4u8naKh.js → codemirror-input-CcaHTu9u.js} +5 -5
- package/dist/cdn/chunks/{collection-DVED8Kff.js → collection-DqqkdrVS.js} +8 -8
- package/dist/cdn/chunks/{combo-box-CMdGMQ8q.js → combo-box-BQ9jS1fP.js} +19 -10
- package/dist/cdn/chunks/{container-BxfHTSXb.js → container-BC5PiMvR.js} +83 -82
- package/dist/cdn/chunks/{custom-element-7tLnKgZE.js → custom-element-DGdiDiuN.js} +1 -1
- package/dist/cdn/chunks/{date-field-KrAEvvJg.js → date-field-Dmli_GlI.js} +12 -12
- package/dist/cdn/chunks/{date-picker-CeyTd4Mj.js → date-picker-BCHBh6vd.js} +15 -17
- package/dist/cdn/chunks/{decorate-CIC8fGPN.js → decorate-D2snH_th.js} +1 -1
- package/dist/cdn/chunks/described-by-mixin-Doan1yj6.js +106 -0
- package/dist/cdn/chunks/{description-cell-DDjPf92m.js → description-cell-QL0CUcxH.js} +7 -7
- package/dist/cdn/chunks/{dev-checks-DE09CTk9.js → dev-checks-BQsZ10CZ.js} +41 -11
- package/dist/cdn/chunks/{directive-helpers-DUlH8eNt.js → directive-helpers-BtIbEaBv.js} +1 -1
- package/dist/cdn/chunks/{dist-DJ_2VKiG.js → dist-0sEOO4c9.js} +3 -3
- package/dist/cdn/chunks/{dist-CanlbdZP.js → dist-BX-aE56q.js} +1 -1
- package/dist/cdn/chunks/{dist-Cku1NQ9X.js → dist-CJ-hLN4o.js} +2 -2
- package/dist/cdn/chunks/{dist-DuaPU_hA.js → dist-CUCs0edm.js} +2 -2
- package/dist/cdn/chunks/{dist-BV06hHwA.js → dist-CeovKDYB.js} +3 -3
- package/dist/cdn/chunks/{dist-Dpc1YfbE.js → dist-CoM5yDHD.js} +1 -1
- package/dist/cdn/chunks/{dist-DtpgX9L8.js → dist-DM49yEzE.js} +2 -2
- package/dist/cdn/chunks/{dist-3XSbEdbz.js → dist-DizTxYTi.js} +1 -1
- package/dist/cdn/chunks/{dist-lUsXGXhR.js → dist-Dj0pXI2B.js} +1 -1
- package/dist/cdn/chunks/{dist-DsE-63gX.js → dist-Dtn2rsM6.js} +1 -1
- package/dist/cdn/chunks/{dist-CLyXDlop.js → dist-QheJD595.js} +1 -1
- package/dist/cdn/chunks/{divider-BixGehzs.js → divider-D8o0JPE2.js} +2 -2
- package/dist/cdn/chunks/{document-tab-bar-BlP7NEb9.js → document-tab-bar-BX6UhFBl.js} +10 -13
- package/dist/cdn/chunks/{dropdown-DpCdMFod.js → dropdown-afozwXVW.js} +5 -5
- package/dist/cdn/chunks/{file-field-CYjsw4xy.js → file-field-BKhUYcHf.js} +109 -106
- package/dist/cdn/chunks/{form-DDB03czp.js → form-DnZIiX9b.js} +1 -1
- package/dist/cdn/chunks/{form-actions-DZgcVawx.js → form-actions-Ddg9vIVq.js} +2 -2
- package/dist/cdn/chunks/{form-associated-mixin-9cC5HSCG.js → form-associated-mixin-BMQQpMlL.js} +2 -2
- package/dist/cdn/chunks/form-field-DDBYuAl_.js +405 -0
- package/dist/cdn/chunks/form-field.i18n-D-3yEP-C.js +6 -0
- package/dist/cdn/chunks/form-section-Co0TM35-.js +78 -0
- package/dist/cdn/chunks/{full-bleed-section-enjghRsm.js → full-bleed-section-DD8ibmsa.js} +3 -3
- package/dist/cdn/chunks/{hero-AHBPM3ks.js → hero-BYrY2MZc.js} +7 -7
- package/dist/cdn/chunks/{icon-C_xeQP4j.js → icon-BzeHXcdi.js} +26 -9
- package/dist/cdn/chunks/{icon-button-CkNgX7Ra.js → icon-button-BErQf42w.js} +65 -62
- package/dist/cdn/chunks/{icon-cell-qieQ2vyq.js → icon-cell-DGIMXKxK.js} +5 -5
- package/dist/cdn/chunks/{identity-CnYwgyF7.js → identity-Cq-WnU6u.js} +30 -27
- package/dist/cdn/chunks/{if-defined-BG5WQE1B.js → if-defined-CuY6t6gH.js} +1 -1
- package/dist/cdn/chunks/{image--K2M19ce.js → image-BjjyqV0V.js} +23 -22
- package/dist/cdn/chunks/{inline-dialog-CfiC1tbk.js → inline-dialog-Bk2G7f5r.js} +24 -23
- package/dist/cdn/chunks/{just-in-time-education-Dxca2LqF.js → just-in-time-education-Dxh5DNCy.js} +5 -5
- package/dist/cdn/chunks/{kanban-Dwb93dgS.js → kanban-BvmtB9D9.js} +7 -8
- package/dist/cdn/chunks/{kanban-column-Br4GovWU.js → kanban-column-CJ2g7pgA.js} +9 -11
- package/dist/cdn/chunks/{keyboard-shortcut-a-CkABX1.js → keyboard-shortcut-BV5DFQtT.js} +3 -3
- package/dist/cdn/chunks/{languages-BrBEUYzL.js → languages-DJjHEjGl.js} +1603 -1602
- package/dist/cdn/chunks/{link-CROYAF4K.js → link-BcukwT5Y.js} +6 -6
- package/dist/cdn/chunks/{link-group-pbOW9KCb.js → link-group-Ci1q3uEd.js} +2 -2
- package/dist/cdn/chunks/{list-D_BWUBh4.js → list-CFFHWUSC.js} +9 -9
- package/dist/cdn/chunks/{list-item-DeFrncLo.js → list-item-Bg1NyOXd.js} +12 -13
- package/dist/cdn/chunks/{list-item-segment-C1X5v2_Z.js → list-item-segment-DJ8pk08-.js} +4 -4
- package/dist/cdn/chunks/{menu-CkMJUE0H.js → menu-BEjqhn1-.js} +10 -10
- package/dist/cdn/chunks/{menu-bar-B3F-QjLV.js → menu-bar-DkjXy-TE.js} +6 -6
- package/dist/cdn/chunks/{menu-bar-item-CyixR7Fi.js → menu-bar-item-3cJS29Ey.js} +6 -6
- package/dist/cdn/chunks/{menu-divider-uBPiSPsv.js → menu-divider-CYmEimsb.js} +3 -3
- package/dist/cdn/chunks/{menu-group-BXS5r-lc.js → menu-group-ggwAcgis.js} +4 -4
- package/dist/cdn/chunks/{menu-item-CORxUt3u.js → menu-item-BzH9H87h.js} +4 -4
- package/dist/cdn/chunks/{menu.template-NyA_JtUm.js → menu.template-PG82-P20.js} +6 -6
- package/dist/cdn/chunks/{modal-dialog-Dt5uenA0.js → modal-dialog-Bu7ETELf.js} +4 -4
- package/dist/cdn/chunks/{multi-line-text-field-CkCvyJov.js → multi-line-text-field-CQTKNBN7.js} +6 -6
- package/dist/cdn/chunks/{navigation-split-view-Clp3Camr.js → navigation-split-view-elMoUjHh.js} +13 -15
- package/dist/cdn/chunks/{nl.generated-B194RR-y.js → nl.generated-Lu29XEF3.js} +1 -1
- package/dist/cdn/chunks/{notification-B36JO2cS.js → notification-DCjXGfbY.js} +7 -7
- package/dist/cdn/chunks/{number-field-Cjrwd3G0.js → number-field-BUQUcG--.js} +8 -8
- package/dist/cdn/chunks/{one-half-one-half-section-Bc4rFjtM.js → one-half-one-half-section-DiGkeUVr.js} +3 -3
- package/dist/cdn/chunks/{one-third-two-thirds-section-DikIdU3X.js → one-third-two-thirds-section-q_AP4qIJ.js} +3 -3
- package/dist/cdn/chunks/{one-time-code-field-CqNmLld4.js → one-time-code-field-BybS_l6h.js} +9 -10
- package/dist/cdn/chunks/{overflow-menu-6tdlRjhY.js → overflow-menu-Duey_XJs.js} +1 -1
- package/dist/cdn/chunks/{page-CpdGz0K6.js → page-BrIeWp1b.js} +112 -46
- package/dist/cdn/chunks/{page-footer-_W5dGcQt.js → page-footer-DPQg9Qbw.js} +5 -5
- package/dist/cdn/chunks/{page-section-mixin-DSdHIkwR.js → page-section-mixin-B8FbeXaK.js} +3 -3
- package/dist/cdn/chunks/{pagination-DJqmp7nt.js → pagination-CfLJwflH.js} +37 -36
- package/dist/cdn/chunks/{password-field-JKBHK_MQ.js → password-field-CmoopbNF.js} +36 -35
- package/dist/cdn/chunks/{popover-LljgfgHS.js → popover-CPAR4N_a.js} +5 -5
- package/dist/cdn/chunks/{progress-bar-fILD82bn.js → progress-bar-vKGXvxfe.js} +10 -11
- package/dist/cdn/chunks/{progress-circle-72YbT9v1.js → progress-circle-dweisHzt.js} +8 -8
- package/dist/cdn/chunks/{radio-button-B45WY4fZ.js → radio-button-DE1K49_2.js} +4 -4
- package/dist/cdn/chunks/{radio-button-field-CG2ljZ-j.js → radio-button-field-DCrWiVoA.js} +7 -7
- package/dist/cdn/chunks/{radio-button-group-DgQHIiXR.js → radio-button-group-oLP_1cGy.js} +3 -3
- package/dist/cdn/chunks/{render-marked-vXU387IN.js → render-marked-BE3kBc1D.js} +1 -1
- package/dist/cdn/chunks/{reorder-handle-cell-Bc0LM08A.js → reorder-handle-cell-COCN6knt.js} +4 -4
- package/dist/cdn/chunks/{reorder-handle-mixin-DIkeFpRU.js → reorder-handle-mixin-CG-KhmuT.js} +2 -2
- package/dist/cdn/chunks/{repeat-Cy1a-r4p.js → repeat-D69H_dsv.js} +2 -2
- package/dist/cdn/chunks/{rich-text-BZ6J0VNi.js → rich-text-jEyIU58i.js} +3 -3
- package/dist/cdn/chunks/{row-header-mixin-CnCxMteQ.js → row-header-mixin-BejxhOCs.js} +2 -2
- package/dist/cdn/chunks/{scroll-fade-BoXGZJeO.js → scroll-fade-Cae9xqXr.js} +2 -2
- package/dist/cdn/chunks/{search-field-BaPPorsw.js → search-field-B8woxFh-.js} +40 -37
- package/dist/cdn/chunks/{segmented-control-CY7eFebV.js → segmented-control-DbOi6Wk6.js} +7 -7
- package/dist/cdn/chunks/{shadow-resets-kAFcguCG.js → shadow-resets-CNmJbdJw.js} +26 -11
- package/dist/cdn/chunks/{sheet-EvUuqzd5.js → sheet-bK663_K4.js} +4 -4
- package/dist/cdn/chunks/{shell-ZiZriusi.js → shell-DLu1fHOH.js} +3 -3
- package/dist/cdn/chunks/{side-by-side-split-view-qj871uv2.js → side-by-side-split-view-vNhUmTiE.js} +4 -4
- package/dist/cdn/chunks/{sidebar-section-C2KLgpwu.js → sidebar-section-CoE5F_h5.js} +8 -8
- package/dist/cdn/chunks/{simple-section-CVQRynxS.js → simple-section-1v7a_ZgI.js} +3 -3
- package/dist/cdn/chunks/{skip-link-CpxEwJKH.js → skip-link-C6B6mMkA.js} +5 -5
- package/dist/cdn/chunks/{slider-DHY89yV6.js → slider-BT-q6SP2.js} +12 -16
- package/dist/cdn/chunks/{spacer-BDRDeRQr.js → spacer-DlFn3NtV.js} +2 -2
- package/dist/cdn/chunks/{spacer-cell-DvUxqmbS.js → spacer-cell-Dy_twSDQ.js} +4 -4
- package/dist/cdn/chunks/{split-button-DGzX2W4w.js → split-button-URHM5eTx.js} +7 -7
- package/dist/cdn/chunks/{split-view-divider-BQdN8I8c.js → split-view-divider-DeLyeDBx.js} +2 -2
- package/dist/cdn/chunks/{stacked-split-view-CdXyXpzb.js → stacked-split-view-D0kiQJmL.js} +4 -4
- package/dist/cdn/chunks/{static-html-ooiG7-by.js → static-html-CAKb1-Ht.js} +1 -1
- package/dist/cdn/chunks/{status-bar-S5IvBhAD.js → status-bar-Bov-LrPy.js} +4 -4
- package/dist/cdn/chunks/{step-bar-pkYf_gF8.js → step-bar-BLtsl_S_.js} +6 -6
- package/dist/cdn/chunks/{step-cell-3yG-UCmv.js → step-cell-cxM7vhtH.js} +5 -5
- package/dist/cdn/chunks/{stepper-DIufBp3c.js → stepper-DeIcLT7G.js} +7 -7
- package/dist/cdn/chunks/{style-map-DP8rklU9.js → style-map-CQX4CmTz.js} +1 -1
- package/dist/cdn/chunks/{swatch-picker-uyMsXHeI.js → swatch-picker-A7AU6Agu.js} +6 -6
- package/dist/cdn/chunks/{switch-DQ3UDIy5.js → switch-D0UPsKws.js} +5 -5
- package/dist/cdn/chunks/{switch-field-BXH62I0E.js → switch-field-D63lc5C0.js} +7 -7
- package/dist/cdn/chunks/{tab-bar-B2m7RGKe.js → tab-bar-CzGSRfKd.js} +8 -8
- package/dist/cdn/chunks/{table-Dtg4t_dM.js → table-DfunY2Dn.js} +5 -5
- package/dist/cdn/chunks/{tag-BdB8MDQQ.js → tag-DSWjjDBo.js} +5 -5
- package/dist/cdn/chunks/{term-DD2K8Qqb.js → term-Bk9cdlCz.js} +12 -12
- package/dist/cdn/chunks/{text-C8iP63bA.js → text-CDBiVulh.js} +4 -4
- package/dist/cdn/chunks/{text-cell-1pWwBLLI.js → text-cell-DUOJAXZo.js} +40 -37
- package/dist/cdn/chunks/{text-editor-DjNky4l-.js → text-editor-BIbYF0AB.js} +22 -12
- package/dist/cdn/chunks/{text-field-ClVrHYGz.js → text-field-CAnQNcXB.js} +6 -6
- package/dist/cdn/chunks/{text-wrap-DJ9PcwZ4.js → text-wrap-COu7AY91.js} +13 -5
- package/dist/cdn/chunks/{time-field-CrwLpzZp.js → time-field-xriXgFMl.js} +14 -14
- package/dist/cdn/chunks/{time-picker-BYhEzGJL.js → time-picker-D3_KbYUW.js} +6 -6
- package/dist/cdn/chunks/{title-DdqeERnM.js → title-HPn4c-s5.js} +5 -5
- package/dist/cdn/chunks/title-bar-label-controller-DHJwXI9W.js +27 -0
- package/dist/cdn/chunks/{title-cell-C4U3rN33.js → title-cell-BXMZkbXf.js} +51 -48
- package/dist/cdn/chunks/{toggle-button-CknaEM8j.js → toggle-button-DY22KEwY.js} +72 -56
- package/dist/cdn/chunks/{toggle-button-group-CxyhERqD.js → toggle-button-group-DsjZofEG.js} +2 -2
- package/dist/cdn/chunks/{token-I0vH42iy.js → token-DwT2i71b.js} +5 -5
- package/dist/cdn/chunks/{token-field-B1sAqN0B.js → token-field-CQxSARGi.js} +11 -11
- package/dist/cdn/chunks/{toolbar-DRIyU8-Z.js → toolbar-CaDvhCqm.js} +69 -68
- package/dist/cdn/chunks/{toolbar-item-D1JDaFal.js → toolbar-item-BDl4ys-w.js} +3 -3
- package/dist/cdn/chunks/{toolbar-title-D7CCOmDz.js → toolbar-title-yGR8Hzhp.js} +4 -4
- package/dist/cdn/chunks/{toolbar.styles-CXjPigMk.js → toolbar.styles-DlyfZkRq.js} +3 -3
- package/dist/cdn/chunks/{tooltip-5clp5S3T.js → tooltip-BDiYghAz.js} +5 -5
- package/dist/cdn/chunks/{top-navigation-bar-CEuIAOoy.js → top-navigation-bar-ibsjezN_.js} +18 -18
- package/dist/cdn/chunks/{top-title-bar-M3NiRgr_.js → top-title-bar-BKdwEZfj.js} +15 -12
- package/dist/cdn/chunks/{two-thirds-one-third-section-BJGAw7Mq.js → two-thirds-one-third-section-DmumCsGo.js} +3 -3
- package/dist/cdn/chunks/{validation-list-CTb7X_Gq.js → validation-list-CXcJfvOJ.js} +61 -49
- package/dist/cdn/chunks/{visibility-mixin-BgnkZDZM.js → visibility-mixin-C7s59UlL.js} +2 -2
- package/dist/cdn/chunks/{visually-hidden-B4_jKNA7.js → visually-hidden-CMzKHcSc.js} +2 -2
- package/dist/cdn/chunks/{window-BmxrtW9P.js → window-CSNx5wt1.js} +5 -5
- package/dist/cdn/chunks/{with-translations-DSfo7eL-.js → with-translations-0oyNXfdD.js} +3 -3
- package/dist/components/actions/button/button.styles.d.ts.map +1 -1
- package/dist/components/actions/button/button.styles.js +26 -7
- package/dist/components/actions/button/button.styles.js.map +1 -1
- package/dist/components/actions/button/button.template.d.ts.map +1 -1
- package/dist/components/actions/button/button.template.js +7 -5
- package/dist/components/actions/button/button.template.js.map +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 +4 -2
- package/dist/components/actions/icon-button/icon-button.styles.js.map +1 -1
- package/dist/components/actions/icon-button/icon-button.template.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.template.js +4 -2
- package/dist/components/actions/icon-button/icon-button.template.js.map +1 -1
- package/dist/components/actions/toolbar/toolbar.template.d.ts.map +1 -1
- package/dist/components/actions/toolbar/toolbar.template.js +2 -1
- package/dist/components/actions/toolbar/toolbar.template.js.map +1 -1
- package/dist/components/content/accordion/accordion-item.styles.d.ts.map +1 -1
- package/dist/components/content/accordion/accordion-item.styles.js +1 -0
- package/dist/components/content/accordion/accordion-item.styles.js.map +1 -1
- package/dist/components/content/admonition/admonition.d.ts +1 -1
- package/dist/components/content/admonition/admonition.js +1 -1
- package/dist/components/content/admonition/admonition.styles.d.ts.map +1 -1
- package/dist/components/content/admonition/admonition.styles.js +1 -0
- package/dist/components/content/admonition/admonition.styles.js.map +1 -1
- package/dist/components/content/blockquote/blockquote.template.d.ts.map +1 -1
- package/dist/components/content/blockquote/blockquote.template.js +2 -1
- package/dist/components/content/blockquote/blockquote.template.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 +30 -3
- package/dist/components/content/code-viewer/code-viewer.styles.js.map +1 -1
- package/dist/components/content/icon/icon-aliases.d.ts.map +1 -1
- package/dist/components/content/icon/icon-aliases.js +10 -2
- package/dist/components/content/icon/icon-aliases.js.map +1 -1
- package/dist/components/content/icon/icon-categories.d.ts.map +1 -1
- package/dist/components/content/icon/icon-categories.js +13 -0
- package/dist/components/content/icon/icon-categories.js.map +1 -1
- package/dist/components/content/icon/icon-gallery-status.d.ts.map +1 -1
- package/dist/components/content/icon/icon-gallery-status.js +25 -52
- package/dist/components/content/icon/icon-gallery-status.js.map +1 -1
- package/dist/components/content/icon/icon-registry.d.ts.map +1 -1
- package/dist/components/content/icon/icon-registry.js +19 -6
- package/dist/components/content/icon/icon-registry.js.map +1 -1
- package/dist/components/content/identity/identity.d.ts +8 -5
- package/dist/components/content/identity/identity.d.ts.map +1 -1
- package/dist/components/content/identity/identity.js +8 -5
- package/dist/components/content/identity/identity.js.map +1 -1
- package/dist/components/content/identity/identity.styles.d.ts.map +1 -1
- package/dist/components/content/identity/identity.styles.js +4 -1
- package/dist/components/content/identity/identity.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 +9 -8
- package/dist/components/content/image/image.template.js.map +1 -1
- package/dist/components/content/rich-text/rich-text.d.ts +4 -2
- package/dist/components/content/rich-text/rich-text.d.ts.map +1 -1
- package/dist/components/content/rich-text/rich-text.js +4 -2
- package/dist/components/content/rich-text/rich-text.js.map +1 -1
- package/dist/components/content/text/text.d.ts +2 -0
- package/dist/components/content/text/text.d.ts.map +1 -1
- package/dist/components/content/text/text.js +2 -0
- package/dist/components/content/text/text.js.map +1 -1
- package/dist/components/forms/form-field/form-field.d.ts +138 -73
- package/dist/components/forms/form-field/form-field.d.ts.map +1 -1
- package/dist/components/forms/form-field/form-field.i18n.d.ts +1 -0
- package/dist/components/forms/form-field/form-field.i18n.d.ts.map +1 -1
- package/dist/components/forms/form-field/form-field.i18n.js +2 -0
- package/dist/components/forms/form-field/form-field.i18n.js.map +1 -1
- package/dist/components/forms/form-field/form-field.js +317 -149
- package/dist/components/forms/form-field/form-field.js.map +1 -1
- package/dist/components/forms/form-field/form-field.styles.d.ts +0 -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 +18 -97
- package/dist/components/forms/form-field/form-field.styles.js.map +1 -1
- package/dist/components/forms/form-field/form-field.template.d.ts +0 -2
- package/dist/components/forms/form-field/form-field.template.d.ts.map +1 -1
- package/dist/components/forms/form-field/form-field.template.js +22 -15
- package/dist/components/forms/form-field/form-field.template.js.map +1 -1
- package/dist/components/forms/form-section/form-section.d.ts +40 -16
- package/dist/components/forms/form-section/form-section.d.ts.map +1 -1
- package/dist/components/forms/form-section/form-section.js +47 -183
- package/dist/components/forms/form-section/form-section.js.map +1 -1
- package/dist/components/forms/form-section/form-section.styles.d.ts +2 -0
- package/dist/components/forms/form-section/form-section.styles.d.ts.map +1 -0
- package/dist/components/forms/form-section/form-section.styles.js +44 -0
- package/dist/components/forms/form-section/form-section.styles.js.map +1 -0
- package/dist/components/forms/form-section/form-section.template.d.ts +4 -0
- package/dist/components/forms/form-section/form-section.template.d.ts.map +1 -0
- package/dist/components/forms/form-section/form-section.template.js +19 -0
- package/dist/components/forms/form-section/form-section.template.js.map +1 -0
- package/dist/components/forms/validation-list/validation-list.d.ts +36 -6
- package/dist/components/forms/validation-list/validation-list.d.ts.map +1 -1
- package/dist/components/forms/validation-list/validation-list.js +75 -15
- package/dist/components/forms/validation-list/validation-list.js.map +1 -1
- package/dist/components/forms/validation-list/validation-list.template.d.ts +1 -1
- package/dist/components/forms/validation-list/validation-list.template.d.ts.map +1 -1
- package/dist/components/forms/validation-list/validation-list.template.js +2 -2
- package/dist/components/forms/validation-list/validation-list.template.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 +10 -0
- 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 +10 -1
- package/dist/components/inputs/combo-box/combo-box.styles.js.map +1 -1
- package/dist/components/inputs/date-picker/date-picker.template.d.ts.map +1 -1
- package/dist/components/inputs/date-picker/date-picker.template.js +4 -6
- package/dist/components/inputs/date-picker/date-picker.template.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 +3 -2
- package/dist/components/inputs/file-field/file-field.styles.js.map +1 -1
- package/dist/components/inputs/file-field/file-field.template.d.ts.map +1 -1
- package/dist/components/inputs/file-field/file-field.template.js +9 -8
- package/dist/components/inputs/file-field/file-field.template.js.map +1 -1
- package/dist/components/inputs/file-field/file-field.truncate.d.ts +4 -3
- package/dist/components/inputs/file-field/file-field.truncate.d.ts.map +1 -1
- package/dist/components/inputs/file-field/file-field.truncate.js +8 -5
- package/dist/components/inputs/file-field/file-field.truncate.js.map +1 -1
- package/dist/components/inputs/one-time-code-field/one-time-code-field.template.js +1 -1
- package/dist/components/inputs/one-time-code-field/one-time-code-field.template.js.map +1 -1
- package/dist/components/inputs/password-field/password-field.template.d.ts.map +1 -1
- package/dist/components/inputs/password-field/password-field.template.js +2 -1
- package/dist/components/inputs/password-field/password-field.template.js.map +1 -1
- package/dist/components/inputs/search-field/search-field.d.ts +3 -0
- package/dist/components/inputs/search-field/search-field.d.ts.map +1 -1
- package/dist/components/inputs/search-field/search-field.js +7 -6
- package/dist/components/inputs/search-field/search-field.js.map +1 -1
- package/dist/components/inputs/slider/slider.template.js +2 -2
- package/dist/components/inputs/slider/slider.template.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.mentions.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.mentions.js +2 -1
- package/dist/components/inputs/text-editor/text-editor.mentions.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 +10 -0
- package/dist/components/inputs/text-editor/text-editor.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 +18 -3
- package/dist/components/inputs/toggle-button/toggle-button.styles.js.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.template.d.ts.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.template.js +7 -3
- package/dist/components/inputs/toggle-button/toggle-button.template.js.map +1 -1
- package/dist/components/layout/container/container.template.d.ts.map +1 -1
- package/dist/components/layout/container/container.template.js +2 -1
- package/dist/components/layout/container/container.template.js.map +1 -1
- package/dist/components/layout/kanban/kanban-column.template.d.ts.map +1 -1
- package/dist/components/layout/kanban/kanban-column.template.js +5 -7
- package/dist/components/layout/kanban/kanban-column.template.js.map +1 -1
- package/dist/components/layout/kanban/kanban.template.d.ts.map +1 -1
- package/dist/components/layout/kanban/kanban.template.js +2 -3
- package/dist/components/layout/kanban/kanban.template.js.map +1 -1
- package/dist/components/layout/page/page.d.ts +42 -0
- package/dist/components/layout/page/page.d.ts.map +1 -1
- package/dist/components/layout/page/page.js +108 -3
- package/dist/components/layout/page/page.js.map +1 -1
- package/dist/components/layout/page/page.styles.d.ts.map +1 -1
- package/dist/components/layout/page/page.styles.js +5 -0
- package/dist/components/layout/page/page.styles.js.map +1 -1
- package/dist/components/layout/page/page.template.d.ts.map +1 -1
- package/dist/components/layout/page/page.template.js +3 -2
- package/dist/components/layout/page/page.template.js.map +1 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts +11 -0
- 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 +11 -0
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js.map +1 -1
- package/dist/components/layout/sheet/sheet.d.ts +3 -0
- package/dist/components/layout/sheet/sheet.d.ts.map +1 -1
- package/dist/components/layout/sheet/sheet.js +3 -0
- package/dist/components/layout/sheet/sheet.js.map +1 -1
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.js +2 -2
- 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.template.js +2 -2
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.template.js.map +1 -1
- package/dist/components/lists-and-tables/cells/description-cell/description-cell.d.ts +3 -2
- package/dist/components/lists-and-tables/cells/description-cell/description-cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/description-cell/description-cell.js +3 -2
- package/dist/components/lists-and-tables/cells/description-cell/description-cell.js.map +1 -1
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.d.ts +1 -0
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.js +1 -0
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.js.map +1 -1
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.d.ts +13 -13
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.js +13 -13
- 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 +4 -1
- 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.d.ts +8 -4
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.js +8 -4
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.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 +4 -1
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.styles.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.template.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.template.js +7 -8
- package/dist/components/lists-and-tables/list-item/list-item.template.js.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.template.js +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.template.js.map +1 -1
- package/dist/components/navigation/pagination/pagination.template.d.ts.map +1 -1
- package/dist/components/navigation/pagination/pagination.template.js +3 -2
- package/dist/components/navigation/pagination/pagination.template.js.map +1 -1
- package/dist/components/navigation/top-title-bar/top-title-bar.d.ts +7 -1
- package/dist/components/navigation/top-title-bar/top-title-bar.d.ts.map +1 -1
- package/dist/components/navigation/top-title-bar/top-title-bar.js +12 -1
- package/dist/components/navigation/top-title-bar/top-title-bar.js.map +1 -1
- package/dist/components/navigation/top-title-bar/top-title-bar.template.js +4 -4
- package/dist/components/navigation/top-title-bar/top-title-bar.template.js.map +1 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.template.d.ts.map +1 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.template.js +2 -3
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.template.js.map +1 -1
- package/dist/components/status-and-feedback/badge/badge.template.d.ts.map +1 -1
- package/dist/components/status-and-feedback/badge/badge.template.js +3 -7
- package/dist/components/status-and-feedback/badge/badge.template.js.map +1 -1
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.template.d.ts.map +1 -1
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.template.js +3 -4
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.template.js.map +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.template.d.ts.map +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.template.js +2 -3
- package/dist/components/status-and-feedback/progress-bar/progress-bar.template.js.map +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.d.ts +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.js +1 -1
- package/dist/css/form.css +14 -0
- package/dist/css/global-open-font.css +0 -1
- package/dist/css/global.css +0 -1
- package/dist/css/rich-text.css +16 -4
- package/dist/css/text.css +3 -1
- package/dist/css/title.css +3 -1
- package/dist/css/variables.css +5 -0
- package/dist/nldd.min.js +1900 -1766
- package/dist/translations/en-US.d.ts.map +1 -1
- package/dist/translations/en-US.js +1 -0
- package/dist/translations/en-US.js.map +1 -1
- package/dist/translations/fy.d.ts.map +1 -1
- package/dist/translations/fy.js +1 -0
- package/dist/translations/fy.js.map +1 -1
- package/dist/translations/nl.generated.d.ts +1 -0
- package/dist/translations/nl.generated.d.ts.map +1 -1
- package/dist/translations/pap-AW.d.ts.map +1 -1
- package/dist/translations/pap-AW.js +1 -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 +1 -0
- package/dist/translations/pap-CW.js.map +1 -1
- package/dist/types/react.d.ts +24 -27
- package/dist/types/vue.d.ts +84 -87
- package/dist/utilities/autoloader.generated.d.ts.map +1 -1
- package/dist/utilities/autoloader.generated.js +0 -1
- package/dist/utilities/autoloader.generated.js.map +1 -1
- package/dist/utilities/codemirror/codemirror-element.d.ts +3 -2
- package/dist/utilities/codemirror/codemirror-element.d.ts.map +1 -1
- package/dist/utilities/codemirror/codemirror-element.js +6 -2
- package/dist/utilities/codemirror/codemirror-element.js.map +1 -1
- package/dist/utilities/described-by-mixin.d.ts +36 -1
- package/dist/utilities/described-by-mixin.d.ts.map +1 -1
- package/dist/utilities/described-by-mixin.js +132 -8
- package/dist/utilities/described-by-mixin.js.map +1 -1
- package/dist/utilities/dev-rules.generated.d.ts.map +1 -1
- package/dist/utilities/dev-rules.generated.js +42 -13
- package/dist/utilities/dev-rules.generated.js.map +1 -1
- package/dist/utilities/file-name-breaks.d.ts +13 -0
- package/dist/utilities/file-name-breaks.d.ts.map +1 -0
- package/dist/utilities/file-name-breaks.js +27 -0
- package/dist/utilities/file-name-breaks.js.map +1 -0
- package/dist/utilities/same-items.d.ts +10 -0
- package/dist/utilities/same-items.d.ts.map +1 -0
- package/dist/utilities/same-items.js +14 -0
- package/dist/utilities/same-items.js.map +1 -0
- package/dist/utilities/title-bar-label-controller.d.ts +3 -0
- package/dist/utilities/title-bar-label-controller.d.ts.map +1 -1
- package/dist/utilities/title-bar-label-controller.js +19 -3
- package/dist/utilities/title-bar-label-controller.js.map +1 -1
- package/lint/data.generated.json +1 -1
- package/lint/fix.js +49 -6
- package/lint/rule-compiler.js +7 -3
- package/lint/rule.schema.json +12 -0
- package/package.json +3 -3
- package/dist/cdn/chunks/described-by-mixin-DSeADwWP.js +0 -62
- package/dist/cdn/chunks/form-field-CuTa78j4.js +0 -434
- package/dist/cdn/chunks/form-field.i18n-B-UZduXL.js +0 -3
- package/dist/cdn/chunks/form-section-J2if8kVt.js +0 -64
- package/dist/cdn/chunks/title-bar-label-controller-DSxdKZOg.js +0 -24
- package/dist/css/form-section.css +0 -104
package/lint/fix.js
CHANGED
|
@@ -131,11 +131,15 @@ function flagEdits(source, startTag, from, to) {
|
|
|
131
131
|
/**
|
|
132
132
|
* The parser says where an element ends: a comment or a string that looks like its
|
|
133
133
|
* closing tag does not count. Without a closing tag of its own it stays as it is.
|
|
134
|
+
* `attributes` go into the start tag with the new name; one the element already
|
|
135
|
+
* has, under any value, makes no edit.
|
|
134
136
|
*/
|
|
135
|
-
function tagEdits(source, { offset, endOffset, tag: name, startTag }, to) {
|
|
137
|
+
function tagEdits(source, { offset, endOffset, tag: name, startTag }, to, attributes = {}) {
|
|
136
138
|
// An element the file never closes ends past the last character.
|
|
137
139
|
if (!startTag || endOffset === undefined || endOffset >= source.length || !source.startsWith(`<${name}`, offset)) return [];
|
|
138
|
-
|
|
140
|
+
if (Object.keys(attributes).some((attribute) => findAttribute(startTag, attribute))) return [];
|
|
141
|
+
const added = Object.entries(attributes).map(([attribute, value]) => ` ${attribute}="${value}"`).join('');
|
|
142
|
+
const open = { from: offset + 1, to: offset + 1 + name.length, text: to + added };
|
|
139
143
|
if (startTag.selfClosing && startTag.end === endOffset) return [open];
|
|
140
144
|
const closing = source.lastIndexOf('</', endOffset);
|
|
141
145
|
if (closing <= offset || !new RegExp(`^</${name}\\s*>$`).test(source.slice(closing, endOffset + 1))) return [];
|
|
@@ -223,6 +227,39 @@ function unwrapEdits(source, finding, { drop = [], move = {} }) {
|
|
|
223
227
|
return [{ from: finding.offset, to: finding.endOffset + 1, text }];
|
|
224
228
|
}
|
|
225
229
|
|
|
230
|
+
/**
|
|
231
|
+
* Attributes that moved to a child of their own, such as the title of a form
|
|
232
|
+
* section that became an nldd-title in its header slot. The child goes first,
|
|
233
|
+
* with the attributes as they were written, binding and all; on a line of its
|
|
234
|
+
* own when the content of the element starts on one. An attribute a template
|
|
235
|
+
* language writes into makes no edit.
|
|
236
|
+
*/
|
|
237
|
+
function childEdits(source, finding, { tag, slot, attributes }) {
|
|
238
|
+
const { startTag, offset, endOffset, tag: name } = finding;
|
|
239
|
+
if (!startTag || startTag.selfClosing || endOffset === undefined || !source.startsWith(`<${name}`, offset)) return [];
|
|
240
|
+
const moved = attributes.map((attribute) => findAttribute(startTag, attribute)).filter(Boolean);
|
|
241
|
+
if (moved.length === 0 || moved.some((attribute) => attribute.templated)) return [];
|
|
242
|
+
// Nothing left in the start tag: it closes up, also when it spread over lines.
|
|
243
|
+
const nameEnd = offset + 1 + name.length;
|
|
244
|
+
const removals = moved.length === startTag.attributes.length && !/\/[*/]/.test(source.slice(nameEnd, startTag.end))
|
|
245
|
+
? [{ from: nameEnd, to: startTag.end, text: '' }]
|
|
246
|
+
: attributes.flatMap((attribute) => removeEdits(source, finding, attribute));
|
|
247
|
+
const collapsed = removals.length === 1 && moved.length === startTag.attributes.length && removals[0].from === nameEnd;
|
|
248
|
+
// An attribute that cannot go would end up both on the element and on the child.
|
|
249
|
+
if (!collapsed && removals.length !== moved.length) return [];
|
|
250
|
+
const written = moved.map((attribute) => source.slice(attribute.start, attribute.end)).join(' ');
|
|
251
|
+
const child = `<${tag}${slot ? ` slot="${slot}"` : ''} ${written}></${tag}>`;
|
|
252
|
+
const at = startTag.end + 1;
|
|
253
|
+
const lineStart = source.lastIndexOf('\n', offset - 1) + 1;
|
|
254
|
+
const indent = source.slice(lineStart, offset);
|
|
255
|
+
const next = /^(\r?\n)([ \t]*)(<\/)?/.exec(source.slice(at));
|
|
256
|
+
if (/\S/.test(indent) || !next) return [...removals, { from: at, to: at, text: child }];
|
|
257
|
+
// Before the closing tag of an empty element the next line is one level up.
|
|
258
|
+
const unit = indent.includes(' ') && !indent.includes('\t') ? ' ' : '\t';
|
|
259
|
+
const childIndent = next[3] ? indent + unit : next[2];
|
|
260
|
+
return [...removals, { from: at, to: at, text: `${next[1]}${childIndent}${child}` }];
|
|
261
|
+
}
|
|
262
|
+
|
|
226
263
|
/** An edit is `{ from, to, text }` in the source. What is not certain makes none. */
|
|
227
264
|
function editsOf(source, finding) {
|
|
228
265
|
const { fix, offset, tag, mention, startTag } = finding;
|
|
@@ -231,10 +268,13 @@ function editsOf(source, finding) {
|
|
|
231
268
|
...Object.entries(fix.value ?? {}).flatMap(([name, values]) => valueEdits(source, startTag, name, values)),
|
|
232
269
|
...(fix.remove ?? []).flatMap((name) => removeEdits(source, finding, name)),
|
|
233
270
|
...Object.entries(fix.flag ?? {}).flatMap(([from, to]) => flagEdits(source, startTag, from, to)),
|
|
234
|
-
|
|
235
|
-
|
|
271
|
+
// A mention, such as `<nldd-x>` in a sentence, takes the new name only: with
|
|
272
|
+
// attributes it would no longer be a tag that stands for the element.
|
|
273
|
+
...(fix.tag && mention && !fix.attributes ? [{ from: offset + 1, to: offset + 1 + tag.length, text: fix.tag }] : []),
|
|
274
|
+
...(fix.tag && !mention ? tagEdits(source, finding, fix.tag, fix.attributes) : []),
|
|
236
275
|
...(fix.wrap ? wrapEdits(source, finding, fix.wrap) : []),
|
|
237
276
|
...(fix.unwrap ? unwrapEdits(source, finding, fix.unwrap) : []),
|
|
277
|
+
...(fix.child ? childEdits(source, finding, fix.child) : []),
|
|
238
278
|
...(fix.translation ? translationEdits(source, finding, fix.translation) : []),
|
|
239
279
|
// A token that got another name: the finding spans the old name in a `var()`, and
|
|
240
280
|
// startsWith checks that the span still holds it.
|
|
@@ -345,6 +385,7 @@ export function renameReferences(source, renamedTags, kind) {
|
|
|
345
385
|
fixed += count;
|
|
346
386
|
};
|
|
347
387
|
for (const [from, to] of renamedTags) {
|
|
388
|
+
if (to === null) continue;
|
|
348
389
|
if (new RegExp(`(define|customElement)\\(\\s*["'\`]${from}["'\`]`).test(source)) continue;
|
|
349
390
|
apply(replaceAll(text, nameIn(entryPoint(from)), entryPoint(to)));
|
|
350
391
|
apply(replaceAll(text, nameIn(toClass(from)), toClass(to)));
|
|
@@ -372,7 +413,7 @@ const overlaps = (a, b) => a.from === b.from || (a.from < b.to && b.from < a.to)
|
|
|
372
413
|
/**
|
|
373
414
|
* One pass of fixes. An edit that overlaps one already taken is left for the next pass, so a
|
|
374
415
|
* caller applies this until `fixed` is 0, as fixUntilStable does.
|
|
375
|
-
* @returns {{ source: string, fixed: number, renamedTags: Map<string, string> }}
|
|
416
|
+
* @returns {{ source: string, fixed: number, renamedTags: Map<string, string | null> }}
|
|
376
417
|
*/
|
|
377
418
|
export function applyFixes(source, findings) {
|
|
378
419
|
const renamedTags = new Map();
|
|
@@ -388,7 +429,9 @@ export function applyFixes(source, findings) {
|
|
|
388
429
|
const clash = (edit, i) => unique.some((other) => overlaps(edit, other)) || found.slice(i + 1).some((other) => overlaps(edit, other));
|
|
389
430
|
if (found.length === 0 || found.some(clash)) continue;
|
|
390
431
|
unique.push(...found);
|
|
391
|
-
|
|
432
|
+
// A tag that took attributes with its new name meant more than that name, so
|
|
433
|
+
// what names it elsewhere is pointed at, not renamed: `null` says so.
|
|
434
|
+
if (finding.fix.tag) renamedTags.set(finding.tag, finding.fix.attributes ? null : finding.fix.tag);
|
|
392
435
|
if (finding.fix.translation) translated.add(finding.offset);
|
|
393
436
|
}
|
|
394
437
|
let fixed = source;
|
package/lint/rule-compiler.js
CHANGED
|
@@ -38,14 +38,14 @@ function excepted(className, node, favorable = true) {
|
|
|
38
38
|
const CSS_PSEUDOS = new Set(['is', 'not', 'has', 'where', 'matches']);
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
|
-
* Whether a field hands its label to `target`, as
|
|
42
|
-
* the first input in document order,
|
|
41
|
+
* Whether a field hands its label to `target`, as _findInputs in nldd-form-field does:
|
|
42
|
+
* the first input in document order, help text in the `help-text` slot left out. The answer is `maybe` when
|
|
43
43
|
* something before it may or may not be an input that renders.
|
|
44
44
|
*/
|
|
45
45
|
function findsInput(node, target, isInput, uncertain = false) {
|
|
46
46
|
let maybe = uncertain;
|
|
47
47
|
for (const child of node.children) {
|
|
48
|
-
if (child.
|
|
48
|
+
if (child.attrs.get('slot') === 'help-text') continue;
|
|
49
49
|
const unsure = maybe || child.conditional || child.repeated;
|
|
50
50
|
if (child === target) return maybe ? 'maybe' : 'yes';
|
|
51
51
|
if (isInput(child)) {
|
|
@@ -63,6 +63,10 @@ function fieldLabelCheck(isInput, allowMaybe) {
|
|
|
63
63
|
return (node) => {
|
|
64
64
|
for (let parent = node.parent; parent; parent = parent.parent) {
|
|
65
65
|
if (parent.name === 'nldd-form-field') {
|
|
66
|
+
// A group names itself and none of its controls.
|
|
67
|
+
// A boolean attribute: `group="false"` is a group too.
|
|
68
|
+
if (parent.attrs.get('group') === BOUND) return allowMaybe;
|
|
69
|
+
if (parent.attrs.has('group')) return false;
|
|
66
70
|
const label = parent.attrs.get('label');
|
|
67
71
|
const unknownLabel = label === BOUND || parent.spread;
|
|
68
72
|
if (!unknownLabel && !label) return false;
|
package/lint/rule.schema.json
CHANGED
|
@@ -24,8 +24,20 @@
|
|
|
24
24
|
"remove": { "type": "array", "items": { "type": "string" }, "description": "Attributes in `removed` that do nothing any more." },
|
|
25
25
|
"flag": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Attributes in `removed` whose value became a boolean attribute, old to new. The context names the value; only a value written out in the markup." },
|
|
26
26
|
"tag": { "type": "string", "description": "The new tag of a component in `removed` that got another name." },
|
|
27
|
+
"attributes": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Attributes the element takes with its new `tag`, such as the `slot` of an element that became the content of a slot. An element that already has one of them makes no edit. What names the old tag outside the markup is pointed at, not renamed: it meant more than the name." },
|
|
27
28
|
"translation": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Attributes in `removed` whose text became a translation key, attribute to key. The text goes in `translations`; only a value written out in the markup." },
|
|
28
29
|
"wrap": { "type": "string", "description": "The element that the text of an element goes in, with any inline elements. Only content written out in the markup, with inline elements only." },
|
|
30
|
+
"child": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"additionalProperties": false,
|
|
33
|
+
"required": ["tag", "attributes"],
|
|
34
|
+
"properties": {
|
|
35
|
+
"tag": { "type": "string", "description": "The element the attributes move to." },
|
|
36
|
+
"slot": { "type": "string", "description": "The slot that element goes in." },
|
|
37
|
+
"attributes": { "type": "array", "minItems": 1, "items": { "type": "string" }, "description": "Attributes in `removed` that move, as they are written." }
|
|
38
|
+
},
|
|
39
|
+
"description": "Attributes in `removed` that moved to a child of their own, which the fix adds as the first child. Only attributes the markup writes out or binds."
|
|
40
|
+
},
|
|
29
41
|
"unwrap": {
|
|
30
42
|
"type": "object",
|
|
31
43
|
"additionalProperties": false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nldd/design-system",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.30.0",
|
|
4
4
|
"description": "Designsysteem voor de Nederlandse Digitale Dienst",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/components/index.js",
|
|
@@ -658,7 +658,6 @@
|
|
|
658
658
|
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
659
659
|
"@eslint/js": "^10.0.1",
|
|
660
660
|
"@semantic-release/changelog": "^7.0.0",
|
|
661
|
-
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
662
661
|
"@semantic-release/exec": "^7.1.0",
|
|
663
662
|
"@semantic-release/git": "^11.0.1",
|
|
664
663
|
"@types/react": "^19.3.0",
|
|
@@ -673,7 +672,7 @@
|
|
|
673
672
|
"globals": "^17.8.0",
|
|
674
673
|
"marked": "^18.2.1",
|
|
675
674
|
"playwright": "^1.57.0",
|
|
676
|
-
"semantic-release": "^
|
|
675
|
+
"semantic-release": "^26.0.1",
|
|
677
676
|
"svgo": "^4.1.0",
|
|
678
677
|
"typescript": "^5.3.0",
|
|
679
678
|
"typescript-eslint": "^8.73.0",
|
|
@@ -681,6 +680,7 @@
|
|
|
681
680
|
"vitest": "5.1.1",
|
|
682
681
|
"vue": "^3.5.40",
|
|
683
682
|
"vue-tsc": "^3.3.7",
|
|
683
|
+
"web-features": "^3.48.0",
|
|
684
684
|
"yaml": "^2.9.1"
|
|
685
685
|
},
|
|
686
686
|
"engines": {
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { r as e } from "./custom-element-7tLnKgZE.js";
|
|
2
|
-
import { r as t } from "./element-state-D-J_cHEV.js";
|
|
3
|
-
import { t as n } from "./owned-attribute-x9OCTy_4.js";
|
|
4
|
-
import { t as r } from "./decorate-CIC8fGPN.js";
|
|
5
|
-
// src/utilities/described-by-mixin.ts
|
|
6
|
-
function i(e, t, n = !1) {
|
|
7
|
-
if (!e) return;
|
|
8
|
-
if (!n && "describedByElements" in e) {
|
|
9
|
-
e.describedByElements = [...t];
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
let r = e;
|
|
13
|
-
r.ariaDescribedByElements = t.length ? [...t] : null;
|
|
14
|
-
}
|
|
15
|
-
function a(e, t, n = !1) {
|
|
16
|
-
e && (!n && "invalid" in e ? e.invalid = t : t ? e.setAttribute("aria-invalid", "true") : e.removeAttribute("aria-invalid"));
|
|
17
|
-
}
|
|
18
|
-
function o(o) {
|
|
19
|
-
class s extends o {
|
|
20
|
-
constructor(...e) {
|
|
21
|
-
super(...e), this.describedByElements = [], this.accessibleDescription = "", this.accessibleDescribedBy = "", this._descriptionTextElement = null, this._appliedDescription = null, this.addController({ hostUpdated: () => {
|
|
22
|
-
let e = this.describedTarget(), t = e === this;
|
|
23
|
-
i(e, [
|
|
24
|
-
...this.describedByElements,
|
|
25
|
-
...this._appDescriptions(t),
|
|
26
|
-
...this.ownDescriptions()
|
|
27
|
-
], t);
|
|
28
|
-
let n = this.invalid;
|
|
29
|
-
n !== void 0 && a(e, n, t);
|
|
30
|
-
} }), this.addEventListener("focusin", () => {
|
|
31
|
-
this.accessibleDescribedBy && this.requestUpdate();
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
_appDescriptions(e) {
|
|
35
|
-
let r = (this.accessibleDescribedBy ?? "").split(/\s+/).filter(Boolean), i = this.getRootNode(), a = r.map((e) => i.getElementById ? i.getElementById(e) : null).filter((e) => e !== null);
|
|
36
|
-
t(this, "no-description-target", a.length < r.length);
|
|
37
|
-
let o = a.length ? "" : (this.accessibleDescription ?? "").trim();
|
|
38
|
-
if (e) return this._appliedDescription = n(this, "aria-description", o, this._appliedDescription), a;
|
|
39
|
-
if (o) {
|
|
40
|
-
let e = this._descriptionTextElement;
|
|
41
|
-
return e && e.getRootNode() === this.shadowRoot || (e = document.createElement("span"), e.hidden = !0, e.dataset.description = "", this.shadowRoot?.append(e), this._descriptionTextElement = e), e.textContent = o, [e];
|
|
42
|
-
}
|
|
43
|
-
return this._descriptionTextElement?.remove(), this._descriptionTextElement = null, a;
|
|
44
|
-
}
|
|
45
|
-
describedTarget() {
|
|
46
|
-
return this.shadowRoot?.querySelector("input, textarea, select") ?? null;
|
|
47
|
-
}
|
|
48
|
-
ownDescriptions() {
|
|
49
|
-
return [];
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
return r([e({ attribute: !1 })], s.prototype, "describedByElements", void 0), r([e({
|
|
53
|
-
type: String,
|
|
54
|
-
reflect: !0,
|
|
55
|
-
attribute: "accessible-description"
|
|
56
|
-
})], s.prototype, "accessibleDescription", void 0), r([e({
|
|
57
|
-
type: String,
|
|
58
|
-
reflect: !0,
|
|
59
|
-
attribute: "accessible-described-by"
|
|
60
|
-
})], s.prototype, "accessibleDescribedBy", void 0), s;
|
|
61
|
-
}
|
|
62
|
-
export { i as n, o as t };
|
|
@@ -1,434 +0,0 @@
|
|
|
1
|
-
import { n as e, o as t, r as n, t as r } from "./decorate-CIC8fGPN.js";
|
|
2
|
-
import { c as i, r as a, s as o } from "./custom-element-7tLnKgZE.js";
|
|
3
|
-
import { t as s } from "./custom-element-BW8Ua4c7.js";
|
|
4
|
-
import { t as c } from "./owned-attribute-x9OCTy_4.js";
|
|
5
|
-
import { r as l, t as u } from "./render-marked-vXU387IN.js";
|
|
6
|
-
import { n as d } from "./described-by-mixin-DSeADwWP.js";
|
|
7
|
-
import { o as f, r as p } from "./text-wrap-DJ9PcwZ4.js";
|
|
8
|
-
import { n as m } from "./breakpoints-Cwor8TRP.js";
|
|
9
|
-
import { i as h, t as g } from "./shadow-resets-kAFcguCG.js";
|
|
10
|
-
import { a as _, r as v } from "./element-state-D-J_cHEV.js";
|
|
11
|
-
import { t as y } from "./with-translations-DSfo7eL-.js";
|
|
12
|
-
import { t as b } from "./form-field.i18n-B-UZduXL.js";
|
|
13
|
-
// src/components/forms/form-field/form-field.styles.ts
|
|
14
|
-
var x = i(m.mdMin), S = o`
|
|
15
|
-
:host {
|
|
16
|
-
box-sizing: border-box;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
/* # Host */
|
|
21
|
-
|
|
22
|
-
:host {
|
|
23
|
-
--_form-field-gap: var(--primitives-space-4);
|
|
24
|
-
--_form-field-description-gap: var(--primitives-space-4);
|
|
25
|
-
|
|
26
|
-
${g}
|
|
27
|
-
display: block;
|
|
28
|
-
width: 100%;
|
|
29
|
-
container-type: inline-size;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
:host([hidden]) {
|
|
33
|
-
display: none;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
/* # Block */
|
|
38
|
-
|
|
39
|
-
.form-field {
|
|
40
|
-
display: flex;
|
|
41
|
-
flex-direction: column;
|
|
42
|
-
gap: var(--_form-field-gap);
|
|
43
|
-
isolation: isolate;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
:host([label-alignment="left"]) .form-field,
|
|
47
|
-
:host([label-alignment="right"]) .form-field,
|
|
48
|
-
:host(:not([label-alignment]):state(form-label-left)) .form-field,
|
|
49
|
-
:host(:not([label-alignment]):state(form-label-right)) .form-field {
|
|
50
|
-
@container (min-width: ${x}) {
|
|
51
|
-
flex-direction: row;
|
|
52
|
-
gap: var(--semantics-forms-columns-gap);
|
|
53
|
-
align-items: start;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
/* # Header */
|
|
59
|
-
|
|
60
|
-
.form-field__header {
|
|
61
|
-
box-sizing: border-box;
|
|
62
|
-
display: flex;
|
|
63
|
-
/* Paints above .form-field__main so a label descender stays readable where it
|
|
64
|
-
overlaps the input focus ring — this is what lets the top-aligned --_form-field-gap stay
|
|
65
|
-
tight. Reset to auto in the side-by-side layout below (no vertical overlap there). */
|
|
66
|
-
z-index: 1;
|
|
67
|
-
flex-direction: column;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
:host([label-alignment="left"]) .form-field__header,
|
|
71
|
-
:host([label-alignment="right"]) .form-field__header,
|
|
72
|
-
:host(:not([label-alignment]):state(form-label-left)) .form-field__header,
|
|
73
|
-
:host(:not([label-alignment]):state(form-label-right)) .form-field__header {
|
|
74
|
-
@container (min-width: ${x}) {
|
|
75
|
-
z-index: auto;
|
|
76
|
-
width: var(--semantics-forms-label-column-width);
|
|
77
|
-
min-height: var(--semantics-controls-md-min-size);
|
|
78
|
-
flex-grow: 0;
|
|
79
|
-
flex-shrink: 0;
|
|
80
|
-
justify-content: center;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
:host([label-alignment="right"]) .form-field__header,
|
|
85
|
-
:host(:not([label-alignment]):state(form-label-right)) .form-field__header {
|
|
86
|
-
@container (min-width: ${x}) {
|
|
87
|
-
align-items: end;
|
|
88
|
-
text-align: right;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
:host([label-alignment="left"]) .form-field__header,
|
|
93
|
-
:host(:not([label-alignment]):state(form-label-left)) .form-field__header {
|
|
94
|
-
@container (min-width: ${x}) {
|
|
95
|
-
align-items: start;
|
|
96
|
-
text-align: left;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.form-field__header.is-empty {
|
|
101
|
-
display: none;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
:host([label-alignment="left"]) .form-field__header.is-empty,
|
|
105
|
-
:host([label-alignment="right"]) .form-field__header.is-empty,
|
|
106
|
-
:host(:not([label-alignment]):state(form-label-left)) .form-field__header.is-empty,
|
|
107
|
-
:host(:not([label-alignment]):state(form-label-right)) .form-field__header.is-empty {
|
|
108
|
-
@container (min-width: ${x}) {
|
|
109
|
-
display: flex;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
/* # Label */
|
|
115
|
-
|
|
116
|
-
.form-field__label {
|
|
117
|
-
display: inline-flex;
|
|
118
|
-
gap: var(--primitives-space-4);
|
|
119
|
-
align-items: baseline;
|
|
120
|
-
--context-content-color: var(--semantics-content-color);
|
|
121
|
-
color: var(--semantics-content-color);
|
|
122
|
-
font: var(--primitives-font-body-md-regular-flat);
|
|
123
|
-
${f}
|
|
124
|
-
text-wrap: pretty;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.form-field__label-text {
|
|
128
|
-
min-width: 0;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
:host([label-alignment="left"]) .form-field__label,
|
|
132
|
-
:host([label-alignment="right"]) .form-field__label,
|
|
133
|
-
:host(:not([label-alignment]):state(form-label-left)) .form-field__label,
|
|
134
|
-
:host(:not([label-alignment]):state(form-label-right)) .form-field__label {
|
|
135
|
-
@container (min-width: ${x}) {
|
|
136
|
-
display: flex;
|
|
137
|
-
flex-direction: column;
|
|
138
|
-
gap: var(--primitives-space-0);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
:host([label-alignment="right"]) .form-field__label,
|
|
143
|
-
:host(:not([label-alignment]):state(form-label-right)) .form-field__label {
|
|
144
|
-
@container (min-width: ${x}) {
|
|
145
|
-
align-items: end;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
:host([label-alignment="left"]) .form-field__label,
|
|
150
|
-
:host(:not([label-alignment]):state(form-label-left)) .form-field__label {
|
|
151
|
-
@container (min-width: ${x}) {
|
|
152
|
-
align-items: start;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
/* # Optional indicator */
|
|
158
|
-
|
|
159
|
-
.form-field__optional {
|
|
160
|
-
--context-content-color: var(--semantics-content-secondary-color);
|
|
161
|
-
color: var(--semantics-content-secondary-color);
|
|
162
|
-
font: var(--primitives-font-body-xs-regular-tight);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
/* # Supporting label */
|
|
167
|
-
|
|
168
|
-
.form-field__supporting-label {
|
|
169
|
-
--context-content-color: var(--semantics-content-secondary-color);
|
|
170
|
-
color: var(--semantics-content-secondary-color);
|
|
171
|
-
font: var(--primitives-font-body-xs-regular-tight);
|
|
172
|
-
${f}
|
|
173
|
-
text-wrap: pretty;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
/* # Main */
|
|
178
|
-
|
|
179
|
-
.form-field__main {
|
|
180
|
-
display: flex;
|
|
181
|
-
min-width: 0;
|
|
182
|
-
flex-direction: column;
|
|
183
|
-
flex-grow: 1;
|
|
184
|
-
flex-shrink: 1;
|
|
185
|
-
flex-basis: 0;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
::slotted(nldd-validation-list) {
|
|
189
|
-
margin-block-start: var(--_form-field-description-gap);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
`, C = o`
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
/* # Host */
|
|
197
|
-
|
|
198
|
-
:host {
|
|
199
|
-
--_form-field-help-text-code-padding: var(--primitives-space-2) var(--primitives-space-4);
|
|
200
|
-
--_form-field-help-text-code-corner-radius: var(--semantics-controls-xs-corner-radius);
|
|
201
|
-
--_form-field-help-text-code-border-width: var(--semantics-surfaces-highlight-border-width);
|
|
202
|
-
--_form-field-help-text-code-border-color: var(--semantics-surfaces-tinted-highlight-border-color);
|
|
203
|
-
--_form-field-help-text-code-background-color: var(--semantics-surfaces-tinted-background-color);
|
|
204
|
-
--_form-field-help-text-code-font-family: var(--primitives-font-family-monospace);
|
|
205
|
-
--_form-field-help-text-code-font-size: var(--semantics-code-inline-font-size);
|
|
206
|
-
--_form-field-help-text-mark-padding: var(--primitives-space-1) var(--primitives-space-2);
|
|
207
|
-
--_form-field-help-text-mark-corner-radius: var(--semantics-controls-xs-corner-radius);
|
|
208
|
-
--_form-field-help-text-mark-background-color: var(--semantics-content-mark-background-color);
|
|
209
|
-
--_form-field-help-text-mark-color: var(--semantics-content-mark-color);
|
|
210
|
-
${g}
|
|
211
|
-
display: contents;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
/* display: contents outranks the UA [hidden] rule, so restate it here or
|
|
215
|
-
consumers cannot hide the help text (e.g. behind a period toggle). */
|
|
216
|
-
:host([hidden]) {
|
|
217
|
-
display: none;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
/* # Help text */
|
|
222
|
-
|
|
223
|
-
.form-field__help-text {
|
|
224
|
-
margin: var(--primitives-space-4) 0 0;
|
|
225
|
-
--context-content-color: var(--semantics-content-color);
|
|
226
|
-
color: var(--semantics-content-color);
|
|
227
|
-
font: var(--primitives-font-body-sm-regular-tight);
|
|
228
|
-
${p}
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
/* # Links */
|
|
233
|
-
|
|
234
|
-
::slotted(a) {
|
|
235
|
-
${h}
|
|
236
|
-
${g}
|
|
237
|
-
border-radius: var(--primitives-corner-radius-xxs) !important;
|
|
238
|
-
--context-content-color: var(--context-link-color) !important;
|
|
239
|
-
color: var(--context-link-color) !important;
|
|
240
|
-
text-decoration: underline !important;
|
|
241
|
-
text-underline-offset: var(--primitives-space-2) !important;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
@media (hover: hover) {
|
|
245
|
-
::slotted(a:hover) {
|
|
246
|
-
--context-content-color: var(--context-link-is-hovered-color) !important;
|
|
247
|
-
color: var(--context-link-is-hovered-color) !important;
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
::slotted(a:active) {
|
|
252
|
-
--context-content-color: var(--context-link-is-active-color) !important;
|
|
253
|
-
color: var(--context-link-is-active-color) !important;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
::slotted(a:focus-visible) {
|
|
257
|
-
outline: var(--semantics-focus-ring-outline) !important;
|
|
258
|
-
outline-offset: var(--semantics-focus-ring-outline-offset) !important;
|
|
259
|
-
box-shadow: var(--semantics-focus-ring-box-shadow) !important;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
::slotted(a:focus:not(:focus-visible)) {
|
|
263
|
-
outline: none !important;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
/* # Inline elements */
|
|
268
|
-
|
|
269
|
-
::slotted(:is(strong, b, em, i, code, mark)) {
|
|
270
|
-
${h}
|
|
271
|
-
${g}
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
::slotted(:is(strong, b)) {
|
|
275
|
-
font-weight: var(--primitives-font-weight-body-bold) !important;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
::slotted(:is(em, i)) {
|
|
279
|
-
font-style: italic !important;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
::slotted(code) {
|
|
283
|
-
border-radius: var(--_form-field-help-text-code-corner-radius) !important;
|
|
284
|
-
box-shadow: inset 0 0 0 var(--_form-field-help-text-code-border-width) var(--_form-field-help-text-code-border-color) !important;
|
|
285
|
-
background-color: var(--_form-field-help-text-code-background-color) !important;
|
|
286
|
-
padding: var(--_form-field-help-text-code-padding) !important;
|
|
287
|
-
font-family: var(--_form-field-help-text-code-font-family) !important;
|
|
288
|
-
font-size: var(--_form-field-help-text-code-font-size) !important;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
::slotted(mark) {
|
|
292
|
-
border-radius: var(--_form-field-help-text-mark-corner-radius) !important;
|
|
293
|
-
background-color: var(--_form-field-help-text-mark-background-color) !important;
|
|
294
|
-
padding: var(--_form-field-help-text-mark-padding) !important;
|
|
295
|
-
--context-content-color: var(--_form-field-help-text-mark-color) !important;
|
|
296
|
-
color: var(--_form-field-help-text-mark-color) !important;
|
|
297
|
-
}
|
|
298
|
-
`;
|
|
299
|
-
// src/components/forms/form-field/form-field.template.ts
|
|
300
|
-
function w(e) {
|
|
301
|
-
return t`<span class="form-field__optional">${e}</span>`;
|
|
302
|
-
}
|
|
303
|
-
function T(e) {
|
|
304
|
-
let r = !!e.label, i = !!e.supportingLabel, a = t`
|
|
305
|
-
<div class="form-field__header ${!r && !i ? "is-empty" : ""}">
|
|
306
|
-
${r ? t`
|
|
307
|
-
<label class="form-field__label"
|
|
308
|
-
@click=${(t) => e._focusInput(t)}
|
|
309
|
-
>
|
|
310
|
-
<span class="form-field__label-text">${u(e.label)}</span>
|
|
311
|
-
${e.optional ? w(e._t("components.form-field.optional-label")) : n}
|
|
312
|
-
</label>
|
|
313
|
-
` : n}
|
|
314
|
-
${i ? t`
|
|
315
|
-
<span class="form-field__supporting-label">${u(e.supportingLabel)}</span>
|
|
316
|
-
` : n}
|
|
317
|
-
</div>
|
|
318
|
-
`;
|
|
319
|
-
return t`
|
|
320
|
-
<div class="form-field">
|
|
321
|
-
${a}
|
|
322
|
-
<div class="form-field__main">
|
|
323
|
-
<slot></slot>
|
|
324
|
-
<slot name="help"></slot>
|
|
325
|
-
</div>
|
|
326
|
-
</div>
|
|
327
|
-
`;
|
|
328
|
-
}
|
|
329
|
-
function E(e) {
|
|
330
|
-
return t`
|
|
331
|
-
<p class="form-field__help-text">
|
|
332
|
-
<slot></slot>
|
|
333
|
-
</p>
|
|
334
|
-
`;
|
|
335
|
-
}
|
|
336
|
-
// src/components/forms/form-field/form-field.ts
|
|
337
|
-
var D, O, k = ["nldd-form-field-help-text"];
|
|
338
|
-
function A(e) {
|
|
339
|
-
return e instanceof HTMLInputElement && e.type !== "hidden" || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e.constructor.isFormInput === !0;
|
|
340
|
-
}
|
|
341
|
-
var j = (e) => e.tagName.toLowerCase() === "nldd-toolbar";
|
|
342
|
-
function M(e, t) {
|
|
343
|
-
for (let n = e.parentElement; n && n !== t; n = n.parentElement) if (j(n)) return !0;
|
|
344
|
-
return !1;
|
|
345
|
-
}
|
|
346
|
-
function N() {
|
|
347
|
-
return `nldd-field-input-${crypto.randomUUID?.() ?? Math.random().toString(36).slice(2)}`;
|
|
348
|
-
}
|
|
349
|
-
var P = (D = class extends y(e, b) {
|
|
350
|
-
constructor(...e) {
|
|
351
|
-
super(...e), this.labelAlignment = void 0, this.formLabelAlignment = void 0, this.label = "", this.supportingLabel = "", this.optional = !1, this._childObserver = null, this._listObserver = null, this._onItemVisibilityChange = () => this._syncDescription(), this._watchedLists = [], this._appliedLabel = null;
|
|
352
|
-
}
|
|
353
|
-
render() {
|
|
354
|
-
return T(this);
|
|
355
|
-
}
|
|
356
|
-
updated(e) {
|
|
357
|
-
e.has("label") && this._onSlotChange();
|
|
358
|
-
}
|
|
359
|
-
willUpdate(e) {
|
|
360
|
-
super.willUpdate(e), e.has("formLabelAlignment") && _(this, "form-label", this.formLabelAlignment, ["left", "right"]);
|
|
361
|
-
}
|
|
362
|
-
connectedCallback() {
|
|
363
|
-
super.connectedCallback(), this._childObserver = new MutationObserver(() => this._onSlotChange()), this._childObserver.observe(this, { childList: !0 }), this.hasUpdated && this._onSlotChange();
|
|
364
|
-
}
|
|
365
|
-
firstUpdated() {
|
|
366
|
-
this._onSlotChange();
|
|
367
|
-
}
|
|
368
|
-
disconnectedCallback() {
|
|
369
|
-
super.disconnectedCallback(), this._childObserver?.disconnect(), this._listObserver?.disconnect(), this._watchLists([]);
|
|
370
|
-
}
|
|
371
|
-
_watchLists(e) {
|
|
372
|
-
for (let t of this._watchedLists) !e.includes(t) && t.onItemVisibilityChange === this._onItemVisibilityChange && (t.onItemVisibilityChange = null);
|
|
373
|
-
for (let t of e) t.onItemVisibilityChange = this._onItemVisibilityChange;
|
|
374
|
-
this._watchedLists = e;
|
|
375
|
-
}
|
|
376
|
-
_focusInput(e) {
|
|
377
|
-
let t = this._findInput();
|
|
378
|
-
t && (e.preventDefault(), t.focus());
|
|
379
|
-
}
|
|
380
|
-
_onSlotChange() {
|
|
381
|
-
let e = this._findInput();
|
|
382
|
-
v(this, "has-input", !!e), e && ("inputId" in e ? e.inputId = e.inputId || N() : e.id || (e.id = N()), this._applyAccessibleLabel(e), this._adoptValidationLists(e), this._syncDescription());
|
|
383
|
-
}
|
|
384
|
-
_applyAccessibleLabel(e) {
|
|
385
|
-
let t = "accessibleLabel" in e ? "accessible-label" : e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement ? "aria-label" : null;
|
|
386
|
-
t && (this._appliedLabel = c(e, t, l(this.label), this._appliedLabel));
|
|
387
|
-
}
|
|
388
|
-
_adoptValidationLists(e) {
|
|
389
|
-
let t = Array.from(this.children).filter((e) => e.tagName.toLowerCase() === "nldd-validation-list");
|
|
390
|
-
for (let n of t) n.getAttribute("for") || (n.control = e);
|
|
391
|
-
if (!import.meta.env?.DEV) return;
|
|
392
|
-
let n = t.some((e) => !e.getAttribute("for") && Array.from(e.children).some((e) => e.hasAttribute("match") || e.hasAttribute("minlength") || e.hasAttribute("maxlength"))), r = Array.from(this.children).filter((e) => !k.includes(e.tagName.toLowerCase()) && A(e));
|
|
393
|
-
v(this, "list-reads-first-control", n && r.length > 1);
|
|
394
|
-
}
|
|
395
|
-
_findInput() {
|
|
396
|
-
let e = Array.from(this.children).filter((e) => !k.includes(e.tagName.toLowerCase()) && !j(e));
|
|
397
|
-
for (let t of e) {
|
|
398
|
-
if (A(t)) return t;
|
|
399
|
-
let e = Array.from(t.querySelectorAll("*")).find((e) => A(e) && !M(e, t));
|
|
400
|
-
if (e) return e;
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
_syncDescription() {
|
|
404
|
-
let e = this._findInput();
|
|
405
|
-
if (!e) return;
|
|
406
|
-
let t = Array.from(this.children), n = (e) => e.tagName.toLowerCase(), r = t.filter((e) => n(e) === "nldd-validation-list");
|
|
407
|
-
this._listObserver ?? (this._listObserver = new MutationObserver(() => this._syncDescription())), this._listObserver.disconnect();
|
|
408
|
-
for (let e of r) this._listObserver.observe(e, {
|
|
409
|
-
childList: !0,
|
|
410
|
-
subtree: !0
|
|
411
|
-
});
|
|
412
|
-
this._watchLists(r);
|
|
413
|
-
let i = [...r.flatMap((e) => Array.from(e.children).filter((e) => n(e) === "nldd-validation-item" && e.visible)), ...t.filter((e) => n(e) === "nldd-form-field-help-text")];
|
|
414
|
-
"describedByElements" in e ? e.describedByElements = i : d(e, i);
|
|
415
|
-
}
|
|
416
|
-
}, D.styles = S, D);
|
|
417
|
-
r([a({
|
|
418
|
-
type: String,
|
|
419
|
-
attribute: "label-alignment",
|
|
420
|
-
reflect: !0
|
|
421
|
-
})], P.prototype, "labelAlignment", void 0), r([a({ attribute: !1 })], P.prototype, "formLabelAlignment", void 0), r([a({ type: String })], P.prototype, "label", void 0), r([a({
|
|
422
|
-
type: String,
|
|
423
|
-
attribute: "supporting-label"
|
|
424
|
-
})], P.prototype, "supportingLabel", void 0), r([a({ type: Boolean })], P.prototype, "optional", void 0), P = r([s("nldd-form-field")], P);
|
|
425
|
-
var F = (O = class extends e {
|
|
426
|
-
connectedCallback() {
|
|
427
|
-
super.connectedCallback(), this.slot = "help";
|
|
428
|
-
}
|
|
429
|
-
render() {
|
|
430
|
-
return E(this);
|
|
431
|
-
}
|
|
432
|
-
}, O.styles = C, O);
|
|
433
|
-
F = r([s("nldd-form-field-help-text")], F);
|
|
434
|
-
export { P as NLDDFormField, F as NLDDFormFieldHelpText };
|