@nldd/design-system 0.31.0 → 0.32.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 +2036 -100
- package/dist/cdn/autoloader.js +139 -139
- package/dist/cdn/chunks/{accordion-D7VeSx-7.js → accordion-CLT6C7Ys.js} +4 -4
- package/dist/cdn/chunks/{accordion-item-DjFnuCY9.js → accordion-item-DqkLuze7.js} +5 -5
- package/dist/cdn/chunks/{activity-indicator-nshVcQbZ.js → activity-indicator-DYgJcdQr.js} +7 -6
- package/dist/cdn/chunks/{admonition-BhYcjvcU.js → admonition-307OSenQ.js} +5 -5
- package/dist/cdn/chunks/{avatar-Dw9XZk73.js → avatar-DZx4eWGL.js} +7 -7
- package/dist/cdn/chunks/{avatar-group-B0ZliBMF.js → avatar-group-D0Z4Yu0y.js} +15 -15
- package/dist/cdn/chunks/{badge-2ObEfIYt.js → badge-Ez8ID47C.js} +6 -6
- package/dist/cdn/chunks/{banner-D9d_367R.js → banner-Cu1cwuLr.js} +9 -8
- package/dist/cdn/chunks/{bar-split-view-Cpq5j2Yd.js → bar-split-view-7bviCuBj.js} +52 -32
- package/dist/cdn/chunks/{blockquote-M372pBfW.js → blockquote-PCr0GO6z.js} +7 -7
- package/dist/cdn/chunks/{box-bpcNQSk1.js → box-BOZDuPmd.js} +3 -3
- package/dist/cdn/chunks/{breadcrumbs-YBuCnLD2.js → breadcrumbs-CVXCsvXU.js} +6 -6
- package/dist/cdn/chunks/{button-BsJDVMS5.js → button-3Up7cEWx.js} +14 -10
- package/dist/cdn/chunks/{button-bar-C7WBKVht.js → button-bar-bK3oi0e-.js} +3 -3
- package/dist/cdn/chunks/{button-group-D3zUCJnu.js → button-group-DSBBqKvs.js} +2 -2
- package/dist/cdn/chunks/{card-BY2Fz35J.js → card-CH0xAbO6.js} +4 -4
- package/dist/cdn/chunks/{cell-DfQcb8oJ.js → cell-BwW6TV8v.js} +6 -6
- package/dist/cdn/chunks/{checkbox-BurSrNRq.js → checkbox-CYR3ChYP.js} +5 -5
- package/dist/cdn/chunks/{checkbox-field-jcCJRers.js → checkbox-field-D43DeCUk.js} +8 -8
- package/dist/cdn/chunks/{checkbox-group--6ifWQ_F.js → checkbox-group-BVr37vFn.js} +3 -3
- package/dist/cdn/chunks/{class-map-pfTGN6Lt.js → class-map-B9MjP-Ik.js} +1 -1
- package/dist/cdn/chunks/{code-editor-D6xQxxSm.js → code-editor-CGx_sn9q.js} +5 -5
- package/dist/cdn/chunks/{code-viewer-CsO0Hzkz.js → code-viewer-CyEZJm0a.js} +8 -8
- package/dist/cdn/chunks/{codemirror-input-Bu7mes2L.js → codemirror-input-BRShjOew.js} +5 -5
- package/dist/cdn/chunks/{collection-CLD0J381.js → collection-B3wQHswI.js} +8 -8
- package/dist/cdn/chunks/{combo-box-cC87aRbF.js → combo-box-UI2A1nHw.js} +9 -9
- package/dist/cdn/chunks/{container-Dcd-wtk5.js → container-GzgjWXSY.js} +3 -3
- package/dist/cdn/chunks/{custom-element-BPzCecdN.js → custom-element-CF94IDoN.js} +1 -1
- package/dist/cdn/chunks/{date-field-CfIXnk2K.js → date-field-BoAnSKOD.js} +12 -12
- package/dist/cdn/chunks/{date-picker-D4W0Be1y.js → date-picker-Dn80yrfN.js} +11 -11
- package/dist/cdn/chunks/{decorate-CNSW3HVY.js → decorate-DNdCDV-Z.js} +1 -1
- package/dist/cdn/chunks/{described-by-mixin-BNEosRlm.js → described-by-mixin-6MEe_hOH.js} +2 -2
- package/dist/cdn/chunks/{description-cell-3zl0cEJE.js → description-cell-QR-as1SF.js} +7 -7
- package/dist/cdn/chunks/{dev-checks-sh4nGzvD.js → dev-checks-DlNQtR5p.js} +23 -18
- package/dist/cdn/chunks/{directive-helpers-C8_pU38P.js → directive-helpers-9JM8Li8K.js} +1 -1
- package/dist/cdn/chunks/{dist-DzvZLbav.js → dist-B5rtEAPd.js} +3 -3
- package/dist/cdn/chunks/{dist-D8GVh7JF.js → dist-BGxQOo33.js} +1 -1
- package/dist/cdn/chunks/{dist-DosCjwbX.js → dist-BKGDiUni.js} +2 -2
- package/dist/cdn/chunks/{dist-BMreXo8L.js → dist-BvZqEQHV.js} +2 -2
- package/dist/cdn/chunks/{dist-C0eqMXKG.js → dist-C6dhaR9M.js} +2 -2
- package/dist/cdn/chunks/{dist-BQhMIRwq.js → dist-CIp0mUeR.js} +3 -3
- package/dist/cdn/chunks/{dist-CYoggrc-.js → dist-DVm3azdM.js} +1 -1
- package/dist/cdn/chunks/{dist-DHJOmDf7.js → dist-Drahkxmv.js} +1 -1
- package/dist/cdn/chunks/{dist-UPMuGK3l.js → dist-Dtrv48QJ.js} +2 -2
- package/dist/cdn/chunks/{dist-BwkztXx2.js → dist-Duw9BWmb.js} +3 -3
- package/dist/cdn/chunks/{dist-DwGJ42jg.js → dist-QKanuZ5c.js} +2 -2
- package/dist/cdn/chunks/{dist-BA1lxpkp.js → dist-gCusBxjl.js} +4 -4
- package/dist/cdn/chunks/{dist-Du5XeaUH.js → dist-z3iYo2pQ.js} +3 -3
- package/dist/cdn/chunks/{divider-ja-sWdqK.js → divider-Dv0ZKI-0.js} +2 -2
- package/dist/cdn/chunks/{document-tab-bar-CzlWDPeb.js → document-tab-bar-Dzp5ncIl.js} +9 -9
- package/dist/cdn/chunks/{dropdown-CDnfyMTi.js → dropdown-kVarufY1.js} +5 -5
- package/dist/cdn/chunks/{file-field-VGbq3duI.js → file-field-B0aEvinG.js} +14 -14
- package/dist/cdn/chunks/{form-EDk-AXxW.js → form-CvuALdyG.js} +1 -1
- package/dist/cdn/chunks/{form-actions-DJlOHVjC.js → form-actions-BPehBKcl.js} +2 -2
- package/dist/cdn/chunks/{form-associated-mixin-BDrjhoXJ.js → form-associated-mixin-BMdwBjn_.js} +29 -3
- package/dist/cdn/chunks/{form-field-DwfFYaIJ.js → form-field-B0pcB33o.js} +8 -8
- package/dist/cdn/chunks/{form-section-D5pvpU0g.js → form-section-DWlfhgMj.js} +3 -3
- package/dist/cdn/chunks/{full-bleed-section-B2lrxacX.js → full-bleed-section-4orVi9nk.js} +3 -3
- package/dist/cdn/chunks/{hero-8OBYFEcb.js → hero-DvG8bQx1.js} +155 -103
- package/dist/cdn/chunks/{icon-DZh6I8EN.js → icon-CoujQk37.js} +3 -3
- package/dist/cdn/chunks/{icon-button-Cfl9Uloz.js → icon-button-CghwJ1ZM.js} +10 -10
- package/dist/cdn/chunks/{icon-cell-BKxm4x3C.js → icon-cell-CB8JJxPx.js} +5 -5
- package/dist/cdn/chunks/{identity-D6mA_Ysl.js → identity-D7knBYp4.js} +7 -7
- package/dist/cdn/chunks/{if-defined-Laa7Mar_.js → if-defined-DogpZQqB.js} +1 -1
- package/dist/cdn/chunks/{image-BNQlE_4Z.js → image-Cabp3_Mm.js} +19 -14
- package/dist/cdn/chunks/{inline-dialog-5vpq_6bt.js → inline-dialog-BA1HLcgr.js} +8 -8
- package/dist/cdn/chunks/{just-in-time-education-C8uCzm2s.js → just-in-time-education-k1iYVZNa.js} +5 -5
- package/dist/cdn/chunks/{kanban-_aubAWTm.js → kanban-MhZkM6ah.js} +5 -5
- package/dist/cdn/chunks/{kanban-column-CmitV46A.js → kanban-column-EHsh2VXL.js} +4 -4
- package/dist/cdn/chunks/{keyboard-shortcut-DY96tl24.js → keyboard-shortcut-ClT66akm.js} +4 -4
- package/dist/cdn/chunks/{languages-B0lgBg4r.js → languages-ksBh8Hul.js} +12 -12
- package/dist/cdn/chunks/{link-CEyAJ_y7.js → link-B9gG-fEr.js} +6 -6
- package/dist/cdn/chunks/{link-group-DwnzL75g.js → link-group-C3Z_3TDw.js} +2 -2
- package/dist/cdn/chunks/{list-D-_Z5AED.js → list-BqJ_ucfa.js} +9 -9
- package/dist/cdn/chunks/{list-item-BqzGOqJl.js → list-item-DpQBn1El.js} +74 -73
- package/dist/cdn/chunks/{list-item-segment-Ct876W0e.js → list-item-segment-AVJcFdeh.js} +29 -28
- package/dist/cdn/chunks/{menu-BDLqu0jO.js → menu-CYxTNgBa.js} +10 -10
- package/dist/cdn/chunks/{menu-bar-DbCYdFuj.js → menu-bar-BcZ1EP6b.js} +13 -8
- package/dist/cdn/chunks/{menu-bar-item-CFfcPjci.js → menu-bar-item-D0UrqKlH.js} +7 -7
- package/dist/cdn/chunks/{menu-divider-DTzCjHnW.js → menu-divider-uvK-8rJG.js} +3 -3
- package/dist/cdn/chunks/{menu-group-rYPRHllx.js → menu-group-BIPjBdrU.js} +4 -4
- package/dist/cdn/chunks/{menu-item-CjzoSHHj.js → menu-item-DcBe9_qD.js} +4 -4
- package/dist/cdn/chunks/{menu.template-D7dG2HRa.js → menu.template-BFq905uv.js} +6 -6
- package/dist/cdn/chunks/{modal-dialog-Cjn3EHfN.js → modal-dialog-CXfPMsvc.js} +4 -4
- package/dist/cdn/chunks/{multi-line-text-field-B8DstPYy.js → multi-line-text-field-BLibOq1E.js} +6 -6
- package/dist/cdn/chunks/{navigation-split-view-BHM4b_Gb.js → navigation-split-view-jk6HesTp.js} +5 -5
- package/dist/cdn/chunks/{notification-CieKHgKd.js → notification-Bc53Pa5u.js} +7 -7
- package/dist/cdn/chunks/{number-field-CVYaConf.js → number-field-CYDiJ7CO.js} +38 -16
- package/dist/cdn/chunks/{one-half-one-half-section-aMdIJ_5N.js → one-half-one-half-section-DTTHJknv.js} +3 -3
- package/dist/cdn/chunks/{one-third-two-thirds-section-Dalek6lE.js → one-third-two-thirds-section-C0YU3ss3.js} +3 -3
- package/dist/cdn/chunks/{one-time-code-field-BxkICLRG.js → one-time-code-field-DsfKUJDd.js} +8 -8
- package/dist/cdn/chunks/{overflow-menu-GR6uppZW.js → overflow-menu-8GWanho5.js} +1 -1
- package/dist/cdn/chunks/{page-C18ixnPr.js → page-BIXY8Czs.js} +5 -5
- package/dist/cdn/chunks/{page-footer-CP6K-aw-.js → page-footer-BSPneEMd.js} +5 -5
- package/dist/cdn/chunks/{page-section-mixin-BLPRaUH6.js → page-section-mixin-HrMHOk9c.js} +3 -3
- package/dist/cdn/chunks/{pagination-YLIq3Jcw.js → pagination-DkV6axw8.js} +7 -7
- package/dist/cdn/chunks/{password-field-CCRqiNHh.js → password-field-eZtU3DR2.js} +9 -9
- package/dist/cdn/chunks/{popover-NvRaYQGL.js → popover-BjXDnHDF.js} +5 -5
- package/dist/cdn/chunks/press-feedback-BtUqwC_0.js +12 -0
- package/dist/cdn/chunks/{progress-bar-DS0_RN2t.js → progress-bar-D5-CB4NJ.js} +14 -15
- package/dist/cdn/chunks/{progress-circle-B5zlQKGK.js → progress-circle-tXH6BMlN.js} +18 -16
- package/dist/cdn/chunks/{radio-button-gY-u--Id.js → radio-button-CsgnS_Qn.js} +4 -4
- package/dist/cdn/chunks/{radio-button-field-DZ2p1w_S.js → radio-button-field-DbnG-fR8.js} +7 -7
- package/dist/cdn/chunks/{radio-button-group-C0VdrjGz.js → radio-button-group-BUujUoVm.js} +3 -3
- package/dist/cdn/chunks/{render-marked-SMLwIKOz.js → render-marked-BSbmklIR.js} +1 -1
- package/dist/cdn/chunks/{reorder-handle-cell-BfNGWoUb.js → reorder-handle-cell-Bi_v5VZB.js} +4 -4
- package/dist/cdn/chunks/{reorder-handle-mixin-Dy5l6J0C.js → reorder-handle-mixin-Cu-u0TY-.js} +2 -2
- package/dist/cdn/chunks/{repeat-HQymq8gF.js → repeat-DU632DST.js} +2 -2
- package/dist/cdn/chunks/{rich-text-BALF1UpX.js → rich-text-C4DZxOTU.js} +3 -3
- package/dist/cdn/chunks/{row-header-mixin-De75PIGu.js → row-header-mixin-CMAyjE-7.js} +2 -2
- package/dist/cdn/chunks/{scroll-fade-Bj7GnOWo.js → scroll-fade-DBQ2mD8Y.js} +2 -2
- package/dist/cdn/chunks/{search-field-DP7e4bm8.js → search-field-NJcMkh2l.js} +10 -10
- package/dist/cdn/chunks/{segmented-control-BXtb8I7v.js → segmented-control-Bx0X7A2X.js} +7 -7
- package/dist/cdn/chunks/{shadow-resets-CF-vkJJ8.js → shadow-resets-BplgOKPc.js} +2 -2
- package/dist/cdn/chunks/{sheet-Beykq5Xb.js → sheet-96shetPW.js} +3 -3
- package/dist/cdn/chunks/{shell-CTGO74H-.js → shell-D53z8Daa.js} +3 -3
- package/dist/cdn/chunks/{side-by-side-split-view-BZlxFAIM.js → side-by-side-split-view-CA3ZYDmC.js} +4 -4
- package/dist/cdn/chunks/{sidebar-section-CsODVvuK.js → sidebar-section-oUXcNchf.js} +8 -8
- package/dist/cdn/chunks/{simple-section-9pgvujZx.js → simple-section-DhSCulaz.js} +3 -3
- package/dist/cdn/chunks/{skip-link-qdhDQoe7.js → skip-link-CNvkL2ng.js} +5 -5
- package/dist/cdn/chunks/{slider-CR_O2nPE.js → slider-Ba5O0jF6.js} +12 -11
- package/dist/cdn/chunks/{spacer-DbZEWOe2.js → spacer-Bz-xBLrh.js} +2 -2
- package/dist/cdn/chunks/{spacer-cell-BnDgG-8g.js → spacer-cell-k1AYw_80.js} +4 -4
- package/dist/cdn/chunks/{split-button-rY9ZZF4m.js → split-button-DwHGhJ94.js} +7 -7
- package/dist/cdn/chunks/{split-view-divider-CXsR2koZ.js → split-view-divider-BTt7hrtq.js} +2 -2
- package/dist/cdn/chunks/{stacked-split-view-CA97yLNG.js → stacked-split-view-Cq3kBEo7.js} +4 -4
- package/dist/cdn/chunks/{static-html-CfvOicw5.js → static-html-C1_QY9-9.js} +1 -1
- package/dist/cdn/chunks/{status-bar-Cg0AkR2_.js → status-bar-Y3NC9vFo.js} +4 -4
- package/dist/cdn/chunks/{step-bar-CAF54DmI.js → step-bar-DEOX-7NN.js} +7 -7
- package/dist/cdn/chunks/{step-cell-BfmEAqar.js → step-cell-Crml9Hpt.js} +5 -5
- package/dist/cdn/chunks/{stepper-C2oRKeaC.js → stepper-XZGIlIIU.js} +7 -7
- package/dist/cdn/chunks/{style-map-BZRDrOiA.js → style-map-Bznyirg7.js} +1 -1
- package/dist/cdn/chunks/{swatch-picker-DW07gML2.js → swatch-picker-4fIhPJQc.js} +6 -6
- package/dist/cdn/chunks/{switch-D3dbZ1J9.js → switch-DPjb_Wtv.js} +5 -5
- package/dist/cdn/chunks/{switch-field-DrP2P8J-.js → switch-field-DF96_PUQ.js} +7 -7
- package/dist/cdn/chunks/{tab-bar-D0VfxxWN.js → tab-bar-CtZpacEn.js} +8 -8
- package/dist/cdn/chunks/{table-CWQWdro8.js → table-S76Xq4j8.js} +5 -5
- package/dist/cdn/chunks/{tag-Dc2wNx-T.js → tag-Bzem1z9I.js} +5 -5
- package/dist/cdn/chunks/{term-DUIQ5xer.js → term-Bbuv7_kb.js} +12 -12
- package/dist/cdn/chunks/{text-BGobv84x.js → text-C7mSKF-E.js} +4 -4
- package/dist/cdn/chunks/{text-cell-CGvUJRLw.js → text-cell-CMXSo5Ra.js} +9 -9
- package/dist/cdn/chunks/{text-editor-CHsINr20.js → text-editor-DgkEF4fV.js} +11 -11
- package/dist/cdn/chunks/{text-field-CpSGZVmD.js → text-field-B06CiuOY.js} +6 -6
- package/dist/cdn/chunks/{text-wrap-DHroWilR.js → text-wrap-EQF-fBi4.js} +2 -2
- package/dist/cdn/chunks/{time-field-CJVbIp-l.js → time-field-CUvhCoHF.js} +14 -14
- package/dist/cdn/chunks/{time-picker-S2rQpNA-.js → time-picker-wgfjQpFB.js} +6 -6
- package/dist/cdn/chunks/{title-DrogO1fi.js → title-Uzi0g--W.js} +5 -5
- package/dist/cdn/chunks/{title-cell-CX_yGWvW.js → title-cell-Cc9j1I4W.js} +9 -9
- package/dist/cdn/chunks/{toggle-button-CwVn3pQ-.js → toggle-button-DeKfh6eM.js} +9 -9
- package/dist/cdn/chunks/{toggle-button-group-BY4GlP2N.js → toggle-button-group-DU2SGR3P.js} +2 -2
- package/dist/cdn/chunks/{token-vYddtNLa.js → token-BC3tY59o.js} +5 -5
- package/dist/cdn/chunks/{token-field-CgE9PfeW.js → token-field-BO_hUPuR.js} +11 -11
- package/dist/cdn/chunks/{toolbar-Cl9XcbRF.js → toolbar-BWmrbOds.js} +9 -9
- package/dist/cdn/chunks/{toolbar-item-BQKbNQGY.js → toolbar-item-jnrwcrih.js} +3 -3
- package/dist/cdn/chunks/{toolbar-title-Ka7Q_vfZ.js → toolbar-title-STB4FCnn.js} +4 -4
- package/dist/cdn/chunks/{toolbar.styles-QMkPXyiR.js → toolbar.styles-D7-Iy0U9.js} +3 -11
- package/dist/cdn/chunks/{tooltip-BERJsBSV.js → tooltip-C1qPjhuT.js} +5 -5
- package/dist/cdn/chunks/{top-navigation-bar-CJCQf83I.js → top-navigation-bar-9Iy3niRW.js} +117 -128
- package/dist/cdn/chunks/{top-title-bar-CT4gj9gn.js → top-title-bar-AiWXxvEn.js} +6 -6
- package/dist/cdn/chunks/{two-thirds-one-third-section-CQwCU61R.js → two-thirds-one-third-section-B4-HS2qN.js} +3 -3
- package/dist/cdn/chunks/{validation-list-3b8a8S3f.js → validation-list-_cQOzDKg.js} +5 -5
- package/dist/cdn/chunks/{visibility-mixin-BDaVoR0J.js → visibility-mixin-yf02zdEy.js} +2 -2
- package/dist/cdn/chunks/{visually-hidden-GgT4UkeT.js → visually-hidden-hjpQo7w2.js} +2 -2
- package/dist/cdn/chunks/{window-BTU1k5p4.js → window-Br52FScm.js} +4 -4
- package/dist/cdn/chunks/{with-translations-D3sJ-X8x.js → with-translations-Z7dHTxzy.js} +3 -3
- package/dist/components/actions/button/button.styles.d.ts.map +1 -1
- package/dist/components/actions/button/button.styles.js +4 -0
- package/dist/components/actions/button/button.styles.js.map +1 -1
- package/dist/components/actions/toolbar/toolbar.styles.d.ts.map +1 -1
- package/dist/components/actions/toolbar/toolbar.styles.js +0 -8
- package/dist/components/actions/toolbar/toolbar.styles.js.map +1 -1
- package/dist/components/content/avatar/avatar.styles.js +1 -1
- package/dist/components/content/blockquote/blockquote.d.ts +2 -2
- package/dist/components/content/blockquote/blockquote.js +2 -2
- package/dist/components/content/blockquote/blockquote.styles.js +2 -2
- package/dist/components/content/icon/icon.d.ts +1 -1
- package/dist/components/content/icon/icon.js +1 -1
- package/dist/components/content/icon/icon.styles.js +1 -1
- package/dist/components/content/identity/identity.d.ts +1 -1
- package/dist/components/content/identity/identity.js +1 -1
- package/dist/components/content/image/image.d.ts +2 -2
- package/dist/components/content/image/image.d.ts.map +1 -1
- package/dist/components/content/image/image.js +3 -3
- package/dist/components/content/image/image.js.map +1 -1
- package/dist/components/content/image/image.styles.d.ts.map +1 -1
- package/dist/components/content/image/image.styles.js +5 -2
- package/dist/components/content/image/image.styles.js.map +1 -1
- package/dist/components/content/image/image.template.d.ts.map +1 -1
- package/dist/components/content/image/image.template.js +3 -1
- package/dist/components/content/image/image.template.js.map +1 -1
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.d.ts +1 -1
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.js +1 -1
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.styles.js +1 -1
- package/dist/components/content/text/text.d.ts +1 -1
- package/dist/components/content/text/text.js +1 -1
- package/dist/components/inputs/checkbox/checkbox.d.ts +1 -1
- package/dist/components/inputs/checkbox/checkbox.js +1 -1
- package/dist/components/inputs/checkbox-field/checkbox-field.d.ts +1 -1
- package/dist/components/inputs/checkbox-field/checkbox-field.js +1 -1
- package/dist/components/inputs/date-field/date-field.d.ts +1 -1
- package/dist/components/inputs/date-picker/date-picker.d.ts +1 -1
- package/dist/components/inputs/date-picker/date-picker.js +1 -1
- package/dist/components/inputs/file-field/file-field.d.ts +1 -1
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.d.ts +1 -1
- package/dist/components/inputs/number-field/number-field.d.ts +10 -2
- package/dist/components/inputs/number-field/number-field.d.ts.map +1 -1
- package/dist/components/inputs/number-field/number-field.js +32 -4
- package/dist/components/inputs/number-field/number-field.js.map +1 -1
- package/dist/components/inputs/number-field/number-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/number-field/number-field.styles.js +13 -5
- package/dist/components/inputs/number-field/number-field.styles.js.map +1 -1
- package/dist/components/inputs/one-time-code-field/one-time-code-field.d.ts +5 -1
- package/dist/components/inputs/one-time-code-field/one-time-code-field.d.ts.map +1 -1
- package/dist/components/inputs/one-time-code-field/one-time-code-field.js +6 -2
- package/dist/components/inputs/one-time-code-field/one-time-code-field.js.map +1 -1
- package/dist/components/inputs/password-field/password-field.d.ts +1 -1
- package/dist/components/inputs/radio-button/radio-button.d.ts +1 -1
- package/dist/components/inputs/radio-button/radio-button.js +1 -1
- package/dist/components/inputs/radio-button-field/radio-button-field.d.ts +1 -1
- package/dist/components/inputs/radio-button-field/radio-button-field.js +1 -1
- package/dist/components/inputs/slider/slider.styles.d.ts.map +1 -1
- package/dist/components/inputs/slider/slider.styles.js +3 -2
- package/dist/components/inputs/slider/slider.styles.js.map +1 -1
- package/dist/components/inputs/switch/switch.d.ts +1 -1
- package/dist/components/inputs/switch/switch.js +1 -1
- package/dist/components/inputs/switch-field/switch-field.d.ts +1 -1
- package/dist/components/inputs/switch-field/switch-field.js +1 -1
- package/dist/components/inputs/text-field/text-field.d.ts +1 -1
- package/dist/components/inputs/time-field/time-field.d.ts +1 -1
- package/dist/components/inputs/time-picker/time-picker.d.ts +1 -1
- package/dist/components/inputs/time-picker/time-picker.js +1 -1
- package/dist/components/layout/page-sections/hero/hero-corner.d.ts +3 -3
- package/dist/components/layout/page-sections/hero/hero-corner.d.ts.map +1 -1
- package/dist/components/layout/page-sections/hero/hero-corner.js +31 -24
- package/dist/components/layout/page-sections/hero/hero-corner.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero-corner.styles.js +9 -9
- package/dist/components/layout/page-sections/hero/hero.d.ts +32 -28
- package/dist/components/layout/page-sections/hero/hero.d.ts.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.js +40 -33
- package/dist/components/layout/page-sections/hero/hero.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.styles.d.ts.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.styles.js +61 -23
- package/dist/components/layout/page-sections/hero/hero.styles.js.map +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.d.ts +20 -10
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.d.ts.map +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.js +80 -32
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.js.map +1 -1
- package/dist/components/layout/split-views/split-view-divider/split-view-divider.d.ts +1 -1
- package/dist/components/layout/split-views/split-view-divider/split-view-divider.js +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.d.ts +2 -1
- package/dist/components/lists-and-tables/list-item/list-item.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.js +6 -3
- package/dist/components/lists-and-tables/list-item/list-item.js.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts +1 -0
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js +4 -2
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js.map +1 -1
- package/dist/components/navigation/menu-bar/menu-bar.d.ts +3 -1
- package/dist/components/navigation/menu-bar/menu-bar.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar/menu-bar.js +21 -7
- package/dist/components/navigation/menu-bar/menu-bar.js.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.js +4 -0
- package/dist/components/navigation/menu-bar-item/menu-bar-item.js.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.d.ts +5 -3
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.d.ts.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js +5 -3
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js +10 -21
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js.map +1 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.styles.js +2 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.styles.js.map +1 -1
- package/dist/components/status-and-feedback/banner/banner.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/banner/banner.styles.js +1 -0
- package/dist/components/status-and-feedback/banner/banner.styles.js.map +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.styles.js +6 -7
- package/dist/components/status-and-feedback/progress-bar/progress-bar.styles.js.map +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.d.ts +4 -0
- package/dist/components/status-and-feedback/progress-circle/progress-circle.d.ts.map +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.js +16 -8
- package/dist/components/status-and-feedback/progress-circle/progress-circle.js.map +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.styles.js +6 -6
- package/dist/components/status-and-feedback/progress-circle/progress-circle.styles.js.map +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.template.d.ts.map +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.template.js +0 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.template.js.map +1 -1
- package/dist/components/status-and-feedback/status-bar/status-bar.d.ts +3 -2
- package/dist/components/status-and-feedback/status-bar/status-bar.d.ts.map +1 -1
- package/dist/components/status-and-feedback/status-bar/status-bar.js +3 -2
- package/dist/components/status-and-feedback/status-bar/status-bar.js.map +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.styles.js +1 -1
- package/dist/css/rich-text.css +2 -3
- package/dist/css/variables.css +22 -9
- package/dist/nldd.min.js +1003 -966
- package/dist/types/react.d.ts +36 -40
- package/dist/types/vue.d.ts +207 -51
- package/dist/utilities/dev-rules.generated.d.ts.map +1 -1
- package/dist/utilities/dev-rules.generated.js +23 -18
- package/dist/utilities/dev-rules.generated.js.map +1 -1
- package/dist/utilities/form-associated-mixin.d.ts +10 -0
- package/dist/utilities/form-associated-mixin.d.ts.map +1 -1
- package/dist/utilities/form-associated-mixin.js +49 -0
- package/dist/utilities/form-associated-mixin.js.map +1 -1
- package/dist/utilities/press-feedback.d.ts +16 -0
- package/dist/utilities/press-feedback.d.ts.map +1 -0
- package/dist/utilities/press-feedback.js +27 -0
- package/dist/utilities/press-feedback.js.map +1 -0
- package/lint/data.generated.json +1 -1
- package/lint/fix.js +43 -6
- package/lint/rule.schema.json +2 -1
- package/package.json +1 -1
|
@@ -1,22 +1,36 @@
|
|
|
1
1
|
import { setState } from '../../../../utilities/element-state.js';
|
|
2
2
|
const CORNERS = ['top-left', 'top-right', 'bottom-left', 'bottom-right'];
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
const OVERLAP_AS = new Map([
|
|
4
|
+
['overlap-left', 'bottom-left'],
|
|
5
|
+
['overlap-center', 'bottom-center'],
|
|
6
|
+
['overlap-right', 'bottom-right'],
|
|
7
|
+
]);
|
|
8
|
+
/* The media corner per position of the content area, curated from the Rijkshuisstijl
|
|
9
|
+
* examples rather than derived: always a corner the content area leaves free. */
|
|
5
10
|
const AUTO_MEDIA_CORNER = {
|
|
6
11
|
'bottom-left': 'top-right',
|
|
12
|
+
'bottom-center': 'top-right',
|
|
13
|
+
'top-center': 'bottom-right',
|
|
7
14
|
'bottom-right': 'bottom-left',
|
|
8
15
|
'top-left': 'top-right',
|
|
9
16
|
'top-right': 'top-left',
|
|
10
17
|
'left': 'top-right',
|
|
11
18
|
'right': 'top-left',
|
|
12
19
|
};
|
|
13
|
-
/* Without media the
|
|
20
|
+
/* Without media the content area is the whole hero: the free corner is at the top,
|
|
14
21
|
* on the side the text does not start from. */
|
|
15
22
|
function autoCornerWithoutMedia(position) {
|
|
16
23
|
return position.endsWith('right') ? 'top-left' : 'top-right';
|
|
17
24
|
}
|
|
18
|
-
/* The
|
|
19
|
-
* that spans a full side has none. */
|
|
25
|
+
/* The content area's own corner: the one pointing diagonally into the media. A content area
|
|
26
|
+
* that spans a full side has none; a centered one takes the side of the media corner. */
|
|
27
|
+
function mainCornerFor(position, mediaCorner) {
|
|
28
|
+
if (position === 'top-center')
|
|
29
|
+
return `bottom-${mediaCorner.endsWith('left') ? 'left' : 'right'}`;
|
|
30
|
+
if (position === 'bottom-center')
|
|
31
|
+
return `top-${mediaCorner.endsWith('left') ? 'left' : 'right'}`;
|
|
32
|
+
return MAIN_CORNER[position];
|
|
33
|
+
}
|
|
20
34
|
const MAIN_CORNER = {
|
|
21
35
|
'bottom-left': 'top-right',
|
|
22
36
|
'bottom-right': 'top-left',
|
|
@@ -25,14 +39,15 @@ const MAIN_CORNER = {
|
|
|
25
39
|
'left': null,
|
|
26
40
|
'right': null,
|
|
27
41
|
};
|
|
28
|
-
/** The media corners the
|
|
42
|
+
/** The media corners the content area stands on, where a rounded corner would vanish. */
|
|
29
43
|
function coveredCorners(host, position) {
|
|
30
44
|
if (position === 'left')
|
|
31
45
|
return ['top-left', 'bottom-left'];
|
|
32
46
|
if (position === 'right')
|
|
33
47
|
return ['top-right', 'bottom-right'];
|
|
48
|
+
const center = position === 'top-center' || position === 'bottom-center';
|
|
34
49
|
if (host.mainWidth !== 'full')
|
|
35
|
-
return [position];
|
|
50
|
+
return center ? [] : [position];
|
|
36
51
|
const vertical = position.startsWith('top') ? 'top' : 'bottom';
|
|
37
52
|
return [`${vertical}-left`, `${vertical}-right`];
|
|
38
53
|
}
|
|
@@ -51,33 +66,25 @@ function clear(host) {
|
|
|
51
66
|
export function applyCorner(host) {
|
|
52
67
|
if (host.corner === null || host.corner === undefined) {
|
|
53
68
|
clear(host);
|
|
54
|
-
setState(host, 'corner-unsupported', false);
|
|
55
69
|
return;
|
|
56
70
|
}
|
|
57
|
-
const center = host.mainPosition === 'top-center' || host.mainPosition === 'bottom-center';
|
|
58
71
|
// An unknown main-position is the default, as on the hero itself.
|
|
59
|
-
const position =
|
|
60
|
-
? host.mainPosition
|
|
61
|
-
:
|
|
62
|
-
// Without media the panel is the whole hero, so layout and position do not
|
|
63
|
-
// come into it.
|
|
64
|
-
const unsupported = host._hasMedia && (host.layout !== 'contained' || center);
|
|
65
|
-
setState(host, 'corner-unsupported', unsupported);
|
|
66
|
-
if (unsupported) {
|
|
67
|
-
clear(host);
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
72
|
+
const position = host._overlaps
|
|
73
|
+
? OVERLAP_AS.get(host.mainPosition) ?? 'bottom-left'
|
|
74
|
+
: host.mainPosition;
|
|
70
75
|
const value = host.corner.trim();
|
|
71
76
|
const chosen = CORNERS.includes(value) ? value : null;
|
|
72
77
|
const covered = host._hasMedia ? coveredCorners(host, position) : [];
|
|
73
|
-
let mediaCorner = chosen ?? (host._hasMedia ? AUTO_MEDIA_CORNER[position] : autoCornerWithoutMedia(
|
|
78
|
+
let mediaCorner = chosen ?? (host._hasMedia ? AUTO_MEDIA_CORNER[position] : autoCornerWithoutMedia(position));
|
|
74
79
|
if (!chosen && covered.includes(mediaCorner)) {
|
|
75
80
|
// A full-width strip covers both corners on its edge: move to the
|
|
76
81
|
// other edge, on the same side.
|
|
77
82
|
const horizontal = mediaCorner.endsWith('left') ? 'left' : 'right';
|
|
78
83
|
mediaCorner = `${mediaCorner.startsWith('top') ? 'bottom' : 'top'}-${horizontal}`;
|
|
79
84
|
}
|
|
80
|
-
|
|
85
|
+
// A content area that overlaps keeps its distance from the edge, so it does not
|
|
86
|
+
// form one shape with the image and stays square.
|
|
87
|
+
const mainCorner = host._hasMedia && host.mainWidth !== 'full' && !host._overlaps ? mainCornerFor(position, mediaCorner) : null;
|
|
81
88
|
host.setAttribute('data-media-corner', mediaCorner);
|
|
82
89
|
if (mainCorner)
|
|
83
90
|
host.setAttribute('data-main-corner', mainCorner);
|
|
@@ -91,7 +98,7 @@ const LIMITS = ['--_hero-media-corner-limit', '--_hero-main-corner-limit'];
|
|
|
91
98
|
* Caps the radius at a third of the shortest side of the area it rounds, so a
|
|
92
99
|
* low hero (a single title without media, a small `media-height`) keeps a
|
|
93
100
|
* corner rather than turning into a drop. Fed by a ResizeObserver on the media
|
|
94
|
-
* and the
|
|
101
|
+
* and the content area; the content area's own limit only counts without media, where it is
|
|
95
102
|
* the whole hero. An area that is not shown measures zero and keeps its limit.
|
|
96
103
|
*/
|
|
97
104
|
export function limitCorner(host, entries) {
|
|
@@ -108,7 +115,7 @@ export function limitCorner(host, entries) {
|
|
|
108
115
|
if (!limits.size || pendingLimits.has(host))
|
|
109
116
|
return;
|
|
110
117
|
pendingLimits.set(host, limits);
|
|
111
|
-
// The radius narrows the
|
|
118
|
+
// The radius narrows the content area it rounds, which the observer watches. Written
|
|
112
119
|
// in its own callback, that is a resize the observer cannot deliver, and the
|
|
113
120
|
// browser reports a ResizeObserver loop. A frame later it is a new one.
|
|
114
121
|
pendingFrames.set(host, requestAnimationFrame(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hero-corner.js","sourceRoot":"","sources":["../../../../../src/components/layout/page-sections/hero/hero-corner.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"hero-corner.js","sourceRoot":"","sources":["../../../../../src/components/layout/page-sections/hero/hero-corner.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAKlE,MAAM,OAAO,GAA0B,CAAC,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,CAAC,CAAC;AAehG,MAAM,UAAU,GAAG,IAAI,GAAG,CAAyB;IAClD,CAAC,cAAc,EAAE,aAAa,CAAC;IAC/B,CAAC,gBAAgB,EAAE,eAAe,CAAC;IACnC,CAAC,eAAe,EAAE,cAAc,CAAC;CACjC,CAAC,CAAC;AAEH;iFACiF;AACjF,MAAM,iBAAiB,GAAuC;IAC7D,aAAa,EAAE,WAAW;IAC1B,eAAe,EAAE,WAAW;IAC5B,Y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AAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC3B,KAAK,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,MAAM,EAAE,CAAC;YACrC,IAAI,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,KAAK,CAAC,KAAK,KAAK;gBAAE,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QACxF,CAAC;IACF,CAAC,CAAC,CAAC,CAAC;AACL,CAAC;AAED,qFAAqF;AACrF,MAAM,aAAa,GAAG,IAAI,OAAO,EAAoC,CAAC;AACtE,MAAM,aAAa,GAAG,IAAI,OAAO,EAAuB,CAAC;AAEzD,MAAM,UAAU,iBAAiB,CAAC,IAAiB;IAClD,MAAM,KAAK,GAAG,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACtC,IAAI,KAAK,KAAK,SAAS;QAAE,oBAAoB,CAAC,KAAK,CAAC,CAAC;IACrD,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3B,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3B,KAAK,MAAM,KAAK,IAAI,MAAM;QAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -34,15 +34,15 @@ export const heroCornerStyles = css `
|
|
|
34
34
|
--_hero-main-corner-radius: min(var(--_hero-corner-radius) / 2, var(--_hero-main-corner-limit, var(--_hero-corner-radius)));
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
/* ##
|
|
37
|
+
/* ## Against the edge */
|
|
38
38
|
|
|
39
|
-
:host([data-media-corner][data-has-media]) .hero {
|
|
39
|
+
:host([data-media-corner][data-has-media]:not([data-overlap])) .hero {
|
|
40
40
|
@container page-container (min-width: ${mdMin}) {
|
|
41
41
|
--_hero-main-inset: var(--primitives-space-0);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
:host([data-has-media]:is([data-main-corner="top-left"], [data-main-corner="top-right"])) .hero__main {
|
|
45
|
+
:host([data-has-media]:not([data-overlap]):is([data-main-corner="top-left"], [data-main-corner="top-right"])) .hero__main {
|
|
46
46
|
@container page-container (min-width: ${mdMin}) {
|
|
47
47
|
margin-top: var(--_hero-corner-radius);
|
|
48
48
|
}
|
|
@@ -54,7 +54,7 @@ export const heroCornerStyles = css `
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
/* On mobile the
|
|
57
|
+
/* On mobile the content area stands under the image instead of over its edge, as
|
|
58
58
|
wide as the image, so the rounded corner reads as the corner of one shape. */
|
|
59
59
|
:host([data-media-corner][data-has-media]) .hero__main {
|
|
60
60
|
@container page-container (max-width: ${smMax}) {
|
|
@@ -62,17 +62,17 @@ export const heroCornerStyles = css `
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
/* A
|
|
66
|
-
before the curve, with the
|
|
65
|
+
/* A content area along the same edge as the rounded corner of the image stops
|
|
66
|
+
before the curve, with the content area's own padding as the gap. */
|
|
67
67
|
:host([data-has-media][main-position^="top"][data-media-corner^="top"]) .hero__main,
|
|
68
|
-
:host([data-has-media]:is([main-position^="bottom"],
|
|
68
|
+
:host([data-has-media]:is([main-position^="bottom"], [data-overlap])[data-media-corner^="bottom"]) .hero__main {
|
|
69
69
|
@container page-container (min-width: ${mdMin}) {
|
|
70
70
|
max-width: min(var(--_hero-main-max-width), 100% - var(--_hero-media-corner-radius) - var(--_hero-main-padding));
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
:host([data-has-media][data-main-width-length][main-position^="top"][data-media-corner^="top"]) .hero__main,
|
|
75
|
-
:host([data-has-media][data-main-width-length]:is([main-position^="bottom"],
|
|
75
|
+
:host([data-has-media][data-main-width-length]:is([main-position^="bottom"], [data-overlap])[data-media-corner^="bottom"]) .hero__main {
|
|
76
76
|
@container page-container (min-width: ${mdMin}) {
|
|
77
77
|
max-width: calc(100% - var(--_hero-media-corner-radius) - var(--_hero-main-padding));
|
|
78
78
|
}
|
|
@@ -134,7 +134,7 @@ export const heroCornerStyles = css `
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
/* Along the two sides of its rounded corner the
|
|
137
|
+
/* Along the two sides of its rounded corner the content area takes more padding, so
|
|
138
138
|
the content keeps the usual padding to the curve as well:
|
|
139
139
|
r - (r - p) / sqrt(2), rounded up to a step of the scale. */
|
|
140
140
|
:host([data-main-corner]) .hero {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* The section that says what a page is for: it names the main goal of what
|
|
5
5
|
* you can find there, draws the eye and is the visual welcome. It has a media
|
|
6
|
-
* area and a
|
|
6
|
+
* area and a content area (the main) that can stand in eleven positions. The
|
|
7
7
|
* areas are rectangular; `corner` rounds one corner of each. Use it on pages
|
|
8
8
|
* where a visitor first has to know where they are, such as a home or a topic
|
|
9
9
|
* page; where the title already does that, a section with a title is enough.
|
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
* lays out by the width of that page.
|
|
12
12
|
*
|
|
13
13
|
* The image in a hero sets the mood and is never the main content, so the
|
|
14
|
-
*
|
|
15
|
-
* its edges, so it reads as a
|
|
14
|
+
* content area always stands on it. Over an image the content area keeps a section gap from
|
|
15
|
+
* its edges, so it reads as a content area on the image rather than a frame cut out of
|
|
16
16
|
* it; with `main-width="full"` it is a strip across the whole image, the same
|
|
17
|
-
* gap from the sides. On mobile the image comes first and the
|
|
17
|
+
* gap from the sides. On mobile the image comes first and the content area below it,
|
|
18
18
|
* indented by the section gap and overlapping the image by 48px. For an
|
|
19
19
|
* image beside text without that relation, use a section with an image beside
|
|
20
|
-
* text instead. Without media the main fills the whole area
|
|
21
|
-
* `main-background="base"`
|
|
22
|
-
* base surface.
|
|
20
|
+
* text instead. Without media the main fills the whole area. With
|
|
21
|
+
* `main-background="base"` the content area gets the highlight border of a card, with
|
|
22
|
+
* or without media, so its edge shows where it stands on the base surface.
|
|
23
23
|
*
|
|
24
24
|
* The hero is the head of a page and sits right under the top bar, so on md
|
|
25
25
|
* and lg its top padding is half that of the other page sections: the full
|
|
@@ -28,17 +28,18 @@
|
|
|
28
28
|
* The bottom keeps the full distance to the section below. Set `padding-top`
|
|
29
29
|
* to place a hero elsewhere.
|
|
30
30
|
*
|
|
31
|
-
* By default the
|
|
32
|
-
* (`
|
|
33
|
-
*
|
|
34
|
-
* that stands at the top or along
|
|
31
|
+
* By default the content area falls over the bottom of the image and runs on below it
|
|
32
|
+
* (`main-position="overlap-left"`, `overlap-center` or `overlap-right`), so the
|
|
33
|
+
* image keeps its height whatever the content. The other positions keep the
|
|
34
|
+
* content area on the image, for a short content area or one that stands at the top or along
|
|
35
|
+
* a side.
|
|
35
36
|
*
|
|
36
37
|
* The height of a hero comes from its image: `media-aspect-ratio`, or a fixed
|
|
37
38
|
* `media-height`. The `height` of the other page sections is not used here: as
|
|
38
|
-
* a minimum height for the whole hero it stretched the
|
|
39
|
+
* a minimum height for the whole hero it stretched the content area once that sat
|
|
39
40
|
* below the image. A hero given `height` says so in development.
|
|
40
41
|
*
|
|
41
|
-
* The
|
|
42
|
+
* The content area takes the accent color of the theme, closest to its reference
|
|
42
43
|
* color in both modes, with a pure white or black content color that it
|
|
43
44
|
* passes on, so the text, links and icons on it keep their contrast. `main-background="base"` gives it the base surface instead. A
|
|
44
45
|
* Rijkshuisstijl color per hero is gone: the theme picks the color for the
|
|
@@ -48,19 +49,22 @@
|
|
|
48
49
|
* @related nldd-full-bleed-section
|
|
49
50
|
*
|
|
50
51
|
* @attr {'inherit'|'base'|'tinted'} background - Surface behind the hero (section API)
|
|
51
|
-
* @attr {'accent'|'base'} main-background - Surface color of the
|
|
52
|
-
* @attr {string} corner - Rounds one corner of the media area, in the shape language of the Rijkshuisstijl: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right', or empty (or 'auto') to let the hero choose a corner the
|
|
53
|
-
* @attr {'
|
|
52
|
+
* @attr {'accent'|'base'} main-background - Surface color of the content area: 'accent' (default), the accent color of the theme, or 'base', the base surface
|
|
53
|
+
* @attr {string} corner - Rounds one corner of the media area, in the shape language of the Rijkshuisstijl: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right', or empty (or 'auto') to let the hero choose a corner the content area leaves free. With media it applies in every position: with a content area that overlaps the image takes the corner of `bottom-left`, `bottom-center` or `bottom-right`, and the content area keeps its distance from the edge and stays square; a centered content area gets its corner on the side of the corner of the image. A content area on the image stands against its edge, so a `main-width` in percent (33.33%, 50%) is a share of the image, and gets a corner at half the radius, the one pointing into the image, with more padding along its two sides so the content keeps its distance to the curve. A content area along the same edge as the rounded corner of the image stops before the curve, at the content area's padding from it; a content area along a full side, a `main-width="full"` strip and the content area on mobile stay square. On mobile a bottom corner moves to the top, and the content area stands under the image, as wide as it, instead of overlapping it. Without media the content area is the whole hero: the corner applies in every position, at half the radius, and the hero chooses top-right, or top-left for a content area on the right. The radius comes from the ribbon width: 1.5X on sm, 2X on md and lg, and is never more than a third of the shortest side of the area it rounds, so a low hero keeps a corner rather than a drop. Says so in development when the chosen corner sits under the content area, or with `width="full"`
|
|
54
|
+
* @attr {'overlap-left'|'overlap-center'|'overlap-right'|'top-left'|'top-center'|'top-right'|'left'|'right'|'bottom-left'|'bottom-center'|'bottom-right'} main-position -
|
|
55
|
+
* Where the content area stands, and how it relates to the image (default: 'overlap-left'). The 'overlap-' positions
|
|
56
|
+
* let it fall `overlap-size` over the bottom of the image and run on below as far as its content needs, so the image
|
|
57
|
+
* keeps its height whatever the content; the image then has a fixed height (320px on md, 400px on lg) unless
|
|
58
|
+
* `media-height` or `media-aspect-ratio` is set, and a content area shorter than `overlap-size` ends inside the image and
|
|
59
|
+
* says so in development. The other positions keep the content area on the image; 'left'/'right' span its full height
|
|
54
60
|
* @attr {string} width - Body max-width; 'full' removes the bound (section API)
|
|
55
61
|
* @attr {string} media-height - Fixed height of the media area, any CSS length (e.g. '320px', '40vh'); wins over media-aspect-ratio. An invalid value falls back to the ratio
|
|
56
62
|
* @attr {string} media-aspect-ratio - Aspect ratio of the media area (CSS form, '16/9' or '16:9');
|
|
57
63
|
* default '21/9'. On md/lg it sets the height of the hero, on sm the height of the media area
|
|
58
64
|
* @attr {boolean} grow - Takes the height the page has left, so the footer sits at the bottom of a short page. Without it, nldd-page lets its last section grow.
|
|
59
|
-
* @attr {string} main-width - Width of the
|
|
60
|
-
* @attr {string} overlap-size - With
|
|
65
|
+
* @attr {string} main-width - Width of the content area (default: 'auto'). 'auto' follows the content, between 480px and 640px and never wider than the image allows: a short title gets a narrow content area, a paragraph runs on to a readable line length. 'full' makes a strip across the whole image, at the top or the bottom, and is ignored with 'left'/'right'. Any CSS width (e.g. '560px', '60%') sets it exactly on md and lg, still never wider than the image allows; an invalid value falls back to 'auto'
|
|
66
|
+
* @attr {string} overlap-size - With an overlap position: how far the content area falls over the bottom of the image, any CSS length (default: 160px). The overlap stays the same whatever the height of the image; a content area shorter than this ends inside the image
|
|
61
67
|
* @attr {string} padding-block - Block padding override, also per edge and responsive (section API)
|
|
62
|
-
* @attr {'top-left'|'top-center'|'top-right'|'bottom-left'|'bottom-center'|'bottom-right'|'left'|'right'} main-position -
|
|
63
|
-
* Position of the text panel (default: 'bottom-left'); 'left'/'right' span the full height
|
|
64
68
|
* @attr {string} media-src - Source of the media area (an alternative to the media slot);
|
|
65
69
|
* ignored as soon as the media slot is filled
|
|
66
70
|
* @attr {string} media-srcset - Responsive source set for media-src
|
|
@@ -71,12 +75,11 @@
|
|
|
71
75
|
* @accepts img
|
|
72
76
|
* Takes precedence over the media-src attributes. Set `alt=""` when the image is decorative;
|
|
73
77
|
* otherwise give a describing alt text.
|
|
74
|
-
* @slot -
|
|
78
|
+
* @slot - What goes in the content area (nldd-title and nldd-rich-text, for instance)
|
|
75
79
|
*/
|
|
76
80
|
import { LitElement, type PropertyValues } from 'lit';
|
|
77
|
-
export type HeroMainPosition = '
|
|
81
|
+
export type HeroMainPosition = 'overlap-left' | 'overlap-center' | 'overlap-right' | 'top-left' | 'top-center' | 'top-right' | 'left' | 'right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
78
82
|
export type HeroMainWidth = 'auto' | 'full' | (string & {});
|
|
79
|
-
export type HeroLayout = 'contained' | 'overlap';
|
|
80
83
|
export type HeroMainBackground = 'accent' | 'base';
|
|
81
84
|
declare const NLDDHero_base: typeof LitElement & (new (...args: any[]) => LitElement & {
|
|
82
85
|
background: import("../../../../utilities/page-section-mixin.js").PageSectionBackground;
|
|
@@ -99,11 +102,11 @@ declare const NLDDHero_base: typeof LitElement & (new (...args: any[]) => LitEle
|
|
|
99
102
|
export declare class NLDDHero extends NLDDHero_base {
|
|
100
103
|
static styles: import("lit").CSSResult[];
|
|
101
104
|
mainBackground: HeroMainBackground;
|
|
102
|
-
/** Rounds one corner of the media area and one of the
|
|
105
|
+
/** Rounds one corner of the media area and one of the content area, or without
|
|
103
106
|
* media one corner of the hero. An empty value lets the hero choose the
|
|
104
107
|
* corner from `main-position`. */
|
|
105
108
|
corner: string | null;
|
|
106
|
-
|
|
109
|
+
mainPosition: HeroMainPosition;
|
|
107
110
|
/** Width mode: 'full' (removes body max-width) or any CSS length. */
|
|
108
111
|
width: string;
|
|
109
112
|
mediaHeight: string;
|
|
@@ -112,7 +115,6 @@ export declare class NLDDHero extends NLDDHero_base {
|
|
|
112
115
|
mediaAspectRatio: string;
|
|
113
116
|
mainWidth: HeroMainWidth;
|
|
114
117
|
overlapSize: string;
|
|
115
|
-
mainPosition: HeroMainPosition;
|
|
116
118
|
/** Hybrid media source: media-src renders an internal <img>, but a slotted
|
|
117
119
|
* media element wins (mirrors nldd-image / nldd-identity). srcset/sizes/alt
|
|
118
120
|
* feed that internal img. */
|
|
@@ -123,6 +125,8 @@ export declare class NLDDHero extends NLDDHero_base {
|
|
|
123
125
|
_slotHasMedia: boolean;
|
|
124
126
|
/** Media is present when the slot has content or media-src is set. */
|
|
125
127
|
get _hasMedia(): boolean;
|
|
128
|
+
/** Whether the content area falls over the bottom of the image instead of standing on it. */
|
|
129
|
+
get _overlaps(): boolean;
|
|
126
130
|
willUpdate(changed: PropertyValues): void;
|
|
127
131
|
connectedCallback(): void;
|
|
128
132
|
disconnectedCallback(): void;
|
|
@@ -130,11 +134,11 @@ export declare class NLDDHero extends NLDDHero_base {
|
|
|
130
134
|
/** Measures the rounded areas, so the radius never outgrows them. */
|
|
131
135
|
private _cornerObserver;
|
|
132
136
|
private _watchCorner;
|
|
133
|
-
/** DEV-only: watches an overlap hero for a
|
|
137
|
+
/** DEV-only: watches an overlap hero for a content area that does not reach below its image. */
|
|
134
138
|
private _overlapObserver;
|
|
135
139
|
private _watchOverlap;
|
|
136
140
|
/**
|
|
137
|
-
* In an overlap hero the
|
|
141
|
+
* In an overlap hero the content area is meant to run on below the image. When it
|
|
138
142
|
* ends inside it, the content is shorter than `overlap-size`; the consumer
|
|
139
143
|
* decides how far it runs on, so this is only stated, in development.
|
|
140
144
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hero.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/page-sections/hero/hero.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"hero.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/page-sections/hero/hero.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8EG;AACH,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAWtD,MAAM,MAAM,gBAAgB,GAAG,cAAc,GAAG,gBAAgB,GAAG,eAAe,GAAG,UAAU,GAAG,YAAY,GAAG,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,aAAa,GAAG,eAAe,GAAG,cAAc,CAAC;AACnM,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MA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(this && this.__decorate) || function (decorators, target, key,
|
|
|
9
9
|
*
|
|
10
10
|
* The section that says what a page is for: it names the main goal of what
|
|
11
11
|
* you can find there, draws the eye and is the visual welcome. It has a media
|
|
12
|
-
* area and a
|
|
12
|
+
* area and a content area (the main) that can stand in eleven positions. The
|
|
13
13
|
* areas are rectangular; `corner` rounds one corner of each. Use it on pages
|
|
14
14
|
* where a visitor first has to know where they are, such as a home or a topic
|
|
15
15
|
* page; where the title already does that, a section with a title is enough.
|
|
@@ -17,15 +17,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
17
17
|
* lays out by the width of that page.
|
|
18
18
|
*
|
|
19
19
|
* The image in a hero sets the mood and is never the main content, so the
|
|
20
|
-
*
|
|
21
|
-
* its edges, so it reads as a
|
|
20
|
+
* content area always stands on it. Over an image the content area keeps a section gap from
|
|
21
|
+
* its edges, so it reads as a content area on the image rather than a frame cut out of
|
|
22
22
|
* it; with `main-width="full"` it is a strip across the whole image, the same
|
|
23
|
-
* gap from the sides. On mobile the image comes first and the
|
|
23
|
+
* gap from the sides. On mobile the image comes first and the content area below it,
|
|
24
24
|
* indented by the section gap and overlapping the image by 48px. For an
|
|
25
25
|
* image beside text without that relation, use a section with an image beside
|
|
26
|
-
* text instead. Without media the main fills the whole area
|
|
27
|
-
* `main-background="base"`
|
|
28
|
-
* base surface.
|
|
26
|
+
* text instead. Without media the main fills the whole area. With
|
|
27
|
+
* `main-background="base"` the content area gets the highlight border of a card, with
|
|
28
|
+
* or without media, so its edge shows where it stands on the base surface.
|
|
29
29
|
*
|
|
30
30
|
* The hero is the head of a page and sits right under the top bar, so on md
|
|
31
31
|
* and lg its top padding is half that of the other page sections: the full
|
|
@@ -34,17 +34,18 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
34
34
|
* The bottom keeps the full distance to the section below. Set `padding-top`
|
|
35
35
|
* to place a hero elsewhere.
|
|
36
36
|
*
|
|
37
|
-
* By default the
|
|
38
|
-
* (`
|
|
39
|
-
*
|
|
40
|
-
* that stands at the top or along
|
|
37
|
+
* By default the content area falls over the bottom of the image and runs on below it
|
|
38
|
+
* (`main-position="overlap-left"`, `overlap-center` or `overlap-right`), so the
|
|
39
|
+
* image keeps its height whatever the content. The other positions keep the
|
|
40
|
+
* content area on the image, for a short content area or one that stands at the top or along
|
|
41
|
+
* a side.
|
|
41
42
|
*
|
|
42
43
|
* The height of a hero comes from its image: `media-aspect-ratio`, or a fixed
|
|
43
44
|
* `media-height`. The `height` of the other page sections is not used here: as
|
|
44
|
-
* a minimum height for the whole hero it stretched the
|
|
45
|
+
* a minimum height for the whole hero it stretched the content area once that sat
|
|
45
46
|
* below the image. A hero given `height` says so in development.
|
|
46
47
|
*
|
|
47
|
-
* The
|
|
48
|
+
* The content area takes the accent color of the theme, closest to its reference
|
|
48
49
|
* color in both modes, with a pure white or black content color that it
|
|
49
50
|
* passes on, so the text, links and icons on it keep their contrast. `main-background="base"` gives it the base surface instead. A
|
|
50
51
|
* Rijkshuisstijl color per hero is gone: the theme picks the color for the
|
|
@@ -54,19 +55,22 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
54
55
|
* @related nldd-full-bleed-section
|
|
55
56
|
*
|
|
56
57
|
* @attr {'inherit'|'base'|'tinted'} background - Surface behind the hero (section API)
|
|
57
|
-
* @attr {'accent'|'base'} main-background - Surface color of the
|
|
58
|
-
* @attr {string} corner - Rounds one corner of the media area, in the shape language of the Rijkshuisstijl: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right', or empty (or 'auto') to let the hero choose a corner the
|
|
59
|
-
* @attr {'
|
|
58
|
+
* @attr {'accent'|'base'} main-background - Surface color of the content area: 'accent' (default), the accent color of the theme, or 'base', the base surface
|
|
59
|
+
* @attr {string} corner - Rounds one corner of the media area, in the shape language of the Rijkshuisstijl: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right', or empty (or 'auto') to let the hero choose a corner the content area leaves free. With media it applies in every position: with a content area that overlaps the image takes the corner of `bottom-left`, `bottom-center` or `bottom-right`, and the content area keeps its distance from the edge and stays square; a centered content area gets its corner on the side of the corner of the image. A content area on the image stands against its edge, so a `main-width` in percent (33.33%, 50%) is a share of the image, and gets a corner at half the radius, the one pointing into the image, with more padding along its two sides so the content keeps its distance to the curve. A content area along the same edge as the rounded corner of the image stops before the curve, at the content area's padding from it; a content area along a full side, a `main-width="full"` strip and the content area on mobile stay square. On mobile a bottom corner moves to the top, and the content area stands under the image, as wide as it, instead of overlapping it. Without media the content area is the whole hero: the corner applies in every position, at half the radius, and the hero chooses top-right, or top-left for a content area on the right. The radius comes from the ribbon width: 1.5X on sm, 2X on md and lg, and is never more than a third of the shortest side of the area it rounds, so a low hero keeps a corner rather than a drop. Says so in development when the chosen corner sits under the content area, or with `width="full"`
|
|
60
|
+
* @attr {'overlap-left'|'overlap-center'|'overlap-right'|'top-left'|'top-center'|'top-right'|'left'|'right'|'bottom-left'|'bottom-center'|'bottom-right'} main-position -
|
|
61
|
+
* Where the content area stands, and how it relates to the image (default: 'overlap-left'). The 'overlap-' positions
|
|
62
|
+
* let it fall `overlap-size` over the bottom of the image and run on below as far as its content needs, so the image
|
|
63
|
+
* keeps its height whatever the content; the image then has a fixed height (320px on md, 400px on lg) unless
|
|
64
|
+
* `media-height` or `media-aspect-ratio` is set, and a content area shorter than `overlap-size` ends inside the image and
|
|
65
|
+
* says so in development. The other positions keep the content area on the image; 'left'/'right' span its full height
|
|
60
66
|
* @attr {string} width - Body max-width; 'full' removes the bound (section API)
|
|
61
67
|
* @attr {string} media-height - Fixed height of the media area, any CSS length (e.g. '320px', '40vh'); wins over media-aspect-ratio. An invalid value falls back to the ratio
|
|
62
68
|
* @attr {string} media-aspect-ratio - Aspect ratio of the media area (CSS form, '16/9' or '16:9');
|
|
63
69
|
* default '21/9'. On md/lg it sets the height of the hero, on sm the height of the media area
|
|
64
70
|
* @attr {boolean} grow - Takes the height the page has left, so the footer sits at the bottom of a short page. Without it, nldd-page lets its last section grow.
|
|
65
|
-
* @attr {string} main-width - Width of the
|
|
66
|
-
* @attr {string} overlap-size - With
|
|
71
|
+
* @attr {string} main-width - Width of the content area (default: 'auto'). 'auto' follows the content, between 480px and 640px and never wider than the image allows: a short title gets a narrow content area, a paragraph runs on to a readable line length. 'full' makes a strip across the whole image, at the top or the bottom, and is ignored with 'left'/'right'. Any CSS width (e.g. '560px', '60%') sets it exactly on md and lg, still never wider than the image allows; an invalid value falls back to 'auto'
|
|
72
|
+
* @attr {string} overlap-size - With an overlap position: how far the content area falls over the bottom of the image, any CSS length (default: 160px). The overlap stays the same whatever the height of the image; a content area shorter than this ends inside the image
|
|
67
73
|
* @attr {string} padding-block - Block padding override, also per edge and responsive (section API)
|
|
68
|
-
* @attr {'top-left'|'top-center'|'top-right'|'bottom-left'|'bottom-center'|'bottom-right'|'left'|'right'} main-position -
|
|
69
|
-
* Position of the text panel (default: 'bottom-left'); 'left'/'right' span the full height
|
|
70
74
|
* @attr {string} media-src - Source of the media area (an alternative to the media slot);
|
|
71
75
|
* ignored as soon as the media slot is filled
|
|
72
76
|
* @attr {string} media-srcset - Responsive source set for media-src
|
|
@@ -77,7 +81,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
77
81
|
* @accepts img
|
|
78
82
|
* Takes precedence over the media-src attributes. Set `alt=""` when the image is decorative;
|
|
79
83
|
* otherwise give a describing alt text.
|
|
80
|
-
* @slot -
|
|
84
|
+
* @slot - What goes in the content area (nldd-title and nldd-rich-text, for instance)
|
|
81
85
|
*/
|
|
82
86
|
import { LitElement } from 'lit';
|
|
83
87
|
import { property, state } from 'lit/decorators.js';
|
|
@@ -89,6 +93,8 @@ import { heroTemplate } from './hero.template.js';
|
|
|
89
93
|
import { heroCornerStyles } from './hero-corner.styles.js';
|
|
90
94
|
import { applyCorner, clearCornerLimits, limitCorner } from './hero-corner.js';
|
|
91
95
|
import { setState } from '../../../../utilities/element-state.js';
|
|
96
|
+
/** The positions that keep the content area on the image; any other value overlaps, as the default does. */
|
|
97
|
+
const ON_IMAGE = new Set(['top-left', 'top-center', 'top-right', 'left', 'right', 'bottom-left', 'bottom-center', 'bottom-right']);
|
|
92
98
|
const CSS_WIDE_KEYWORDS = new Set(['inherit', 'initial', 'unset', 'revert', 'revert-layer']);
|
|
93
99
|
/**
|
|
94
100
|
* Whether `property` takes `value` as a value of its own. CSS.supports alone
|
|
@@ -103,11 +109,11 @@ let NLDDHero = class NLDDHero extends PageSectionMixin(LitElement) {
|
|
|
103
109
|
constructor() {
|
|
104
110
|
super(...arguments);
|
|
105
111
|
this.mainBackground = 'accent';
|
|
106
|
-
/** Rounds one corner of the media area and one of the
|
|
112
|
+
/** Rounds one corner of the media area and one of the content area, or without
|
|
107
113
|
* media one corner of the hero. An empty value lets the hero choose the
|
|
108
114
|
* corner from `main-position`. */
|
|
109
115
|
this.corner = null;
|
|
110
|
-
this.
|
|
116
|
+
this.mainPosition = 'overlap-left';
|
|
111
117
|
/** Width mode: 'full' (removes body max-width) or any CSS length. */
|
|
112
118
|
this.width = '';
|
|
113
119
|
this.mediaHeight = '';
|
|
@@ -116,7 +122,6 @@ let NLDDHero = class NLDDHero extends PageSectionMixin(LitElement) {
|
|
|
116
122
|
this.mediaAspectRatio = '';
|
|
117
123
|
this.mainWidth = 'auto';
|
|
118
124
|
this.overlapSize = '';
|
|
119
|
-
this.mainPosition = 'bottom-left';
|
|
120
125
|
/** Hybrid media source: media-src renders an internal <img>, but a slotted
|
|
121
126
|
* media element wins (mirrors nldd-image / nldd-identity). srcset/sizes/alt
|
|
122
127
|
* feed that internal img. */
|
|
@@ -127,16 +132,21 @@ let NLDDHero = class NLDDHero extends PageSectionMixin(LitElement) {
|
|
|
127
132
|
this._slotHasMedia = false;
|
|
128
133
|
/** Measures the rounded areas, so the radius never outgrows them. */
|
|
129
134
|
this._cornerObserver = null;
|
|
130
|
-
/** DEV-only: watches an overlap hero for a
|
|
135
|
+
/** DEV-only: watches an overlap hero for a content area that does not reach below its image. */
|
|
131
136
|
this._overlapObserver = null;
|
|
132
137
|
}
|
|
133
138
|
/** Media is present when the slot has content or media-src is set. */
|
|
134
139
|
get _hasMedia() {
|
|
135
140
|
return this.mediaSrc !== '' || this._slotHasMedia;
|
|
136
141
|
}
|
|
142
|
+
/** Whether the content area falls over the bottom of the image instead of standing on it. */
|
|
143
|
+
get _overlaps() {
|
|
144
|
+
return !ON_IMAGE.has(this.mainPosition);
|
|
145
|
+
}
|
|
137
146
|
willUpdate(changed) {
|
|
138
147
|
super.willUpdate(changed);
|
|
139
148
|
this.toggleAttribute('data-has-media', this._hasMedia);
|
|
149
|
+
this.toggleAttribute('data-overlap', this._overlaps);
|
|
140
150
|
applyCorner(this);
|
|
141
151
|
}
|
|
142
152
|
connectedCallback() {
|
|
@@ -166,7 +176,7 @@ let NLDDHero = class NLDDHero extends PageSectionMixin(LitElement) {
|
|
|
166
176
|
this.style.removeProperty('--_hero-max-width');
|
|
167
177
|
}
|
|
168
178
|
}
|
|
169
|
-
if (import.meta.env?.DEV && changed.has('
|
|
179
|
+
if (import.meta.env?.DEV && changed.has('mainPosition'))
|
|
170
180
|
this._watchOverlap();
|
|
171
181
|
if (changed.has('corner'))
|
|
172
182
|
this._watchCorner();
|
|
@@ -236,7 +246,7 @@ let NLDDHero = class NLDDHero extends PageSectionMixin(LitElement) {
|
|
|
236
246
|
this._cornerObserver.observe(main);
|
|
237
247
|
}
|
|
238
248
|
_watchOverlap() {
|
|
239
|
-
const watch = this.
|
|
249
|
+
const watch = this._overlaps && typeof ResizeObserver !== 'undefined';
|
|
240
250
|
if (!watch) {
|
|
241
251
|
this._overlapObserver?.disconnect();
|
|
242
252
|
this._overlapObserver = null;
|
|
@@ -254,7 +264,7 @@ let NLDDHero = class NLDDHero extends PageSectionMixin(LitElement) {
|
|
|
254
264
|
this._overlapObserver.observe(main);
|
|
255
265
|
}
|
|
256
266
|
/**
|
|
257
|
-
* In an overlap hero the
|
|
267
|
+
* In an overlap hero the content area is meant to run on below the image. When it
|
|
258
268
|
* ends inside it, the content is shorter than `overlap-size`; the consumer
|
|
259
269
|
* decides how far it runs on, so this is only stated, in development.
|
|
260
270
|
*/
|
|
@@ -280,8 +290,8 @@ __decorate([
|
|
|
280
290
|
property({ type: String, reflect: true })
|
|
281
291
|
], NLDDHero.prototype, "corner", void 0);
|
|
282
292
|
__decorate([
|
|
283
|
-
property({ reflect: true, converter: reflectNonDefault('overlap') })
|
|
284
|
-
], NLDDHero.prototype, "
|
|
293
|
+
property({ reflect: true, attribute: 'main-position', converter: reflectNonDefault('overlap-left') })
|
|
294
|
+
], NLDDHero.prototype, "mainPosition", void 0);
|
|
285
295
|
__decorate([
|
|
286
296
|
property({ reflect: true, converter: reflectNonDefault('') })
|
|
287
297
|
], NLDDHero.prototype, "width", void 0);
|
|
@@ -297,9 +307,6 @@ __decorate([
|
|
|
297
307
|
__decorate([
|
|
298
308
|
property({ reflect: true, attribute: 'overlap-size', converter: reflectNonDefault('') })
|
|
299
309
|
], NLDDHero.prototype, "overlapSize", void 0);
|
|
300
|
-
__decorate([
|
|
301
|
-
property({ reflect: true, attribute: 'main-position', converter: reflectNonDefault('bottom-left') })
|
|
302
|
-
], NLDDHero.prototype, "mainPosition", void 0);
|
|
303
310
|
__decorate([
|
|
304
311
|
property({ type: String, attribute: 'media-src' })
|
|
305
312
|
], NLDDHero.prototype, "mediaSrc", void 0);
|