@ds-autonomie/web-components 2.2.0 → 2.3.1
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/CHANGELOG.md +37 -0
- package/cdn/chunks/{chunk.CZHOLGSR.js → chunk.27YOIDOY.js} +1 -1
- package/cdn/chunks/{chunk.2DJERWBI.js → chunk.2P3IVRMK.js} +4 -3
- package/cdn/chunks/{chunk.YD6XEMWC.js → chunk.2Q6V7LT2.js} +1 -1
- package/cdn/chunks/chunk.35PPY25N.js +92 -0
- package/cdn/chunks/{chunk.EARU4CHS.js → chunk.3AT66TOX.js} +1 -1
- package/cdn/chunks/{chunk.WJ2QJ5NF.js → chunk.3CRRJ74Q.js} +4 -4
- package/cdn/chunks/chunk.3OSWL542.js +163 -0
- package/cdn/chunks/{chunk.SW4US4PJ.js → chunk.4AMHKT45.js} +1 -1
- package/cdn/chunks/{chunk.BCLU5KXE.js → chunk.4VWDJUDJ.js} +1 -1
- package/cdn/chunks/{chunk.6QTMZJGH.js → chunk.55Y4QE5R.js} +5 -5
- package/cdn/chunks/{chunk.6H5KLQNT.js → chunk.57JBB4UL.js} +1 -1
- package/cdn/chunks/{chunk.THD27VRI.js → chunk.57UCUSPU.js} +1 -1
- package/cdn/chunks/{chunk.T4RXUUPV.js → chunk.5BWMYJNC.js} +2 -2
- package/cdn/chunks/{chunk.7CIXFYLV.js → chunk.5EYEXU6M.js} +1 -1
- package/cdn/chunks/chunk.5IFHMXXG.js +229 -0
- package/cdn/chunks/chunk.6BPVPY42.js +318 -0
- package/cdn/chunks/{chunk.C62MMBV4.js → chunk.6NFWRZM6.js} +43 -53
- package/cdn/chunks/{chunk.IPZC55RV.js → chunk.6YEPFMKU.js} +6 -3
- package/cdn/chunks/{chunk.I7XP2UMV.js → chunk.7FRA5H32.js} +1 -1
- package/cdn/chunks/{chunk.5BL6KECM.js → chunk.7KCIFACP.js} +2 -2
- package/cdn/chunks/{chunk.27YR5DC6.js → chunk.7S74KUA4.js} +1 -13
- package/cdn/chunks/{chunk.E6VF2I6I.js → chunk.7VDWWPRU.js} +4 -3
- package/cdn/chunks/chunk.7WXOGHV7.js +46 -0
- package/cdn/chunks/{chunk.L7BI7NJL.js → chunk.7ZBG7ZQG.js} +1 -1
- package/cdn/chunks/{chunk.3JMBGIZN.js → chunk.AATBJDAH.js} +77 -36
- package/cdn/chunks/{chunk.M7QHADJH.js → chunk.AVH4JYLK.js} +40 -28
- package/cdn/chunks/{chunk.WO2QCEF7.js → chunk.BLLAYNRQ.js} +1 -1
- package/cdn/chunks/{chunk.Y3OADZB3.js → chunk.BPP37CID.js} +32 -32
- package/cdn/chunks/{chunk.P45DWAWT.js → chunk.CAYHSQZJ.js} +1 -1
- package/cdn/chunks/{chunk.BE7PKTJW.js → chunk.D5IL5KN6.js} +5 -5
- package/cdn/chunks/{chunk.LCUVJAUT.js → chunk.DDRUVCZW.js} +1 -1
- package/cdn/chunks/{chunk.3PW6CC5R.js → chunk.EEKS3ZN7.js} +1 -3
- package/cdn/chunks/{chunk.MJLKYERJ.js → chunk.EHSLOI5L.js} +2 -2
- package/cdn/chunks/{chunk.J3A7VDK5.js → chunk.EKKWPXJL.js} +32 -12
- package/cdn/chunks/{chunk.HYTYRM6S.js → chunk.ER5ZWWSU.js} +10 -5
- package/cdn/chunks/{chunk.77JWQ5MT.js → chunk.F34KPGDS.js} +1 -1
- package/cdn/chunks/{chunk.Y2DCLNZQ.js → chunk.FXVCDQEN.js} +1 -1
- package/cdn/chunks/{chunk.JBUFTMYB.js → chunk.GCLAPOSZ.js} +1 -1
- package/cdn/chunks/{chunk.W2MICEQN.js → chunk.GN3AVMBZ.js} +1 -1
- package/cdn/chunks/{chunk.UAQ7MMLI.js → chunk.GS6TNOKD.js} +3 -3
- package/cdn/chunks/chunk.H2OEFMQC.js +186 -0
- package/cdn/chunks/{chunk.FMPJ4AXA.js → chunk.H3Y633AF.js} +1 -1
- package/{dist/chunks/chunk.3TUFAITJ.js → cdn/chunks/chunk.HJU52GCK.js} +1 -1
- package/cdn/chunks/{chunk.UFCZPYZA.js → chunk.HMLKFYNH.js} +1 -1
- package/cdn/chunks/{chunk.JNDULVYM.js → chunk.HZJEKORW.js} +1 -1
- package/cdn/chunks/{chunk.TCGVOWNQ.js → chunk.IAOVYG7Z.js} +1 -1
- package/cdn/chunks/{chunk.FHOCNAJ4.js → chunk.IB463542.js} +1 -1
- package/cdn/chunks/chunk.IONY2GZF.js +72 -0
- package/cdn/chunks/{chunk.DKFGG7WX.js → chunk.ISEH6AO6.js} +10 -3
- package/cdn/chunks/{chunk.4NC4QO64.js → chunk.J6J6XRPR.js} +1 -1
- package/cdn/chunks/{chunk.Y4RIWPTX.js → chunk.JHXMD4L2.js} +2 -2
- package/cdn/chunks/{chunk.A33BZOMA.js → chunk.JIUJNSW6.js} +2 -2
- package/cdn/chunks/{chunk.XPL6N3OJ.js → chunk.JLZQJQF4.js} +9 -12
- package/cdn/chunks/{chunk.FHTVGJJI.js → chunk.JXHXRRPX.js} +1 -1
- package/cdn/chunks/{chunk.7KCFANDH.js → chunk.KCPXZK3D.js} +1 -1
- package/cdn/chunks/chunk.KNY4ZIQ7.js +282 -0
- package/cdn/chunks/{chunk.I4EWJGZZ.js → chunk.KS7QG726.js} +10 -3
- package/cdn/chunks/{chunk.OP36PAMU.js → chunk.LBM4RHMA.js} +4 -2
- package/cdn/chunks/{chunk.ZLWLHLBC.js → chunk.LICWCBKN.js} +12 -0
- package/cdn/chunks/{chunk.RPRWT2IH.js → chunk.M53HNM5Y.js} +10 -9
- package/cdn/chunks/{chunk.OIOL7U5V.js → chunk.MNE7AANP.js} +1 -1
- package/cdn/chunks/{chunk.CYMM2ZAV.js → chunk.NX5D5OTS.js} +9 -2
- package/cdn/chunks/chunk.O3K7DNLG.js +102 -0
- package/cdn/chunks/chunk.O577BA4U.js +23 -0
- package/cdn/chunks/{chunk.IS6JFFBR.js → chunk.OLIPJEPX.js} +1 -1
- package/cdn/chunks/{chunk.DNQJR4KR.js → chunk.OMPBUYUW.js} +1 -3
- package/cdn/chunks/{chunk.45JVH3EU.js → chunk.OZVVCEKQ.js} +1 -1
- package/cdn/chunks/{chunk.ATHAYO6A.js → chunk.P5KRELMB.js} +60 -213
- package/cdn/chunks/{chunk.BNPGOQZ2.js → chunk.P7D7IUHT.js} +1 -1
- package/cdn/chunks/{chunk.LNBAAP45.js → chunk.QEPPYDSN.js} +3 -3
- package/cdn/chunks/{chunk.XSXBXWVS.js → chunk.QFP2EIRS.js} +1 -0
- package/cdn/chunks/{chunk.YS6XV3LD.js → chunk.RJUKDJQG.js} +8 -3
- package/cdn/chunks/{chunk.NSE76EM5.js → chunk.ROGVB4AO.js} +2 -2
- package/cdn/chunks/{chunk.RJROYRRA.js → chunk.RXUJBLKT.js} +1 -1
- package/cdn/chunks/{chunk.YWD53U3T.js → chunk.S3G2QBTA.js} +3 -3
- package/cdn/chunks/{chunk.HNDRJ3LR.js → chunk.SE7W7XMK.js} +1 -1
- package/cdn/chunks/{chunk.QVX3F6W3.js → chunk.T56ZOKTF.js} +1 -1
- package/cdn/chunks/{chunk.D34ULVGO.js → chunk.TAKMMVMG.js} +1 -1
- package/cdn/chunks/{chunk.FA2HQBM6.js → chunk.TENBZ64C.js} +27 -6
- package/cdn/chunks/chunk.TGMW5D2F.js +93 -0
- package/cdn/chunks/{chunk.P5N74W74.js → chunk.THMGZ3JS.js} +1 -1
- package/cdn/chunks/{chunk.YQQNMFZF.js → chunk.TO65OMN5.js} +45 -36
- package/cdn/chunks/{chunk.XQAKSW3W.js → chunk.TOWWOPMH.js} +3 -3
- package/cdn/chunks/{chunk.6CF6SXDF.js → chunk.U5Q3HCRP.js} +1 -1
- package/cdn/chunks/{chunk.RPF6UDR4.js → chunk.US6UTTN5.js} +1 -1
- package/cdn/chunks/{chunk.3CJGMKTJ.js → chunk.V5TMX44U.js} +1 -1
- package/cdn/chunks/{chunk.3OPTPDM7.js → chunk.VGXDHXD4.js} +1 -1
- package/cdn/chunks/{chunk.XLX7QTXT.js → chunk.VZJGVIXG.js} +1 -0
- package/cdn/chunks/{chunk.WCF4VYWI.js → chunk.VZPL3NCB.js} +3 -3
- package/cdn/chunks/{chunk.NC6BC5GU.js → chunk.W2B6WXUI.js} +17 -1
- package/cdn/chunks/{chunk.XWKSA3TQ.js → chunk.W547AC5O.js} +1 -1
- package/cdn/chunks/chunk.W6N2ZQTH.js +677 -0
- package/cdn/chunks/{chunk.CVV4WLBC.js → chunk.WMMK7OL4.js} +19 -12
- package/cdn/chunks/{chunk.77CWRZEL.js → chunk.WY2HI4TL.js} +1 -1
- package/cdn/chunks/{chunk.2APAO2OW.js → chunk.WYBADVDH.js} +29 -20
- package/cdn/chunks/{chunk.5BF76EO7.js → chunk.YA7ZX7VM.js} +1 -1
- package/cdn/chunks/{chunk.NVI4N3YH.js → chunk.YDBMOXIS.js} +1 -1
- package/cdn/chunks/chunk.YGAW4V4H.js +44 -0
- package/cdn/chunks/{chunk.DSKRAAOI.js → chunk.Z7VB7VAD.js} +1 -1
- package/cdn/chunks/{chunk.M5Z546V7.js → chunk.ZEPLEFIQ.js} +1 -1
- package/cdn/chunks/{chunk.YSKUVTPO.js → chunk.ZLZIVCPW.js} +1 -1
- package/cdn/chunks/{chunk.KELDA33H.js → chunk.ZTXQFGQX.js} +2 -2
- package/cdn/chunks/{chunk.APACKBZF.js → chunk.ZUJJYUHF.js} +1 -1
- package/cdn/chunks/{core-js.JQALWJRI.js → core-js.TKFIM466.js} +1 -1
- package/cdn/chunks/{dom.47DVCSJV.js → dom.6JFLMPA6.js} +1 -1
- package/cdn/chunks/{wc-datepicker.entry.XBA7YLCU.js → wc-datepicker.entry.Y6YDPVTT.js} +3 -3
- package/cdn/components/accordion/accordion.js +5 -5
- package/cdn/components/alert/alert.js +5 -5
- package/cdn/components/avatar/avatar.js +4 -4
- package/cdn/components/breadcrumb/breadcrumb.js +5 -5
- package/cdn/components/breadcrumb-item/breadcrumb-item.js +2 -2
- package/cdn/components/button/button.d.ts +1 -1
- package/cdn/components/button/button.js +7 -7
- package/cdn/components/button/button.styles.js +1 -1
- package/cdn/components/calendar/calendar.js +4 -4
- package/cdn/components/callout/callout.js +3 -3
- package/cdn/components/checkbox/checkbox.d.ts +6 -3
- package/cdn/components/checkbox/checkbox.js +11 -9
- package/cdn/components/checkbox/checkbox.styles.js +2 -2
- package/cdn/components/checkbox-button/checkbox-button.js +17 -6
- package/cdn/components/checkbox-card/checkbox-card.d.ts +25 -0
- package/cdn/components/checkbox-card/checkbox-card.js +27 -0
- package/cdn/components/checkbox-group/checkbox-group.d.ts +5 -3
- package/cdn/components/checkbox-group/checkbox-group.js +6 -6
- package/cdn/components/checkbox-group/checkbox-group.styles.js +2 -2
- package/cdn/components/combobox/combobox.js +11 -11
- package/cdn/components/combobox/combobox.styles.js +2 -2
- package/cdn/components/dialog/dialog.d.ts +11 -5
- package/cdn/components/dialog/dialog.js +6 -6
- package/cdn/components/dialog/dialog.styles.js +1 -1
- package/cdn/components/download-card/download-card.js +3 -3
- package/cdn/components/download-link/download-link.js +3 -3
- package/cdn/components/drawer/drawer.js +5 -5
- package/cdn/components/dropdown/dropdown.js +3 -3
- package/cdn/components/error-message-panel/error-message-panel.js +2 -2
- package/cdn/components/error-text/error-text.js +3 -3
- package/cdn/components/file-upload/file-upload.js +7 -7
- package/cdn/components/file-upload/file-upload.styles.js +2 -2
- package/cdn/components/file-upload-item/file-upload-item.js +5 -4
- package/cdn/components/filter-base/filter-base.js +7 -7
- package/cdn/components/filter-button/filter-button.js +5 -5
- package/cdn/components/filter-counter/filter-counter.js +27 -21
- package/cdn/components/filter-date/filter-date.js +12 -12
- package/cdn/components/filter-range/filter-range.js +28 -22
- package/cdn/components/filter-select/filter-select.js +27 -24
- package/cdn/components/footer/footer.js +3 -3
- package/cdn/components/footer/footer.styles.js +1 -1
- package/cdn/components/format-bytes/format-bytes.js +2 -2
- package/cdn/components/format-date/format-date.js +2 -2
- package/cdn/components/format-number/format-number.js +2 -2
- package/cdn/components/header/header.js +3 -3
- package/cdn/components/header/header.styles.js +1 -1
- package/cdn/components/header-search/header-search.js +8 -8
- package/cdn/components/icon/icon.js +3 -3
- package/cdn/components/icon/library.js +2 -2
- package/cdn/components/icon/library.system.js +1 -1
- package/cdn/components/icon-button/icon-button.js +3 -3
- package/cdn/components/input/input.d.ts +3 -7
- package/cdn/components/input/input.js +21 -15
- package/cdn/components/input/input.styles.js +2 -2
- package/cdn/components/input-date/input-date.d.ts +7 -2
- package/cdn/components/input-date/input-date.js +14 -14
- package/cdn/components/input-date/input-date.styles.js +3 -3
- package/cdn/components/input-mask/input-mask.js +8 -8
- package/cdn/components/input-mask/input-mask.styles.js +2 -2
- package/cdn/components/input-otp/input-otp.js +7 -7
- package/cdn/components/input-otp/input-otp.styles.js +2 -2
- package/cdn/components/input-phone/input-phone.js +14 -14
- package/cdn/components/input-phone/input-phone.styles.js +2 -2
- package/cdn/components/input-time/input-time.d.ts +121 -0
- package/cdn/components/input-time/input-time.js +50 -0
- package/cdn/components/input-time/input-time.styles.d.ts +2 -0
- package/cdn/components/input-time/input-time.styles.js +12 -0
- package/cdn/components/input-time/input-time.utils.d.ts +17 -0
- package/cdn/components/input-time/input-time.utils.js +13 -0
- package/cdn/components/menu-accordion/menu-accordion.js +5 -5
- package/cdn/components/menu-item/menu-item.js +4 -4
- package/cdn/components/navbar-link/navbar-link.js +4 -4
- package/cdn/components/navbar-menu/navbar-menu.js +6 -6
- package/cdn/components/option/option.js +5 -5
- package/cdn/components/pagination/pagination.js +25 -21
- package/cdn/components/pagination-button/pagination-button.js +3 -3
- package/cdn/components/pagination-button/pagination-button.styles.js +2 -2
- package/cdn/components/popup/popup.js +1 -1
- package/cdn/components/profile-button/profile-button.js +8 -8
- package/cdn/components/progress-bar/progress-bar.d.ts +1 -1
- package/cdn/components/progress-bar/progress-bar.js +2 -2
- package/cdn/components/progress-ring/progress-ring.d.ts +2 -2
- package/cdn/components/progress-ring/progress-ring.js +1 -1
- package/cdn/components/quote/quote.js +3 -3
- package/cdn/components/radio/radio.d.ts +6 -5
- package/cdn/components/radio/radio.js +7 -5
- package/cdn/components/radio/radio.styles.js +1 -1
- package/cdn/components/radio-button/radio-button.d.ts +1 -1
- package/cdn/components/radio-button/radio-button.js +9 -10
- package/cdn/components/radio-card/radio-card.d.ts +24 -0
- package/cdn/components/radio-card/radio-card.js +39 -0
- package/cdn/components/radio-group/radio-group.d.ts +3 -3
- package/cdn/components/radio-group/radio-group.js +6 -8
- package/cdn/components/radio-group/radio-group.styles.js +2 -2
- package/cdn/components/relative-time/relative-time.js +2 -2
- package/cdn/components/select/select.js +10 -10
- package/cdn/components/select/select.styles.js +2 -2
- package/cdn/components/skip-links/skip-links.js +2 -2
- package/cdn/components/spinner/spinner.js +2 -2
- package/cdn/components/split-panel/split-panel.js +5 -5
- package/cdn/components/step/step.js +5 -5
- package/cdn/components/switch/switch.d.ts +84 -0
- package/cdn/components/switch/switch.js +30 -0
- package/cdn/components/switch/switch.styles.d.ts +2 -0
- package/cdn/components/switch/switch.styles.js +9 -0
- package/cdn/components/tab/tab.js +5 -5
- package/cdn/components/tab-group/tab-group.js +5 -5
- package/cdn/components/table-action/table-action.js +2 -2
- package/cdn/components/table-body/table-body.js +1 -1
- package/cdn/components/table-caption/table-caption.js +2 -2
- package/cdn/components/table-header-cell/table-header-cell.js +3 -3
- package/cdn/components/table-header-row/table-header-row.js +14 -13
- package/cdn/components/table-of-contents/table-of-contents.js +2 -2
- package/cdn/components/table-row/table-row.js +12 -11
- package/cdn/components/tag/tag.js +5 -5
- package/cdn/components/textarea/textarea.js +7 -7
- package/cdn/components/textarea/textarea.styles.js +2 -2
- package/cdn/components/tooltip/tooltip.js +3 -3
- package/cdn/components/tree/tree.js +15 -13
- package/cdn/components/tree-item/tree-item.js +14 -12
- package/cdn/custom-elements.json +4420 -2982
- package/cdn/design-system.d.ts +6 -2
- package/cdn/design-system.js +343 -166
- package/cdn/internal/components/checkbox-box/checkbox-box.d.ts +27 -0
- package/cdn/internal/components/checkbox-box/checkbox-box.js +94 -0
- package/cdn/internal/components/checkbox-box/checkbox-box.styles.d.ts +2 -0
- package/cdn/internal/components/checkbox-box/checkbox-box.styles.js +98 -0
- package/cdn/internal/components/date-field/date-field.d.ts +1 -0
- package/cdn/internal/components/date-field/date-field.js +38 -21
- package/cdn/internal/components/form-control/form-control-layout.d.ts +1 -1
- package/cdn/internal/components/form-control/form-control-layout.js +4 -3
- package/cdn/internal/components/form-selectable-card/form-selectable-card-stories.d.ts +2 -0
- package/cdn/internal/components/form-selectable-card/form-selectable-card-stories.js +77 -0
- package/cdn/internal/components/form-selectable-card/form-selectable-card.d.ts +38 -0
- package/cdn/internal/components/form-selectable-card/form-selectable-card.js +182 -0
- package/cdn/internal/components/form-selectable-card/form-selectable-card.styles.d.ts +2 -0
- package/cdn/internal/components/form-selectable-card/form-selectable-card.styles.js +141 -0
- package/cdn/internal/components/form-toggle-button/form-toggle-button.d.ts +5 -1
- package/cdn/internal/components/form-toggle-button/form-toggle-button.js +29 -9
- package/cdn/internal/components/form-toggle-button/form-toggle-button.styles.js +7 -0
- package/cdn/internal/components/radio-icon/radio-icon.d.ts +22 -0
- package/cdn/internal/components/radio-icon/radio-icon.js +66 -0
- package/cdn/internal/components/radio-icon/radio-icon.styles.d.ts +2 -0
- package/cdn/internal/components/radio-icon/radio-icon.styles.js +95 -0
- package/cdn/styles/form-control.styles.js +17 -1
- package/cdn/themes/dsa-wc-theme.css +160 -5
- package/cdn/themes/dsa-wc-theme.min.css +1 -1
- package/cdn/themes/dsa-wc-theme.styles.js +164 -5
- package/cdn/translations/en-gb.js +1 -1
- package/cdn/translations/en.js +1 -1
- package/cdn/translations/fr.js +1 -1
- package/cdn/utilities/date.js +1 -1
- package/cdn/utilities/icon-library.js +2 -2
- package/cdn/utilities/localize.d.ts +6 -0
- package/cdn/utilities/localize.js +1 -1
- package/cdn/vscode.html-custom-data.json +190 -35
- package/cdn/web-types.json +1048 -221
- package/dist/chunks/chunk.2BZBH3CX.js +158 -0
- package/dist/chunks/{chunk.JCL6HX6O.js → chunk.2GRTPJX3.js} +1 -1
- package/dist/chunks/{chunk.I2PWWNDZ.js → chunk.2KECVLQH.js} +3 -3
- package/dist/chunks/{chunk.CPCLGC5J.js → chunk.2O3M7HBZ.js} +1 -1
- package/dist/chunks/{chunk.XJMGXWLM.js → chunk.2W6FOXSH.js} +45 -36
- package/dist/chunks/{chunk.ZCWLSBSD.js → chunk.2YE5HPSL.js} +5 -4
- package/dist/chunks/{chunk.EQZ4YFRU.js → chunk.3B3226HJ.js} +1 -1
- package/dist/chunks/{chunk.RWGL6D5U.js → chunk.3EAWXV27.js} +1 -1
- package/dist/chunks/{chunk.UEWG3G4R.js → chunk.3HX6HRHC.js} +9 -2
- package/dist/chunks/{chunk.LTCZARVI.js → chunk.3JLROK74.js} +29 -20
- package/dist/chunks/{chunk.5P2EEOC5.js → chunk.3NNE7XGI.js} +2 -2
- package/dist/chunks/{chunk.FQB6S2KS.js → chunk.3SX7AERB.js} +1 -1
- package/dist/chunks/{chunk.UDJJFUZ3.js → chunk.4C3EA7WT.js} +2 -2
- package/dist/chunks/{chunk.O3AR4B4F.js → chunk.4YOAT5R7.js} +2 -2
- package/dist/chunks/{chunk.WRPRKCVY.js → chunk.52CUBOF2.js} +5 -5
- package/dist/chunks/{chunk.LGA24XY2.js → chunk.54KX7M52.js} +1 -1
- package/dist/chunks/{chunk.IZDRWFAB.js → chunk.5NUQTJJR.js} +1 -1
- package/dist/chunks/{chunk.KUYI27GJ.js → chunk.5NXRUN57.js} +84 -242
- package/dist/chunks/{chunk.BQQ2GUR6.js → chunk.6K4LF64W.js} +1 -1
- package/dist/chunks/{chunk.GGXJ2MP3.js → chunk.6KWCQDRD.js} +32 -12
- package/dist/chunks/{chunk.2EDNCADP.js → chunk.6SDBUBGE.js} +1 -0
- package/dist/chunks/{chunk.DHDRABMZ.js → chunk.6UCJKKYR.js} +2 -2
- package/dist/chunks/{chunk.IPZC55RV.js → chunk.6YEPFMKU.js} +6 -3
- package/dist/chunks/{chunk.BP4NJFKE.js → chunk.6ZJSEOLO.js} +1 -1
- package/dist/chunks/{chunk.B6LMEZTV.js → chunk.77ECBNUM.js} +1 -1
- package/dist/chunks/{chunk.UWGAOHHQ.js → chunk.7BE555XS.js} +3 -3
- package/dist/chunks/{chunk.DUTPVTUZ.js → chunk.7KMMSAQN.js} +1 -1
- package/dist/chunks/chunk.ANOLAL4B.js +90 -0
- package/dist/chunks/{chunk.CQHOJJEI.js → chunk.B2KV6DSI.js} +1 -1
- package/dist/chunks/{chunk.7DBNKQ7N.js → chunk.BALZ7HK5.js} +4 -2
- package/dist/chunks/{chunk.XD25ELCV.js → chunk.BCLTC7W4.js} +1 -1
- package/dist/chunks/{chunk.WQYBYKZ2.js → chunk.BNREFNJW.js} +4 -3
- package/dist/chunks/{chunk.P45DWAWT.js → chunk.CAYHSQZJ.js} +1 -1
- package/dist/chunks/{chunk.2XRDIFUO.js → chunk.CEGU6OTH.js} +1 -1
- package/dist/chunks/{chunk.QRCGXHRO.js → chunk.CQR34TNY.js} +1 -0
- package/dist/chunks/{chunk.VNFFOE7Z.js → chunk.CWDSCTUA.js} +1 -1
- package/dist/chunks/{chunk.6ZAEF56K.js → chunk.DB3EDROT.js} +1 -1
- package/dist/chunks/{chunk.RZT42FVN.js → chunk.DIM7WDHO.js} +1 -1
- package/dist/chunks/{chunk.W7TI3W77.js → chunk.DLE3F4GC.js} +1 -1
- package/dist/chunks/chunk.E45DVVIM.js +271 -0
- package/dist/chunks/{chunk.LB54GRRB.js → chunk.EAYW5L6J.js} +2 -2
- package/dist/chunks/{chunk.QDKQMUIQ.js → chunk.EIZK62ST.js} +17 -1
- package/dist/chunks/{chunk.T6UX2FVU.js → chunk.EK7OT2VJ.js} +4 -4
- package/dist/chunks/{chunk.FKXOTDTY.js → chunk.ERN34WYC.js} +5 -5
- package/dist/chunks/{chunk.3TJPAISV.js → chunk.FC2HFFUI.js} +1 -1
- package/dist/chunks/chunk.FK5HR2F4.js +100 -0
- package/dist/chunks/{chunk.XRZGSSHY.js → chunk.FWVIQUG4.js} +1 -1
- package/dist/chunks/{chunk.BDO6TPPP.js → chunk.G6JRMCFB.js} +32 -32
- package/dist/chunks/{chunk.DDDHV2NU.js → chunk.GZO5TQGU.js} +4 -3
- package/dist/chunks/{chunk.NHXG2KMS.js → chunk.HAYCQF2N.js} +1 -1
- package/dist/chunks/{chunk.3XIJ443Y.js → chunk.HEOHHRVV.js} +1 -13
- package/{cdn/chunks/chunk.3TUFAITJ.js → dist/chunks/chunk.HJU52GCK.js} +1 -1
- package/dist/chunks/{chunk.PUYBBM4K.js → chunk.HTBAICPA.js} +1 -1
- package/dist/chunks/{chunk.L2EOSD7N.js → chunk.IHTWK22H.js} +1 -3
- package/dist/chunks/{chunk.IPUOJRFA.js → chunk.IIYPN5OC.js} +1 -1
- package/dist/chunks/chunk.IONY2GZF.js +72 -0
- package/dist/chunks/chunk.ITAWMEY7.js +42 -0
- package/dist/chunks/{chunk.SYVX56PU.js → chunk.ITUK4PON.js} +1 -1
- package/dist/chunks/{chunk.2JIPPL3I.js → chunk.JEZOETYM.js} +27 -6
- package/dist/chunks/{chunk.WELYJWNG.js → chunk.JNZTWND7.js} +6 -1
- package/dist/chunks/{chunk.VBW5RZBM.js → chunk.K3HEMTRQ.js} +1 -1
- package/dist/chunks/{chunk.2VH3OZ2T.js → chunk.K53YJ3XK.js} +1 -1
- package/dist/chunks/{chunk.2VBJKC24.js → chunk.KFUZ6JMQ.js} +1 -1
- package/dist/chunks/chunk.KGZLC7FO.js +91 -0
- package/dist/chunks/chunk.KQJQQDCQ.js +664 -0
- package/dist/chunks/{chunk.IF24VKLH.js → chunk.L66AKAXM.js} +1 -1
- package/dist/chunks/{chunk.VT3IWNRD.js → chunk.LE5LHO5Y.js} +1 -1
- package/dist/chunks/{chunk.I5HR7JYK.js → chunk.LGDM46D4.js} +3 -3
- package/dist/chunks/{chunk.MJKJSMQX.js → chunk.LGVJZXUH.js} +9 -12
- package/dist/chunks/{chunk.47JHZBMB.js → chunk.M5QF4L4W.js} +1 -1
- package/dist/chunks/{chunk.WUOMKASN.js → chunk.MAENDYI7.js} +43 -53
- package/dist/chunks/{chunk.3OHVWJYG.js → chunk.NF5ELBI4.js} +2 -2
- package/dist/chunks/{chunk.L3LZ4MKX.js → chunk.NHPMJYPM.js} +6 -3
- package/dist/chunks/{chunk.3Z33EVFU.js → chunk.NPCMEZGE.js} +1 -1
- package/dist/chunks/chunk.NVQTI6CK.js +44 -0
- package/dist/chunks/chunk.ODXKNTKC.js +21 -0
- package/dist/chunks/{chunk.IZACKXPC.js → chunk.P3CATWXI.js} +1 -1
- package/dist/chunks/{chunk.AVHERTGT.js → chunk.PTFOYYGJ.js} +1 -1
- package/dist/chunks/chunk.PWVYG6XN.js +181 -0
- package/dist/chunks/{chunk.KN6RQWYN.js → chunk.QBHSEMUU.js} +10 -5
- package/dist/chunks/{chunk.JIWB4B3J.js → chunk.RCN745RS.js} +2 -2
- package/dist/chunks/{chunk.XPSUKRU5.js → chunk.SP5JKDHH.js} +1 -3
- package/dist/chunks/{chunk.ZSBVQKVM.js → chunk.SWP3OZUN.js} +1 -1
- package/dist/chunks/{chunk.KLKJ2LRK.js → chunk.T2OLM5TG.js} +1 -1
- package/dist/chunks/{chunk.Y52TCF24.js → chunk.THO67JP2.js} +3 -3
- package/dist/chunks/chunk.TZFYJ4KJ.js +311 -0
- package/dist/chunks/{chunk.QLA2JXR7.js → chunk.U7ZMMMJ3.js} +12 -0
- package/dist/chunks/{chunk.UNO3SMWX.js → chunk.UG7D663E.js} +1 -1
- package/dist/chunks/{chunk.H3FSR35C.js → chunk.UJAK75R6.js} +77 -36
- package/dist/chunks/{chunk.EP7LLKJN.js → chunk.V75T6QXR.js} +1 -1
- package/dist/chunks/chunk.VKIBAACD.js +226 -0
- package/dist/chunks/{chunk.FQMS24GI.js → chunk.WB2DWTAB.js} +1 -1
- package/dist/chunks/{chunk.F6UPK2KI.js → chunk.WIVRYVXD.js} +1 -1
- package/dist/chunks/{chunk.5DXVFMIN.js → chunk.WOJO2VFN.js} +1 -1
- package/dist/chunks/{chunk.6QAB5TYJ.js → chunk.WPIYFGT2.js} +1 -1
- package/dist/chunks/{chunk.ECZMLO4V.js → chunk.X6UZBREW.js} +1 -1
- package/dist/chunks/{chunk.6JHM36KH.js → chunk.XE37RME4.js} +40 -28
- package/dist/chunks/{chunk.LSZ7ATDZ.js → chunk.XMPGIWRA.js} +1 -1
- package/dist/chunks/{chunk.AH74EN4A.js → chunk.YOMZYBQL.js} +1 -1
- package/dist/chunks/{chunk.KFRR2I2P.js → chunk.YVOXMJ6Q.js} +1 -1
- package/dist/chunks/{chunk.Z7DBDDCZ.js → chunk.YZTXGQRN.js} +19 -12
- package/dist/components/accordion/accordion.js +5 -5
- package/dist/components/alert/alert.js +5 -5
- package/dist/components/avatar/avatar.js +4 -4
- package/dist/components/breadcrumb/breadcrumb.js +5 -5
- package/dist/components/breadcrumb-item/breadcrumb-item.js +2 -2
- package/dist/components/button/button.d.ts +1 -1
- package/dist/components/button/button.js +7 -7
- package/dist/components/button/button.styles.js +1 -1
- package/dist/components/calendar/calendar.js +3 -3
- package/dist/components/callout/callout.js +3 -3
- package/dist/components/checkbox/checkbox.d.ts +6 -3
- package/dist/components/checkbox/checkbox.js +10 -9
- package/dist/components/checkbox/checkbox.styles.js +2 -2
- package/dist/components/checkbox-button/checkbox-button.js +17 -6
- package/dist/components/checkbox-card/checkbox-card.d.ts +25 -0
- package/dist/components/checkbox-card/checkbox-card.js +21 -0
- package/dist/components/checkbox-group/checkbox-group.d.ts +5 -3
- package/dist/components/checkbox-group/checkbox-group.js +6 -6
- package/dist/components/checkbox-group/checkbox-group.styles.js +2 -2
- package/dist/components/combobox/combobox.js +10 -10
- package/dist/components/combobox/combobox.styles.js +2 -2
- package/dist/components/dialog/dialog.d.ts +11 -5
- package/dist/components/dialog/dialog.js +6 -6
- package/dist/components/dialog/dialog.styles.js +1 -1
- package/dist/components/download-card/download-card.js +3 -3
- package/dist/components/download-link/download-link.js +3 -3
- package/dist/components/drawer/drawer.js +5 -5
- package/dist/components/dropdown/dropdown.js +2 -2
- package/dist/components/error-message-panel/error-message-panel.js +2 -2
- package/dist/components/error-text/error-text.js +3 -3
- package/dist/components/file-upload/file-upload.js +7 -7
- package/dist/components/file-upload/file-upload.styles.js +2 -2
- package/dist/components/file-upload-item/file-upload-item.js +4 -4
- package/dist/components/filter-base/filter-base.js +6 -6
- package/dist/components/filter-button/filter-button.js +5 -5
- package/dist/components/filter-counter/filter-counter.js +25 -19
- package/dist/components/filter-date/filter-date.js +10 -10
- package/dist/components/filter-range/filter-range.js +26 -20
- package/dist/components/filter-select/filter-select.js +25 -22
- package/dist/components/footer/footer.js +3 -3
- package/dist/components/footer/footer.styles.js +1 -1
- package/dist/components/format-bytes/format-bytes.js +2 -2
- package/dist/components/format-date/format-date.js +2 -2
- package/dist/components/format-number/format-number.js +2 -2
- package/dist/components/header/header.js +3 -3
- package/dist/components/header/header.styles.js +1 -1
- package/dist/components/header-search/header-search.js +8 -8
- package/dist/components/icon/icon.js +3 -3
- package/dist/components/icon/library.js +2 -2
- package/dist/components/icon/library.system.js +1 -1
- package/dist/components/icon-button/icon-button.js +3 -3
- package/dist/components/input/input.d.ts +3 -7
- package/dist/components/input/input.js +19 -13
- package/dist/components/input/input.styles.js +2 -2
- package/dist/components/input-date/input-date.d.ts +7 -2
- package/dist/components/input-date/input-date.js +12 -12
- package/dist/components/input-date/input-date.styles.js +3 -3
- package/dist/components/input-mask/input-mask.js +8 -8
- package/dist/components/input-mask/input-mask.styles.js +2 -2
- package/dist/components/input-otp/input-otp.js +7 -7
- package/dist/components/input-otp/input-otp.styles.js +2 -2
- package/dist/components/input-phone/input-phone.js +13 -13
- package/dist/components/input-phone/input-phone.styles.js +2 -2
- package/dist/components/input-time/input-time.d.ts +121 -0
- package/dist/components/input-time/input-time.js +42 -0
- package/dist/components/input-time/input-time.styles.d.ts +2 -0
- package/dist/components/input-time/input-time.styles.js +10 -0
- package/dist/components/input-time/input-time.utils.d.ts +17 -0
- package/dist/components/input-time/input-time.utils.js +13 -0
- package/dist/components/menu-accordion/menu-accordion.js +5 -5
- package/dist/components/menu-item/menu-item.js +4 -4
- package/dist/components/navbar-link/navbar-link.js +4 -4
- package/dist/components/navbar-menu/navbar-menu.js +5 -5
- package/dist/components/option/option.js +5 -5
- package/dist/components/pagination/pagination.js +23 -19
- package/dist/components/pagination-button/pagination-button.js +3 -3
- package/dist/components/pagination-button/pagination-button.styles.js +2 -2
- package/dist/components/profile-button/profile-button.js +7 -7
- package/dist/components/progress-bar/progress-bar.d.ts +1 -1
- package/dist/components/progress-bar/progress-bar.js +2 -2
- package/dist/components/progress-ring/progress-ring.d.ts +2 -2
- package/dist/components/progress-ring/progress-ring.js +1 -1
- package/dist/components/quote/quote.js +3 -3
- package/dist/components/radio/radio.d.ts +6 -5
- package/dist/components/radio/radio.js +6 -5
- package/dist/components/radio/radio.styles.js +1 -1
- package/dist/components/radio-button/radio-button.d.ts +1 -1
- package/dist/components/radio-button/radio-button.js +9 -10
- package/dist/components/radio-card/radio-card.d.ts +24 -0
- package/dist/components/radio-card/radio-card.js +33 -0
- package/dist/components/radio-group/radio-group.d.ts +3 -3
- package/dist/components/radio-group/radio-group.js +6 -7
- package/dist/components/radio-group/radio-group.styles.js +2 -2
- package/dist/components/relative-time/relative-time.js +2 -2
- package/dist/components/select/select.js +9 -9
- package/dist/components/select/select.styles.js +2 -2
- package/dist/components/skip-links/skip-links.js +2 -2
- package/dist/components/spinner/spinner.js +2 -2
- package/dist/components/split-panel/split-panel.js +5 -5
- package/dist/components/step/step.js +5 -5
- package/dist/components/switch/switch.d.ts +84 -0
- package/dist/components/switch/switch.js +23 -0
- package/dist/components/switch/switch.styles.d.ts +2 -0
- package/dist/components/switch/switch.styles.js +7 -0
- package/dist/components/tab/tab.js +5 -5
- package/dist/components/tab-group/tab-group.js +5 -5
- package/dist/components/table-action/table-action.js +2 -2
- package/dist/components/table-body/table-body.js +1 -1
- package/dist/components/table-caption/table-caption.js +2 -2
- package/dist/components/table-header-cell/table-header-cell.js +3 -3
- package/dist/components/table-header-row/table-header-row.js +14 -13
- package/dist/components/table-of-contents/table-of-contents.js +2 -2
- package/dist/components/table-row/table-row.js +12 -11
- package/dist/components/tag/tag.js +5 -5
- package/dist/components/textarea/textarea.js +7 -7
- package/dist/components/textarea/textarea.styles.js +2 -2
- package/dist/components/tooltip/tooltip.js +2 -2
- package/dist/components/tree/tree.js +14 -13
- package/dist/components/tree-item/tree-item.js +13 -12
- package/dist/custom-elements.json +4420 -2982
- package/dist/design-system.d.ts +6 -2
- package/dist/design-system.js +334 -161
- package/dist/internal/components/checkbox-box/checkbox-box.d.ts +27 -0
- package/dist/internal/components/checkbox-box/checkbox-box.js +94 -0
- package/dist/internal/components/checkbox-box/checkbox-box.styles.d.ts +2 -0
- package/dist/internal/components/checkbox-box/checkbox-box.styles.js +98 -0
- package/dist/internal/components/date-field/date-field.d.ts +1 -0
- package/dist/internal/components/date-field/date-field.js +38 -21
- package/dist/internal/components/form-control/form-control-layout.d.ts +1 -1
- package/dist/internal/components/form-control/form-control-layout.js +4 -3
- package/dist/internal/components/form-selectable-card/form-selectable-card-stories.d.ts +2 -0
- package/dist/internal/components/form-selectable-card/form-selectable-card-stories.js +77 -0
- package/dist/internal/components/form-selectable-card/form-selectable-card.d.ts +38 -0
- package/dist/internal/components/form-selectable-card/form-selectable-card.js +182 -0
- package/dist/internal/components/form-selectable-card/form-selectable-card.styles.d.ts +2 -0
- package/dist/internal/components/form-selectable-card/form-selectable-card.styles.js +141 -0
- package/dist/internal/components/form-toggle-button/form-toggle-button.d.ts +5 -1
- package/dist/internal/components/form-toggle-button/form-toggle-button.js +29 -9
- package/dist/internal/components/form-toggle-button/form-toggle-button.styles.js +7 -0
- package/dist/internal/components/radio-icon/radio-icon.d.ts +22 -0
- package/dist/internal/components/radio-icon/radio-icon.js +66 -0
- package/dist/internal/components/radio-icon/radio-icon.styles.d.ts +2 -0
- package/dist/internal/components/radio-icon/radio-icon.styles.js +95 -0
- package/dist/styles/form-control.styles.js +17 -1
- package/dist/themes/dsa-wc-theme.css +160 -5
- package/dist/themes/dsa-wc-theme.min.css +1 -1
- package/dist/themes/dsa-wc-theme.styles.js +164 -5
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/utilities/date.js +1 -1
- package/dist/utilities/icon-library.js +2 -2
- package/dist/utilities/localize.d.ts +6 -0
- package/dist/utilities/localize.js +1 -1
- package/dist/vscode.html-custom-data.json +190 -35
- package/dist/web-types.json +1048 -221
- package/package.json +26 -26
- package/cdn/chunks/chunk.5LXQ3RKQ.js +0 -41
- package/cdn/chunks/chunk.N3WADQAB.js +0 -157
- package/cdn/chunks/chunk.ZIPOQO6F.js +0 -188
- package/dist/chunks/chunk.35CKPBLE.js +0 -155
- package/dist/chunks/chunk.6HR34L7E.js +0 -39
- package/dist/chunks/chunk.GDOUDNZH.js +0 -186
|
@@ -0,0 +1,664 @@
|
|
|
1
|
+
import {
|
|
2
|
+
compareTimeStrings,
|
|
3
|
+
setTimeStringValue,
|
|
4
|
+
timeStringToObject
|
|
5
|
+
} from "./chunk.IONY2GZF.js";
|
|
6
|
+
import {
|
|
7
|
+
input_time_styles_default
|
|
8
|
+
} from "./chunk.KGZLC7FO.js";
|
|
9
|
+
import {
|
|
10
|
+
FormControlLayout
|
|
11
|
+
} from "./chunk.LGDM46D4.js";
|
|
12
|
+
import {
|
|
13
|
+
scrollIntoView
|
|
14
|
+
} from "./chunk.EMIT7S33.js";
|
|
15
|
+
import {
|
|
16
|
+
defaultValue
|
|
17
|
+
} from "./chunk.CMJ2SRTL.js";
|
|
18
|
+
import {
|
|
19
|
+
FormControlController
|
|
20
|
+
} from "./chunk.JA7YFGLI.js";
|
|
21
|
+
import {
|
|
22
|
+
waitForEvent
|
|
23
|
+
} from "./chunk.B4BZKR24.js";
|
|
24
|
+
import {
|
|
25
|
+
animateTo,
|
|
26
|
+
stopAnimations
|
|
27
|
+
} from "./chunk.SWIGWQYF.js";
|
|
28
|
+
import {
|
|
29
|
+
getAnimation,
|
|
30
|
+
setDefaultAnimation
|
|
31
|
+
} from "./chunk.HGR7A5FK.js";
|
|
32
|
+
import {
|
|
33
|
+
LocalizeController
|
|
34
|
+
} from "./chunk.U7ZMMMJ3.js";
|
|
35
|
+
import {
|
|
36
|
+
watch
|
|
37
|
+
} from "./chunk.NOMN6DGD.js";
|
|
38
|
+
import {
|
|
39
|
+
ifDefinedAndNotEmpty
|
|
40
|
+
} from "./chunk.ZQJVCRB2.js";
|
|
41
|
+
import {
|
|
42
|
+
__decorateClass
|
|
43
|
+
} from "./chunk.S3NI7NKU.js";
|
|
44
|
+
|
|
45
|
+
// src/components/input-time/input-time.ts
|
|
46
|
+
import { html } from "lit";
|
|
47
|
+
import { customElement, property, query, state } from "lit/decorators.js";
|
|
48
|
+
import { classMap } from "lit/directives/class-map.js";
|
|
49
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
50
|
+
import { live } from "lit/directives/live.js";
|
|
51
|
+
var DSAInputTime = class extends FormControlLayout {
|
|
52
|
+
constructor() {
|
|
53
|
+
super(...arguments);
|
|
54
|
+
this.formControlController = new FormControlController(this, {
|
|
55
|
+
assumeInteractionOn: ["dsa-blur", "dsa-input"]
|
|
56
|
+
});
|
|
57
|
+
this.localize = new LocalizeController(this);
|
|
58
|
+
this.isTimePickerOpen = false;
|
|
59
|
+
this.hasFocus = false;
|
|
60
|
+
this.value = "";
|
|
61
|
+
this.defaultValue = "";
|
|
62
|
+
this.clearable = false;
|
|
63
|
+
this.min = "00:00";
|
|
64
|
+
this.max = "23:59";
|
|
65
|
+
}
|
|
66
|
+
/** Gets the validity state object */
|
|
67
|
+
get validity() {
|
|
68
|
+
return this.nativeInput.validity;
|
|
69
|
+
}
|
|
70
|
+
/** Gets the validation message */
|
|
71
|
+
get validationMessage() {
|
|
72
|
+
return this.nativeInput.validationMessage;
|
|
73
|
+
}
|
|
74
|
+
connectedCallback() {
|
|
75
|
+
super.connectedCallback();
|
|
76
|
+
this.handleDocumentFocusIn = this.handleDocumentFocusIn.bind(this);
|
|
77
|
+
this.handleDocumentKeyDown = this.handleDocumentKeyDown.bind(this);
|
|
78
|
+
this.handleDocumentMouseDown = this.handleDocumentMouseDown.bind(this);
|
|
79
|
+
}
|
|
80
|
+
async firstUpdated() {
|
|
81
|
+
await this.updateComplete;
|
|
82
|
+
this.formControlController.updateValidity();
|
|
83
|
+
}
|
|
84
|
+
//Adds opened dropdown event listeners
|
|
85
|
+
addOpenListeners() {
|
|
86
|
+
document.addEventListener("focusin", this.handleDocumentFocusIn);
|
|
87
|
+
document.addEventListener("keydown", this.handleDocumentKeyDown);
|
|
88
|
+
document.addEventListener("mousedown", this.handleDocumentMouseDown);
|
|
89
|
+
}
|
|
90
|
+
//Removes opened dropdown event listeners
|
|
91
|
+
removeOpenListeners() {
|
|
92
|
+
document.removeEventListener("focusin", this.handleDocumentFocusIn);
|
|
93
|
+
document.removeEventListener("keydown", this.handleDocumentKeyDown);
|
|
94
|
+
document.removeEventListener("mousedown", this.handleDocumentMouseDown);
|
|
95
|
+
}
|
|
96
|
+
handleDocumentFocusIn(event) {
|
|
97
|
+
const path = event.composedPath();
|
|
98
|
+
if (this && !path.includes(this)) {
|
|
99
|
+
this.hideTimePicker();
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
handleDocumentMouseDown(event) {
|
|
103
|
+
const path = event.composedPath();
|
|
104
|
+
if (this && !path.includes(this)) {
|
|
105
|
+
this.hideTimePicker();
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
handleDocumentKeyDown(event) {
|
|
109
|
+
event.stopPropagation();
|
|
110
|
+
if (this.isTimePickerOpen && event.key === "Escape") {
|
|
111
|
+
event.preventDefault();
|
|
112
|
+
this.hideTimePicker();
|
|
113
|
+
}
|
|
114
|
+
if (this.isTimePickerOpen && event.key === "Tab") {
|
|
115
|
+
setTimeout(() => {
|
|
116
|
+
var _a, _b;
|
|
117
|
+
const activeElement = (this == null ? void 0 : this.getRootNode()) instanceof ShadowRoot ? (_b = (_a = document.activeElement) == null ? void 0 : _a.shadowRoot) == null ? void 0 : _b.activeElement : document.activeElement;
|
|
118
|
+
if (!this || (activeElement == null ? void 0 : activeElement.closest(this.tagName.toLowerCase())) !== this) {
|
|
119
|
+
this.hideTimePicker();
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
const path = event.composedPath();
|
|
124
|
+
const isTimePickerButton = path.some((el) => el === this.timePickerButton);
|
|
125
|
+
if (isTimePickerButton && (event.key === "Enter" || event.key === " ")) {
|
|
126
|
+
event.preventDefault();
|
|
127
|
+
this.toggleTimePicker();
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
handleInputBlur() {
|
|
131
|
+
this.hasFocus = false;
|
|
132
|
+
this.emit("dsa-blur");
|
|
133
|
+
}
|
|
134
|
+
handleInputChange() {
|
|
135
|
+
this.emit("dsa-change");
|
|
136
|
+
}
|
|
137
|
+
handleInputClearClick(event) {
|
|
138
|
+
this.value = "";
|
|
139
|
+
this.emit("dsa-clear");
|
|
140
|
+
this.emit("dsa-input");
|
|
141
|
+
this.emit("dsa-change");
|
|
142
|
+
this.nativeInput.focus();
|
|
143
|
+
event.stopPropagation();
|
|
144
|
+
}
|
|
145
|
+
handleInputFocus() {
|
|
146
|
+
this.hasFocus = true;
|
|
147
|
+
this.emit("dsa-focus");
|
|
148
|
+
}
|
|
149
|
+
handleInputInput() {
|
|
150
|
+
this.value = this.nativeInput.value;
|
|
151
|
+
this.formControlController.updateValidity();
|
|
152
|
+
this.emit("dsa-input");
|
|
153
|
+
}
|
|
154
|
+
handleInputInvalid(event) {
|
|
155
|
+
this.formControlController.setValidity(false);
|
|
156
|
+
this.formControlController.emitInvalidEvent(event);
|
|
157
|
+
}
|
|
158
|
+
handleInputKeyDown(event) {
|
|
159
|
+
const hasModifier = event.metaKey || event.ctrlKey || event.shiftKey || event.altKey;
|
|
160
|
+
if (event.key === "Enter" && !hasModifier) {
|
|
161
|
+
setTimeout(() => {
|
|
162
|
+
if (!event.defaultPrevented && !event.isComposing) {
|
|
163
|
+
this.formControlController.submit();
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
if (event.key === " ") {
|
|
168
|
+
event.preventDefault();
|
|
169
|
+
this.showTimePicker();
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
getDescriptionIds() {
|
|
173
|
+
const ids = [
|
|
174
|
+
"input__prefix",
|
|
175
|
+
"input__suffix",
|
|
176
|
+
...this.error ? ["error-text"] : [],
|
|
177
|
+
"selected-value",
|
|
178
|
+
"help-text"
|
|
179
|
+
];
|
|
180
|
+
return ids.join(" ");
|
|
181
|
+
}
|
|
182
|
+
handleDisabledChange() {
|
|
183
|
+
this.formControlController.setValidity(this.disabled);
|
|
184
|
+
}
|
|
185
|
+
handleStepChange() {
|
|
186
|
+
this.nativeInput.step = String(this.step);
|
|
187
|
+
this.formControlController.updateValidity();
|
|
188
|
+
}
|
|
189
|
+
async handleValueChange() {
|
|
190
|
+
await this.updateComplete;
|
|
191
|
+
this.formControlController.updateValidity();
|
|
192
|
+
if (this.isTimePickerOpen) {
|
|
193
|
+
this.scrollSelectedTimeUnitsIntoView();
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
async handleOpenChange() {
|
|
197
|
+
var _a, _b;
|
|
198
|
+
if (this.isTimePickerOpen) {
|
|
199
|
+
this.emit("dsa-show");
|
|
200
|
+
this.addOpenListeners();
|
|
201
|
+
await stopAnimations(this);
|
|
202
|
+
this.popup.active = true;
|
|
203
|
+
this.timePickerButton.button.setAttribute("aria-expanded", "true");
|
|
204
|
+
const { keyframes, options } = getAnimation(this, "time-popup.show", {
|
|
205
|
+
dir: this.localize.dir()
|
|
206
|
+
});
|
|
207
|
+
await animateTo(this.popup.popup, keyframes, options);
|
|
208
|
+
this.emit("dsa-after-show");
|
|
209
|
+
this.scrollSelectedTimeUnitsIntoView();
|
|
210
|
+
(_b = (_a = this.popup.querySelector('[aria-selected="true"]')) != null ? _a : this.popup.querySelector("li")) == null ? void 0 : _b.focus();
|
|
211
|
+
} else {
|
|
212
|
+
this.emit("dsa-hide");
|
|
213
|
+
this.removeOpenListeners();
|
|
214
|
+
await stopAnimations(this);
|
|
215
|
+
this.popup.active = false;
|
|
216
|
+
this.timePickerButton.button.setAttribute("aria-expanded", "false");
|
|
217
|
+
const { keyframes, options } = getAnimation(this, "time-popup.hide", {
|
|
218
|
+
dir: this.localize.dir()
|
|
219
|
+
});
|
|
220
|
+
await animateTo(this.popup.popup, keyframes, options);
|
|
221
|
+
this.timePickerButton.focus({ preventScroll: true });
|
|
222
|
+
this.emit("dsa-after-hide");
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
/** Sets focus on the input. */
|
|
226
|
+
focus(options) {
|
|
227
|
+
this.nativeInput.focus(options);
|
|
228
|
+
}
|
|
229
|
+
/** Removes focus from the input. */
|
|
230
|
+
blur() {
|
|
231
|
+
this.nativeInput.blur();
|
|
232
|
+
}
|
|
233
|
+
/** Selects all the text in the input. */
|
|
234
|
+
select() {
|
|
235
|
+
if (this.nativeInput instanceof HTMLInputElement) {
|
|
236
|
+
this.nativeInput.select();
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
/** Shows or hides the time picker */
|
|
240
|
+
toggleTimePicker() {
|
|
241
|
+
if (!this.isTimePickerOpen) {
|
|
242
|
+
this.showTimePicker();
|
|
243
|
+
} else {
|
|
244
|
+
this.hideTimePicker();
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
/** Displays the time picker for an input element. */
|
|
248
|
+
async showTimePicker() {
|
|
249
|
+
if (this.value === "" || compareTimeStrings(this.value, this.min) === -1) {
|
|
250
|
+
this.value = this.min;
|
|
251
|
+
} else if (compareTimeStrings(this.value, this.max) === 1) {
|
|
252
|
+
this.value = this.max;
|
|
253
|
+
}
|
|
254
|
+
this.isTimePickerOpen = true;
|
|
255
|
+
return await waitForEvent(this, "dsa-after-show");
|
|
256
|
+
}
|
|
257
|
+
/** Hides the time picker */
|
|
258
|
+
async hideTimePicker() {
|
|
259
|
+
if (!this.isTimePickerOpen) {
|
|
260
|
+
return void 0;
|
|
261
|
+
}
|
|
262
|
+
this.isTimePickerOpen = false;
|
|
263
|
+
return await waitForEvent(this, "dsa-after-hide");
|
|
264
|
+
}
|
|
265
|
+
/** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */
|
|
266
|
+
checkValidity() {
|
|
267
|
+
return this.nativeInput.checkValidity();
|
|
268
|
+
}
|
|
269
|
+
/** Gets the associated form, if one exists. */
|
|
270
|
+
getForm() {
|
|
271
|
+
return this.formControlController.getForm();
|
|
272
|
+
}
|
|
273
|
+
/** Checks for validity and shows the browser's validation message if the control is invalid. */
|
|
274
|
+
reportValidity() {
|
|
275
|
+
return this.nativeInput.reportValidity();
|
|
276
|
+
}
|
|
277
|
+
/** Sets a custom validation message. Pass an empty string to restore validity. */
|
|
278
|
+
setCustomValidity(message) {
|
|
279
|
+
this.nativeInput.setCustomValidity(message);
|
|
280
|
+
this.formControlController.updateValidity();
|
|
281
|
+
}
|
|
282
|
+
scrollSelectedTimeUnitsIntoView() {
|
|
283
|
+
const selectedTimeUnits = this.popup.querySelectorAll(
|
|
284
|
+
'[aria-selected="true"]'
|
|
285
|
+
);
|
|
286
|
+
selectedTimeUnits.forEach((selectedTimeUnit) => {
|
|
287
|
+
scrollIntoView(
|
|
288
|
+
selectedTimeUnit,
|
|
289
|
+
selectedTimeUnit.parentElement,
|
|
290
|
+
"vertical",
|
|
291
|
+
"auto"
|
|
292
|
+
);
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
selectTimeUnit(timeUnit) {
|
|
296
|
+
const oldValue = this.value;
|
|
297
|
+
const newValue = setTimeStringValue(
|
|
298
|
+
oldValue,
|
|
299
|
+
timeUnit.dataset.timetype,
|
|
300
|
+
timeUnit.dataset.timevalue
|
|
301
|
+
);
|
|
302
|
+
this.emit("dsa-input");
|
|
303
|
+
if (compareTimeStrings(newValue, this.min) === -1) {
|
|
304
|
+
this.value = this.min;
|
|
305
|
+
this.emit("dsa-change");
|
|
306
|
+
} else if (compareTimeStrings(newValue, this.max) === 1) {
|
|
307
|
+
this.value = this.max;
|
|
308
|
+
this.emit("dsa-change");
|
|
309
|
+
} else if (this.value !== newValue) {
|
|
310
|
+
this.value = newValue;
|
|
311
|
+
this.emit("dsa-change");
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
handlePanelKeydown(event) {
|
|
315
|
+
var _a, _b, _c, _d;
|
|
316
|
+
if (["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", " "].includes(
|
|
317
|
+
event.key
|
|
318
|
+
)) {
|
|
319
|
+
event.preventDefault();
|
|
320
|
+
}
|
|
321
|
+
if (event.key === "ArrowUp") {
|
|
322
|
+
const previousSelectableTimeUnit = (_a = event.target.closest("li")) == null ? void 0 : _a.previousElementSibling;
|
|
323
|
+
if (!previousSelectableTimeUnit) return;
|
|
324
|
+
previousSelectableTimeUnit.focus();
|
|
325
|
+
this.selectTimeUnit(previousSelectableTimeUnit);
|
|
326
|
+
}
|
|
327
|
+
if (event.key === "ArrowDown") {
|
|
328
|
+
const nextSelectableTimeUnit = (_b = event.target.closest("li")) == null ? void 0 : _b.nextElementSibling;
|
|
329
|
+
if (!nextSelectableTimeUnit) return;
|
|
330
|
+
nextSelectableTimeUnit.focus();
|
|
331
|
+
this.selectTimeUnit(nextSelectableTimeUnit);
|
|
332
|
+
}
|
|
333
|
+
if (event.key === "ArrowLeft") {
|
|
334
|
+
const targetUlElement = event.target.closest("ul");
|
|
335
|
+
if (!(targetUlElement instanceof HTMLUListElement)) return;
|
|
336
|
+
const previousListElement = targetUlElement.previousElementSibling;
|
|
337
|
+
if (!(previousListElement instanceof HTMLUListElement)) return;
|
|
338
|
+
const focusableLiElement = (_c = previousListElement.querySelector(
|
|
339
|
+
'li[aria-selected="true"]'
|
|
340
|
+
)) != null ? _c : previousListElement.querySelector("li");
|
|
341
|
+
if (!focusableLiElement) return;
|
|
342
|
+
focusableLiElement.focus();
|
|
343
|
+
this.selectTimeUnit(focusableLiElement);
|
|
344
|
+
}
|
|
345
|
+
if (event.key === "ArrowRight") {
|
|
346
|
+
const targetUlElement = event.target.closest("ul");
|
|
347
|
+
if (!(targetUlElement instanceof HTMLUListElement)) return;
|
|
348
|
+
const nextListElement = targetUlElement.nextElementSibling;
|
|
349
|
+
if (!(nextListElement instanceof HTMLUListElement)) return;
|
|
350
|
+
const focusableLiElement = (_d = nextListElement.querySelector(
|
|
351
|
+
'li[aria-selected="true"]'
|
|
352
|
+
)) != null ? _d : nextListElement.querySelector("li");
|
|
353
|
+
if (!focusableLiElement) return;
|
|
354
|
+
focusableLiElement.focus();
|
|
355
|
+
this.selectTimeUnit(focusableLiElement);
|
|
356
|
+
}
|
|
357
|
+
if (event.key === "Enter") {
|
|
358
|
+
this.hideTimePicker();
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
handlePanelClick(event) {
|
|
362
|
+
const target = event.target.closest("li");
|
|
363
|
+
if (!(target == null ? void 0 : target.dataset.timetype) || !target.dataset.timevalue) {
|
|
364
|
+
return;
|
|
365
|
+
}
|
|
366
|
+
this.selectTimeUnit(target);
|
|
367
|
+
}
|
|
368
|
+
generateTimeUnitArrays() {
|
|
369
|
+
var _a;
|
|
370
|
+
const minTimeValues = timeStringToObject(this.min);
|
|
371
|
+
const maxTimeValues = timeStringToObject(this.max);
|
|
372
|
+
const timeStepValue = this.step ? this.step : 60;
|
|
373
|
+
if (!minTimeValues || !maxTimeValues) {
|
|
374
|
+
throw new Error("Invalid min or max time values");
|
|
375
|
+
}
|
|
376
|
+
const selectedTimeObject = (_a = timeStringToObject(this.value)) != null ? _a : minTimeValues;
|
|
377
|
+
const hoursStep = timeStepValue > 3600 ? Math.floor(timeStepValue / 3600) : 1;
|
|
378
|
+
const minutesStep = timeStepValue > 60 ? Math.floor(timeStepValue % 3600 / 60) : 1;
|
|
379
|
+
const secondsStep = timeStepValue % 60;
|
|
380
|
+
const displayedHours = Array.from(
|
|
381
|
+
{ length: 24 },
|
|
382
|
+
(_, index) => index
|
|
383
|
+
).filter((index) => {
|
|
384
|
+
return index >= minTimeValues.hours && index <= maxTimeValues.hours && index % hoursStep === 0;
|
|
385
|
+
});
|
|
386
|
+
const displayedMinutes = Array.from(
|
|
387
|
+
{ length: 60 },
|
|
388
|
+
(_, index) => index
|
|
389
|
+
).filter((index) => {
|
|
390
|
+
if (selectedTimeObject.hours === (minTimeValues == null ? void 0 : minTimeValues.hours)) {
|
|
391
|
+
return index >= (minTimeValues == null ? void 0 : minTimeValues.minutes) && index % minutesStep === 0;
|
|
392
|
+
}
|
|
393
|
+
if (selectedTimeObject.hours === (maxTimeValues == null ? void 0 : maxTimeValues.hours)) {
|
|
394
|
+
return index <= (maxTimeValues == null ? void 0 : maxTimeValues.minutes) && index % minutesStep === 0;
|
|
395
|
+
}
|
|
396
|
+
return timeStepValue > 60 ? index % minutesStep === 0 : true;
|
|
397
|
+
});
|
|
398
|
+
const displayedSeconds = Array.from(
|
|
399
|
+
{ length: 60 },
|
|
400
|
+
(_, index) => index
|
|
401
|
+
).filter((index) => {
|
|
402
|
+
return index % secondsStep === 0;
|
|
403
|
+
});
|
|
404
|
+
return { displayedHours, displayedMinutes, displayedSeconds };
|
|
405
|
+
}
|
|
406
|
+
generateTimeUnitList(unitType, valuesArray) {
|
|
407
|
+
var _a, _b;
|
|
408
|
+
const minTimeValues = timeStringToObject(this.min);
|
|
409
|
+
const selectedTimeObject = (_a = timeStringToObject(this.value)) != null ? _a : minTimeValues;
|
|
410
|
+
const selectedValue = (_b = selectedTimeObject[unitType]) != null ? _b : 0;
|
|
411
|
+
const getTimeTypeLabel = (unitTimeType, unitValue) => {
|
|
412
|
+
switch (unitTimeType) {
|
|
413
|
+
case "hours":
|
|
414
|
+
return this.localize.term("hours", unitValue);
|
|
415
|
+
case "minutes":
|
|
416
|
+
return this.localize.term("minutes", unitValue);
|
|
417
|
+
case "seconds":
|
|
418
|
+
return this.localize.term("seconds", unitValue);
|
|
419
|
+
case "milliseconds":
|
|
420
|
+
return this.localize.term("milliseconds", unitValue);
|
|
421
|
+
default:
|
|
422
|
+
return "";
|
|
423
|
+
}
|
|
424
|
+
};
|
|
425
|
+
if (valuesArray.length === 0) {
|
|
426
|
+
return html``;
|
|
427
|
+
}
|
|
428
|
+
return html`
|
|
429
|
+
<ul
|
|
430
|
+
id="${unitType}-list"
|
|
431
|
+
class="time-popup--unit-container"
|
|
432
|
+
role="listbox"
|
|
433
|
+
aria-label=${this.localize.term(unitType, "")}
|
|
434
|
+
tabindex="-1"
|
|
435
|
+
>
|
|
436
|
+
${valuesArray.map(
|
|
437
|
+
(value) => html`
|
|
438
|
+
<li
|
|
439
|
+
data-timetype="${unitType}"
|
|
440
|
+
data-timevalue="${value}"
|
|
441
|
+
role="option"
|
|
442
|
+
aria-selected="${selectedValue === value ? "true" : "false"}"
|
|
443
|
+
tabindex="${value === selectedValue ? 0 : -1}"
|
|
444
|
+
class=${classMap({
|
|
445
|
+
"time-popup--unit": true,
|
|
446
|
+
"time-popup--unit-selected": value === selectedValue
|
|
447
|
+
})}
|
|
448
|
+
>
|
|
449
|
+
<span aria-hidden="true"
|
|
450
|
+
>${value.toString().padStart(2, "0")}</span
|
|
451
|
+
>
|
|
452
|
+
<dsa-visually-hidden
|
|
453
|
+
>${getTimeTypeLabel(unitType, value)}</dsa-visually-hidden
|
|
454
|
+
>
|
|
455
|
+
</li>
|
|
456
|
+
`
|
|
457
|
+
)}
|
|
458
|
+
</ul>
|
|
459
|
+
`;
|
|
460
|
+
}
|
|
461
|
+
renderInput() {
|
|
462
|
+
const hasLabelSlot = this.hasSlotController.test("label");
|
|
463
|
+
const hasPrefixIcon = this.hasSlotController.test("prefix");
|
|
464
|
+
const hasSuffixIcon = this.hasSlotController.test("suffix");
|
|
465
|
+
const hasLabel = this.label ? true : !!hasLabelSlot;
|
|
466
|
+
const hasClearIcon = this.clearable && !this.disabled && !this.readonly && this.value.length > 0;
|
|
467
|
+
const hasSeconds = this.step < 60;
|
|
468
|
+
const { displayedHours, displayedMinutes, displayedSeconds } = this.generateTimeUnitArrays();
|
|
469
|
+
const hoursElement = this.generateTimeUnitList("hours", displayedHours);
|
|
470
|
+
const minutesElement = this.generateTimeUnitList(
|
|
471
|
+
"minutes",
|
|
472
|
+
displayedMinutes
|
|
473
|
+
);
|
|
474
|
+
const secondsElement = this.generateTimeUnitList(
|
|
475
|
+
"seconds",
|
|
476
|
+
displayedSeconds
|
|
477
|
+
);
|
|
478
|
+
return html`
|
|
479
|
+
<div
|
|
480
|
+
part="base"
|
|
481
|
+
class=${classMap({
|
|
482
|
+
input: true,
|
|
483
|
+
"input--time": true,
|
|
484
|
+
// Sizes
|
|
485
|
+
"input--small": this.size === "small",
|
|
486
|
+
"input--medium": this.size === "medium",
|
|
487
|
+
"input--large": this.size === "large",
|
|
488
|
+
// States
|
|
489
|
+
"input--error": this.error,
|
|
490
|
+
"input--on-layer": this.variant === "layer",
|
|
491
|
+
"input--on-base": this.variant === "base",
|
|
492
|
+
"input--disabled": this.disabled,
|
|
493
|
+
"input--readonly": this.readonly,
|
|
494
|
+
"input--focused": this.hasFocus,
|
|
495
|
+
"input--empty": !this.value,
|
|
496
|
+
"form-control--has-prefix-icon": hasPrefixIcon
|
|
497
|
+
})}
|
|
498
|
+
>
|
|
499
|
+
<slot
|
|
500
|
+
name="prefix"
|
|
501
|
+
part="prefix"
|
|
502
|
+
id="input__prefix"
|
|
503
|
+
class="input__prefix"
|
|
504
|
+
></slot>
|
|
505
|
+
|
|
506
|
+
<input
|
|
507
|
+
part="input"
|
|
508
|
+
id="input"
|
|
509
|
+
class="input__control"
|
|
510
|
+
type="time"
|
|
511
|
+
title=${ifDefinedAndNotEmpty(hasLabel ? void 0 : this.title)}
|
|
512
|
+
name=${ifDefinedAndNotEmpty(this.name)}
|
|
513
|
+
?disabled=${this.disabled}
|
|
514
|
+
?readonly=${this.readonly}
|
|
515
|
+
?required=${this.required}
|
|
516
|
+
min=${ifDefined(this.min)}
|
|
517
|
+
max=${ifDefined(this.max)}
|
|
518
|
+
step=${ifDefined(this.step)}
|
|
519
|
+
.value=${live(this.value)}
|
|
520
|
+
autocomplete=${ifDefined(this.autocomplete)}
|
|
521
|
+
?autofocus=${this.autofocus}
|
|
522
|
+
enterkeyhint=${ifDefined(this.enterkeyhint)}
|
|
523
|
+
inputmode="numeric"
|
|
524
|
+
aria-label=${ifDefinedAndNotEmpty(hasLabel ? void 0 : this.title)}
|
|
525
|
+
aria-describedby=${this.getDescriptionIds()}
|
|
526
|
+
aria-invalid=${ifDefined(this.error ? "true" : void 0)}
|
|
527
|
+
@change=${this.handleInputChange}
|
|
528
|
+
@input=${this.handleInputInput}
|
|
529
|
+
@invalid=${this.handleInputInvalid}
|
|
530
|
+
@keydown=${this.handleInputKeyDown}
|
|
531
|
+
@focus=${this.handleInputFocus}
|
|
532
|
+
@blur=${this.handleInputBlur}
|
|
533
|
+
/>
|
|
534
|
+
|
|
535
|
+
${hasSuffixIcon ? html`<slot
|
|
536
|
+
name="suffix"
|
|
537
|
+
id="input__suffix"
|
|
538
|
+
class="input__suffix"
|
|
539
|
+
></slot>` : ""}
|
|
540
|
+
${hasClearIcon ? html`
|
|
541
|
+
<dsa-icon-button
|
|
542
|
+
part="clear-button"
|
|
543
|
+
class="input__action-button"
|
|
544
|
+
name="clear"
|
|
545
|
+
label=${this.localize.term("clearEntry")}
|
|
546
|
+
@click=${this.handleInputClearClick}
|
|
547
|
+
library="system"
|
|
548
|
+
></dsa-icon-button>
|
|
549
|
+
` : ""}
|
|
550
|
+
|
|
551
|
+
<dsa-popup
|
|
552
|
+
class="time-popup"
|
|
553
|
+
part="popup"
|
|
554
|
+
placement="bottom-end"
|
|
555
|
+
distance="12"
|
|
556
|
+
strategy="absolute"
|
|
557
|
+
flip
|
|
558
|
+
shift
|
|
559
|
+
auto-size="both"
|
|
560
|
+
auto-size-padding="10"
|
|
561
|
+
>
|
|
562
|
+
<div slot="anchor" class="time-anchor">
|
|
563
|
+
<dsa-icon-button
|
|
564
|
+
part="picker-button"
|
|
565
|
+
class="input__action-button icon-button--time"
|
|
566
|
+
name="schedule"
|
|
567
|
+
label=${this.localize.term("selectATime")}
|
|
568
|
+
@click=${this.toggleTimePicker}
|
|
569
|
+
library="system"
|
|
570
|
+
size=${this.size}
|
|
571
|
+
?disabled=${this.disabled || this.readonly}
|
|
572
|
+
></dsa-icon-button>
|
|
573
|
+
</div>
|
|
574
|
+
|
|
575
|
+
<div
|
|
576
|
+
id="time-popup--panel"
|
|
577
|
+
class="time-popup--panel"
|
|
578
|
+
@keydown=${this.handlePanelKeydown}
|
|
579
|
+
@click=${this.handlePanelClick}
|
|
580
|
+
>
|
|
581
|
+
${hoursElement} ${minutesElement}
|
|
582
|
+
${hasSeconds ? secondsElement : ""}
|
|
583
|
+
</div>
|
|
584
|
+
</dsa-popup>
|
|
585
|
+
</div>
|
|
586
|
+
`;
|
|
587
|
+
}
|
|
588
|
+
};
|
|
589
|
+
DSAInputTime.styles = input_time_styles_default;
|
|
590
|
+
__decorateClass([
|
|
591
|
+
query("input")
|
|
592
|
+
], DSAInputTime.prototype, "nativeInput", 2);
|
|
593
|
+
__decorateClass([
|
|
594
|
+
query(".icon-button--time")
|
|
595
|
+
], DSAInputTime.prototype, "timePickerButton", 2);
|
|
596
|
+
__decorateClass([
|
|
597
|
+
query(".time-popup")
|
|
598
|
+
], DSAInputTime.prototype, "popup", 2);
|
|
599
|
+
__decorateClass([
|
|
600
|
+
state()
|
|
601
|
+
], DSAInputTime.prototype, "isTimePickerOpen", 2);
|
|
602
|
+
__decorateClass([
|
|
603
|
+
state()
|
|
604
|
+
], DSAInputTime.prototype, "hasFocus", 2);
|
|
605
|
+
__decorateClass([
|
|
606
|
+
property()
|
|
607
|
+
], DSAInputTime.prototype, "value", 2);
|
|
608
|
+
__decorateClass([
|
|
609
|
+
defaultValue()
|
|
610
|
+
], DSAInputTime.prototype, "defaultValue", 2);
|
|
611
|
+
__decorateClass([
|
|
612
|
+
property({ type: Boolean })
|
|
613
|
+
], DSAInputTime.prototype, "clearable", 2);
|
|
614
|
+
__decorateClass([
|
|
615
|
+
property()
|
|
616
|
+
], DSAInputTime.prototype, "min", 2);
|
|
617
|
+
__decorateClass([
|
|
618
|
+
property()
|
|
619
|
+
], DSAInputTime.prototype, "max", 2);
|
|
620
|
+
__decorateClass([
|
|
621
|
+
property()
|
|
622
|
+
], DSAInputTime.prototype, "step", 2);
|
|
623
|
+
__decorateClass([
|
|
624
|
+
property()
|
|
625
|
+
], DSAInputTime.prototype, "autocomplete", 2);
|
|
626
|
+
__decorateClass([
|
|
627
|
+
property({ type: Boolean })
|
|
628
|
+
], DSAInputTime.prototype, "autofocus", 2);
|
|
629
|
+
__decorateClass([
|
|
630
|
+
property()
|
|
631
|
+
], DSAInputTime.prototype, "enterkeyhint", 2);
|
|
632
|
+
__decorateClass([
|
|
633
|
+
watch("disabled", { waitUntilFirstUpdate: true })
|
|
634
|
+
], DSAInputTime.prototype, "handleDisabledChange", 1);
|
|
635
|
+
__decorateClass([
|
|
636
|
+
watch("step", { waitUntilFirstUpdate: true })
|
|
637
|
+
], DSAInputTime.prototype, "handleStepChange", 1);
|
|
638
|
+
__decorateClass([
|
|
639
|
+
watch("value", { waitUntilFirstUpdate: true })
|
|
640
|
+
], DSAInputTime.prototype, "handleValueChange", 1);
|
|
641
|
+
__decorateClass([
|
|
642
|
+
watch("isTimePickerOpen", { waitUntilFirstUpdate: true })
|
|
643
|
+
], DSAInputTime.prototype, "handleOpenChange", 1);
|
|
644
|
+
DSAInputTime = __decorateClass([
|
|
645
|
+
customElement("dsa-input-time")
|
|
646
|
+
], DSAInputTime);
|
|
647
|
+
setDefaultAnimation("time-popup.show", {
|
|
648
|
+
keyframes: [
|
|
649
|
+
{ opacity: 0, scale: 0.9 },
|
|
650
|
+
{ opacity: 1, scale: 1 }
|
|
651
|
+
],
|
|
652
|
+
options: { duration: 100, easing: "ease" }
|
|
653
|
+
});
|
|
654
|
+
setDefaultAnimation("time-popup.hide", {
|
|
655
|
+
keyframes: [
|
|
656
|
+
{ opacity: 1, scale: 1 },
|
|
657
|
+
{ opacity: 0, scale: 0.9 }
|
|
658
|
+
],
|
|
659
|
+
options: { duration: 100, easing: "ease" }
|
|
660
|
+
});
|
|
661
|
+
|
|
662
|
+
export {
|
|
663
|
+
DSAInputTime
|
|
664
|
+
};
|
|
@@ -50,6 +50,8 @@ var FormControlLayout = class extends ShoelaceElement {
|
|
|
50
50
|
renderCounter() {
|
|
51
51
|
return html``;
|
|
52
52
|
}
|
|
53
|
+
handleLabelClick() {
|
|
54
|
+
}
|
|
53
55
|
render() {
|
|
54
56
|
const hasLabelSlot = this.hasSlotController.test("label");
|
|
55
57
|
const hasHelpTextSlot = this.hasSlotController.test("help-text");
|
|
@@ -79,6 +81,7 @@ var FormControlLayout = class extends ShoelaceElement {
|
|
|
79
81
|
class='form-control__label'
|
|
80
82
|
for="input"
|
|
81
83
|
aria-hidden=${ifDefined(hasLabel ? void 0 : "true")}
|
|
84
|
+
@click=${this.handleLabelClick}
|
|
82
85
|
>
|
|
83
86
|
${this.required ? html`<span class="form-control__label-required">*</span>` : ""}
|
|
84
87
|
<slot name="label">${this.label}</slot>
|
|
@@ -128,9 +131,6 @@ __decorateClass([
|
|
|
128
131
|
__decorateClass([
|
|
129
132
|
property({ type: Boolean, reflect: true })
|
|
130
133
|
], FormControlLayout.prototype, "disabled", 2);
|
|
131
|
-
__decorateClass([
|
|
132
|
-
property()
|
|
133
|
-
], FormControlLayout.prototype, "lang", 2);
|
|
134
134
|
__decorateClass([
|
|
135
135
|
property()
|
|
136
136
|
], FormControlLayout.prototype, "placeholder", 2);
|