@nldd/design-system 0.24.0 → 0.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +591 -31
- package/dist/assets/styles/shadow-resets.d.ts +9 -0
- package/dist/assets/styles/shadow-resets.d.ts.map +1 -1
- package/dist/assets/styles/shadow-resets.js +13 -0
- package/dist/assets/styles/shadow-resets.js.map +1 -1
- package/dist/cdn/autoloader.js +140 -137
- package/dist/cdn/chunks/accordion-B7KdKJno.js +90 -0
- package/dist/cdn/chunks/accordion-item-CVy8Apta.js +242 -0
- package/dist/cdn/chunks/{activity-indicator-DWBG1Csi.js → activity-indicator-CpJVlX6K.js} +12 -12
- package/dist/cdn/chunks/admonition-C89WHJ9a.js +379 -0
- package/dist/cdn/chunks/{avatar-CRZLseMs.js → avatar-Bf0OfAtQ.js} +17 -17
- package/dist/cdn/chunks/{avatar-group-coYbMhot.js → avatar-group-BeBAv2wB.js} +20 -20
- package/dist/cdn/chunks/{badge-DAXG-uIw.js → badge-C43FvgkK.js} +5 -5
- package/dist/cdn/chunks/{banner-BbR0rebp.js → banner-OWK0gwFb.js} +41 -40
- package/dist/cdn/chunks/{bar-split-view-DoklVwuj.js → bar-split-view-Dj1WycIW.js} +7 -7
- package/dist/cdn/chunks/{blockquote-DfIl4wTC.js → blockquote-D_5MxcSi.js} +9 -9
- package/dist/cdn/chunks/{box-CXICi_Gs.js → box-BUoxiA7b.js} +10 -10
- package/dist/cdn/chunks/{breadcrumbs-CVoNqsU2.js → breadcrumbs-DXxJTACL.js} +6 -6
- package/dist/cdn/chunks/{button-DWzqSerk.js → button-DpKyquzm.js} +8 -8
- package/dist/cdn/chunks/{button-bar-DwFLuumP.js → button-bar-BSt-QQRG.js} +30 -30
- package/dist/cdn/chunks/{button-group-D-nEY7Wz.js → button-group-D5QJWJzh.js} +2 -2
- package/dist/cdn/chunks/{card-CIVLEFhz.js → card-Cz4f-dCf.js} +9 -9
- package/dist/cdn/chunks/{cell-C79LmCOU.js → cell-zFw2V9wD.js} +6 -6
- package/dist/cdn/chunks/{checkbox-BQepKdVv.js → checkbox-BDp3O8Nc.js} +4 -4
- package/dist/cdn/chunks/{checkbox-field-ColaTYKE.js → checkbox-field-CSXV0prA.js} +5 -5
- package/dist/cdn/chunks/{class-map-9VgiG_zt.js → class-map-C7ao595e.js} +1 -1
- package/dist/cdn/chunks/{code-editor-FNmK9xRx.js → code-editor-Chm9EG_v.js} +5 -5
- package/dist/cdn/chunks/{code-viewer-C5whEGq6.js → code-viewer-DX322d7w.js} +102 -87
- package/dist/cdn/chunks/{codemirror-input-SKGbh9LP.js → codemirror-input-BLMJQbHq.js} +4 -4
- package/dist/cdn/chunks/{collection-Dq6Z66UX.js → collection-Bf8HoSki.js} +20 -20
- package/dist/cdn/chunks/{combo-box-CoOSPICd.js → combo-box-VuU_F54v.js} +25 -25
- package/dist/cdn/chunks/{container-CtwuWO3a.js → container-qVTgmbpz.js} +48 -48
- package/dist/cdn/chunks/css-time-DmkAFd1y.js +8 -0
- package/dist/cdn/chunks/{custom-element-BVKCDhPV.js → custom-element-C5yyaCZS.js} +4 -2
- package/dist/cdn/chunks/{date-field-CqnGM7GR.js → date-field-By9Q8151.js} +100 -88
- package/dist/cdn/chunks/{date-picker-C2iGHw2u.js → date-picker-DtA4PXCh.js} +16 -16
- package/dist/cdn/chunks/{decorate-CK3hc5C5.js → decorate-CkbtFnic.js} +1 -1
- package/dist/cdn/chunks/{described-by-mixin-DGAPpEdM.js → described-by-mixin-DXC6jkCd.js} +2 -2
- package/dist/cdn/chunks/{description-cell-B08Ma5EJ.js → description-cell-D2INE8A3.js} +6 -6
- package/dist/cdn/chunks/{dev-checks-BwWYGVrJ.js → dev-checks-UHHli7gE.js} +112 -18
- package/dist/cdn/chunks/{dist-B8vBP_Xz.js → dist-B1pwN_VD.js} +1 -1
- package/dist/cdn/chunks/{dist-B4vELUJW.js → dist-BG0xnVUi.js} +3 -3
- package/dist/cdn/chunks/{dist-CKeY28-M.js → dist-BzfFo9Yu.js} +2 -2
- package/dist/cdn/chunks/{dist-CQ5kBaGZ.js → dist-C-T4uKP1.js} +1 -1
- package/dist/cdn/chunks/{dist-BThgPtD7.js → dist-Ce38ZA7b.js} +2 -2
- package/dist/cdn/chunks/{dist-DP5DQSlX.js → dist-Cm51DQO4.js} +2 -2
- package/dist/cdn/chunks/{dist-B2YK3eT2.js → dist-Dg3ySzj7.js} +3 -3
- package/dist/cdn/chunks/{dist-jAq440y0.js → dist-VXOtAJ-m.js} +1 -1
- package/dist/cdn/chunks/{dist-D1t9kkjo.js → dist-pCih3zzc.js} +1 -1
- package/dist/cdn/chunks/{dist-DzcXDSFC.js → dist-qo8avphr.js} +1 -1
- package/dist/cdn/chunks/{dist-CWN_qz9z.js → dist-zxb4QZZG.js} +1 -1
- package/dist/cdn/chunks/{divider-KgHxRNV9.js → divider-Cv_vyHvw.js} +2 -2
- package/dist/cdn/chunks/{document-tab-bar-CTIcETDr.js → document-tab-bar-CdOxr8KC.js} +53 -52
- package/dist/cdn/chunks/{dropdown-BhrCadMW.js → dropdown-DC9J6k0P.js} +5 -5
- package/dist/cdn/chunks/{file-field-DzH4Yrj5.js → file-field-CsrTk4uk.js} +25 -25
- package/dist/cdn/chunks/{floating-ui.dom-B8J1rV2c.js → floating-ui.dom-BvAAdCVe.js} +260 -184
- package/dist/cdn/chunks/{form-CzmdlZ0i.js → form-ClOD1OKh.js} +10 -10
- package/dist/cdn/chunks/{form-actions-CDQW1p3w.js → form-actions-CwaXGj43.js} +3 -3
- package/dist/cdn/chunks/{form-field-D_qJpPAS.js → form-field-LoX9v2Pa.js} +7 -7
- package/dist/cdn/chunks/{form-section-Jy5b5Qtp.js → form-section-i6piyKuy.js} +16 -16
- package/dist/cdn/chunks/{full-bleed-section-BDIuXLGU.js → full-bleed-section-6aAfCnez.js} +4 -4
- package/dist/cdn/chunks/{hero-BPHFHrUT.js → hero-CTQAayXT.js} +22 -22
- package/dist/cdn/chunks/{icon-BE2ojX0S.js → icon-B5kHyCz2.js} +7 -7
- package/dist/cdn/chunks/{icon-button-CFMhdG1B.js → icon-button-DuEiOOoc.js} +9 -9
- package/dist/cdn/chunks/{icon-cell-CQ-e1GB2.js → icon-cell-uZkR3hZx.js} +6 -6
- package/dist/cdn/chunks/{identity-7wQDjeGb.js → identity-DR6DMjke.js} +55 -39
- package/dist/cdn/chunks/{if-defined-G1P3HUvi.js → if-defined-B7fJBsUt.js} +1 -1
- package/dist/cdn/chunks/{image-QPbmNKvZ.js → image-CuBUo_MQ.js} +20 -20
- package/dist/cdn/chunks/{inline-dialog-DP3AXfJV.js → inline-dialog-CZNkWJIA.js} +15 -15
- package/dist/cdn/chunks/{just-in-time-education-DnaF_sLc.js → just-in-time-education-qwg9hTDX.js} +8 -8
- package/dist/cdn/chunks/{kanban-o2GMLjsq.js → kanban-Bkg-nZmX.js} +9 -9
- package/dist/cdn/chunks/{kanban-column-B_Jrut9s.js → kanban-column-C8iRyRNY.js} +8 -8
- package/dist/cdn/chunks/{keyboard-shortcut-Dm366Dra.js → keyboard-shortcut-Rq5IHU-e.js} +3 -3
- package/dist/cdn/chunks/{languages-Dlh_tbAH.js → languages-DLHsACpp.js} +12 -12
- package/dist/cdn/chunks/{link-DhTY3Sjh.js → link-CgjFwaHP.js} +70 -21
- package/dist/cdn/chunks/{link-group-YuwD1m6-.js → link-group-5W0GAmTq.js} +2 -2
- package/dist/cdn/chunks/{list-Cdvib5Y-.js → list-BASqIKtP.js} +15 -15
- package/dist/cdn/chunks/{list-item-vO3GwQWa.js → list-item-DTcPysIP.js} +19 -19
- package/dist/cdn/chunks/{list-item-segment-F3av0jxz.js → list-item-segment-CRw0y4kg.js} +15 -15
- package/dist/cdn/chunks/{menu-dTVlz6mn.js → menu-CYILGTpB.js} +47 -41
- package/dist/cdn/chunks/{menu-bar-imOaTlGm.js → menu-bar-CL566HmJ.js} +10 -10
- package/dist/cdn/chunks/{menu-bar-item-ChQbM1ER.js → menu-bar-item-C6OrUu_4.js} +18 -18
- package/dist/cdn/chunks/{menu-divider-D7s6f49y.js → menu-divider-BtU9eBSb.js} +3 -3
- package/dist/cdn/chunks/{menu-group-BcEmoNvL.js → menu-group-r2TvdqJB.js} +6 -6
- package/dist/cdn/chunks/{menu-item-BGlVTfe6.js → menu-item-CS45jTLu.js} +22 -22
- package/dist/cdn/chunks/{menu.template-syBthjEV.js → menu.template-CF8Iau1s.js} +20 -5
- package/dist/cdn/chunks/{modal-dialog-BBK25tjm.js → modal-dialog-C9NBq8TO.js} +5 -5
- package/dist/cdn/chunks/{multi-line-text-field-DuL6nLG_.js → multi-line-text-field-BkxV0vqA.js} +5 -5
- package/dist/cdn/chunks/{navigation-split-view-CdZNbX91.js → navigation-split-view-DNrQYkg7.js} +11 -11
- package/dist/cdn/chunks/{nl.generated-CgRVSEh6.js → nl.generated-BDowZkhc.js} +1 -1
- package/dist/cdn/chunks/{notification-Dwhfnjb2.js → notification-Dzpy9hCc.js} +13 -13
- package/dist/cdn/chunks/{number-field-Dl4zZvVe.js → number-field-BJCUe-bI.js} +7 -7
- package/dist/cdn/chunks/{one-half-one-half-section-BJxLZfiK.js → one-half-one-half-section-Ctw8ri5v.js} +4 -4
- package/dist/cdn/chunks/{one-third-two-thirds-section-CARh_hdH.js → one-third-two-thirds-section-DxUUH8lS.js} +4 -4
- package/dist/cdn/chunks/{one-time-code-field-FaxqiiD6.js → one-time-code-field-DGDyqIMd.js} +20 -20
- package/dist/cdn/chunks/{page-Cc5bb6VU.js → page-BpavFPML.js} +10 -10
- package/dist/cdn/chunks/{page-footer-Df1cS-ks.js → page-footer-CVqmyulx.js} +15 -15
- package/dist/cdn/chunks/{page-section-mixin-BzgAU2sX.js → page-section-mixin-BHg-Wre9.js} +3 -3
- package/dist/cdn/chunks/{pagination-BcnkrWV_.js → pagination-BGZYq-eO.js} +6 -6
- package/dist/cdn/chunks/{password-field-CeIJm406.js → password-field-BIFfLAls.js} +7 -7
- package/dist/cdn/chunks/{popover-BIMt3aqW.js → popover-TCW20ibN.js} +9 -9
- package/dist/cdn/chunks/{progress-bar-C9CWhkse.js → progress-bar-C4bLuJBa.js} +24 -24
- package/dist/cdn/chunks/{progress-circle-CJL1aFbS.js → progress-circle-BePtt89f.js} +22 -22
- package/dist/cdn/chunks/{radio-button-DKo5kdLW.js → radio-button-CLiuwjA1.js} +3 -3
- package/dist/cdn/chunks/{radio-button-field-DPZajMnT.js → radio-button-field-BPva1mUv.js} +12 -12
- package/dist/cdn/chunks/{radio-button-group-BBZhU3bn.js → radio-button-group-Z5s4obz6.js} +3 -3
- package/dist/cdn/chunks/{render-marked-Bkoq5vNH.js → render-marked-C3ypoEZM.js} +1 -1
- package/dist/cdn/chunks/{reorder-handle-cell-CEW8Cg1r.js → reorder-handle-cell-BB9b4T_d.js} +4 -4
- package/dist/cdn/chunks/{reorder-handle-mixin-BkksqjmK.js → reorder-handle-mixin-DBjNe6Rl.js} +2 -2
- package/dist/cdn/chunks/{repeat-C5V9E9Ta.js → repeat-s95Ixbpx.js} +1 -1
- package/dist/cdn/chunks/{rich-text-DEFr_Niu.js → rich-text-DTxHo8E_.js} +3 -3
- package/dist/cdn/chunks/{row-header-mixin-BSORP0i7.js → row-header-mixin-BcwoEgu7.js} +2 -2
- package/dist/cdn/chunks/{scroll-fade-B7kZVxmh.js → scroll-fade-Dul0IfE1.js} +4 -4
- package/dist/cdn/chunks/{search-field-Dr0MLD_z.js → search-field-BeZN7S8J.js} +9 -9
- package/dist/cdn/chunks/{segmented-control-aOIkoklF.js → segmented-control-Dzu8xoqB.js} +33 -33
- package/dist/cdn/chunks/{shadow-resets-CRBumQjX.js → shadow-resets-Dlq8Oecv.js} +11 -7
- package/dist/cdn/chunks/{sheet-BCPE_pDl.js → sheet-DaQpfAep.js} +4 -4
- package/dist/cdn/chunks/{shell-ZCsqW56P.js → shell-DSNgonKU.js} +3 -3
- package/dist/cdn/chunks/{side-by-side-split-view-BWIyZmzo.js → side-by-side-split-view-DhGbcDrs.js} +7 -7
- package/dist/cdn/chunks/{sidebar-section-Di3mQROc.js → sidebar-section-BlJmPb9C.js} +8 -8
- package/dist/cdn/chunks/{simple-section-sOkNMsbz.js → simple-section-CYiTEFqN.js} +4 -4
- package/dist/cdn/chunks/{skip-link-mcskOuFr.js → skip-link-CReOb-Ci.js} +4 -4
- package/dist/cdn/chunks/{slider-CkPk4lBA.js → slider-DUEGol_V.js} +21 -21
- package/dist/cdn/chunks/slot-content-2qH2vEC_.js +22 -0
- package/dist/cdn/chunks/slotted-block-xNpJoXLz.js +14 -0
- package/dist/cdn/chunks/{spacer-RB_KBaTr.js → spacer-CPmyJDQq.js} +3 -3
- package/dist/cdn/chunks/{spacer-cell-V1UaaPcO.js → spacer-cell-DJEv0v6s.js} +4 -4
- package/dist/cdn/chunks/{split-button-BUEhYiI5.js → split-button-B3vfYAdy.js} +7 -7
- package/dist/cdn/chunks/{split-view-divider-Rmb9cG9K.js → split-view-divider-pSUpnEPX.js} +2 -2
- package/dist/cdn/chunks/{split-view-pane-DQRZ9tE0.js → split-view-pane-J1RVr_w1.js} +4 -4
- package/dist/cdn/chunks/{stacked-split-view-BaeQhWmd.js → stacked-split-view-B67fT-Ch.js} +7 -7
- package/dist/cdn/chunks/{static-html-CAczcbUD.js → static-html-BT4LOKbV.js} +1 -1
- package/dist/cdn/chunks/{status-bar-D3-IYqUp.js → status-bar-CGXqgNOf.js} +4 -4
- package/dist/cdn/chunks/{step-bar-BfNXoHds.js → step-bar-DdsA2Egs.js} +21 -21
- package/dist/cdn/chunks/{step-cell-BN2ZKsQ4.js → step-cell-DsTAgMCx.js} +5 -5
- package/dist/cdn/chunks/{stepper-DuPRMxBx.js → stepper-DPqXiLQr.js} +6 -6
- package/dist/cdn/chunks/{style-map-LFqo5rE_.js → style-map-B7yv7Y8k.js} +1 -1
- package/dist/cdn/chunks/{swatch-picker-BVKCFzpO.js → swatch-picker-D9QZmbNN.js} +21 -21
- package/dist/cdn/chunks/{switch-CgUZ0WlQ.js → switch-CE2glvZQ.js} +4 -4
- package/dist/cdn/chunks/{switch-field-B4c8-L61.js → switch-field-Dr2LovXc.js} +5 -5
- package/dist/cdn/chunks/{tab-bar-D-1g8fdF.js → tab-bar-DYZbToZB.js} +21 -21
- package/dist/cdn/chunks/{table-jrJ4EJpq.js → table-DoQMJbSg.js} +5 -5
- package/dist/cdn/chunks/{tag-JYwa5l-A.js → tag-DOX5nY-Z.js} +10 -10
- package/dist/cdn/chunks/{term-NyLmTWnF.js → term-CxGzPnhq.js} +58 -38
- package/dist/cdn/chunks/term.i18n-9qtxefIQ.js +6 -0
- package/dist/cdn/chunks/text-Dqe0uTK7.js +260 -0
- package/dist/cdn/chunks/{text-cell-BXLFcD_e.js → text-cell-ByGrujhK.js} +74 -62
- package/dist/cdn/chunks/{text-editor-rLc5H6kD.js → text-editor-DT9oWQCT.js} +10 -10
- package/dist/cdn/chunks/{text-field-B7M4VwCe.js → text-field-DKz5IRAU.js} +22 -22
- package/dist/cdn/chunks/{time-field-BtQRsvpR.js → time-field-Dh7nTwNc.js} +27 -27
- package/dist/cdn/chunks/{time-picker-BKLwibb9.js → time-picker-Bp-l4JfF.js} +54 -57
- package/dist/cdn/chunks/{title-DLD3RW7l.js → title-CdIWXNtc.js} +113 -98
- package/dist/cdn/chunks/{title-cell-BCUBuKIO.js → title-cell-DNbP8l_x.js} +83 -74
- package/dist/cdn/chunks/{toggle-button-Etx8hKQS.js → toggle-button-CPMxB3gN.js} +25 -25
- package/dist/cdn/chunks/{toggle-button-group-Ph1kcTqj.js → toggle-button-group-ERWVyRX5.js} +2 -2
- package/dist/cdn/chunks/{token-BQtumlDT.js → token-CG8dR3EH.js} +13 -13
- package/dist/cdn/chunks/{token-field-BrV2RZHi.js → token-field-B8wqHKan.js} +21 -21
- package/dist/cdn/chunks/{toolbar-w_2rxcNu.js → toolbar-CiZoecHm.js} +12 -12
- package/dist/cdn/chunks/{toolbar-item-x-y_AxHu.js → toolbar-item-xJEewchW.js} +3 -3
- package/dist/cdn/chunks/{toolbar-title-g47zMdG2.js → toolbar-title-C08aG67Y.js} +4 -4
- package/dist/cdn/chunks/{toolbar.styles-EP0gu8kg.js → toolbar.styles-DmAHodW4.js} +3 -3
- package/dist/cdn/chunks/{tooltip-D47hF_iD.js → tooltip-660R32cn.js} +55 -47
- package/dist/cdn/chunks/{top-navigation-bar-DO7JsQVs.js → top-navigation-bar-B1HFShH8.js} +18 -18
- package/dist/cdn/chunks/{top-title-bar-CVEOoXhu.js → top-title-bar-BLZZd0Iu.js} +14 -14
- package/dist/cdn/chunks/{translations-eWWV6weF.js → translations-CF08wvn-.js} +1 -1
- package/dist/cdn/chunks/{two-thirds-one-third-section-x3dadNwz.js → two-thirds-one-third-section-Dqz7UoSH.js} +4 -4
- package/dist/cdn/chunks/{validation-list-krcQHzP3.js → validation-list-D-bzOl5H.js} +10 -10
- package/dist/cdn/chunks/{visibility-mixin-CXBa-fVi.js → visibility-mixin-X9d6wHvR.js} +4 -4
- package/dist/cdn/chunks/{visually-hidden-Cd1_FE1J.js → visually-hidden-Cew5_ldu.js} +2 -2
- package/dist/cdn/chunks/{window-JbrLuRjR.js → window-DSgA26_c.js} +4 -4
- package/dist/cdn/chunks/{with-translations-DhRk5rH-.js → with-translations-Boc5Daaj.js} +3 -3
- package/dist/components/actions/button-bar/button-bar.js +2 -2
- package/dist/components/actions/button-bar/button-bar.js.map +1 -1
- package/dist/components/actions/menu/menu.d.ts +17 -4
- package/dist/components/actions/menu/menu.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.js +50 -6
- package/dist/components/actions/menu/menu.js.map +1 -1
- package/dist/components/actions/menu/menu.styles.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.styles.js +16 -1
- package/dist/components/actions/menu/menu.styles.js.map +1 -1
- package/dist/components/content/accordion/accordion-item.d.ts +38 -0
- package/dist/components/content/accordion/accordion-item.d.ts.map +1 -0
- package/dist/components/content/accordion/accordion-item.js +62 -0
- package/dist/components/content/accordion/accordion-item.js.map +1 -0
- package/dist/components/content/accordion/accordion-item.styles.d.ts +2 -0
- package/dist/components/content/accordion/accordion-item.styles.d.ts.map +1 -0
- package/dist/components/content/accordion/accordion-item.styles.js +196 -0
- package/dist/components/content/accordion/accordion-item.styles.js.map +1 -0
- package/dist/components/content/accordion/accordion-item.template.d.ts +4 -0
- package/dist/components/content/accordion/accordion-item.template.d.ts.map +1 -0
- package/dist/components/content/accordion/accordion-item.template.js +24 -0
- package/dist/components/content/accordion/accordion-item.template.js.map +1 -0
- package/dist/components/content/accordion/accordion.d.ts +50 -0
- package/dist/components/content/accordion/accordion.d.ts.map +1 -0
- package/dist/components/content/accordion/accordion.js +96 -0
- package/dist/components/content/accordion/accordion.js.map +1 -0
- package/dist/components/content/accordion/accordion.styles.d.ts +2 -0
- package/dist/components/content/accordion/accordion.styles.d.ts.map +1 -0
- package/dist/components/content/accordion/accordion.styles.js +43 -0
- package/dist/components/content/accordion/accordion.styles.js.map +1 -0
- package/dist/components/content/accordion/accordion.template.d.ts +4 -0
- package/dist/components/content/accordion/accordion.template.d.ts.map +1 -0
- package/dist/components/content/accordion/accordion.template.js +9 -0
- package/dist/components/content/accordion/accordion.template.js.map +1 -0
- package/dist/components/content/admonition/admonition.d.ts +76 -0
- package/dist/components/content/admonition/admonition.d.ts.map +1 -0
- package/dist/components/content/admonition/admonition.js +129 -0
- package/dist/components/content/admonition/admonition.js.map +1 -0
- package/dist/components/content/admonition/admonition.styles.d.ts +2 -0
- package/dist/components/content/admonition/admonition.styles.d.ts.map +1 -0
- package/dist/components/content/admonition/admonition.styles.js +269 -0
- package/dist/components/content/admonition/admonition.styles.js.map +1 -0
- package/dist/components/content/admonition/admonition.template.d.ts +4 -0
- package/dist/components/content/admonition/admonition.template.d.ts.map +1 -0
- package/dist/components/content/admonition/admonition.template.js +63 -0
- package/dist/components/content/admonition/admonition.template.js.map +1 -0
- 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 +36 -1
- package/dist/components/content/code-viewer/code-viewer.js.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.template.d.ts.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.template.js +2 -0
- package/dist/components/content/code-viewer/code-viewer.template.js.map +1 -1
- package/dist/components/content/identity/identity.d.ts +17 -10
- package/dist/components/content/identity/identity.d.ts.map +1 -1
- package/dist/components/content/identity/identity.js +33 -19
- 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 +5 -1
- package/dist/components/content/identity/identity.styles.js.map +1 -1
- package/dist/components/content/identity/identity.template.d.ts +1 -1
- package/dist/components/content/identity/identity.template.d.ts.map +1 -1
- package/dist/components/content/identity/identity.template.js +11 -5
- package/dist/components/content/identity/identity.template.js.map +1 -1
- package/dist/components/content/rich-text/rich-text.d.ts +14 -1
- package/dist/components/content/rich-text/rich-text.d.ts.map +1 -1
- package/dist/components/content/rich-text/rich-text.js +14 -1
- package/dist/components/content/rich-text/rich-text.js.map +1 -1
- package/dist/components/content/term/term.d.ts +12 -1
- package/dist/components/content/term/term.d.ts.map +1 -1
- package/dist/components/content/term/term.i18n.d.ts +1 -0
- package/dist/components/content/term/term.i18n.d.ts.map +1 -1
- package/dist/components/content/term/term.i18n.js +2 -0
- package/dist/components/content/term/term.i18n.js.map +1 -1
- package/dist/components/content/term/term.js +23 -1
- package/dist/components/content/term/term.js.map +1 -1
- package/dist/components/content/term/term.template.d.ts.map +1 -1
- package/dist/components/content/term/term.template.js +33 -12
- package/dist/components/content/term/term.template.js.map +1 -1
- package/dist/components/content/text/text.d.ts +15 -2
- package/dist/components/content/text/text.d.ts.map +1 -1
- package/dist/components/content/text/text.js +19 -3
- package/dist/components/content/text/text.js.map +1 -1
- package/dist/components/content/text/text.styles.d.ts.map +1 -1
- package/dist/components/content/text/text.styles.js +7 -155
- package/dist/components/content/text/text.styles.js.map +1 -1
- package/dist/components/content/text/text.template.d.ts +3 -2
- package/dist/components/content/text/text.template.d.ts.map +1 -1
- package/dist/components/content/text/text.template.js +3 -4
- package/dist/components/content/text/text.template.js.map +1 -1
- package/dist/components/content/title/title.d.ts +22 -7
- package/dist/components/content/title/title.d.ts.map +1 -1
- package/dist/components/content/title/title.js +43 -19
- package/dist/components/content/title/title.js.map +1 -1
- package/dist/components/content/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/content/tooltip/tooltip.js +16 -10
- package/dist/components/content/tooltip/tooltip.js.map +1 -1
- package/dist/components/content/tooltip/tooltip.styles.d.ts.map +1 -1
- package/dist/components/content/tooltip/tooltip.styles.js +4 -0
- package/dist/components/content/tooltip/tooltip.styles.js.map +1 -1
- package/dist/components/forms/form/form.d.ts +2 -2
- package/dist/components/forms/form/form.d.ts.map +1 -1
- package/dist/components/forms/form/form.js +2 -2
- package/dist/components/forms/form/form.js.map +1 -1
- package/dist/components/forms/form-section/form-section.d.ts +2 -2
- package/dist/components/forms/form-section/form-section.d.ts.map +1 -1
- package/dist/components/forms/form-section/form-section.js +2 -2
- package/dist/components/forms/form-section/form-section.js.map +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/inputs/date-field/date-field.d.ts +14 -0
- package/dist/components/inputs/date-field/date-field.d.ts.map +1 -1
- package/dist/components/inputs/date-field/date-field.js +34 -1
- package/dist/components/inputs/date-field/date-field.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 +1 -0
- package/dist/components/inputs/date-field/date-field.styles.js.map +1 -1
- package/dist/components/inputs/time-picker/time-picker.d.ts.map +1 -1
- package/dist/components/inputs/time-picker/time-picker.js +2 -8
- package/dist/components/inputs/time-picker/time-picker.js.map +1 -1
- package/dist/components/layout/box/box.styles.js +7 -7
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.d.ts +24 -13
- 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 +40 -31
- 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 +5 -1
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.styles.js.map +1 -1
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.template.d.ts +1 -1
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.template.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.template.js +15 -8
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.template.js.map +1 -1
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.d.ts +23 -11
- 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 +39 -29
- 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 +5 -1
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.styles.js.map +1 -1
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.template.d.ts +1 -1
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.template.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.template.js +15 -16
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.template.js.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.d.ts.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.js +2 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.js.map +1 -1
- package/dist/components/navigation/link/link.d.ts +60 -1
- package/dist/components/navigation/link/link.d.ts.map +1 -1
- package/dist/components/navigation/link/link.js +145 -2
- package/dist/components/navigation/link/link.js.map +1 -1
- package/dist/components/navigation/link/link.styles.d.ts.map +1 -1
- package/dist/components/navigation/link/link.styles.js +4 -0
- package/dist/components/navigation/link/link.styles.js.map +1 -1
- package/dist/components/navigation/link/link.template.d.ts +1 -0
- package/dist/components/navigation/link/link.template.d.ts.map +1 -1
- package/dist/components/navigation/link/link.template.js +4 -1
- package/dist/components/navigation/link/link.template.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 +25 -24
- package/dist/components/status-and-feedback/banner/banner.styles.js.map +1 -1
- package/dist/components/status-and-feedback/banner/banner.template.js +1 -1
- package/dist/css/global-open-font.css +2 -0
- package/dist/css/global.css +2 -0
- package/dist/css/link.css +93 -0
- package/dist/css/rich-text.css +200 -2
- package/dist/css/text.css +159 -0
- package/dist/css/themes/oranje.css +1 -0
- package/dist/css/themes/robijnrood.css +1 -0
- package/dist/css/themes/rood.css +1 -0
- package/dist/css/themes.css +3 -0
- package/dist/css/title.css +10 -10
- package/dist/css/variables.css +21 -0
- package/dist/nldd.min.js +5057 -4592
- 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 +48 -10
- package/dist/types/vue.d.ts +54 -10
- package/dist/utilities/autoloader.generated.d.ts.map +1 -1
- package/dist/utilities/autoloader.generated.js +3 -0
- package/dist/utilities/autoloader.generated.js.map +1 -1
- package/dist/utilities/css-time.d.ts +4 -0
- package/dist/utilities/css-time.d.ts.map +1 -0
- package/dist/utilities/css-time.js +10 -0
- package/dist/utilities/css-time.js.map +1 -0
- package/dist/utilities/custom-element.d.ts +10 -0
- package/dist/utilities/custom-element.d.ts.map +1 -1
- package/dist/utilities/custom-element.js +11 -0
- package/dist/utilities/custom-element.js.map +1 -1
- package/dist/utilities/dev-checks.d.ts +8 -0
- package/dist/utilities/dev-checks.d.ts.map +1 -1
- package/dist/utilities/dev-checks.js +36 -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 +71 -2
- package/dist/utilities/dev-rules.generated.js.map +1 -1
- package/dist/utilities/slot-content.d.ts +18 -7
- package/dist/utilities/slot-content.d.ts.map +1 -1
- package/dist/utilities/slot-content.js +25 -4
- package/dist/utilities/slot-content.js.map +1 -1
- package/dist/utilities/slotted-block.d.ts +20 -0
- package/dist/utilities/slotted-block.d.ts.map +1 -0
- package/dist/utilities/slotted-block.js +30 -0
- package/dist/utilities/slotted-block.js.map +1 -0
- package/lint/data.generated.json +1 -1
- package/lint/fix.js +43 -2
- package/lint/frontends.js +149 -15
- package/lint/linter.js +3 -2
- package/lint/main.js +17 -3
- package/lint/project.js +2 -2
- package/lint/rule.schema.json +2 -1
- package/package.json +19 -2
- package/dist/cdn/chunks/slot-content-BLuPqVXw.js +0 -13
- package/dist/cdn/chunks/term.i18n-DVEJeOb6.js +0 -3
- package/dist/cdn/chunks/text-gy-gkfSS.js +0 -406
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"term.template.d.ts","sourceRoot":"","sources":["../../../../src/components/content/term/term.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C,wBAAgB,YAAY,CAAC,SAAS,EAAE,QAAQ,GAAG,cAAc,
|
|
1
|
+
{"version":3,"file":"term.template.d.ts","sourceRoot":"","sources":["../../../../src/components/content/term/term.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C,wBAAgB,YAAY,CAAC,SAAS,EAAE,QAAQ,GAAG,cAAc,CA2EhE"}
|
|
@@ -9,27 +9,48 @@ export function termTemplate(component) {
|
|
|
9
9
|
size="sm"
|
|
10
10
|
color="secondary"
|
|
11
11
|
>
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
<p>
|
|
13
|
+
${component._t('components.term.source-capitalize')}:
|
|
14
|
+
${component.sourceHref
|
|
14
15
|
? html `<nldd-link href=${component.sourceHref}>${component.source}</nldd-link>`
|
|
15
16
|
: component.source}
|
|
17
|
+
</p>
|
|
16
18
|
</nldd-text>
|
|
17
19
|
`
|
|
18
20
|
: nothing;
|
|
21
|
+
const definition = html `
|
|
22
|
+
<nldd-text text="${component.definition}"></nldd-text>
|
|
23
|
+
${source}
|
|
24
|
+
`;
|
|
25
|
+
// On sm the popover is a bottom sheet over the sentence, so it names the
|
|
26
|
+
// term itself: as a title that goes into the bar once a long definition
|
|
27
|
+
// scrolls, with a button to close it.
|
|
28
|
+
const content = component._isSm
|
|
29
|
+
? html `
|
|
30
|
+
<nldd-page sticky-header>
|
|
31
|
+
<nldd-top-title-bar
|
|
32
|
+
slot="header"
|
|
33
|
+
text=${component._termText}
|
|
34
|
+
dismiss-text=${component._t('components.term.sheet-dismiss-action')}
|
|
35
|
+
collapse-anchor="term-title"
|
|
36
|
+
></nldd-top-title-bar>
|
|
37
|
+
<nldd-container padding="16">
|
|
38
|
+
<nldd-title
|
|
39
|
+
id="term-title"
|
|
40
|
+
size="display-4"
|
|
41
|
+
text=${component._termText}
|
|
42
|
+
></nldd-title>
|
|
43
|
+
<nldd-spacer size="8"></nldd-spacer>
|
|
44
|
+
${definition}
|
|
45
|
+
</nldd-container>
|
|
46
|
+
</nldd-page>
|
|
47
|
+
`
|
|
48
|
+
: html `<nldd-container padding="16">${definition}</nldd-container>`;
|
|
19
49
|
const ownPopover = component.definition && !component.popovertarget
|
|
20
50
|
? html `
|
|
21
51
|
<nldd-popover
|
|
22
52
|
accessible-label=${component._termText || nothing}
|
|
23
|
-
>
|
|
24
|
-
<nldd-container
|
|
25
|
-
padding="16"
|
|
26
|
-
>
|
|
27
|
-
<nldd-text>
|
|
28
|
-
${component.definition}
|
|
29
|
-
</nldd-text>
|
|
30
|
-
${source}
|
|
31
|
-
</nldd-container>
|
|
32
|
-
</nldd-popover>
|
|
53
|
+
>${content}</nldd-popover>
|
|
33
54
|
`
|
|
34
55
|
: nothing;
|
|
35
56
|
// A span, not a button: a button lays out as inline-block, so a term of
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"term.template.js","sourceRoot":"","sources":["../../../../src/components/content/term/term.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAC;AAGzD,MAAM,UAAU,YAAY,CAAC,SAAmB;IAC/C,qEAAqE;IACrE,oCAAoC;IACpC,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM;QAC9B,CAAC,CAAC,IAAI,CAAA
|
|
1
|
+
{"version":3,"file":"term.template.js","sourceRoot":"","sources":["../../../../src/components/content/term/term.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAC;AAGzD,MAAM,UAAU,YAAY,CAAC,SAAmB;IAC/C,qEAAqE;IACrE,oCAAoC;IACpC,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM;QAC9B,CAAC,CAAC,IAAI,CAAA;;;;;;;OAOD,SAAS,CAAC,EAAE,CAAC,mCAAmC,CAAC;OAC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iB,EAAE;;IAEhD,UAAU;EACZ,CAAC;AACH,CAAC"}
|
|
@@ -9,6 +9,14 @@
|
|
|
9
9
|
* — it only names what the scale already has. The three axes are the same three
|
|
10
10
|
* the tokens carry: size, weight and line height.
|
|
11
11
|
*
|
|
12
|
+
* Plain text goes in `text`, and the component draws a `<p>` for it. Text with
|
|
13
|
+
* a link, a `<strong>` or a tag goes in the slot, in a `<p>` of your own, or a
|
|
14
|
+
* `<span>` where the text is no paragraph, such as a label or a number. What
|
|
15
|
+
* is in the slot is in the HTML before any script runs; `text` is drawn in the
|
|
16
|
+
* browser. On a page of a website that has to read without script, use the
|
|
17
|
+
* slot. The element in the slot takes the text style of the component: a font,
|
|
18
|
+
* margin or other style the page sets on it does not apply.
|
|
19
|
+
*
|
|
12
20
|
* Not for headings, which is `nldd-title`, and not for a block of prose with its
|
|
13
21
|
* own rhythm, spacing and media widths, which is `nldd-rich-text`. This is one
|
|
14
22
|
* run of text and nothing around it.
|
|
@@ -41,10 +49,12 @@
|
|
|
41
49
|
* @attr {string} color - Text color: 'content' (the default) | 'secondary' | 'accent' | 'success' | 'warning' | 'critical'. Each follows the surface the text sits on, through the `--context-content-*` it passes on; an area of your own that sets `color` sets `--context-content-color` too.
|
|
42
50
|
* @attr {string} horizontal-alignment - Alignment of the text within the block: 'left' | 'center' | 'right' (default: 'left'). Aligns the words; `horizontal-alignment` on nldd-container moves the box.
|
|
43
51
|
*
|
|
44
|
-
* @
|
|
45
|
-
* @
|
|
52
|
+
* @attr {string} text - The text, when it is plain text. The component draws it as a `<p>`. Content in the slot wins.
|
|
53
|
+
* @slot - Text that is more than plain text, in a `<p>` of your own, or a `<span>` for text that is no paragraph (a label, a number). Inline elements in it look as they do in nldd-rich-text: `<strong>` and `<b>` take the bold weight from the scale, `<em>` and `<i>` are italic, `<a>` is an underlined link, `<code>` sits on a tinted surface in the monospace font, `<mark>` is highlighted, `<q>` is quoted in italics, and an element with `data-mention` is a mention (`<a href="…" data-mention>` as the tinted token, `<span data-mention>` without the tint; write the name without the `@`). Components such as `nldd-tag` are left alone. That styling comes from a global stylesheet, `dist/css/text.css` or `global.css`, which includes it: a shadow root cannot reach inside a slotted element.
|
|
54
|
+
* @accepts p, span, strong, b, em, i, a, code, mark, q
|
|
46
55
|
*/
|
|
47
56
|
import { LitElement, type PropertyValues } from 'lit';
|
|
57
|
+
import { SlotContent } from '../../../utilities/slot-content.js';
|
|
48
58
|
type Size = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'display-6' | 'display-5' | 'display-4' | 'display-3' | 'display-2' | 'display-1';
|
|
49
59
|
type Weight = 'regular' | 'medium' | 'bold';
|
|
50
60
|
type LineHeight = 'flat' | 'tight' | 'snug' | 'loose';
|
|
@@ -52,7 +62,10 @@ type Color = 'content' | 'secondary' | 'accent' | 'success' | 'warning' | 'criti
|
|
|
52
62
|
type HorizontalAlignment = 'left' | 'center' | 'right';
|
|
53
63
|
export declare class NLDDText extends LitElement {
|
|
54
64
|
static styles: import("lit").CSSResult;
|
|
65
|
+
text: string;
|
|
55
66
|
size: Size;
|
|
67
|
+
/** @internal Whether the slot holds something, which wins over `text`. */
|
|
68
|
+
_textSlot: SlotContent;
|
|
56
69
|
smCustomSize: string;
|
|
57
70
|
mdCustomSize: string;
|
|
58
71
|
lgCustomSize: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../../src/components/content/text/text.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../../src/components/content/text/text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAEH,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAOjE,KAAK,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;AAClI,KAAK,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;AAC5C,KAAK,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;AACtD,KAAK,KAAK,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;AACrF,KAAK,mBAAmB,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEvD,qBACa,QAAS,SAAQ,UAAU;IACvC,OAAgB,MAAM,0BAAc;IAGpC,IAAI,SAAM;IAGV,IAAI,EAAE,IAAI,CAAQ;IAElB,0EAA0E;IAC1E,SAAS,cAAyB;IAGlC,YAAY,SAAM;IAGlB,YAAY,SAAM;IAGlB,YAAY,SAAM;IAGlB,MAAM,EAAE,MAAM,CAAa;IAO3B,UAAU,EAAE,UAAU,CAAU;IAGhC,KAAK,EAAE,KAAK,CAAa;IAOzB,mBAAmB,EAAE,mBAAmB,CAAU;IAElD,+EAA+E;IAC/E,OAAO,CAAC,YAAY,CAA2C;IAEtD,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAMzC,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAQtC,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,WAAW,EAAE,QAAQ,CAAC;KACtB;CACD"}
|
|
@@ -9,6 +9,14 @@
|
|
|
9
9
|
* — it only names what the scale already has. The three axes are the same three
|
|
10
10
|
* the tokens carry: size, weight and line height.
|
|
11
11
|
*
|
|
12
|
+
* Plain text goes in `text`, and the component draws a `<p>` for it. Text with
|
|
13
|
+
* a link, a `<strong>` or a tag goes in the slot, in a `<p>` of your own, or a
|
|
14
|
+
* `<span>` where the text is no paragraph, such as a label or a number. What
|
|
15
|
+
* is in the slot is in the HTML before any script runs; `text` is drawn in the
|
|
16
|
+
* browser. On a page of a website that has to read without script, use the
|
|
17
|
+
* slot. The element in the slot takes the text style of the component: a font,
|
|
18
|
+
* margin or other style the page sets on it does not apply.
|
|
19
|
+
*
|
|
12
20
|
* Not for headings, which is `nldd-title`, and not for a block of prose with its
|
|
13
21
|
* own rhythm, spacing and media widths, which is `nldd-rich-text`. This is one
|
|
14
22
|
* run of text and nothing around it.
|
|
@@ -41,8 +49,9 @@
|
|
|
41
49
|
* @attr {string} color - Text color: 'content' (the default) | 'secondary' | 'accent' | 'success' | 'warning' | 'critical'. Each follows the surface the text sits on, through the `--context-content-*` it passes on; an area of your own that sets `color` sets `--context-content-color` too.
|
|
42
50
|
* @attr {string} horizontal-alignment - Alignment of the text within the block: 'left' | 'center' | 'right' (default: 'left'). Aligns the words; `horizontal-alignment` on nldd-container moves the box.
|
|
43
51
|
*
|
|
44
|
-
* @
|
|
45
|
-
* @
|
|
52
|
+
* @attr {string} text - The text, when it is plain text. The component draws it as a `<p>`. Content in the slot wins.
|
|
53
|
+
* @slot - Text that is more than plain text, in a `<p>` of your own, or a `<span>` for text that is no paragraph (a label, a number). Inline elements in it look as they do in nldd-rich-text: `<strong>` and `<b>` take the bold weight from the scale, `<em>` and `<i>` are italic, `<a>` is an underlined link, `<code>` sits on a tinted surface in the monospace font, `<mark>` is highlighted, `<q>` is quoted in italics, and an element with `data-mention` is a mention (`<a href="…" data-mention>` as the tinted token, `<span data-mention>` without the tint; write the name without the `@`). Components such as `nldd-tag` are left alone. That styling comes from a global stylesheet, `dist/css/text.css` or `global.css`, which includes it: a shadow root cannot reach inside a slotted element.
|
|
54
|
+
* @accepts p, span, strong, b, em, i, a, code, mark, q
|
|
46
55
|
*/
|
|
47
56
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
48
57
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -52,6 +61,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
52
61
|
};
|
|
53
62
|
import { LitElement } from 'lit';
|
|
54
63
|
import { property } from 'lit/decorators.js';
|
|
64
|
+
import { SlotContent } from '../../../utilities/slot-content.js';
|
|
55
65
|
import { customElement } from '../../../utilities/custom-element.js';
|
|
56
66
|
import { applyCustomFontSizes, checkCustomFontSizeFloor, DISPLAY_1_FONT_SIZE } from '../../../utilities/custom-font-size.js';
|
|
57
67
|
import { reflectNonDefault } from '../../../utilities/reflect-non-default.js';
|
|
@@ -60,7 +70,10 @@ import { template } from './text.template.js';
|
|
|
60
70
|
let NLDDText = class NLDDText extends LitElement {
|
|
61
71
|
constructor() {
|
|
62
72
|
super(...arguments);
|
|
73
|
+
this.text = '';
|
|
63
74
|
this.size = 'md';
|
|
75
|
+
/** @internal Whether the slot holds something, which wins over `text`. */
|
|
76
|
+
this._textSlot = new SlotContent(this);
|
|
64
77
|
this.smCustomSize = '';
|
|
65
78
|
this.mdCustomSize = '';
|
|
66
79
|
this.lgCustomSize = '';
|
|
@@ -86,10 +99,13 @@ let NLDDText = class NLDDText extends LitElement {
|
|
|
86
99
|
}
|
|
87
100
|
}
|
|
88
101
|
render() {
|
|
89
|
-
return template();
|
|
102
|
+
return template.call(this);
|
|
90
103
|
}
|
|
91
104
|
};
|
|
92
105
|
NLDDText.styles = textStyles;
|
|
106
|
+
__decorate([
|
|
107
|
+
property({ reflect: true, converter: reflectNonDefault('') })
|
|
108
|
+
], NLDDText.prototype, "text", void 0);
|
|
93
109
|
__decorate([
|
|
94
110
|
property({ reflect: true, converter: reflectNonDefault('md') })
|
|
95
111
|
], NLDDText.prototype, "size", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.js","sourceRoot":"","sources":["../../../../src/components/content/text/text.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"text.js","sour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EAAE,iBAAiB,CAAS,EAAE,CAAC,EAAE,CAAC;8CACjF;AAGlB;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,gBAAgB,EAAE,SAAS,EAAE,iBAAiB,CAAS,EAAE,CAAC,EAAE,CAAC;8CACjF;AAGlB;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,CAAS,SAAS,CAAC,EAAE,CAAC;wCAClD;AAO3B;IALC,QAAQ,CAAC;QACT,OAAO,EAAE,IAAI;QACb,SAAS,EAAE,aAAa;QACxB,SAAS,EAAE,iBAAiB,CAAa,MAAM,CAAC;KAChD,CAAC;4CAC8B;AAGhC;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,CAAQ,SAAS,CAAC,EAAE,CAAC;uCACnD;AAOzB;IALC,QAAQ,CAAC;QACT,OAAO,EAAE,IAAI;QACb,SAAS,EAAE,sBAAsB;QACjC,SAAS,EAAE,iBAAiB,CAAsB,MAAM,CAAC;KACzD,CAAC;qDACgD;AAvCtC,QAAQ;IADpB,aAAa,CAAC,WAAW,CAAC;GACd,QAAQ,CA6DpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/content/text/text.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"text.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/content/text/text.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,KAAK,CAAC;AAqDrD,eAAO,MAAM,UAAU,WAsJtB,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { css, unsafeCSS } from 'lit';
|
|
2
2
|
import { queryBreakpoints } from '../../../assets/styles/breakpoints.js';
|
|
3
|
+
import { slottedBlockReset } from '../../../assets/styles/shadow-resets.js';
|
|
3
4
|
const smMax = unsafeCSS(queryBreakpoints.smMax);
|
|
4
5
|
const mdMin = unsafeCSS(queryBreakpoints.mdMin);
|
|
5
6
|
const mdMax = unsafeCSS(queryBreakpoints.mdMax);
|
|
@@ -66,31 +67,6 @@ export const textStyles = css `
|
|
|
66
67
|
--_text-lg-custom-font: var(--primitives-font-weight-display-bold) max(var(--_text-lg-custom-size), var(--primitives-font-size-1000)) / var(--primitives-line-height-flat) var(--primitives-font-family-display);
|
|
67
68
|
--_text-color: var(--context-content-color);
|
|
68
69
|
--_text-align: left;
|
|
69
|
-
--_text-link-color: var(--context-link-color);
|
|
70
|
-
--_text-link-is-hovered-color: var(--context-link-is-hovered-color);
|
|
71
|
-
--_text-link-is-active-color: var(--context-link-is-active-color);
|
|
72
|
-
--_text-link-underline-offset: var(--primitives-space-2);
|
|
73
|
-
--_text-link-corner-radius: var(--primitives-corner-radius-xxs);
|
|
74
|
-
--_text-mention-color: var(--semantics-mentions-content-color);
|
|
75
|
-
--_text-mention-icon-size: 0.95em;
|
|
76
|
-
--_text-mention-inline-padding: 0.3em;
|
|
77
|
-
--_text-mention-corner-radius: var(--primitives-corner-radius-sm);
|
|
78
|
-
--_text-mention-border-width: var(--semantics-surfaces-highlight-border-width);
|
|
79
|
-
--_text-mention-border-color: var(--semantics-mentions-highlight-border-color);
|
|
80
|
-
--_text-mention-background-color: var(--semantics-mentions-background-color);
|
|
81
|
-
--_text-mention-is-hovered-background-color: var(--semantics-mentions-is-hovered-background-color);
|
|
82
|
-
--_text-mention-is-active-background-color: var(--semantics-mentions-is-active-background-color);
|
|
83
|
-
--_text-code-padding: var(--primitives-space-2) var(--primitives-space-4);
|
|
84
|
-
--_text-code-corner-radius: var(--semantics-controls-xs-corner-radius);
|
|
85
|
-
--_text-code-border-width: var(--semantics-surfaces-highlight-border-width);
|
|
86
|
-
--_text-code-border-color: var(--semantics-surfaces-tinted-highlight-border-color);
|
|
87
|
-
--_text-code-background-color: var(--semantics-surfaces-tinted-background-color);
|
|
88
|
-
--_text-code-font-family: var(--primitives-font-family-monospace);
|
|
89
|
-
--_text-code-font-size: var(--semantics-code-inline-font-size);
|
|
90
|
-
--_text-mark-padding: var(--primitives-space-1) var(--primitives-space-2);
|
|
91
|
-
--_text-mark-corner-radius: var(--semantics-controls-xs-corner-radius);
|
|
92
|
-
--_text-mark-background-color: var(--semantics-content-mark-background-color);
|
|
93
|
-
--_text-mark-color: var(--semantics-content-mark-color);
|
|
94
70
|
|
|
95
71
|
display: block;
|
|
96
72
|
max-width: var(--_text-max-width);
|
|
@@ -160,140 +136,16 @@ export const textStyles = css `
|
|
|
160
136
|
--_text-font-weight: var(--primitives-font-weight-body-bold);
|
|
161
137
|
}
|
|
162
138
|
|
|
163
|
-
/* Not the browser's "bolder", which is relative: from medium it lands on 700
|
|
164
|
-
and from bold it asks for a weight this font does not have, so the browser
|
|
165
|
-
thickens the glyphs itself. */
|
|
166
|
-
::slotted(strong),
|
|
167
|
-
::slotted(b) {
|
|
168
|
-
color: inherit;
|
|
169
|
-
font-weight: var(--primitives-font-weight-body-bold);
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
:host([size^="display-"]) ::slotted(strong),
|
|
173
|
-
:host([size^="display-"]) ::slotted(b) {
|
|
174
|
-
font-weight: inherit;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
/* # Inline elements */
|
|
179
|
-
|
|
180
|
-
::slotted(em),
|
|
181
|
-
::slotted(i) {
|
|
182
|
-
color: inherit;
|
|
183
|
-
font-style: italic;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
::slotted(a) {
|
|
187
|
-
border-radius: var(--_text-link-corner-radius);
|
|
188
|
-
--context-content-color: var(--_text-link-color);
|
|
189
|
-
color: var(--_text-link-color);
|
|
190
|
-
text-decoration: underline;
|
|
191
|
-
text-underline-offset: var(--_text-link-underline-offset);
|
|
192
|
-
cursor: pointer;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
::slotted(a:hover) {
|
|
196
|
-
--context-content-color: var(--_text-link-is-hovered-color);
|
|
197
|
-
color: var(--_text-link-is-hovered-color);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
::slotted(a:active) {
|
|
201
|
-
--context-content-color: var(--_text-link-is-active-color);
|
|
202
|
-
color: var(--_text-link-is-active-color);
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
::slotted(:focus-visible) {
|
|
206
|
-
outline: var(--semantics-focus-ring-outline);
|
|
207
|
-
outline-offset: var(--semantics-focus-ring-outline-offset);
|
|
208
|
-
box-shadow: var(--semantics-focus-ring-box-shadow);
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
::slotted(:focus:not(:focus-visible)) {
|
|
212
|
-
outline: none;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
::slotted([data-mention]) {
|
|
216
|
-
--context-content-color: var(--_text-mention-color);
|
|
217
|
-
color: var(--_text-mention-color);
|
|
218
|
-
font-weight: var(--primitives-font-weight-body-bold);
|
|
219
|
-
white-space: nowrap;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
::slotted([data-mention])::before {
|
|
223
|
-
content: '';
|
|
224
|
-
display: inline-block;
|
|
225
|
-
margin-inline-end: 0.1em;
|
|
226
|
-
background-color: currentColor;
|
|
227
|
-
width: var(--_text-mention-icon-size);
|
|
228
|
-
height: var(--_text-mention-icon-size);
|
|
229
|
-
vertical-align: -0.16em;
|
|
230
|
-
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16 12c0 2.73 1.3 3.5 2 3.5s2-.77 2-3.5a8 8 0 1 0-5.93 7.73l.52 1.93A10 10 0 1 1 22 12c0 3.27-1.7 5.5-4 5.5-1.36 0-2.5-.78-3.22-2.08A4.3 4.3 0 0 1 11.5 17C9 17 7 14.76 7 12s2-5 4.5-5c.92 0 1.78.31 2.5.84V7h2zm-4.5-3C10.3 9 9 10.14 9 12s1.31 3 2.5 3 2.5-1.14 2.5-3-1.31-3-2.5-3'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
231
|
-
|
|
232
|
-
@media (forced-colors: active) {
|
|
233
|
-
forced-color-adjust: none;
|
|
234
|
-
background-color: CanvasText;
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
::slotted(a[data-mention]) {
|
|
239
|
-
padding-block: max(0em, (1lh - 1.2em) / 2);
|
|
240
|
-
padding-inline: max(0em, (max(1.2em, 1lh) - var(--_text-mention-icon-size)) / 2) var(--_text-mention-inline-padding);
|
|
241
|
-
border-radius: var(--_text-mention-corner-radius);
|
|
242
|
-
box-shadow: inset 0 0 0 var(--_text-mention-border-width) var(--_text-mention-border-color);
|
|
243
|
-
background-color: var(--_text-mention-background-color);
|
|
244
|
-
--context-content-color: var(--_text-mention-color);
|
|
245
|
-
color: var(--_text-mention-color);
|
|
246
|
-
text-decoration: none;
|
|
247
|
-
cursor: default;
|
|
248
|
-
-webkit-box-decoration-break: clone;
|
|
249
|
-
box-decoration-break: clone;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
::slotted(a[data-mention]:hover) {
|
|
253
|
-
background-color: var(--_text-mention-is-hovered-background-color);
|
|
254
|
-
--context-content-color: var(--_text-mention-color);
|
|
255
|
-
color: var(--_text-mention-color);
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
::slotted(a[data-mention]:active) {
|
|
259
|
-
background-color: var(--_text-mention-is-active-background-color);
|
|
260
|
-
--context-content-color: var(--_text-mention-color);
|
|
261
|
-
color: var(--_text-mention-color);
|
|
262
|
-
}
|
|
263
139
|
|
|
264
|
-
|
|
265
|
-
::slotted(a[data-mention])::before {
|
|
266
|
-
background-color: LinkText;
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
::slotted(code) {
|
|
271
|
-
border-radius: var(--_text-code-corner-radius);
|
|
272
|
-
box-shadow: inset 0 0 0 var(--_text-code-border-width) var(--_text-code-border-color);
|
|
273
|
-
background-color: var(--_text-code-background-color);
|
|
274
|
-
padding: var(--_text-code-padding);
|
|
275
|
-
font-family: var(--_text-code-font-family);
|
|
276
|
-
font-size: var(--_text-code-font-size);
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
::slotted(q) {
|
|
280
|
-
font-style: italic;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
::slotted(q)::before {
|
|
284
|
-
content: open-quote;
|
|
285
|
-
}
|
|
140
|
+
/* # Slot */
|
|
286
141
|
|
|
287
|
-
::slotted(
|
|
288
|
-
|
|
142
|
+
::slotted(:is(p, span)) {
|
|
143
|
+
${slottedBlockReset}
|
|
289
144
|
}
|
|
290
145
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
padding: var(--_text-mark-padding);
|
|
295
|
-
--context-content-color: var(--_text-mark-color);
|
|
296
|
-
color: var(--_text-mark-color);
|
|
146
|
+
.text {
|
|
147
|
+
margin: 0;
|
|
148
|
+
font: inherit;
|
|
297
149
|
}
|
|
298
150
|
|
|
299
151
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.styles.js","sourceRoot":"","sources":["../../../../src/components/content/text/text.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAkB,MAAM,KAAK,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"text.styles.js","sourceRoot":"","sources":["../../../../src/components/content/text/text.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAkB,MAAM,KAAK,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAE5E,MAAM,KAAK,GAAG,SAAS,CA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AAC,CAAC,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,wBAAwB,CAAC,KAAK,EAAE,iCAAiC,CAAC,MAAM,EAAE,iCAAiC,CAAC,MAAM,EAAE,iCAAiC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;;;;GAIvO,MAAM,CAAC,8BAA8B,EAAE,GAAG,CAAA,eAAe,KAAK,GAAG,EAAE,GAAG,CAAA,eAAe,KAAK,GAAG,EAAE,6BAA6B,CAAC;GAC7H,MAAM,CAAC,8BAA8B,EAAE,GAAG,CAAA,eAAe,KAAK,qBAAqB,KAAK,GAAG,EAAE,GAAG,CAAA,eAAe,KAAK,qBAAqB,KAAK,GAAG,EAAE,6BAA6B,CAAC;GACjL,MAAM,CAAC,8BAA8B,EAAE,GAAG,CAAA,eAAe,KAAK,GAAG,EAAE,GAAG,CAAA,eAAe,KAAK,GAAG,EAAE,6BAA6B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiC5H,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDpB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { TemplateResult } from 'lit';
|
|
2
|
-
|
|
1
|
+
import { type TemplateResult } from 'lit';
|
|
2
|
+
import type { NLDDText } from './text.js';
|
|
3
|
+
export declare function template(this: NLDDText): TemplateResult;
|
|
3
4
|
//# sourceMappingURL=text.template.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.template.d.ts","sourceRoot":"","sources":["../../../../src/components/content/text/text.template.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"text.template.d.ts","sourceRoot":"","sources":["../../../../src/components/content/text/text.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C,wBAAgB,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,cAAc,CAGvD"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
1
|
+
import { html, nothing } from 'lit';
|
|
2
2
|
export function template() {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
`;
|
|
3
|
+
// What is in the slot wins; `text` shows while it is empty.
|
|
4
|
+
return html `${this.text && !this._textSlot.has ? html `<p class="text">${this.text}</p>` : nothing}<slot @slotchange=${this._textSlot.onChange}></slot>`;
|
|
6
5
|
}
|
|
7
6
|
//# sourceMappingURL=text.template.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.template.js","sourceRoot":"","sources":["../../../../src/components/content/text/text.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"text.template.js","sourceRoot":"","sources":["../../../../src/components/content/text/text.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAC;AAGzD,MAAM,UAAU,QAAQ;IACvB,4DAA4D;IAC5D,OAAO,IAAI,CAAA,GAAG,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAA,mBAAmB,IAAI,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,OAAO,qBAAqB,IAAI,CAAC,SAAS,CAAC,QAAQ,UAAU,CAAC;AACzJ,CAAC"}
|
|
@@ -13,12 +13,21 @@
|
|
|
13
13
|
* and shows as body text, whatever its `size`: give it a level, or for large
|
|
14
14
|
* letters that are not a heading use nldd-text with a display size.
|
|
15
15
|
* `overline` and `supporting-text` go above and below it. Each of the three
|
|
16
|
-
* has a slot in the same place for content that is more than text
|
|
17
|
-
*
|
|
16
|
+
* has a slot in the same place for content that is more than text. The slot
|
|
17
|
+
* takes the element the attribute draws: a heading, or a `<p>` for a title
|
|
18
|
+
* that is no heading, and a `<p>` for the overline and the supporting text.
|
|
19
|
+
* Put inline markup inside that element. A filled slot takes the place of the
|
|
20
|
+
* attribute. Each of the three chooses for itself, so a heading in the slot can
|
|
21
|
+
* go with plain `supporting-text`. Both grow and shrink with the
|
|
18
22
|
* size of the title, and keep to the width of a line of reading (40em), with
|
|
19
23
|
* balanced lines. The supporting text is a line or two, not a paragraph.
|
|
20
24
|
*
|
|
21
|
-
*
|
|
25
|
+
* What is in a slot is in the HTML the server sends; what comes from an
|
|
26
|
+
* attribute is drawn in the browser. On a page of a website, which search
|
|
27
|
+
* engines, link previews and reader mode read without script, put the heading
|
|
28
|
+
* in the default slot. In an application `text` with `heading-level` is enough.
|
|
29
|
+
*
|
|
30
|
+
* Inline elements in a slotted heading or `<p>` (a link, strong, em, code, mark, q) look
|
|
22
31
|
* as they do in nldd-text. A shadow root cannot reach inside a slotted element,
|
|
23
32
|
* so that styling comes from a global stylesheet: `dist/css/title.css`, or
|
|
24
33
|
* `global.css`, which includes it.
|
|
@@ -42,10 +51,10 @@
|
|
|
42
51
|
* @attr {string} overline - Text above the title. Content in the overline slot takes its place.
|
|
43
52
|
* @attr {1|2|3|4|5|6} heading-level - Renders text as h1–h6, and sets the default size. Absent renders a p in body text, unless the default slot brings its own heading.
|
|
44
53
|
*
|
|
45
|
-
* @slot overline - Overline that is more than text. Takes the place of the overline attribute.
|
|
46
|
-
* @slot -
|
|
47
|
-
* @accepts h1, h2, h3, h4, h5, h6, a, strong, b, em, i, code, mark, q
|
|
48
|
-
* @slot supporting-text - Supporting text that is more than text. Takes the place of the supporting-text attribute.
|
|
54
|
+
* @slot overline - Overline that is more than text, in a `<p>` of its own as the attribute draws it. Takes the place of the overline attribute.
|
|
55
|
+
* @slot - A heading (`h1`–`h6`) of your own for a title that is more than text, such as a link, or a `<p>` for a title that is no heading. Takes the place of text.
|
|
56
|
+
* @accepts h1, h2, h3, h4, h5, h6, p, a, strong, b, em, i, code, mark, q
|
|
57
|
+
* @slot supporting-text - Supporting text that is more than text, in a `<p>` of its own as the attribute draws it. Takes the place of the supporting-text attribute.
|
|
49
58
|
* @slot end - One thing at the end of the title line: a button, a menu, a status badge, a version. Named for the position, not for a kind of content, because anything can sit there. More than one action goes in an nldd-toolbar below the title, not in this slot: the line has no room for a row of buttons on a narrow screen, and a toolbar moves what does not fit to its overflow menu.
|
|
50
59
|
*/
|
|
51
60
|
import { LitElement, type PropertyValues } from 'lit';
|
|
@@ -69,8 +78,14 @@ export declare class NLDDTitle extends LitElement {
|
|
|
69
78
|
_hasSupportingTextSlotted: boolean;
|
|
70
79
|
/** @internal The level of a heading in the default slot. */
|
|
71
80
|
_slottedLevel: HeadingLevel | null;
|
|
81
|
+
private _looseText;
|
|
72
82
|
/** @internal */
|
|
73
83
|
_onSlotChange: (e: Event) => void;
|
|
84
|
+
/** Reads the children as the title connects, so the first render already
|
|
85
|
+
* knows the level of a slotted heading and leaves out the attribute a slot
|
|
86
|
+
* replaces. */
|
|
87
|
+
connectedCallback(): void;
|
|
88
|
+
private _readSlot;
|
|
74
89
|
/** The valid custom size per breakpoint, worked out before the first paint. */
|
|
75
90
|
private _customSizes;
|
|
76
91
|
willUpdate(changed: PropertyValues): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"title.d.ts","sourceRoot":"","sources":["../../../../src/components/content/title/title.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"title.d.ts","sourceRoot":"","sources":["../../../../src/components/content/title/title.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAUtD,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;AAC1G,KAAK,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAE1C,qBACa,SAAU,SAAQ,UAAU;IACxC,OAAgB,MAAM,0BAAe;IAGrC,IAAI,CAAC,EAAE,SAAS,CAAC;IAGjB,YAAY,SAAM;IAGlB,YAAY,SAAM;IAGlB,YAAY,SAAM;IAGlB,IAAI,SAAM;IAGV,cAAc,SAAM;IAGpB,QAAQ,SAAM;IAGd,YAAY,EAAE,YAAY,GAAG,IAAI,CAAQ;IAEzC,gBAAgB;IACP,mBAAmB,UAAS;IACrC,gBAAgB;IACP,kBAAkB,UAAS;IACpC,gBAAgB;IACP,yBAAyB,UAAS;IAC3C,4DAA4D;IACnD,aAAa,EAAE,YAAY,GAAG,IAAI,CAAQ;IACnD,OAAO,CAAC,UAAU,CAAuB;IAEzC,gBAAgB;IAChB,aAAa,GAAI,GAAG,KAAK,KAAG,IAAI,CAG9B;IAEF;;oBAEgB;IACP,iBAAiB,IAAI,IAAI;IAKlC,OAAO,CAAC,SAAS;IAcjB,+EAA+E;IAC/E,OAAO,CAAC,YAAY,CAA2C;IAEtD,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAUzC,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAQtC,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,YAAY,EAAE,SAAS,CAAC;KACxB;CACD"}
|
|
@@ -19,12 +19,21 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
19
19
|
* and shows as body text, whatever its `size`: give it a level, or for large
|
|
20
20
|
* letters that are not a heading use nldd-text with a display size.
|
|
21
21
|
* `overline` and `supporting-text` go above and below it. Each of the three
|
|
22
|
-
* has a slot in the same place for content that is more than text
|
|
23
|
-
*
|
|
22
|
+
* has a slot in the same place for content that is more than text. The slot
|
|
23
|
+
* takes the element the attribute draws: a heading, or a `<p>` for a title
|
|
24
|
+
* that is no heading, and a `<p>` for the overline and the supporting text.
|
|
25
|
+
* Put inline markup inside that element. A filled slot takes the place of the
|
|
26
|
+
* attribute. Each of the three chooses for itself, so a heading in the slot can
|
|
27
|
+
* go with plain `supporting-text`. Both grow and shrink with the
|
|
24
28
|
* size of the title, and keep to the width of a line of reading (40em), with
|
|
25
29
|
* balanced lines. The supporting text is a line or two, not a paragraph.
|
|
26
30
|
*
|
|
27
|
-
*
|
|
31
|
+
* What is in a slot is in the HTML the server sends; what comes from an
|
|
32
|
+
* attribute is drawn in the browser. On a page of a website, which search
|
|
33
|
+
* engines, link previews and reader mode read without script, put the heading
|
|
34
|
+
* in the default slot. In an application `text` with `heading-level` is enough.
|
|
35
|
+
*
|
|
36
|
+
* Inline elements in a slotted heading or `<p>` (a link, strong, em, code, mark, q) look
|
|
28
37
|
* as they do in nldd-text. A shadow root cannot reach inside a slotted element,
|
|
29
38
|
* so that styling comes from a global stylesheet: `dist/css/title.css`, or
|
|
30
39
|
* `global.css`, which includes it.
|
|
@@ -48,14 +57,16 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
48
57
|
* @attr {string} overline - Text above the title. Content in the overline slot takes its place.
|
|
49
58
|
* @attr {1|2|3|4|5|6} heading-level - Renders text as h1–h6, and sets the default size. Absent renders a p in body text, unless the default slot brings its own heading.
|
|
50
59
|
*
|
|
51
|
-
* @slot overline - Overline that is more than text. Takes the place of the overline attribute.
|
|
52
|
-
* @slot -
|
|
53
|
-
* @accepts h1, h2, h3, h4, h5, h6, a, strong, b, em, i, code, mark, q
|
|
54
|
-
* @slot supporting-text - Supporting text that is more than text. Takes the place of the supporting-text attribute.
|
|
60
|
+
* @slot overline - Overline that is more than text, in a `<p>` of its own as the attribute draws it. Takes the place of the overline attribute.
|
|
61
|
+
* @slot - A heading (`h1`–`h6`) of your own for a title that is more than text, such as a link, or a `<p>` for a title that is no heading. Takes the place of text.
|
|
62
|
+
* @accepts h1, h2, h3, h4, h5, h6, p, a, strong, b, em, i, code, mark, q
|
|
63
|
+
* @slot supporting-text - Supporting text that is more than text, in a `<p>` of its own as the attribute draws it. Takes the place of the supporting-text attribute.
|
|
55
64
|
* @slot end - One thing at the end of the title line: a button, a menu, a status badge, a version. Named for the position, not for a kind of content, because anything can sit there. More than one action goes in an nldd-toolbar below the title, not in this slot: the line has no room for a row of buttons on a narrow screen, and a toolbar moves what does not fit to its overflow menu.
|
|
56
65
|
*/
|
|
57
66
|
import { LitElement } from 'lit';
|
|
58
67
|
import { property, state } from 'lit/decorators.js';
|
|
68
|
+
import { LooseText } from '../../../utilities/slotted-block.js';
|
|
69
|
+
import { holdsContent, slottedNodes } from '../../../utilities/slot-content.js';
|
|
59
70
|
import { customElement } from '../../../utilities/custom-element.js';
|
|
60
71
|
import { reflectNonDefault } from '../../../utilities/reflect-non-default.js';
|
|
61
72
|
import { titleStyles } from './title.styles.js';
|
|
@@ -79,25 +90,38 @@ let NLDDTitle = class NLDDTitle extends LitElement {
|
|
|
79
90
|
this._hasSupportingTextSlotted = false;
|
|
80
91
|
/** @internal The level of a heading in the default slot. */
|
|
81
92
|
this._slottedLevel = null;
|
|
93
|
+
this._looseText = new LooseText(this);
|
|
82
94
|
/** @internal */
|
|
83
95
|
this._onSlotChange = (e) => {
|
|
84
96
|
const slot = e.target;
|
|
85
|
-
|
|
86
|
-
// would vanish behind a slot that only holds a newline.
|
|
87
|
-
const hasContent = slot.assignedNodes().some((node) => node.nodeType === Node.ELEMENT_NODE || (node.textContent ?? '').trim().length > 0);
|
|
88
|
-
if (slot.name === 'overline')
|
|
89
|
-
this._hasOverlineSlotted = hasContent;
|
|
90
|
-
else if (slot.name === 'supporting-text')
|
|
91
|
-
this._hasSupportingTextSlotted = hasContent;
|
|
92
|
-
else {
|
|
93
|
-
this._hasDefaultSlotted = hasContent;
|
|
94
|
-
const heading = slot.assignedElements().find((el) => /^H[1-6]$/.test(el.tagName));
|
|
95
|
-
this._slottedLevel = heading ? Number(heading.tagName[1]) : null;
|
|
96
|
-
}
|
|
97
|
+
this._readSlot(slot.name, slot.assignedNodes());
|
|
97
98
|
};
|
|
98
99
|
/** The valid custom size per breakpoint, worked out before the first paint. */
|
|
99
100
|
this._customSizes = {};
|
|
100
101
|
}
|
|
102
|
+
/** Reads the children as the title connects, so the first render already
|
|
103
|
+
* knows the level of a slotted heading and leaves out the attribute a slot
|
|
104
|
+
* replaces. */
|
|
105
|
+
connectedCallback() {
|
|
106
|
+
super.connectedCallback();
|
|
107
|
+
for (const name of ['overline', '', 'supporting-text'])
|
|
108
|
+
this._readSlot(name, slottedNodes(this, name));
|
|
109
|
+
}
|
|
110
|
+
_readSlot(name, nodes) {
|
|
111
|
+
this._looseText.read(name, nodes);
|
|
112
|
+
// Whitespace between the tags is not content: without this check the text
|
|
113
|
+
// would vanish behind a slot that only holds a newline.
|
|
114
|
+
const hasContent = holdsContent(nodes);
|
|
115
|
+
if (name === 'overline')
|
|
116
|
+
this._hasOverlineSlotted = hasContent;
|
|
117
|
+
else if (name === 'supporting-text')
|
|
118
|
+
this._hasSupportingTextSlotted = hasContent;
|
|
119
|
+
else {
|
|
120
|
+
this._hasDefaultSlotted = hasContent;
|
|
121
|
+
const heading = nodes.find((node) => node instanceof Element && /^H[1-6]$/.test(node.tagName));
|
|
122
|
+
this._slottedLevel = heading ? Number(heading.tagName[1]) : null;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
101
125
|
willUpdate(changed) {
|
|
102
126
|
super.willUpdate(changed);
|
|
103
127
|
// The level the styles size by: the attribute, or the slotted heading.
|