@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,508 @@
|
|
|
1
|
+
import { r as e } from "./icon-BORlalt0.js";
|
|
2
|
+
import { i as t, n, t as r } from "./custom-element-q6NzoL5b.js";
|
|
3
|
+
import { n as i, o as a, r as o, t as s } from "./decorate-TduJMFD_.js";
|
|
4
|
+
import { t as c } from "./custom-element-BW8Ua4c7.js";
|
|
5
|
+
import { t as l } from "./reflect-non-default-Bu3rpCvg.js";
|
|
6
|
+
import { t as u } from "./shadow-resets-6SToDsPu.js";
|
|
7
|
+
import { t as d } from "./translations-wxBSz213.js";
|
|
8
|
+
import { t as f } from "./described-by-mixin-daRE7orX.js";
|
|
9
|
+
import { t as p } from "./defer-focus-F73ud2D9.js";
|
|
10
|
+
import { t as m } from "./time-picker.i18n-BilOCXlS.js";
|
|
11
|
+
// src/components/inputs/time-picker/time-picker.styles.ts
|
|
12
|
+
var h = t`
|
|
13
|
+
:host {
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
/* # Host */
|
|
19
|
+
|
|
20
|
+
:host {
|
|
21
|
+
--_time-picker-control-min-size: var(--semantics-controls-md-min-size);
|
|
22
|
+
--_time-picker-glide-duration: var(--primitives-transition-duration-medium);
|
|
23
|
+
--_time-picker-control-corner-radius: var(--semantics-controls-md-corner-radius);
|
|
24
|
+
--_time-picker-list-item-font: var(--primitives-font-body-md-medium-flat);
|
|
25
|
+
--_time-picker-list-item-is-hovered-background-color: light-dark(var(--primitives-color-neutral-100), var(--primitives-color-neutral-150));
|
|
26
|
+
--_time-picker-selection-background-color: var(--semantics-controls-is-selected-indicator-color);
|
|
27
|
+
--_time-picker-selection-content-color: var(--semantics-controls-is-selected-contrast-color);
|
|
28
|
+
--_time-picker-list-width: calc(var(--_time-picker-control-min-size) * 1.5);
|
|
29
|
+
--_time-picker-rows: 7;
|
|
30
|
+
--_time-picker-list-height: calc(var(--_time-picker-control-min-size) * var(--_time-picker-rows));
|
|
31
|
+
--_time-picker-list-gap: var(--primitives-space-4);
|
|
32
|
+
/* initial keeps it guaranteed-invalid, so width lands on auto as long as
|
|
33
|
+
the attribute sets nothing. */
|
|
34
|
+
--_time-picker-width: initial;
|
|
35
|
+
|
|
36
|
+
@media (pointer: fine) {
|
|
37
|
+
--_time-picker-control-min-size: var(--semantics-controls-sm-min-size);
|
|
38
|
+
--_time-picker-control-corner-radius: var(--semantics-controls-sm-corner-radius);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
${u}
|
|
42
|
+
display: inline-block;
|
|
43
|
+
width: var(--_time-picker-width);
|
|
44
|
+
max-width: 100%;
|
|
45
|
+
font: var(--_time-picker-list-item-font);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:host([hidden]) {
|
|
49
|
+
display: none;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
/* # Block */
|
|
54
|
+
|
|
55
|
+
.time-picker {
|
|
56
|
+
display: flex;
|
|
57
|
+
position: relative;
|
|
58
|
+
height: var(--_time-picker-list-height);
|
|
59
|
+
gap: var(--_time-picker-list-gap);
|
|
60
|
+
align-items: stretch;
|
|
61
|
+
justify-content: center;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
/* # Lists */
|
|
66
|
+
|
|
67
|
+
.time-picker__list {
|
|
68
|
+
display: flex;
|
|
69
|
+
width: var(--_time-picker-list-width);
|
|
70
|
+
overflow-y: auto;
|
|
71
|
+
flex-direction: column;
|
|
72
|
+
flex-grow: 1;
|
|
73
|
+
flex-shrink: 1;
|
|
74
|
+
/* Without this the values of a short list stretch to the full height. */
|
|
75
|
+
justify-content: flex-start;
|
|
76
|
+
scrollbar-width: none;
|
|
77
|
+
/* Not mandatory: then the browser always has to land on a snap point, and a
|
|
78
|
+
short list can refuse to scroll. */
|
|
79
|
+
scroll-snap-type: y proximity;
|
|
80
|
+
mask-image: linear-gradient(to bottom, transparent 0%, black 12%, black 88%, transparent 100%);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* Snapping would pull each frame of the glide to the nearest value. */
|
|
84
|
+
.time-picker__list[data-gliding] {
|
|
85
|
+
scroll-snap-type: none;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.time-picker__list::-webkit-scrollbar {
|
|
89
|
+
display: none;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* Room for the first and last value to reach the middle. As empty boxes and
|
|
93
|
+
not as padding-block: Safari does not count the bottom padding of a scroll
|
|
94
|
+
container towards the scrollable overflow, and on a short list that wipes
|
|
95
|
+
out all overflow. */
|
|
96
|
+
.time-picker__list::before,
|
|
97
|
+
.time-picker__list::after {
|
|
98
|
+
content: '';
|
|
99
|
+
display: block;
|
|
100
|
+
flex-shrink: 0;
|
|
101
|
+
height: calc((var(--_time-picker-list-height) - var(--_time-picker-control-min-size)) / 2);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.time-picker__list-item {
|
|
105
|
+
box-sizing: border-box;
|
|
106
|
+
display: flex;
|
|
107
|
+
border-radius: var(--_time-picker-control-corner-radius);
|
|
108
|
+
min-height: var(--_time-picker-control-min-size);
|
|
109
|
+
flex-shrink: 0;
|
|
110
|
+
align-items: center;
|
|
111
|
+
justify-content: center;
|
|
112
|
+
color: var(--semantics-content-color);
|
|
113
|
+
font: var(--_time-picker-list-item-font);
|
|
114
|
+
font-variant-numeric: tabular-nums;
|
|
115
|
+
cursor: default;
|
|
116
|
+
user-select: none;
|
|
117
|
+
scroll-snap-align: center;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* Touch reports a hover after a tap and keeps it until you touch something
|
|
121
|
+
else, so a value stays lit long after you picked it, and a finger dragging
|
|
122
|
+
the list lights whatever it passes. Only pointers that can really hover. */
|
|
123
|
+
@media (hover: hover) {
|
|
124
|
+
.time-picker__list-item:hover {
|
|
125
|
+
background-color: var(--_time-picker-list-item-is-hovered-background-color);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* While scrolling, the values slide past under a stationary cursor and a
|
|
130
|
+
different one would light up every time. A tap halfway through a swipe
|
|
131
|
+
should also stop the scroll, not pick a value.
|
|
132
|
+
Turning the background off separately: pointer-events only holds off new
|
|
133
|
+
hover, and a :hover already in place stays until the browser redoes the
|
|
134
|
+
hit test. */
|
|
135
|
+
:host([data-scrolling]) .time-picker__list-item {
|
|
136
|
+
pointer-events: none;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
:host([data-scrolling]) .time-picker__list-item:hover {
|
|
140
|
+
background-color: transparent;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.time-picker__gap {
|
|
144
|
+
flex-shrink: 0;
|
|
145
|
+
width: 1ch;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
/* # Selection */
|
|
150
|
+
|
|
151
|
+
/* The lists have a mask-image and therefore their own stacking context, and
|
|
152
|
+
they come after this in the DOM: without z-index their digits paint over
|
|
153
|
+
it. */
|
|
154
|
+
.time-picker__selection {
|
|
155
|
+
display: flex;
|
|
156
|
+
z-index: 1;
|
|
157
|
+
position: absolute;
|
|
158
|
+
top: 50%;
|
|
159
|
+
right: 0;
|
|
160
|
+
left: 0;
|
|
161
|
+
border-radius: var(--_time-picker-control-corner-radius);
|
|
162
|
+
background-color: var(--_time-picker-selection-background-color);
|
|
163
|
+
/* Otherwise this surface catches the swipe meant to scroll the list beneath
|
|
164
|
+
it, exactly where you put the mouse down. */
|
|
165
|
+
pointer-events: none;
|
|
166
|
+
height: var(--_time-picker-control-min-size);
|
|
167
|
+
gap: var(--_time-picker-list-gap);
|
|
168
|
+
align-items: center;
|
|
169
|
+
color: var(--_time-picker-selection-content-color);
|
|
170
|
+
font-variant-numeric: tabular-nums;
|
|
171
|
+
transform: translateY(-50%);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.time-picker__value {
|
|
175
|
+
display: flex;
|
|
176
|
+
outline: none;
|
|
177
|
+
border-radius: var(--_time-picker-control-corner-radius);
|
|
178
|
+
width: var(--_time-picker-list-width);
|
|
179
|
+
height: 100%;
|
|
180
|
+
flex-grow: 1;
|
|
181
|
+
flex-shrink: 1;
|
|
182
|
+
align-items: center;
|
|
183
|
+
justify-content: center;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.time-picker__value:focus-visible {
|
|
187
|
+
outline: var(--semantics-focus-ring-outline);
|
|
188
|
+
outline-offset: var(--semantics-focus-ring-outline-offset);
|
|
189
|
+
box-shadow: var(--semantics-focus-ring-box-shadow);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.time-picker__value-separator {
|
|
193
|
+
flex-shrink: 0;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
/* # High Contrast */
|
|
198
|
+
|
|
199
|
+
@media (forced-colors: active) {
|
|
200
|
+
.time-picker__selection {
|
|
201
|
+
outline: 2px solid CanvasText;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
`;
|
|
205
|
+
// src/components/inputs/time-picker/time-picker.template.ts
|
|
206
|
+
function g(e) {
|
|
207
|
+
return String(e).padStart(2, "0");
|
|
208
|
+
}
|
|
209
|
+
function _(e, t, n, r) {
|
|
210
|
+
return a`
|
|
211
|
+
<div class="time-picker__list"
|
|
212
|
+
role="presentation"
|
|
213
|
+
aria-hidden="true"
|
|
214
|
+
data-column=${t}
|
|
215
|
+
@keydown=${(n) => e._handleKeydown(n, t)}
|
|
216
|
+
@scroll=${(n) => e._handleScroll(n, t)}
|
|
217
|
+
@wheel=${e._takeOver}
|
|
218
|
+
@touchstart=${e._takeOver}
|
|
219
|
+
@pointerdown=${e._takeOver}
|
|
220
|
+
>
|
|
221
|
+
${n.map((n) => a`
|
|
222
|
+
<div class="time-picker__list-item"
|
|
223
|
+
data-selected=${n === r ? "true" : o}
|
|
224
|
+
@click=${() => e._select(t, n, !0)}
|
|
225
|
+
>
|
|
226
|
+
${g(n)}
|
|
227
|
+
</div>
|
|
228
|
+
`)}
|
|
229
|
+
</div>
|
|
230
|
+
`;
|
|
231
|
+
}
|
|
232
|
+
function v(e, t, n, r) {
|
|
233
|
+
let i = t === "hours" ? e._hours : e._minutes;
|
|
234
|
+
return a`
|
|
235
|
+
<span class="time-picker__value"
|
|
236
|
+
role="spinbutton"
|
|
237
|
+
tabindex="0"
|
|
238
|
+
aria-label=${r}
|
|
239
|
+
aria-valuenow=${n ?? o}
|
|
240
|
+
aria-valuemin=${i[0] ?? o}
|
|
241
|
+
aria-valuemax=${i[i.length - 1] ?? o}
|
|
242
|
+
aria-valuetext=${n === null ? o : g(n)}
|
|
243
|
+
@keydown=${(n) => e._handleKeydown(n, t)}
|
|
244
|
+
>
|
|
245
|
+
${n === null ? "" : g(n)}
|
|
246
|
+
</span>
|
|
247
|
+
`;
|
|
248
|
+
}
|
|
249
|
+
function y(e) {
|
|
250
|
+
return a`
|
|
251
|
+
<div class="time-picker"
|
|
252
|
+
role="group"
|
|
253
|
+
aria-label=${e._label}
|
|
254
|
+
>
|
|
255
|
+
<div class="time-picker__selection">
|
|
256
|
+
${v(e, "hours", e._centeredHour, e._t("components.time-picker.hours-label"))}
|
|
257
|
+
<span class="time-picker__value-separator"
|
|
258
|
+
aria-hidden="true"
|
|
259
|
+
>
|
|
260
|
+
:
|
|
261
|
+
</span>
|
|
262
|
+
${v(e, "minutes", e._centeredMinute, e._t("components.time-picker.minutes-label"))}
|
|
263
|
+
</div>
|
|
264
|
+
${_(e, "hours", e._hours, e._selectedHour)}
|
|
265
|
+
<span class="time-picker__gap"
|
|
266
|
+
aria-hidden="true"
|
|
267
|
+
></span>
|
|
268
|
+
${_(e, "minutes", e._minutes, e._selectedMinute)}
|
|
269
|
+
</div>
|
|
270
|
+
`;
|
|
271
|
+
}
|
|
272
|
+
// src/components/inputs/time-picker/time-picker.ts
|
|
273
|
+
var b = /* @__PURE__ */ e({
|
|
274
|
+
NLDDTimePicker: () => D,
|
|
275
|
+
fromMinutes: () => w,
|
|
276
|
+
toMinutes: () => C
|
|
277
|
+
}), x, S = 1439;
|
|
278
|
+
function C(e) {
|
|
279
|
+
let [t, n] = e.split(":");
|
|
280
|
+
return Number(t) * 60 + Number(n);
|
|
281
|
+
}
|
|
282
|
+
function w(e) {
|
|
283
|
+
return `${String(Math.floor(e / 60)).padStart(2, "0")}:${String(e % 60).padStart(2, "0")}`;
|
|
284
|
+
}
|
|
285
|
+
function T(e) {
|
|
286
|
+
return /^([01]\d|2[0-3]):[0-5]\d$/.test(e);
|
|
287
|
+
}
|
|
288
|
+
function E(e) {
|
|
289
|
+
let t = parseFloat(e);
|
|
290
|
+
return Number.isNaN(t) ? 0 : e.trim().endsWith("ms") ? t : e.trim().endsWith("s") ? t * 1e3 : 0;
|
|
291
|
+
}
|
|
292
|
+
var D = (x = class extends f(i) {
|
|
293
|
+
constructor(...e) {
|
|
294
|
+
super(...e), this.value = "", this.min = "", this.max = "", this.step = 1, this.rows = 7, this.width = "", this.accessibleLabel = "", this.translations = {}, this._scrolledTo = {
|
|
295
|
+
hours: null,
|
|
296
|
+
minutes: null
|
|
297
|
+
}, this.invalid = !1, this._scrollingSelf = !1, this._scrollTimers = {
|
|
298
|
+
hours: 0,
|
|
299
|
+
minutes: 0
|
|
300
|
+
}, this._selfScrollTimer = 0, this._chosenHere = !1, this._glides = /* @__PURE__ */ new Map(), this._takeOver = {
|
|
301
|
+
passive: !0,
|
|
302
|
+
handleEvent: () => {
|
|
303
|
+
for (let e of [...this._glides.keys()]) this._stopGlide(e);
|
|
304
|
+
clearTimeout(this._selfScrollTimer), this._scrollingSelf = !1;
|
|
305
|
+
}
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
_t(e) {
|
|
309
|
+
return d(this.translations, m, e);
|
|
310
|
+
}
|
|
311
|
+
get _label() {
|
|
312
|
+
return this.accessibleLabel || this._t("components.time-picker.default-label");
|
|
313
|
+
}
|
|
314
|
+
get _minMinutes() {
|
|
315
|
+
return T(this.min) ? C(this.min) : 0;
|
|
316
|
+
}
|
|
317
|
+
get _maxMinutes() {
|
|
318
|
+
return T(this.max) ? C(this.max) : S;
|
|
319
|
+
}
|
|
320
|
+
get _stepMinutes() {
|
|
321
|
+
return Math.max(1, Math.round(this.step));
|
|
322
|
+
}
|
|
323
|
+
get _slots() {
|
|
324
|
+
let e = [];
|
|
325
|
+
for (let t = this._minMinutes; t <= this._maxMinutes; t += this._stepMinutes) e.push(t);
|
|
326
|
+
return e;
|
|
327
|
+
}
|
|
328
|
+
get _hours() {
|
|
329
|
+
return [...new Set(this._slots.map((e) => Math.floor(e / 60)))];
|
|
330
|
+
}
|
|
331
|
+
get _minutes() {
|
|
332
|
+
let e = this._selected === null ? this._hours[0] : Math.floor(this._selected / 60);
|
|
333
|
+
return this._slots.filter((t) => Math.floor(t / 60) === e).map((e) => e % 60);
|
|
334
|
+
}
|
|
335
|
+
get _selected() {
|
|
336
|
+
if (!T(this.value)) return null;
|
|
337
|
+
let e = C(this.value);
|
|
338
|
+
return e >= this._minMinutes && e <= this._maxMinutes ? e : null;
|
|
339
|
+
}
|
|
340
|
+
get _selectedHour() {
|
|
341
|
+
return this._selected === null ? null : Math.floor(this._selected / 60);
|
|
342
|
+
}
|
|
343
|
+
get _selectedMinute() {
|
|
344
|
+
return this._selected === null ? null : this._selected % 60;
|
|
345
|
+
}
|
|
346
|
+
get _centeredHour() {
|
|
347
|
+
return this._scrolledTo.hours ?? this._selectedHour;
|
|
348
|
+
}
|
|
349
|
+
get _centeredMinute() {
|
|
350
|
+
return this._scrolledTo.minutes ?? this._selectedMinute;
|
|
351
|
+
}
|
|
352
|
+
_select(e, t, n = !1) {
|
|
353
|
+
let r = this._slots;
|
|
354
|
+
if (r.length === 0) return;
|
|
355
|
+
let i;
|
|
356
|
+
if (e === "hours") {
|
|
357
|
+
let e = this._selected === null ? null : this._selected % 60, n = r.filter((e) => Math.floor(e / 60) === t);
|
|
358
|
+
if (n.length === 0) return;
|
|
359
|
+
i = e !== null && n.includes(t * 60 + e) ? t * 60 + e : n[0];
|
|
360
|
+
} else if (i = (this._selected === null ? this._hours[0] : Math.floor(this._selected / 60)) * 60 + t, !r.includes(i)) return;
|
|
361
|
+
n && this._cancelSettle();
|
|
362
|
+
let a = w(i) !== this.value;
|
|
363
|
+
this._chosenHere = a, this.value = w(i), a ? this._emit("input") : n && (this._scrolledTo = {
|
|
364
|
+
hours: null,
|
|
365
|
+
minutes: null
|
|
366
|
+
}, this.scrollSelectedIntoView(!0)), n && this._emit("change");
|
|
367
|
+
}
|
|
368
|
+
_emit(e) {
|
|
369
|
+
this.dispatchEvent(new CustomEvent(e, {
|
|
370
|
+
detail: { value: this.value },
|
|
371
|
+
bubbles: !0,
|
|
372
|
+
composed: !0
|
|
373
|
+
}));
|
|
374
|
+
}
|
|
375
|
+
_handleKeydown(e, t) {
|
|
376
|
+
let n = t === "hours" ? this._hours : this._minutes;
|
|
377
|
+
if (n.length === 0) return;
|
|
378
|
+
let r = t === "hours" ? this._selectedHour : this._selectedMinute, i = r === null ? -1 : n.indexOf(r);
|
|
379
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
380
|
+
e.preventDefault(), this._emit("change");
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
383
|
+
if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
|
|
384
|
+
e.preventDefault(), this._focusColumn(e.key === "ArrowLeft" ? "hours" : "minutes");
|
|
385
|
+
return;
|
|
386
|
+
}
|
|
387
|
+
let a;
|
|
388
|
+
switch (e.key) {
|
|
389
|
+
case "ArrowDown":
|
|
390
|
+
a = n[Math.min(i + 1, n.length - 1)];
|
|
391
|
+
break;
|
|
392
|
+
case "ArrowUp":
|
|
393
|
+
a = n[i <= 0 ? 0 : i - 1];
|
|
394
|
+
break;
|
|
395
|
+
case "Home":
|
|
396
|
+
a = n[0];
|
|
397
|
+
break;
|
|
398
|
+
case "End":
|
|
399
|
+
a = n[n.length - 1];
|
|
400
|
+
break;
|
|
401
|
+
default: return;
|
|
402
|
+
}
|
|
403
|
+
e.preventDefault(), a !== null && this._select(t, a);
|
|
404
|
+
}
|
|
405
|
+
_focusColumn(e) {
|
|
406
|
+
this.shadowRoot?.querySelectorAll(".time-picker__value")[e === "hours" ? 0 : 1]?.focus();
|
|
407
|
+
}
|
|
408
|
+
focus(e) {
|
|
409
|
+
if (p(this, e)) return;
|
|
410
|
+
let t = this.shadowRoot?.querySelector(".time-picker__value");
|
|
411
|
+
t ? t.focus(e) : super.focus(e);
|
|
412
|
+
}
|
|
413
|
+
disconnectedCallback() {
|
|
414
|
+
clearTimeout(this._scrollTimers.hours), clearTimeout(this._scrollTimers.minutes), clearTimeout(this._selfScrollTimer);
|
|
415
|
+
for (let e of [...this._glides.keys()]) this._stopGlide(e);
|
|
416
|
+
super.disconnectedCallback();
|
|
417
|
+
}
|
|
418
|
+
_handleScroll(e, t) {
|
|
419
|
+
if (this._scrollingSelf) {
|
|
420
|
+
this._releaseSelfScroll();
|
|
421
|
+
return;
|
|
422
|
+
}
|
|
423
|
+
if (!this.isConnected) return;
|
|
424
|
+
let n = e.currentTarget, r = this._centeredOption(n);
|
|
425
|
+
r !== null && (this._scrolledTo = {
|
|
426
|
+
...this._scrolledTo,
|
|
427
|
+
[t]: r
|
|
428
|
+
}), this.toggleAttribute("data-scrolling", !0), clearTimeout(this._scrollTimers[t]), this._scrollTimers[t] = window.setTimeout(() => {
|
|
429
|
+
this._selectCentred(t, n), this.toggleAttribute("data-scrolling", !1);
|
|
430
|
+
}, 120);
|
|
431
|
+
}
|
|
432
|
+
_cancelSettle() {
|
|
433
|
+
clearTimeout(this._scrollTimers.hours), clearTimeout(this._scrollTimers.minutes), this.toggleAttribute("data-scrolling", !1);
|
|
434
|
+
}
|
|
435
|
+
_centeredOption(e) {
|
|
436
|
+
let t = e.scrollTop + e.clientHeight / 2, n = null, r = Infinity;
|
|
437
|
+
for (let i of e.querySelectorAll(".time-picker__list-item")) {
|
|
438
|
+
let e = Math.abs(i.offsetTop + i.offsetHeight / 2 - t);
|
|
439
|
+
e < r && (r = e, n = i);
|
|
440
|
+
}
|
|
441
|
+
return n === null ? null : Number(n.textContent);
|
|
442
|
+
}
|
|
443
|
+
_selectCentred(e, t) {
|
|
444
|
+
let n = this._centeredOption(t);
|
|
445
|
+
n !== null && this._select(e, n);
|
|
446
|
+
}
|
|
447
|
+
scrollSelectedIntoView(e = !1) {
|
|
448
|
+
this._scrollingSelf = !0;
|
|
449
|
+
let t = e && !matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
450
|
+
for (let e of ["hours", "minutes"]) {
|
|
451
|
+
let n = this.shadowRoot?.querySelector(`[data-column="${e}"]`), r = n?.querySelector("[data-selected]");
|
|
452
|
+
if (!n || !r) continue;
|
|
453
|
+
let i = r.offsetTop + r.offsetHeight / 2 - n.clientHeight / 2;
|
|
454
|
+
t ? this._glide(n, i) : (this._stopGlide(n), n.scrollTop = i);
|
|
455
|
+
}
|
|
456
|
+
this._releaseSelfScroll();
|
|
457
|
+
}
|
|
458
|
+
_glide(e, t) {
|
|
459
|
+
this._stopGlide(e);
|
|
460
|
+
let n = e.scrollTop, r = t - n;
|
|
461
|
+
if (Math.abs(r) < 1) return;
|
|
462
|
+
let i = E(getComputedStyle(this).getPropertyValue("--_time-picker-glide-duration")), a = performance.now();
|
|
463
|
+
e.toggleAttribute("data-gliding", !0);
|
|
464
|
+
let o = (t) => {
|
|
465
|
+
let s = i > 0 ? Math.min(1, (t - a) / i) : 1;
|
|
466
|
+
e.scrollTop = n + r * (1 - (1 - s) ** 3), s < 1 ? this._glides.set(e, requestAnimationFrame(o)) : this._stopGlide(e);
|
|
467
|
+
};
|
|
468
|
+
this._glides.set(e, requestAnimationFrame(o));
|
|
469
|
+
}
|
|
470
|
+
_stopGlide(e) {
|
|
471
|
+
cancelAnimationFrame(this._glides.get(e) ?? 0), this._glides.delete(e), e.removeAttribute("data-gliding");
|
|
472
|
+
}
|
|
473
|
+
_releaseSelfScroll() {
|
|
474
|
+
clearTimeout(this._selfScrollTimer), this._selfScrollTimer = window.setTimeout(() => {
|
|
475
|
+
this._scrollingSelf = !1;
|
|
476
|
+
}, 200);
|
|
477
|
+
}
|
|
478
|
+
updated(e) {
|
|
479
|
+
if (e.has("rows") && this.style.setProperty("--_time-picker-rows", String(Math.max(3, Math.round(this.rows)))), e.has("width")) {
|
|
480
|
+
let e = this.width;
|
|
481
|
+
e === "full" ? this.style.setProperty("--_time-picker-width", "100%") : e && CSS.supports("width", e) ? this.style.setProperty("--_time-picker-width", e) : this.style.removeProperty("--_time-picker-width");
|
|
482
|
+
}
|
|
483
|
+
(e.has("value") || e.has("min") || e.has("max") || e.has("step")) && (this._scrolledTo = {
|
|
484
|
+
hours: null,
|
|
485
|
+
minutes: null
|
|
486
|
+
}, this.scrollSelectedIntoView(this._chosenHere), this._chosenHere = !1);
|
|
487
|
+
}
|
|
488
|
+
describedTarget() {
|
|
489
|
+
return this.shadowRoot?.querySelector("[role=\"group\"]") ?? null;
|
|
490
|
+
}
|
|
491
|
+
render() {
|
|
492
|
+
return y(this);
|
|
493
|
+
}
|
|
494
|
+
}, x.styles = h, x.isFormInput = !0, x);
|
|
495
|
+
s([n({ type: String })], D.prototype, "value", void 0), s([n({ type: String })], D.prototype, "min", void 0), s([n({ type: String })], D.prototype, "max", void 0), s([n({ type: Number })], D.prototype, "step", void 0), s([n({
|
|
496
|
+
reflect: !0,
|
|
497
|
+
converter: l(7)
|
|
498
|
+
})], D.prototype, "rows", void 0), s([n({
|
|
499
|
+
reflect: !0,
|
|
500
|
+
converter: l("")
|
|
501
|
+
})], D.prototype, "width", void 0), s([n({
|
|
502
|
+
type: String,
|
|
503
|
+
attribute: "accessible-label"
|
|
504
|
+
})], D.prototype, "accessibleLabel", void 0), s([n({ type: Object })], D.prototype, "translations", void 0), s([r()], D.prototype, "_scrolledTo", void 0), s([n({
|
|
505
|
+
type: Boolean,
|
|
506
|
+
reflect: !0
|
|
507
|
+
})], D.prototype, "invalid", void 0), D = s([c("nldd-time-picker")], D);
|
|
508
|
+
export { b as t };
|