@nldd/design-system 0.19.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 +521 -57
- 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-CrBk3W-t.js → cdn/chunks/icon-BORlalt0.js} +298 -309
- 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/button/button.d.ts +5 -5
- package/dist/components/actions/button/button.d.ts.map +1 -1
- package/dist/components/actions/button/button.js +6 -6
- package/dist/components/actions/button/button.js.map +1 -1
- package/dist/components/actions/button/button.template.d.ts.map +1 -1
- package/dist/components/actions/button/button.template.js +6 -8
- package/dist/components/actions/button/button.template.js.map +1 -1
- package/dist/components/actions/button-bar/button-bar.d.ts.map +1 -1
- package/dist/components/actions/button-bar/button-bar.js +15 -4
- package/dist/components/actions/button-bar/button-bar.js.map +1 -1
- package/dist/components/actions/button-group/button-group.d.ts.map +1 -1
- package/dist/components/actions/button-group/button-group.js +7 -1
- package/dist/components/actions/button-group/button-group.js.map +1 -1
- package/dist/components/actions/button-group/button-group.styles.js +2 -2
- package/dist/components/actions/icon-button/icon-button.d.ts +3 -3
- package/dist/components/actions/icon-button/icon-button.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.js +4 -4
- package/dist/components/actions/icon-button/icon-button.js.map +1 -1
- package/dist/components/actions/icon-button/icon-button.template.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.template.js +2 -4
- package/dist/components/actions/icon-button/icon-button.template.js.map +1 -1
- package/dist/components/actions/menu/menu-item.d.ts +12 -3
- package/dist/components/actions/menu/menu-item.d.ts.map +1 -1
- package/dist/components/actions/menu/menu-item.js +27 -6
- package/dist/components/actions/menu/menu-item.js.map +1 -1
- package/dist/components/actions/menu/menu.d.ts +31 -8
- package/dist/components/actions/menu/menu.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.js +108 -32
- package/dist/components/actions/menu/menu.js.map +1 -1
- package/dist/components/actions/menu/menu.pointer.d.ts +7 -0
- package/dist/components/actions/menu/menu.pointer.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.pointer.js +17 -0
- package/dist/components/actions/menu/menu.pointer.js.map +1 -1
- package/dist/components/actions/menu/menu.safe-triangle.d.ts +6 -5
- package/dist/components/actions/menu/menu.safe-triangle.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.safe-triangle.js +3 -3
- package/dist/components/actions/menu/menu.safe-triangle.js.map +1 -1
- package/dist/components/actions/menu/menu.styles.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.styles.js +6 -0
- package/dist/components/actions/menu/menu.styles.js.map +1 -1
- package/dist/components/actions/menu/menu.template.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.template.js +17 -9
- package/dist/components/actions/menu/menu.template.js.map +1 -1
- package/dist/components/actions/toolbar/toolbar-title.js +2 -2
- package/dist/components/actions/toolbar/toolbar-title.js.map +1 -1
- package/dist/components/content/avatar/avatar.js +1 -1
- package/dist/components/content/avatar/avatar.js.map +1 -1
- package/dist/components/content/avatar-group/avatar-group.d.ts.map +1 -1
- package/dist/components/content/avatar-group/avatar-group.js +2 -1
- package/dist/components/content/avatar-group/avatar-group.js.map +1 -1
- package/dist/components/content/image/image.js +1 -1
- package/dist/components/content/image/image.js.map +1 -1
- package/dist/components/content/tag/tag.d.ts +3 -3
- package/dist/components/content/tag/tag.js +3 -3
- package/dist/components/content/tag/tag.template.js +3 -3
- package/dist/components/content/tag/tag.template.js.map +1 -1
- package/dist/components/content/title/title.js +1 -1
- package/dist/components/content/title/title.js.map +1 -1
- package/dist/components/content/token/token.d.ts +6 -4
- package/dist/components/content/token/token.d.ts.map +1 -1
- package/dist/components/content/token/token.js +6 -4
- package/dist/components/content/token/token.js.map +1 -1
- package/dist/components/content/token/token.template.js +1 -1
- package/dist/components/content/token/token.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/inputs/file-field/file-field.js +1 -1
- package/dist/components/inputs/file-field/file-field.js.map +1 -1
- package/dist/components/inputs/one-time-code-field/one-time-code-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/one-time-code-field/one-time-code-field.styles.js +4 -2
- package/dist/components/inputs/one-time-code-field/one-time-code-field.styles.js.map +1 -1
- package/dist/components/inputs/one-time-code-field/one-time-code-field.template.js +2 -2
- package/dist/components/inputs/one-time-code-field/one-time-code-field.template.js.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.d.ts +2 -2
- package/dist/components/inputs/segmented-control/segmented-control.js +4 -4
- package/dist/components/inputs/segmented-control/segmented-control.js.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.template.js +2 -2
- package/dist/components/inputs/segmented-control/segmented-control.template.js.map +1 -1
- package/dist/components/inputs/swatch-picker/swatch-picker.js +1 -1
- package/dist/components/inputs/swatch-picker/swatch-picker.js.map +1 -1
- package/dist/components/inputs/time-picker/time-picker.js +1 -1
- package/dist/components/inputs/time-picker/time-picker.js.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.d.ts +2 -2
- package/dist/components/inputs/toggle-button/toggle-button.js +3 -3
- package/dist/components/inputs/toggle-button/toggle-button.js.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.template.d.ts.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.template.js +7 -10
- package/dist/components/inputs/toggle-button/toggle-button.template.js.map +1 -1
- package/dist/components/inputs/toggle-button-group/toggle-button-group.js +1 -1
- package/dist/components/inputs/toggle-button-group/toggle-button-group.js.map +1 -1
- package/dist/components/inputs/toggle-button-group/toggle-button-group.styles.js +3 -3
- package/dist/components/layout/card/card.js +1 -1
- package/dist/components/layout/card/card.js.map +1 -1
- package/dist/components/layout/card/card.styles.d.ts.map +1 -1
- package/dist/components/layout/card/card.styles.js +3 -1
- package/dist/components/layout/card/card.styles.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/layout/kanban/kanban.d.ts.map +1 -1
- package/dist/components/layout/kanban/kanban.js +2 -1
- package/dist/components/layout/kanban/kanban.js.map +1 -1
- package/dist/components/layout/page/page.d.ts.map +1 -1
- package/dist/components/layout/page/page.js +3 -2
- package/dist/components/layout/page/page.js.map +1 -1
- package/dist/components/layout/page/page.styles.d.ts.map +1 -1
- package/dist/components/layout/page/page.styles.js +3 -2
- package/dist/components/layout/page/page.styles.js.map +1 -1
- package/dist/components/layout/page-footer/page-footer.d.ts +5 -2
- package/dist/components/layout/page-footer/page-footer.d.ts.map +1 -1
- package/dist/components/layout/page-footer/page-footer.js +5 -2
- package/dist/components/layout/page-footer/page-footer.js.map +1 -1
- package/dist/components/layout/page-footer/page-footer.template.d.ts.map +1 -1
- package/dist/components/layout/page-footer/page-footer.template.js +2 -4
- package/dist/components/layout/page-footer/page-footer.template.js.map +1 -1
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.d.ts +1 -1
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.js +2 -2
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.d.ts.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.js +2 -2
- package/dist/components/layout/page-sections/hero/hero.js.map +1 -1
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.d.ts +1 -1
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.js +2 -2
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.js.map +1 -1
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.d.ts +1 -1
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.js +2 -2
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.js.map +1 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts +1 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js +4 -4
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js.map +1 -1
- package/dist/components/layout/page-sections/simple-section/simple-section.d.ts +1 -1
- package/dist/components/layout/page-sections/simple-section/simple-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/simple-section/simple-section.js +2 -2
- package/dist/components/layout/page-sections/simple-section/simple-section.js.map +1 -1
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.d.ts +1 -1
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.js +2 -2
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.js.map +1 -1
- package/dist/components/layout/popover/popover.d.ts +1 -2
- package/dist/components/layout/popover/popover.d.ts.map +1 -1
- package/dist/components/layout/popover/popover.js +10 -12
- package/dist/components/layout/popover/popover.js.map +1 -1
- package/dist/components/layout/sheet/sheet.d.ts +1 -0
- package/dist/components/layout/sheet/sheet.d.ts.map +1 -1
- package/dist/components/layout/sheet/sheet.js +6 -1
- package/dist/components/layout/sheet/sheet.js.map +1 -1
- package/dist/components/layout/spacer/spacer.js +1 -1
- package/dist/components/layout/spacer/spacer.js.map +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.d.ts.map +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.js +2 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.js.map +1 -1
- package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.d.ts.map +1 -1
- package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.js +3 -2
- package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.js.map +1 -1
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.d.ts.map +1 -1
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.js +2 -1
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.js.map +1 -1
- package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.d.ts.map +1 -1
- package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.js +3 -2
- package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.js.map +1 -1
- package/dist/components/layout/window/window.d.ts +1 -0
- package/dist/components/layout/window/window.d.ts.map +1 -1
- package/dist/components/layout/window/window.js +7 -1
- package/dist/components/layout/window/window.js.map +1 -1
- package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.d.ts +5 -2
- package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.js +7 -4
- package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.js.map +1 -1
- package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.template.js +3 -3
- package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.template.js.map +1 -1
- package/dist/components/lists-and-tables/cells/spacer-cell/spacer-cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/spacer-cell/spacer-cell.js +2 -1
- package/dist/components/lists-and-tables/cells/spacer-cell/spacer-cell.js.map +1 -1
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.d.ts +2 -2
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.js +2 -2
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.d.ts +2 -2
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.js +2 -2
- package/dist/components/lists-and-tables/list/list.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list/list.js +4 -1
- package/dist/components/lists-and-tables/list/list.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.d.ts +19 -9
- 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 +30 -14
- package/dist/components/lists-and-tables/list-item/list-item.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.styles.js +20 -0
- package/dist/components/lists-and-tables/list-item/list-item.styles.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/components/lists-and-tables/list-item-segment/list-item-segment.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.js +6 -0
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.js.map +1 -1
- package/dist/components/lists-and-tables/table/table.js +5 -5
- package/dist/components/lists-and-tables/table/table.js.map +1 -1
- package/dist/components/navigation/breadcrumbs/breadcrumbs.d.ts +5 -2
- package/dist/components/navigation/breadcrumbs/breadcrumbs.d.ts.map +1 -1
- package/dist/components/navigation/breadcrumbs/breadcrumbs.js +5 -2
- package/dist/components/navigation/breadcrumbs/breadcrumbs.js.map +1 -1
- package/dist/components/navigation/breadcrumbs/breadcrumbs.template.d.ts.map +1 -1
- package/dist/components/navigation/breadcrumbs/breadcrumbs.template.js +2 -4
- package/dist/components/navigation/breadcrumbs/breadcrumbs.template.js.map +1 -1
- package/dist/components/navigation/link/link.d.ts +7 -4
- package/dist/components/navigation/link/link.d.ts.map +1 -1
- package/dist/components/navigation/link/link.js +7 -4
- package/dist/components/navigation/link/link.js.map +1 -1
- package/dist/components/navigation/link/link.template.js +5 -5
- package/dist/components/navigation/link/link.template.js.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.js +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.js.map +1 -1
- package/dist/components/navigation/pagination/pagination.d.ts.map +1 -1
- package/dist/components/navigation/pagination/pagination.js +3 -2
- package/dist/components/navigation/pagination/pagination.js.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.d.ts +18 -2
- package/dist/components/navigation/tab-bar/tab-bar.d.ts.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.js +51 -3
- package/dist/components/navigation/tab-bar/tab-bar.js.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.template.d.ts.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.template.js +5 -3
- package/dist/components/navigation/tab-bar/tab-bar.template.js.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js +2 -2
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.menu-sheet.d.ts +4 -0
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.menu-sheet.d.ts.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.menu-sheet.js +26 -2
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.menu-sheet.js.map +1 -1
- package/dist/components/status-and-feedback/banner/banner.js +1 -1
- package/dist/components/status-and-feedback/banner/banner.js.map +1 -1
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.js +2 -2
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.js.map +1 -1
- package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.js +1 -1
- package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.js.map +1 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js +1 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js.map +1 -1
- package/dist/components/status-and-feedback/notification/notification.js +2 -2
- package/dist/components/status-and-feedback/notification/notification.js.map +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.js +4 -4
- package/dist/components/status-and-feedback/progress-bar/progress-bar.js.map +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.js +4 -4
- package/dist/components/status-and-feedback/progress-circle/progress-circle.js.map +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.d.ts +5 -2
- package/dist/components/status-and-feedback/step-bar/step-bar.d.ts.map +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.js +6 -3
- package/dist/components/status-and-feedback/step-bar/step-bar.js.map +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.template.js +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.template.js.map +1 -1
- package/dist/css/variables.css +6 -0
- package/dist/nldd.min.js +784 -728
- package/dist/types/react.d.ts +3323 -0
- package/dist/types/vue.d.ts +26 -14
- 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 +17 -2
- package/dist/utilities/dev-rules.generated.js.map +1 -1
- package/dist/utilities/input-modality.d.ts.map +1 -1
- package/dist/utilities/input-modality.js +4 -2
- package/dist/utilities/input-modality.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/dist/utilities/page-section-mixin.d.ts +10 -4
- package/dist/utilities/page-section-mixin.d.ts.map +1 -1
- package/dist/utilities/page-section-mixin.js +29 -23
- package/dist/utilities/page-section-mixin.js.map +1 -1
- package/dist/utilities/return-focus.d.ts +44 -0
- package/dist/utilities/return-focus.d.ts.map +1 -0
- package/dist/utilities/return-focus.js +99 -0
- package/dist/utilities/return-focus.js.map +1 -0
- package/dist/utilities/slot-content.d.ts +30 -0
- package/dist/utilities/slot-content.d.ts.map +1 -0
- package/dist/utilities/slot-content.js +38 -0
- package/dist/utilities/slot-content.js.map +1 -0
- 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 -67895
- package/dist/components/decorate-C7khEuc7.js +0 -16
- package/dist/components/defer-focus-BQ3c4mzj.js +0 -176
- package/dist/components/dev-checks-lQ-gHUjV.js +0 -2706
- 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-CfpnGzYQ.js +0 -2308
- package/dist/components/input-modality-CiPLYYMN.js +0 -42
- package/dist/components/just-in-time-education.i18n-BqU1ImP4.js +0 -423
- package/dist/components/nl.generated-DzZkOgnP.js +0 -64
- package/dist/components/reflect-non-default-B9wQcnne.js +0 -36
- 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-BMtETgjk.js +0 -153
|
@@ -0,0 +1,693 @@
|
|
|
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 "./query-ChDzi9FQ.js";
|
|
6
|
+
import { t as l } from "./reflect-non-default-Bu3rpCvg.js";
|
|
7
|
+
import { t as u } from "./shadow-resets-6SToDsPu.js";
|
|
8
|
+
import { t as d } from "./class-map-CXSdNjt8.js";
|
|
9
|
+
import { t as f } from "./described-by-mixin-daRE7orX.js";
|
|
10
|
+
import { t as p } from "./defer-focus-F73ud2D9.js";
|
|
11
|
+
import { t as m } from "./form-associated-mixin--GIbl98p.js";
|
|
12
|
+
import { t as h } from "./implicit-submission-Csbcor_E.js";
|
|
13
|
+
// src/components/inputs/one-time-code-field/one-time-code-field.styles.ts
|
|
14
|
+
var g = e`
|
|
15
|
+
:host {
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
/* # Host */
|
|
21
|
+
|
|
22
|
+
:host {
|
|
23
|
+
--_one-time-code-field-gap: var(--primitives-space-8);
|
|
24
|
+
--_one-time-code-field-box-size: var(--semantics-controls-md-min-size);
|
|
25
|
+
--_one-time-code-field-box-width: var(--primitives-space-32);
|
|
26
|
+
--_one-time-code-field-box-corner-radius: var(--semantics-controls-md-corner-radius);
|
|
27
|
+
--_one-time-code-field-box-background-color: var(--semantics-input-fields-background-color);
|
|
28
|
+
--_one-time-code-field-font: var(--semantics-input-fields-md-text-font);
|
|
29
|
+
--_one-time-code-field-box-font: var(--primitives-font-monospace-md-regular-flat);
|
|
30
|
+
--_one-time-code-field-caret-width: var(--primitives-space-2);
|
|
31
|
+
--_one-time-code-field-caret-height: var(--primitives-space-20);
|
|
32
|
+
--_one-time-code-field-space-width: var(--primitives-space-12);
|
|
33
|
+
--_one-time-code-field-dash-width: var(--primitives-space-12);
|
|
34
|
+
--_one-time-code-field-dash-height: var(--primitives-space-3);
|
|
35
|
+
--_one-time-code-field-inline-padding: var(--semantics-controls-md-inline-padding);
|
|
36
|
+
--_one-time-code-field-letter-spacing: 0.1em;
|
|
37
|
+
--_one-time-code-field-validation-icon-size: var(--semantics-input-fields-md-validation-icon-size);
|
|
38
|
+
|
|
39
|
+
${u}
|
|
40
|
+
display: block;
|
|
41
|
+
max-width: 100%;
|
|
42
|
+
-webkit-tap-highlight-color: transparent;
|
|
43
|
+
pointer-events: none;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:host([hidden]) {
|
|
47
|
+
display: none;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:host([size="sm"]),
|
|
51
|
+
:host([data-fit="sm"]) {
|
|
52
|
+
--_one-time-code-field-gap: var(--primitives-space-6);
|
|
53
|
+
--_one-time-code-field-box-size: var(--semantics-controls-sm-min-size);
|
|
54
|
+
--_one-time-code-field-box-width: var(--primitives-space-24);
|
|
55
|
+
--_one-time-code-field-box-corner-radius: var(--semantics-controls-sm-corner-radius);
|
|
56
|
+
--_one-time-code-field-font: var(--semantics-input-fields-sm-text-font);
|
|
57
|
+
--_one-time-code-field-box-font: var(--primitives-font-monospace-sm-regular-flat);
|
|
58
|
+
--_one-time-code-field-caret-height: var(--primitives-space-16);
|
|
59
|
+
--_one-time-code-field-space-width: var(--primitives-space-8);
|
|
60
|
+
--_one-time-code-field-dash-width: var(--primitives-space-10);
|
|
61
|
+
--_one-time-code-field-dash-height: var(--primitives-space-2);
|
|
62
|
+
--_one-time-code-field-inline-padding: var(--semantics-controls-sm-inline-padding);
|
|
63
|
+
--_one-time-code-field-validation-icon-size: var(--semantics-input-fields-sm-validation-icon-size);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
:host([size="lg"]:not([data-fit="md"], [data-fit="sm"])) {
|
|
67
|
+
--_one-time-code-field-gap: var(--primitives-space-10);
|
|
68
|
+
--_one-time-code-field-box-size: var(--semantics-controls-lg-min-size);
|
|
69
|
+
--_one-time-code-field-box-width: var(--primitives-space-40);
|
|
70
|
+
--_one-time-code-field-box-corner-radius: var(--semantics-controls-lg-corner-radius);
|
|
71
|
+
--_one-time-code-field-box-font: var(--primitives-font-weight-body-regular) var(--primitives-font-size-300) / var(--primitives-line-height-flat) var(--primitives-font-family-monospace);
|
|
72
|
+
--_one-time-code-field-caret-height: var(--primitives-space-28);
|
|
73
|
+
--_one-time-code-field-space-width: var(--primitives-space-16);
|
|
74
|
+
--_one-time-code-field-dash-width: var(--primitives-space-16);
|
|
75
|
+
--_one-time-code-field-dash-height: var(--primitives-space-4);
|
|
76
|
+
--_one-time-code-field-inline-padding: var(--semantics-controls-lg-inline-padding);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
:host([readonly]) {
|
|
80
|
+
--_one-time-code-field-box-background-color: var(--semantics-input-fields-is-read-only-background-color);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
/* # Block */
|
|
85
|
+
|
|
86
|
+
.one-time-code-field {
|
|
87
|
+
display: flex;
|
|
88
|
+
position: relative;
|
|
89
|
+
width: fit-content;
|
|
90
|
+
max-width: 100%;
|
|
91
|
+
pointer-events: auto;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
:host([centered]) .one-time-code-field {
|
|
95
|
+
margin-inline: auto;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
:host([disabled]) .one-time-code-field {
|
|
99
|
+
opacity: var(--primitives-opacity-disabled);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
/* # Elements */
|
|
104
|
+
|
|
105
|
+
.one-time-code-field__input {
|
|
106
|
+
box-sizing: border-box;
|
|
107
|
+
position: absolute;
|
|
108
|
+
inset: 0;
|
|
109
|
+
z-index: 1;
|
|
110
|
+
margin: 0;
|
|
111
|
+
outline: none;
|
|
112
|
+
border: none;
|
|
113
|
+
background: transparent;
|
|
114
|
+
width: 100%;
|
|
115
|
+
height: 100%;
|
|
116
|
+
padding: 0;
|
|
117
|
+
color: transparent;
|
|
118
|
+
font: var(--_one-time-code-field-font);
|
|
119
|
+
caret-color: transparent;
|
|
120
|
+
appearance: none;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
:host(:not([data-fit="field"])) .one-time-code-field__input::selection {
|
|
124
|
+
background: transparent;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.one-time-code-field__input:-webkit-autofill,
|
|
128
|
+
.one-time-code-field__input:autofill {
|
|
129
|
+
box-shadow: 0 0 0 999px transparent inset;
|
|
130
|
+
-webkit-text-fill-color: transparent;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
:host([disabled]) .one-time-code-field__input {
|
|
134
|
+
pointer-events: none;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.one-time-code-field__boxes {
|
|
138
|
+
display: flex;
|
|
139
|
+
gap: var(--_one-time-code-field-gap);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.one-time-code-field__box {
|
|
143
|
+
box-sizing: border-box;
|
|
144
|
+
display: flex;
|
|
145
|
+
border: var(--semantics-input-fields-border);
|
|
146
|
+
border-radius: var(--_one-time-code-field-box-corner-radius);
|
|
147
|
+
background-color: var(--_one-time-code-field-box-background-color);
|
|
148
|
+
width: var(--_one-time-code-field-box-width);
|
|
149
|
+
min-width: 0;
|
|
150
|
+
height: var(--_one-time-code-field-box-size);
|
|
151
|
+
flex-shrink: 1;
|
|
152
|
+
align-items: center;
|
|
153
|
+
justify-content: center;
|
|
154
|
+
color: var(--semantics-content-color);
|
|
155
|
+
font: var(--_one-time-code-field-box-font);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
:host([invalid]) .one-time-code-field__box {
|
|
159
|
+
border-color: var(--semantics-input-fields-is-invalid-border-color);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
:host([readonly]) .one-time-code-field__box {
|
|
163
|
+
border-color: var(--semantics-input-fields-is-read-only-border-color);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.one-time-code-field__box.is-active {
|
|
167
|
+
outline: var(--semantics-focus-ring-outline);
|
|
168
|
+
outline-offset: var(--semantics-focus-ring-outline-offset);
|
|
169
|
+
box-shadow: var(--semantics-focus-ring-box-shadow);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.one-time-code-field__separator {
|
|
173
|
+
display: flex;
|
|
174
|
+
align-items: center;
|
|
175
|
+
color: var(--semantics-content-secondary-color);
|
|
176
|
+
font: var(--_one-time-code-field-box-font);
|
|
177
|
+
white-space: pre;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.one-time-code-field__separator--space {
|
|
181
|
+
width: var(--_one-time-code-field-space-width);
|
|
182
|
+
flex-shrink: 0;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.one-time-code-field__separator--dash {
|
|
186
|
+
border-radius: calc(var(--_one-time-code-field-dash-height) / 2);
|
|
187
|
+
background-color: currentColor;
|
|
188
|
+
width: var(--_one-time-code-field-dash-width);
|
|
189
|
+
height: var(--_one-time-code-field-dash-height);
|
|
190
|
+
flex-shrink: 0;
|
|
191
|
+
align-self: center;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.one-time-code-field__character {
|
|
195
|
+
position: relative;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.one-time-code-field__caret {
|
|
199
|
+
background-color: currentColor;
|
|
200
|
+
width: var(--_one-time-code-field-caret-width);
|
|
201
|
+
height: var(--_one-time-code-field-caret-height);
|
|
202
|
+
animation: one-time-code-field-blink 1s step-end infinite;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.one-time-code-field__caret.is-after {
|
|
206
|
+
position: absolute;
|
|
207
|
+
top: 50%;
|
|
208
|
+
left: 100%;
|
|
209
|
+
margin-left: var(--_one-time-code-field-caret-width);
|
|
210
|
+
transform: translateY(-50%);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
@media (prefers-reduced-motion: reduce) {
|
|
214
|
+
.one-time-code-field__caret {
|
|
215
|
+
animation: none;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
@keyframes one-time-code-field-blink {
|
|
220
|
+
50% {
|
|
221
|
+
opacity: 0;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
/* # Field */
|
|
227
|
+
|
|
228
|
+
:host([data-fit="field"]) .one-time-code-field {
|
|
229
|
+
box-sizing: border-box;
|
|
230
|
+
border: var(--semantics-input-fields-border);
|
|
231
|
+
border-radius: var(--_one-time-code-field-box-corner-radius);
|
|
232
|
+
background-color: var(--_one-time-code-field-box-background-color);
|
|
233
|
+
width: 100%;
|
|
234
|
+
height: var(--_one-time-code-field-box-size);
|
|
235
|
+
overflow: hidden;
|
|
236
|
+
padding-left: calc(var(--_one-time-code-field-inline-padding) - var(--semantics-input-fields-border-width));
|
|
237
|
+
align-items: center;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.one-time-code-field__input-fade,
|
|
241
|
+
.one-time-code-field__validation-icon-area {
|
|
242
|
+
display: none;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
:host([data-fit="field"]) .one-time-code-field__input-fade {
|
|
246
|
+
display: block;
|
|
247
|
+
position: relative;
|
|
248
|
+
width: 0;
|
|
249
|
+
flex-shrink: 0;
|
|
250
|
+
align-self: stretch;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
:host([data-fit="field"]) .one-time-code-field__input-fade::after {
|
|
254
|
+
content: '';
|
|
255
|
+
position: absolute;
|
|
256
|
+
top: 0;
|
|
257
|
+
right: 0;
|
|
258
|
+
bottom: 0;
|
|
259
|
+
background: linear-gradient(90deg, color-mix(in oklch, var(--_one-time-code-field-box-background-color) 0%, transparent) 0%, var(--_one-time-code-field-box-background-color) 100%);
|
|
260
|
+
pointer-events: none;
|
|
261
|
+
width: var(--primitives-space-8);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
:host([data-fit="field"]) .one-time-code-field__validation-icon-area {
|
|
265
|
+
display: flex;
|
|
266
|
+
width: calc(var(--_one-time-code-field-box-size) - var(--semantics-input-fields-border-width) * 2);
|
|
267
|
+
height: 100%;
|
|
268
|
+
flex-shrink: 0;
|
|
269
|
+
align-items: center;
|
|
270
|
+
justify-content: center;
|
|
271
|
+
color: var(--semantics-input-fields-is-invalid-icon-color);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.one-time-code-field__validation-icon {
|
|
275
|
+
width: var(--_one-time-code-field-validation-icon-size);
|
|
276
|
+
height: var(--_one-time-code-field-validation-icon-size);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
:host([data-fit="field"]) .one-time-code-field:has(.one-time-code-field__input:focus-visible) {
|
|
280
|
+
outline: var(--semantics-focus-ring-outline);
|
|
281
|
+
outline-offset: var(--semantics-focus-ring-outline-offset);
|
|
282
|
+
box-shadow: var(--semantics-focus-ring-box-shadow);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
:host([data-fit="field"][invalid]) .one-time-code-field {
|
|
286
|
+
border-color: var(--semantics-input-fields-is-invalid-border-color);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
:host([data-fit="field"][readonly]) .one-time-code-field {
|
|
290
|
+
border-color: var(--semantics-input-fields-is-read-only-border-color);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
:host([data-fit="field"]) .one-time-code-field__boxes {
|
|
294
|
+
display: none;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
:host([data-fit="field"]) .one-time-code-field__input {
|
|
298
|
+
position: static;
|
|
299
|
+
z-index: auto;
|
|
300
|
+
width: auto;
|
|
301
|
+
min-width: 0;
|
|
302
|
+
height: 100%;
|
|
303
|
+
flex-grow: 1;
|
|
304
|
+
color: var(--semantics-content-color);
|
|
305
|
+
font: var(--_one-time-code-field-box-font);
|
|
306
|
+
letter-spacing: var(--_one-time-code-field-letter-spacing);
|
|
307
|
+
caret-color: auto;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
:host([data-fit="field"]) .one-time-code-field__input:-webkit-autofill,
|
|
311
|
+
:host([data-fit="field"]) .one-time-code-field__input:autofill {
|
|
312
|
+
box-shadow: 0 0 0 999px var(--_one-time-code-field-box-background-color) inset;
|
|
313
|
+
-webkit-text-fill-color: currentColor;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
/* # Accessibility */
|
|
318
|
+
|
|
319
|
+
@media (forced-colors: active) {
|
|
320
|
+
.one-time-code-field__box {
|
|
321
|
+
border-color: CanvasText;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.one-time-code-field__box.is-active {
|
|
325
|
+
outline: 2px solid Highlight;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
`;
|
|
329
|
+
// src/components/inputs/one-time-code-field/one-time-code-field.template.ts
|
|
330
|
+
function _(e, t) {
|
|
331
|
+
let n = e.charAt(t), r = t === e.activeBox, o = r && !e.readonly;
|
|
332
|
+
return i`
|
|
333
|
+
<div class=${d({
|
|
334
|
+
"one-time-code-field__box": !0,
|
|
335
|
+
"is-filled": n !== "",
|
|
336
|
+
"is-active": r
|
|
337
|
+
})}>
|
|
338
|
+
${n === "" ? o ? i`<span class="one-time-code-field__caret"></span>` : a : i`
|
|
339
|
+
<span class="one-time-code-field__character">
|
|
340
|
+
${n}
|
|
341
|
+
${o ? i`<span class="one-time-code-field__caret is-after"></span>` : a}
|
|
342
|
+
</span>
|
|
343
|
+
`}
|
|
344
|
+
</div>
|
|
345
|
+
`;
|
|
346
|
+
}
|
|
347
|
+
function v(e) {
|
|
348
|
+
let t = e.formatParts;
|
|
349
|
+
if (!t) return Array.from({ length: e.boxes }, (t, n) => _(e, n));
|
|
350
|
+
let n = 0;
|
|
351
|
+
return t.map((t) => t === C ? _(e, n++) : y(t));
|
|
352
|
+
}
|
|
353
|
+
function y(e) {
|
|
354
|
+
let t = e.trim();
|
|
355
|
+
return t === "" ? i`<span class="one-time-code-field__separator one-time-code-field__separator--space"></span>` : t === "-" || t === "–" ? i`<span class="one-time-code-field__separator one-time-code-field__separator--dash"></span>` : i`<span class="one-time-code-field__separator">${e}</span>`;
|
|
356
|
+
}
|
|
357
|
+
function b(e) {
|
|
358
|
+
return i`
|
|
359
|
+
<div class="one-time-code-field">
|
|
360
|
+
<input class="one-time-code-field__input"
|
|
361
|
+
id=${e.inputId || a}
|
|
362
|
+
type="text"
|
|
363
|
+
inputmode=${e.type === "alphanumeric" ? "text" : "numeric"}
|
|
364
|
+
autocomplete="one-time-code"
|
|
365
|
+
autocapitalize=${e.uppercase ? "characters" : "off"}
|
|
366
|
+
spellcheck="false"
|
|
367
|
+
pattern=${e.pattern}
|
|
368
|
+
maxlength=${e.boxes}
|
|
369
|
+
.value=${e.value}
|
|
370
|
+
?disabled=${e.disabled}
|
|
371
|
+
?readonly=${e.readonly}
|
|
372
|
+
?required=${e.required}
|
|
373
|
+
name=${e.name || a}
|
|
374
|
+
aria-label=${e.accessibleLabel || a}
|
|
375
|
+
aria-invalid=${e.invalid ? "true" : a}
|
|
376
|
+
@focus=${e._handleFocus}
|
|
377
|
+
@blur=${e._handleBlur}
|
|
378
|
+
@pointerdown=${e._handlePointerDown}
|
|
379
|
+
@select=${e._keepNativeCaretAtEnd}
|
|
380
|
+
@pointerup=${e._keepNativeCaretAtEnd}
|
|
381
|
+
@keydown=${e._handleKeydown}
|
|
382
|
+
@beforeinput=${e._handleBeforeInput}
|
|
383
|
+
@input=${e._handleInput}
|
|
384
|
+
@change=${e._handleChange}
|
|
385
|
+
>
|
|
386
|
+
<div class="one-time-code-field__input-fade"></div>
|
|
387
|
+
${e.invalid ? i`
|
|
388
|
+
<div class="one-time-code-field__validation-icon-area">
|
|
389
|
+
<nldd-icon class="one-time-code-field__validation-icon"
|
|
390
|
+
icon="invalid"
|
|
391
|
+
aria-hidden="true"
|
|
392
|
+
></nldd-icon>
|
|
393
|
+
</div>
|
|
394
|
+
` : a}
|
|
395
|
+
<div class="one-time-code-field__boxes"
|
|
396
|
+
aria-hidden="true"
|
|
397
|
+
>
|
|
398
|
+
${v(e)}
|
|
399
|
+
</div>
|
|
400
|
+
</div>
|
|
401
|
+
`;
|
|
402
|
+
}
|
|
403
|
+
// src/components/inputs/one-time-code-field/one-time-code-field.ts
|
|
404
|
+
var x, S = 6, C = Symbol("box"), w = {
|
|
405
|
+
numeric: /[^0-9]/g,
|
|
406
|
+
alphanumeric: /[^0-9A-Za-z]/g
|
|
407
|
+
}, T = {
|
|
408
|
+
numeric: "[0-9]",
|
|
409
|
+
alphanumeric: "[0-9A-Za-z]"
|
|
410
|
+
}, E = (x = class extends f(m(r)) {
|
|
411
|
+
constructor(...e) {
|
|
412
|
+
super(...e), this._initialValue = "", this.size = "md", this.centered = !1, this.length = S, this.format = "", this.accessibleLabel = "", this.invalid = !1, this.readonly = !1, this.disabled = !1, this.inputId = "", this.name = "", this.value = "", this.type = "numeric", this.uppercase = !1, this.required = !1, this._focused = !1, this._chars = [], this._box = 0, this._completed = "", this._pressedBox = null;
|
|
413
|
+
}
|
|
414
|
+
get formatParts() {
|
|
415
|
+
return this.format?.includes("#") ? (this.format.match(/#|[^#]+/g) ?? []).map((e) => e === "#" ? C : e) : null;
|
|
416
|
+
}
|
|
417
|
+
get boxes() {
|
|
418
|
+
let e = this.formatParts;
|
|
419
|
+
if (e) return e.filter((e) => e === C).length;
|
|
420
|
+
let t = Math.floor(Number(this.length));
|
|
421
|
+
return Number.isFinite(t) && t > 0 ? t : S;
|
|
422
|
+
}
|
|
423
|
+
get pattern() {
|
|
424
|
+
return `${T[this.type] ?? T.numeric}{${this.boxes}}`;
|
|
425
|
+
}
|
|
426
|
+
charAt(e) {
|
|
427
|
+
return this._chars[e] ?? "";
|
|
428
|
+
}
|
|
429
|
+
get activeBox() {
|
|
430
|
+
return this._focused ? Math.min(this._box, this.boxes - 1) : -1;
|
|
431
|
+
}
|
|
432
|
+
_clean(e) {
|
|
433
|
+
let t = e.replace(w[this.type] ?? w.numeric, "").slice(0, this.boxes);
|
|
434
|
+
return this.uppercase ? t.toUpperCase() : t;
|
|
435
|
+
}
|
|
436
|
+
_codeIn(e) {
|
|
437
|
+
let t = w[this.type] ?? w.numeric, n = e.split(/\s+/).map((e) => e.replace(t, "")).reverse().find((e) => e.length === this.boxes);
|
|
438
|
+
return this._clean(n ?? e);
|
|
439
|
+
}
|
|
440
|
+
_charsOf(e) {
|
|
441
|
+
return Array.from({ length: this.boxes }, (t, n) => e[n] ?? "");
|
|
442
|
+
}
|
|
443
|
+
willUpdate(e) {
|
|
444
|
+
if ([
|
|
445
|
+
"value",
|
|
446
|
+
"type",
|
|
447
|
+
"length",
|
|
448
|
+
"format",
|
|
449
|
+
"uppercase"
|
|
450
|
+
].some((t) => e.has(t))) {
|
|
451
|
+
let e = this._clean(this.value ?? "");
|
|
452
|
+
e !== this.value && (this.value = e);
|
|
453
|
+
let t = this._chars.join("");
|
|
454
|
+
(this.value !== t || this._chars.length !== this.boxes) && (this._chars = this._charsOf(this.value));
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
firstUpdated() {
|
|
458
|
+
this._initialValue = this.value;
|
|
459
|
+
}
|
|
460
|
+
connectedCallback() {
|
|
461
|
+
super.connectedCallback(), this._resizeObserver = new ResizeObserver(() => this._fit()), this._resizeObserver.observe(this);
|
|
462
|
+
}
|
|
463
|
+
disconnectedCallback() {
|
|
464
|
+
this._resizeObserver?.disconnect(), super.disconnectedCallback();
|
|
465
|
+
}
|
|
466
|
+
updated(e) {
|
|
467
|
+
super.updated(e), [
|
|
468
|
+
"size",
|
|
469
|
+
"length",
|
|
470
|
+
"format"
|
|
471
|
+
].some((t) => e.has(t)) && this._fit();
|
|
472
|
+
}
|
|
473
|
+
_fit() {
|
|
474
|
+
let e = this.shadowRoot?.querySelector(".one-time-code-field__boxes"), t = this.clientWidth;
|
|
475
|
+
if (!e || t === 0) return;
|
|
476
|
+
let n = [
|
|
477
|
+
"lg",
|
|
478
|
+
"md",
|
|
479
|
+
"sm"
|
|
480
|
+
], r = n.includes(this.size) ? n.indexOf(this.size) : n.indexOf("md");
|
|
481
|
+
this.removeAttribute("data-fit"), e.style.minWidth = "max-content";
|
|
482
|
+
let i = !1;
|
|
483
|
+
for (let a of n.slice(r)) if (a !== this.size && this.setAttribute("data-fit", a), e.getBoundingClientRect().width <= t + .5) {
|
|
484
|
+
i = !0;
|
|
485
|
+
break;
|
|
486
|
+
}
|
|
487
|
+
e.style.removeProperty("min-width"), i || this.setAttribute("data-fit", "field");
|
|
488
|
+
}
|
|
489
|
+
formValue() {
|
|
490
|
+
return this.value;
|
|
491
|
+
}
|
|
492
|
+
formResetCallback() {
|
|
493
|
+
this.value = this._initialValue;
|
|
494
|
+
}
|
|
495
|
+
formStateRestoreCallback(e) {
|
|
496
|
+
typeof e == "string" && (this.value = e);
|
|
497
|
+
}
|
|
498
|
+
get _nextBox() {
|
|
499
|
+
let e = this._chars.indexOf("");
|
|
500
|
+
return e === -1 ? this.boxes - 1 : e;
|
|
501
|
+
}
|
|
502
|
+
_moveTo(e) {
|
|
503
|
+
this._box = Math.max(0, Math.min(e, this.boxes - 1));
|
|
504
|
+
}
|
|
505
|
+
_boxAt(e) {
|
|
506
|
+
let t = [...this.shadowRoot?.querySelectorAll(".one-time-code-field__box") ?? []], n = 0, r = Infinity;
|
|
507
|
+
return t.forEach((t, i) => {
|
|
508
|
+
let { left: a, right: o } = t.getBoundingClientRect(), s = e < a ? a - e : e > o ? e - o : 0;
|
|
509
|
+
s < r && (r = s, n = i);
|
|
510
|
+
}), n;
|
|
511
|
+
}
|
|
512
|
+
_handlePointerDown(e) {
|
|
513
|
+
if (this._asField) return;
|
|
514
|
+
let t = this._boxAt(e.clientX);
|
|
515
|
+
this._pressedBox = t, this._moveTo(t), !(e.pointerType !== "mouse" || this.disabled) && (e.preventDefault(), this._input.focus());
|
|
516
|
+
}
|
|
517
|
+
_handleFocus() {
|
|
518
|
+
this._focused = !0, !this._asField && (this._pressedBox === null && this._moveTo(this._nextBox), this._pressedBox = null, this._keepNativeCaretAtEnd());
|
|
519
|
+
}
|
|
520
|
+
_handleBlur() {
|
|
521
|
+
this._focused = !1, this._pressedBox = null;
|
|
522
|
+
}
|
|
523
|
+
_keepNativeCaretAtEnd() {
|
|
524
|
+
let e = this._input;
|
|
525
|
+
if (!e || this._asField || this.shadowRoot?.activeElement !== e) return;
|
|
526
|
+
let t = e.value.length;
|
|
527
|
+
(e.selectionStart !== t || e.selectionEnd !== t) && e.setSelectionRange(t, t);
|
|
528
|
+
}
|
|
529
|
+
_handleBeforeInput(e) {
|
|
530
|
+
if (!(this.readonly || this.disabled)) {
|
|
531
|
+
if (this._asField) this._beforeFieldInput(e);
|
|
532
|
+
else switch (e.inputType) {
|
|
533
|
+
case "insertText": {
|
|
534
|
+
e.preventDefault();
|
|
535
|
+
let t = this._clean(e.data ?? "");
|
|
536
|
+
t && this._write(t, !1);
|
|
537
|
+
return;
|
|
538
|
+
}
|
|
539
|
+
case "insertFromPaste":
|
|
540
|
+
case "insertFromDrop":
|
|
541
|
+
case "insertReplacementText": {
|
|
542
|
+
e.preventDefault();
|
|
543
|
+
let t = this._codeIn(e.dataTransfer?.getData("text/plain") ?? e.data ?? "");
|
|
544
|
+
t && this._write(t, !0);
|
|
545
|
+
return;
|
|
546
|
+
}
|
|
547
|
+
case "deleteContentBackward":
|
|
548
|
+
case "deleteWordBackward":
|
|
549
|
+
case "deleteSoftLineBackward":
|
|
550
|
+
case "deleteHardLineBackward": {
|
|
551
|
+
e.preventDefault();
|
|
552
|
+
let t = this.activeBox < 0 ? this._box : this.activeBox, n = this.charAt(t) ? t : t - 1;
|
|
553
|
+
if (n < 0) return;
|
|
554
|
+
this._setChars(this._chars.map((e, t) => t === n ? "" : e), n);
|
|
555
|
+
return;
|
|
556
|
+
}
|
|
557
|
+
case "deleteContentForward":
|
|
558
|
+
e.preventDefault(), this._setChars(this._chars.map((e, t) => t === this._box ? "" : e), this._box);
|
|
559
|
+
return;
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
_beforeFieldInput(e) {
|
|
564
|
+
let t = this._input;
|
|
565
|
+
if (e.inputType === "insertText") this._clean(e.data ?? "") || e.preventDefault();
|
|
566
|
+
else if ([
|
|
567
|
+
"insertFromPaste",
|
|
568
|
+
"insertFromDrop",
|
|
569
|
+
"insertReplacementText"
|
|
570
|
+
].includes(e.inputType)) {
|
|
571
|
+
e.preventDefault();
|
|
572
|
+
let n = this._codeIn(e.dataTransfer?.getData("text/plain") ?? e.data ?? "");
|
|
573
|
+
n.length === this.boxes ? t.value = n : t.setRangeText(n, t.selectionStart ?? 0, t.selectionEnd ?? 0, "end"), this._syncFromField();
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
_syncFromField() {
|
|
577
|
+
let e = this._input, t = e.selectionStart ?? e.value.length, n = this._clean(e.value);
|
|
578
|
+
if (e.value !== n) {
|
|
579
|
+
let r = this._clean(e.value.slice(0, t)).length;
|
|
580
|
+
e.value = n, e.setSelectionRange(r, r);
|
|
581
|
+
}
|
|
582
|
+
this._setChars(this._charsOf(n), Math.min(n.length, this.boxes - 1));
|
|
583
|
+
}
|
|
584
|
+
get _asField() {
|
|
585
|
+
return this.getAttribute("data-fit") === "field";
|
|
586
|
+
}
|
|
587
|
+
_write(e, t) {
|
|
588
|
+
if (t && e.length === this.boxes) {
|
|
589
|
+
this._setChars(e.split(""), this.boxes - 1);
|
|
590
|
+
return;
|
|
591
|
+
}
|
|
592
|
+
let n = [...this._chars], r = this.charAt(this._box) && !t ? this._box + 1 : this._box;
|
|
593
|
+
r >= this.boxes && (r = this.boxes - 1);
|
|
594
|
+
for (let t of e) {
|
|
595
|
+
if (r >= this.boxes) break;
|
|
596
|
+
n[r] = t, r++;
|
|
597
|
+
}
|
|
598
|
+
this._setChars(n, r);
|
|
599
|
+
}
|
|
600
|
+
_handleKeydown(e) {
|
|
601
|
+
if (h(this, e), this._asField || e.altKey || e.ctrlKey || e.metaKey) return;
|
|
602
|
+
let t = {
|
|
603
|
+
ArrowLeft: () => this._box - 1,
|
|
604
|
+
ArrowRight: () => Math.min(this._box + 1, this._nextBox),
|
|
605
|
+
Home: () => 0,
|
|
606
|
+
End: () => this._nextBox
|
|
607
|
+
}[e.key];
|
|
608
|
+
t && (e.preventDefault(), this._moveTo(t()));
|
|
609
|
+
}
|
|
610
|
+
_handleInput(e) {
|
|
611
|
+
if (e.stopPropagation(), this._asField) {
|
|
612
|
+
this._syncFromField();
|
|
613
|
+
return;
|
|
614
|
+
}
|
|
615
|
+
let t = this._clean(this._input.value);
|
|
616
|
+
this._setChars(this._charsOf(t), Math.min(t.length, this.boxes - 1));
|
|
617
|
+
}
|
|
618
|
+
_setChars(e, t) {
|
|
619
|
+
this._chars = e, this._moveTo(t);
|
|
620
|
+
let n = e.join(""), r = this._input;
|
|
621
|
+
r.value !== n && (r.value = n), this._keepNativeCaretAtEnd();
|
|
622
|
+
let i = n !== this.value;
|
|
623
|
+
this.value = n, this.commitFormValue(), i && (this.dispatchEvent(new CustomEvent("input", {
|
|
624
|
+
detail: { value: this.value },
|
|
625
|
+
bubbles: !0,
|
|
626
|
+
composed: !0
|
|
627
|
+
})), e.includes("") || n.length < this.boxes ? this._completed = "" : n !== this._completed && (this._completed = n, this.dispatchEvent(new CustomEvent("nldd-complete", {
|
|
628
|
+
detail: { value: n },
|
|
629
|
+
bubbles: !0,
|
|
630
|
+
composed: !0
|
|
631
|
+
}))));
|
|
632
|
+
}
|
|
633
|
+
_handleChange(e) {
|
|
634
|
+
e.stopPropagation(), this.commitFormValue(), this.dispatchEvent(new CustomEvent("change", {
|
|
635
|
+
detail: { value: this.value },
|
|
636
|
+
bubbles: !0,
|
|
637
|
+
composed: !0
|
|
638
|
+
}));
|
|
639
|
+
}
|
|
640
|
+
blur() {
|
|
641
|
+
this._input?.blur();
|
|
642
|
+
}
|
|
643
|
+
focus(e) {
|
|
644
|
+
p(this, e) || this._input?.focus(e);
|
|
645
|
+
}
|
|
646
|
+
render() {
|
|
647
|
+
return b(this);
|
|
648
|
+
}
|
|
649
|
+
}, x.shadowRootOptions = {
|
|
650
|
+
...r.shadowRootOptions,
|
|
651
|
+
delegatesFocus: !0
|
|
652
|
+
}, x.styles = g, x.isFormInput = !0, x.blocksImplicitSubmission = !0, x);
|
|
653
|
+
o([t({
|
|
654
|
+
reflect: !0,
|
|
655
|
+
converter: l("md")
|
|
656
|
+
})], E.prototype, "size", void 0), o([t({
|
|
657
|
+
type: Boolean,
|
|
658
|
+
reflect: !0
|
|
659
|
+
})], E.prototype, "centered", void 0), o([t({
|
|
660
|
+
reflect: !0,
|
|
661
|
+
converter: l(S)
|
|
662
|
+
})], E.prototype, "length", void 0), o([t({
|
|
663
|
+
reflect: !0,
|
|
664
|
+
converter: l("")
|
|
665
|
+
})], E.prototype, "format", void 0), o([t({
|
|
666
|
+
type: String,
|
|
667
|
+
attribute: "accessible-label"
|
|
668
|
+
})], E.prototype, "accessibleLabel", void 0), o([t({
|
|
669
|
+
type: Boolean,
|
|
670
|
+
reflect: !0
|
|
671
|
+
})], E.prototype, "invalid", void 0), o([t({
|
|
672
|
+
type: Boolean,
|
|
673
|
+
reflect: !0
|
|
674
|
+
})], E.prototype, "readonly", void 0), o([t({
|
|
675
|
+
type: Boolean,
|
|
676
|
+
reflect: !0
|
|
677
|
+
})], E.prototype, "disabled", void 0), o([t({
|
|
678
|
+
type: String,
|
|
679
|
+
attribute: "input-id"
|
|
680
|
+
})], E.prototype, "inputId", void 0), o([t({
|
|
681
|
+
reflect: !0,
|
|
682
|
+
converter: l("")
|
|
683
|
+
})], E.prototype, "name", void 0), o([t({ type: String })], E.prototype, "value", void 0), o([t({
|
|
684
|
+
reflect: !0,
|
|
685
|
+
converter: l("numeric")
|
|
686
|
+
})], E.prototype, "type", void 0), o([t({
|
|
687
|
+
type: Boolean,
|
|
688
|
+
reflect: !0
|
|
689
|
+
})], E.prototype, "uppercase", void 0), o([t({
|
|
690
|
+
type: Boolean,
|
|
691
|
+
reflect: !0
|
|
692
|
+
})], E.prototype, "required", void 0), o([n()], E.prototype, "_focused", void 0), o([n()], E.prototype, "_chars", void 0), o([n()], E.prototype, "_box", void 0), o([c(".one-time-code-field__input")], E.prototype, "_input", void 0), E = o([s("nldd-one-time-code-field")], E);
|
|
693
|
+
export { C as BOX, E as NLDDOneTimeCodeField };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// src/utilities/autofocus.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
let t = e.querySelector("[autofocus]");
|
|
4
|
+
if (!t) return !1;
|
|
5
|
+
t.focus();
|
|
6
|
+
let n = t.updateComplete;
|
|
7
|
+
return n && typeof n.then == "function" && n.then(() => {
|
|
8
|
+
e.contains(document.activeElement) && document.activeElement !== e || t.focus();
|
|
9
|
+
}), !0;
|
|
10
|
+
}
|
|
11
|
+
// src/utilities/open-when-rendered.ts
|
|
12
|
+
function t(e, t, n) {
|
|
13
|
+
let r = !1;
|
|
14
|
+
return e.updateComplete.then(() => {
|
|
15
|
+
!r && t() && n();
|
|
16
|
+
}), () => {
|
|
17
|
+
r = !0;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export { e as n, t };
|