@esri/calcite-components 5.1.0-next.6 → 5.1.0-next.61
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/24CRUZU7.js +2 -0
- package/dist/cdn/{ZCJDNXK2.js → 2C262SX5.js} +1 -1
- package/dist/cdn/2PP6M4EM.js +2 -0
- package/dist/cdn/{3N3YST3P.js → 3G7XYB6W.js} +1 -1
- package/dist/cdn/3PNK54IV.js +2 -0
- package/dist/cdn/3R4ULAV5.js +2 -0
- package/dist/cdn/{CILYQWNA.js → 3SYW63DP.js} +1 -1
- package/dist/cdn/{XI7FVSES.js → 432F3C6X.js} +1 -1
- package/dist/cdn/{44K6CFSA.js → 45UXS3RT.js} +1 -1
- package/dist/cdn/4Y5PAWL2.js +2 -0
- package/dist/cdn/{3HLHTUY5.js → 52WHW2NV.js} +1 -1
- package/dist/cdn/{NLVQFJ3Z.js → 55MBZL5L.js} +1 -1
- package/dist/cdn/{JN5O4TLZ.js → 562RKTDK.js} +1 -1
- package/dist/cdn/5NRNHAOT.js +2 -0
- package/dist/cdn/5RBJZDCW.js +2 -0
- package/dist/cdn/62ZHSWM4.js +2 -0
- package/dist/cdn/{MCSIAIDA.js → 6ABE4RHK.js} +1 -1
- package/dist/cdn/{2M3L5CHC.js → 6ELKBP5R.js} +1 -1
- package/dist/cdn/{JVZSWSGV.js → 6MT7Z75P.js} +1 -1
- package/dist/cdn/{JX4VBEH7.js → 6PGPW4U3.js} +1 -1
- package/dist/cdn/{O24SM7OF.js → 6TTZSRPY.js} +1 -1
- package/dist/cdn/7D5QAR2D.js +2 -0
- package/dist/cdn/{W5HANC6S.js → 7ELQVRBB.js} +1 -1
- package/dist/cdn/7OTD22EB.js +2 -0
- package/dist/cdn/7SSHIFZA.js +2 -0
- package/dist/cdn/{L62IP5MG.js → 7TYPTEUO.js} +1 -1
- package/dist/cdn/{PT5LBDUL.js → 7W4VZ63Q.js} +1 -1
- package/dist/cdn/{B4SHCCW6.js → A4N2CCY5.js} +1 -1
- package/dist/cdn/{DNYQCUGR.js → AEYF7JUY.js} +1 -1
- package/dist/cdn/ATK6PI6Y.js +2 -0
- package/dist/cdn/{OSCPBA6O.js → B2TVMTK6.js} +1 -1
- package/dist/cdn/{P3W4A5BT.js → B6C2VUVA.js} +1 -1
- package/dist/cdn/{QMSQZWET.js → BB4YRNXH.js} +1 -1
- package/dist/cdn/BBCZRAXL.js +2 -0
- package/dist/cdn/{GCGNKBZK.js → BEKIVNIV.js} +1 -1
- package/dist/cdn/{BVFHM66P.js → BKFGRTKA.js} +1 -1
- package/dist/cdn/{57UFQM3M.js → BPE5SLWI.js} +1 -1
- package/dist/cdn/{QX54642B.js → BPW3YZSA.js} +1 -1
- package/dist/cdn/BV4Q7DF7.js +2 -0
- package/dist/cdn/BWGOISO2.js +2 -0
- package/dist/cdn/CAGGDKGQ.js +2 -0
- package/dist/cdn/CBDAQLDM.js +2 -0
- package/dist/cdn/CFFB5KBR.js +2 -0
- package/dist/cdn/CIUGR4AG.js +2 -0
- package/dist/cdn/D7CVIMMH.js +2 -0
- package/dist/cdn/{XZX7ZHUA.js → DACPQES6.js} +1 -1
- package/dist/cdn/{EHIAXJAL.js → DCWL5FUH.js} +1 -1
- package/dist/cdn/DLYP3NIU.js +2 -0
- package/dist/cdn/{NU744SVB.js → DXV44RVX.js} +1 -1
- package/dist/cdn/E4766PJX.js +2 -0
- package/dist/cdn/EDK4CIKN.js +2 -0
- package/dist/cdn/{NGDCIJ3J.js → EJE24FAS.js} +1 -1
- package/dist/cdn/FDA2HEEU.js +2 -0
- package/dist/cdn/FEOT4U4H.js +2 -0
- package/dist/cdn/{TWXMFG7A.js → FEOZCEUL.js} +1 -1
- package/dist/cdn/{HJRA23WV.js → FPB4I6V3.js} +1 -1
- package/dist/cdn/{526JZ6Y2.js → FRA7Q463.js} +1 -1
- package/dist/cdn/FYDP2JUF.js +2 -0
- package/dist/cdn/G5EDVDJN.js +2 -0
- package/dist/cdn/{56V6AANR.js → GS4P7CZ6.js} +1 -1
- package/dist/cdn/{AELSFDTC.js → GWCMQXMH.js} +1 -1
- package/dist/cdn/GZ532Z3A.js +2 -0
- package/dist/cdn/H5PDBFBD.js +2 -0
- package/dist/cdn/HDWI7YLK.js +2 -0
- package/dist/cdn/HHYQ5CSO.js +2 -0
- package/dist/cdn/{27S7SCHF.js → HKCWKF2E.js} +1 -1
- package/dist/cdn/I2MVFTTS.js +2 -0
- package/dist/cdn/{HBRWGV2Z.js → I5JGKSOP.js} +1 -1
- package/dist/cdn/{6UH6TKTT.js → IO6EAMXC.js} +1 -1
- package/dist/cdn/IQNGXNMD.js +2 -0
- package/dist/cdn/J3ZOZ66B.js +2 -0
- package/dist/cdn/{7KPHVGVG.js → J6NA5WXY.js} +1 -1
- package/dist/cdn/JKUIS3HG.js +2 -0
- package/dist/cdn/JLNU7XYB.js +2 -0
- package/dist/cdn/JSV4G3DZ.js +2 -0
- package/dist/cdn/JZ6UIN5N.js +2 -0
- package/dist/cdn/{WE2SWJDR.js → K3VO2DX3.js} +1 -1
- package/dist/cdn/K6YCV7VU.js +2 -0
- package/dist/cdn/{HAVRDDW3.js → KFJPR56Q.js} +1 -1
- package/dist/cdn/KIAEJJAU.js +2 -0
- package/dist/cdn/KLEO54DZ.js +2 -0
- package/dist/cdn/KMV4MSCP.js +2 -0
- package/dist/cdn/{ZB7NSHVW.js → KO34TYAW.js} +1 -1
- package/dist/cdn/{THSY4EQU.js → KPZKEOBT.js} +1 -1
- package/dist/cdn/KUQ4U67J.js +2 -0
- package/dist/cdn/KUTCWUCT.js +2 -0
- package/dist/cdn/L6D5G4PH.js +2 -0
- package/dist/cdn/LDHR3HDV.js +3 -0
- package/dist/cdn/{OS5HZHBU.js → LPFVHKB3.js} +1 -1
- package/dist/cdn/{4HL2Z5HN.js → LZ27X6AP.js} +1 -1
- package/dist/cdn/{FIYBHBE3.js → MCX3YRKM.js} +1 -1
- package/dist/cdn/MTV62SLS.js +2 -0
- package/dist/cdn/MYAF7KQG.js +2 -0
- package/dist/cdn/{3GV45XL7.js → MYDCGCGV.js} +1 -1
- package/dist/cdn/{RZSXCJTK.js → N5WAVHRO.js} +1 -1
- package/dist/cdn/N5X6SX5X.js +2 -0
- package/dist/cdn/{YBIQF3JQ.js → N6P5V7JQ.js} +1 -1
- package/dist/cdn/{JVNG2BRO.js → N7ZZAOXK.js} +1 -1
- package/dist/cdn/{NCCVRAIB.js → NDCRHHU5.js} +1 -1
- package/dist/cdn/NDHZMLZD.js +2 -0
- package/dist/cdn/OAKVIV3V.js +2 -0
- package/dist/cdn/OLUFWQ3T.js +2 -0
- package/dist/cdn/OW22V3CN.js +2 -0
- package/dist/cdn/P3PFZTXG.js +2 -0
- package/dist/cdn/PB7BFHBD.js +2 -0
- package/dist/cdn/{YGKHTZ4V.js → PQM4JOP2.js} +1 -1
- package/dist/cdn/PVSY2FB5.js +2 -0
- package/dist/cdn/QIAN72XU.js +2 -0
- package/dist/cdn/QM2QUQ6K.js +2 -0
- package/dist/cdn/{KJ42NLHR.js → QOSRAAKR.js} +1 -1
- package/dist/cdn/QUU7OA3L.js +2 -0
- package/dist/cdn/RRWPSIBP.js +2 -0
- package/dist/cdn/{TR56QFJC.js → RXQFAYCF.js} +1 -1
- package/dist/cdn/RY3WILWW.js +2 -0
- package/dist/cdn/{633FBLBS.js → S4DCY5II.js} +1 -1
- package/dist/cdn/SA737JVH.js +2 -0
- package/dist/cdn/SXNSAXIE.js +2 -0
- package/dist/cdn/SYAOC57W.js +4 -0
- package/dist/cdn/{REPXOUSM.js → THHEXAON.js} +1 -1
- package/dist/cdn/TKOBLH76.js +2 -0
- package/dist/cdn/{AECJNJ7Y.js → TLJNCGWA.js} +1 -1
- package/dist/cdn/{27KIJJVA.js → TOC2QZHZ.js} +1 -1
- package/dist/cdn/TQ4EMWFH.js +2 -0
- package/dist/cdn/{JQY63BDJ.js → TQHOYBNL.js} +1 -1
- package/dist/cdn/U6X3AKZ4.js +2 -0
- package/dist/cdn/UH7ME6US.js +2 -0
- package/dist/cdn/{CSXVZ7IA.js → UL42RNNR.js} +1 -1
- package/dist/cdn/{6E6JZIDL.js → V27H7YFB.js} +1 -1
- package/dist/cdn/V4UFOBN6.js +2 -0
- package/dist/cdn/V5NGKYQX.js +2 -0
- package/dist/cdn/VB5PPLXP.js +2 -0
- package/dist/cdn/{IYMANB2G.js → VGH4MGHG.js} +1 -1
- package/dist/cdn/{ETPCGFQN.js → VUECDKXP.js} +1 -1
- package/dist/cdn/{YNGZPTWY.js → VYF67743.js} +1 -1
- package/dist/cdn/{D2EYC7T6.js → W6MK2ZLN.js} +1 -1
- package/dist/cdn/WAX52NHM.js +2 -0
- package/dist/cdn/{RH6ZIP65.js → WGGFNK4Z.js} +1 -1
- package/dist/cdn/X3WUTG7G.js +2 -0
- package/dist/cdn/XALWGFUY.js +2 -0
- package/dist/cdn/XBPB6GCE.js +4 -0
- package/dist/cdn/{46ATGQXN.js → XNYL74DD.js} +1 -1
- package/dist/cdn/XWIKKEHN.js +2 -0
- package/dist/cdn/YHFKLTMV.js +2 -0
- package/dist/cdn/YKK5VHKP.js +2 -0
- package/dist/cdn/YZQARQHE.js +2 -0
- package/dist/cdn/{PKKVWQIA.js → Z3KSPCNP.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/buttons16.json +1 -0
- package/dist/cdn/assets/icon/buttons24.json +1 -0
- package/dist/cdn/assets/icon/buttons32.json +1 -0
- package/dist/cdn/assets/icon/entityTypes16.json +1 -0
- package/dist/cdn/assets/icon/entityTypes24.json +1 -0
- package/dist/cdn/assets/icon/entityTypes32.json +1 -0
- package/dist/cdn/assets/icon/gpsReceiver16.json +1 -0
- package/dist/cdn/assets/icon/gpsReceiver24.json +1 -0
- package/dist/cdn/assets/icon/gpsReceiver32.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/returnToDefault16.json +1 -0
- package/dist/cdn/assets/icon/returnToDefault24.json +1 -0
- package/dist/cdn/assets/icon/returnToDefault32.json +1 -0
- package/dist/cdn/assets/icon/reviewMap16.json +1 -0
- package/dist/cdn/assets/icon/reviewMap24.json +1 -0
- package/dist/cdn/assets/icon/reviewMap32.json +1 -0
- package/dist/cdn/assets/icon/totalStation16.json +1 -0
- package/dist/cdn/assets/icon/totalStation24.json +1 -0
- package/dist/cdn/assets/icon/totalStation32.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 +2 -2
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/ClearButton.js +16 -0
- package/dist/chunks/ExpandToggle.js +2 -2
- package/dist/chunks/Heading.js +3 -3
- package/dist/chunks/component.js +1 -1
- package/dist/chunks/dom.js +49 -28
- package/dist/chunks/floating-ui.js +2 -5
- package/dist/chunks/locale.js +29 -12
- package/dist/chunks/manager.js +505 -0
- 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 +25 -0
- package/dist/chunks/useForm.js +327 -0
- package/dist/chunks/useFormTrigger.js +25 -0
- package/dist/chunks/{sortableComponent.js → useSortable.js} +70 -44
- package/dist/chunks/utils.js +6 -6
- package/dist/chunks/utils3.js +18 -3
- package/dist/components/calcite-accordion-item/customElement.d.ts +6 -6
- package/dist/components/calcite-action/customElement.d.ts +20 -12
- package/dist/components/calcite-action/customElement.js +10 -15
- package/dist/components/calcite-action-bar/customElement.d.ts +4 -4
- package/dist/components/calcite-action-bar/customElement.js +12 -6
- package/dist/components/calcite-action-group/customElement.d.ts +12 -6
- package/dist/components/calcite-action-group/customElement.js +2 -1
- 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 +12 -7
- package/dist/components/calcite-alert/customElement.d.ts +2 -2
- package/dist/components/calcite-alert/customElement.js +1 -1
- package/dist/components/calcite-autocomplete/customElement.d.ts +16 -13
- package/dist/components/calcite-autocomplete/customElement.js +21 -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-block/customElement.d.ts +11 -7
- package/dist/components/calcite-block/customElement.js +1 -1
- package/dist/components/calcite-block-group/customElement.d.ts +1 -1
- package/dist/components/calcite-block-group/customElement.js +4 -11
- 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 +6 -6
- package/dist/components/calcite-button/customElement.js +10 -22
- package/dist/components/calcite-card/customElement.d.ts +11 -5
- package/dist/components/calcite-card/customElement.js +5 -3
- package/dist/components/calcite-card-group/customElement.d.ts +9 -3
- package/dist/components/calcite-card-group/customElement.js +11 -1
- package/dist/components/calcite-carousel/customElement.d.ts +8 -2
- package/dist/components/calcite-carousel/customElement.js +11 -8
- package/dist/components/calcite-carousel/interfaces.d.ts +3 -1
- package/dist/components/calcite-checkbox/customElement.d.ts +4 -5
- package/dist/components/calcite-checkbox/customElement.js +8 -22
- 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-color-picker/customElement.d.ts +2 -2
- package/dist/components/calcite-color-picker/customElement.js +2 -2
- package/dist/components/calcite-color-picker-hex-input/customElement.d.ts +1 -1
- package/dist/components/calcite-color-picker-hex-input/customElement.js +1 -1
- package/dist/components/calcite-color-picker-swatch/customElement.d.ts +1 -1
- package/dist/components/calcite-combobox/customElement.d.ts +5 -5
- package/dist/components/calcite-combobox/customElement.js +195 -108
- package/dist/components/calcite-combobox/index.js +2 -1
- package/dist/components/calcite-combobox-item/customElement.d.ts +1 -1
- package/dist/components/calcite-combobox-item/customElement.js +1 -1
- package/dist/components/calcite-date-picker/customElement.d.ts +1 -1
- package/dist/components/calcite-date-picker/customElement.js +4 -14
- package/dist/components/calcite-date-picker-day/customElement.d.ts +1 -1
- package/dist/components/calcite-date-picker-day/customElement.js +1 -1
- package/dist/components/calcite-date-picker-month/customElement.js +2 -2
- package/dist/components/calcite-date-picker-month-header/customElement.js +1 -1
- package/dist/components/calcite-dialog/customElement.d.ts +7 -5
- package/dist/components/calcite-dialog/customElement.js +4 -2
- package/dist/components/calcite-dropdown/customElement.d.ts +15 -5
- package/dist/components/calcite-dropdown/customElement.js +166 -91
- 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-fab/customElement.js +2 -2
- 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 +8 -5
- package/dist/components/calcite-flow-item/customElement.js +4 -2
- package/dist/components/calcite-graph/customElement.js +1 -1
- package/dist/components/calcite-handle/customElement.d.ts +1 -1
- package/dist/components/calcite-icon/customElement.d.ts +1 -1
- package/dist/components/calcite-inline-editable/customElement.d.ts +2 -2
- 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 +26 -49
- package/dist/components/calcite-input/index.js +1 -0
- package/dist/components/calcite-input-date-picker/customElement.d.ts +6 -7
- package/dist/components/calcite-input-date-picker/customElement.js +67 -76
- package/dist/components/calcite-input-message/customElement.d.ts +1 -1
- package/dist/components/calcite-input-number/customElement.d.ts +13 -14
- package/dist/components/calcite-input-number/customElement.js +22 -48
- package/dist/components/calcite-input-number/index.js +1 -0
- package/dist/components/calcite-input-text/customElement.d.ts +11 -12
- package/dist/components/calcite-input-text/customElement.js +8 -179
- package/dist/components/calcite-input-text/index.js +1 -0
- package/dist/components/calcite-input-time-picker/customElement.d.ts +6 -7
- package/dist/components/calcite-input-time-picker/customElement.js +11 -23
- 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-label/customElement.js +1 -1
- package/dist/components/calcite-link/customElement.d.ts +9 -9
- package/dist/components/calcite-link/customElement.js +28 -23
- package/dist/components/calcite-list/customElement.d.ts +1 -1
- package/dist/components/calcite-list/customElement.js +42 -17
- 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 +7 -4
- package/dist/components/calcite-list-item-group/customElement.js +7 -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 +1 -1
- 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 +9 -2
- package/dist/components/calcite-navigation/customElement.js +56 -3
- package/dist/components/calcite-navigation-logo/customElement.d.ts +3 -3
- package/dist/components/calcite-navigation-logo/customElement.js +4 -3
- package/dist/components/calcite-navigation-user/customElement.d.ts +2 -2
- package/dist/components/calcite-navigation-user/customElement.js +11 -6
- 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 +7 -5
- package/dist/components/calcite-panel/customElement.js +20 -8
- package/dist/components/calcite-popover/customElement.d.ts +2 -2
- package/dist/components/calcite-popover/customElement.js +12 -176
- package/dist/components/calcite-radio-button/customElement.d.ts +16 -1
- package/dist/components/calcite-radio-button/customElement.js +10 -18
- 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-segmented-control/customElement.d.ts +3 -4
- package/dist/components/calcite-segmented-control/customElement.js +8 -19
- package/dist/components/calcite-segmented-control-item/customElement.d.ts +0 -1
- package/dist/components/calcite-segmented-control-item/customElement.js +1 -1
- package/dist/components/calcite-select/customElement.d.ts +3 -4
- package/dist/components/calcite-select/customElement.js +9 -20
- package/dist/components/calcite-sheet/customElement.d.ts +3 -3
- package/dist/components/calcite-sheet/customElement.js +3 -7
- package/dist/components/calcite-shell-panel/customElement.d.ts +4 -4
- package/dist/components/calcite-shell-panel/customElement.js +59 -30
- 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 +3 -3
- 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 +29 -42
- package/dist/components/calcite-stepper-item/customElement.d.ts +1 -1
- package/dist/components/calcite-stepper-item/customElement.js +2 -8
- package/dist/components/calcite-swatch/customElement.d.ts +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 +1 -1
- package/dist/components/calcite-tab-nav/customElement.js +1 -1
- package/dist/components/calcite-tab-title/customElement.js +1 -1
- 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-header/customElement.d.ts +2 -2
- package/dist/components/calcite-table-row/customElement.d.ts +1 -1
- package/dist/components/calcite-tabs/customElement.js +2 -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 +2 -2
- package/dist/components/calcite-tooltip/customElement.d.ts +15 -2
- package/dist/components/calcite-tooltip/customElement.js +24 -315
- package/dist/components/calcite-tree/customElement.js +1 -1
- package/dist/components/calcite-tree-item/customElement.js +2 -3
- 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 +28 -28
- package/dist/types/lumina.d.ts +9 -9
- package/dist/types/preact.d.ts +9 -9
- package/dist/types/react.d.ts +9 -9
- package/dist/types/stencil.d.ts +9 -9
- package/package.json +22 -23
- package/dist/cdn/232WBXIW.js +0 -2
- package/dist/cdn/2CV466KR.js +0 -2
- package/dist/cdn/2XWHTJYS.js +0 -2
- package/dist/cdn/3OCOXFJX.js +0 -2
- package/dist/cdn/3ZTULMLE.js +0 -2
- package/dist/cdn/5D32LNQR.js +0 -2
- package/dist/cdn/5G2KVW4P.js +0 -2
- package/dist/cdn/5H7EBO5K.js +0 -2
- package/dist/cdn/5HB4KJ7Y.js +0 -2
- package/dist/cdn/66YZFACX.js +0 -2
- package/dist/cdn/672VGWH7.js +0 -2
- package/dist/cdn/67O6G5DT.js +0 -2
- package/dist/cdn/6CKEQZO7.js +0 -2
- package/dist/cdn/6XNHTAM2.js +0 -2
- package/dist/cdn/7MRH7XSL.js +0 -2
- package/dist/cdn/7UOYXJ3K.js +0 -2
- package/dist/cdn/AKVWZOJU.js +0 -2
- package/dist/cdn/ARN4B4IT.js +0 -2
- package/dist/cdn/BCO3LX7A.js +0 -2
- package/dist/cdn/BRMCZ6ZG.js +0 -2
- package/dist/cdn/BRXJTIAG.js +0 -2
- package/dist/cdn/C44ME3U7.js +0 -2
- package/dist/cdn/EMOZ2DH3.js +0 -2
- package/dist/cdn/FC5MLLP5.js +0 -2
- package/dist/cdn/FO3VFHYC.js +0 -2
- package/dist/cdn/HGX7LZAA.js +0 -2
- package/dist/cdn/HMZKLPV5.js +0 -2
- package/dist/cdn/IBP55ZGE.js +0 -2
- package/dist/cdn/IIYUSLAE.js +0 -2
- package/dist/cdn/K724PPGV.js +0 -2
- package/dist/cdn/KP6U3OB3.js +0 -2
- package/dist/cdn/KT4JL3GM.js +0 -2
- package/dist/cdn/KZ5EXCXL.js +0 -2
- package/dist/cdn/L3TZLATI.js +0 -2
- package/dist/cdn/LCHIHTFT.js +0 -2
- package/dist/cdn/LKQBHGZ7.js +0 -2
- package/dist/cdn/LOPKPGRY.js +0 -2
- package/dist/cdn/LRM2CLPW.js +0 -2
- package/dist/cdn/LRM7ZHT5.js +0 -2
- package/dist/cdn/LSDUQPFS.js +0 -2
- package/dist/cdn/LTLVP6R6.js +0 -2
- package/dist/cdn/MFSDYV4U.js +0 -2
- package/dist/cdn/NXCII3YU.js +0 -2
- package/dist/cdn/O535TZZ6.js +0 -2
- package/dist/cdn/O7YWW6X6.js +0 -2
- package/dist/cdn/OIYWPY2M.js +0 -2
- package/dist/cdn/OX5RYOW4.js +0 -2
- package/dist/cdn/Q5SNHQHW.js +0 -2
- package/dist/cdn/QID335AW.js +0 -2
- package/dist/cdn/RJSLWYFJ.js +0 -2
- package/dist/cdn/RTJOU72W.js +0 -2
- package/dist/cdn/S3FVUTIY.js +0 -2
- package/dist/cdn/SJYYS7RH.js +0 -2
- package/dist/cdn/SMSVNRM4.js +0 -2
- package/dist/cdn/SSQXPR3D.js +0 -2
- package/dist/cdn/TBVIBCHL.js +0 -2
- package/dist/cdn/TT5S3S4L.js +0 -4
- package/dist/cdn/U3AOFOT7.js +0 -2
- package/dist/cdn/UPE6RIV2.js +0 -2
- package/dist/cdn/V4NX2X3B.js +0 -2
- package/dist/cdn/V6NB5CGO.js +0 -2
- package/dist/cdn/VESBDAE7.js +0 -2
- package/dist/cdn/VKQJIDXT.js +0 -2
- package/dist/cdn/VMMRWNOB.js +0 -3
- package/dist/cdn/W4HQGAKN.js +0 -2
- package/dist/cdn/W5FGAVGO.js +0 -2
- package/dist/cdn/WBP5XEJH.js +0 -2
- package/dist/cdn/WJXZ7BPV.js +0 -2
- package/dist/cdn/WNADDPUF.js +0 -2
- package/dist/cdn/XGRU4PI2.js +0 -2
- package/dist/cdn/XRGPWSUO.js +0 -2
- package/dist/cdn/Y36WJADK.js +0 -2
- package/dist/cdn/Y555OQ57.js +0 -2
- package/dist/cdn/YGHVUKLM.js +0 -2
- package/dist/cdn/YPOMUQHV.js +0 -3
- package/dist/cdn/YWIQC7RF.js +0 -2
- package/dist/cdn/ZHOHVRUX.js +0 -2
- package/dist/cdn/ZQLGBHLZ.js +0 -2
- package/dist/chunks/form.js +0 -268
- package/dist/chunks/input.js +0 -40
- package/dist/controllers/useForm.d.ts +0 -3
- package/dist/utils/form.d.ts +0 -3
- package/dist/utils/sortableComponent.d.ts +0 -7
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import { makeGenericController, bypassReadOnly } from "@arcgis/lumina/controllers";
|
|
3
|
+
import { uncapitalize, kebabToPascal } from "@arcgis/toolkit/string";
|
|
4
|
+
import { r as isCalciteFocusable } from "./dom.js";
|
|
5
|
+
import "lit";
|
|
6
|
+
const minMaxStepTypes = ["date", "datetime-local", "month", "number", "range", "time", "week"];
|
|
7
|
+
const patternTypes = ["email", "password", "search", "tel", "text", "url"];
|
|
8
|
+
const minMaxLengthTypes = ["email", "password", "search", "tel", "text", "textarea", "url"];
|
|
9
|
+
function updateConstraintValidation(inputComponent, input, propName, matchesType) {
|
|
10
|
+
const attributeName = propName.toLowerCase();
|
|
11
|
+
const value = inputComponent[propName];
|
|
12
|
+
if (matchesType && value != null) {
|
|
13
|
+
input.setAttribute(attributeName, `${value}`);
|
|
14
|
+
} else {
|
|
15
|
+
input.removeAttribute(attributeName);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function syncInputDelegate(type, inputComponent, input) {
|
|
19
|
+
input.type = type;
|
|
20
|
+
const isMinMaxStepType = minMaxStepTypes.includes(type);
|
|
21
|
+
const numericInputComponent = inputComponent;
|
|
22
|
+
updateConstraintValidation(numericInputComponent, input, "min", isMinMaxStepType);
|
|
23
|
+
updateConstraintValidation(numericInputComponent, input, "max", isMinMaxStepType);
|
|
24
|
+
updateConstraintValidation(numericInputComponent, input, "step", isMinMaxStepType);
|
|
25
|
+
const isMinMaxLengthType = minMaxLengthTypes.includes(type);
|
|
26
|
+
const textualInputComponent = inputComponent;
|
|
27
|
+
updateConstraintValidation(textualInputComponent, input, "minLength", isMinMaxLengthType);
|
|
28
|
+
updateConstraintValidation(textualInputComponent, input, "maxLength", isMinMaxLengthType);
|
|
29
|
+
const isPatternType = patternTypes.includes(type);
|
|
30
|
+
updateConstraintValidation(textualInputComponent, input, "pattern", isPatternType);
|
|
31
|
+
}
|
|
32
|
+
function isSupportedType(type) {
|
|
33
|
+
const effectiveType = type === "textarea" ? "text" : type;
|
|
34
|
+
return minMaxStepTypes.includes(effectiveType) || patternTypes.includes(effectiveType) || minMaxLengthTypes.includes(effectiveType);
|
|
35
|
+
}
|
|
36
|
+
const joinableValueTypes = ["text", "email", "search", "hidden", "tel", "url"];
|
|
37
|
+
const allValid = Object.freeze({ validity: {}, validationMessage: "" });
|
|
38
|
+
function validate({
|
|
39
|
+
component,
|
|
40
|
+
input,
|
|
41
|
+
value
|
|
42
|
+
}) {
|
|
43
|
+
if (!Array.isArray(value)) {
|
|
44
|
+
if (component && input.type === "radio") {
|
|
45
|
+
let group = component.elementInternals.form?.elements[component.name];
|
|
46
|
+
if (group?.length > 0) {
|
|
47
|
+
group = Array.from(group).filter(
|
|
48
|
+
(element) => element.tagName === component.el.tagName
|
|
49
|
+
);
|
|
50
|
+
const isRequired = group.some((radioTypeElement) => radioTypeElement.required);
|
|
51
|
+
const isChecked = group.some((radioTypeElement) => radioTypeElement.checked);
|
|
52
|
+
const others = group.filter((radioTypeElement) => radioTypeElement !== component.el);
|
|
53
|
+
const valueMissing = isRequired && !isChecked;
|
|
54
|
+
input.required = !!valueMissing;
|
|
55
|
+
const validity = getValidityFlags(input.validity);
|
|
56
|
+
const validationMessage = input.validationMessage;
|
|
57
|
+
if (others?.length > 0) {
|
|
58
|
+
others.forEach((other) => {
|
|
59
|
+
if (valueMissing !== other.validity?.valueMissing && other.setValidity) {
|
|
60
|
+
other.setValidity(validity, validationMessage);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
if (validateValue(input, value)) {
|
|
67
|
+
return allValid;
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
validity: getValidityFlags(input.validity),
|
|
71
|
+
validationMessage: input.validationMessage
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
if (joinableValueTypes.includes(input.type)) {
|
|
75
|
+
if (validateValue(input, value.join(","))) {
|
|
76
|
+
return allValid;
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
validity: getValidityFlags(input.validity),
|
|
80
|
+
validationMessage: input.validationMessage
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
const mergedValidity = {};
|
|
84
|
+
const validationMessages = [];
|
|
85
|
+
for (const item of value) {
|
|
86
|
+
if (validateValue(input, item)) {
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
Object.assign(mergedValidity, getValidityFlags(input.validity));
|
|
90
|
+
if (input.validationMessage) {
|
|
91
|
+
validationMessages.push(input.validationMessage);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return {
|
|
95
|
+
validity: mergedValidity,
|
|
96
|
+
validationMessage: validationMessages.join("; ")
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
function validateValue(inputDelegate, valueToValidate) {
|
|
100
|
+
inputDelegate.value = // file will throw if non-empty string is provided
|
|
101
|
+
inputDelegate.type === "file" || valueToValidate == null ? "" : String(valueToValidate);
|
|
102
|
+
return inputDelegate.validity.valid;
|
|
103
|
+
}
|
|
104
|
+
function getValidityFlags(validityState) {
|
|
105
|
+
const validityFlags = {};
|
|
106
|
+
for (const key in validityState) {
|
|
107
|
+
if (key !== "valid" && validityState[key]) {
|
|
108
|
+
validityFlags[key] = true;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return validityFlags;
|
|
112
|
+
}
|
|
113
|
+
const componentsWithInputEvent = [
|
|
114
|
+
"calcite-input",
|
|
115
|
+
"calcite-input-number",
|
|
116
|
+
"calcite-input-text",
|
|
117
|
+
"calcite-text-area"
|
|
118
|
+
];
|
|
119
|
+
function getClearValidationEventName(componentTag) {
|
|
120
|
+
const componentTagCamelCase = uncapitalize(kebabToPascal(componentTag));
|
|
121
|
+
return `${componentTagCamelCase}${componentsWithInputEvent.includes(componentTag) ? "Input" : "Change"}`;
|
|
122
|
+
}
|
|
123
|
+
function isFormComponentEl(el) {
|
|
124
|
+
return "form" in el && "name" in el && isCalciteFocusable(el);
|
|
125
|
+
}
|
|
126
|
+
function displayValidationMessage(component, { status, message, icon }) {
|
|
127
|
+
if ("status" in component) {
|
|
128
|
+
component.status = status;
|
|
129
|
+
}
|
|
130
|
+
if ("validationIcon" in component && typeof component.validationIcon !== "string") {
|
|
131
|
+
component.validationIcon = icon;
|
|
132
|
+
}
|
|
133
|
+
if ("validationMessage" in component && !component.validationMessage) {
|
|
134
|
+
component.validationMessage = message;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
function syncInternalInput(component, input) {
|
|
138
|
+
const { disabled, name, required } = component;
|
|
139
|
+
input.disabled = disabled;
|
|
140
|
+
input.name = name || "";
|
|
141
|
+
input.required = !!required;
|
|
142
|
+
if (isCheckable(component)) {
|
|
143
|
+
input.checked = component.checked;
|
|
144
|
+
} else if (isInputComponent(component, input)) {
|
|
145
|
+
syncInputDelegate(input.type, component, input);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
function isCheckable(component) {
|
|
149
|
+
return "checked" in component;
|
|
150
|
+
}
|
|
151
|
+
function isInputComponent(component, input) {
|
|
152
|
+
return component && isSupportedType(input.type);
|
|
153
|
+
}
|
|
154
|
+
function focusFirstInvalidFormElement(form) {
|
|
155
|
+
const formElements = Array.from(form.elements);
|
|
156
|
+
requestAnimationFrame(() => {
|
|
157
|
+
const invalidEls = formElements.filter(
|
|
158
|
+
(el) => el.matches("[status=invalid]") && isFormComponentEl(el)
|
|
159
|
+
);
|
|
160
|
+
for (const el of invalidEls) {
|
|
161
|
+
if (el.validationMessage) {
|
|
162
|
+
el.setFocus();
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
const useForm = (options) => {
|
|
169
|
+
return makeGenericController((component, controller) => {
|
|
170
|
+
let customValidityMessage = "";
|
|
171
|
+
let inputDelegate;
|
|
172
|
+
let lastAssociatedForm = null;
|
|
173
|
+
let effectiveInputType = options.inputType;
|
|
174
|
+
if (effectiveInputType) {
|
|
175
|
+
inputDelegate = document.createElement("input");
|
|
176
|
+
}
|
|
177
|
+
function invalidFormHandler(event) {
|
|
178
|
+
if (event.defaultPrevented) {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
event.preventDefault();
|
|
182
|
+
const form = event.currentTarget;
|
|
183
|
+
focusFirstInvalidFormElement(form);
|
|
184
|
+
}
|
|
185
|
+
function onFormReset() {
|
|
186
|
+
if ("status" in component) {
|
|
187
|
+
component.status = "idle";
|
|
188
|
+
}
|
|
189
|
+
if ("validationIcon" in component) {
|
|
190
|
+
component.validationIcon = false;
|
|
191
|
+
}
|
|
192
|
+
if ("validationMessage" in component) {
|
|
193
|
+
component.validationMessage = "";
|
|
194
|
+
}
|
|
195
|
+
if (isCheckable(component)) {
|
|
196
|
+
component.checked = component.defaultChecked;
|
|
197
|
+
}
|
|
198
|
+
component.value = component.defaultValue;
|
|
199
|
+
}
|
|
200
|
+
component.listen("luminaFormResetCallback", () => {
|
|
201
|
+
onFormReset();
|
|
202
|
+
});
|
|
203
|
+
component.listen("luminaFormAssociatedCallback", ({ detail: [form] }) => {
|
|
204
|
+
if (form) {
|
|
205
|
+
form.addEventListener("invalid", invalidFormHandler, { capture: true });
|
|
206
|
+
} else {
|
|
207
|
+
lastAssociatedForm?.removeEventListener("invalid", invalidFormHandler, { capture: true });
|
|
208
|
+
}
|
|
209
|
+
lastAssociatedForm = form;
|
|
210
|
+
});
|
|
211
|
+
function handleInvalidInput() {
|
|
212
|
+
const validationMsg = customValidityMessage || inputDelegate?.validationMessage || "";
|
|
213
|
+
component.el.dispatchEvent(
|
|
214
|
+
// allows users to set custom validation messages
|
|
215
|
+
new CustomEvent("calciteInvalid", { bubbles: true, composed: true })
|
|
216
|
+
);
|
|
217
|
+
displayValidationMessage(component, {
|
|
218
|
+
message: validationMsg,
|
|
219
|
+
icon: true,
|
|
220
|
+
status: "invalid"
|
|
221
|
+
});
|
|
222
|
+
const clearValidationEvent = getClearValidationEventName(component.el.tagName.toLowerCase());
|
|
223
|
+
component.listen(
|
|
224
|
+
clearValidationEvent,
|
|
225
|
+
() => {
|
|
226
|
+
if ("status" in component) {
|
|
227
|
+
component.status = "idle";
|
|
228
|
+
}
|
|
229
|
+
if ("validationIcon" in component && (!component.validationIcon || component.validationIcon === true)) {
|
|
230
|
+
component.validationIcon = false;
|
|
231
|
+
}
|
|
232
|
+
if ("validationMessage" in component && component.validationMessage === validationMsg) {
|
|
233
|
+
component.validationMessage = "";
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
{ once: true }
|
|
237
|
+
);
|
|
238
|
+
}
|
|
239
|
+
controller.onConnected(() => {
|
|
240
|
+
component.el.addEventListener("invalid", handleInvalidInput);
|
|
241
|
+
});
|
|
242
|
+
controller.onDisconnected(() => {
|
|
243
|
+
component.el.removeEventListener("invalid", handleInvalidInput);
|
|
244
|
+
});
|
|
245
|
+
controller.onUpdate((changes) => {
|
|
246
|
+
if (!component.hasUpdated) {
|
|
247
|
+
component.defaultValue = component.value;
|
|
248
|
+
if (isCheckable(component)) {
|
|
249
|
+
component.defaultChecked = component.checked;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
if (changes.has("name") || changes.has("value") || isCheckable(component) && changes.has("checked")) {
|
|
253
|
+
component.elementInternals.setFormValue(getFormValue());
|
|
254
|
+
}
|
|
255
|
+
if (component.hasUpdated) {
|
|
256
|
+
updateValidity();
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
controller.onLoaded(() => updateValidity());
|
|
260
|
+
function updateValidity() {
|
|
261
|
+
const { disabled, elementInternals } = component;
|
|
262
|
+
if (disabled) {
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
let validity = {};
|
|
266
|
+
let validationMessage = "";
|
|
267
|
+
if (inputDelegate) {
|
|
268
|
+
inputDelegate.type = effectiveInputType;
|
|
269
|
+
syncInternalInput(component, inputDelegate);
|
|
270
|
+
({ validity, validationMessage } = validate({ component, input: inputDelegate, value: getComponentValue() }));
|
|
271
|
+
}
|
|
272
|
+
if (customValidityMessage) {
|
|
273
|
+
validity = { ...validity, customError: true };
|
|
274
|
+
validationMessage = customValidityMessage;
|
|
275
|
+
}
|
|
276
|
+
elementInternals.setValidity(validity, validationMessage);
|
|
277
|
+
if ("validity" in component) {
|
|
278
|
+
bypassReadOnly(() => {
|
|
279
|
+
component.validity = elementInternals.validity;
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
function getComponentValue() {
|
|
284
|
+
if (options.getValue) {
|
|
285
|
+
return options.getValue();
|
|
286
|
+
}
|
|
287
|
+
return component.value;
|
|
288
|
+
}
|
|
289
|
+
function getFormValue() {
|
|
290
|
+
const value = getComponentValue();
|
|
291
|
+
if (Array.isArray(value)) {
|
|
292
|
+
const formData = new FormData();
|
|
293
|
+
value.forEach((value2) => formData.append(component.name, value2));
|
|
294
|
+
return formData;
|
|
295
|
+
}
|
|
296
|
+
if (isCheckable(component)) {
|
|
297
|
+
if (component.checked) {
|
|
298
|
+
return value || "on";
|
|
299
|
+
}
|
|
300
|
+
return null;
|
|
301
|
+
}
|
|
302
|
+
return value;
|
|
303
|
+
}
|
|
304
|
+
return {
|
|
305
|
+
get active() {
|
|
306
|
+
return !!component.elementInternals.form;
|
|
307
|
+
},
|
|
308
|
+
overrideDefaultValue: (value) => {
|
|
309
|
+
component.defaultValue = value;
|
|
310
|
+
},
|
|
311
|
+
overrideInputType: (type) => {
|
|
312
|
+
effectiveInputType = type;
|
|
313
|
+
updateValidity();
|
|
314
|
+
},
|
|
315
|
+
requestSubmit: () => {
|
|
316
|
+
component.elementInternals.form?.requestSubmit();
|
|
317
|
+
},
|
|
318
|
+
setCustomValidity: (message) => {
|
|
319
|
+
customValidityMessage = message;
|
|
320
|
+
updateValidity();
|
|
321
|
+
}
|
|
322
|
+
};
|
|
323
|
+
});
|
|
324
|
+
};
|
|
325
|
+
export {
|
|
326
|
+
useForm as u
|
|
327
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import { makeGenericController } from "@arcgis/lumina/controllers";
|
|
3
|
+
const useFormTrigger = (options) => makeGenericController((component) => {
|
|
4
|
+
function clickHandler(event) {
|
|
5
|
+
const { form } = component.elementInternals;
|
|
6
|
+
if (event.defaultPrevented || component.disabled || options?.disabled?.() || !form || component.type === "button") {
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
if (component.type === "submit") {
|
|
10
|
+
form.requestSubmit();
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
form.reset();
|
|
14
|
+
}
|
|
15
|
+
component.listen("luminaFormAssociatedCallback", ({ detail: [form] }) => {
|
|
16
|
+
if (form) {
|
|
17
|
+
component.el.addEventListener("click", clickHandler);
|
|
18
|
+
} else {
|
|
19
|
+
component.el.removeEventListener("click", clickHandler);
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
export {
|
|
24
|
+
useFormTrigger as u
|
|
25
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import { makeGenericController } from "@arcgis/lumina/controllers";
|
|
2
3
|
import Sortable from "sortablejs";
|
|
3
4
|
const sortableComponentSet = /* @__PURE__ */ new Set();
|
|
4
5
|
const CSS = {
|
|
@@ -7,15 +8,17 @@ const CSS = {
|
|
|
7
8
|
dragClass: "calcite-sortable--drag",
|
|
8
9
|
fallbackClass: "calcite-sortable--fallback"
|
|
9
10
|
};
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
function onGlobalDragStart() {
|
|
12
|
+
Array.from(sortableComponentSet).forEach((component) => component.onGlobalDragStart());
|
|
13
|
+
}
|
|
14
|
+
function onGlobalDragEnd() {
|
|
15
|
+
Array.from(sortableComponentSet).forEach((component) => component.onGlobalDragEnd());
|
|
16
|
+
}
|
|
17
|
+
const globalDragState = { active: false };
|
|
18
|
+
function createSortable(component) {
|
|
16
19
|
const dataIdAttr = "id";
|
|
17
|
-
const { group, handleSelector: handle, dragSelector: draggable, sortDisabled } = component;
|
|
18
|
-
|
|
20
|
+
const { el, group, handleSelector: handle, dragSelector: draggable, sortDisabled } = component;
|
|
21
|
+
return Sortable.create(el, {
|
|
19
22
|
dataIdAttr,
|
|
20
23
|
swapThreshold: 0.5,
|
|
21
24
|
...CSS,
|
|
@@ -25,22 +28,26 @@ function connectSortableComponent(component) {
|
|
|
25
28
|
group: {
|
|
26
29
|
name: group,
|
|
27
30
|
...!!component.canPull && {
|
|
28
|
-
pull: (to, from, dragEl, { newDraggableIndex: newIndex, oldDraggableIndex: oldIndex }) =>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
pull: (to, from, dragEl, { newDraggableIndex: newIndex, oldDraggableIndex: oldIndex }) => {
|
|
32
|
+
return component.canPull({
|
|
33
|
+
toEl: to.el,
|
|
34
|
+
fromEl: from.el,
|
|
35
|
+
dragEl,
|
|
36
|
+
newIndex,
|
|
37
|
+
oldIndex
|
|
38
|
+
});
|
|
39
|
+
}
|
|
35
40
|
},
|
|
36
41
|
...!!component.canPut && {
|
|
37
|
-
put: (to, from, dragEl, { newDraggableIndex: newIndex, oldDraggableIndex: oldIndex }) =>
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
put: (to, from, dragEl, { newDraggableIndex: newIndex, oldDraggableIndex: oldIndex }) => {
|
|
43
|
+
return component.canPut({
|
|
44
|
+
toEl: to.el,
|
|
45
|
+
fromEl: from.el,
|
|
46
|
+
dragEl,
|
|
47
|
+
newIndex,
|
|
48
|
+
oldIndex
|
|
49
|
+
});
|
|
50
|
+
}
|
|
44
51
|
}
|
|
45
52
|
}
|
|
46
53
|
},
|
|
@@ -53,12 +60,12 @@ function connectSortableComponent(component) {
|
|
|
53
60
|
handle,
|
|
54
61
|
filter: `${handle}[disabled]`,
|
|
55
62
|
onStart: ({ from: fromEl, item: dragEl, to: toEl, newDraggableIndex: newIndex, oldDraggableIndex: oldIndex }) => {
|
|
56
|
-
|
|
63
|
+
globalDragState.active = true;
|
|
57
64
|
onGlobalDragStart();
|
|
58
65
|
component.onDragStart({ fromEl, dragEl, toEl, newIndex, oldIndex });
|
|
59
66
|
},
|
|
60
67
|
onEnd: ({ from: fromEl, item: dragEl, to: toEl, newDraggableIndex: newIndex, oldDraggableIndex: oldIndex }) => {
|
|
61
|
-
|
|
68
|
+
globalDragState.active = false;
|
|
62
69
|
onGlobalDragEnd();
|
|
63
70
|
component.onDragEnd({ fromEl, dragEl, toEl, newIndex, oldIndex });
|
|
64
71
|
},
|
|
@@ -67,25 +74,44 @@ function connectSortableComponent(component) {
|
|
|
67
74
|
}
|
|
68
75
|
});
|
|
69
76
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
77
|
+
const useSortable = () => {
|
|
78
|
+
return makeGenericController((component, controller) => {
|
|
79
|
+
let sortable;
|
|
80
|
+
function dragActive(component2) {
|
|
81
|
+
return component2.dragEnabled && globalDragState.active;
|
|
82
|
+
}
|
|
83
|
+
function setUpSortable(component2) {
|
|
84
|
+
if (dragActive(component2)) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
tearDownSortable(component2);
|
|
88
|
+
if (!component2.dragEnabled) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
sortableComponentSet.add(component2);
|
|
92
|
+
sortable = createSortable(component2);
|
|
93
|
+
}
|
|
94
|
+
function tearDownSortable(component2) {
|
|
95
|
+
if (dragActive(component2)) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
sortableComponentSet.delete(component2);
|
|
99
|
+
sortable?.destroy();
|
|
100
|
+
sortable = void 0;
|
|
101
|
+
}
|
|
102
|
+
controller.onConnected(() => {
|
|
103
|
+
setUpSortable(component);
|
|
104
|
+
});
|
|
105
|
+
controller.onDisconnected(() => {
|
|
106
|
+
tearDownSortable(component);
|
|
107
|
+
});
|
|
108
|
+
return {
|
|
109
|
+
reset: () => {
|
|
110
|
+
setUpSortable(component);
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
});
|
|
114
|
+
};
|
|
88
115
|
export {
|
|
89
|
-
|
|
90
|
-
disconnectSortableComponent as d
|
|
116
|
+
useSortable as u
|
|
91
117
|
};
|
package/dist/chunks/utils.js
CHANGED
|
@@ -305,16 +305,16 @@ export {
|
|
|
305
305
|
hexToRGB as h,
|
|
306
306
|
isValidHex as i,
|
|
307
307
|
CSS as j,
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
308
|
+
HUE_LIMIT_CONSTRAINED as k,
|
|
309
|
+
normalizeAlpha as l,
|
|
310
|
+
alphaToOpacity as m,
|
|
311
311
|
normalizeHex as n,
|
|
312
312
|
opacityToAlpha as o,
|
|
313
313
|
parseMode as p,
|
|
314
|
-
|
|
315
|
-
|
|
314
|
+
SCOPE_SIZE as q,
|
|
315
|
+
toAlphaMode as r,
|
|
316
316
|
isLonghandHex as s,
|
|
317
|
-
|
|
317
|
+
toNonAlphaMode as t,
|
|
318
318
|
isShorthandHex as u,
|
|
319
319
|
rgbToHex as v,
|
|
320
320
|
hexChar as w
|
package/dist/chunks/utils3.js
CHANGED
|
@@ -53,8 +53,23 @@ function applyLocaleOverride(locale) {
|
|
|
53
53
|
function getValueAsDateRange(value) {
|
|
54
54
|
return value.map((v, index) => dateFromISO(v, index === 1));
|
|
55
55
|
}
|
|
56
|
+
function getSource(changes, stringProp, dateProp) {
|
|
57
|
+
const stringPropChanged = changes.has(stringProp);
|
|
58
|
+
const datePropChanged = changes.has(dateProp);
|
|
59
|
+
if (stringPropChanged && !datePropChanged) {
|
|
60
|
+
return stringProp;
|
|
61
|
+
}
|
|
62
|
+
if (datePropChanged && !stringPropChanged) {
|
|
63
|
+
return dateProp;
|
|
64
|
+
}
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
function getMinMaxSource(changes, type) {
|
|
68
|
+
return type === "min" ? getSource(changes, "min", "minAsDate") : getSource(changes, "max", "maxAsDate");
|
|
69
|
+
}
|
|
56
70
|
export {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
71
|
+
getValueAsDateRange as a,
|
|
72
|
+
applyLocaleOverride as b,
|
|
73
|
+
getLocaleData as c,
|
|
74
|
+
getMinMaxSource as g
|
|
60
75
|
};
|
|
@@ -10,8 +10,8 @@ import type { HeadingLevel } from "../functional/Heading.js";
|
|
|
10
10
|
* @cssproperty [--calcite-accordion-text-color] - Specifies the component's text color.
|
|
11
11
|
* @cssproperty [--calcite-accordion-text-color-hover] - Specifies the component's main text color on hover.
|
|
12
12
|
* @cssproperty [--calcite-accordion-text-color-press] - Specifies the component's main text color when pressed.
|
|
13
|
-
* @cssproperty [--calcite-accordion-item-background-color] - [Deprecated] Use `--calcite-accordion-background-color
|
|
14
|
-
* @cssproperty [--calcite-accordion-item-border-color] - [Deprecated] Use `--calcite-accordion-border-color
|
|
13
|
+
* @cssproperty [--calcite-accordion-item-background-color] - [Deprecated] in v3.1.0, removal target v6.0.0 - Use `--calcite-accordion-background-color` instead. Specifies the component's background color.
|
|
14
|
+
* @cssproperty [--calcite-accordion-item-border-color] - [Deprecated] in v3.1.0, removal target v6.0.0 - Use `--calcite-accordion-border-color` instead. Specifies the component's border color.
|
|
15
15
|
* @cssproperty [--calcite-accordion-item-content-space] - Specifies the component's padding.
|
|
16
16
|
* @cssproperty [--calcite-accordion-item-end-icon-color] - Specifies the component's `iconEnd` color. Falls back to `--calcite-accordion-item-icon-color` or current color.
|
|
17
17
|
* @cssproperty [--calcite-accordion-item-expand-icon-color] - Specifies the component's expand icon color.
|
|
@@ -19,10 +19,10 @@ import type { HeadingLevel } from "../functional/Heading.js";
|
|
|
19
19
|
* @cssproperty [--calcite-accordion-item-header-background-color-hover] - Specifies the component's `heading` background color when hovered.
|
|
20
20
|
* @cssproperty [--calcite-accordion-item-header-background-color-press] - Specifies the component's `heading` background color when pressed.
|
|
21
21
|
* @cssproperty [--calcite-accordion-item-heading-text-color] - Specifies the component's `heading` text color.
|
|
22
|
-
* @cssproperty [--calcite-accordion-item-icon-color] - [Deprecated] Use `--calcite-icon-color
|
|
22
|
+
* @cssproperty [--calcite-accordion-item-icon-color] - [Deprecated] in v3.1.0, removal target v6.0.0 - Use `--calcite-icon-color` instead. Specifies the component's default icon color.
|
|
23
23
|
* @cssproperty [--calcite-accordion-item-start-icon-color] - Specifies the component's `iconStart` color. Falls back to `--calcite-accordion-item-icon-color` or current color.
|
|
24
|
-
* @cssproperty [--calcite-accordion-item-text-color] - [Deprecated] Use `--calcite-accordion-text-color
|
|
25
|
-
* @cssproperty [--calcite-accordion-item-text-color-hover] - [Deprecated] Use `--calcite-accordion-text-color-hover
|
|
24
|
+
* @cssproperty [--calcite-accordion-item-text-color] - [Deprecated] in v3.1.0, removal target v6.0.0 - Use `--calcite-accordion-text-color` instead. Specifies the component's text color.
|
|
25
|
+
* @cssproperty [--calcite-accordion-item-text-color-hover] - [Deprecated] in v3.1.0, removal target v6.0.0 - Use `--calcite-accordion-text-color-hover` instead. Specifies the component's text color on hover.
|
|
26
26
|
* @slot - A slot for adding custom content, including nested `calcite-accordion-item`s.
|
|
27
27
|
* @slot [actions-end] - A slot for adding `calcite-action`s or content to the end side of the component's header.
|
|
28
28
|
* @slot [actions-start] - A slot for adding `calcite-action`s or content to the start side of the component's header.
|
|
@@ -57,7 +57,7 @@ export abstract class AccordionItem extends LitElement {
|
|
|
57
57
|
* Sets focus on the component.
|
|
58
58
|
*
|
|
59
59
|
* @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
|
|
60
|
-
* @
|
|
60
|
+
* @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
|
|
61
61
|
*/
|
|
62
62
|
setFocus(options?: FocusOptions): Promise<void>;
|
|
63
63
|
/** Fires when the component's content area is collapsed. */
|