@esri/calcite-components 5.1.0-next.3 → 5.1.0-next.30
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/dist/cdn/2I24Q6HG.js +2 -0
- package/dist/cdn/2LUMWQZY.js +2 -0
- package/dist/cdn/{QOXTJ7PA.js → 34WUOWO6.js} +1 -1
- package/dist/cdn/{6C5JMRKM.js → 3FXLCXEF.js} +1 -1
- package/dist/cdn/3LVPP52S.js +2 -0
- package/dist/cdn/3UU6PUEZ.js +2 -0
- package/dist/cdn/{RHJW4CXA.js → 46XYBXSA.js} +1 -1
- package/dist/cdn/{LCPYWUGK.js → 47ZWM6SP.js} +1 -1
- package/dist/cdn/4CGPBRFI.js +2 -0
- package/dist/cdn/{EQ4Z4LBA.js → 4RP3OGCP.js} +1 -1
- package/dist/cdn/{X6LSQXQT.js → 57CIL36H.js} +1 -1
- package/dist/cdn/{SQLDNSI6.js → 5DEP6UL7.js} +1 -1
- package/dist/cdn/5DEXYRFH.js +2 -0
- package/dist/cdn/66BQUAEF.js +2 -0
- package/dist/cdn/6742QPEE.js +2 -0
- package/dist/cdn/6FSL67XJ.js +2 -0
- package/dist/cdn/{IZBELXZC.js → 6KMNIG3H.js} +1 -1
- package/dist/cdn/{B4VMCAZI.js → 6LODJ26H.js} +1 -1
- package/dist/cdn/74EOXSPH.js +2 -0
- package/dist/cdn/7GTG7SUF.js +2 -0
- package/dist/cdn/7I5EKIDO.js +2 -0
- package/dist/cdn/7Q6FVOSE.js +2 -0
- package/dist/cdn/7WMQKIBY.js +2 -0
- package/dist/cdn/7YQW7B7E.js +2 -0
- package/dist/cdn/7ZBXJRPO.js +2 -0
- package/dist/cdn/{ECURCDZ2.js → A7RILTOO.js} +1 -1
- package/dist/cdn/AFGHAQUQ.js +2 -0
- package/dist/cdn/{QGBPRJIT.js → AHEDZHQ2.js} +1 -1
- package/dist/cdn/AJTOSFDH.js +2 -0
- package/dist/cdn/AOP3NH2U.js +2 -0
- package/dist/cdn/{D3ZA3ZSE.js → AOQ34WQ6.js} +1 -1
- package/dist/cdn/AQNYPIPX.js +2 -0
- package/dist/cdn/ARNANVZZ.js +2 -0
- package/dist/cdn/AVYPI52K.js +2 -0
- package/dist/cdn/B3EBGYCI.js +2 -0
- package/dist/cdn/{2EN543JD.js → BS547LGW.js} +1 -1
- package/dist/cdn/{KHE57SV3.js → BXIBMOE6.js} +1 -1
- package/dist/cdn/BYS4GNCX.js +2 -0
- package/dist/cdn/{YX5LYAIV.js → C32S4HGX.js} +1 -1
- package/dist/cdn/CBWGCOIO.js +2 -0
- package/dist/cdn/{XLOC3L55.js → CJQWESQ2.js} +3 -3
- package/dist/cdn/CJTB2G5O.js +2 -0
- package/dist/cdn/CNQVNMR7.js +2 -0
- package/dist/cdn/CPIWY5GX.js +2 -0
- package/dist/cdn/D3G4KNL4.js +2 -0
- package/dist/cdn/{EHIAXJAL.js → DCWL5FUH.js} +1 -1
- package/dist/cdn/DDDUIVNA.js +2 -0
- package/dist/cdn/{I5LZP3DC.js → DJ5TODX7.js} +1 -1
- package/dist/cdn/{IF5AIFNS.js → DQJ3PS72.js} +1 -1
- package/dist/cdn/DSY7BOJJ.js +2 -0
- package/dist/cdn/{VZDUTHQS.js → DUYCNBSR.js} +1 -1
- package/dist/cdn/DWIB4FVP.js +2 -0
- package/dist/cdn/E3OAYCPO.js +2 -0
- package/dist/cdn/{EYR3DX5M.js → EHTWHFIN.js} +1 -1
- package/dist/cdn/EUJFL2WJ.js +2 -0
- package/dist/cdn/{NPTVRXRO.js → F6O2MDAB.js} +1 -1
- package/dist/cdn/FBBEDCIC.js +2 -0
- package/dist/cdn/{N5SFF63Q.js → FIGNBXC4.js} +1 -1
- package/dist/cdn/{R265ZYQR.js → FS3FIZQ7.js} +1 -1
- package/dist/cdn/G5IYZRZD.js +2 -0
- package/dist/cdn/GBL55CBG.js +2 -0
- package/dist/cdn/GEWRKDNT.js +2 -0
- package/dist/cdn/{RTSHUMUI.js → GLYCZM27.js} +1 -1
- package/dist/cdn/{ULGKAMEK.js → GNUO7A4Y.js} +1 -1
- package/dist/cdn/H43C4DT4.js +2 -0
- package/dist/cdn/H4ESHMLA.js +2 -0
- package/dist/cdn/H5G45SF4.js +2 -0
- package/dist/cdn/{WUW46I4S.js → HDQ72ZNE.js} +1 -1
- package/dist/cdn/HIHNC2W6.js +2 -0
- package/dist/cdn/HKSMMZUW.js +2 -0
- package/dist/cdn/{TG6MK4QD.js → HWBVGZHG.js} +1 -1
- package/dist/cdn/HXIVUHZU.js +2 -0
- package/dist/cdn/ICNEOIAY.js +2 -0
- package/dist/cdn/{4ILCK5CI.js → IDJOHYLJ.js} +1 -1
- package/dist/cdn/{GIV3RH7X.js → ITD5YGM3.js} +1 -1
- package/dist/cdn/J3P6S2E2.js +2 -0
- package/dist/cdn/JEALIYFT.js +2 -0
- package/dist/cdn/JPDWZDO2.js +2 -0
- package/dist/cdn/JPE6LVAD.js +2 -0
- package/dist/cdn/{YKP66AQ5.js → JWEKZH6L.js} +1 -1
- package/dist/cdn/KI33EXTI.js +2 -0
- package/dist/cdn/{LJIHBKNI.js → KJIYAJA4.js} +1 -1
- package/dist/cdn/KW4BHBBW.js +2 -0
- package/dist/cdn/{4ZGFXXYL.js → L7DEPZAJ.js} +1 -1
- package/dist/cdn/{4NDBPQOW.js → L7TOPWGR.js} +1 -1
- package/dist/cdn/LK7OAPDO.js +2 -0
- package/dist/cdn/{KBSNJSUL.js → LOJGQFL6.js} +1 -1
- package/dist/cdn/{HFPBP7XA.js → LTDQ3KMS.js} +1 -1
- package/dist/cdn/{732QLUKT.js → LVZ24HEK.js} +1 -1
- package/dist/cdn/{QQYOGIVS.js → M6TXECYZ.js} +1 -1
- package/dist/cdn/MORUF5PU.js +2 -0
- package/dist/cdn/{RMERVJA5.js → MPGZXCBO.js} +1 -1
- package/dist/cdn/{XGISY6QA.js → MWS2HEQR.js} +1 -1
- package/dist/cdn/{3ZYN3227.js → MXDC3OC2.js} +1 -1
- package/dist/cdn/{3GV45XL7.js → MYDCGCGV.js} +1 -1
- package/dist/cdn/{HJ45IHRA.js → NWCFNDM2.js} +1 -1
- package/dist/cdn/{RRN6YM7F.js → NWIU5L4M.js} +1 -1
- package/dist/cdn/NYL2Z7AD.js +2 -0
- package/dist/cdn/{LKHFQ3U6.js → O5WPS55F.js} +1 -1
- package/dist/cdn/{FXFRKJEJ.js → ODAV2DWN.js} +1 -1
- package/dist/cdn/OGQ6UAE2.js +2 -0
- package/dist/cdn/OLXLHWGL.js +2 -0
- package/dist/cdn/{RBGGE65K.js → P2ZPFKR7.js} +1 -1
- package/dist/cdn/{LDLJRK76.js → P32KQQAD.js} +1 -1
- package/dist/cdn/{ZJ34LWXC.js → QAG6VFG2.js} +1 -1
- package/dist/cdn/QRH3LFLT.js +2 -0
- package/dist/cdn/{MSGQMPT6.js → QVMVZTAX.js} +1 -1
- package/dist/cdn/QXFX3OAF.js +2 -0
- package/dist/cdn/{YQST67WD.js → R2DCCWBB.js} +1 -1
- package/dist/cdn/R3Z5LCK3.js +2 -0
- package/dist/cdn/RFQSI4MJ.js +2 -0
- package/dist/cdn/RNFEU4JP.js +2 -0
- package/dist/cdn/{DKD23HP3.js → RRVD3RYN.js} +1 -1
- package/dist/cdn/{N234JPQQ.js → S6WMWFN7.js} +1 -1
- package/dist/cdn/{6KLHDA5V.js → SAK5TSCY.js} +1 -1
- package/dist/cdn/SMHE5GTR.js +2 -0
- package/dist/cdn/{2HPKL5UL.js → STISOSDG.js} +1 -1
- package/dist/cdn/TRMTKJYB.js +2 -0
- package/dist/cdn/TTFYMTZC.js +2 -0
- package/dist/cdn/{XRVUSKBQ.js → TWHGJHW2.js} +1 -1
- package/dist/cdn/TXRNHBI5.js +2 -0
- package/dist/cdn/{WTL6TTVY.js → TZAUE2UM.js} +1 -1
- package/dist/cdn/UESKV37D.js +2 -0
- package/dist/cdn/UQC63ORI.js +2 -0
- package/dist/cdn/{SDDDIVHA.js → UYAS53RY.js} +1 -1
- package/dist/cdn/{ILHS3TD7.js → V4RO7LWG.js} +1 -1
- package/dist/cdn/VE3ULCBL.js +2 -0
- package/dist/cdn/{EPKWV7TT.js → VIB4WBRW.js} +1 -1
- package/dist/cdn/{7CVLFVE5.js → VL7C7DUX.js} +1 -1
- package/dist/cdn/{MTIRRGHA.js → WMWPUGOP.js} +1 -1
- package/dist/cdn/{4PZDI5YW.js → WN6LIOTB.js} +1 -1
- package/dist/cdn/{UQBN3Z6H.js → WQOYAKXN.js} +1 -1
- package/dist/cdn/{UG6FM2IU.js → WUPDOPI3.js} +1 -1
- package/dist/cdn/{PNBC2B77.js → X4CROIR6.js} +1 -1
- package/dist/cdn/X62QRK2A.js +2 -0
- package/dist/cdn/{A26SXPLB.js → XOT64MSN.js} +1 -1
- package/dist/cdn/{SK7CWKMU.js → XS5BO3QC.js} +1 -1
- package/dist/cdn/XWGKICAS.js +2 -0
- package/dist/cdn/{FUL4JV2P.js → YRHSBDX4.js} +1 -1
- package/dist/cdn/{GY6M2LPM.js → YSWTVICN.js} +1 -1
- package/dist/cdn/Z445ZVWS.js +2 -0
- package/dist/cdn/{U63GYZ74.js → Z5FNOUD3.js} +2 -2
- package/dist/cdn/ZC6A5OHK.js +2 -0
- package/dist/cdn/{Z2R5VRT7.js → ZHZF3WW4.js} +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/icon/arcgisQuickcapture16.json +1 -0
- package/dist/cdn/assets/icon/arcgisQuickcapture24.json +1 -0
- package/dist/cdn/assets/icon/arcgisQuickcapture32.json +1 -0
- package/dist/cdn/assets/icon/arcgisSurvey12316.json +1 -0
- package/dist/cdn/assets/icon/arcgisSurvey12324.json +1 -0
- package/dist/cdn/assets/icon/arcgisSurvey12332.json +1 -0
- package/dist/cdn/assets/icon/layerStreamSetting16.json +1 -0
- package/dist/cdn/assets/icon/layerStreamSetting24.json +1 -0
- package/dist/cdn/assets/icon/layerStreamSetting32.json +1 -0
- package/dist/cdn/assets/icon/publish16.json +1 -0
- package/dist/cdn/assets/icon/publish24.json +1 -0
- package/dist/cdn/assets/icon/publish32.json +1 -0
- package/dist/cdn/assets/icon/velocityServer16.json +1 -0
- package/dist/cdn/assets/icon/velocityServer24.json +1 -0
- package/dist/cdn/assets/icon/velocityServer32.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/ExpandToggle.js +4 -5
- package/dist/chunks/Heading.js +3 -3
- package/dist/chunks/dom.js +23 -28
- package/dist/chunks/floating-ui.js +3 -6
- package/dist/chunks/label.js +1 -1
- package/dist/chunks/locale.js +29 -12
- package/dist/chunks/manager.js +505 -0
- package/dist/chunks/openCloseComponent.js +1 -1
- package/dist/chunks/resources5.js +2 -1
- package/dist/chunks/resources6.js +2 -0
- package/dist/chunks/runtime.js +4 -4
- package/dist/chunks/useFocusTrap.js +1 -1
- package/dist/chunks/useForm.js +294 -0
- package/dist/chunks/useFormTrigger.js +25 -0
- package/dist/chunks/useSetFocus.js +1 -1
- package/dist/chunks/{sortableComponent.js → useSortable.js} +67 -44
- package/dist/chunks/utils2.js +1 -1
- package/dist/components/calcite-accordion-item/customElement.d.ts +6 -6
- package/dist/components/calcite-accordion-item/customElement.js +4 -3
- package/dist/components/calcite-action/customElement.d.ts +12 -12
- package/dist/components/calcite-action/customElement.js +7 -13
- package/dist/components/calcite-action-bar/customElement.d.ts +20 -4
- package/dist/components/calcite-action-bar/customElement.js +43 -15
- package/dist/components/calcite-action-group/customElement.d.ts +6 -6
- package/dist/components/calcite-action-menu/customElement.d.ts +2 -2
- package/dist/components/calcite-action-pad/customElement.d.ts +3 -3
- package/dist/components/calcite-action-pad/customElement.js +5 -3
- package/dist/components/calcite-alert/customElement.d.ts +2 -2
- package/dist/components/calcite-alert/customElement.js +2 -2
- package/dist/components/calcite-autocomplete/customElement.d.ts +11 -12
- package/dist/components/calcite-autocomplete/customElement.js +23 -32
- package/dist/components/calcite-autocomplete-item/customElement.d.ts +6 -0
- package/dist/components/calcite-autocomplete-item/customElement.js +9 -4
- package/dist/components/calcite-avatar/customElement.js +1 -1
- package/dist/components/calcite-block/customElement.d.ts +5 -5
- package/dist/components/calcite-block/customElement.js +2 -2
- package/dist/components/calcite-block-group/customElement.d.ts +1 -1
- package/dist/components/calcite-block-group/customElement.js +4 -4
- package/dist/components/calcite-block-group/interfaces.d.ts +2 -6
- package/dist/components/calcite-block-section/customElement.d.ts +1 -1
- package/dist/components/calcite-button/customElement.d.ts +5 -5
- package/dist/components/calcite-button/customElement.js +11 -23
- package/dist/components/calcite-card/customElement.d.ts +4 -4
- package/dist/components/calcite-card-group/customElement.d.ts +2 -2
- package/dist/components/calcite-carousel/customElement.d.ts +1 -1
- package/dist/components/calcite-carousel/customElement.js +27 -25
- package/dist/components/calcite-checkbox/customElement.d.ts +4 -5
- package/dist/components/calcite-checkbox/customElement.js +10 -23
- package/dist/components/calcite-chip/customElement.d.ts +2 -2
- package/dist/components/calcite-chip/customElement.js +1 -1
- package/dist/components/calcite-chip-group/customElement.d.ts +1 -1
- package/dist/components/calcite-chip-group/customElement.js +1 -1
- package/dist/components/calcite-color-picker/customElement.d.ts +2 -2
- package/dist/components/calcite-color-picker/customElement.js +4 -2
- package/dist/components/calcite-color-picker-hex-input/customElement.d.ts +1 -1
- package/dist/components/calcite-color-picker-swatch/customElement.d.ts +1 -1
- package/dist/components/calcite-color-picker-swatch/customElement.js +1 -1
- package/dist/components/calcite-combobox/customElement.d.ts +16 -6
- package/dist/components/calcite-combobox/customElement.js +151 -60
- package/dist/components/calcite-combobox-item/customElement.d.ts +1 -1
- package/dist/components/calcite-combobox-item/customElement.js +10 -4
- package/dist/components/calcite-date-picker/customElement.d.ts +1 -1
- package/dist/components/calcite-date-picker-day/customElement.d.ts +1 -1
- package/dist/components/calcite-date-picker-month/customElement.js +1 -1
- package/dist/components/calcite-date-picker-month-header/customElement.js +1 -1
- package/dist/components/calcite-dialog/customElement.d.ts +7 -3
- package/dist/components/calcite-dialog/customElement.js +5 -3
- package/dist/components/calcite-dropdown/customElement.d.ts +15 -5
- package/dist/components/calcite-dropdown/customElement.js +168 -90
- package/dist/components/calcite-dropdown-item/customElement.d.ts +2 -2
- package/dist/components/calcite-dropdown-item/customElement.js +14 -32
- package/dist/components/calcite-fab/customElement.d.ts +1 -1
- package/dist/components/calcite-filter/customElement.d.ts +1 -1
- package/dist/components/calcite-flow/customElement.d.ts +1 -1
- package/dist/components/calcite-flow-item/customElement.d.ts +9 -5
- package/dist/components/calcite-flow-item/customElement.js +7 -5
- package/dist/components/calcite-handle/customElement.d.ts +1 -1
- package/dist/components/calcite-icon/customElement.d.ts +1 -1
- package/dist/components/calcite-icon/customElement.js +4 -3
- package/dist/components/calcite-inline-editable/customElement.d.ts +1 -1
- package/dist/components/calcite-inline-editable/customElement.js +1 -1
- package/dist/components/calcite-input/customElement.d.ts +17 -18
- package/dist/components/calcite-input/customElement.js +20 -42
- package/dist/components/calcite-input-date-picker/customElement.d.ts +6 -7
- package/dist/components/calcite-input-date-picker/customElement.js +34 -28
- package/dist/components/calcite-input-message/customElement.d.ts +1 -1
- package/dist/components/calcite-input-message/customElement.js +1 -1
- package/dist/components/calcite-input-number/customElement.d.ts +13 -14
- package/dist/components/calcite-input-number/customElement.js +17 -42
- package/dist/components/calcite-input-text/customElement.d.ts +11 -12
- package/dist/components/calcite-input-text/customElement.js +16 -41
- package/dist/components/calcite-input-time-picker/customElement.d.ts +6 -7
- package/dist/components/calcite-input-time-picker/customElement.js +14 -25
- package/dist/components/calcite-input-time-zone/customElement.d.ts +5 -6
- package/dist/components/calcite-input-time-zone/customElement.js +21 -19
- package/dist/components/calcite-link/customElement.d.ts +2 -2
- package/dist/components/calcite-link/customElement.js +4 -3
- package/dist/components/calcite-list/customElement.d.ts +1 -1
- package/dist/components/calcite-list/customElement.js +29 -7
- package/dist/components/calcite-list/interfaces.d.ts +2 -6
- package/dist/components/calcite-list-item/customElement.d.ts +2 -2
- package/dist/components/calcite-list-item/customElement.js +6 -4
- package/dist/components/calcite-list-item-group/customElement.js +1 -1
- package/dist/components/calcite-loader/customElement.d.ts +1 -1
- package/dist/components/calcite-menu/customElement.d.ts +1 -1
- package/dist/components/calcite-menu/customElement.js +1 -1
- package/dist/components/calcite-menu-item/customElement.d.ts +3 -3
- package/dist/components/calcite-menu-item/customElement.js +4 -2
- package/dist/components/calcite-meter/customElement.d.ts +7 -1
- package/dist/components/calcite-meter/customElement.js +4 -8
- package/dist/components/calcite-navigation/customElement.d.ts +2 -2
- package/dist/components/calcite-navigation-logo/customElement.d.ts +3 -3
- package/dist/components/calcite-navigation-user/customElement.d.ts +1 -1
- package/dist/components/calcite-notice/customElement.d.ts +3 -3
- package/dist/components/calcite-notice/customElement.js +1 -1
- package/dist/components/calcite-pagination/customElement.d.ts +1 -1
- package/dist/components/calcite-pagination/customElement.js +1 -1
- package/dist/components/calcite-panel/customElement.d.ts +11 -7
- package/dist/components/calcite-panel/customElement.js +21 -9
- package/dist/components/calcite-popover/customElement.d.ts +2 -2
- package/dist/components/calcite-popover/customElement.js +14 -175
- package/dist/components/calcite-progress/customElement.js +3 -2
- package/dist/components/calcite-radio-button/customElement.d.ts +1 -1
- package/dist/components/calcite-radio-button/customElement.js +173 -5
- package/dist/components/calcite-radio-button-group/customElement.d.ts +1 -1
- package/dist/components/calcite-rating/customElement.d.ts +3 -4
- package/dist/components/calcite-rating/customElement.js +12 -18
- package/dist/components/calcite-scrim/customElement.js +1 -1
- package/dist/components/calcite-segmented-control/customElement.d.ts +3 -4
- package/dist/components/calcite-segmented-control/customElement.js +13 -22
- package/dist/components/calcite-segmented-control-item/customElement.js +2 -2
- package/dist/components/calcite-select/customElement.d.ts +3 -4
- package/dist/components/calcite-select/customElement.js +8 -19
- package/dist/components/calcite-sheet/customElement.d.ts +2 -2
- package/dist/components/calcite-sheet/customElement.js +9 -6
- package/dist/components/calcite-shell/customElement.js +1 -1
- package/dist/components/calcite-shell-panel/customElement.js +7 -5
- package/dist/components/calcite-slider/customElement.d.ts +3 -4
- package/dist/components/calcite-slider/customElement.js +12 -22
- package/dist/components/calcite-sort-handle/customElement.d.ts +4 -4
- package/dist/components/calcite-sort-handle/customElement.js +44 -17
- package/dist/components/calcite-sortable-list/customElement.d.ts +1 -1
- package/dist/components/calcite-sortable-list/customElement.js +4 -4
- package/dist/components/calcite-split-button/customElement.d.ts +8 -8
- package/dist/components/calcite-stepper/customElement.d.ts +2 -2
- package/dist/components/calcite-stepper/customElement.js +30 -43
- package/dist/components/calcite-stepper-item/customElement.d.ts +1 -1
- package/dist/components/calcite-stepper-item/customElement.js +4 -10
- package/dist/components/calcite-swatch/customElement.d.ts +1 -1
- package/dist/components/calcite-swatch-group/customElement.js +1 -1
- package/dist/components/calcite-switch/customElement.d.ts +4 -4
- package/dist/components/calcite-switch/customElement.js +9 -8
- package/dist/components/calcite-tab/customElement.d.ts +1 -1
- package/dist/components/calcite-tab/customElement.js +2 -2
- package/dist/components/calcite-tab-nav/customElement.js +4 -2
- package/dist/components/calcite-tab-title/customElement.js +6 -4
- package/dist/components/calcite-table/customElement.js +1 -1
- package/dist/components/calcite-table-cell/customElement.d.ts +2 -2
- package/dist/components/calcite-table-cell/customElement.js +3 -2
- package/dist/components/calcite-table-header/customElement.d.ts +2 -2
- package/dist/components/calcite-table-row/customElement.d.ts +1 -1
- package/dist/components/calcite-tabs/customElement.js +1 -1
- package/dist/components/calcite-text-area/customElement.d.ts +13 -14
- package/dist/components/calcite-text-area/customElement.js +32 -37
- package/dist/components/calcite-tile/customElement.d.ts +1 -1
- package/dist/components/calcite-time-picker/customElement.d.ts +1 -1
- package/dist/components/calcite-time-picker/customElement.js +4 -3
- package/dist/components/calcite-tooltip/customElement.d.ts +15 -2
- package/dist/components/calcite-tooltip/customElement.js +27 -315
- package/dist/components/calcite-tree/customElement.js +1 -1
- package/dist/components/calcite-tree-item/customElement.js +5 -4
- package/dist/controllers/useSortable.d.ts +7 -0
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/supported-browsers.json +1 -1
- package/dist/docs/translations.json +1 -1
- package/dist/docs/vscode.css-custom-data.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +23 -23
- package/dist/types/lumina.d.ts +5 -5
- package/dist/types/preact.d.ts +5 -5
- package/dist/types/react.d.ts +5 -5
- package/dist/types/stencil.d.ts +5 -5
- package/package.json +13 -12
- package/dist/cdn/2CCRLQOV.js +0 -2
- package/dist/cdn/2SXQFDOQ.js +0 -2
- package/dist/cdn/2UXQ7FQU.js +0 -2
- package/dist/cdn/32TBZZTY.js +0 -2
- package/dist/cdn/3KAMTN22.js +0 -2
- package/dist/cdn/3TLJ5JOP.js +0 -2
- package/dist/cdn/46F46R3T.js +0 -2
- package/dist/cdn/4DX77VVY.js +0 -2
- package/dist/cdn/4ET37OQN.js +0 -2
- package/dist/cdn/4I67VFAN.js +0 -2
- package/dist/cdn/5XFHSV4Z.js +0 -2
- package/dist/cdn/66NDMEG2.js +0 -2
- package/dist/cdn/76VE6QGI.js +0 -2
- package/dist/cdn/7AJLMSNL.js +0 -2
- package/dist/cdn/7J3JDTWK.js +0 -2
- package/dist/cdn/7PFEVHWG.js +0 -2
- package/dist/cdn/ALRQOPMQ.js +0 -2
- package/dist/cdn/AO7ZTAVY.js +0 -2
- package/dist/cdn/BEHKDUR6.js +0 -2
- package/dist/cdn/BKAZFAPN.js +0 -2
- package/dist/cdn/C7TED56N.js +0 -2
- package/dist/cdn/CSRCARFW.js +0 -2
- package/dist/cdn/DADGP3DW.js +0 -2
- package/dist/cdn/EC3GCET5.js +0 -2
- package/dist/cdn/EREDWMAC.js +0 -2
- package/dist/cdn/ETXIJA2R.js +0 -2
- package/dist/cdn/EVZEXLBF.js +0 -2
- package/dist/cdn/FH7GL6DM.js +0 -2
- package/dist/cdn/GETIWK4G.js +0 -2
- package/dist/cdn/GJ5VSZCN.js +0 -2
- package/dist/cdn/HSNJW6OM.js +0 -2
- package/dist/cdn/I6XABN6A.js +0 -2
- package/dist/cdn/IQ23RSWK.js +0 -2
- package/dist/cdn/JC2AVKOO.js +0 -2
- package/dist/cdn/JLJULYTE.js +0 -2
- package/dist/cdn/JRAIIHMU.js +0 -2
- package/dist/cdn/JZWQZ5BO.js +0 -2
- package/dist/cdn/KFPRUCQK.js +0 -2
- package/dist/cdn/LFGU3E4X.js +0 -2
- package/dist/cdn/LGDOYO5J.js +0 -2
- package/dist/cdn/MHSIIKU2.js +0 -2
- package/dist/cdn/MOZ5AAJM.js +0 -2
- package/dist/cdn/MTQHRNJW.js +0 -2
- package/dist/cdn/N6YVNJ3O.js +0 -2
- package/dist/cdn/NB3LG2PS.js +0 -2
- package/dist/cdn/NNVU3JV4.js +0 -2
- package/dist/cdn/O5XHZCXZ.js +0 -2
- package/dist/cdn/OXJIN4W5.js +0 -2
- package/dist/cdn/OXZJMSLQ.js +0 -2
- package/dist/cdn/P2745LUP.js +0 -2
- package/dist/cdn/QHUMJCWK.js +0 -2
- package/dist/cdn/QJ2FRJRU.js +0 -2
- package/dist/cdn/QUJE6MIQ.js +0 -2
- package/dist/cdn/REAIBS67.js +0 -2
- package/dist/cdn/RKSFMXT4.js +0 -2
- package/dist/cdn/RMKYCARB.js +0 -2
- package/dist/cdn/S5KQDAMG.js +0 -2
- package/dist/cdn/SUIJIBLR.js +0 -2
- package/dist/cdn/TDDLSMO5.js +0 -2
- package/dist/cdn/TQQTV5HV.js +0 -2
- package/dist/cdn/UMLQ6PVE.js +0 -2
- package/dist/cdn/UODBUSON.js +0 -2
- package/dist/cdn/WJXZ7BPV.js +0 -2
- package/dist/cdn/X2HWVZ5U.js +0 -2
- package/dist/cdn/XPGAQQQC.js +0 -2
- package/dist/cdn/XSMU7S2O.js +0 -2
- package/dist/cdn/YT6UJRLT.js +0 -2
- package/dist/cdn/YUZXLNNW.js +0 -2
- package/dist/cdn/YZ4W6DFR.js +0 -2
- package/dist/cdn/Z2BYWKFB.js +0 -2
- package/dist/cdn/ZCBRPKAV.js +0 -2
- package/dist/cdn/ZQLGBHLZ.js +0 -2
- package/dist/chunks/form.js +0 -268
- package/dist/chunks/input.js +0 -30
- package/dist/utils/form.d.ts +0 -3
- package/dist/utils/sortableComponent.d.ts +0 -7
|
@@ -4,14 +4,13 @@ import { live } from "lit/directives/live.js";
|
|
|
4
4
|
import { css, html, nothing } from "lit";
|
|
5
5
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
6
6
|
import { LitElement, createEvent, stringOrBoolean, safeClassMap } from "@arcgis/lumina";
|
|
7
|
-
import { useWatchAttributes } from "@arcgis/lumina/controllers";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { useWatchAttributes, useDirection } from "@arcgis/lumina/controllers";
|
|
8
|
+
import { b as setRequestedIcon } from "../../chunks/dom.js";
|
|
9
|
+
import { u as useForm } from "../../chunks/useForm.js";
|
|
10
10
|
import { c as connectLabel, d as disconnectLabel, g as getLabelText } from "../../chunks/label.js";
|
|
11
11
|
import { g as getIconScale } from "../../chunks/component.js";
|
|
12
12
|
import { I as InternalLabel } from "../../chunks/InternalLabel.js";
|
|
13
13
|
import { V as Validation } from "../../chunks/Validation.js";
|
|
14
|
-
import { s as syncHiddenFormInput } from "../../chunks/input.js";
|
|
15
14
|
import { u as useT9n } from "../../chunks/useT9n.js";
|
|
16
15
|
import { u as useSetFocus } from "../../chunks/useSetFocus.js";
|
|
17
16
|
import { u as useInteractive } from "../../chunks/useInteractive.js";
|
|
@@ -43,22 +42,16 @@ class InputText extends LitElement {
|
|
|
43
42
|
this.actionWrapperRef = createRef();
|
|
44
43
|
this.attributeWatch = useWatchAttributes(["autofocus", "enterkeyhint", "inputmode", "spellcheck"], this.handleGlobalAttributesChanged);
|
|
45
44
|
this.childRef = createRef();
|
|
45
|
+
this.direction = useDirection();
|
|
46
46
|
this.inputWrapperRef = createRef();
|
|
47
|
-
this.onHiddenFormInputInput = (event) => {
|
|
48
|
-
if (event.target.name === this.name) {
|
|
49
|
-
this.setValue({
|
|
50
|
-
value: event.target.value,
|
|
51
|
-
origin: "direct"
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
this.setFocus();
|
|
55
|
-
event.stopPropagation();
|
|
56
|
-
};
|
|
57
47
|
this.previousValueOrigin = "initial";
|
|
58
48
|
this.userChangedValue = false;
|
|
59
49
|
this._value = "";
|
|
60
50
|
this.messages = useT9n();
|
|
61
51
|
this.focusSetter = useSetFocus()(this);
|
|
52
|
+
this.formSupport = useForm({
|
|
53
|
+
inputType: "text"
|
|
54
|
+
})(this);
|
|
62
55
|
this.interactiveContainer = useInteractive(this);
|
|
63
56
|
this.slottedActionElDisabledInternally = false;
|
|
64
57
|
this.alignment = "start";
|
|
@@ -71,19 +64,6 @@ class InputText extends LitElement {
|
|
|
71
64
|
this.required = false;
|
|
72
65
|
this.scale = "m";
|
|
73
66
|
this.status = "idle";
|
|
74
|
-
this.validity = {
|
|
75
|
-
valid: false,
|
|
76
|
-
badInput: false,
|
|
77
|
-
customError: false,
|
|
78
|
-
patternMismatch: false,
|
|
79
|
-
rangeOverflow: false,
|
|
80
|
-
rangeUnderflow: false,
|
|
81
|
-
stepMismatch: false,
|
|
82
|
-
tooLong: false,
|
|
83
|
-
tooShort: false,
|
|
84
|
-
typeMismatch: false,
|
|
85
|
-
valueMissing: false
|
|
86
|
-
};
|
|
87
67
|
this.calciteInputTextChange = createEvent();
|
|
88
68
|
this.calciteInputTextInput = createEvent();
|
|
89
69
|
this.calciteInternalInputTextBlur = createEvent();
|
|
@@ -92,7 +72,10 @@ class InputText extends LitElement {
|
|
|
92
72
|
this.listen("keydown", this.keyDownHandler);
|
|
93
73
|
}
|
|
94
74
|
static {
|
|
95
|
-
this.properties = { slottedActionElDisabledInternally: [16, {}, { state: true }], alignment: [3, {}, { reflect: true }], autocomplete: 1, clearable: [7, {}, { reflect: true, type: Boolean }], disabled: [7, {}, { reflect: true, type: Boolean }], editingEnabled: [7, {}, { reflect: true, type: Boolean }], form: [3, {}, { reflect: true }], icon: [3, { converter: stringOrBoolean, type: String }, { reflect: true }], iconFlipRtl: [7, {}, { reflect: true, type: Boolean }], label: 1, labelText: 1, loading: [7, {}, { reflect: true, type: Boolean }], maxLength: [11, {}, { reflect: true, type: Number }], messageOverrides: [0, {}, { attribute: false }], minLength: [11, {}, { reflect: true, type: Number }], name: [3, {}, { reflect: true }], pattern: 1, placeholder: 1, prefixText: 1, readOnly: [7, {}, { reflect: true, type: Boolean }], required: [7, {}, { reflect: true, type: Boolean }], scale: [3, {}, { reflect: true }], status: [3, {}, { reflect: true }], suffixText: 1, validationIcon: [3, { converter: stringOrBoolean, type: String }, { reflect: true }], validationMessage: 1, validity: [
|
|
75
|
+
this.properties = { slottedActionElDisabledInternally: [16, {}, { state: true }], alignment: [3, {}, { reflect: true }], autocomplete: 1, clearable: [7, {}, { reflect: true, type: Boolean }], disabled: [7, {}, { reflect: true, type: Boolean }], editingEnabled: [7, {}, { reflect: true, type: Boolean }], form: [3, {}, { reflect: true }], icon: [3, { converter: stringOrBoolean, type: String }, { reflect: true }], iconFlipRtl: [7, {}, { reflect: true, type: Boolean }], label: 1, labelText: 1, loading: [7, {}, { reflect: true, type: Boolean }], maxLength: [11, {}, { reflect: true, type: Number }], messageOverrides: [0, {}, { attribute: false }], minLength: [11, {}, { reflect: true, type: Number }], name: [3, {}, { reflect: true }], pattern: 1, placeholder: 1, prefixText: 1, readOnly: [7, {}, { reflect: true, type: Boolean }], required: [7, {}, { reflect: true, type: Boolean }], scale: [3, {}, { reflect: true }], status: [3, {}, { reflect: true }], suffixText: 1, validationIcon: [3, { converter: stringOrBoolean, type: String }, { reflect: true }], validationMessage: 1, validity: [32, {}, { readOnly: true, attribute: false }], value: 1 };
|
|
76
|
+
}
|
|
77
|
+
static {
|
|
78
|
+
this.formAssociated = true;
|
|
96
79
|
}
|
|
97
80
|
static {
|
|
98
81
|
this.styles = styles;
|
|
@@ -123,8 +106,6 @@ class InputText extends LitElement {
|
|
|
123
106
|
this.editingEnabled = this.inlineEditableEl.editingEnabled || false;
|
|
124
107
|
}
|
|
125
108
|
connectLabel(this);
|
|
126
|
-
connectForm(this);
|
|
127
|
-
this.el.addEventListener(internalHiddenInputInputEvent, this.onHiddenFormInputInput);
|
|
128
109
|
}
|
|
129
110
|
async load() {
|
|
130
111
|
this.requestedIcon = setRequestedIcon({}, this.icon, "text");
|
|
@@ -139,8 +120,6 @@ class InputText extends LitElement {
|
|
|
139
120
|
disconnectedCallback() {
|
|
140
121
|
super.disconnectedCallback();
|
|
141
122
|
disconnectLabel(this);
|
|
142
|
-
disconnectForm(this);
|
|
143
|
-
this.el.removeEventListener(internalHiddenInputInputEvent, this.onHiddenFormInputInput);
|
|
144
123
|
}
|
|
145
124
|
handleGlobalAttributesChanged() {
|
|
146
125
|
this.requestUpdate();
|
|
@@ -163,10 +142,9 @@ class InputText extends LitElement {
|
|
|
163
142
|
this.clearInputTextValue(event);
|
|
164
143
|
event.preventDefault();
|
|
165
144
|
}
|
|
166
|
-
if (event.key === "Enter") {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
}
|
|
145
|
+
if (event.key === "Enter" && this.formSupport.active) {
|
|
146
|
+
this.formSupport.requestSubmit();
|
|
147
|
+
event.preventDefault();
|
|
170
148
|
}
|
|
171
149
|
}
|
|
172
150
|
onLabelClick() {
|
|
@@ -227,9 +205,6 @@ class InputText extends LitElement {
|
|
|
227
205
|
this.emitChangeIfUserModified();
|
|
228
206
|
}
|
|
229
207
|
}
|
|
230
|
-
syncHiddenFormInput(input) {
|
|
231
|
-
syncHiddenFormInput("text", this, input);
|
|
232
|
-
}
|
|
233
208
|
setInputValue(newInputValue) {
|
|
234
209
|
if (!this.childRef.value) {
|
|
235
210
|
return;
|
|
@@ -261,7 +236,7 @@ class InputText extends LitElement {
|
|
|
261
236
|
}
|
|
262
237
|
}
|
|
263
238
|
render() {
|
|
264
|
-
const dir =
|
|
239
|
+
const dir = this.direction;
|
|
265
240
|
const loader = html`<div class=${safeClassMap(CSS.loader)}><calcite-progress .label=${this.messages.loading} type=indeterminate></calcite-progress></div>`;
|
|
266
241
|
const inputClearButton = html`<button .ariaLabel=${this.messages.clear} class=${safeClassMap(CSS.clearButton)} .disabled=${this.disabled || this.readOnly} @click=${this.clearInputTextValue} tabindex=-1 type=button><calcite-icon icon=x .scale=${getIconScale(this.scale)}></calcite-icon></button>`;
|
|
267
242
|
const iconEl = html`<calcite-icon class=${safeClassMap(CSS.inputIcon)} .flipRtl=${this.iconFlipRtl} .icon=${this.requestedIcon} .scale=${getIconScale(this.scale)}></calcite-icon>`;
|
|
@@ -277,7 +252,7 @@ class InputText extends LitElement {
|
|
|
277
252
|
[CSS.clearable]: this.isClearable,
|
|
278
253
|
[CSS.hasSuffix]: this.suffixText,
|
|
279
254
|
[CSS.hasPrefix]: this.prefixText
|
|
280
|
-
})} ${ref(this.inputWrapperRef)}>${this.prefixText ? prefixText : null}<div class=${safeClassMap(CSS.wrapper)}>${childEl}${this.isClearable ? inputClearButton : null}${this.requestedIcon ? iconEl : null}${this.loading ? loader : null}</div><div class=${safeClassMap(CSS.actionWrapper)} ${ref(this.actionWrapperRef)}><slot name=${SLOTS.action}></slot></div>${this.suffixText ? suffixText : null}
|
|
255
|
+
})} ${ref(this.inputWrapperRef)}>${this.prefixText ? prefixText : null}<div class=${safeClassMap(CSS.wrapper)}>${childEl}${this.isClearable ? inputClearButton : null}${this.requestedIcon ? iconEl : null}${this.loading ? loader : null}</div><div class=${safeClassMap(CSS.actionWrapper)} ${ref(this.actionWrapperRef)}><slot name=${SLOTS.action}></slot></div>${this.suffixText ? suffixText : null}</div>${this.validationMessage && this.status === "invalid" ? Validation({ icon: this.validationIcon, id: IDS.validationMessage, message: this.validationMessage, scale: this.scale, status: this.status }) : null}` });
|
|
281
256
|
}
|
|
282
257
|
}
|
|
283
258
|
customElement("calcite-input-text", InputText);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/// <reference path="../../index.d.ts" />
|
|
2
2
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
3
|
import type { LogicalPlacement, OverlayPositioning } from "../../utils/floating-ui.js";
|
|
4
|
-
import type { MutableValidityState } from "../../utils/form.js";
|
|
5
4
|
import type { NumberingSystem } from "../../utils/locale.js";
|
|
6
5
|
import type { HourFormat } from "../../utils/time.js";
|
|
7
6
|
import type { Scale, Status } from "../interfaces.js";
|
|
@@ -65,7 +64,7 @@ export abstract class InputTimePicker extends LitElement {
|
|
|
65
64
|
* When the component resides in a form,
|
|
66
65
|
* specifies the maximum `value`.
|
|
67
66
|
*
|
|
68
|
-
* @
|
|
67
|
+
* @see [MDN - max](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/time#max)
|
|
69
68
|
*/
|
|
70
69
|
accessor max: string;
|
|
71
70
|
/** Overrides individual strings used by the component. */
|
|
@@ -92,7 +91,7 @@ export abstract class InputTimePicker extends LitElement {
|
|
|
92
91
|
* When the component resides in a form,
|
|
93
92
|
* specifies the minimum `value`.
|
|
94
93
|
*
|
|
95
|
-
* @
|
|
94
|
+
* @see [MDN - min](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/time#min)
|
|
96
95
|
*/
|
|
97
96
|
accessor min: string;
|
|
98
97
|
/** Specifies the name of the component. Required to pass the component's `value` on form submission. */
|
|
@@ -125,7 +124,7 @@ export abstract class InputTimePicker extends LitElement {
|
|
|
125
124
|
* When `true`, the component's `value` can be read, but controls are not accessible and the `value` cannot be modified.
|
|
126
125
|
*
|
|
127
126
|
* @default false
|
|
128
|
-
* @
|
|
127
|
+
* @see [MDN - readOnly](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly)
|
|
129
128
|
*/
|
|
130
129
|
accessor readOnly: boolean;
|
|
131
130
|
/**
|
|
@@ -160,9 +159,9 @@ export abstract class InputTimePicker extends LitElement {
|
|
|
160
159
|
/**
|
|
161
160
|
* The component's current validation state.
|
|
162
161
|
*
|
|
163
|
-
* @
|
|
162
|
+
* @see [MDN - ValidityState](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)
|
|
164
163
|
*/
|
|
165
|
-
get validity():
|
|
164
|
+
get validity(): ValidityState;
|
|
166
165
|
/** The time value in ISO (24-hour) format. */
|
|
167
166
|
accessor value: string;
|
|
168
167
|
/**
|
|
@@ -175,7 +174,7 @@ export abstract class InputTimePicker extends LitElement {
|
|
|
175
174
|
* Sets focus on the component.
|
|
176
175
|
*
|
|
177
176
|
* @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
|
|
178
|
-
* @
|
|
177
|
+
* @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
|
|
179
178
|
*/
|
|
180
179
|
setFocus(options?: FocusOptions): Promise<void>;
|
|
181
180
|
/** Fires when the component is requested to be closed and before the closing transition begins. */
|
|
@@ -3,19 +3,18 @@ import { c as customElement } from "../../chunks/runtime.js";
|
|
|
3
3
|
import { css, nothing, html } from "lit";
|
|
4
4
|
import { LitElement, createEvent, stringOrBoolean, safeClassMap } from "@arcgis/lumina";
|
|
5
5
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
6
|
-
import {
|
|
6
|
+
import { useDirection } from "@arcgis/lumina/controllers";
|
|
7
7
|
import { c as connectLabel, d as disconnectLabel, g as getLabelText } from "../../chunks/label.js";
|
|
8
8
|
import { d as decimalPlaces } from "../../chunks/math.js";
|
|
9
9
|
import { g as getIconScale } from "../../chunks/component.js";
|
|
10
10
|
import { I as InternalLabel } from "../../chunks/InternalLabel.js";
|
|
11
11
|
import { V as Validation } from "../../chunks/Validation.js";
|
|
12
|
-
import { g as getElementDir } from "../../chunks/dom.js";
|
|
13
|
-
import { s as syncHiddenFormInput } from "../../chunks/input.js";
|
|
14
12
|
import { u as useT9n } from "../../chunks/useT9n.js";
|
|
15
13
|
import { i as isValidNumber } from "../../chunks/locale.js";
|
|
16
14
|
import { u as useSetFocus } from "../../chunks/useSetFocus.js";
|
|
17
15
|
import { u as useTime } from "../../chunks/useTime.js";
|
|
18
16
|
import { u as useInteractive } from "../../chunks/useInteractive.js";
|
|
17
|
+
import { u as useForm } from "../../chunks/useForm.js";
|
|
19
18
|
const styles = css`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-block}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}calcite-time-picker{--calcite-time-picker-color: var(--calcite-input-time-picker-digit-text-color);--calcite-time-picker-icon-color: var(--calcite-input-time-picker-digit-icon-color);--calcite-time-picker-border-color: var(--calcite-input-time-picker-border-color);--calcite-time-picker-button-background-color-hover: var(--calcite-input-time-picker-action-background-color-hover);--calcite-time-picker-button-background-color-press: var(--calcite-input-time-picker-action-background-color-press);--calcite-time-picker-input-border-color-hover: var(--calcite-input-time-picker-digit-border-color-hover);--calcite-time-picker-input-border-color-press: var(--calcite-input-time-picker-digit-border-color-press)}.container{--calcite-icon-color: var( --calcite-input-time-picker-icon-color, var(--calcite-ui-icon-color, var(--calcite-color-text-3)) );align-items:center;background-color:var(--calcite-input-time-picker-input-background-color, var(--calcite-color-foreground-1));border:1px solid var(--calcite-input-time-picker-input-border-color, var(--calcite-color-border-input));border-radius:var(--calcite-input-time-picker-input-corner-radius, var(--calcite-corner-radius-none));box-shadow:var(--calcite-input-time-picker-input-shadow, var(--calcite-shadow-none));box-sizing:border-box;display:flex;color:var(--calcite-input-time-picker-input-text-color, var(--calcite-color-text-1));flex-wrap:nowrap;font-weight:var(--calcite-font-weight-normal);inline-size:100%;padding-block:var(--calcite-spacing-base);-webkit-user-select:none;user-select:none}.container:focus-within{border-color:var(--calcite-color-brand);outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.container.read-only{background-color:var(--calcite-color-background);font-weight:var(--calcite-font-weight-medium)}.clock-icon{--calcite-icon-color: var( --calcite-input-time-picker-icon-color, var(--calcite-ui-icon-color, var(--calcite-color-text-3)) )}.hour-suffix,.minute-suffix,.second-suffix{white-space:pre}.input-container{display:flex;flex-grow:1}.input{align-items:center;display:flex;block-size:100%;justify-content:center;min-inline-size:max-content}.input.empty{inline-size:var(--calcite-spacing-xl)}.input:focus,.input:hover:focus{background-color:Highlight;color:HighlightText;outline:2px solid transparent;outline-offset:2px}.toggle-icon{--calcite-icon-color: var(--calcite-input-time-picker-icon-color, var(--calcite-color-text-3));align-items:center;block-size:24px;cursor:pointer;display:flex;inline-size:24px;justify-content:center}.toggle-icon:hover{--calcite-icon-color: var(--calcite-input-time-picker-icon-color-hover, var(--calcite-color-text-1))}:host([scale=s]) .container{block-size:1.5rem;font-size:var(--calcite-font-size-sm);gap:var(--calcite-spacing-sm);padding-inline-start:var(--calcite-spacing-sm);padding-inline-end:var(--calcite-spacing-xxs)}:host([scale=s]) .input-container{line-height:1rem}:host([scale=m]) .container{block-size:2rem;font-size:var(--calcite-font-size);gap:var(--calcite-spacing-md);padding-inline-start:var(--calcite-spacing-md);padding-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .input-container{line-height:1.5rem}:host([scale=l]) .container{block-size:2.75rem;font-size:var(--calcite-font-size-md);gap:var(--calcite-spacing-lg);padding-inline:var(--calcite-spacing-lg)}:host([scale=l]) .input-container{line-height:2.25rem}:host([status=invalid]) .container{border-color:var(--calcite-color-status-danger)}:host([status=invalid]) .container:focus-within{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}calcite-time-picker{--calcite-time-picker-background-color: var(--calcite-input-time-picker-background-color);--calcite-time-picker-border-color: var(--calcite-input-time-picker-border-color, transparent);--calcite-time-picker-corner-radius: var( --calcite-input-time-picker-corner-radius, var(--calcite-corner-radius-round) )}calcite-popover{--calcite-popover-corner-radius: var(--calcite-input-time-picker-corner-radius, var(--calcite-corner-radius-round))}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}:host([hidden]){display:none}[hidden]{display:none}`;
|
|
20
19
|
const CSS = {
|
|
21
20
|
clockIcon: "clock-icon",
|
|
@@ -49,7 +48,11 @@ class InputTimePicker extends LitElement {
|
|
|
49
48
|
super();
|
|
50
49
|
this.messages = useT9n();
|
|
51
50
|
this.containerRef = createRef();
|
|
51
|
+
this.direction = useDirection();
|
|
52
52
|
this.focusSetter = useSetFocus()(this);
|
|
53
|
+
this.formSupport = useForm({
|
|
54
|
+
inputType: "time"
|
|
55
|
+
})(this);
|
|
53
56
|
this.fractionalSecondRef = createRef();
|
|
54
57
|
this.hourRef = createRef();
|
|
55
58
|
this.meridiemRef = createRef();
|
|
@@ -69,19 +72,6 @@ class InputTimePicker extends LitElement {
|
|
|
69
72
|
this.scale = "m";
|
|
70
73
|
this.status = "idle";
|
|
71
74
|
this.step = 60;
|
|
72
|
-
this.validity = {
|
|
73
|
-
valid: false,
|
|
74
|
-
badInput: false,
|
|
75
|
-
customError: false,
|
|
76
|
-
patternMismatch: false,
|
|
77
|
-
rangeOverflow: false,
|
|
78
|
-
rangeUnderflow: false,
|
|
79
|
-
stepMismatch: false,
|
|
80
|
-
tooLong: false,
|
|
81
|
-
tooShort: false,
|
|
82
|
-
typeMismatch: false,
|
|
83
|
-
valueMissing: false
|
|
84
|
-
};
|
|
85
75
|
this.calciteInputTimePickerBeforeClose = createEvent({ cancelable: false });
|
|
86
76
|
this.calciteInputTimePickerBeforeOpen = createEvent({ cancelable: false });
|
|
87
77
|
this.calciteInputTimePickerChange = createEvent();
|
|
@@ -92,7 +82,10 @@ class InputTimePicker extends LitElement {
|
|
|
92
82
|
this.listen("calciteTimeChange", this.timeChangeHandler);
|
|
93
83
|
}
|
|
94
84
|
static {
|
|
95
|
-
this.properties = { disabled: [7, {}, { reflect: true, type: Boolean }], focusTrapDisabled: [7, {}, { reflect: true, type: Boolean }], form: [3, {}, { reflect: true }], hourFormat: [3, {}, { reflect: true }], label: 1, labelText: 1, max: [3, {}, { reflect: true }], messageOverrides: [0, {}, { attribute: false }], min: [3, {}, { reflect: true }], name: 1, numberingSystem: [3, {}, { reflect: true }], open: [7, {}, { reflect: true, type: Boolean }], overlayPositioning: 1, placement: [3, {}, { reflect: true }], readOnly: [7, {}, { reflect: true, type: Boolean }], required: [7, {}, { reflect: true, type: Boolean }], scale: [3, {}, { reflect: true }], status: [3, {}, { reflect: true }], step: [11, {}, { reflect: true, type: Number }], validationIcon: [3, { converter: stringOrBoolean, type: String }, { reflect: true }], validationMessage: 1, validity: [
|
|
85
|
+
this.properties = { disabled: [7, {}, { reflect: true, type: Boolean }], focusTrapDisabled: [7, {}, { reflect: true, type: Boolean }], form: [3, {}, { reflect: true }], hourFormat: [3, {}, { reflect: true }], label: 1, labelText: 1, max: [3, {}, { reflect: true }], messageOverrides: [0, {}, { attribute: false }], min: [3, {}, { reflect: true }], name: 1, numberingSystem: [3, {}, { reflect: true }], open: [7, {}, { reflect: true, type: Boolean }], overlayPositioning: 1, placement: [3, {}, { reflect: true }], readOnly: [7, {}, { reflect: true, type: Boolean }], required: [7, {}, { reflect: true, type: Boolean }], scale: [3, {}, { reflect: true }], status: [3, {}, { reflect: true }], step: [11, {}, { reflect: true, type: Number }], validationIcon: [3, { converter: stringOrBoolean, type: String }, { reflect: true }], validationMessage: 1, validity: [32, {}, { readOnly: true, attribute: false }], value: 1 };
|
|
86
|
+
}
|
|
87
|
+
static {
|
|
88
|
+
this.formAssociated = true;
|
|
96
89
|
}
|
|
97
90
|
static {
|
|
98
91
|
this.shadowRootOptions = { mode: "open", delegatesFocus: true };
|
|
@@ -109,7 +102,6 @@ class InputTimePicker extends LitElement {
|
|
|
109
102
|
connectedCallback() {
|
|
110
103
|
super.connectedCallback();
|
|
111
104
|
connectLabel(this);
|
|
112
|
-
connectForm(this);
|
|
113
105
|
}
|
|
114
106
|
willUpdate(changes) {
|
|
115
107
|
if (changes.has("open") && (this.hasUpdated || this.open !== false)) {
|
|
@@ -140,7 +132,6 @@ class InputTimePicker extends LitElement {
|
|
|
140
132
|
disconnectedCallback() {
|
|
141
133
|
super.disconnectedCallback();
|
|
142
134
|
disconnectLabel(this);
|
|
143
|
-
disconnectForm(this);
|
|
144
135
|
}
|
|
145
136
|
blurHandler() {
|
|
146
137
|
this.changeEventHandler();
|
|
@@ -163,7 +154,8 @@ class InputTimePicker extends LitElement {
|
|
|
163
154
|
return;
|
|
164
155
|
}
|
|
165
156
|
if (key === "Enter") {
|
|
166
|
-
if (
|
|
157
|
+
if (this.formSupport.active) {
|
|
158
|
+
this.formSupport.requestSubmit();
|
|
167
159
|
event.preventDefault();
|
|
168
160
|
}
|
|
169
161
|
this.changeEventHandler();
|
|
@@ -276,9 +268,6 @@ class InputTimePicker extends LitElement {
|
|
|
276
268
|
const ref2 = target === "hour" ? this.hourRef : target === "minute" ? this.minuteRef : target === "second" ? this.secondRef : target === "fractionalSecond" ? this.fractionalSecondRef : this.meridiemRef;
|
|
277
269
|
ref2.value?.focus();
|
|
278
270
|
}
|
|
279
|
-
syncHiddenFormInput(input) {
|
|
280
|
-
syncHiddenFormInput("time", this, input);
|
|
281
|
-
}
|
|
282
271
|
timeChangeHandler(event) {
|
|
283
272
|
event.stopPropagation();
|
|
284
273
|
if (this.disabled) {
|
|
@@ -311,7 +300,7 @@ class InputTimePicker extends LitElement {
|
|
|
311
300
|
const showFractionalSecond = decimalPlaces(this.step) > 0;
|
|
312
301
|
const showMeridiem = hourFormat === "12";
|
|
313
302
|
const showSecond = this.step < 60;
|
|
314
|
-
const meridiemStart = meridiemOrder === 0 ||
|
|
303
|
+
const meridiemStart = meridiemOrder === 0 || this.direction === "rtl";
|
|
315
304
|
const isInteractive = !this.disabled && !this.readOnly;
|
|
316
305
|
return this.interactiveContainer({ disabled: this.disabled, children: html`${this.labelText && InternalLabel({ labelText: this.labelText, onClick: this.onLabelClick, required: this.required, tooltipText: this.messages.required }) || ""}<div aria-controls=${IDS.inputContainer} aria-labelledby=${IDS.inputContainer} class=${safeClassMap({
|
|
317
306
|
[CSS.container]: true,
|
|
@@ -332,7 +321,7 @@ class InputTimePicker extends LitElement {
|
|
|
332
321
|
[CSS.empty]: !localizedFractionalSecond,
|
|
333
322
|
[CSS.fractionalSecond]: true,
|
|
334
323
|
[CSS.input]: true
|
|
335
|
-
})} @focus=${this.timePartFocusHandler} @keydown=${isInteractive ? handleFractionalSecondKeyDownEvent : void 0} role=spinbutton tabindex=0 ${ref(this.fractionalSecondRef)}>${localizedFractionalSecond || "".padStart(decimalPlaces(this.step), "-")}</span>` || ""}${localizedSecondSuffix && html`<span class=${safeClassMap(CSS.secondSuffix)}>${localizedSecondSuffix}</span>` || ""}${showMeridiem && !meridiemStart && this.renderMeridiem() || ""}</div>${!this.readOnly && this.renderToggleIcon(this.open) || ""}</div><calcite-popover auto-close .focusTrapDisabled=${this.focusTrapDisabled} .focusTrapOptions=${{ initialFocus: false }} .label=${messages.chooseTime} lang=${this.messages._lang ?? nothing} offset-distance=0 @calcitePopoverBeforeClose=${this.popoverBeforeCloseHandler} @calcitePopoverBeforeOpen=${this.popoverBeforeOpenHandler} @calcitePopoverClose=${this.popoverCloseHandler} @calcitePopoverOpen=${this.popoverOpenHandler} .overlayPositioning=${this.overlayPositioning} .placement=${this.placement} pointer-disabled .referenceElement=${this.containerRef.value} trigger-disabled ${ref(this.setCalcitePopoverEl)}><calcite-time-picker .hourFormat=${this.time.hourFormat} lang=${this.messages._lang ?? nothing} .messageOverrides=${this.messageOverrides} .numberingSystem=${this.numberingSystem} @calciteTimePickerChange=${this.timePickerChangeHandler} .scale=${this.scale} .step=${this.step} tabindex=${(this.open ? void 0 : -1) ?? nothing} .time=${this.time} .value=${this.value} ${ref(this.timePickerRef)}></calcite-time-picker></calcite-popover>${
|
|
324
|
+
})} @focus=${this.timePartFocusHandler} @keydown=${isInteractive ? handleFractionalSecondKeyDownEvent : void 0} role=spinbutton tabindex=0 ${ref(this.fractionalSecondRef)}>${localizedFractionalSecond || "".padStart(decimalPlaces(this.step), "-")}</span>` || ""}${localizedSecondSuffix && html`<span class=${safeClassMap(CSS.secondSuffix)}>${localizedSecondSuffix}</span>` || ""}${showMeridiem && !meridiemStart && this.renderMeridiem() || ""}</div>${!this.readOnly && this.renderToggleIcon(this.open) || ""}</div><calcite-popover auto-close .focusTrapDisabled=${this.focusTrapDisabled} .focusTrapOptions=${{ initialFocus: false }} .label=${messages.chooseTime} lang=${this.messages._lang ?? nothing} offset-distance=0 @calcitePopoverBeforeClose=${this.popoverBeforeCloseHandler} @calcitePopoverBeforeOpen=${this.popoverBeforeOpenHandler} @calcitePopoverClose=${this.popoverCloseHandler} @calcitePopoverOpen=${this.popoverOpenHandler} .overlayPositioning=${this.overlayPositioning} .placement=${this.placement} pointer-disabled .referenceElement=${this.containerRef.value} trigger-disabled ${ref(this.setCalcitePopoverEl)}><calcite-time-picker .hourFormat=${this.time.hourFormat} lang=${this.messages._lang ?? nothing} .messageOverrides=${this.messageOverrides} .numberingSystem=${this.numberingSystem} @calciteTimePickerChange=${this.timePickerChangeHandler} .scale=${this.scale} .step=${this.step} tabindex=${(this.open ? void 0 : -1) ?? nothing} .time=${this.time} .value=${this.value} ${ref(this.timePickerRef)}></calcite-time-picker></calcite-popover>${this.validationMessage && this.status === "invalid" ? Validation({ icon: this.validationIcon, id: IDS.validationMessage, message: this.validationMessage, scale: this.scale, status: this.status }) : null}` });
|
|
336
325
|
}
|
|
337
326
|
renderMeridiem() {
|
|
338
327
|
const { handleMeridiemKeyDownEvent, localizedMeridiem, meridiem } = this.time;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
3
|
import type { Scale, Status } from "../interfaces.js";
|
|
4
4
|
import type { OverlayPositioning } from "../../utils/floating-ui.js";
|
|
5
|
-
import type { MutableValidityState } from "../../utils/form.js";
|
|
6
5
|
import type { IconName } from "../calcite-icon/interfaces.js";
|
|
7
6
|
import type { OffsetStyle, TimeZoneMode } from "./interfaces.js";
|
|
8
7
|
|
|
@@ -694,7 +693,7 @@ export abstract class InputTimeZone extends LitElement {
|
|
|
694
693
|
*
|
|
695
694
|
* It can be either a Date instance or a string in ISO format (`"YYYY-MM-DD"`, `"YYYY-MM-DDTHH:MM:SS.SSSZ"`).
|
|
696
695
|
*
|
|
697
|
-
* @see [Date.prototype.toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString).
|
|
696
|
+
* @see [MDN - Date.prototype.toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString).
|
|
698
697
|
*/
|
|
699
698
|
accessor referenceDate: Date | string;
|
|
700
699
|
/**
|
|
@@ -715,7 +714,7 @@ export abstract class InputTimeZone extends LitElement {
|
|
|
715
714
|
* Only set this if you need complex z-index control or if top layer placement causes conflicts with third-party components.
|
|
716
715
|
*
|
|
717
716
|
* @default false
|
|
718
|
-
* @
|
|
717
|
+
* @see [MDN - Top Layer](https://developer.mozilla.org/en-US/docs/Glossary/Top_layer)
|
|
719
718
|
*/
|
|
720
719
|
accessor topLayerDisabled: boolean;
|
|
721
720
|
/** Specifies the validation icon to display under the component. */
|
|
@@ -725,9 +724,9 @@ export abstract class InputTimeZone extends LitElement {
|
|
|
725
724
|
/**
|
|
726
725
|
* The component's current validation state.
|
|
727
726
|
*
|
|
728
|
-
* @
|
|
727
|
+
* @see [MDN - ValidityState](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)
|
|
729
728
|
*/
|
|
730
|
-
get validity():
|
|
729
|
+
get validity(): ValidityState;
|
|
731
730
|
/**
|
|
732
731
|
* The component's value, where the value is the time zone offset or the difference, in minutes, between the selected time zone and UTC.
|
|
733
732
|
*
|
|
@@ -740,7 +739,7 @@ export abstract class InputTimeZone extends LitElement {
|
|
|
740
739
|
* Sets focus on the component.
|
|
741
740
|
*
|
|
742
741
|
* @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
|
|
743
|
-
* @
|
|
742
|
+
* @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
|
|
744
743
|
*/
|
|
745
744
|
setFocus(options?: FocusOptions): Promise<void>;
|
|
746
745
|
/** Fires when the component is requested to be closed and before the closing transition begins. */
|
|
@@ -6,11 +6,11 @@ import { css, nothing, html } from "lit";
|
|
|
6
6
|
import { LitElement, createEvent, stringOrBoolean, safeClassMap } from "@arcgis/lumina";
|
|
7
7
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
8
8
|
import { c as connectLabel, d as disconnectLabel } from "../../chunks/label.js";
|
|
9
|
-
import { c as connectForm, a as afterConnectDefaultValueSet, d as disconnectForm, H as HiddenFormInputSlot } from "../../chunks/form.js";
|
|
10
9
|
import { u as useT9n } from "../../chunks/useT9n.js";
|
|
11
10
|
import { S as SLOTS$1 } from "../../chunks/resources5.js";
|
|
12
11
|
import { u as useSetFocus } from "../../chunks/useSetFocus.js";
|
|
13
12
|
import { u as useInteractive } from "../../chunks/useInteractive.js";
|
|
13
|
+
import { u as useForm } from "../../chunks/useForm.js";
|
|
14
14
|
import { g as getDateTimeFormat } from "../../chunks/locale.js";
|
|
15
15
|
const CSS = {
|
|
16
16
|
offset: "offset"
|
|
@@ -202,9 +202,13 @@ class InputTimeZone extends LitElement {
|
|
|
202
202
|
constructor() {
|
|
203
203
|
super(...arguments);
|
|
204
204
|
this.comboboxRef = createRef();
|
|
205
|
+
this.formSupport = useForm({
|
|
206
|
+
inputType: "text"
|
|
207
|
+
})(this);
|
|
205
208
|
this.messages = useT9n({ blocking: true });
|
|
206
209
|
this.focusSetter = useSetFocus()(this);
|
|
207
210
|
this.interactiveContainer = useInteractive(this);
|
|
211
|
+
this.#valueUpdateContext = null;
|
|
208
212
|
this.clearable = false;
|
|
209
213
|
this.disabled = false;
|
|
210
214
|
this.maxItems = 0;
|
|
@@ -217,19 +221,6 @@ class InputTimeZone extends LitElement {
|
|
|
217
221
|
this.scale = "m";
|
|
218
222
|
this.status = "idle";
|
|
219
223
|
this.topLayerDisabled = false;
|
|
220
|
-
this.validity = {
|
|
221
|
-
valid: false,
|
|
222
|
-
badInput: false,
|
|
223
|
-
customError: false,
|
|
224
|
-
patternMismatch: false,
|
|
225
|
-
rangeOverflow: false,
|
|
226
|
-
rangeUnderflow: false,
|
|
227
|
-
stepMismatch: false,
|
|
228
|
-
tooLong: false,
|
|
229
|
-
tooShort: false,
|
|
230
|
-
typeMismatch: false,
|
|
231
|
-
valueMissing: false
|
|
232
|
-
};
|
|
233
224
|
this.calciteInputTimeZoneBeforeClose = createEvent({ cancelable: false });
|
|
234
225
|
this.calciteInputTimeZoneBeforeOpen = createEvent({ cancelable: false });
|
|
235
226
|
this.calciteInputTimeZoneChange = createEvent({ cancelable: false });
|
|
@@ -237,7 +228,10 @@ class InputTimeZone extends LitElement {
|
|
|
237
228
|
this.calciteInputTimeZoneOpen = createEvent({ cancelable: false });
|
|
238
229
|
}
|
|
239
230
|
static {
|
|
240
|
-
this.properties = { clearable: [7, {}, { reflect: true, type: Boolean }], disabled: [7, {}, { reflect: true, type: Boolean }], form: [3, {}, { reflect: true }], labelText: 1, maxItems: [11, {}, { reflect: true, type: Number }], messageOverrides: [0, {}, { attribute: false }], mode: [3, {}, { reflect: true }], name: [3, {}, { reflect: true }], offsetStyle: [3, {}, { reflect: true }], open: [7, {}, { reflect: true, type: Boolean }], overlayPositioning: [3, {}, { reflect: true }], readOnly: [7, {}, { reflect: true, type: Boolean }], referenceDate: 1, required: [7, {}, { reflect: true, type: Boolean }], scale: [3, {}, { reflect: true }], status: [3, {}, { reflect: true }], topLayerDisabled: [7, {}, { reflect: true, type: Boolean }], validationIcon: [3, { converter: stringOrBoolean, type: String }, { reflect: true }], validationMessage: 1, validity: [
|
|
231
|
+
this.properties = { clearable: [7, {}, { reflect: true, type: Boolean }], disabled: [7, {}, { reflect: true, type: Boolean }], form: [3, {}, { reflect: true }], labelText: 1, maxItems: [11, {}, { reflect: true, type: Number }], messageOverrides: [0, {}, { attribute: false }], mode: [3, {}, { reflect: true }], name: [3, {}, { reflect: true }], offsetStyle: [3, {}, { reflect: true }], open: [7, {}, { reflect: true, type: Boolean }], overlayPositioning: [3, {}, { reflect: true }], readOnly: [7, {}, { reflect: true, type: Boolean }], referenceDate: 1, required: [7, {}, { reflect: true, type: Boolean }], scale: [3, {}, { reflect: true }], status: [3, {}, { reflect: true }], topLayerDisabled: [7, {}, { reflect: true, type: Boolean }], validationIcon: [3, { converter: stringOrBoolean, type: String }, { reflect: true }], validationMessage: 1, validity: [32, {}, { readOnly: true, attribute: false }], value: 1 };
|
|
232
|
+
}
|
|
233
|
+
static {
|
|
234
|
+
this.formAssociated = true;
|
|
241
235
|
}
|
|
242
236
|
static {
|
|
243
237
|
this.shadowRootOptions = { mode: "open", delegatesFocus: true };
|
|
@@ -245,10 +239,12 @@ class InputTimeZone extends LitElement {
|
|
|
245
239
|
static {
|
|
246
240
|
this.styles = styles;
|
|
247
241
|
}
|
|
242
|
+
#valueUpdateContext;
|
|
248
243
|
get value() {
|
|
249
244
|
return this._value;
|
|
250
245
|
}
|
|
251
246
|
set value(value) {
|
|
247
|
+
this.#valueUpdateContext = "internal";
|
|
252
248
|
this._value = value;
|
|
253
249
|
}
|
|
254
250
|
async setFocus(options) {
|
|
@@ -256,7 +252,6 @@ class InputTimeZone extends LitElement {
|
|
|
256
252
|
}
|
|
257
253
|
connectedCallback() {
|
|
258
254
|
super.connectedCallback();
|
|
259
|
-
connectForm(this);
|
|
260
255
|
connectLabel(this);
|
|
261
256
|
}
|
|
262
257
|
async load() {
|
|
@@ -267,7 +262,6 @@ class InputTimeZone extends LitElement {
|
|
|
267
262
|
this.value = normalized || (initialValue === "" ? normalized : void 0);
|
|
268
263
|
this.updateTimeZoneSelection();
|
|
269
264
|
const selectedValue = this.selectedTimeZoneItem ? `${this.selectedTimeZoneItem.value}` : "";
|
|
270
|
-
afterConnectDefaultValueSet(this, selectedValue);
|
|
271
265
|
this.value = selectedValue;
|
|
272
266
|
}
|
|
273
267
|
willUpdate(changes) {
|
|
@@ -286,7 +280,6 @@ class InputTimeZone extends LitElement {
|
|
|
286
280
|
}
|
|
287
281
|
disconnectedCallback() {
|
|
288
282
|
super.disconnectedCallback();
|
|
289
|
-
disconnectForm(this);
|
|
290
283
|
disconnectLabel(this);
|
|
291
284
|
}
|
|
292
285
|
async handleTimeZoneItemPropsChange() {
|
|
@@ -302,6 +295,11 @@ class InputTimeZone extends LitElement {
|
|
|
302
295
|
}
|
|
303
296
|
}
|
|
304
297
|
async handleValueChange(value, oldValue) {
|
|
298
|
+
const userUpdated = this.#valueUpdateContext === "user";
|
|
299
|
+
this.#valueUpdateContext = null;
|
|
300
|
+
if (userUpdated) {
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
305
303
|
const normalized = this.normalizeValue(value);
|
|
306
304
|
if (!normalized) {
|
|
307
305
|
if (this.clearable) {
|
|
@@ -344,8 +342,10 @@ class InputTimeZone extends LitElement {
|
|
|
344
342
|
event.stopPropagation();
|
|
345
343
|
const combobox = event.target;
|
|
346
344
|
const selectedItem = combobox.selectedItems[0];
|
|
345
|
+
const previousValue = this._value;
|
|
347
346
|
if (!selectedItem) {
|
|
348
347
|
this._value = "";
|
|
348
|
+
this.requestUpdate("value", previousValue);
|
|
349
349
|
this.selectedTimeZoneItem = null;
|
|
350
350
|
this.calciteInputTimeZoneChange.emit();
|
|
351
351
|
return;
|
|
@@ -356,7 +356,9 @@ class InputTimeZone extends LitElement {
|
|
|
356
356
|
return;
|
|
357
357
|
}
|
|
358
358
|
this._value = selectedValue;
|
|
359
|
+
this.requestUpdate("value", previousValue);
|
|
359
360
|
this.selectedTimeZoneItem = selected;
|
|
361
|
+
this.#valueUpdateContext = "user";
|
|
360
362
|
this.calciteInputTimeZoneChange.emit();
|
|
361
363
|
}
|
|
362
364
|
onComboboxClose(event) {
|
|
@@ -403,7 +405,7 @@ class InputTimeZone extends LitElement {
|
|
|
403
405
|
return !metadata.country || open || !selected ? label : getSelectedRegionTimeZoneLabel(label, metadata.country, this.messages);
|
|
404
406
|
}
|
|
405
407
|
render() {
|
|
406
|
-
return this.interactiveContainer({ disabled: this.disabled, children: html`<calcite-combobox .clearDisabled=${!this.clearable} .disabled=${this.disabled} .label=${this.messages.chooseTimeZone} .labelText=${this.labelText} lang=${this.messages._lang ?? nothing} .maxItems=${this.maxItems} @calciteComboboxBeforeClose=${this.onComboboxBeforeClose} @calciteComboboxBeforeOpen=${this.onComboboxBeforeOpen} @calciteComboboxChange=${this.onComboboxChange} @calciteComboboxClose=${this.onComboboxClose} @calciteComboboxOpen=${this.onComboboxOpen} .overlayPositioning=${this.overlayPositioning} .placeholder=${this.mode === "name" ? this.messages.namePlaceholder : this.mode === "offset" ? this.messages.offsetPlaceholder : this.messages.regionPlaceholder} placeholder-icon=search .readOnly=${this.readOnly} .required=${this.required} .scale=${this.scale} .selectionMode=${this.clearable ? "single" : "single-persist"} .status=${this.status} .topLayerDisabled=${this.topLayerDisabled} .validationIcon=${this.validationIcon} .validationMessage=${this.validationMessage} ${ref(this.comboboxRef)}>${this.renderItems()}<slot name=${SLOTS.labelContent} slot=${SLOTS$1.labelContent}></slot></calcite-combobox
|
|
408
|
+
return this.interactiveContainer({ disabled: this.disabled, children: html`<calcite-combobox .clearDisabled=${!this.clearable} .disabled=${this.disabled} .label=${this.messages.chooseTimeZone} .labelText=${this.labelText} lang=${this.messages._lang ?? nothing} .maxItems=${this.maxItems} @calciteComboboxBeforeClose=${this.onComboboxBeforeClose} @calciteComboboxBeforeOpen=${this.onComboboxBeforeOpen} @calciteComboboxChange=${this.onComboboxChange} @calciteComboboxClose=${this.onComboboxClose} @calciteComboboxOpen=${this.onComboboxOpen} .overlayPositioning=${this.overlayPositioning} .placeholder=${this.mode === "name" ? this.messages.namePlaceholder : this.mode === "offset" ? this.messages.offsetPlaceholder : this.messages.regionPlaceholder} placeholder-icon=search .readOnly=${this.readOnly} .required=${this.required} .scale=${this.scale} .selectionMode=${this.clearable ? "single" : "single-persist"} .status=${this.status} .topLayerDisabled=${this.topLayerDisabled} .validationIcon=${this.validationIcon} .validationMessage=${this.validationMessage} ${ref(this.comboboxRef)}>${this.renderItems()}<slot name=${SLOTS.labelContent} slot=${SLOTS$1.labelContent}></slot></calcite-combobox>` });
|
|
407
409
|
}
|
|
408
410
|
renderItems() {
|
|
409
411
|
if (this.mode === "region") {
|
|
@@ -25,7 +25,7 @@ export abstract class Link extends LitElement {
|
|
|
25
25
|
* Without a value, the browser will suggest a filename/extension.
|
|
26
26
|
*
|
|
27
27
|
* @default false
|
|
28
|
-
* @see [Global download attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#download).
|
|
28
|
+
* @see [MDN - Global download attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#download).
|
|
29
29
|
*/
|
|
30
30
|
accessor download: string | boolean;
|
|
31
31
|
/** Specifies the URL of the linked resource, which can be set as an absolute or relative path. */
|
|
@@ -44,7 +44,7 @@ export abstract class Link extends LitElement {
|
|
|
44
44
|
* Sets focus on the component.
|
|
45
45
|
*
|
|
46
46
|
* @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
|
|
47
|
-
* @
|
|
47
|
+
* @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
|
|
48
48
|
*/
|
|
49
49
|
setFocus(options?: FocusOptions): Promise<void>;
|
|
50
50
|
}
|
|
@@ -4,7 +4,7 @@ import { css, html } from "lit";
|
|
|
4
4
|
import { literal, html as html$1 } from "lit/static-html.js";
|
|
5
5
|
import { LitElement, stringOrBoolean, safeClassMap, nothing } from "@arcgis/lumina";
|
|
6
6
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
7
|
-
import {
|
|
7
|
+
import { useDirection } from "@arcgis/lumina/controllers";
|
|
8
8
|
import { u as useSetFocus } from "../../chunks/useSetFocus.js";
|
|
9
9
|
import { u as useInteractive } from "../../chunks/useInteractive.js";
|
|
10
10
|
const styles = css`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline}:host a,:host button{position:relative;display:flex;cursor:pointer;align-items:center;justify-content:center;border-radius:0;border-style:none;font-family:inherit;text-decoration:none;line-height:inherit;font-size:inherit;-webkit-appearance:none}:host a:hover,:host button:hover{text-decoration:none}:host a,:host button{transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform,background-size;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;outline-color:transparent}:host a:focus,:host button:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}calcite-icon{inline-size:1em;block-size:1em;min-inline-size:unset;min-block-size:unset}.calcite-link--icon{vertical-align:middle;margin-block-start:-.25em}:host .calcite-link--icon.icon-start{margin-inline-end:.5rem}:host .calcite-link--icon.icon-end{margin-inline-start:.5rem}:host button,:host a{position:relative;display:inline;border-style:none;background-color:transparent;padding:0;color:var(--calcite-link-text-color, var(--calcite-color-text-link));line-height:inherit;white-space:initial;background-image:linear-gradient(currentColor,currentColor),linear-gradient(var(--calcite-color-brand-underline),var(--calcite-color-brand-underline));background-position-x:0%,100%;background-position-y:min(1.5em,100%);background-repeat:no-repeat,no-repeat;background-size:0% 1px,100% 1px}:host button:hover,:host button:focus,:host a:hover,:host a:focus{background-size:100% 1px,100% 1px}:host button:active,:host a:active{background-size:100% 2px,100% 2px}:host button.calcite--rtl,:host a.calcite--rtl{background-position:100% 100%,100% 100%}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`;
|
|
@@ -17,6 +17,7 @@ class Link extends LitElement {
|
|
|
17
17
|
constructor() {
|
|
18
18
|
super();
|
|
19
19
|
this.childRef = createRef();
|
|
20
|
+
this.direction = useDirection();
|
|
20
21
|
this.focusSetter = useSetFocus()(this);
|
|
21
22
|
this.interactiveContainer = useInteractive(this);
|
|
22
23
|
this.disabled = false;
|
|
@@ -46,8 +47,8 @@ class Link extends LitElement {
|
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
49
|
render() {
|
|
49
|
-
const { download
|
|
50
|
-
const dir =
|
|
50
|
+
const { download } = this;
|
|
51
|
+
const dir = this.direction;
|
|
51
52
|
const childElType = this.href ? "a" : "button";
|
|
52
53
|
const iconStartEl = html`<calcite-icon class=${safeClassMap({ [CSS.calciteLinkIcon]: true, [CSS.iconStart]: true })} .flipRtl=${this.iconFlipRtl === "start" || this.iconFlipRtl === "both"} .icon=${this.iconStart} scale=s></calcite-icon>`;
|
|
53
54
|
const iconEndEl = html`<calcite-icon class=${safeClassMap({ [CSS.calciteLinkIcon]: true, [CSS.iconEnd]: true })} .flipRtl=${this.iconFlipRtl === "end" || this.iconFlipRtl === "both"} .icon=${this.iconEnd} scale=s></calcite-icon>`;
|
|
@@ -161,7 +161,7 @@ export abstract class List extends LitElement {
|
|
|
161
161
|
* Sets focus on the component's first focusable element.
|
|
162
162
|
*
|
|
163
163
|
* @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
|
|
164
|
-
* @
|
|
164
|
+
* @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
|
|
165
165
|
*/
|
|
166
166
|
setFocus(options?: FocusOptions): Promise<void>;
|
|
167
167
|
/** Fires when the component's selected items have changed. */
|