@nldd/design-system 0.20.0 → 0.21.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 +204 -8
- package/dist/cdn/autoloader.js +181 -0
- package/dist/cdn/chunks/activity-indicator-JglZJ8dh.js +356 -0
- package/dist/cdn/chunks/activity-indicator.i18n-D7mCy6d2.js +3 -0
- package/dist/cdn/chunks/avatar-ASqePVhU.js +308 -0
- package/dist/cdn/chunks/avatar-group-rknt4FBO.js +338 -0
- package/dist/cdn/chunks/avatar-group.i18n-BYw_9wt_.js +7 -0
- package/dist/cdn/chunks/avatar.i18n-CMwQjBkS.js +7 -0
- package/dist/cdn/chunks/badge-Cc2Nufoc.js +323 -0
- package/dist/cdn/chunks/badge.i18n-DqW7hLQj.js +3 -0
- package/dist/cdn/chunks/banner-BLVKM07M.js +325 -0
- package/dist/cdn/chunks/banner.i18n-BOCM9rGN.js +3 -0
- package/dist/cdn/chunks/bar-split-view-Clbg-p9H.js +259 -0
- package/dist/cdn/chunks/base-CfuoYRhN.js +3 -0
- package/dist/cdn/chunks/blockquote-BoOqbGdm.js +189 -0
- package/dist/cdn/chunks/box-WkhyjQVy.js +88 -0
- package/dist/cdn/chunks/breadcrumbs-D9YxZzRj.js +162 -0
- package/dist/cdn/chunks/breadcrumbs.i18n-zmO8jaTO.js +3 -0
- package/dist/cdn/chunks/breakpoints-Cwor8TRP.js +15 -0
- package/dist/cdn/chunks/button-DO90Lo6q.js +863 -0
- package/dist/cdn/chunks/button-bar-Bxgdbyh3.js +225 -0
- package/dist/cdn/chunks/button-group-BYGPPLmZ.js +205 -0
- package/dist/{components/button.i18n-DiDGynnq.js → cdn/chunks/button.i18n-BGFt7Z9u.js} +2 -2
- package/dist/cdn/chunks/card-BP0jfOkS.js +262 -0
- package/dist/cdn/chunks/card.i18n-CpafLm3i.js +8 -0
- package/dist/cdn/chunks/carried-context-DlMSujiJ.js +37 -0
- package/dist/cdn/chunks/cell-BRD2ilQh.js +144 -0
- package/dist/cdn/chunks/checkbox-Cazx8CQn.js +296 -0
- package/dist/cdn/chunks/checkbox-field-DDZ-B6vH.js +157 -0
- package/dist/cdn/chunks/class-map-CXSdNjt8.js +26 -0
- package/dist/cdn/chunks/code-editor-D6Q55oaY.js +286 -0
- package/dist/cdn/chunks/code-viewer-DspLH2T1.js +766 -0
- package/dist/cdn/chunks/code-viewer.i18n-BHfSDRbK.js +13 -0
- package/dist/cdn/chunks/codemirror-input-Db65x22n.js +1232 -0
- package/dist/cdn/chunks/collection-NVtkvDls.js +396 -0
- package/dist/cdn/chunks/collection.i18n-DqWPGnZO.js +8 -0
- package/dist/cdn/chunks/combo-box-DyBQSaQl.js +512 -0
- package/dist/cdn/chunks/combo-box.i18n-BorzYnJ2.js +6 -0
- package/dist/cdn/chunks/container-rrbwk0z4.js +602 -0
- package/dist/cdn/chunks/custom-element-BW8Ua4c7.js +7 -0
- package/dist/cdn/chunks/custom-element-q6NzoL5b.js +301 -0
- package/dist/cdn/chunks/custom-font-size-D7KNr84p.js +57 -0
- package/dist/cdn/chunks/date-field-Clti_wKN.js +654 -0
- package/dist/cdn/chunks/date-field.i18n-BTzc0E9a.js +15 -0
- package/dist/cdn/chunks/date-picker-2TCQLd5D.js +993 -0
- package/dist/cdn/chunks/date-picker.i18n-Dsc_M5QK.js +82 -0
- package/dist/cdn/chunks/decorate-TduJMFD_.js +280 -0
- package/dist/cdn/chunks/defer-focus-F73ud2D9.js +9 -0
- package/dist/cdn/chunks/described-by-mixin-daRE7orX.js +32 -0
- package/dist/cdn/chunks/description-cell-CQwOj_rN.js +166 -0
- package/dist/cdn/chunks/dev-checks-zW_W-hnh.js +2695 -0
- package/dist/cdn/chunks/directive-CwRgozUW.js +27 -0
- package/dist/cdn/chunks/dismiss-from-title-bar-C6mP7sWP.js +5 -0
- package/dist/cdn/chunks/dist-3C80SZN9.js +849 -0
- package/dist/cdn/chunks/dist-A7_1pHX0.js +379 -0
- package/dist/cdn/chunks/dist-BEfLdOvy.js +1346 -0
- package/dist/cdn/chunks/dist-BTUxFM2V.js +268 -0
- package/dist/cdn/chunks/dist-CP3G1pSK.js +1037 -0
- package/dist/cdn/chunks/dist-C_dGY6zR.js +468 -0
- package/dist/{components/dist-B9YBOGFW.js → cdn/chunks/dist-ChmCRv39.js} +109 -153
- package/dist/{components/dist-CJm4tkNC.js → cdn/chunks/dist-D2qap2OY.js} +23 -31
- package/dist/cdn/chunks/dist-DPUBF0MZ.js +1593 -0
- package/dist/{components/dist-4g23YHP0.js → cdn/chunks/dist-DrTzvgE7.js} +291 -404
- package/dist/cdn/chunks/dist-EM4MWLQq.js +385 -0
- package/dist/cdn/chunks/dist-EgIBI-FG.js +293 -0
- package/dist/{components/dist-Bf823YyL.js → cdn/chunks/dist-Rm6FvrSR.js} +272 -551
- package/dist/cdn/chunks/divider-CCNbnplA.js +53 -0
- package/dist/cdn/chunks/document-tab-bar-CUc4WWY3.js +973 -0
- package/dist/cdn/chunks/document-tab-bar.i18n-DKrA9TnB.js +9 -0
- package/dist/cdn/chunks/drag-handle-cell-CbzDYebG.js +206 -0
- package/dist/cdn/chunks/drag-handle-cell.i18n-CKUrbm2q.js +3 -0
- package/dist/cdn/chunks/dropdown-DZTZtkm5.js +350 -0
- package/dist/cdn/chunks/element-state-B-44fVqq.js +20 -0
- package/dist/cdn/chunks/file-field-Bff6_1pp.js +1484 -0
- package/dist/cdn/chunks/file-field.i18n-pDM7Utud.js +40 -0
- package/dist/cdn/chunks/floating-ui.dom-B8J1rV2c.js +753 -0
- package/dist/cdn/chunks/focus-target-DSLGcCWq.js +24 -0
- package/dist/cdn/chunks/form-actions-C_7hINq-.js +90 -0
- package/dist/cdn/chunks/form-associated-mixin--GIbl98p.js +62 -0
- package/dist/cdn/chunks/form-field--4nWJ_DK.js +364 -0
- package/dist/cdn/chunks/form-hXLgy_tY.js +84 -0
- package/dist/cdn/chunks/form-section-By-D4un0.js +64 -0
- package/dist/cdn/chunks/full-bleed-section-Dg4sIJG1.js +161 -0
- package/dist/cdn/chunks/gherkin-eseYvsxh.js +29 -0
- package/dist/cdn/chunks/hero-CQQMNCT_.js +761 -0
- package/dist/{components/icon-_Eox7ZfO.js → cdn/chunks/icon-BORlalt0.js} +298 -308
- package/dist/cdn/chunks/icon-button-rKiIHs7A.js +632 -0
- package/dist/{components/icon-button.i18n-1_N-wN6x.js → cdn/chunks/icon-button.i18n-DpZOfIS4.js} +2 -4
- package/dist/cdn/chunks/icon-cell-rk4NQid2.js +156 -0
- package/dist/cdn/chunks/identity-Cg1l0HhB.js +187 -0
- package/dist/cdn/chunks/if-defined-CaKKERku.js +4 -0
- package/dist/cdn/chunks/image-DZMW6JgL.js +659 -0
- package/dist/cdn/chunks/image.i18n-ONcm1h7o.js +3 -0
- package/dist/cdn/chunks/implicit-submission-Csbcor_E.js +27 -0
- package/dist/cdn/chunks/inline-dialog-WlqtPBPJ.js +259 -0
- package/dist/cdn/chunks/input-modality-XE0B7yCn.js +42 -0
- package/dist/cdn/chunks/just-in-time-education-DRcb5g7x.js +611 -0
- package/dist/cdn/chunks/just-in-time-education.i18n-CW_dsaxf.js +6 -0
- package/dist/cdn/chunks/kanban-Ca_mfqsA.js +400 -0
- package/dist/cdn/chunks/kanban-column-fgIMc7pw.js +375 -0
- package/dist/cdn/chunks/kanban.i18n-CWqc3e0B.js +11 -0
- package/dist/cdn/chunks/keyboard-shortcut-EknnW7Ub.js +267 -0
- package/dist/cdn/chunks/languages-yKikVFv_.js +8893 -0
- package/dist/cdn/chunks/link-FBSAJ3UC.js +229 -0
- package/dist/cdn/chunks/link-group-90qVfKa0.js +111 -0
- package/dist/cdn/chunks/link-hint-KFhgr5Ng.js +24 -0
- package/dist/cdn/chunks/link-rel-DvrTEfVT.js +8 -0
- package/dist/cdn/chunks/link.i18n-DJPobGmu.js +8 -0
- package/dist/cdn/chunks/list-CaWl3q0Z.js +880 -0
- package/dist/cdn/chunks/list-item-Cagnf6eG.js +802 -0
- package/dist/cdn/chunks/list-item-segment-BRzBF1y_.js +315 -0
- package/dist/cdn/chunks/list-item-segment.i18n-DHnrQL4V.js +8 -0
- package/dist/{components/list-item.i18n-89uqlBMK.js → cdn/chunks/list-item.i18n-Br6J5Ev9.js} +2 -2
- package/dist/cdn/chunks/list-items-Du0RCWsY.js +6 -0
- package/dist/{components/list.i18n-CKqbhFQ_.js → cdn/chunks/list.i18n-C40ltgdI.js} +2 -2
- package/dist/cdn/chunks/loading-tags-DtUr-DR7.js +3 -0
- package/dist/cdn/chunks/menu-BOu_pD1Q.js +719 -0
- package/dist/cdn/chunks/menu-bar-0NFXvq-v.js +253 -0
- package/dist/cdn/chunks/menu-bar-item-DGSC_ETi.js +365 -0
- package/dist/cdn/chunks/menu-bar.i18n-BoMu4Eoz.js +3 -0
- package/dist/cdn/chunks/menu-divider-CLLRgMll.js +15 -0
- package/dist/cdn/chunks/menu-group-BL24ChpR.js +23 -0
- package/dist/cdn/chunks/menu-item-CooKfrFa.js +140 -0
- package/dist/cdn/chunks/menu.i18n-C6uYJsG3.js +10 -0
- package/dist/cdn/chunks/menu.template-C6rbfI-u.js +642 -0
- package/dist/cdn/chunks/modal-dialog-BrUMP4Jm.js +240 -0
- package/dist/cdn/chunks/multi-line-text-field-D7hXhyOn.js +318 -0
- package/dist/cdn/chunks/navigation-split-view-B2ZQhxEb.js +621 -0
- package/dist/cdn/chunks/nl.generated-D6T41jG3.js +112 -0
- package/dist/cdn/chunks/notification-DSGP14d1.js +492 -0
- package/dist/cdn/chunks/notification.i18n-BKUSLN5c.js +6 -0
- package/dist/cdn/chunks/number-field-B8op14Y_.js +301 -0
- package/dist/cdn/chunks/number-field.i18n-BS0bINWY.js +7 -0
- package/dist/cdn/chunks/one-half-one-half-section-ZYmHYf4Q.js +213 -0
- package/dist/cdn/chunks/one-third-two-thirds-section-Ds10K6AS.js +213 -0
- package/dist/cdn/chunks/one-time-code-field-Cgy_tTS4.js +693 -0
- package/dist/cdn/chunks/open-when-rendered-CW_2_WUZ.js +20 -0
- package/dist/cdn/chunks/owned-attribute-x9OCTy_4.js +6 -0
- package/dist/cdn/chunks/owner-form-Cq8tT7ac.js +7 -0
- package/dist/cdn/chunks/page-CBf_Decp.js +431 -0
- package/dist/cdn/chunks/page-footer-CSv1dU7M.js +396 -0
- package/dist/cdn/chunks/page-footer.i18n-pbdr4lN3.js +3 -0
- package/dist/cdn/chunks/page-section-mixin-Dp6X8GKd.js +132 -0
- package/dist/cdn/chunks/pagination-CMUcFB53.js +485 -0
- package/dist/cdn/chunks/pagination.i18n-QQMx14CQ.js +9 -0
- package/dist/cdn/chunks/password-field-C76Vm3rm.js +368 -0
- package/dist/cdn/chunks/password-field.i18n-CzdBn-1b.js +8 -0
- package/dist/cdn/chunks/popover-C-CVVtfl.js +334 -0
- package/dist/cdn/chunks/popover-target-B25dxnmt.js +10 -0
- package/dist/cdn/chunks/popover.i18n-DmFBHUvB.js +3 -0
- package/dist/cdn/chunks/popup-anchor-controller-VZw0bXf2.js +30 -0
- package/dist/cdn/chunks/progress-bar-BLiHaRUS.js +674 -0
- package/dist/cdn/chunks/progress-bar.i18n-Cr5miGTx.js +8 -0
- package/dist/cdn/chunks/progress-circle-CjkovRbL.js +667 -0
- package/dist/cdn/chunks/progress-circle.i18n-CRrXuY4V.js +8 -0
- package/dist/cdn/chunks/query-ChDzi9FQ.js +28 -0
- package/dist/cdn/chunks/radio-button-GHyO-GQB.js +338 -0
- package/dist/cdn/chunks/radio-button-field-C-Z6Lnd4.js +192 -0
- package/dist/cdn/chunks/radio-button-group-ChTqBCnQ.js +118 -0
- package/dist/cdn/chunks/radio-position-CXWYAjaz.js +10 -0
- package/dist/cdn/chunks/reflect-non-default-Bu3rpCvg.js +9 -0
- package/dist/cdn/chunks/render-marked-DX_5ISZE.js +37 -0
- package/dist/cdn/chunks/repeat-Ch_5OsXE.js +76 -0
- package/dist/cdn/chunks/return-focus-Xmagtk6r.js +52 -0
- package/dist/cdn/chunks/rich-text-CQ2uwMSp.js +47 -0
- package/dist/cdn/chunks/rich-text.i18n-BlJ68YuU.js +3 -0
- package/dist/cdn/chunks/row-header-mixin-CgqvREoV.js +16 -0
- package/dist/cdn/chunks/sanitize-url-CBuGmY0W.js +7 -0
- package/dist/cdn/chunks/scroll-mode-controller-COUD1-3P.js +42 -0
- package/dist/cdn/chunks/search-field-BGNfERhn.js +396 -0
- package/dist/cdn/chunks/search-field.i18n-B_Oc7hc-.js +6 -0
- package/dist/cdn/chunks/segmented-control-BYAG4VRp.js +671 -0
- package/dist/cdn/chunks/shadow-resets-6SToDsPu.js +12 -0
- package/dist/cdn/chunks/sheet-BdVCqm2H.js +340 -0
- package/dist/cdn/chunks/shell-C9rds_D9.js +146 -0
- package/dist/cdn/chunks/shell-DmJOYhyF.js +108 -0
- package/dist/cdn/chunks/side-by-side-split-view-C5oX4c6Z.js +166 -0
- package/dist/cdn/chunks/sidebar-section-DP4jnS7g.js +353 -0
- package/dist/cdn/chunks/sidebar-section.i18n-BuGfRMpD.js +6 -0
- package/dist/cdn/chunks/simple-section-qrCqXeBa.js +192 -0
- package/dist/cdn/chunks/skip-link-DWh4W6-J.js +161 -0
- package/dist/cdn/chunks/skip-link.i18n--PbEdAmJ.js +3 -0
- package/dist/cdn/chunks/slider--hODfOwh.js +772 -0
- package/dist/cdn/chunks/slider.i18n-DVw0c8AG.js +6 -0
- package/dist/cdn/chunks/slot-content-BLuPqVXw.js +13 -0
- package/dist/cdn/chunks/spacer-CFzq_JCh.js +237 -0
- package/dist/cdn/chunks/spacer-cell-DuVOgIj8.js +68 -0
- package/dist/cdn/chunks/spacing-scale-SufIjHeN.js +28 -0
- package/dist/cdn/chunks/split-button-BeXnOUTt.js +268 -0
- package/dist/cdn/chunks/split-button.i18n-DtClSMga.js +3 -0
- package/dist/cdn/chunks/split-view-divider-jzcPmnMh.js +100 -0
- package/dist/cdn/chunks/split-view-pane-BLsZz263.js +128 -0
- package/dist/cdn/chunks/stacked-split-view-CcOR8LrJ.js +157 -0
- package/dist/cdn/chunks/static-html-Cf4ccUIg.js +26 -0
- package/dist/cdn/chunks/status-bar-CINbOihq.js +284 -0
- package/dist/cdn/chunks/status-bar-change-CR9l0Gyk.js +3 -0
- package/dist/cdn/chunks/step-bar-6FvZL1Ti.js +474 -0
- package/dist/cdn/chunks/step-bar.i18n-DocExlD7.js +9 -0
- package/dist/cdn/chunks/step-cell-CejRisgS.js +287 -0
- package/dist/cdn/chunks/stepper-CY2rJWOJ.js +223 -0
- package/dist/cdn/chunks/stepper.i18n-COOAkaBl.js +7 -0
- package/dist/cdn/chunks/style-map-DsIw6lkq.js +29 -0
- package/dist/cdn/chunks/style-mod-DGMhzWuk.js +1583 -0
- package/dist/cdn/chunks/swatch-picker-BY3DBIl6.js +430 -0
- package/dist/cdn/chunks/swatch-picker.i18n-_G0nmnGe.js +22 -0
- package/dist/cdn/chunks/switch-DDSsZFwK.js +275 -0
- package/dist/cdn/chunks/switch-field-CMoM9I38.js +137 -0
- package/dist/cdn/chunks/tab-bar-DmslEoPD.js +697 -0
- package/dist/cdn/chunks/tab-bar.i18n-Crsc7ShA.js +3 -0
- package/dist/cdn/chunks/table-DwXjCSD5.js +308 -0
- package/dist/cdn/chunks/table.i18n-Bmb_uw_w.js +3 -0
- package/dist/cdn/chunks/tag-DM3APy3B.js +306 -0
- package/dist/cdn/chunks/text-B1CatNR1.js +421 -0
- package/dist/cdn/chunks/text-cell-BkEsGI3g.js +299 -0
- package/dist/cdn/chunks/text-editor-BvTiMeNV.js +3743 -0
- package/dist/cdn/chunks/text-editor.i18n-sJKiRQ4i.js +17 -0
- package/dist/cdn/chunks/text-field-CUyh1-V8.js +398 -0
- package/dist/cdn/chunks/time-field-Cj5WojfO.js +597 -0
- package/dist/cdn/chunks/time-field.i18n-CLH5vmS7.js +11 -0
- package/dist/cdn/chunks/time-picker-W0xYXLy8.js +508 -0
- package/dist/cdn/chunks/time-picker.i18n-BilOCXlS.js +7 -0
- package/dist/cdn/chunks/title-BuT7tWqN.js +437 -0
- package/dist/cdn/chunks/title-bar-label-controller-DSxdKZOg.js +24 -0
- package/dist/cdn/chunks/title-cell-8d8psUBX.js +327 -0
- package/dist/cdn/chunks/toggle-button-DNXWXZpE.js +528 -0
- package/dist/cdn/chunks/toggle-button-group-ByowJYgs.js +156 -0
- package/dist/cdn/chunks/token-CnkEB3hB.js +266 -0
- package/dist/cdn/chunks/token-field-hvDB3l6O.js +664 -0
- package/dist/cdn/chunks/token-field.i18n-BclzoR8F.js +9 -0
- package/dist/cdn/chunks/token.i18n-RGD5zAtl.js +7 -0
- package/dist/cdn/chunks/toml-w97zZfFO.js +27 -0
- package/dist/cdn/chunks/toolbar-iNd1VmuG.js +408 -0
- package/dist/cdn/chunks/toolbar-item-DpPfPxCi.js +50 -0
- package/dist/cdn/chunks/toolbar-title-KBMpfL9d.js +84 -0
- package/dist/cdn/chunks/toolbar.i18n-QwS37CBC.js +8 -0
- package/dist/cdn/chunks/toolbar.styles-BQkG4gVc.js +383 -0
- package/dist/cdn/chunks/tooltip-BsAHJjci.js +325 -0
- package/dist/cdn/chunks/top-navigation-bar-D1hjWIF3.js +925 -0
- package/dist/cdn/chunks/top-navigation-bar.i18n-C-lcH1nB.js +10 -0
- package/dist/cdn/chunks/top-title-bar-iNFB2zQL.js +344 -0
- package/dist/cdn/chunks/translations-wxBSz213.js +8 -0
- package/dist/cdn/chunks/two-thirds-one-third-section-D-UANbHC.js +213 -0
- package/dist/cdn/chunks/validation-list-C5BhHZIG.js +202 -0
- package/dist/cdn/chunks/validation-list.i18n-CM6In8zD.js +12 -0
- package/dist/cdn/chunks/visibility-mixin-COAZ9pON.js +74 -0
- package/dist/cdn/chunks/visually-hidden-BPgATaH0.js +43 -0
- package/dist/cdn/chunks/window-t5iFkMLY.js +227 -0
- package/dist/cdn/chunks/window.i18n-CsEnUPAk.js +3 -0
- package/dist/cdn/chunks/with-translations-XX14GKFh.js +16 -0
- package/dist/components/actions/menu/menu-item.d.ts +6 -2
- package/dist/components/actions/menu/menu-item.d.ts.map +1 -1
- package/dist/components/actions/menu/menu-item.js +12 -1
- package/dist/components/actions/menu/menu-item.js.map +1 -1
- package/dist/components/actions/menu/menu.js +1 -1
- package/dist/components/actions/menu/menu.js.map +1 -1
- package/dist/components/actions/menu/menu.template.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.template.js +2 -1
- package/dist/components/actions/menu/menu.template.js.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.d.ts +22 -2
- package/dist/components/inputs/dropdown/dropdown.d.ts.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.js +67 -11
- package/dist/components/inputs/dropdown/dropdown.js.map +1 -1
- package/dist/components/layout/container/container.d.ts +15 -2
- package/dist/components/layout/container/container.d.ts.map +1 -1
- package/dist/components/layout/container/container.js +38 -3
- package/dist/components/layout/container/container.js.map +1 -1
- package/dist/components/layout/container/container.styles.js +1 -1
- package/dist/components/layout/container/container.template.js +1 -1
- package/dist/components/layout/container/container.template.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.d.ts +7 -0
- 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 +13 -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 +11 -1
- 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 +19 -3
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js.map +1 -1
- package/dist/nldd.min.js +298 -298
- package/dist/types/react.d.ts +3323 -0
- package/dist/types/vue.d.ts +11 -3
- package/dist/utilities/autoloader.d.ts +33 -0
- package/dist/utilities/autoloader.d.ts.map +1 -0
- package/dist/utilities/autoloader.generated.d.ts +3 -0
- package/dist/utilities/autoloader.generated.d.ts.map +1 -0
- package/dist/utilities/autoloader.generated.js +141 -0
- package/dist/utilities/autoloader.generated.js.map +1 -0
- package/dist/utilities/autoloader.js +94 -0
- package/dist/utilities/autoloader.js.map +1 -0
- package/dist/utilities/dev-checks.d.ts +9 -0
- package/dist/utilities/dev-checks.d.ts.map +1 -1
- package/dist/utilities/dev-checks.js +45 -3
- 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 +12 -2
- package/dist/utilities/dev-rules.generated.js.map +1 -1
- package/dist/utilities/loading-tags.d.ts +7 -0
- package/dist/utilities/loading-tags.d.ts.map +1 -0
- package/dist/utilities/loading-tags.js +7 -0
- package/dist/utilities/loading-tags.js.map +1 -0
- package/dist/utilities/owner-form.d.ts +3 -3
- package/dist/utilities/owner-form.d.ts.map +1 -1
- package/dist/utilities/owner-form.js +6 -3
- package/dist/utilities/owner-form.js.map +1 -1
- package/lint/data.generated.json +1 -1
- package/package.json +50 -11
- package/dist/components/breakpoints-DtL62nLI.js +0 -45
- package/dist/components/components.js +0 -68243
- package/dist/components/decorate-DD7uUxHb.js +0 -51
- package/dist/components/defer-focus-dzorHsCQ.js +0 -176
- package/dist/components/dev-checks-CLB9G43h.js +0 -2711
- package/dist/components/dist-245LaK9m.js +0 -1479
- package/dist/components/dist-BFZM0YsR.js +0 -15772
- package/dist/components/dist-BNkeFjc3.js +0 -1180
- package/dist/components/dist-CSC1dG3L.js +0 -365
- package/dist/components/dist-CeMOOqgP.js +0 -1509
- package/dist/components/dist-DFjwTlJV.js +0 -624
- package/dist/components/dist-DHhnz3Gv.js +0 -381
- package/dist/components/dist-PeUX4vPq.js +0 -2857
- package/dist/components/dist-m70B83qb.js +0 -463
- package/dist/components/element-state-BnarBv0M.js +0 -42
- package/dist/components/gherkin-DzYbEwDO.js +0 -107
- package/dist/components/icon-button-8gvQCwCW.js +0 -2305
- package/dist/components/input-modality-D_CY185R.js +0 -48
- package/dist/components/just-in-time-education.i18n-BqU1ImP4.js +0 -423
- package/dist/components/nl.generated-DzZkOgnP.js +0 -64
- package/dist/components/rolldown-runtime-D8jQpDG7.js +0 -12
- package/dist/components/shadow-resets-BwOyyZFH.js +0 -60
- package/dist/components/shell-Dh5IwHd-.js +0 -222
- package/dist/components/toml-D0Pix_8Q.js +0 -58
- package/dist/components/visibility-mixin-Dzn48SL8.js +0 -153
|
@@ -0,0 +1,973 @@
|
|
|
1
|
+
import "./icon-BORlalt0.js";
|
|
2
|
+
import { i as e, n as t, t as n } from "./custom-element-q6NzoL5b.js";
|
|
3
|
+
import { n as r, o as i, r as a, t as o } from "./decorate-TduJMFD_.js";
|
|
4
|
+
import { t as s } from "./custom-element-BW8Ua4c7.js";
|
|
5
|
+
import { t as c } from "./reflect-non-default-Bu3rpCvg.js";
|
|
6
|
+
import { t as l } from "./shadow-resets-6SToDsPu.js";
|
|
7
|
+
import { t as u } from "./with-translations-XX14GKFh.js";
|
|
8
|
+
import { t as d } from "./class-map-CXSdNjt8.js";
|
|
9
|
+
import { t as f } from "./defer-focus-F73ud2D9.js";
|
|
10
|
+
import "./icon-button-rKiIHs7A.js";
|
|
11
|
+
import "./tooltip-BsAHJjci.js";
|
|
12
|
+
import { n as p } from "./input-modality-XE0B7yCn.js";
|
|
13
|
+
import { t as m } from "./carried-context-DlMSujiJ.js";
|
|
14
|
+
import { t as h } from "./sanitize-url-CBuGmY0W.js";
|
|
15
|
+
import "./menu-BOu_pD1Q.js";
|
|
16
|
+
import { t as g } from "./document-tab-bar.i18n-DKrA9TnB.js";
|
|
17
|
+
// src/components/navigation/document-tab-bar/document-tab-bar.styles.ts
|
|
18
|
+
var _ = e`
|
|
19
|
+
:host {
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
/* # Host */
|
|
25
|
+
|
|
26
|
+
:host {
|
|
27
|
+
--_document-tab-bar-drag-clone-top: 0px;
|
|
28
|
+
--_document-tab-bar-drag-clone-left: 0px;
|
|
29
|
+
--_document-tab-bar-drag-clone-width: 0px;
|
|
30
|
+
--_document-tab-bar-drag-clone-height: 0px;
|
|
31
|
+
--_document-tab-bar-drag-clone-opacity: 0.95;
|
|
32
|
+
--_document-tab-bar-drag-clone-z-index: 100;
|
|
33
|
+
--_document-tab-bar-short-text-threshold: 200px;
|
|
34
|
+
--_document-tab-bar-item-min-width: 100px;
|
|
35
|
+
--_document-tab-bar-held-item-width: auto;
|
|
36
|
+
--_document-tab-bar-release-duration: var(--primitives-transition-duration-medium);
|
|
37
|
+
--_document-tab-bar-release-easing: var(--primitives-transition-easing-default);
|
|
38
|
+
--_document-tab-bar-overflow-button-reserve: 52px; /* Used for overflowButtonReserve. Overflow button width + spacing */
|
|
39
|
+
--_document-tab-bar-dismiss-button-is-hovered-background-color: light-dark(var(--primitives-color-neutral-150), var(--primitives-color-neutral-250));
|
|
40
|
+
--_document-tab-bar-dismiss-button-is-active-background-color: light-dark(var(--primitives-color-neutral-200), var(--primitives-color-neutral-300));
|
|
41
|
+
--_document-tab-bar-dismiss-button-is-selected-is-hovered-background-color: var(--semantics-tabs-is-current-is-hovered-background-color);
|
|
42
|
+
--_document-tab-bar-dismiss-button-is-selected-is-active-background-color: var(--semantics-tabs-is-current-is-active-background-color);
|
|
43
|
+
--_document-tab-bar-tab-title-font: var(--primitives-font-body-sm-medium-flat);
|
|
44
|
+
|
|
45
|
+
${l}
|
|
46
|
+
display: block;
|
|
47
|
+
position: relative;
|
|
48
|
+
width: 100%;
|
|
49
|
+
isolation: isolate;
|
|
50
|
+
-webkit-user-select: none;
|
|
51
|
+
user-select: none;
|
|
52
|
+
-webkit-tap-highlight-color: transparent;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:host([hidden]) {
|
|
56
|
+
display: none;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
/* # Block */
|
|
61
|
+
|
|
62
|
+
.document-tab-bar {
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-direction: row;
|
|
65
|
+
align-items: center;
|
|
66
|
+
gap: var(--primitives-space-8);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.document-tab-bar__items {
|
|
70
|
+
display: flex;
|
|
71
|
+
min-width: 0;
|
|
72
|
+
flex-direction: row;
|
|
73
|
+
align-items: center;
|
|
74
|
+
gap: var(--primitives-space-8);
|
|
75
|
+
flex-grow: 1;
|
|
76
|
+
flex-shrink: 1;
|
|
77
|
+
flex-basis: 0;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
::slotted(nldd-document-tab-bar-item) {
|
|
81
|
+
min-width: var(--_document-tab-bar-item-min-width);
|
|
82
|
+
flex-grow: 1;
|
|
83
|
+
flex-shrink: 1;
|
|
84
|
+
flex-basis: 0;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
:host([data-holding-widths]) ::slotted(nldd-document-tab-bar-item) {
|
|
88
|
+
flex-grow: 0;
|
|
89
|
+
flex-shrink: 0;
|
|
90
|
+
flex-basis: var(--_document-tab-bar-held-item-width);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
:host([data-releasing-widths]) ::slotted(nldd-document-tab-bar-item) {
|
|
94
|
+
transition: flex-basis var(--_document-tab-bar-release-duration) var(--_document-tab-bar-release-easing);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@media (prefers-reduced-motion: reduce) {
|
|
98
|
+
:host([data-releasing-widths]) ::slotted(nldd-document-tab-bar-item) {
|
|
99
|
+
transition: none;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
::slotted(nldd-document-tab-bar-item[hidden]) {
|
|
104
|
+
display: none;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.document-tab-bar__items.is-measuring slot {
|
|
108
|
+
flex-grow: 0;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.document-tab-bar__overflow-button {
|
|
112
|
+
flex-grow: 0;
|
|
113
|
+
flex-shrink: 0;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.document-tab-bar__overflow-button.is-hidden {
|
|
117
|
+
display: none;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.document-tab-bar__end {
|
|
121
|
+
display: flex;
|
|
122
|
+
flex-direction: row;
|
|
123
|
+
align-items: center;
|
|
124
|
+
gap: var(--primitives-space-8);
|
|
125
|
+
flex-grow: 0;
|
|
126
|
+
flex-shrink: 0;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.document-tab-bar__end[hidden] {
|
|
130
|
+
display: none;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
/* # Focus */
|
|
135
|
+
|
|
136
|
+
::slotted(nldd-document-tab-bar-item:focus-within) {
|
|
137
|
+
position: relative;
|
|
138
|
+
z-index: 4;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
/* # Drag states */
|
|
143
|
+
|
|
144
|
+
::slotted(nldd-document-tab-bar-item.is-dragging) {
|
|
145
|
+
display: none;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
/* # Drag placeholder */
|
|
150
|
+
|
|
151
|
+
::slotted(.nldd-document-tab-bar-drag-placeholder) {
|
|
152
|
+
box-sizing: border-box;
|
|
153
|
+
opacity: var(--semantics-controls-is-dragging-opacity);
|
|
154
|
+
border-radius: var(--semantics-controls-md-corner-radius);
|
|
155
|
+
background-color: var(--semantics-buttons-neutral-tinted-background-color);
|
|
156
|
+
pointer-events: none;
|
|
157
|
+
height: var(--semantics-controls-md-min-size);
|
|
158
|
+
min-width: var(--_document-tab-bar-item-min-width);
|
|
159
|
+
flex-grow: 1;
|
|
160
|
+
flex-shrink: 1;
|
|
161
|
+
flex-basis: 0;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
/* # Drag clone */
|
|
166
|
+
|
|
167
|
+
.document-tab-bar__drag-clone {
|
|
168
|
+
position: absolute;
|
|
169
|
+
top: var(--_document-tab-bar-drag-clone-top);
|
|
170
|
+
left: var(--_document-tab-bar-drag-clone-left);
|
|
171
|
+
display: flex;
|
|
172
|
+
opacity: var(--_document-tab-bar-drag-clone-opacity);
|
|
173
|
+
z-index: var(--_document-tab-bar-drag-clone-z-index);
|
|
174
|
+
border-radius: var(--semantics-controls-md-corner-radius);
|
|
175
|
+
background: var(--semantics-buttons-neutral-tinted-background-color);
|
|
176
|
+
pointer-events: none;
|
|
177
|
+
cursor: grabbing;
|
|
178
|
+
width: var(--_document-tab-bar-drag-clone-width);
|
|
179
|
+
height: var(--_document-tab-bar-drag-clone-height);
|
|
180
|
+
overflow: hidden;
|
|
181
|
+
flex-direction: row;
|
|
182
|
+
align-items: stretch;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.document-tab-bar__drag-clone .document-tab-bar__item {
|
|
186
|
+
box-sizing: border-box;
|
|
187
|
+
position: relative;
|
|
188
|
+
width: 100%;
|
|
189
|
+
height: 100%;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.document-tab-bar__drag-clone .document-tab-bar__item-tab {
|
|
193
|
+
display: flex;
|
|
194
|
+
box-sizing: border-box;
|
|
195
|
+
border-radius: var(--semantics-controls-md-corner-radius);
|
|
196
|
+
width: 100%;
|
|
197
|
+
height: 100%;
|
|
198
|
+
min-width: 0;
|
|
199
|
+
overflow: hidden;
|
|
200
|
+
padding-block: var(--primitives-space-6);
|
|
201
|
+
padding-inline-start: var(--primitives-space-10);
|
|
202
|
+
padding-inline-end: calc(var(--semantics-controls-sm-min-size) + var(--primitives-space-6) * 2);
|
|
203
|
+
flex-direction: column;
|
|
204
|
+
justify-content: center;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
a.document-tab-bar__item-tab {
|
|
208
|
+
cursor: var(--semantics-controls-link-cursor);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.document-tab-bar__drag-clone .document-tab-bar__item-text {
|
|
212
|
+
overflow: hidden;
|
|
213
|
+
font: var(--_document-tab-bar-tab-title-font);
|
|
214
|
+
color: var(--semantics-buttons-neutral-tinted-content-color);
|
|
215
|
+
text-overflow: ellipsis;
|
|
216
|
+
white-space: nowrap;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.document-tab-bar__drag-clone.is-selected .document-tab-bar__item-tab {
|
|
220
|
+
background-color: var(--semantics-tabs-is-current-background-color);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.document-tab-bar__drag-clone.is-selected .document-tab-bar__item-text,
|
|
224
|
+
.document-tab-bar__drag-clone.is-selected .document-tab-bar__item-supporting-text {
|
|
225
|
+
color: var(--semantics-tabs-is-current-content-color);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.document-tab-bar__drag-clone .document-tab-bar__item-supporting-text {
|
|
229
|
+
overflow: hidden;
|
|
230
|
+
font: var(--primitives-font-body-xs-regular-flat);
|
|
231
|
+
color: var(--semantics-content-secondary-color);
|
|
232
|
+
text-overflow: ellipsis;
|
|
233
|
+
white-space: nowrap;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
/* # Announcers */
|
|
238
|
+
|
|
239
|
+
.document-tab-bar__polite-announcer,
|
|
240
|
+
.document-tab-bar__assertive-announcer {
|
|
241
|
+
position: absolute;
|
|
242
|
+
margin: -1px;
|
|
243
|
+
border: 0;
|
|
244
|
+
width: 1px;
|
|
245
|
+
height: 1px;
|
|
246
|
+
overflow: hidden;
|
|
247
|
+
padding: 0;
|
|
248
|
+
white-space: nowrap;
|
|
249
|
+
clip-path: inset(50%);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
`, v = e`
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
/* # Host */
|
|
256
|
+
|
|
257
|
+
:host {
|
|
258
|
+
--_document-tab-bar-item-highlight-border-color: var(--semantics-buttons-neutral-tinted-highlight-border-color);
|
|
259
|
+
--_document-tab-bar-item-is-hovered-highlight-border-color: var(--semantics-buttons-neutral-tinted-is-hovered-highlight-border-color);
|
|
260
|
+
--_document-tab-bar-item-is-active-highlight-border-color: var(--semantics-buttons-neutral-tinted-is-active-highlight-border-color);
|
|
261
|
+
--_document-tab-bar-item-is-selected-highlight-border-color: var(--semantics-tabs-is-current-highlight-border-color);
|
|
262
|
+
--_document-tab-bar-item-is-selected-is-hovered-highlight-border-color: var(--semantics-tabs-is-current-is-hovered-highlight-border-color);
|
|
263
|
+
--_document-tab-bar-item-is-selected-is-active-highlight-border-color: var(--semantics-tabs-is-current-is-active-highlight-border-color);
|
|
264
|
+
|
|
265
|
+
--_document-tab-bar-item-secondary-content-color: var(--semantics-buttons-neutral-tinted-content-secondary-color);
|
|
266
|
+
--_document-tab-bar-item-tab-title-font: var(--primitives-font-body-sm-medium-flat);
|
|
267
|
+
|
|
268
|
+
${l}
|
|
269
|
+
container-type: inline-size;
|
|
270
|
+
display: block;
|
|
271
|
+
min-width: 0;
|
|
272
|
+
touch-action: pan-y;
|
|
273
|
+
-webkit-tap-highlight-color: transparent;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
:host([hidden]) {
|
|
277
|
+
display: none;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
/* # Item */
|
|
282
|
+
|
|
283
|
+
.document-tab-bar__item {
|
|
284
|
+
position: relative;
|
|
285
|
+
box-sizing: border-box;
|
|
286
|
+
height: var(--semantics-controls-md-min-size);
|
|
287
|
+
width: 100%;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
/* # Item tab */
|
|
292
|
+
|
|
293
|
+
.document-tab-bar__item-tab {
|
|
294
|
+
display: flex;
|
|
295
|
+
box-sizing: border-box;
|
|
296
|
+
position: relative;
|
|
297
|
+
margin: 0;
|
|
298
|
+
border: none;
|
|
299
|
+
border-radius: var(--semantics-controls-md-corner-radius);
|
|
300
|
+
background-color: var(--semantics-buttons-neutral-tinted-background-color);
|
|
301
|
+
box-shadow: inset 0 0 0 var(--primitives-border-width-thin) var(--_document-tab-bar-item-highlight-border-color);
|
|
302
|
+
width: 100%;
|
|
303
|
+
height: 100%;
|
|
304
|
+
min-width: 0;
|
|
305
|
+
overflow: hidden;
|
|
306
|
+
padding-block: var(--primitives-space-6);
|
|
307
|
+
padding-inline-start: var(--primitives-space-10);
|
|
308
|
+
padding-inline-end: calc(var(--semantics-controls-sm-min-size) + var(--primitives-space-6));
|
|
309
|
+
text-align: left;
|
|
310
|
+
flex-direction: column;
|
|
311
|
+
justify-content: center;
|
|
312
|
+
text-decoration: none;
|
|
313
|
+
appearance: none;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
@media (hover: hover) {
|
|
317
|
+
.document-tab-bar__item-tab:hover {
|
|
318
|
+
background-color: var(--semantics-buttons-neutral-tinted-is-hovered-background-color);
|
|
319
|
+
--_document-tab-bar-item-highlight-border-color: var(--_document-tab-bar-item-is-hovered-highlight-border-color);
|
|
320
|
+
--_document-tab-bar-item-secondary-content-color: var(--semantics-buttons-neutral-tinted-is-hovered-content-secondary-color);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.document-tab-bar__item-tab:active {
|
|
325
|
+
background-color: var(--semantics-buttons-neutral-tinted-is-active-background-color);
|
|
326
|
+
--_document-tab-bar-item-highlight-border-color: var(--_document-tab-bar-item-is-active-highlight-border-color);
|
|
327
|
+
--_document-tab-bar-item-secondary-content-color: var(--semantics-buttons-neutral-tinted-is-active-content-secondary-color);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
:host([selected]) .document-tab-bar__item-tab {
|
|
331
|
+
background-color: var(--semantics-tabs-is-current-background-color);
|
|
332
|
+
--_document-tab-bar-item-highlight-border-color: var(--_document-tab-bar-item-is-selected-highlight-border-color);
|
|
333
|
+
--_document-tab-bar-item-secondary-content-color: var(--semantics-tabs-is-current-content-color);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
@media (hover: hover) {
|
|
337
|
+
:host([selected]) .document-tab-bar__item-tab:hover {
|
|
338
|
+
background-color: var(--semantics-tabs-is-current-is-hovered-background-color);
|
|
339
|
+
--_document-tab-bar-item-highlight-border-color: var(--_document-tab-bar-item-is-selected-is-hovered-highlight-border-color);
|
|
340
|
+
--_document-tab-bar-item-secondary-content-color: var(--semantics-tabs-is-current-is-hovered-content-color);
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
:host([selected]) .document-tab-bar__item-tab:active {
|
|
345
|
+
background-color: var(--semantics-tabs-is-current-is-active-background-color);
|
|
346
|
+
--_document-tab-bar-item-highlight-border-color: var(--_document-tab-bar-item-is-selected-is-active-highlight-border-color);
|
|
347
|
+
--_document-tab-bar-item-secondary-content-color: var(--semantics-tabs-is-current-is-active-content-color);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/* ## Focus */
|
|
351
|
+
|
|
352
|
+
.document-tab-bar__item-tab:focus-visible {
|
|
353
|
+
outline: var(--semantics-focus-ring-outline);
|
|
354
|
+
outline-offset: var(--semantics-focus-ring-outline-offset);
|
|
355
|
+
box-shadow: var(--semantics-focus-ring-box-shadow), inset 0 0 0 var(--primitives-border-width-thin) var(--_document-tab-bar-item-highlight-border-color);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
/* # Item text wrappers */
|
|
360
|
+
|
|
361
|
+
.document-tab-bar__item-normal {
|
|
362
|
+
display: contents;
|
|
363
|
+
|
|
364
|
+
@container (max-width: 12.5rem) {
|
|
365
|
+
display: none;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.document-tab-bar__item-short {
|
|
370
|
+
display: none;
|
|
371
|
+
|
|
372
|
+
@container (max-width: 12.5rem) {
|
|
373
|
+
display: contents;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
/* # Item label */
|
|
379
|
+
|
|
380
|
+
.document-tab-bar__item-text {
|
|
381
|
+
overflow: hidden;
|
|
382
|
+
padding-inline-end: var(--primitives-space-6);
|
|
383
|
+
font: var(--_document-tab-bar-item-tab-title-font);
|
|
384
|
+
color: var(--semantics-buttons-neutral-tinted-content-color);
|
|
385
|
+
text-overflow: ellipsis;
|
|
386
|
+
white-space: nowrap;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
:host([selected]) .document-tab-bar__item-text {
|
|
390
|
+
color: var(--semantics-tabs-is-current-content-color);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.document-tab-bar__item-short-text {
|
|
394
|
+
overflow: hidden;
|
|
395
|
+
padding-inline-end: var(--primitives-space-6);
|
|
396
|
+
font: var(--_document-tab-bar-item-tab-title-font);
|
|
397
|
+
color: var(--semantics-buttons-neutral-tinted-content-color);
|
|
398
|
+
text-overflow: ellipsis;
|
|
399
|
+
white-space: nowrap;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
:host([selected]) .document-tab-bar__item-short-text {
|
|
403
|
+
color: var(--semantics-tabs-is-current-content-color);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
/* # Item supporting label */
|
|
408
|
+
|
|
409
|
+
.document-tab-bar__item-supporting-text {
|
|
410
|
+
overflow: hidden;
|
|
411
|
+
padding-inline-end: var(--primitives-space-6);
|
|
412
|
+
font: var(--primitives-font-body-xs-regular-flat);
|
|
413
|
+
color: var(--_document-tab-bar-item-secondary-content-color);
|
|
414
|
+
text-overflow: ellipsis;
|
|
415
|
+
white-space: nowrap;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.document-tab-bar__item-short-supporting-text {
|
|
419
|
+
overflow: hidden;
|
|
420
|
+
padding-inline-end: var(--primitives-space-6);
|
|
421
|
+
font: var(--primitives-font-body-xs-regular-flat);
|
|
422
|
+
color: var(--_document-tab-bar-item-secondary-content-color);
|
|
423
|
+
text-overflow: ellipsis;
|
|
424
|
+
white-space: nowrap;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
/* # Item dismiss button */
|
|
429
|
+
|
|
430
|
+
.document-tab-bar__item-dismiss-button {
|
|
431
|
+
display: flex;
|
|
432
|
+
position: absolute;
|
|
433
|
+
top: 50%;
|
|
434
|
+
right: var(--primitives-space-6);
|
|
435
|
+
margin: 0;
|
|
436
|
+
border: none;
|
|
437
|
+
border-radius: var(--semantics-controls-sm-corner-radius);
|
|
438
|
+
background: none;
|
|
439
|
+
width: var(--semantics-controls-sm-min-size);
|
|
440
|
+
height: var(--semantics-controls-sm-min-size);
|
|
441
|
+
padding: var(--primitives-space-4);
|
|
442
|
+
align-items: center;
|
|
443
|
+
justify-content: center;
|
|
444
|
+
color: var(--semantics-buttons-neutral-tinted-content-color);
|
|
445
|
+
transform: translateY(-50%);
|
|
446
|
+
appearance: none;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
@media (hover: hover) {
|
|
450
|
+
.document-tab-bar__item-dismiss-button:hover {
|
|
451
|
+
background-color: var(--_document-tab-bar-dismiss-button-is-hovered-background-color);
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.document-tab-bar__item-dismiss-button:active {
|
|
456
|
+
background-color: var(--_document-tab-bar-dismiss-button-is-active-background-color);
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
:host([selected]) .document-tab-bar__item-dismiss-button {
|
|
460
|
+
color: var(--semantics-tabs-is-current-content-color);
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
@media (hover: hover) {
|
|
464
|
+
:host([selected]) .document-tab-bar__item-dismiss-button:hover {
|
|
465
|
+
background-color: var(--_document-tab-bar-dismiss-button-is-selected-is-hovered-background-color);
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
:host([selected]) .document-tab-bar__item-dismiss-button:active {
|
|
470
|
+
background-color: var(--_document-tab-bar-dismiss-button-is-selected-is-active-background-color);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
.document-tab-bar__item-dismiss-button:focus-visible {
|
|
474
|
+
outline: var(--semantics-focus-ring-outline);
|
|
475
|
+
outline-offset: var(--semantics-focus-ring-outline-offset);
|
|
476
|
+
box-shadow: var(--semantics-focus-ring-box-shadow);
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
/* # Item dismiss icon */
|
|
481
|
+
|
|
482
|
+
.document-tab-bar__item-dismiss-icon {
|
|
483
|
+
display: flex;
|
|
484
|
+
width: var(--primitives-space-16);
|
|
485
|
+
height: var(--primitives-space-16);
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
`;
|
|
489
|
+
// src/components/navigation/document-tab-bar/document-tab-bar.template.ts
|
|
490
|
+
function y(e) {
|
|
491
|
+
let t = e._overflowCount > 0, n = e.accessibleLabel || "Tabbladen", r = e.navigation, o = i`
|
|
492
|
+
<div class="document-tab-bar__items"
|
|
493
|
+
role=${r ? a : "tablist"}
|
|
494
|
+
aria-label=${r ? a : n}
|
|
495
|
+
>
|
|
496
|
+
<slot @slotchange=${e._onSlotChange}></slot>
|
|
497
|
+
</div>
|
|
498
|
+
<div class=${d({
|
|
499
|
+
"document-tab-bar__overflow-button": !0,
|
|
500
|
+
"is-hidden": !t
|
|
501
|
+
})}>
|
|
502
|
+
<nldd-icon-button
|
|
503
|
+
text=${e._t("components.document-tab-bar.show-more-tabs-action")}
|
|
504
|
+
appearance="neutral-tinted"
|
|
505
|
+
icon="ellipsis"
|
|
506
|
+
tooltip-timing="never"
|
|
507
|
+
popup-type="menu"
|
|
508
|
+
?expanded=${e._menuOpen}
|
|
509
|
+
></nldd-icon-button>
|
|
510
|
+
</div>
|
|
511
|
+
<div class="document-tab-bar__end"
|
|
512
|
+
hidden
|
|
513
|
+
>
|
|
514
|
+
<slot
|
|
515
|
+
name="end"
|
|
516
|
+
@slotchange=${e._onEndSlotChange}
|
|
517
|
+
></slot>
|
|
518
|
+
</div>
|
|
519
|
+
`;
|
|
520
|
+
return i`
|
|
521
|
+
${r ? i`<nav class="document-tab-bar"
|
|
522
|
+
aria-label=${n}
|
|
523
|
+
>${o}</nav>` : i`<div class="document-tab-bar">${o}</div>`}
|
|
524
|
+
<div class="document-tab-bar__polite-announcer"
|
|
525
|
+
role="status"
|
|
526
|
+
aria-live="polite"
|
|
527
|
+
aria-atomic="true"
|
|
528
|
+
></div>
|
|
529
|
+
<div class="document-tab-bar__assertive-announcer"
|
|
530
|
+
role="alert"
|
|
531
|
+
aria-live="assertive"
|
|
532
|
+
aria-atomic="true"
|
|
533
|
+
></div>
|
|
534
|
+
`;
|
|
535
|
+
}
|
|
536
|
+
function b(e) {
|
|
537
|
+
let t = e.shortText || e.text, n = e.shortSupportingText || e.supportingText, r = e._navigation, o = h(e.href), s = !!o, c = e.selected || e._isFallbackFocusable ? "0" : "-1", l = e.supportingText ? `${e.text} · ${e.supportingText}` : e.text, u = i`
|
|
538
|
+
<span class="document-tab-bar__item-normal"
|
|
539
|
+
aria-hidden="true"
|
|
540
|
+
>
|
|
541
|
+
<span class="document-tab-bar__item-text">${e.text}</span>
|
|
542
|
+
${e.supportingText ? i`<span class="document-tab-bar__item-supporting-text">${e.supportingText}</span>` : a}
|
|
543
|
+
</span>
|
|
544
|
+
<span class="document-tab-bar__item-short">
|
|
545
|
+
<span class="document-tab-bar__item-short-text">${t}</span>
|
|
546
|
+
${n ? i`<span class="document-tab-bar__item-short-supporting-text">${n}</span>` : a}
|
|
547
|
+
</span>
|
|
548
|
+
`, d = s ? i`<a class="document-tab-bar__item-tab"
|
|
549
|
+
href=${o}
|
|
550
|
+
role=${r ? a : "tab"}
|
|
551
|
+
aria-current=${r && e.selected ? "page" : a}
|
|
552
|
+
aria-selected=${r ? a : e.selected ? "true" : "false"}
|
|
553
|
+
aria-label=${l}
|
|
554
|
+
tabindex=${c}
|
|
555
|
+
@click=${e._handleClick}
|
|
556
|
+
>${u}</a>` : i`<button class="document-tab-bar__item-tab"
|
|
557
|
+
type="button"
|
|
558
|
+
role="tab"
|
|
559
|
+
aria-selected=${e.selected ? "true" : "false"}
|
|
560
|
+
aria-label=${l}
|
|
561
|
+
tabindex=${c}
|
|
562
|
+
@click=${e._handleClick}
|
|
563
|
+
>${u}</button>`;
|
|
564
|
+
return i`
|
|
565
|
+
<nldd-tooltip
|
|
566
|
+
text=${l}
|
|
567
|
+
timing=${e._isShort ? "delay" : "never"}
|
|
568
|
+
>
|
|
569
|
+
<div class="document-tab-bar__item">
|
|
570
|
+
${d}
|
|
571
|
+
<button class="document-tab-bar__item-dismiss-button"
|
|
572
|
+
aria-label=${e._dismissButtonAccessibilityLabel}
|
|
573
|
+
tabindex=${e.selected || e._isFallbackFocusable ? "0" : "-1"}
|
|
574
|
+
@click=${e._handleDismiss}
|
|
575
|
+
>
|
|
576
|
+
<span class="document-tab-bar__item-dismiss-icon">
|
|
577
|
+
<nldd-icon icon="dismiss"></nldd-icon>
|
|
578
|
+
</span>
|
|
579
|
+
</button>
|
|
580
|
+
</div>
|
|
581
|
+
</nldd-tooltip>
|
|
582
|
+
`;
|
|
583
|
+
}
|
|
584
|
+
// src/components/navigation/document-tab-bar/document-tab-bar.ts
|
|
585
|
+
var x, S, C, w, T = 5, E = (x = class extends r {
|
|
586
|
+
constructor(...e) {
|
|
587
|
+
super(...e), this._id = `nldd-document-tab-bar-item-${C._idCounter++}`, this.selected = !1, this.text = "", this.supportingText = "", this.shortText = "", this.shortSupportingText = "", this.href = "", this._isShort = !1, this._itemResizeObserver = null, this._dismissButtonAccessibilityLabel = "Sluit", this._isFallbackFocusable = !1, this._navigation = !1;
|
|
588
|
+
}
|
|
589
|
+
connectedCallback() {
|
|
590
|
+
super.connectedCallback(), this.setAttribute("role", "none"), this._itemResizeObserver = new ResizeObserver(() => this._updateIsShort()), this._itemResizeObserver.observe(this);
|
|
591
|
+
}
|
|
592
|
+
disconnectedCallback() {
|
|
593
|
+
super.disconnectedCallback(), this._itemResizeObserver?.disconnect(), this._itemResizeObserver = null;
|
|
594
|
+
}
|
|
595
|
+
_updateIsShort() {
|
|
596
|
+
let e = parseFloat(getComputedStyle(this).getPropertyValue("--_document-tab-bar-short-text-threshold"));
|
|
597
|
+
this._isShort = Number.isFinite(e) && this.getBoundingClientRect().width < e;
|
|
598
|
+
}
|
|
599
|
+
focus(e) {
|
|
600
|
+
f(this, e) || this.shadowRoot?.querySelector(".document-tab-bar__item-tab")?.focus(e);
|
|
601
|
+
}
|
|
602
|
+
_handleClick() {
|
|
603
|
+
this.dispatchEvent(new CustomEvent("select", {
|
|
604
|
+
bubbles: !0,
|
|
605
|
+
composed: !0,
|
|
606
|
+
detail: { item: this }
|
|
607
|
+
}));
|
|
608
|
+
}
|
|
609
|
+
_handleDismiss(e) {
|
|
610
|
+
e.stopPropagation(), this.dispatchEvent(new CustomEvent("dismiss", {
|
|
611
|
+
bubbles: !0,
|
|
612
|
+
composed: !0,
|
|
613
|
+
detail: { item: this }
|
|
614
|
+
}));
|
|
615
|
+
}
|
|
616
|
+
render() {
|
|
617
|
+
return b(this);
|
|
618
|
+
}
|
|
619
|
+
}, C = x, x.styles = v, x._idCounter = 0, x);
|
|
620
|
+
o([t({
|
|
621
|
+
type: Boolean,
|
|
622
|
+
reflect: !0
|
|
623
|
+
})], E.prototype, "selected", void 0), o([t({
|
|
624
|
+
reflect: !0,
|
|
625
|
+
attribute: "text",
|
|
626
|
+
converter: c("")
|
|
627
|
+
})], E.prototype, "text", void 0), o([t({
|
|
628
|
+
reflect: !0,
|
|
629
|
+
attribute: "supporting-text",
|
|
630
|
+
converter: c("")
|
|
631
|
+
})], E.prototype, "supportingText", void 0), o([t({
|
|
632
|
+
reflect: !0,
|
|
633
|
+
attribute: "short-text",
|
|
634
|
+
converter: c("")
|
|
635
|
+
})], E.prototype, "shortText", void 0), o([t({
|
|
636
|
+
reflect: !0,
|
|
637
|
+
attribute: "short-supporting-text",
|
|
638
|
+
converter: c("")
|
|
639
|
+
})], E.prototype, "shortSupportingText", void 0), o([t({ type: String })], E.prototype, "href", void 0), o([n()], E.prototype, "_isShort", void 0), o([n()], E.prototype, "_dismissButtonAccessibilityLabel", void 0), o([n()], E.prototype, "_isFallbackFocusable", void 0), o([n()], E.prototype, "_navigation", void 0), E = C = o([s("nldd-document-tab-bar-item")], E);
|
|
640
|
+
var D = (S = class extends u(r, g) {
|
|
641
|
+
constructor(...e) {
|
|
642
|
+
super(...e), this._id = `nldd-document-tab-bar-${w._idCounter++}`, this.accessibleLabel = "", this.navigation = !1, this._overflowCount = 0, this._menuOpen = !1, this._menu = null, this._resizeObserver = null, this._hasCustomLabel = !1, this._holding = !1, this._releaseOnRemoval = null, this._rowWidth = 0, this._itemsAtHold = /* @__PURE__ */ new Set(), this._draggingEl = null, this._placeholder = null, this._currentDropIndex = -1, this._pointerId = null, this._clone = null, this._cloneOffsetX = 0, this._tabBarRect = null, this._pendingDragItem = null, this._pendingDragStartX = 0, this._pendingPointerId = null, this._onPointerDown = (e) => {
|
|
643
|
+
let t = e.composedPath();
|
|
644
|
+
if (t.some((e) => e instanceof Element && e.classList?.contains("document-tab-bar__item-dismiss-button"))) return;
|
|
645
|
+
let n = t.find((e) => e instanceof Element && e.tagName.toLowerCase() === "nldd-document-tab-bar-item");
|
|
646
|
+
n && !n.hidden && (this._pendingDragItem = n, this._pendingDragStartX = e.clientX, this._pendingPointerId = e.pointerId, this.addEventListener("pointermove", this._onPointerMovePending), this.addEventListener("pointerup", this._onPointerUpPending), this.addEventListener("pointercancel", this._onPointerCancelPending));
|
|
647
|
+
}, this._onPointerMovePending = (e) => {
|
|
648
|
+
if (e.pointerId !== this._pendingPointerId || !this._pendingDragItem || (e.preventDefault(), Math.abs(e.clientX - this._pendingDragStartX) < T)) return;
|
|
649
|
+
let t = this._pendingDragItem;
|
|
650
|
+
this._clearPendingDrag(), e.preventDefault(), this._startDrag(t, e.clientX), this._pointerId = e.pointerId, this.setPointerCapture(e.pointerId), this.addEventListener("pointermove", this._onPointerMove), this.addEventListener("pointerup", this._onPointerUp), this.addEventListener("pointercancel", this._onPointerCancel);
|
|
651
|
+
}, this._onPointerUpPending = () => {
|
|
652
|
+
this._clearPendingDrag();
|
|
653
|
+
}, this._onPointerCancelPending = () => {
|
|
654
|
+
this._clearPendingDrag();
|
|
655
|
+
}, this._lastPointerX = 0, this._onPointerMove = (e) => {
|
|
656
|
+
if (!this._draggingEl || !this._placeholder) return;
|
|
657
|
+
this._clone && (this._tabBarRect = this.getBoundingClientRect(), this._clone.style.setProperty("--_document-tab-bar-drag-clone-left", `${e.clientX - this._tabBarRect.left - this._cloneOffsetX}px`));
|
|
658
|
+
let t = e.clientX >= this._lastPointerX;
|
|
659
|
+
this._lastPointerX = e.clientX;
|
|
660
|
+
let n = this._getVisibleItems().filter((e) => e !== this._draggingEl), r = e.clientX, i = n.length;
|
|
661
|
+
for (let e = 0; e < n.length; e++) {
|
|
662
|
+
let a = (n[e].shadowRoot?.querySelector(".document-tab-bar__item") ?? n[e]).getBoundingClientRect();
|
|
663
|
+
if (r < (t ? a.left : a.right)) {
|
|
664
|
+
i = e;
|
|
665
|
+
break;
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
this._setDropIndex(i);
|
|
669
|
+
}, this._onPointerUp = () => {
|
|
670
|
+
try {
|
|
671
|
+
this._endDrag();
|
|
672
|
+
} finally {
|
|
673
|
+
document.documentElement.style.cursor = "";
|
|
674
|
+
}
|
|
675
|
+
}, this._onPointerCancel = () => {
|
|
676
|
+
try {
|
|
677
|
+
this._cancelDrag();
|
|
678
|
+
} finally {
|
|
679
|
+
document.documentElement.style.cursor = "";
|
|
680
|
+
}
|
|
681
|
+
}, this._handleItemSelect = (e) => {
|
|
682
|
+
e.stopPropagation();
|
|
683
|
+
let t = e.detail.item;
|
|
684
|
+
this._getItems().forEach((e) => {
|
|
685
|
+
e.selected = e === t;
|
|
686
|
+
}), this._syncFallbackFocusable(), this.dispatchEvent(new CustomEvent("tabchange", {
|
|
687
|
+
bubbles: !0,
|
|
688
|
+
composed: !0,
|
|
689
|
+
detail: e.detail
|
|
690
|
+
}));
|
|
691
|
+
}, this._handleItemDismiss = (e) => {
|
|
692
|
+
e.stopPropagation();
|
|
693
|
+
let t = e.detail.item, n = this._getItems(), r = null;
|
|
694
|
+
if (t.selected) {
|
|
695
|
+
let e = n.indexOf(t);
|
|
696
|
+
for (let t = e + 1; t < n.length; t++) if (!n[t].hidden) {
|
|
697
|
+
r = n[t];
|
|
698
|
+
break;
|
|
699
|
+
}
|
|
700
|
+
if (!r) {
|
|
701
|
+
for (let t = e - 1; t >= 0; t--) if (!n[t].hidden) {
|
|
702
|
+
r = n[t];
|
|
703
|
+
break;
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
r && (r.selected = !0, r.focus()), t.selected = !1;
|
|
707
|
+
}
|
|
708
|
+
let i = n.length === 1, a = n.filter((e) => !e.hidden), o = a[a.length - 1] === t && a.length === n.length;
|
|
709
|
+
!i && p() && (this._holdWidths(n.filter((e) => e !== t)), o && (this._releaseOnRemoval = t)), this.dispatchEvent(new CustomEvent("tabdismiss", {
|
|
710
|
+
bubbles: !0,
|
|
711
|
+
composed: !0,
|
|
712
|
+
detail: {
|
|
713
|
+
item: t,
|
|
714
|
+
nextItem: r
|
|
715
|
+
}
|
|
716
|
+
})), this._releaseOnRemoval && !this._getItems().includes(this._releaseOnRemoval) && (this._releaseOnRemoval = null, this._releaseWidths()), i && this.dispatchEvent(new CustomEvent("tabempty", {
|
|
717
|
+
bubbles: !0,
|
|
718
|
+
composed: !0
|
|
719
|
+
})), this._syncFallbackFocusable();
|
|
720
|
+
}, this._releaseWidths = () => {
|
|
721
|
+
this.removeEventListener("pointerleave", this._releaseWidths), this._holding = !1, this._itemsAtHold.clear(), this._releaseOnRemoval = null, clearTimeout(this._releasingTimer);
|
|
722
|
+
let e = this.style.getPropertyValue("--_document-tab-bar-held-item-width"), t = () => {
|
|
723
|
+
this.removeAttribute("data-holding-widths"), this.removeAttribute("data-releasing-widths"), this.style.removeProperty("--_document-tab-bar-held-item-width"), this._calculateOverflow();
|
|
724
|
+
}, n = this.shadowRoot?.querySelector(".document-tab-bar__items"), r = this._getVisibleItems().length, i = n && parseFloat(getComputedStyle(n).columnGap) || 0, a = n && r ? (n.clientWidth - i * (r - 1)) / r : 0, o = parseFloat(getComputedStyle(this).getPropertyValue("--_document-tab-bar-release-duration")) || 0, s = matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
725
|
+
!e || !a || !o || s ? t() : (this.toggleAttribute("data-releasing-widths", !0), this.style.setProperty("--_document-tab-bar-held-item-width", `${a}px`), this._releasingTimer = setTimeout(t, o + 50));
|
|
726
|
+
}, this._handleKeyDown = (e) => {
|
|
727
|
+
let t = e.composedPath(), n = t.find((e) => e instanceof Element && e.tagName.toLowerCase() === "nldd-document-tab-bar-item");
|
|
728
|
+
if (!n || n.hidden || t.some((e) => e instanceof Element && e.classList?.contains("document-tab-bar__item-dismiss-button"))) return;
|
|
729
|
+
if (e.shiftKey && (e.key === "ArrowLeft" || e.key === "ArrowRight")) {
|
|
730
|
+
e.preventDefault();
|
|
731
|
+
let t = this._getVisibleItems(), r = this._getItems(), i = t.indexOf(n);
|
|
732
|
+
if (i === -1) return;
|
|
733
|
+
let a = e.key === "ArrowLeft" ? i - 1 : i + 1;
|
|
734
|
+
if (a < 0 || a >= t.length) return;
|
|
735
|
+
let o = t[a];
|
|
736
|
+
e.key === "ArrowLeft" ? o.before(n) : o.after(n);
|
|
737
|
+
let s = r.indexOf(n), c = this._getItems().indexOf(n);
|
|
738
|
+
this.dispatchEvent(new CustomEvent("nldd-reorder", {
|
|
739
|
+
detail: {
|
|
740
|
+
fromIndex: s,
|
|
741
|
+
toIndex: c
|
|
742
|
+
},
|
|
743
|
+
bubbles: !0,
|
|
744
|
+
composed: !0
|
|
745
|
+
})), this._announce(this._t("components.document-tab-bar.reorder-dropped-text", { position: c + 1 })), requestAnimationFrame(() => {
|
|
746
|
+
n.shadowRoot?.querySelector(".document-tab-bar__item-tab")?.focus();
|
|
747
|
+
});
|
|
748
|
+
return;
|
|
749
|
+
}
|
|
750
|
+
let r = this._getVisibleItems();
|
|
751
|
+
if (r.length === 0) return;
|
|
752
|
+
let i = r.findIndex((t) => t === e.target || t.contains(e.target)), a = -1;
|
|
753
|
+
switch (e.key) {
|
|
754
|
+
case "ArrowLeft":
|
|
755
|
+
e.preventDefault(), a = i > 0 ? i - 1 : r.length - 1;
|
|
756
|
+
break;
|
|
757
|
+
case "ArrowRight":
|
|
758
|
+
e.preventDefault(), a = i < r.length - 1 ? i + 1 : 0;
|
|
759
|
+
break;
|
|
760
|
+
case "Home":
|
|
761
|
+
e.preventDefault(), a = 0;
|
|
762
|
+
break;
|
|
763
|
+
case "End":
|
|
764
|
+
e.preventDefault(), a = r.length - 1;
|
|
765
|
+
break;
|
|
766
|
+
default: return;
|
|
767
|
+
}
|
|
768
|
+
a >= 0 && (r[a].focus(), this.navigation || (this._getItems().forEach((e) => {
|
|
769
|
+
e.selected = e === r[a];
|
|
770
|
+
}), this.dispatchEvent(new CustomEvent("tabchange", {
|
|
771
|
+
bubbles: !0,
|
|
772
|
+
composed: !0,
|
|
773
|
+
detail: { item: r[a] }
|
|
774
|
+
}))));
|
|
775
|
+
};
|
|
776
|
+
}
|
|
777
|
+
connectedCallback() {
|
|
778
|
+
super.connectedCallback(), this.addEventListener("select", this._handleItemSelect), this.addEventListener("dismiss", this._handleItemDismiss), this.addEventListener("keydown", this._handleKeyDown), this.addEventListener("pointerdown", this._onPointerDown), this._createMenu();
|
|
779
|
+
}
|
|
780
|
+
disconnectedCallback() {
|
|
781
|
+
super.disconnectedCallback(), this.removeEventListener("select", this._handleItemSelect), this.removeEventListener("dismiss", this._handleItemDismiss), this.removeEventListener("keydown", this._handleKeyDown), this.removeEventListener("pointerdown", this._onPointerDown), this.removeEventListener("pointerleave", this._releaseWidths), this._itemsAtHold.clear(), this._releaseOnRemoval = null, clearTimeout(this._releasingTimer), this.removeAttribute("data-holding-widths"), this.removeAttribute("data-releasing-widths"), this.style.removeProperty("--_document-tab-bar-held-item-width"), this._holding = !1, this._menu?.remove(), this._menu = null, this._resizeObserver?.disconnect(), this._resizeObserver = null, this._cancelDrag();
|
|
782
|
+
}
|
|
783
|
+
firstUpdated() {
|
|
784
|
+
this._hasCustomLabel = !!this.accessibleLabel;
|
|
785
|
+
let e = this.shadowRoot?.querySelector(".document-tab-bar__items");
|
|
786
|
+
e && (this._rowWidth = this.clientWidth, this._resizeObserver = new ResizeObserver(() => {
|
|
787
|
+
let e = this.clientWidth;
|
|
788
|
+
this._holding && e !== this._rowWidth && this._releaseWidths(), this._rowWidth = e, this._calculateOverflow();
|
|
789
|
+
}), this._resizeObserver.observe(e)), this._syncMenuAnchor(), requestAnimationFrame(() => this._calculateOverflow());
|
|
790
|
+
}
|
|
791
|
+
updated(e) {
|
|
792
|
+
e.has("_overflowCount") && (this._applyItemVisibility(), this._updateMenu()), e.has("translations") && this._propagateDismissLabel(), e.has("navigation") && this._propagateNavigation();
|
|
793
|
+
}
|
|
794
|
+
_getItems() {
|
|
795
|
+
let e = this.shadowRoot?.querySelector("slot:not([name])");
|
|
796
|
+
return e ? e.assignedElements().filter((e) => e.tagName.toLowerCase() === "nldd-document-tab-bar-item" && !e.hasAttribute("data-nldd-placeholder")) : [];
|
|
797
|
+
}
|
|
798
|
+
_getVisibleItems() {
|
|
799
|
+
return this._getItems().filter((e) => !e.hidden);
|
|
800
|
+
}
|
|
801
|
+
_propagateNavigation() {
|
|
802
|
+
this._getItems().forEach((e) => {
|
|
803
|
+
e._navigation = this.navigation;
|
|
804
|
+
});
|
|
805
|
+
}
|
|
806
|
+
_propagateDismissLabel() {
|
|
807
|
+
let e = this._t("components.document-tab-bar.dismiss-action");
|
|
808
|
+
this._getItems().forEach((t) => {
|
|
809
|
+
t._dismissButtonAccessibilityLabel = e;
|
|
810
|
+
});
|
|
811
|
+
}
|
|
812
|
+
_syncFallbackFocusable() {
|
|
813
|
+
let e = this._getVisibleItems(), t = e.some((e) => e.selected), n = e.find((e) => !e.hidden) ?? null;
|
|
814
|
+
e.forEach((e) => {
|
|
815
|
+
e._isFallbackFocusable = !t && e === n;
|
|
816
|
+
});
|
|
817
|
+
}
|
|
818
|
+
_onEndSlotChange(e) {
|
|
819
|
+
let t = e.target, n = t.parentElement;
|
|
820
|
+
n.hidden = t.assignedElements().length === 0;
|
|
821
|
+
}
|
|
822
|
+
_onSlotChange() {
|
|
823
|
+
this._releaseOnRemoval && !this._getItems().includes(this._releaseOnRemoval) && (this._releaseOnRemoval = null, this._releaseWidths()), this._holding && this._getItems().some((e) => !this._itemsAtHold.has(e)) && this._releaseWidths(), this._calculateOverflow(), this._propagateDismissLabel(), this._syncFallbackFocusable(), this._propagateNavigation();
|
|
824
|
+
}
|
|
825
|
+
_applyItemVisibility() {
|
|
826
|
+
let e = this._getItems(), t = e.length - this._overflowCount;
|
|
827
|
+
e.forEach((e, n) => {
|
|
828
|
+
e.hidden = n >= t;
|
|
829
|
+
});
|
|
830
|
+
}
|
|
831
|
+
_clearPendingDrag() {
|
|
832
|
+
this._pendingDragItem = null, this._pendingDragStartX = 0, this._pendingPointerId = null, this.removeEventListener("pointermove", this._onPointerMovePending), this.removeEventListener("pointerup", this._onPointerUpPending), this.removeEventListener("pointercancel", this._onPointerCancelPending);
|
|
833
|
+
}
|
|
834
|
+
_startDrag(e, t = 0) {
|
|
835
|
+
let n = this._getVisibleItems().indexOf(e);
|
|
836
|
+
if (n === -1) return;
|
|
837
|
+
this._draggingEl = e, this._currentDropIndex = n, this._lastPointerX = t;
|
|
838
|
+
let r = (e.shadowRoot?.querySelector(".document-tab-bar__item-tab") ?? e).getBoundingClientRect();
|
|
839
|
+
this._placeholder = document.createElement("div"), this._placeholder.className = "nldd-document-tab-bar-drag-placeholder", this._placeholder.setAttribute("aria-hidden", "true"), this._placeholder.setAttribute("data-nldd-placeholder", ""), e.after(this._placeholder), e.classList.add("is-dragging"), this._tabBarRect = this.getBoundingClientRect(), this._cloneOffsetX = t - r.left, document.documentElement.style.cursor = "grabbing";
|
|
840
|
+
let i = parseFloat(getComputedStyle(e).getPropertyValue("--_document-tab-bar-short-text-threshold")), a = r.width < i, o = a && e.shortText || e.text, s = a && e.shortSupportingText || e.supportingText, c = document.createElement("div");
|
|
841
|
+
c.className = "document-tab-bar__item";
|
|
842
|
+
let l = document.createElement("div");
|
|
843
|
+
l.className = "document-tab-bar__item-tab";
|
|
844
|
+
let u = document.createElement("span");
|
|
845
|
+
if (u.className = "document-tab-bar__item-text", u.textContent = o, l.appendChild(u), s) {
|
|
846
|
+
let e = document.createElement("span");
|
|
847
|
+
e.className = "document-tab-bar__item-supporting-text", e.textContent = s, l.appendChild(e);
|
|
848
|
+
}
|
|
849
|
+
c.appendChild(l), this._clone = document.createElement("div"), this._clone.className = `document-tab-bar__drag-clone${e.selected ? " is-selected" : ""}`, this._clone.style.setProperty("--_document-tab-bar-drag-clone-left", `${t - this._tabBarRect.left - this._cloneOffsetX}px`), this._clone.style.setProperty("--_document-tab-bar-drag-clone-top", `${r.top - this._tabBarRect.top}px`), this._clone.style.setProperty("--_document-tab-bar-drag-clone-width", `${r.width}px`), this._clone.style.setProperty("--_document-tab-bar-drag-clone-height", `${r.height}px`), this._clone.appendChild(c), this.renderRoot.appendChild(this._clone);
|
|
850
|
+
}
|
|
851
|
+
_setDropIndex(e) {
|
|
852
|
+
if (!this._placeholder || !this._draggingEl) return;
|
|
853
|
+
let t = this._getVisibleItems().filter((e) => e !== this._draggingEl), n = Math.max(0, Math.min(t.length, e));
|
|
854
|
+
this._currentDropIndex = n, this._placeholder.remove(), t.length === 0 ? this._draggingEl.after(this._placeholder) : n === 0 ? t[0].before(this._placeholder) : t[n - 1].after(this._placeholder);
|
|
855
|
+
}
|
|
856
|
+
_getDropIndex() {
|
|
857
|
+
return this._currentDropIndex;
|
|
858
|
+
}
|
|
859
|
+
_endDrag() {
|
|
860
|
+
if (!this._draggingEl || !this._placeholder) return;
|
|
861
|
+
let e = this._getItems(), t = this._draggingEl, n = e.indexOf(t);
|
|
862
|
+
this._placeholder.replaceWith(t);
|
|
863
|
+
let r = this._getItems().indexOf(t);
|
|
864
|
+
this._cleanupDrag(), n === r ? this._announce(this._t("components.document-tab-bar.reorder-no-change-text")) : (this.dispatchEvent(new CustomEvent("nldd-reorder", {
|
|
865
|
+
detail: {
|
|
866
|
+
fromIndex: n,
|
|
867
|
+
toIndex: r
|
|
868
|
+
},
|
|
869
|
+
bubbles: !0,
|
|
870
|
+
composed: !0
|
|
871
|
+
})), this._announce(this._t("components.document-tab-bar.reorder-dropped-text", { position: r + 1 })), requestAnimationFrame(() => {
|
|
872
|
+
(t.shadowRoot?.querySelector(".document-tab-bar__item-tab"))?.focus();
|
|
873
|
+
}));
|
|
874
|
+
}
|
|
875
|
+
_cancelDrag() {
|
|
876
|
+
this._draggingEl && (this._cleanupDrag(), this._announce(this._t("components.document-tab-bar.reorder-canceled-text")));
|
|
877
|
+
}
|
|
878
|
+
_cleanupDrag() {
|
|
879
|
+
if (this._clearPendingDrag(), this._draggingEl?.classList.remove("is-dragging"), this._placeholder?.remove(), this._clone?.remove(), document.documentElement.style.cursor = "", this._pointerId !== null) {
|
|
880
|
+
try {
|
|
881
|
+
this.releasePointerCapture(this._pointerId);
|
|
882
|
+
} catch (e) {
|
|
883
|
+
if (!(e instanceof DOMException)) throw e;
|
|
884
|
+
}
|
|
885
|
+
this._pointerId = null;
|
|
886
|
+
}
|
|
887
|
+
this.removeEventListener("pointermove", this._onPointerMove), this.removeEventListener("pointerup", this._onPointerUp), this.removeEventListener("pointercancel", this._onPointerCancel), this._draggingEl = null, this._placeholder = null, this._clone = null, this._cloneOffsetX = 0, this._tabBarRect = null, this._lastPointerX = 0, this._currentDropIndex = -1;
|
|
888
|
+
}
|
|
889
|
+
_announce(e, t = !1) {
|
|
890
|
+
let n = t ? ".document-tab-bar__assertive-announcer" : ".document-tab-bar__polite-announcer", r = this.shadowRoot?.querySelector(n);
|
|
891
|
+
r && (r.textContent = "", requestAnimationFrame(() => requestAnimationFrame(() => {
|
|
892
|
+
r.textContent = e;
|
|
893
|
+
})));
|
|
894
|
+
}
|
|
895
|
+
_calculateOverflow() {
|
|
896
|
+
let e = this._getItems().length;
|
|
897
|
+
if (e === 0) {
|
|
898
|
+
this._overflowCount = 0;
|
|
899
|
+
return;
|
|
900
|
+
}
|
|
901
|
+
let t = this.shadowRoot?.querySelector(".document-tab-bar__items");
|
|
902
|
+
if (!t) return;
|
|
903
|
+
let n = t.offsetWidth;
|
|
904
|
+
if (n === 0) return;
|
|
905
|
+
let r = parseFloat(getComputedStyle(t).gap) || 8, i = this._getItems()[0], a = i && parseFloat(getComputedStyle(i).minWidth) || parseFloat(getComputedStyle(this).getPropertyValue("--_document-tab-bar-item-min-width")), o = parseFloat(getComputedStyle(this).getPropertyValue("--_document-tab-bar-overflow-button-reserve")), s = Math.floor((n - o + r) / (a + r)), c = Math.max(0, e - Math.max(1, s));
|
|
906
|
+
c !== this._overflowCount && (this._overflowCount = c, this._ensureSelectedVisible());
|
|
907
|
+
}
|
|
908
|
+
_ensureSelectedVisible() {
|
|
909
|
+
let e = this._getItems(), t = e.length - this._overflowCount, n = e.findIndex((e) => e.selected);
|
|
910
|
+
if (n >= t && t > 0) {
|
|
911
|
+
let r = e[t - 1], i = e[n];
|
|
912
|
+
this.insertBefore(i, r);
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
_updateMenu() {
|
|
916
|
+
if (!this._menu) return;
|
|
917
|
+
this._menu.innerHTML = "";
|
|
918
|
+
let e = this._getItems(), t = e.length - this._overflowCount;
|
|
919
|
+
e.slice(t).forEach((e) => {
|
|
920
|
+
let t = e.supportingText ? `${e.text || "–"} · ${e.supportingText}` : e.text || "–", n = document.createElement("nldd-menu-item");
|
|
921
|
+
n.setAttribute("text", t), n.addEventListener("click", () => {
|
|
922
|
+
this._selectAndPromote(e), this._closeMenu();
|
|
923
|
+
}), this._menu.appendChild(n);
|
|
924
|
+
});
|
|
925
|
+
}
|
|
926
|
+
_selectAndPromote(e) {
|
|
927
|
+
let t = this._getItems(), n = t.length - this._overflowCount;
|
|
928
|
+
if (t.forEach((t) => {
|
|
929
|
+
t.selected = t === e;
|
|
930
|
+
}), n > 0 && n < t.length) {
|
|
931
|
+
let r = t[n - 1];
|
|
932
|
+
this.insertBefore(e, r);
|
|
933
|
+
}
|
|
934
|
+
this._applyItemVisibility(), this._updateMenu(), this.dispatchEvent(new CustomEvent("tabchange", {
|
|
935
|
+
bubbles: !0,
|
|
936
|
+
composed: !0,
|
|
937
|
+
detail: { item: e }
|
|
938
|
+
}));
|
|
939
|
+
}
|
|
940
|
+
_createMenu() {
|
|
941
|
+
if (this._menu || typeof document > "u") return;
|
|
942
|
+
let e = document.createElement("nldd-menu");
|
|
943
|
+
e.setAttribute("placement", "bottom-end"), e.id = `${this._id}-menu`, e.addEventListener("toggle", (e) => {
|
|
944
|
+
this._menuOpen = e.newState === "open";
|
|
945
|
+
}), e.addEventListener("beforetoggle", (t) => {
|
|
946
|
+
t.newState === "open" && m(e, this);
|
|
947
|
+
}), document.body.appendChild(e), this._menu = e;
|
|
948
|
+
}
|
|
949
|
+
_syncMenuAnchor() {
|
|
950
|
+
if (!this._menu) return;
|
|
951
|
+
let e = this.shadowRoot?.querySelector(".document-tab-bar__overflow-button nldd-icon-button");
|
|
952
|
+
e && (this._menu.anchorElement = e, "popoverTargetElement" in e && (e.popoverTargetElement = this._menu), "popoverTargetAction" in e && e.popoverTargetAction === "toggle" && (e.popoverTargetAction = "show"));
|
|
953
|
+
}
|
|
954
|
+
_closeMenu() {
|
|
955
|
+
this._menu?.hidePopover();
|
|
956
|
+
}
|
|
957
|
+
_holdWidths(e) {
|
|
958
|
+
if (this._holding) return;
|
|
959
|
+
let t = e.find((e) => !e.hidden);
|
|
960
|
+
t && (this.style.setProperty("--_document-tab-bar-held-item-width", `${t.getBoundingClientRect().width}px`), this.toggleAttribute("data-holding-widths", !0), this._holding = !0, this._itemsAtHold = new Set(this._getItems()), this.addEventListener("pointerleave", this._releaseWidths));
|
|
961
|
+
}
|
|
962
|
+
render() {
|
|
963
|
+
return y(this);
|
|
964
|
+
}
|
|
965
|
+
}, w = S, S.styles = _, S._idCounter = 0, S);
|
|
966
|
+
o([t({
|
|
967
|
+
type: String,
|
|
968
|
+
attribute: "accessible-label"
|
|
969
|
+
})], D.prototype, "accessibleLabel", void 0), o([t({
|
|
970
|
+
type: Boolean,
|
|
971
|
+
reflect: !0
|
|
972
|
+
})], D.prototype, "navigation", void 0), o([n()], D.prototype, "_overflowCount", void 0), o([n()], D.prototype, "_menuOpen", void 0), D = w = o([s("nldd-document-tab-bar")], D);
|
|
973
|
+
export { D as NLDDDocumentTabBar, E as NLDDDocumentTabBarItem };
|