@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,597 @@
|
|
|
1
|
+
import "./icon-BORlalt0.js";
|
|
2
|
+
import { a as e, 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 "./button-DO90Lo6q.js";
|
|
8
|
+
import { t as d } from "./translations-wxBSz213.js";
|
|
9
|
+
import { t as f } from "./described-by-mixin-daRE7orX.js";
|
|
10
|
+
import "./icon-button-rKiIHs7A.js";
|
|
11
|
+
import { n as p } from "./breakpoints-Cwor8TRP.js";
|
|
12
|
+
import "./popover-C-CVVtfl.js";
|
|
13
|
+
import "./container-rrbwk0z4.js";
|
|
14
|
+
import "./top-title-bar-iNFB2zQL.js";
|
|
15
|
+
import { t as m } from "./form-associated-mixin--GIbl98p.js";
|
|
16
|
+
import { t as h } from "./implicit-submission-Csbcor_E.js";
|
|
17
|
+
import "./spacer-CFzq_JCh.js";
|
|
18
|
+
import "./time-picker-W0xYXLy8.js";
|
|
19
|
+
import { t as g } from "./time-field.i18n-CLH5vmS7.js";
|
|
20
|
+
// src/components/inputs/time-field/time-field.styles.ts
|
|
21
|
+
var _ = e(p.mdMin), v = t`
|
|
22
|
+
:host {
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
/* # Host */
|
|
28
|
+
|
|
29
|
+
:host {
|
|
30
|
+
--_time-field-text-width: 5.5ch;
|
|
31
|
+
--_time-field-edge-width: calc(var(--_time-field-inline-padding) + var(--semantics-input-fields-border-width));
|
|
32
|
+
--_time-field-validation-icon-area-width: calc(var(--_time-field-validation-icon-size) + var(--primitives-space-8));
|
|
33
|
+
--_time-field-picker-button-size: var(--semantics-controls-sm-min-size);
|
|
34
|
+
--_time-field-end-padding-right: calc((var(--_time-field-min-size) - var(--_time-field-picker-button-size)) / 2 - var(--semantics-input-fields-border-width));
|
|
35
|
+
--_time-field-trailing-width: calc(var(--_time-field-validation-icon-area-width) + var(--_time-field-picker-button-size) + var(--_time-field-end-padding-right));
|
|
36
|
+
--_time-field-fixed-width: calc(var(--_time-field-edge-width) + var(--_time-field-trailing-width));
|
|
37
|
+
--_time-field-width: calc(var(--_time-field-fixed-width) + var(--_time-field-text-width));
|
|
38
|
+
--_time-field-corner-radius: var(--semantics-controls-md-corner-radius);
|
|
39
|
+
--_time-field-background-color: var(--semantics-input-fields-background-color);
|
|
40
|
+
--_time-field-min-size: var(--semantics-controls-md-min-size);
|
|
41
|
+
--_time-field-inline-padding: var(--semantics-controls-md-inline-padding);
|
|
42
|
+
--_time-field-text-font: var(--semantics-input-fields-md-text-font);
|
|
43
|
+
--_time-field-validation-icon-size: var(--semantics-input-fields-md-validation-icon-size);
|
|
44
|
+
|
|
45
|
+
${u}
|
|
46
|
+
display: block;
|
|
47
|
+
width: var(--_time-field-width);
|
|
48
|
+
min-width: var(--_time-field-fixed-width);
|
|
49
|
+
max-width: 100%;
|
|
50
|
+
font: var(--_time-field-text-font);
|
|
51
|
+
-webkit-tap-highlight-color: transparent;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:host([hidden]) {
|
|
55
|
+
display: none;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* 'fit-content' is not the CSS keyword here but this system's width word:
|
|
59
|
+
as wide as what is in it. Room held for a validation icon that is not
|
|
60
|
+
there is not in it, so what is left is the air the field needs between its
|
|
61
|
+
text and the picker button. The full slot comes back the moment a validation
|
|
62
|
+
state does, and the field grows at its trailing edge — after the picker
|
|
63
|
+
button, leaving the time where it was. Opt-in, because only the consumer
|
|
64
|
+
knows whether this field is ever validated. */
|
|
65
|
+
:host([width="fit-content"]:not([valid]):not([invalid])) {
|
|
66
|
+
--_time-field-validation-icon-area-width: var(--primitives-space-8);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
:host([no-picker]) {
|
|
71
|
+
--_time-field-fixed-width: calc(var(--_time-field-edge-width) + var(--_time-field-inline-padding) + var(--_time-field-validation-icon-area-width));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
:host([size="sm"]) {
|
|
75
|
+
--_time-field-corner-radius: var(--semantics-controls-sm-corner-radius);
|
|
76
|
+
--_time-field-min-size: var(--semantics-controls-sm-min-size);
|
|
77
|
+
--_time-field-inline-padding: var(--semantics-controls-sm-inline-padding);
|
|
78
|
+
--_time-field-text-font: var(--semantics-input-fields-sm-text-font);
|
|
79
|
+
--_time-field-validation-icon-size: var(--semantics-input-fields-sm-validation-icon-size);
|
|
80
|
+
--_time-field-picker-button-size: var(--semantics-controls-xs-min-size);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
/* # Block */
|
|
85
|
+
|
|
86
|
+
.time-field {
|
|
87
|
+
box-sizing: border-box;
|
|
88
|
+
display: flex;
|
|
89
|
+
border: var(--semantics-input-fields-border);
|
|
90
|
+
border-radius: var(--_time-field-corner-radius);
|
|
91
|
+
background-color: var(--_time-field-background-color);
|
|
92
|
+
min-height: var(--_time-field-min-size);
|
|
93
|
+
padding-left: calc(var(--_time-field-inline-padding) - var(--semantics-input-fields-border-width));
|
|
94
|
+
flex-direction: row;
|
|
95
|
+
align-items: center;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
:host([valid]) .time-field {
|
|
99
|
+
border-color: var(--semantics-input-fields-is-valid-border-color);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
:host([invalid]) .time-field {
|
|
103
|
+
border-color: var(--semantics-input-fields-is-invalid-border-color);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
:host([readonly]) .time-field {
|
|
107
|
+
--_time-field-background-color: var(--semantics-input-fields-is-read-only-background-color);
|
|
108
|
+
border-color: var(--semantics-input-fields-is-read-only-border-color);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
:host([disabled]) .time-field {
|
|
112
|
+
opacity: var(--primitives-opacity-disabled);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.time-field:has(input:-webkit-autofill),
|
|
116
|
+
.time-field:has(input:autofill) {
|
|
117
|
+
--_time-field-background-color: var(--semantics-input-fields-is-autofill-background-color);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* Keyed on the text input, not :focus-within: the button and the popover live
|
|
121
|
+
in this box too and would draw a second ring around the whole field. */
|
|
122
|
+
.time-field:has(.time-field__input:focus) {
|
|
123
|
+
outline: var(--semantics-focus-ring-outline);
|
|
124
|
+
outline-offset: var(--semantics-focus-ring-outline-offset);
|
|
125
|
+
box-shadow: var(--semantics-focus-ring-box-shadow);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
/* # Elements */
|
|
130
|
+
|
|
131
|
+
.time-field__input {
|
|
132
|
+
border-radius: calc(var(--_time-field-corner-radius) - var(--semantics-input-fields-border-width));
|
|
133
|
+
box-sizing: border-box;
|
|
134
|
+
margin: 0;
|
|
135
|
+
outline: none;
|
|
136
|
+
border: none;
|
|
137
|
+
background: transparent;
|
|
138
|
+
min-width: 0;
|
|
139
|
+
min-height: calc(var(--_time-field-min-size) - var(--semantics-input-fields-border-width) * 2);
|
|
140
|
+
overflow: hidden;
|
|
141
|
+
padding: 0;
|
|
142
|
+
flex-grow: 1;
|
|
143
|
+
color: var(--semantics-content-color);
|
|
144
|
+
font: var(--_time-field-text-font);
|
|
145
|
+
appearance: none;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
:host([disabled]) .time-field__input {
|
|
149
|
+
pointer-events: none;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.time-field__input::placeholder {
|
|
153
|
+
color: var(--semantics-input-fields-placeholder-color);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.time-field__input:-webkit-autofill,
|
|
157
|
+
.time-field__input:autofill,
|
|
158
|
+
.time-field__input:-webkit-autofill:disabled,
|
|
159
|
+
.time-field__input:autofill:disabled {
|
|
160
|
+
box-shadow: 0 0 0 999px var(--_time-field-background-color) inset;
|
|
161
|
+
-webkit-text-fill-color: var(--semantics-input-fields-is-autofill-content-color);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.time-field__input-fade {
|
|
165
|
+
position: relative;
|
|
166
|
+
width: 0;
|
|
167
|
+
flex-shrink: 0;
|
|
168
|
+
align-self: stretch;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.time-field__input-fade::after {
|
|
172
|
+
content: '';
|
|
173
|
+
position: absolute;
|
|
174
|
+
top: 0;
|
|
175
|
+
right: 0;
|
|
176
|
+
bottom: 0;
|
|
177
|
+
border-radius: var(--_time-field-corner-radius);
|
|
178
|
+
background: linear-gradient(90deg, color-mix(in oklch, var(--_time-field-background-color) 0%, transparent) 0%, var(--_time-field-background-color) 100%);
|
|
179
|
+
pointer-events: none;
|
|
180
|
+
width: var(--primitives-space-8);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.time-field__validation-icon-area {
|
|
184
|
+
display: flex;
|
|
185
|
+
width: var(--_time-field-validation-icon-area-width);
|
|
186
|
+
height: 100%;
|
|
187
|
+
flex-shrink: 0;
|
|
188
|
+
align-items: center;
|
|
189
|
+
justify-content: center;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
:host([valid]) .time-field__validation-icon-area {
|
|
193
|
+
color: var(--semantics-input-fields-is-valid-icon-color);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
:host([invalid]) .time-field__validation-icon-area {
|
|
197
|
+
color: var(--semantics-input-fields-is-invalid-icon-color);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.time-field__validation-icon {
|
|
201
|
+
display: flex;
|
|
202
|
+
width: var(--_time-field-validation-icon-size);
|
|
203
|
+
height: var(--_time-field-validation-icon-size);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.time-field__picker-button {
|
|
207
|
+
position: relative;
|
|
208
|
+
display: flex;
|
|
209
|
+
flex-shrink: 0;
|
|
210
|
+
padding-right: var(--_time-field-end-padding-right);
|
|
211
|
+
align-items: center;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
@media (min-width: ${_}) {
|
|
216
|
+
.time-field__picker-button nldd-top-title-bar {
|
|
217
|
+
display: none;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
`, y = "calc(var(--semantics-controls-md-min-size) * 3 + var(--primitives-space-48) + var(--primitives-space-16) * 2)";
|
|
221
|
+
function b(e) {
|
|
222
|
+
let t = e.invalid ? "invalid" : e.valid ? "valid" : "";
|
|
223
|
+
return t ? a`
|
|
224
|
+
<div class="time-field__validation-icon-area">
|
|
225
|
+
<span class="time-field__validation-icon">
|
|
226
|
+
<nldd-icon
|
|
227
|
+
icon=${t}
|
|
228
|
+
aria-hidden="true"
|
|
229
|
+
></nldd-icon>
|
|
230
|
+
</span>
|
|
231
|
+
</div>
|
|
232
|
+
` : o;
|
|
233
|
+
}
|
|
234
|
+
function x(e) {
|
|
235
|
+
if (e.noPicker || e.readonly) return o;
|
|
236
|
+
let t = e.size === "sm" ? "xs" : "sm";
|
|
237
|
+
return a`
|
|
238
|
+
<div class="time-field__picker-button">
|
|
239
|
+
<nldd-icon-button
|
|
240
|
+
appearance="neutral-tinted"
|
|
241
|
+
size=${t}
|
|
242
|
+
icon="clock"
|
|
243
|
+
text=${e._t("components.time-field.to-pick-time-action")}
|
|
244
|
+
tooltip-timing="never"
|
|
245
|
+
?disabled=${e.disabled}
|
|
246
|
+
@click=${e._handlePickerClick}
|
|
247
|
+
></nldd-icon-button>
|
|
248
|
+
<nldd-popover
|
|
249
|
+
accessible-label=${e._pickerLabel}
|
|
250
|
+
placement="bottom-end"
|
|
251
|
+
width=${y}
|
|
252
|
+
@toggle=${e._handlePopoverToggle}
|
|
253
|
+
>
|
|
254
|
+
<nldd-top-title-bar
|
|
255
|
+
text=${e._pickerLabel}
|
|
256
|
+
dismiss-text=${e._t("components.time-field.cancel-action")}
|
|
257
|
+
@dismiss=${e._handlePickerDismiss}
|
|
258
|
+
></nldd-top-title-bar>
|
|
259
|
+
<nldd-container
|
|
260
|
+
padding="16"
|
|
261
|
+
@keydown=${e._handlePickerKeydown}
|
|
262
|
+
@input=${e._handlePickerInput}
|
|
263
|
+
@change=${e._handlePickerChange}
|
|
264
|
+
>
|
|
265
|
+
<slot
|
|
266
|
+
name="picker"
|
|
267
|
+
@slotchange=${e._handlePickerSlotChange}
|
|
268
|
+
></slot>
|
|
269
|
+
${e._hasSlottedPicker ? o : a`
|
|
270
|
+
<nldd-time-picker
|
|
271
|
+
autofocus
|
|
272
|
+
width="full"
|
|
273
|
+
value=${e._pickerValue || o}
|
|
274
|
+
min=${e.min || o}
|
|
275
|
+
max=${e.max || o}
|
|
276
|
+
step=${e.step}
|
|
277
|
+
></nldd-time-picker>
|
|
278
|
+
`}
|
|
279
|
+
<nldd-spacer size="16"></nldd-spacer>
|
|
280
|
+
<nldd-button
|
|
281
|
+
appearance="neutral-tinted"
|
|
282
|
+
size=${e._pickerButtonSize}
|
|
283
|
+
width="full"
|
|
284
|
+
text=${e._t("components.time-field.confirm-action")}
|
|
285
|
+
@click=${e._handlePickerConfirm}
|
|
286
|
+
></nldd-button>
|
|
287
|
+
</nldd-container>
|
|
288
|
+
</nldd-popover>
|
|
289
|
+
</div>
|
|
290
|
+
`;
|
|
291
|
+
}
|
|
292
|
+
function S(e) {
|
|
293
|
+
return a`
|
|
294
|
+
<div class="time-field">
|
|
295
|
+
<input class="time-field__input"
|
|
296
|
+
id=${e.inputId || o}
|
|
297
|
+
type="text"
|
|
298
|
+
inputmode="numeric"
|
|
299
|
+
.value=${e._displayValue}
|
|
300
|
+
placeholder=${e.placeholder || o}
|
|
301
|
+
?disabled=${e.disabled}
|
|
302
|
+
?readonly=${e.readonly}
|
|
303
|
+
?required=${e.required}
|
|
304
|
+
autocomplete=${e.autocomplete || o}
|
|
305
|
+
aria-label=${e._fieldLabel || o}
|
|
306
|
+
aria-invalid=${e.invalid ? "true" : o}
|
|
307
|
+
@keydown=${e._handleInputKeydown}
|
|
308
|
+
@input=${e._handleInput}
|
|
309
|
+
@change=${e._handleChange}
|
|
310
|
+
>
|
|
311
|
+
<div class="time-field__input-fade"></div>
|
|
312
|
+
${b(e)}
|
|
313
|
+
${x(e)}
|
|
314
|
+
</div>
|
|
315
|
+
`;
|
|
316
|
+
}
|
|
317
|
+
// src/components/inputs/time-field/time-field.times.ts
|
|
318
|
+
var C = 1439;
|
|
319
|
+
function w(e) {
|
|
320
|
+
let [t, n] = e.split(":");
|
|
321
|
+
return Number(t) * 60 + Number(n);
|
|
322
|
+
}
|
|
323
|
+
function T(e) {
|
|
324
|
+
let t = Math.floor(e / 60), n = e % 60;
|
|
325
|
+
return `${String(t).padStart(2, "0")}:${String(n).padStart(2, "0")}`;
|
|
326
|
+
}
|
|
327
|
+
function E(e, t) {
|
|
328
|
+
return e < 0 || e > 23 || t < 0 || t > 59 ? null : T(e * 60 + t);
|
|
329
|
+
}
|
|
330
|
+
function D(e) {
|
|
331
|
+
let t = e.trim();
|
|
332
|
+
if (t === "") return null;
|
|
333
|
+
let n = /^(\d{1,2})\s*[uh]\s*(\d{1,2})?$/i.exec(t);
|
|
334
|
+
if (n) return E(Number(n[1]), Number(n[2] ?? 0));
|
|
335
|
+
let r = /^(\d{1,2})\s*[:.,]\s*(\d{1,2})$/.exec(t);
|
|
336
|
+
if (r) return E(Number(r[1]), Number(r[2]));
|
|
337
|
+
let i = /^\d{1,4}$/.exec(t);
|
|
338
|
+
if (i) {
|
|
339
|
+
let e = i[0];
|
|
340
|
+
if (e.length <= 2) return E(Number(e), 0);
|
|
341
|
+
let t = e.length === 3 ? 1 : 2;
|
|
342
|
+
return E(Number(e.slice(0, t)), Number(e.slice(t)));
|
|
343
|
+
}
|
|
344
|
+
return null;
|
|
345
|
+
}
|
|
346
|
+
function O(e, t, n = "00:00") {
|
|
347
|
+
if (t <= 1) return e;
|
|
348
|
+
let r = w(n), i = r + Math.floor((w(e) - r) / t + .5) * t;
|
|
349
|
+
for (; i > C;) i -= t;
|
|
350
|
+
for (; i < 0;) i += t;
|
|
351
|
+
return T(i);
|
|
352
|
+
}
|
|
353
|
+
function k(e, t, n) {
|
|
354
|
+
let r = D(e) ?? "";
|
|
355
|
+
return {
|
|
356
|
+
min: r,
|
|
357
|
+
max: D(t) ?? "",
|
|
358
|
+
step: Math.max(1, Math.round(n) || 1),
|
|
359
|
+
base: r || "00:00"
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
function A(e, t) {
|
|
363
|
+
return !(t.min && e < t.min || t.max && e > t.max);
|
|
364
|
+
}
|
|
365
|
+
function j(e, t, n) {
|
|
366
|
+
let r = D(e);
|
|
367
|
+
if (!r) return "";
|
|
368
|
+
let i = n ? O(r, t.step, t.base) : r;
|
|
369
|
+
return A(i, t) ? i : "";
|
|
370
|
+
}
|
|
371
|
+
function M(e, t) {
|
|
372
|
+
if (!e) return null;
|
|
373
|
+
let n = w(t.base);
|
|
374
|
+
return T(n + Math.max(0, Math.floor((w(e) - n) / t.step)) * t.step);
|
|
375
|
+
}
|
|
376
|
+
function N(e, t) {
|
|
377
|
+
if (e.min) return e.min;
|
|
378
|
+
let n = O(T(t.getHours() * 60 + t.getMinutes()), e.step, e.base);
|
|
379
|
+
return !e.max || n <= e.max ? n : M(e.max, e) ?? n;
|
|
380
|
+
}
|
|
381
|
+
function P(e, t, n) {
|
|
382
|
+
let { step: r } = n, i = w(n.base), a = w(O(e, r, n.base)), o = a === w(e) || r === 1 ? a + t * r : a, s = Math.min(Math.max(o, i % r), C), c = n.min ? w(n.min) : 0, l = n.max ? w(n.max) : C;
|
|
383
|
+
return T(Math.min(Math.max(s, c), l));
|
|
384
|
+
}
|
|
385
|
+
function F(e, t) {
|
|
386
|
+
if (!e.trim()) return null;
|
|
387
|
+
let n = D(e);
|
|
388
|
+
return n ? t.min && n < t.min ? {
|
|
389
|
+
flag: "rangeUnderflow",
|
|
390
|
+
bound: t.min
|
|
391
|
+
} : t.max && n > t.max ? {
|
|
392
|
+
flag: "rangeOverflow",
|
|
393
|
+
bound: t.max
|
|
394
|
+
} : null : { flag: "badInput" };
|
|
395
|
+
}
|
|
396
|
+
// src/components/inputs/time-field/time-field.ts
|
|
397
|
+
var I = class extends f(m(i)) {
|
|
398
|
+
constructor(...e) {
|
|
399
|
+
super(...e), this._initialValue = "", this.size = "md", this.value = "", this.min = "", this.max = "", this.step = 1, this.noPicker = !1, this.inputId = "", this.placeholder = "", this.invalid = !1, this.valid = !1, this.disabled = !1, this.readonly = !1, this.required = !1, this.name = "", this.autocomplete = "", this.accessibleLabel = "", this.width = "", this.translations = {}, this._finePointer = !1, this._handlePointerChange = () => {
|
|
400
|
+
this._finePointer = L._getFinePointerQuery().matches;
|
|
401
|
+
}, this._display = "", this._hasSlottedPicker = !1, this._pickerOpen = !1, this._focusTriggerOnClose = !1, this._valueBeforePicker = "", this._pickerState = "untouched", this._pickerSeed = "", this._handlePickerEscape = (e) => {
|
|
402
|
+
e.key === "Escape" && (this._pickerState = "cancelled");
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
static _getFinePointerQuery() {
|
|
406
|
+
var e;
|
|
407
|
+
return (e = L)._finePointerQuery ?? (e._finePointerQuery = matchMedia("(pointer: fine)")), L._finePointerQuery;
|
|
408
|
+
}
|
|
409
|
+
get _pickerButtonSize() {
|
|
410
|
+
return this._finePointer ? "sm" : "md";
|
|
411
|
+
}
|
|
412
|
+
connectedCallback() {
|
|
413
|
+
super.connectedCallback();
|
|
414
|
+
let e = L._getFinePointerQuery();
|
|
415
|
+
this._finePointer = e.matches, e.addEventListener("change", this._handlePointerChange);
|
|
416
|
+
}
|
|
417
|
+
disconnectedCallback() {
|
|
418
|
+
L._getFinePointerQuery().removeEventListener("change", this._handlePointerChange), document.removeEventListener("keydown", this._handlePickerEscape, !0), super.disconnectedCallback();
|
|
419
|
+
}
|
|
420
|
+
_t(e) {
|
|
421
|
+
return d(this.translations, g, e);
|
|
422
|
+
}
|
|
423
|
+
get _fieldLabel() {
|
|
424
|
+
return this.accessibleLabel || this._t("components.time-field.default-label");
|
|
425
|
+
}
|
|
426
|
+
get _displayValue() {
|
|
427
|
+
return this._display;
|
|
428
|
+
}
|
|
429
|
+
get _rules() {
|
|
430
|
+
return k(this.min, this.max, this.step);
|
|
431
|
+
}
|
|
432
|
+
_commit(e, t = !1) {
|
|
433
|
+
return j(e, this._rules, t);
|
|
434
|
+
}
|
|
435
|
+
_handleInput(e) {
|
|
436
|
+
e.stopPropagation();
|
|
437
|
+
let t = e.target.value;
|
|
438
|
+
this._display = t, this.value = this._commit(t), this._emit("input");
|
|
439
|
+
}
|
|
440
|
+
_handleChange(e) {
|
|
441
|
+
e.stopPropagation();
|
|
442
|
+
let t = e.target, n = this._commit(t.value, !0), r = n || t.value;
|
|
443
|
+
this._display = r, t.value = r, this.value = n, this._emit("change");
|
|
444
|
+
}
|
|
445
|
+
_handleInputKeydown(e) {
|
|
446
|
+
if (h(this, e) || e.key !== "ArrowUp" && e.key !== "ArrowDown" || this.disabled || this.readonly) return;
|
|
447
|
+
e.preventDefault();
|
|
448
|
+
let t = this._rules, n = this.value || D(this._display), r = n ? P(n, e.key === "ArrowUp" ? 1 : -1, t) : N(t, /* @__PURE__ */ new Date());
|
|
449
|
+
this._display = r, this.value = r, this._emit("input"), this._emit("change");
|
|
450
|
+
}
|
|
451
|
+
get _slottedPicker() {
|
|
452
|
+
return (this.shadowRoot?.querySelector("slot[name=\"picker\"]"))?.assignedElements({ flatten: !0 }).find((e) => e.localName === "nldd-time-picker") ?? null;
|
|
453
|
+
}
|
|
454
|
+
_handlePickerSlotChange() {
|
|
455
|
+
this._hasSlottedPicker = this._slottedPicker !== null;
|
|
456
|
+
}
|
|
457
|
+
get _pickerTrigger() {
|
|
458
|
+
return this.shadowRoot?.querySelector(".time-field__picker-button nldd-icon-button") ?? null;
|
|
459
|
+
}
|
|
460
|
+
get _popover() {
|
|
461
|
+
return this.shadowRoot?.querySelector("nldd-popover") ?? null;
|
|
462
|
+
}
|
|
463
|
+
get _pickerLabel() {
|
|
464
|
+
return this.accessibleLabel || this._t("components.time-field.to-pick-time-action");
|
|
465
|
+
}
|
|
466
|
+
_handlePickerClick() {
|
|
467
|
+
this._pickerOpen ? this._popover?.hide() : this._popover?.show();
|
|
468
|
+
}
|
|
469
|
+
get _pickerValue() {
|
|
470
|
+
return this.value || this._pickerSeed;
|
|
471
|
+
}
|
|
472
|
+
_handlePopoverToggle(e) {
|
|
473
|
+
this._pickerOpen = e.newState === "open", this._pickerOpen ? this._openPicker() : this._settlePicker(), !this._pickerOpen && this._focusTriggerOnClose && (this._focusTriggerOnClose = !1, queueMicrotask(() => this._pickerTrigger?.focus()));
|
|
474
|
+
}
|
|
475
|
+
_openPicker() {
|
|
476
|
+
this._valueBeforePicker = this.value, this._pickerState = "untouched", this._pickerSeed = this.value || N(this._rules, /* @__PURE__ */ new Date()), document.addEventListener("keydown", this._handlePickerEscape, !0), this.updateComplete.then(async () => {
|
|
477
|
+
let e = this._slottedPicker ?? this.shadowRoot?.querySelector("nldd-time-picker");
|
|
478
|
+
e && (await e.updateComplete, e.scrollSelectedIntoView());
|
|
479
|
+
});
|
|
480
|
+
}
|
|
481
|
+
_settlePicker() {
|
|
482
|
+
if (document.removeEventListener("keydown", this._handlePickerEscape, !0), this._pickerState === "untouched" || this._pickerState === "cancelled") {
|
|
483
|
+
if (this.value === this._valueBeforePicker) return;
|
|
484
|
+
this.value = this._valueBeforePicker, this._emit("input");
|
|
485
|
+
} else !this.value && this._pickerSeed && (this.value = this._pickerSeed, this._emit("input")), this.value !== this._valueBeforePicker && this._emit("change");
|
|
486
|
+
}
|
|
487
|
+
_handlePickerInput(e) {
|
|
488
|
+
e.stopPropagation();
|
|
489
|
+
let t = e.detail;
|
|
490
|
+
typeof t?.value == "string" && (this._pickerState = "touched", this.value = t.value, this._emit("input"));
|
|
491
|
+
}
|
|
492
|
+
_handlePickerChange(e) {
|
|
493
|
+
e.stopPropagation();
|
|
494
|
+
let t = e.detail;
|
|
495
|
+
typeof t?.value == "string" && (this._pickerState = "touched", this.value = t.value);
|
|
496
|
+
}
|
|
497
|
+
_handlePickerConfirm(e) {
|
|
498
|
+
e.stopPropagation(), this._pickerState = "confirmed", this._closePicker();
|
|
499
|
+
}
|
|
500
|
+
_handlePickerKeydown(e) {
|
|
501
|
+
e.key === "Enter" && (e.target?.closest("nldd-button") || (e.preventDefault(), this._pickerState = "confirmed", this._closePicker()));
|
|
502
|
+
}
|
|
503
|
+
_closePicker() {
|
|
504
|
+
this._focusTriggerOnClose = !0, this._popover?.hide();
|
|
505
|
+
}
|
|
506
|
+
_handlePickerDismiss(e) {
|
|
507
|
+
e.stopPropagation(), this._pickerState = "cancelled", this._focusTriggerOnClose = !0, this._popover?.hide();
|
|
508
|
+
}
|
|
509
|
+
formValue() {
|
|
510
|
+
return this.value;
|
|
511
|
+
}
|
|
512
|
+
ownValidity() {
|
|
513
|
+
let e = F(this._display, this._rules);
|
|
514
|
+
return e ? {
|
|
515
|
+
flags: { [e.flag]: !0 },
|
|
516
|
+
message: this._problemMessage(e)
|
|
517
|
+
} : null;
|
|
518
|
+
}
|
|
519
|
+
_problemMessage(e) {
|
|
520
|
+
switch (e.flag) {
|
|
521
|
+
case "badInput": return this._t("components.time-field.bad-input-error-text");
|
|
522
|
+
case "rangeUnderflow": return this._t("components.time-field.range-underflow-error-text").replace("{time}", e.bound);
|
|
523
|
+
case "rangeOverflow": return this._t("components.time-field.range-overflow-error-text").replace("{time}", e.bound);
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
formResetCallback() {
|
|
527
|
+
this._display = this._initialValue, this.value = this._initialValue, this.commitFormValue();
|
|
528
|
+
}
|
|
529
|
+
formStateRestoreCallback(e) {
|
|
530
|
+
typeof e == "string" && (this.value = e);
|
|
531
|
+
}
|
|
532
|
+
_emit(e) {
|
|
533
|
+
this.commitFormValue(), this.dispatchEvent(new CustomEvent(e, {
|
|
534
|
+
detail: { value: this.value },
|
|
535
|
+
bubbles: !0,
|
|
536
|
+
composed: !0
|
|
537
|
+
}));
|
|
538
|
+
}
|
|
539
|
+
firstUpdated() {
|
|
540
|
+
this._initialValue = this.value, this.commitFormValue();
|
|
541
|
+
}
|
|
542
|
+
willUpdate(e) {
|
|
543
|
+
e.has("value") && this._commit(this._display) !== this.value && (this._display = this.value);
|
|
544
|
+
}
|
|
545
|
+
updated(e) {
|
|
546
|
+
let t = this._popover, n = this._pickerTrigger;
|
|
547
|
+
if (t && n && t.anchorElement !== n && (t.anchorElement = n), e.has("width")) {
|
|
548
|
+
let e = this.width;
|
|
549
|
+
e === "full" ? this.style.setProperty("--_time-field-width", "100%") : e === "fit-content" ? this.style.removeProperty("--_time-field-width") : e && CSS.supports("width", e) ? this.style.setProperty("--_time-field-width", e) : this.style.removeProperty("--_time-field-width");
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
render() {
|
|
553
|
+
return S(this);
|
|
554
|
+
}
|
|
555
|
+
}, L = I, R = (I.shadowRootOptions = {
|
|
556
|
+
...i.shadowRootOptions,
|
|
557
|
+
delegatesFocus: !0
|
|
558
|
+
}, I.styles = v, I.isFormInput = !0, I.blocksImplicitSubmission = !0, I._finePointerQuery = null, I);
|
|
559
|
+
s([n({
|
|
560
|
+
reflect: !0,
|
|
561
|
+
converter: l("md")
|
|
562
|
+
})], R.prototype, "size", void 0), s([n({ type: String })], R.prototype, "value", void 0), s([n({ type: String })], R.prototype, "min", void 0), s([n({ type: String })], R.prototype, "max", void 0), s([n({ type: Number })], R.prototype, "step", void 0), s([n({
|
|
563
|
+
type: Boolean,
|
|
564
|
+
reflect: !0,
|
|
565
|
+
attribute: "no-picker"
|
|
566
|
+
})], R.prototype, "noPicker", void 0), s([n({
|
|
567
|
+
type: String,
|
|
568
|
+
attribute: "input-id"
|
|
569
|
+
})], R.prototype, "inputId", void 0), s([n({
|
|
570
|
+
reflect: !0,
|
|
571
|
+
converter: l("")
|
|
572
|
+
})], R.prototype, "placeholder", void 0), s([n({
|
|
573
|
+
type: Boolean,
|
|
574
|
+
reflect: !0
|
|
575
|
+
})], R.prototype, "invalid", void 0), s([n({
|
|
576
|
+
type: Boolean,
|
|
577
|
+
reflect: !0
|
|
578
|
+
})], R.prototype, "valid", void 0), s([n({
|
|
579
|
+
type: Boolean,
|
|
580
|
+
reflect: !0
|
|
581
|
+
})], R.prototype, "disabled", void 0), s([n({
|
|
582
|
+
type: Boolean,
|
|
583
|
+
reflect: !0
|
|
584
|
+
})], R.prototype, "readonly", void 0), s([n({
|
|
585
|
+
type: Boolean,
|
|
586
|
+
reflect: !0
|
|
587
|
+
})], R.prototype, "required", void 0), s([n({
|
|
588
|
+
reflect: !0,
|
|
589
|
+
converter: l("")
|
|
590
|
+
})], R.prototype, "name", void 0), s([n({ type: String })], R.prototype, "autocomplete", void 0), s([n({
|
|
591
|
+
type: String,
|
|
592
|
+
attribute: "accessible-label"
|
|
593
|
+
})], R.prototype, "accessibleLabel", void 0), s([n({
|
|
594
|
+
reflect: !0,
|
|
595
|
+
converter: l("")
|
|
596
|
+
})], R.prototype, "width", void 0), s([n({ type: Object })], R.prototype, "translations", void 0), s([r()], R.prototype, "_finePointer", void 0), s([r()], R.prototype, "_display", void 0), s([r()], R.prototype, "_hasSlottedPicker", void 0), s([r()], R.prototype, "_pickerOpen", void 0), s([r()], R.prototype, "_pickerSeed", void 0), R = L = s([c("nldd-time-field")], R);
|
|
597
|
+
export { R as NLDDTimeField, D as parseTime, O as roundToStep };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// src/components/inputs/time-field/time-field.i18n.ts
|
|
2
|
+
var e = {
|
|
3
|
+
"components.time-field.default-label": "Tijd",
|
|
4
|
+
"components.time-field.to-pick-time-action": "Tijd kiezen",
|
|
5
|
+
"components.time-field.cancel-action": "Annuleer",
|
|
6
|
+
"components.time-field.confirm-action": "Klaar",
|
|
7
|
+
"components.time-field.bad-input-error-text": "Een tijd als uu:mm",
|
|
8
|
+
"components.time-field.range-underflow-error-text": "Een tijd vanaf {time}",
|
|
9
|
+
"components.time-field.range-overflow-error-text": "Een tijd tot en met {time}"
|
|
10
|
+
};
|
|
11
|
+
export { e as t };
|