@esri/calcite-components 5.1.0-next.5 → 5.1.0-next.51
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/2I23BJUK.js +2 -0
- package/dist/cdn/2MK42DZ4.js +2 -0
- package/dist/cdn/2RVF53XU.js +2 -0
- package/dist/cdn/{25YVFVC7.js → 2VEIQ62E.js} +1 -1
- package/dist/cdn/36JLOHBC.js +2 -0
- package/dist/cdn/{HHOMMC4H.js → 3B5PYTVX.js} +1 -1
- package/dist/cdn/3BZBBTUA.js +2 -0
- package/dist/cdn/3FXX3SBS.js +2 -0
- package/dist/cdn/3JTJC2PS.js +2 -0
- package/dist/cdn/3N3O22QG.js +2 -0
- package/dist/cdn/3ZXALV6G.js +2 -0
- package/dist/cdn/43E5QBXB.js +2 -0
- package/dist/cdn/{IJP6ZKHZ.js → 456IFPIW.js} +1 -1
- package/dist/cdn/{GNDNKP2Q.js → 4F5KQIRB.js} +1 -1
- package/dist/cdn/4HQ5QYH2.js +2 -0
- package/dist/cdn/{ZKPCUAN2.js → 4J3DARRE.js} +1 -1
- package/dist/cdn/4R54D2BX.js +2 -0
- package/dist/cdn/4RTJFM5B.js +2 -0
- package/dist/cdn/4TA4AAFT.js +2 -0
- package/dist/cdn/52IJCUEV.js +2 -0
- package/dist/cdn/5EOFDLJO.js +2 -0
- package/dist/cdn/{2QARK4VJ.js → 5M27WGKA.js} +1 -1
- package/dist/cdn/5WVRAQRW.js +2 -0
- package/dist/cdn/6BFJTIPA.js +2 -0
- package/dist/cdn/{5TCLHXAD.js → 6D5PCSHS.js} +1 -1
- package/dist/cdn/6TSA7FLB.js +2 -0
- package/dist/cdn/{HUNZU2OF.js → 73ORJJZS.js} +1 -1
- package/dist/cdn/{5SU52VYR.js → 75SY2WE4.js} +1 -1
- package/dist/cdn/{VB7GHJWK.js → 7ECSU3T3.js} +1 -1
- package/dist/cdn/{RGKOGN5W.js → 7GZ4RW44.js} +1 -1
- package/dist/cdn/{NAFJ5ZYO.js → 7NDXWX7R.js} +1 -1
- package/dist/cdn/{5L7CGWWD.js → 7RZYNANK.js} +1 -1
- package/dist/cdn/{DY6SXW3X.js → A2KNWLOL.js} +1 -1
- package/dist/cdn/{BPSXK66S.js → AEPM5SJO.js} +1 -1
- package/dist/cdn/{ZVFZSDLX.js → AEZOU5JE.js} +1 -1
- package/dist/cdn/{NIBBUVHR.js → AK66BMBC.js} +1 -1
- package/dist/cdn/{RRNEZXM4.js → AR7ZPQQG.js} +1 -1
- package/dist/cdn/B6R2YN2X.js +2 -0
- package/dist/cdn/{NNSUCRNU.js → BF7DR726.js} +1 -1
- package/dist/cdn/BHS72XYT.js +2 -0
- package/dist/cdn/{UUHRTJGO.js → C42SNF33.js} +1 -1
- package/dist/cdn/C53YAAVC.js +2 -0
- package/dist/cdn/CDSIG642.js +2 -0
- package/dist/cdn/CJGERVGF.js +4 -0
- package/dist/cdn/{3NNVHOGK.js → CRL6VQWS.js} +1 -1
- package/dist/cdn/{KVPLQQ75.js → DAQX6BT3.js} +1 -1
- package/dist/cdn/{EHIAXJAL.js → DCWL5FUH.js} +1 -1
- package/dist/cdn/{AJKEEG2Z.js → DUAPF33E.js} +1 -1
- package/dist/cdn/DWPX74WA.js +2 -0
- package/dist/cdn/{YQOYGBGD.js → EBGVT22W.js} +1 -1
- package/dist/cdn/EW3UPJT7.js +2 -0
- package/dist/cdn/FB545PKU.js +2 -0
- package/dist/cdn/GFPWU57X.js +2 -0
- package/dist/cdn/{O75ZRZLS.js → GTALENKO.js} +1 -1
- package/dist/cdn/H5UVCR64.js +2 -0
- package/dist/cdn/{ODOOWGRW.js → H6UBX3WZ.js} +1 -1
- package/dist/cdn/HGRS2NBC.js +2 -0
- package/dist/cdn/{QVTLP2LK.js → HM2E526S.js} +1 -1
- package/dist/cdn/HPVBLELP.js +2 -0
- package/dist/cdn/{FWEFFYYZ.js → HPWLGQL6.js} +1 -1
- package/dist/cdn/{752PQ7IA.js → HULUX4S6.js} +1 -1
- package/dist/cdn/{MQMNX7AM.js → I24CZVLP.js} +1 -1
- package/dist/cdn/{2GS6R2BX.js → IHLWJXZV.js} +1 -1
- package/dist/cdn/{NMIBGEIB.js → IIBZXYLU.js} +1 -1
- package/dist/cdn/{SVHI2LRC.js → IRVWWA2A.js} +1 -1
- package/dist/cdn/{DR7JKZAI.js → ISMO77VP.js} +1 -1
- package/dist/cdn/{2Z4Z3NMS.js → IZEFSP2C.js} +1 -1
- package/dist/cdn/JA5TE633.js +2 -0
- package/dist/cdn/JKAB4LS7.js +2 -0
- package/dist/cdn/{42NQN6DY.js → JLGDNYBI.js} +1 -1
- package/dist/cdn/{PNXNTD3R.js → JOTX7MS6.js} +1 -1
- package/dist/cdn/{3LOKHBAB.js → K43SJYRB.js} +1 -1
- package/dist/cdn/{ALC6PGDZ.js → K7UPFMP3.js} +1 -1
- package/dist/cdn/{X53XDNBL.js → KC5UAIPG.js} +1 -1
- package/dist/cdn/{6XJYCX76.js → KDMQ3W3P.js} +1 -1
- package/dist/cdn/{HGRVTRR3.js → KIIYDDSF.js} +1 -1
- package/dist/cdn/KJUZSP7X.js +2 -0
- package/dist/cdn/KVNTMFIR.js +2 -0
- package/dist/cdn/{OGOI7JTF.js → KWNGJXWC.js} +1 -1
- package/dist/cdn/{K4R3HUW3.js → KXSIX7V7.js} +1 -1
- package/dist/cdn/LA3AJSXV.js +2 -0
- package/dist/cdn/LSOSPUDS.js +2 -0
- package/dist/cdn/M4BORA6H.js +2 -0
- package/dist/cdn/{3L2WKJUB.js → M77EYDBR.js} +1 -1
- package/dist/cdn/{D7UER3G6.js → MAH7GW3L.js} +1 -1
- package/dist/cdn/{UYYGQ6AY.js → MFLXU5FA.js} +1 -1
- package/dist/cdn/{C25VFIND.js → MRXZATZZ.js} +1 -1
- package/dist/cdn/MU5LNKS7.js +2 -0
- package/dist/cdn/MUMG74E5.js +2 -0
- package/dist/cdn/MVK6LWK5.js +2 -0
- package/dist/cdn/{3GV45XL7.js → MYDCGCGV.js} +1 -1
- package/dist/cdn/MYKZPZDR.js +2 -0
- package/dist/cdn/{CWQZDXHH.js → NIASU3O6.js} +1 -1
- package/dist/cdn/{22IPJDDL.js → NKBT2QG4.js} +1 -1
- package/dist/cdn/NL6QGGPB.js +2 -0
- package/dist/cdn/NPKYZEEF.js +2 -0
- package/dist/cdn/{ZPJ4FGXO.js → OFR37WBK.js} +1 -1
- package/dist/cdn/{SP22KLIK.js → OL7ZYBX6.js} +1 -1
- package/dist/cdn/P6VMV62Z.js +2 -0
- package/dist/cdn/{B55VO4LW.js → PDXU6HPZ.js} +1 -1
- package/dist/cdn/PIKLS5KR.js +2 -0
- package/dist/cdn/PJ4SD5FY.js +2 -0
- package/dist/cdn/PLG6IIYK.js +3 -0
- package/dist/cdn/{NT6RQTF7.js → PPBHKZJI.js} +1 -1
- package/dist/cdn/{H77SNVVI.js → Q75PWKQ3.js} +1 -1
- package/dist/cdn/QJBPXLTP.js +2 -0
- package/dist/cdn/{Q52IY7SS.js → QLOR2RB5.js} +1 -1
- package/dist/cdn/QTHYRIFY.js +2 -0
- package/dist/cdn/QVXAQXDL.js +2 -0
- package/dist/cdn/R2ZRQO3L.js +2 -0
- package/dist/cdn/RGLUZ76B.js +2 -0
- package/dist/cdn/{EY4MG3NU.js → RPAL2ENA.js} +1 -1
- package/dist/cdn/{ZKCFISUX.js → RRJKRT7F.js} +1 -1
- package/dist/cdn/S7EIG7Q5.js +2 -0
- package/dist/cdn/{5J2UYJYX.js → SCXKWH7Z.js} +1 -1
- package/dist/cdn/{PYD5GHXA.js → SKAIHX6Z.js} +1 -1
- package/dist/cdn/{IU4TJIME.js → SXV7WCPS.js} +1 -1
- package/dist/cdn/T4Q6C4CT.js +2 -0
- package/dist/cdn/TGQJUML7.js +2 -0
- package/dist/cdn/TSNOYPVI.js +2 -0
- package/dist/cdn/{MM6LZCYO.js → TZ7BLX2N.js} +1 -1
- package/dist/cdn/{TZFOTRCX.js → U63LB523.js} +1 -1
- package/dist/cdn/U6HPCAAW.js +2 -0
- package/dist/cdn/{UVJ3XYK5.js → UPTGE4WC.js} +1 -1
- package/dist/cdn/USOHYTXD.js +2 -0
- package/dist/cdn/{T2MUZ4UN.js → UY7QVK74.js} +1 -1
- package/dist/cdn/VFLSIH3H.js +2 -0
- package/dist/cdn/{Y5FMVLYP.js → VHLCDJKY.js} +1 -1
- package/dist/cdn/{G4QI7VSJ.js → VRI5YMPE.js} +1 -1
- package/dist/cdn/{Z6LSD6MR.js → WBP7WHU4.js} +1 -1
- package/dist/cdn/WCTTX5WL.js +2 -0
- package/dist/cdn/{RH6ZIP65.js → WGGFNK4Z.js} +1 -1
- package/dist/cdn/WXDRYIO2.js +2 -0
- package/dist/cdn/WZ6F5SCK.js +2 -0
- package/dist/cdn/X2NBQO5I.js +2 -0
- package/dist/cdn/{IFLPCKYL.js → X44HUYME.js} +1 -1
- package/dist/cdn/XKYXT27V.js +2 -0
- package/dist/cdn/XUU2MRGP.js +2 -0
- package/dist/cdn/XUYLYALV.js +2 -0
- package/dist/cdn/XYFV7S74.js +2 -0
- package/dist/cdn/ZEUCKTPG.js +2 -0
- package/dist/cdn/ZKHWMGW5.js +2 -0
- package/dist/cdn/ZMX2MKUW.js +2 -0
- package/dist/cdn/ZOQOJDXL.js +2 -0
- package/dist/cdn/ZQCRV5XI.js +2 -0
- package/dist/cdn/ZRXGDZZT.js +4 -0
- 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/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 +3 -3
- 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 +14 -12
- package/dist/components/calcite-action/customElement.js +8 -14
- package/dist/components/calcite-action-bar/customElement.d.ts +12 -3
- package/dist/components/calcite-action-bar/customElement.js +47 -16
- 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 +11 -6
- 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 +20 -31
- 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 +5 -5
- 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 +1 -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-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 +165 -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-fab/customElement.js +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 +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 +66 -75
- 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 +33 -14
- 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 +4 -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-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 +42 -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 +11 -175
- 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.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 +3 -3
- package/dist/components/calcite-shell-panel/customElement.js +4 -0
- 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 +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 +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-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 +8 -8
- package/dist/types/preact.d.ts +8 -8
- package/dist/types/react.d.ts +8 -8
- package/dist/types/stencil.d.ts +8 -8
- package/package.json +15 -16
- package/dist/cdn/25CWB6HX.js +0 -2
- package/dist/cdn/3KLZFJXW.js +0 -2
- package/dist/cdn/3WLFK4RW.js +0 -2
- package/dist/cdn/462JN5WF.js +0 -2
- package/dist/cdn/464S36UH.js +0 -2
- package/dist/cdn/4ALKCXNH.js +0 -2
- package/dist/cdn/4GQPJFUJ.js +0 -2
- package/dist/cdn/4GVH7HTQ.js +0 -2
- package/dist/cdn/4J6YW6EK.js +0 -2
- package/dist/cdn/52ZOO5HQ.js +0 -2
- package/dist/cdn/5HTRQR7F.js +0 -2
- package/dist/cdn/6NEHFZMJ.js +0 -2
- package/dist/cdn/6VRXKEA7.js +0 -2
- package/dist/cdn/7RSGSW76.js +0 -2
- package/dist/cdn/7UOYXJ3K.js +0 -2
- package/dist/cdn/A2UZRUUF.js +0 -2
- package/dist/cdn/A7IQIXR3.js +0 -2
- package/dist/cdn/AEUCGVU4.js +0 -2
- package/dist/cdn/BIEIKUB2.js +0 -2
- package/dist/cdn/BS22M3WT.js +0 -2
- package/dist/cdn/BWDCDFXW.js +0 -2
- package/dist/cdn/CXVISA7Y.js +0 -2
- package/dist/cdn/ED7SQQHM.js +0 -3
- package/dist/cdn/EFNE45MK.js +0 -2
- package/dist/cdn/EGK4PSW5.js +0 -2
- package/dist/cdn/EJCQCHH7.js +0 -2
- package/dist/cdn/ENCYKNKN.js +0 -4
- package/dist/cdn/EZW5GK73.js +0 -2
- package/dist/cdn/GEQ3EBJO.js +0 -2
- package/dist/cdn/GLJVCFQW.js +0 -2
- package/dist/cdn/HAUWZRL4.js +0 -2
- package/dist/cdn/HBUNMGZ3.js +0 -2
- package/dist/cdn/HFGDCX3I.js +0 -2
- package/dist/cdn/J42TNDHM.js +0 -2
- package/dist/cdn/J4J65DN5.js +0 -2
- package/dist/cdn/KBHLSIAR.js +0 -2
- package/dist/cdn/KKMGV3S6.js +0 -2
- package/dist/cdn/KUC6KV4R.js +0 -2
- package/dist/cdn/KVRUYI63.js +0 -2
- package/dist/cdn/MLQDQZZR.js +0 -2
- package/dist/cdn/N47CSPB7.js +0 -2
- package/dist/cdn/O6ZRTXVO.js +0 -2
- package/dist/cdn/OCFKSX5L.js +0 -2
- package/dist/cdn/OO556Q5A.js +0 -2
- package/dist/cdn/PGUOVY7V.js +0 -2
- package/dist/cdn/PJ3GHZ7T.js +0 -2
- package/dist/cdn/Q4EG6G7W.js +0 -2
- package/dist/cdn/QEPJF6TC.js +0 -3
- package/dist/cdn/QHZAKDI7.js +0 -2
- package/dist/cdn/QIUVPLV2.js +0 -2
- package/dist/cdn/R3DLH5BB.js +0 -2
- package/dist/cdn/R5DGN3O6.js +0 -2
- package/dist/cdn/RU3YCR42.js +0 -2
- package/dist/cdn/SF7SFEKA.js +0 -2
- package/dist/cdn/SKOYS4HM.js +0 -2
- package/dist/cdn/TAS3P2HU.js +0 -2
- package/dist/cdn/TBA5ATIB.js +0 -2
- package/dist/cdn/TW2SRS2O.js +0 -2
- package/dist/cdn/V2PPBU7J.js +0 -2
- package/dist/cdn/VIMF6KPF.js +0 -2
- package/dist/cdn/VYSJFEY6.js +0 -2
- package/dist/cdn/WI7KEIGV.js +0 -2
- package/dist/cdn/WJXZ7BPV.js +0 -2
- package/dist/cdn/WOJJ53FN.js +0 -2
- package/dist/cdn/WSRLM2TQ.js +0 -2
- package/dist/cdn/XPXJW5E3.js +0 -2
- package/dist/cdn/XXVIE4SD.js +0 -2
- package/dist/cdn/YBZVV5BN.js +0 -2
- package/dist/cdn/Z3B276DZ.js +0 -2
- package/dist/cdn/ZDZGWD2Y.js +0 -2
- package/dist/cdn/ZIKLLQSU.js +0 -2
- package/dist/cdn/ZQLGBHLZ.js +0 -2
- package/dist/cdn/ZZ746O36.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
|
@@ -4,13 +4,13 @@ import { css, isServer, nothing, html } from "lit";
|
|
|
4
4
|
import { LitElement, createEvent, stringOrBoolean, safeClassMap } from "@arcgis/lumina";
|
|
5
5
|
import { useDirection } from "@arcgis/lumina/controllers";
|
|
6
6
|
import { a as slotChangeGetAssignedElements } from "../../chunks/dom.js";
|
|
7
|
-
import { c as connectForm, a as afterConnectDefaultValueSet, d as disconnectForm, H as HiddenFormInputSlot } from "../../chunks/form.js";
|
|
8
7
|
import { c as connectLabel, d as disconnectLabel, g as getLabelText } from "../../chunks/label.js";
|
|
9
8
|
import { I as InternalLabel } from "../../chunks/InternalLabel.js";
|
|
10
9
|
import { V as Validation } from "../../chunks/Validation.js";
|
|
11
10
|
import { u as useT9n } from "../../chunks/useT9n.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
|
const CSS = {
|
|
15
15
|
itemWrapper: "item-wrapper"
|
|
16
16
|
};
|
|
@@ -22,6 +22,7 @@ class SegmentedControl extends LitElement {
|
|
|
22
22
|
constructor() {
|
|
23
23
|
super();
|
|
24
24
|
this.direction = useDirection();
|
|
25
|
+
this.formSupport = useForm({ inputType: "text" })(this);
|
|
25
26
|
this.items = [];
|
|
26
27
|
this.messages = useT9n();
|
|
27
28
|
this.focusSetter = useSetFocus()(this);
|
|
@@ -32,19 +33,6 @@ class SegmentedControl extends LitElement {
|
|
|
32
33
|
this.required = false;
|
|
33
34
|
this.scale = "m";
|
|
34
35
|
this.status = "idle";
|
|
35
|
-
this.validity = {
|
|
36
|
-
valid: false,
|
|
37
|
-
badInput: false,
|
|
38
|
-
customError: false,
|
|
39
|
-
patternMismatch: false,
|
|
40
|
-
rangeOverflow: false,
|
|
41
|
-
rangeUnderflow: false,
|
|
42
|
-
stepMismatch: false,
|
|
43
|
-
tooLong: false,
|
|
44
|
-
tooShort: false,
|
|
45
|
-
typeMismatch: false,
|
|
46
|
-
valueMissing: false
|
|
47
|
-
};
|
|
48
36
|
this.value = null;
|
|
49
37
|
this.width = "auto";
|
|
50
38
|
this.calciteSegmentedControlChange = createEvent({ cancelable: false });
|
|
@@ -53,7 +41,10 @@ class SegmentedControl extends LitElement {
|
|
|
53
41
|
this.listen("click", this.handleClick);
|
|
54
42
|
}
|
|
55
43
|
static {
|
|
56
|
-
this.properties = { appearance: [3, {}, { reflect: true }], disabled: [7, {}, { reflect: true, type: Boolean }], form: [3, {}, { reflect: true }], layout: [3, {}, { reflect: true }], labelText: 1, messageOverrides: [0, {}, { attribute: false }], name: [3, {}, { reflect: true }], required: [7, {}, { reflect: true, type: Boolean }], scale: [3, {}, { reflect: true }], selectedItem: [0, {}, { attribute: false }], status: [3, {}, { reflect: true }], validationIcon: [3, { converter: stringOrBoolean, type: String }, { reflect: true }], validationMessage: 1, validity: [
|
|
44
|
+
this.properties = { appearance: [3, {}, { reflect: true }], disabled: [7, {}, { reflect: true, type: Boolean }], form: [3, {}, { reflect: true }], layout: [3, {}, { reflect: true }], labelText: 1, messageOverrides: [0, {}, { attribute: false }], name: [3, {}, { reflect: true }], required: [7, {}, { reflect: true, type: Boolean }], scale: [3, {}, { reflect: true }], selectedItem: [0, {}, { attribute: false }], status: [3, {}, { reflect: true }], validationIcon: [3, { converter: stringOrBoolean, type: String }, { reflect: true }], validationMessage: 1, validity: [32, {}, { readOnly: true, attribute: false }], value: 1, width: [3, {}, { reflect: true }] };
|
|
45
|
+
}
|
|
46
|
+
static {
|
|
47
|
+
this.formAssociated = true;
|
|
57
48
|
}
|
|
58
49
|
static {
|
|
59
50
|
this.styles = styles;
|
|
@@ -64,7 +55,6 @@ class SegmentedControl extends LitElement {
|
|
|
64
55
|
connectedCallback() {
|
|
65
56
|
super.connectedCallback();
|
|
66
57
|
connectLabel(this);
|
|
67
|
-
connectForm(this);
|
|
68
58
|
}
|
|
69
59
|
willUpdate(changes) {
|
|
70
60
|
if (changes.has("appearance") && (this.hasUpdated || this.appearance !== "solid") || changes.has("layout") && (this.hasUpdated || this.layout !== "horizontal") || changes.has("scale") && (this.hasUpdated || this.scale !== "m")) {
|
|
@@ -78,12 +68,11 @@ class SegmentedControl extends LitElement {
|
|
|
78
68
|
}
|
|
79
69
|
}
|
|
80
70
|
loaded() {
|
|
81
|
-
|
|
71
|
+
this.formSupport.overrideDefaultValue(this.value);
|
|
82
72
|
}
|
|
83
73
|
disconnectedCallback() {
|
|
84
74
|
super.disconnectedCallback();
|
|
85
75
|
disconnectLabel(this);
|
|
86
|
-
disconnectForm(this);
|
|
87
76
|
}
|
|
88
77
|
valueHandler(value) {
|
|
89
78
|
const { items } = this;
|
|
@@ -218,7 +207,7 @@ class SegmentedControl extends LitElement {
|
|
|
218
207
|
}
|
|
219
208
|
render() {
|
|
220
209
|
this.el.role = "radiogroup";
|
|
221
|
-
return html`${this.labelText && InternalLabel({ labelText: this.labelText, onClick: this.onLabelClick, required: this.required, tooltipText: this.messages.required }) || ""}<div aria-errormessage=${IDS.validationMessage} aria-label=${getLabelText(this) ?? nothing} .ariaInvalid=${this.status === "invalid"} .ariaRequired=${this.required} class=${safeClassMap(CSS.itemWrapper)}>${this.interactiveContainer({ disabled: this.disabled, children: html`<slot @slotchange=${this.handleDefaultSlotChange}></slot
|
|
210
|
+
return html`${this.labelText && InternalLabel({ labelText: this.labelText, onClick: this.onLabelClick, required: this.required, tooltipText: this.messages.required }) || ""}<div aria-errormessage=${IDS.validationMessage} aria-label=${getLabelText(this) ?? nothing} .ariaInvalid=${this.status === "invalid"} .ariaRequired=${this.required} class=${safeClassMap(CSS.itemWrapper)}>${this.interactiveContainer({ disabled: this.disabled, children: html`<slot @slotchange=${this.handleDefaultSlotChange}></slot>` })}</div>${this.validationMessage && this.status === "invalid" ? Validation({ icon: this.validationIcon, id: IDS.validationMessage, message: this.validationMessage, scale: this.scale, status: this.status }) : null}`;
|
|
222
211
|
}
|
|
223
212
|
}
|
|
224
213
|
customElement("calcite-segmented-control", SegmentedControl);
|
|
@@ -16,7 +16,7 @@ const CSS = {
|
|
|
16
16
|
icon: "icon",
|
|
17
17
|
iconSolo: "icon--solo"
|
|
18
18
|
};
|
|
19
|
-
const styles = css`:host{display:flex;cursor:pointer;align-self:stretch;font-weight:var(--calcite-font-weight-normal);outline-color:transparent;transition:background-color var(--calcite-internal-animation-timing-fast) ease-in-out,border-color var(--calcite-animation-timing) ease-in-out}.label{pointer-events:none;margin:.125rem;box-sizing:border-box;display:flex;flex:1 1 0%;align-items:center;color:var(--calcite-segmented-control-color, var(--calcite-color-text-3));background-color:var(--calcite-segmented-control-background-color);box-shadow:var(--calcite-segmented-control-shadow);border-color:var(--calcite-segmented-control-border-color);transition:background-color var(--calcite-internal-animation-timing-fast) ease-in-out,border-color var(--calcite-internal-animation-timing-fast) ease-in-out,color var(--calcite-internal-animation-timing-fast) ease-in-out}.label--horizontal{justify-content:center}:host(:focus){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))));outline-offset:-1px;z-index:var(--calcite-z-index)}.label--scale-s{padding-inline:.5rem;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);padding-block:.125rem}.label--scale-m{padding-inline:.75rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);padding-block:.375rem}.label--scale-l{padding-inline:1rem;padding-block
|
|
19
|
+
const styles = css`:host{display:flex;cursor:pointer;align-self:stretch;font-weight:var(--calcite-font-weight-normal);outline-color:transparent;transition:background-color var(--calcite-internal-animation-timing-fast) ease-in-out,border-color var(--calcite-animation-timing) ease-in-out}.label{pointer-events:none;margin:.125rem;box-sizing:border-box;display:flex;flex:1 1 0%;align-items:center;color:var(--calcite-segmented-control-color, var(--calcite-color-text-3));background-color:var(--calcite-segmented-control-background-color);box-shadow:var(--calcite-segmented-control-shadow);border-color:var(--calcite-segmented-control-border-color);transition:background-color var(--calcite-internal-animation-timing-fast) ease-in-out,border-color var(--calcite-internal-animation-timing-fast) ease-in-out,color var(--calcite-internal-animation-timing-fast) ease-in-out}.label--horizontal{justify-content:center}:host(:focus){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))));outline-offset:-1px;z-index:var(--calcite-z-index)}.label--scale-s{padding-inline:.5rem;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);padding-block:.125rem}.label--scale-m{padding-inline:.75rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);padding-block:.375rem}.label--scale-l{padding-inline:1rem;padding-block:var(--calcite-space-sm-plus);font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host(:hover) .label{background-color:var(--calcite-segmented-control-background-color, var(--calcite-color-foreground-2));color:var(--calcite-segmented-control-color, var(--calcite-color-text-1))}:host(:active) .label{background-color:var(--calcite-segmented-control-background-color, var(--calcite-color-foreground-3))}:host([checked]) .label{cursor:default;background-color:var(--calcite-segmented-control-background-color, var(--calcite-color-brand));border-color:var(--calcite-segmented-control-border-color, var(--calcite-color-brand));color:var(--calcite-segmented-control-color, var(--calcite-color-text-inverse))}:host([checked]) .label--outline,:host([checked]) .label--outline-fill{background-color:var(--calcite-segmented-control-background-color, var(--calcite-color-foreground-1));border-color:var(--calcite-segmented-control-border-color, var(--calcite-color-brand));box-shadow:var(--calcite-segmented-control-shadow, inset 0 0 0 1px var(--calcite-color-brand));color:var(--calcite-segmented-control-color, var(--calcite-color-brand))}:host([checked]) .label--outline{background-color:var(--calcite-segmented-control-background-color, transparent)}::slotted(input){display:none}@media(forced-colors:active){:host([checked]) .label{background-color:highlight}:host([checked]) .label--outline,:host([checked]) .label--outline-fill{outline:2px solid transparent;outline-offset:2px}:host([checked]) .label:not([class~=label--outline]) .icon{color:highlightText}}.icon{position:relative;margin:0;display:inline-flex;line-height:inherit;margin-inline-start:var(--calcite-internal-segmented-control-icon-margin-start);margin-inline-end:var(--calcite-internal-segmented-control-icon-margin-end);--calcite-icon-color: var(--calcite-segmented-control-icon-color)}:host([icon-start]) .label--scale-s{--calcite-internal-segmented-control-icon-margin-end: .5rem}:host([icon-end]) .label--scale-s{--calcite-internal-segmented-control-icon-margin-start: .5rem}:host([icon-start]) .label--scale-m{--calcite-internal-segmented-control-icon-margin-end: .75rem}:host([icon-end]) .label--scale-m{--calcite-internal-segmented-control-icon-margin-start: .75rem}:host([icon-start]) .label--scale-l{--calcite-internal-segmented-control-icon-margin-end: 1rem}:host([icon-end]) .label--scale-l{--calcite-internal-segmented-control-icon-margin-start: 1rem}.label .icon--solo{--calcite-internal-segmented-control-icon-margin-start: 0;--calcite-internal-segmented-control-icon-margin-end: 0}:host([hidden]){display:none}[hidden]{display:none}`;
|
|
20
20
|
class SegmentedControlItem extends LitElement {
|
|
21
21
|
constructor() {
|
|
22
22
|
super(...arguments);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference path="../../index.d.ts" />
|
|
2
2
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
|
-
import type { MutableValidityState } from "../../utils/form.js";
|
|
4
3
|
import type { Scale, Status, Width } from "../interfaces.js";
|
|
5
4
|
import type { IconName } from "../calcite-icon/interfaces.js";
|
|
6
5
|
import type { Option } from "../calcite-option/customElement.js";
|
|
@@ -70,9 +69,9 @@ export abstract class Select extends LitElement {
|
|
|
70
69
|
/**
|
|
71
70
|
* The component's current validation state.
|
|
72
71
|
*
|
|
73
|
-
* @
|
|
72
|
+
* @see [MDN - ValidityState](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)
|
|
74
73
|
*/
|
|
75
|
-
get validity():
|
|
74
|
+
get validity(): ValidityState;
|
|
76
75
|
/** The component's `selectedOption` value. */
|
|
77
76
|
accessor value: string;
|
|
78
77
|
/**
|
|
@@ -85,7 +84,7 @@ export abstract class Select extends LitElement {
|
|
|
85
84
|
* Sets focus on the component.
|
|
86
85
|
*
|
|
87
86
|
* @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
|
|
88
|
-
* @
|
|
87
|
+
* @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
|
|
89
88
|
*/
|
|
90
89
|
setFocus(options?: FocusOptions): Promise<void>;
|
|
91
90
|
/** Fires when the `selectedOption` changes. */
|
|
@@ -4,7 +4,6 @@ import { css, html } from "lit";
|
|
|
4
4
|
import { LitElement, createEvent, stringOrBoolean, safeClassMap } from "@arcgis/lumina";
|
|
5
5
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
6
6
|
import { u as useT9n } from "../../chunks/useT9n.js";
|
|
7
|
-
import { c as connectForm, a as afterConnectDefaultValueSet, d as disconnectForm, H as HiddenFormInputSlot } from "../../chunks/form.js";
|
|
8
7
|
import { c as connectLabel, d as disconnectLabel, g as getLabelText } from "../../chunks/label.js";
|
|
9
8
|
import { c as createObserver } from "../../chunks/observers.js";
|
|
10
9
|
import { g as getIconScale } from "../../chunks/component.js";
|
|
@@ -12,7 +11,8 @@ import { I as InternalLabel } from "../../chunks/InternalLabel.js";
|
|
|
12
11
|
import { V as Validation } from "../../chunks/Validation.js";
|
|
13
12
|
import { u as useSetFocus } from "../../chunks/useSetFocus.js";
|
|
14
13
|
import { u as useInteractive } from "../../chunks/useInteractive.js";
|
|
15
|
-
|
|
14
|
+
import { u as useForm } from "../../chunks/useForm.js";
|
|
15
|
+
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:flex;flex-direction:column;font-size:var(--calcite-select-font-size);font-weight:var(--calcite-internal-select-font-weight, var(--calcite-font-weight-regular))}.wrapper{position:relative;display:flex;align-items:stretch;inline-size:var(--select-width);block-size:var(--calcite-internal-select-block-size, 32px)}.wrapper:focus-within .icon,.wrapper:active .icon,.wrapper:hover .icon{color:var(--calcite-select-icon-color-hover, var(--calcite-color-text-1))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){--calcite-internal-select-font-size: var(--calcite-font-size-relative-sm);--calcite-internal-select-spacing-inline: var(--calcite-space-sm) var(--calcite-space-2xl);--calcite-internal-select-icon-container-padding-inline: var(--calcite-space-2xs);--calcite-internal-select-block-size: 24px}:host([scale=m]){--calcite-internal-select-font-size: var(--calcite-font-size-relative-base);--calcite-internal-select-spacing-inline: var(--calcite-space-md) var(--calcite-space-3xl);--calcite-internal-select-icon-container-padding-inline: var(--calcite-space-sm)}:host([scale=l]){--calcite-internal-select-font-size: var(--calcite-font-size-relative-md);--calcite-internal-select-spacing-inline: var(--calcite-space-lg) var(--calcite-space-4xl);--calcite-internal-select-icon-container-padding-inline: var(--calcite-space-sm-plus);--calcite-internal-select-block-size: 44px}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}.select{margin:0;box-sizing:border-box;inline-size:100%;cursor:pointer;appearance:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-style:solid;font-family:inherit;outline-color:transparent;font-weight:inherit;font-size:var(--calcite-select-font-size, var(--calcite-internal-select-font-size));color:var(--calcite-select-text-color, var(--calcite-color-text-2));border-color:var(--calcite-select-border-color, var(--calcite-color-border-input));border-width:var(--calcite-select-internal-border-width, var(--calcite-border-width-sm));padding-inline:var(--calcite-internal-select-spacing-inline);padding-block:var(--calcite-internal-select-spacing-block);border-inline-end-width:0;line-height:var(--calcite-internal-select-line-height, normal);background-color:var(--calcite-select-background-color, var(--calcite-color-foreground-1));border-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));box-shadow:var(--calcite-select-shadow, var(--calcite-shadow-small))}.select:focus{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))))}select:disabled{border-color:var(--calcite-color-border-input);--tw-bg-opacity: 1}.icon-container{pointer-events:none;position:absolute;inset-block:0px;display:flex;align-items:center;border-width:0px;border-style:solid;border-color:var(--calcite-color-border-input);background-color:transparent;color:var(--calcite-color-text-2);inset-inline-end:0px;border-start-start-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));border-start-end-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));border-end-start-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));border-end-end-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));border-color:var(--calcite-select-border-color, var(--calcite-color-border-input));border-inline-width:0 var(--calcite-select-internal-icon-border-inline-end-width, var(--calcite-border-width-sm));padding-inline:var(--calcite-internal-select-icon-container-padding-inline)}.icon-container .icon{color:var(--calcite-select-icon-color, var(--calcite-color-text-3))}:host([status=invalid]) select,:host([status=invalid]) .icon-container{border-color:var(--calcite-color-status-danger)}:host([status=invalid]) select:focus,:host([status=invalid]) .icon-container:focus{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))))}.select:focus~.icon-container{border-color:transparent}.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}::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}:host([hidden]){display:none}[hidden]{display:none}`;
|
|
16
16
|
const CSS = {
|
|
17
17
|
icon: "icon",
|
|
18
18
|
iconContainer: "icon-container",
|
|
@@ -32,6 +32,7 @@ class Select extends LitElement {
|
|
|
32
32
|
constructor() {
|
|
33
33
|
super();
|
|
34
34
|
this.componentToNativeEl = /* @__PURE__ */ new Map();
|
|
35
|
+
this.formSupport = useForm({ inputType: "text" })(this);
|
|
35
36
|
this.mutationObserver = createObserver("mutation", () => this.populateInternalSelect());
|
|
36
37
|
this.selectRef = createRef();
|
|
37
38
|
this.messages = useT9n();
|
|
@@ -41,19 +42,6 @@ class Select extends LitElement {
|
|
|
41
42
|
this.required = false;
|
|
42
43
|
this.scale = "m";
|
|
43
44
|
this.status = "idle";
|
|
44
|
-
this.validity = {
|
|
45
|
-
valid: false,
|
|
46
|
-
badInput: false,
|
|
47
|
-
customError: false,
|
|
48
|
-
patternMismatch: false,
|
|
49
|
-
rangeOverflow: false,
|
|
50
|
-
rangeUnderflow: false,
|
|
51
|
-
stepMismatch: false,
|
|
52
|
-
tooLong: false,
|
|
53
|
-
tooShort: false,
|
|
54
|
-
typeMismatch: false,
|
|
55
|
-
valueMissing: false
|
|
56
|
-
};
|
|
57
45
|
this.value = null;
|
|
58
46
|
this.width = "auto";
|
|
59
47
|
this.calciteSelectChange = createEvent({ cancelable: false });
|
|
@@ -61,7 +49,10 @@ class Select extends LitElement {
|
|
|
61
49
|
this.listen("calciteInternalOptionGroupChange", this.handleOptionOrGroupChange);
|
|
62
50
|
}
|
|
63
51
|
static {
|
|
64
|
-
this.properties = { disabled: [7, {}, { reflect: true, type: Boolean }], form: [3, {}, { reflect: true }], label: 1, labelText: 1, name: [3, {}, { reflect: true }], required: [7, {}, { reflect: true, type: Boolean }], scale: [3, {}, { reflect: true }], selectedOption: [0, {}, { attribute: false }], status: [3, {}, { reflect: true }], validationIcon: [3, { converter: stringOrBoolean, type: String }, { reflect: true }], validationMessage: 1, validity: [
|
|
52
|
+
this.properties = { disabled: [7, {}, { reflect: true, type: Boolean }], form: [3, {}, { reflect: true }], label: 1, labelText: 1, name: [3, {}, { reflect: true }], required: [7, {}, { reflect: true, type: Boolean }], scale: [3, {}, { reflect: true }], selectedOption: [0, {}, { attribute: false }], status: [3, {}, { reflect: true }], validationIcon: [3, { converter: stringOrBoolean, type: String }, { reflect: true }], validationMessage: 1, validity: [32, {}, { readOnly: true, attribute: false }], value: 1, width: [3, {}, { reflect: true }], messageOverrides: [0, {}, { attribute: false }] };
|
|
53
|
+
}
|
|
54
|
+
static {
|
|
55
|
+
this.formAssociated = true;
|
|
65
56
|
}
|
|
66
57
|
static {
|
|
67
58
|
this.styles = styles;
|
|
@@ -76,7 +67,6 @@ class Select extends LitElement {
|
|
|
76
67
|
childList: true
|
|
77
68
|
});
|
|
78
69
|
connectLabel(this);
|
|
79
|
-
connectForm(this);
|
|
80
70
|
}
|
|
81
71
|
willUpdate(changes) {
|
|
82
72
|
if (changes.has("value") && (this.hasUpdated || this.value !== null)) {
|
|
@@ -93,13 +83,12 @@ class Select extends LitElement {
|
|
|
93
83
|
this.populateInternalSelect();
|
|
94
84
|
const selected = this.selectRef.value?.selectedOptions[0];
|
|
95
85
|
this.selectFromNativeOption(selected);
|
|
96
|
-
|
|
86
|
+
this.formSupport.overrideDefaultValue(this.selectedOption?.value ?? "");
|
|
97
87
|
}
|
|
98
88
|
disconnectedCallback() {
|
|
99
89
|
super.disconnectedCallback();
|
|
100
90
|
this.mutationObserver?.disconnect();
|
|
101
91
|
disconnectLabel(this);
|
|
102
|
-
disconnectForm(this);
|
|
103
92
|
}
|
|
104
93
|
handleInternalSelectChange() {
|
|
105
94
|
const selected = this.selectRef.value.selectedOptions[0];
|
|
@@ -196,7 +185,7 @@ class Select extends LitElement {
|
|
|
196
185
|
}
|
|
197
186
|
render() {
|
|
198
187
|
const { disabled } = this;
|
|
199
|
-
return this.interactiveContainer({ disabled, children: html`${this.labelText && InternalLabel({ labelText: this.labelText, onClick: this.onLabelClick, required: this.required, tooltipText: this.messages.required }) || ""}<div class=${safeClassMap(CSS.wrapper)}><select aria-errormessage=${IDS.validationMessage} .ariaInvalid=${this.status === "invalid"} .ariaLabel=${getLabelText(this)} class=${safeClassMap(CSS.select)} .disabled=${disabled} @change=${this.handleInternalSelectChange} .required=${this.required} ${ref(this.selectRef)}><slot></slot></select>${this.renderChevron()}
|
|
188
|
+
return this.interactiveContainer({ disabled, children: html`${this.labelText && InternalLabel({ labelText: this.labelText, onClick: this.onLabelClick, required: this.required, tooltipText: this.messages.required }) || ""}<div class=${safeClassMap(CSS.wrapper)}><select aria-errormessage=${IDS.validationMessage} .ariaInvalid=${this.status === "invalid"} .ariaLabel=${getLabelText(this)} class=${safeClassMap(CSS.select)} .disabled=${disabled} @change=${this.handleInternalSelectChange} .required=${this.required} ${ref(this.selectRef)}><slot></slot></select>${this.renderChevron()}</div>${this.validationMessage && this.status === "invalid" ? Validation({ icon: this.validationIcon, id: IDS.validationMessage, message: this.validationMessage, scale: this.scale, status: this.status }) : null}` });
|
|
200
189
|
}
|
|
201
190
|
}
|
|
202
191
|
customElement("calcite-select", Select);
|
|
@@ -102,7 +102,7 @@ export abstract class Sheet extends LitElement {
|
|
|
102
102
|
* Only set this if you need complex z-index control or if top layer placement causes conflicts with third-party components.
|
|
103
103
|
*
|
|
104
104
|
* @default false
|
|
105
|
-
* @
|
|
105
|
+
* @see [MDN - Top Layer](https://developer.mozilla.org/en-US/docs/Glossary/Top_layer)
|
|
106
106
|
*/
|
|
107
107
|
accessor topLayerDisabled: boolean;
|
|
108
108
|
/** Specifies the component's width. */
|
|
@@ -118,7 +118,7 @@ export abstract class Sheet extends LitElement {
|
|
|
118
118
|
* Sets focus on the component's "close" button - the first focusable item.
|
|
119
119
|
*
|
|
120
120
|
* @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
|
|
121
|
-
* @
|
|
121
|
+
* @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
|
|
122
122
|
*/
|
|
123
123
|
setFocus(options?: FocusOptions): Promise<void>;
|
|
124
124
|
/**
|
|
@@ -130,7 +130,7 @@ export abstract class Sheet extends LitElement {
|
|
|
130
130
|
/**
|
|
131
131
|
* Updates the component's size by setting its inline and/or block dimensions.
|
|
132
132
|
*
|
|
133
|
-
* Use this method to programmatically override the
|
|
133
|
+
* Use this method to programmatically override the component's width (inline) and/or height (block).
|
|
134
134
|
* Pass `null` to clear the override and revert to the default or CSS variable size.
|
|
135
135
|
*
|
|
136
136
|
* @param size
|
|
@@ -6,7 +6,7 @@ import { css, html } from "lit";
|
|
|
6
6
|
import { LitElement, createEvent, setAttribute, safeClassMap } from "@arcgis/lumina";
|
|
7
7
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
8
8
|
import { useDirection } from "@arcgis/lumina/controllers";
|
|
9
|
-
import {
|
|
9
|
+
import { B as ensureId, g as getStylePixelValue } from "../../chunks/dom.js";
|
|
10
10
|
import { c as createObserver } from "../../chunks/observers.js";
|
|
11
11
|
import { t as toggleOpenClose } from "../../chunks/openCloseComponent.js";
|
|
12
12
|
import { g as getDimensionClass } from "../../chunks/dynamicClasses.js";
|
|
@@ -33,7 +33,7 @@ const ICONS = {
|
|
|
33
33
|
dragVertical: "drag-resize-vertical",
|
|
34
34
|
dragHorizontal: "drag-resize-horizontal"
|
|
35
35
|
};
|
|
36
|
-
const styles = css`:host{position:absolute;inset:0;display:flex;visibility:hidden!important;--calcite-sheet-scrim-background-internal: rgba(0, 0, 0, .85);--calcite-scrim-shadow-block-start-internal: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--calcite-scrim-shadow-block-end-internal: 0 -4px 8px -1px rgba(0, 0, 0, .08), 0 -2px 4px -1px rgba(0, 0, 0, .04);--calcite-scrim-shadow-inline-start-internal: 4px 0 8px -1px rgba(0, 0, 0, .08), 2px 0 4px -1px rgba(0, 0, 0, .04);--calcite-scrim-shadow-inline-end-internal: -4px 0 8px -1px rgba(0, 0, 0, .08), -2px 0 4px -1px rgba(0, 0, 0, .04)}:host([embedded]){z-index:var(--calcite-z-index-overlay)}.calcite--rtl{--calcite-scrim-shadow-inline-start-internal: -4px 0 8px -1px rgba(0, 0, 0, .08), -2px 0 4px -1px rgba(0, 0, 0, .04);--calcite-scrim-shadow-inline-end-internal: 4px 0 8px -1px rgba(0, 0, 0, .08), 2px 0 4px -1px rgba(0, 0, 0, .04)}.assistive-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.container{visibility:hidden;position:fixed;box-sizing:border-box;display:flex;opacity:0;color:var(--calcite-sheet-text-color, var(--calcite-color-text-2));transition:visibility 0ms linear var(--calcite-internal-animation-timing-medium),opacity var(--calcite-internal-animation-timing-medium) cubic-bezier(.215,.44,.42,.88)}:host([top-layer-disabled]) .container,:host([embedded]) .container{z-index:var(--calcite-z-index-overlay)}:host([position=inline-start]) .container{justify-content:flex-start;inset-block:0;inset-inline:0 auto;--calcite-sheet-hidden-position-internal: translate3d(-1rem, 0, 0)}:host([position=inline-end]) .container{justify-content:flex-end;inset-block:0;inset-inline:auto 0;--calcite-sheet-hidden-position-internal: translate3d(1rem, 0, 0)}:host([position=block-start]) .container{align-items:flex-start;inset-block:0 auto;inset-inline:0;--calcite-sheet-hidden-position-internal: translate3d(0, -1rem, 0)}:host([position=block-end]) .container{align-items:flex-end;inset-block:auto 0;inset-inline:0;--calcite-sheet-hidden-position-internal: translate3d(0, 1rem, 0)}:host([display-mode=float]) .content{--tw-shadow: 0 2px 12px -4px rgba(0, 0, 0, .2), 0 2px 4px -2px rgba(0, 0, 0, .16);--tw-shadow-colored: 0 2px 12px -4px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--calcite-sheet-shadow, var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-shadow))}:host([display-mode=overlay][position=inline-start]) .container{box-shadow:var(--calcite-scrim-shadow-inline-start-internal)}:host([display-mode=overlay][position=inline-end]) .container{box-shadow:var(--calcite-scrim-shadow-inline-end-internal)}:host([display-mode=overlay][position=block-start]) .container{box-shadow:var(--calcite-scrim-shadow-block-start-internal)}:host([display-mode=overlay][position=block-end]) .container{box-shadow:var(--calcite-scrim-shadow-block-end-internal)}:host([position^=inline]) .content{inline-size:var(--calcite-sheet-width-internal);max-inline-size:var(--calcite-sheet-max-width-internal);min-inline-size:var(--calcite-sheet-min-width-internal)}:host([position^=block]) .content{block-size:var(--calcite-sheet-height-internal);max-block-size:var(--calcite-sheet-max-height-internal);min-block-size:var(--calcite-sheet-min-height-internal)}:host([position^=inline]) .width-s{--calcite-sheet-width-internal: var(--calcite-sheet-width, 15vw);--calcite-sheet-max-width-internal: var(--calcite-sheet-max-width, 360px);--calcite-sheet-min-width-internal: var(--calcite-sheet-min-width, 260px)}:host([position^=inline]) .width-m{--calcite-sheet-width-internal: var(--calcite-sheet-width, 25vw);--calcite-sheet-max-width-internal: var(--calcite-sheet-max-width, 420px);--calcite-sheet-min-width-internal: var(--calcite-sheet-min-width, 300px)}:host([position^=inline]) .width-l{--calcite-sheet-width-internal: var(--calcite-sheet-width, 45vw);--calcite-sheet-max-width-internal: var(--calcite-sheet-max-width, 680px);--calcite-sheet-min-width-internal: var(--calcite-sheet-min-width, 340px)}:host([position^=block]) .height-s{--calcite-sheet-min-height-internal: var(--calcite-sheet-min-height, 160px);--calcite-sheet-height-internal: var(--calcite-sheet-height, 30vh);--calcite-sheet-max-height-internal: var(--calcite-sheet-max-height, 30vh)}:host([position^=block]) .height-m{--calcite-sheet-min-height-internal: var(--calcite-sheet-min-height, 200px);--calcite-sheet-height-internal: var(--calcite-sheet-height, 45vh);--calcite-sheet-max-height-internal: var(--calcite-sheet-max-height, 50vh)}:host([position^=block]) .height-l{--calcite-sheet-min-height-internal: var(--calcite-sheet-min-height, 240px);--calcite-sheet-height-internal: var(--calcite-sheet-height, 60vh);--calcite-sheet-max-height-internal: var(--calcite-sheet-max-height, 70vh)}.scrim{--calcite-scrim-background: var(--calcite-sheet-scrim-background, var(--calcite-sheet-scrim-background-internal));position:fixed;inset:0;display:flex;overflow:hidden;z-index:calc(var(--calcite-z-index) * -1)}:host([top-layer-disabled]) .scrim{z-index:unset}[popover]{padding:0;margin:0;border:none;background-color:transparent;position:fixed;display:flex;inline-size:100%;block-size:100%}[popover]:popover-open{display:flex}:host([opened]){visibility:visible!important}.content{position:relative;box-sizing:border-box;display:flex;max-inline-size:100%;padding:0;background-color:var(--calcite-sheet-background-color, var(--calcite-color-foreground-1));max-block-size:100%;visibility:hidden;transition:transform var(--calcite-internal-animation-timing-medium) cubic-bezier(.215,.44,.42,.88),visibility 0ms linear var(--calcite-internal-animation-timing-medium),opacity var(--calcite-internal-animation-timing-medium) cubic-bezier(.215,.44,.42,.88);transform:var(--calcite-sheet-hidden-position-internal)}:host([top-layer-disabled]),:host([top-layer-disabled]) .content,:host([embedded]) .content{z-index:var(--calcite-z-index-modal)}.content-container{position:relative;display:flex;max-block-size:100%;max-inline-size:100%;flex:1 1 0%;overflow:hidden}.content-container ::slotted(*){block-size:auto}.container--open .content{transform:translateZ(0)}:host([display-mode=float]) .content,:host([display-mode=float]) .container,:host([display-mode=float]) .content-container{border-radius:var(--calcite-sheet-corner-radius, var(--calcite-corner-radius-round))}:host([display-mode=float]) .container{padding:var(--calcite-spacing-md)}.container--open{visibility:visible;opacity:1;transition-delay:0ms}.container--open .content{pointer-events:auto;visibility:visible;opacity:1;transition:transform var(--calcite-internal-animation-timing-medium) cubic-bezier(.215,.44,.42,.88),visibility 0ms linear,opacity var(--calcite-internal-animation-timing-medium) cubic-bezier(.215,.44,.42,.88),max-inline-size var(--calcite-internal-animation-timing-medium) cubic-bezier(.215,.44,.42,.88),max-block-size var(--calcite-internal-animation-timing-medium) cubic-bezier(.215,.44,.42,.88);transition-delay:0ms}:host([position=inline-start]) .content,:host([position=inline-end]) .content{block-size:100%}:host([position=inline-start]) .content{flex-direction:row}:host([position=inline-end]) .content{flex-direction:row-reverse}:host([position=block-start]) .content,:host([position=block-end]) .content{inline-size:100%}:host([position=block-start]) .content{flex-direction:column}:host([position=block-end]) .content{flex-direction:column-reverse}:host([resizable][position=inline-start]) .content{padding-inline-end:var(--calcite-size-fixed-sm-plus)}:host([resizable][position=inline-end]) .content{padding-inline-start:var(--calcite-size-fixed-sm-plus)}:host([resizable][position=block-start]) .content{padding-block-end:var(--calcite-size-fixed-sm-plus)}:host([resizable][position=block-end]) .content{padding-block-start:var(--calcite-size-fixed-sm-plus)}.resize-handle{position:absolute;box-sizing:border-box;display:flex;-webkit-user-select:none;user-select:none;align-items:center;justify-content:center;outline:2px solid transparent;outline-offset:2px;--calcite-internal-sheet-resize-handle-offset: calc( (var(--calcite-size-fixed-xxl) - var(--calcite-size-fixed-sm-plus)) / 2 * -1 );z-index:var(--calcite-z-index-header)}.resize-handle:active .resize-handle-bar,.resize-handle:hover .resize-handle-bar{color:var(--calcite-sheet-resize-icon-color, var(--calcite-color-text-1));background-color:var(--calcite-sheet-resize-background-color, var(--calcite-color-foreground-3))}.resize-handle-bar{pointer-events:none;display:flex;align-items:center;justify-content:center;color:var(--calcite-sheet-resize-icon-color, var(--calcite-color-border-input));background-color:var(--calcite-sheet-resize-background-color, var(--calcite-color-background))}.resize-handle:focus .resize-handle-bar{outline-color:transparent;outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)))}:host([position=inline-start]) .resize-handle{inline-size:var(--calcite-size-fixed-xxl);inset-inline-end:var(--calcite-internal-sheet-resize-handle-offset);block-size:100%}:host([position=inline-start]) .resize-handle-bar{block-size:100%;inline-size:var(--calcite-size-fixed-sm-plus);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-sheet-border-color, var(--calcite-color-border-3))}:host([position=inline-start]):host([display-mode=float]) .resize-handle-bar{border-start-end-radius:var(--calcite-sheet-corner-radius, var(--calcite-corner-radius-round));border-end-end-radius:var(--calcite-sheet-corner-radius, var(--calcite-corner-radius-round))}:host([position=inline-end]) .resize-handle{inline-size:var(--calcite-size-fixed-xxl);inset-inline-start:var(--calcite-internal-sheet-resize-handle-offset);block-size:100%}:host([position=inline-end]) .resize-handle-bar{block-size:100%;inline-size:var(--calcite-size-fixed-sm-plus);border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-sheet-border-color, var(--calcite-color-border-3))}:host([position=inline-end]):host([display-mode=float]) .resize-handle-bar{border-start-start-radius:.25rem;border-end-start-radius:.25rem}:host([position=block-start]) .resize-handle{block-size:var(--calcite-size-fixed-xxl);inline-size:100%;inset-block-end:var(--calcite-internal-sheet-resize-handle-offset)}:host([position=block-start]) .resize-handle-bar{inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);border-block-start:var(--calcite-border-width-sm) solid var(--calcite-sheet-border-color, var(--calcite-color-border-3))}:host([position=block-start]):host([display-mode=float]) .resize-handle-bar{border-end-end-radius:.25rem;border-end-start-radius:.25rem}:host([position=block-end]) .resize-handle{block-size:var(--calcite-size-fixed-xxl);inline-size:100%;inset-block-start:var(--calcite-internal-sheet-resize-handle-offset)}:host([position=block-end]) .resize-handle-bar{inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);border-block-end:var(--calcite-border-width-sm) solid var(--calcite-sheet-border-color, var(--calcite-color-border-3))}:host([position=block-end]):host([display-mode=float]) .resize-handle-bar{border-start-start-radius:var(--calcite-sheet-corner-radius, var(--calcite-corner-radius-round));border-start-end-radius:var(--calcite-sheet-corner-radius, var(--calcite-corner-radius-round))}:host([position]) .container--embedded{pointer-events:auto;position:absolute;inline-size:100%;max-inline-size:100%;min-inline-size:100%;block-size:100%;max-block-size:100%;min-block-size:100%}:host([position]) .container--embedded calcite-scrim{position:absolute}:host([hidden]){display:none}[hidden]{display:none}`;
|
|
36
|
+
const styles = css`:host{position:absolute;inset:0;display:flex;visibility:hidden!important;--calcite-sheet-scrim-background-internal: rgba(0, 0, 0, .85);--calcite-scrim-shadow-block-start-internal: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--calcite-scrim-shadow-block-end-internal: 0 -4px 8px -1px rgba(0, 0, 0, .08), 0 -2px 4px -1px rgba(0, 0, 0, .04);--calcite-scrim-shadow-inline-start-internal: 4px 0 8px -1px rgba(0, 0, 0, .08), 2px 0 4px -1px rgba(0, 0, 0, .04);--calcite-scrim-shadow-inline-end-internal: -4px 0 8px -1px rgba(0, 0, 0, .08), -2px 0 4px -1px rgba(0, 0, 0, .04)}:host([embedded]){z-index:var(--calcite-z-index-overlay)}.calcite--rtl{--calcite-scrim-shadow-inline-start-internal: -4px 0 8px -1px rgba(0, 0, 0, .08), -2px 0 4px -1px rgba(0, 0, 0, .04);--calcite-scrim-shadow-inline-end-internal: 4px 0 8px -1px rgba(0, 0, 0, .08), 2px 0 4px -1px rgba(0, 0, 0, .04)}.assistive-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.container{visibility:hidden;position:fixed;box-sizing:border-box;display:flex;opacity:0;color:var(--calcite-sheet-text-color, var(--calcite-color-text-2));transition:visibility 0ms linear var(--calcite-internal-animation-timing-medium),opacity var(--calcite-internal-animation-timing-medium) ease-in-out}:host([top-layer-disabled]) .container,:host([embedded]) .container{z-index:var(--calcite-z-index-overlay)}:host([position=inline-start]) .container{justify-content:flex-start;inset-block:0;inset-inline:0 auto;--calcite-sheet-hidden-position-internal: translate3d(-1rem, 0, 0)}:host([position=inline-end]) .container{justify-content:flex-end;inset-block:0;inset-inline:auto 0;--calcite-sheet-hidden-position-internal: translate3d(1rem, 0, 0)}:host([position=block-start]) .container{align-items:flex-start;inset-block:0 auto;inset-inline:0;--calcite-sheet-hidden-position-internal: translate3d(0, -1rem, 0)}:host([position=block-end]) .container{align-items:flex-end;inset-block:auto 0;inset-inline:0;--calcite-sheet-hidden-position-internal: translate3d(0, 1rem, 0)}:host([display-mode=float]) .content{--tw-shadow: 0 2px 12px -4px rgba(0, 0, 0, .2), 0 2px 4px -2px rgba(0, 0, 0, .16);--tw-shadow-colored: 0 2px 12px -4px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--calcite-sheet-shadow, var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-shadow))}:host([display-mode=overlay][position=inline-start]) .container{box-shadow:var(--calcite-scrim-shadow-inline-start-internal)}:host([display-mode=overlay][position=inline-end]) .container{box-shadow:var(--calcite-scrim-shadow-inline-end-internal)}:host([display-mode=overlay][position=block-start]) .container{box-shadow:var(--calcite-scrim-shadow-block-start-internal)}:host([display-mode=overlay][position=block-end]) .container{box-shadow:var(--calcite-scrim-shadow-block-end-internal)}:host([position^=inline]) .content{inline-size:var(--calcite-sheet-width-internal);max-inline-size:var(--calcite-sheet-max-width-internal);min-inline-size:var(--calcite-sheet-min-width-internal)}:host([position^=block]) .content{block-size:var(--calcite-sheet-height-internal);max-block-size:var(--calcite-sheet-max-height-internal);min-block-size:var(--calcite-sheet-min-height-internal)}:host([position^=inline]) .width-s{--calcite-sheet-width-internal: var(--calcite-sheet-width, 15vw);--calcite-sheet-max-width-internal: var(--calcite-sheet-max-width, 360px);--calcite-sheet-min-width-internal: var(--calcite-sheet-min-width, 260px)}:host([position^=inline]) .width-m{--calcite-sheet-width-internal: var(--calcite-sheet-width, 25vw);--calcite-sheet-max-width-internal: var(--calcite-sheet-max-width, 420px);--calcite-sheet-min-width-internal: var(--calcite-sheet-min-width, 300px)}:host([position^=inline]) .width-l{--calcite-sheet-width-internal: var(--calcite-sheet-width, 45vw);--calcite-sheet-max-width-internal: var(--calcite-sheet-max-width, 680px);--calcite-sheet-min-width-internal: var(--calcite-sheet-min-width, 340px)}:host([position^=block]) .height-s{--calcite-sheet-min-height-internal: var(--calcite-sheet-min-height, 160px);--calcite-sheet-height-internal: var(--calcite-sheet-height, 30vh);--calcite-sheet-max-height-internal: var(--calcite-sheet-max-height, 30vh)}:host([position^=block]) .height-m{--calcite-sheet-min-height-internal: var(--calcite-sheet-min-height, 200px);--calcite-sheet-height-internal: var(--calcite-sheet-height, 45vh);--calcite-sheet-max-height-internal: var(--calcite-sheet-max-height, 50vh)}:host([position^=block]) .height-l{--calcite-sheet-min-height-internal: var(--calcite-sheet-min-height, 240px);--calcite-sheet-height-internal: var(--calcite-sheet-height, 60vh);--calcite-sheet-max-height-internal: var(--calcite-sheet-max-height, 70vh)}.scrim{--calcite-scrim-background: var(--calcite-sheet-scrim-background, var(--calcite-sheet-scrim-background-internal));position:fixed;inset:0;display:flex;overflow:hidden;z-index:calc(var(--calcite-z-index) * -1)}:host([top-layer-disabled]) .scrim{z-index:unset}[popover]{padding:0;margin:0;border:none;background-color:transparent;position:fixed;display:flex;inline-size:100%;block-size:100%}[popover]:popover-open{display:flex}:host([opened]){visibility:visible!important}.content{position:relative;box-sizing:border-box;display:flex;max-inline-size:100%;padding:0;background-color:var(--calcite-sheet-background-color, var(--calcite-color-foreground-1));max-block-size:100%;visibility:hidden;transition:transform var(--calcite-internal-animation-timing-medium) ease-in-out,visibility 0ms linear var(--calcite-internal-animation-timing-medium),opacity var(--calcite-internal-animation-timing-medium) ease-in-out;transform:var(--calcite-sheet-hidden-position-internal)}:host([top-layer-disabled]),:host([top-layer-disabled]) .content,:host([embedded]) .content{z-index:var(--calcite-z-index-modal)}.content-container{position:relative;display:flex;max-block-size:100%;max-inline-size:100%;flex:1 1 0%;overflow:hidden}.content-container ::slotted(*){block-size:auto}.container--open .content{transform:translateZ(0)}:host([display-mode=float]) .content,:host([display-mode=float]) .container,:host([display-mode=float]) .content-container{border-radius:var(--calcite-sheet-corner-radius, var(--calcite-corner-radius-round))}:host([display-mode=float]) .container{padding:var(--calcite-spacing-md)}.container--open{visibility:visible;opacity:1;transition-delay:0ms}.container--open .content{pointer-events:auto;visibility:visible;opacity:1;transition:transform var(--calcite-internal-animation-timing-medium) ease-in-out,visibility 0ms linear,opacity var(--calcite-internal-animation-timing-medium) ease-in-out,max-inline-size var(--calcite-internal-animation-timing-medium) ease-in-out,max-block-size var(--calcite-internal-animation-timing-medium) ease-in-out;transition-delay:0ms}@starting-style{.container--open{opacity:0;visibility:hidden}}:host([position=inline-start]) .content,:host([position=inline-end]) .content{block-size:100%}:host([position=inline-start]) .content{flex-direction:row}:host([position=inline-end]) .content{flex-direction:row-reverse}:host([position=block-start]) .content,:host([position=block-end]) .content{inline-size:100%}:host([position=block-start]) .content{flex-direction:column}:host([position=block-end]) .content{flex-direction:column-reverse}:host([resizable][position=inline-start]) .content{padding-inline-end:var(--calcite-size-fixed-sm-plus)}:host([resizable][position=inline-end]) .content{padding-inline-start:var(--calcite-size-fixed-sm-plus)}:host([resizable][position=block-start]) .content{padding-block-end:var(--calcite-size-fixed-sm-plus)}:host([resizable][position=block-end]) .content{padding-block-start:var(--calcite-size-fixed-sm-plus)}.resize-handle{position:absolute;box-sizing:border-box;display:flex;-webkit-user-select:none;user-select:none;align-items:center;justify-content:center;outline:2px solid transparent;outline-offset:2px;--calcite-internal-sheet-resize-handle-offset: calc( (var(--calcite-size-fixed-xxl) - var(--calcite-size-fixed-sm-plus)) / 2 * -1 );z-index:var(--calcite-z-index-header)}.resize-handle:active .resize-handle-bar,.resize-handle:hover .resize-handle-bar{color:var(--calcite-sheet-resize-icon-color, var(--calcite-color-text-1));background-color:var(--calcite-sheet-resize-background-color, var(--calcite-color-foreground-3))}.resize-handle-bar{pointer-events:none;display:flex;align-items:center;justify-content:center;color:var(--calcite-sheet-resize-icon-color, var(--calcite-color-border-input));background-color:var(--calcite-sheet-resize-background-color, var(--calcite-color-background))}.resize-handle:focus .resize-handle-bar{outline-color:transparent;outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)))}:host([position=inline-start]) .resize-handle{inline-size:var(--calcite-size-fixed-xxl);inset-inline-end:var(--calcite-internal-sheet-resize-handle-offset);block-size:100%}:host([position=inline-start]) .resize-handle-bar{block-size:100%;inline-size:var(--calcite-size-fixed-sm-plus);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-sheet-border-color, var(--calcite-color-border-3))}:host([position=inline-start]):host([display-mode=float]) .resize-handle-bar{border-start-end-radius:var(--calcite-sheet-corner-radius, var(--calcite-corner-radius-round));border-end-end-radius:var(--calcite-sheet-corner-radius, var(--calcite-corner-radius-round))}:host([position=inline-end]) .resize-handle{inline-size:var(--calcite-size-fixed-xxl);inset-inline-start:var(--calcite-internal-sheet-resize-handle-offset);block-size:100%}:host([position=inline-end]) .resize-handle-bar{block-size:100%;inline-size:var(--calcite-size-fixed-sm-plus);border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-sheet-border-color, var(--calcite-color-border-3))}:host([position=inline-end]):host([display-mode=float]) .resize-handle-bar{border-start-start-radius:.25rem;border-end-start-radius:.25rem}:host([position=block-start]) .resize-handle{block-size:var(--calcite-size-fixed-xxl);inline-size:100%;inset-block-end:var(--calcite-internal-sheet-resize-handle-offset)}:host([position=block-start]) .resize-handle-bar{inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);border-block-start:var(--calcite-border-width-sm) solid var(--calcite-sheet-border-color, var(--calcite-color-border-3))}:host([position=block-start]):host([display-mode=float]) .resize-handle-bar{border-end-end-radius:.25rem;border-end-start-radius:.25rem}:host([position=block-end]) .resize-handle{block-size:var(--calcite-size-fixed-xxl);inline-size:100%;inset-block-start:var(--calcite-internal-sheet-resize-handle-offset)}:host([position=block-end]) .resize-handle-bar{inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);border-block-end:var(--calcite-border-width-sm) solid var(--calcite-sheet-border-color, var(--calcite-color-border-3))}:host([position=block-end]):host([display-mode=float]) .resize-handle-bar{border-start-start-radius:var(--calcite-sheet-corner-radius, var(--calcite-corner-radius-round));border-start-end-radius:var(--calcite-sheet-corner-radius, var(--calcite-corner-radius-round))}:host([position]) .container--embedded{pointer-events:auto;position:absolute;inline-size:100%;max-inline-size:100%;min-inline-size:100%;block-size:100%;max-block-size:100%;min-block-size:100%}:host([position]) .container--embedded calcite-scrim{position:absolute}:host([hidden]){display:none}[hidden]{display:none}`;
|
|
37
37
|
class Sheet extends LitElement {
|
|
38
38
|
constructor() {
|
|
39
39
|
super();
|
|
@@ -144,7 +144,7 @@ class Sheet extends LitElement {
|
|
|
144
144
|
if (changes.has("opened") && (this.hasUpdated || this.opened !== false) && this.transitionRef.value) {
|
|
145
145
|
toggleOpenClose(this);
|
|
146
146
|
}
|
|
147
|
-
if (changes.has("open") && (this.hasUpdated || this.open !== false) || changes.has("position") && (this.hasUpdated || this.position !== "inline-start") || changes.has("resizable") && (this.hasUpdated || this.resizable !== false)) {
|
|
147
|
+
if (changes.has("open") && (this.hasUpdated || this.open !== false) || changes.has("position") && (this.hasUpdated || this.position !== "inline-start") || changes.has("resizable") && (this.hasUpdated || this.resizable !== false) || changes.has("direction")) {
|
|
148
148
|
this.setupInteractions();
|
|
149
149
|
}
|
|
150
150
|
if (this.contentRef.value) {
|
|
@@ -232,10 +232,6 @@ class Sheet extends LitElement {
|
|
|
232
232
|
}
|
|
233
233
|
cleanupInteractions() {
|
|
234
234
|
this.interaction?.unset();
|
|
235
|
-
this.updateSizeInternal({
|
|
236
|
-
inline: null,
|
|
237
|
-
block: null
|
|
238
|
-
});
|
|
239
235
|
}
|
|
240
236
|
async setupInteractions() {
|
|
241
237
|
this.cleanupInteractions();
|
|
@@ -53,7 +53,7 @@ export abstract class ShellPanel extends LitElement {
|
|
|
53
53
|
/**
|
|
54
54
|
* Specifies the component's direction.
|
|
55
55
|
*
|
|
56
|
-
* @deprecated in
|
|
56
|
+
* @deprecated in v5.0.0, removal target v6.0.0 - No longer necessary.
|
|
57
57
|
* @default "vertical"
|
|
58
58
|
*/
|
|
59
59
|
accessor layout: Extract<"horizontal" | "vertical", Layout>;
|
|
@@ -62,7 +62,7 @@ export abstract class ShellPanel extends LitElement {
|
|
|
62
62
|
/**
|
|
63
63
|
* Specifies the component's position. Will be flipped when the element direction is right-to-left (`"rtl"`).
|
|
64
64
|
*
|
|
65
|
-
* @deprecated in
|
|
65
|
+
* @deprecated in v5.0.0, removal target v6.0.0 - No longer necessary.
|
|
66
66
|
* @default "start"
|
|
67
67
|
*/
|
|
68
68
|
accessor position: Extract<"start" | "end", Position>;
|
|
@@ -84,7 +84,7 @@ export abstract class ShellPanel extends LitElement {
|
|
|
84
84
|
/**
|
|
85
85
|
* Updates the component's size by setting its inline and/or block dimensions.
|
|
86
86
|
*
|
|
87
|
-
* Use this method to programmatically override the
|
|
87
|
+
* Use this method to programmatically override the component's width (inline) and/or height (block).
|
|
88
88
|
* Pass `null` to clear the override and revert to the default or CSS variable size.
|
|
89
89
|
*
|
|
90
90
|
* @param size
|
|
@@ -82,6 +82,10 @@ class ShellPanel extends LitElement {
|
|
|
82
82
|
willUpdate(changes) {
|
|
83
83
|
if (changes.has("layout") && (this.hasUpdated || this.layout !== "vertical")) {
|
|
84
84
|
this.setActionBarsLayout(this.actionBars);
|
|
85
|
+
this.setupInteractions();
|
|
86
|
+
}
|
|
87
|
+
if (changes.has("direction") && this.hasUpdated || changes.has("position") && (this.hasUpdated || this.position !== "start")) {
|
|
88
|
+
this.setupInteractions();
|
|
85
89
|
}
|
|
86
90
|
if (changes.has("collapsed") && this.hasUpdated) {
|
|
87
91
|
if (this.collapsed) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference path="../../index.d.ts" />
|
|
2
2
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
|
-
import type { MutableValidityState } from "../../utils/form.js";
|
|
4
3
|
import type { NumberingSystem } from "../../utils/locale.js";
|
|
5
4
|
import type { ColorStop, DataSeries } from "../calcite-graph/interfaces.js";
|
|
6
5
|
import type { Scale, Status } from "../interfaces.js";
|
|
@@ -162,16 +161,16 @@ export abstract class Slider extends LitElement {
|
|
|
162
161
|
/**
|
|
163
162
|
* The component's current validation state.
|
|
164
163
|
*
|
|
165
|
-
* @
|
|
164
|
+
* @see [MDN - ValidityState](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)
|
|
166
165
|
*/
|
|
167
|
-
get validity():
|
|
166
|
+
get validity(): ValidityState;
|
|
168
167
|
/** The component's value. */
|
|
169
168
|
accessor value: number | number[];
|
|
170
169
|
/**
|
|
171
170
|
* Sets focus on the component.
|
|
172
171
|
*
|
|
173
172
|
* @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
|
|
174
|
-
* @
|
|
173
|
+
* @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
|
|
175
174
|
*/
|
|
176
175
|
setFocus(options?: FocusOptions): Promise<void>;
|
|
177
176
|
/**
|
|
@@ -5,10 +5,9 @@ import { css, html, nothing } from "lit";
|
|
|
5
5
|
import { LitElement, createEvent, stringOrBoolean, setAttribute, safeClassMap, safeStyleMap } from "@arcgis/lumina";
|
|
6
6
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
7
7
|
import { g as guid } from "../../chunks/guid.js";
|
|
8
|
-
import { j as isPrimaryPointerButton,
|
|
8
|
+
import { j as isPrimaryPointerButton, z as intersects } from "../../chunks/dom.js";
|
|
9
9
|
import { I as InternalLabel } from "../../chunks/InternalLabel.js";
|
|
10
10
|
import { V as Validation } from "../../chunks/Validation.js";
|
|
11
|
-
import { c as connectForm, a as afterConnectDefaultValueSet, d as disconnectForm, H as HiddenFormInputSlot } from "../../chunks/form.js";
|
|
12
11
|
import { i as isActivationKey } from "../../chunks/key.js";
|
|
13
12
|
import { c as connectLabel, d as disconnectLabel, g as getLabelText } from "../../chunks/label.js";
|
|
14
13
|
import { n as numberStringFormatter, B as BigDecimal } from "../../chunks/locale.js";
|
|
@@ -16,6 +15,7 @@ import { d as decimalPlaces, c as clamp } from "../../chunks/math.js";
|
|
|
16
15
|
import { u as useT9n } from "../../chunks/useT9n.js";
|
|
17
16
|
import { u as useSetFocus } from "../../chunks/useSetFocus.js";
|
|
18
17
|
import { u as useInteractive } from "../../chunks/useInteractive.js";
|
|
18
|
+
import { u as useForm } from "../../chunks/useForm.js";
|
|
19
19
|
const CSS = {
|
|
20
20
|
container: "container",
|
|
21
21
|
containerRange: "container--range",
|
|
@@ -51,7 +51,7 @@ const IDS = {
|
|
|
51
51
|
host: (id) => `${idPrefix}-${id}`
|
|
52
52
|
};
|
|
53
53
|
const maxTickElementThreshold = 250;
|
|
54
|
-
const styles = css`@charset "UTF-8";:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}.scale--s{--calcite-slider-handle-size: .625rem;--calcite-slider-handle-extension-height: .4rem;--calcite-slider-container-font-size: var(--calcite-font-size--3)}.scale--s .handle__label,.scale--s .tick__label{line-height:.75rem}.scale--m{--calcite-slider-handle-size: .875rem;--calcite-slider-handle-extension-height: .5rem;--calcite-slider-container-font-size: var(--calcite-font-size--2)}.scale--m .handle__label,.scale--m .tick__label{line-height:1rem}.scale--l{--calcite-slider-handle-size: 1rem;--calcite-slider-handle-extension-height: .65rem;--calcite-slider-container-font-size: var(--calcite-font-size--1)}.scale--l .handle__label,.scale--l .tick__label{line-height:1rem}.handle__label,.tick__label{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-slider-text-color, var(--calcite-color-text-2));font-size:var(--calcite-slider-container-font-size)}:host{display:block}:host .validation-container{padding-block-start:0!important}.container{position:relative;display:block;overflow-wrap:normal;word-break:normal;padding-inline:calc(var(--calcite-slider-handle-size) * .5);padding-block:calc(var(--calcite-slider-handle-size) * .5);margin-block:calc(var(--calcite-slider-handle-size) * .5);margin-inline:0;--calcite-slider-full-handle-height: calc( var(--calcite-slider-handle-size) + var(--calcite-slider-handle-extension-height) );touch-action:none;-webkit-user-select:none;user-select:none}:host([disabled]) .track__range,:host([disabled]) .tick--active{background-color:var(--calcite-color-text-3)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.scale--s .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -.375rem}.scale--m .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -.5rem}.scale--l .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -.55rem}:host([precise]:not([has-histogram])) .container .thumb--value{--calcite-slider-thumb-y-offset: calc(var(--calcite-slider-full-handle-height) * -1)}.thumb-container{position:relative;max-inline-size:100%}.thumb{--calcite-slider-thumb-x-offset: calc(var(--calcite-slider-handle-size) * .5);position:absolute;margin:0;display:flex;cursor:pointer;flex-direction:column;align-items:center;border-style:none;background-color:transparent;padding:0;font-family:inherit;outline:2px solid transparent;outline-offset:2px;transform:translate(var(--calcite-slider-thumb-x-offset),var(--calcite-slider-thumb-y-offset))}.thumb .handle__label{white-space:nowrap}.thumb .handle__label.static,.thumb .handle__label.transformed{position:absolute;inset-block:0px;opacity:0}.thumb .handle__label.hyphen:after{content:"—";display:inline-block;inline-size:1em}.thumb .handle__label.hyphen--wrap{display:flex}.thumb .handle{box-sizing:border-box;border-radius:9999px;outline-color:transparent;background-color:var(--calcite-slider-handle-fill-color, var(--calcite-color-foreground-1));block-size:var(--calcite-slider-handle-size);inline-size:var(--calcite-slider-handle-size);box-shadow:0 0 0 2px var(--calcite-color-text-3) inset;transition:border var(--calcite-internal-animation-timing-medium) ease,background-color var(--calcite-internal-animation-timing-medium) ease,box-shadow var(--calcite-animation-timing) ease}.thumb .handle-extension{inline-size:.125rem;block-size:var(--calcite-slider-handle-extension-height);background-color:var(--calcite-slider-handle-extension-color, var(--calcite-color-text-3))}.thumb:hover .handle{box-shadow:0 0 0 3px var(--calcite-color-brand) inset}.thumb:hover .handle-extension{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand))}.thumb:focus .handle{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))))}.thumb:focus .handle-extension{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand))}.thumb.thumb--minValue{transform:translate(calc(var(--calcite-slider-thumb-x-offset) * -1),var(--calcite-slider-thumb-y-offset))}.thumb.thumb--precise{--calcite-slider-thumb-y-offset: -.125rem}:host([label-handles]) .thumb{--calcite-slider-thumb-x-offset: 50%}:host([label-handles]):host(:not([has-histogram])) .scale--s .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -1.4375rem}:host([label-handles]):host(:not([has-histogram])) .scale--m .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -1.875rem}:host([label-handles]):host(:not([has-histogram])) .scale--l .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -2rem}:host([has-histogram][label-handles]) .handle__label,:host([label-handles]:not([has-histogram])) .thumb--minValue.thumb--precise .handle__label{margin-block-start:.5em}:host(:not([has-histogram]):not([precise])) .handle__label,:host([label-handles]:not([has-histogram])) .thumb--value .handle__label{margin-block-end:.5em}:host([label-handles][precise]):host(:not([has-histogram])) .scale--s .thumb--value{--calcite-slider-thumb-y-offset: -2.075rem}:host([label-handles][precise]):host(:not([has-histogram])) .scale--m .thumb--value{--calcite-slider-thumb-y-offset: -2.75rem}:host([label-handles][precise]):host(:not([has-histogram])) .scale--l .thumb--value{--calcite-slider-thumb-y-offset: -3.0625rem}.thumb:focus .handle,.thumb--active .handle{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand));box-shadow:0 0 8px #00000029}.thumb:hover.thumb--precise:after,.thumb:focus.thumb--precise:after,.thumb--active.thumb--precise:after{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand))}.track{position:relative;block-size:.125rem;border-radius:0;background-color:var(--calcite-slider-track-color, var(--calcite-color-border-2));transition:all var(--calcite-internal-animation-timing-medium) ease-in}.track__range{position:absolute;inset-block-start:0px;block-size:.125rem;background-color:var(--calcite-slider-track-fill-color, var(--calcite-color-brand))}.container--range .track__range:hover{cursor:ew-resize}.container--range .track__range:after{position:absolute;inline-size:100%;content:"";inset-block-start:calc(var(--calcite-slider-full-handle-height) * .5 * -1);block-size:calc(var(--calcite-slider-handle-size) + var(--calcite-slider-handle-extension-height))}@media(forced-colors:active){.thumb{outline-width:0;outline-offset:0}.handle{outline:2px solid transparent;outline-offset:2px}.thumb:focus .handle,.thumb .handle-extension,.thumb:hover .handle-extension,.thumb:focus .handle-extension,.thumb:active .handle-extension{background-color:canvasText}.track{background-color:canvasText}.track__range{background-color:highlight}}.tick{position:absolute;block-size:.25rem;inline-size:.125rem;border-width:1px;border-style:solid;background-color:var(--calcite-slider-tick-color, var(--calcite-color-border-input));border-color:var(--calcite-slider-tick-border-color, var(--calcite-color-foreground-1));inset-block-start:-2px;pointer-events:none;margin-inline-start:-.125rem}.tick--active{background-color:var(--calcite-slider-tick-selected-color, var(--calcite-color-brand))}.tick__label{pointer-events:none;margin-block-start:.875rem;display:flex;justify-content:center}.tick__label--min{transition:opacity var(--calcite-animation-timing)}.tick__label--max{transition:opacity var(--calcite-internal-animation-timing-fast)}:host([has-histogram][label-handles]) .tick__label--min,:host([has-histogram][label-handles]) .tick__label--max,:host([has-histogram][precise]) .tick__label--min,:host([has-histogram][precise]) .tick__label--max{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-3)}.graph{color:var(--calcite-slider-graph-color, var(--calcite-color-foreground-3));block-size:48px}:host([label-ticks][ticks]) .container{padding-block-end:calc(.875rem + var(--calcite-slider-container-font-size))}:host([has-histogram]):host([precise][label-handles]) .container{padding-block-end:calc(var(--calcite-slider-full-handle-height) + 1em)}:host([has-histogram]):host([label-handles]:not([precise])) .container{padding-block-end:calc(var(--calcite-slider-handle-size) * .5 + 1em)}:host([has-histogram]):host([precise]:not([label-handles])) .container{padding-block-end:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([precise]:not([label-handles])) .container{padding-block-start:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([precise]:not([label-handles])) .container--range{padding-block-end:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([label-handles]:not([precise])) .container{padding-block-start:calc(var(--calcite-slider-full-handle-height) + 4px)}:host(:not([has-histogram])):host([label-handles][precise]) .container{padding-block-start:calc(var(--calcite-slider-full-handle-height) + var(--calcite-slider-container-font-size) + 4px)}:host(:not([has-histogram])):host([label-handles][precise]) .container--range{padding-block-end:calc(var(--calcite-slider-full-handle-height) + var(--calcite-slider-container-font-size) + 4px)}.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}::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}:host([hidden]){display:none}[hidden]{display:none}`;
|
|
54
|
+
const styles = css`@charset "UTF-8";:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}.scale--s{--calcite-slider-handle-size: var(--calcite-space-sm-plus);--calcite-slider-handle-extension-height: .4rem;--calcite-slider-container-font-size: var(--calcite-font-size--3)}.scale--s .handle__label,.scale--s .tick__label{line-height:.75rem}.scale--m{--calcite-slider-handle-size: .875rem;--calcite-slider-handle-extension-height: .5rem;--calcite-slider-container-font-size: var(--calcite-font-size--2)}.scale--m .handle__label,.scale--m .tick__label{line-height:1rem}.scale--l{--calcite-slider-handle-size: 1rem;--calcite-slider-handle-extension-height: .65rem;--calcite-slider-container-font-size: var(--calcite-font-size--1)}.scale--l .handle__label,.scale--l .tick__label{line-height:1rem}.handle__label,.tick__label{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-slider-text-color, var(--calcite-color-text-2));font-size:var(--calcite-slider-container-font-size)}:host{display:block}:host .validation-container{padding-block-start:0!important}.container{position:relative;display:block;overflow-wrap:normal;word-break:normal;padding-inline:calc(var(--calcite-slider-handle-size) * .5);padding-block:calc(var(--calcite-slider-handle-size) * .5);margin-block:calc(var(--calcite-slider-handle-size) * .5);margin-inline:0;--calcite-slider-full-handle-height: calc( var(--calcite-slider-handle-size) + var(--calcite-slider-handle-extension-height) );touch-action:none;-webkit-user-select:none;user-select:none}:host([disabled]) .track__range,:host([disabled]) .tick--active{background-color:var(--calcite-color-text-3)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.scale--s .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -.375rem}.scale--m .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -.5rem}.scale--l .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -.55rem}:host([precise]:not([has-histogram])) .container .thumb--value{--calcite-slider-thumb-y-offset: calc(var(--calcite-slider-full-handle-height) * -1)}.thumb-container{position:relative;max-inline-size:100%}.thumb{--calcite-slider-thumb-x-offset: calc(var(--calcite-slider-handle-size) * .5);position:absolute;margin:0;display:flex;cursor:pointer;flex-direction:column;align-items:center;border-style:none;background-color:transparent;padding:0;font-family:inherit;outline:2px solid transparent;outline-offset:2px;transform:translate(var(--calcite-slider-thumb-x-offset),var(--calcite-slider-thumb-y-offset))}.thumb .handle__label{white-space:nowrap}.thumb .handle__label.static,.thumb .handle__label.transformed{position:absolute;inset-block:0px;opacity:0}.thumb .handle__label.hyphen:after{content:"—";display:inline-block;inline-size:1em}.thumb .handle__label.hyphen--wrap{display:flex}.thumb .handle{box-sizing:border-box;border-radius:9999px;outline-color:transparent;background-color:var(--calcite-slider-handle-fill-color, var(--calcite-color-foreground-1));block-size:var(--calcite-slider-handle-size);inline-size:var(--calcite-slider-handle-size);box-shadow:0 0 0 2px var(--calcite-color-text-3) inset;transition:border var(--calcite-internal-animation-timing-medium) ease,background-color var(--calcite-internal-animation-timing-medium) ease,box-shadow var(--calcite-animation-timing) ease}.thumb .handle-extension{inline-size:.125rem;block-size:var(--calcite-slider-handle-extension-height);background-color:var(--calcite-slider-handle-extension-color, var(--calcite-color-text-3))}.thumb:hover .handle{box-shadow:0 0 0 3px var(--calcite-color-brand) inset}.thumb:hover .handle-extension{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand))}.thumb:focus .handle{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))))}.thumb:focus .handle-extension{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand))}.thumb.thumb--minValue{transform:translate(calc(var(--calcite-slider-thumb-x-offset) * -1),var(--calcite-slider-thumb-y-offset))}.thumb.thumb--precise{--calcite-slider-thumb-y-offset: -.125rem}:host([label-handles]) .thumb{--calcite-slider-thumb-x-offset: 50%}:host([label-handles]):host(:not([has-histogram])) .scale--s .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -1.4375rem}:host([label-handles]):host(:not([has-histogram])) .scale--m .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -1.875rem}:host([label-handles]):host(:not([has-histogram])) .scale--l .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -2rem}:host([has-histogram][label-handles]) .handle__label,:host([label-handles]:not([has-histogram])) .thumb--minValue.thumb--precise .handle__label{margin-block-start:.5em}:host(:not([has-histogram]):not([precise])) .handle__label,:host([label-handles]:not([has-histogram])) .thumb--value .handle__label{margin-block-end:.5em}:host([label-handles][precise]):host(:not([has-histogram])) .scale--s .thumb--value{--calcite-slider-thumb-y-offset: -2.075rem}:host([label-handles][precise]):host(:not([has-histogram])) .scale--m .thumb--value{--calcite-slider-thumb-y-offset: -2.75rem}:host([label-handles][precise]):host(:not([has-histogram])) .scale--l .thumb--value{--calcite-slider-thumb-y-offset: -3.0625rem}.thumb:focus .handle,.thumb--active .handle{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand));box-shadow:0 0 8px #00000029}.thumb:hover.thumb--precise:after,.thumb:focus.thumb--precise:after,.thumb--active.thumb--precise:after{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand))}.track{position:relative;block-size:.125rem;border-radius:0;background-color:var(--calcite-slider-track-color, var(--calcite-color-border-2));transition:all var(--calcite-internal-animation-timing-medium) ease-in}.track__range{position:absolute;inset-block-start:0px;block-size:.125rem;background-color:var(--calcite-slider-track-fill-color, var(--calcite-color-brand))}.container--range .track__range:hover{cursor:ew-resize}.container--range .track__range:after{position:absolute;inline-size:100%;content:"";inset-block-start:calc(var(--calcite-slider-full-handle-height) * .5 * -1);block-size:calc(var(--calcite-slider-handle-size) + var(--calcite-slider-handle-extension-height))}@media(forced-colors:active){.thumb{outline-width:0;outline-offset:0}.handle{outline:2px solid transparent;outline-offset:2px}.thumb:focus .handle,.thumb .handle-extension,.thumb:hover .handle-extension,.thumb:focus .handle-extension,.thumb:active .handle-extension{background-color:canvasText}.track{background-color:canvasText}.track__range{background-color:highlight}}.tick{position:absolute;block-size:.25rem;inline-size:.125rem;border-width:1px;border-style:solid;background-color:var(--calcite-slider-tick-color, var(--calcite-color-border-input));border-color:var(--calcite-slider-tick-border-color, var(--calcite-color-foreground-1));inset-block-start:-2px;pointer-events:none;margin-inline-start:-.125rem}.tick--active{background-color:var(--calcite-slider-tick-selected-color, var(--calcite-color-brand))}.tick__label{pointer-events:none;margin-block-start:.875rem;display:flex;justify-content:center}.tick__label--min{transition:opacity var(--calcite-animation-timing)}.tick__label--max{transition:opacity var(--calcite-internal-animation-timing-fast)}:host([has-histogram][label-handles]) .tick__label--min,:host([has-histogram][label-handles]) .tick__label--max,:host([has-histogram][precise]) .tick__label--min,:host([has-histogram][precise]) .tick__label--max{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-3)}.graph{color:var(--calcite-slider-graph-color, var(--calcite-color-foreground-3));block-size:48px}:host([label-ticks][ticks]) .container{padding-block-end:calc(.875rem + var(--calcite-slider-container-font-size))}:host([has-histogram]):host([precise][label-handles]) .container{padding-block-end:calc(var(--calcite-slider-full-handle-height) + 1em)}:host([has-histogram]):host([label-handles]:not([precise])) .container{padding-block-end:calc(var(--calcite-slider-handle-size) * .5 + 1em)}:host([has-histogram]):host([precise]:not([label-handles])) .container{padding-block-end:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([precise]:not([label-handles])) .container{padding-block-start:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([precise]:not([label-handles])) .container--range{padding-block-end:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([label-handles]:not([precise])) .container{padding-block-start:calc(var(--calcite-slider-full-handle-height) + 4px)}:host(:not([has-histogram])):host([label-handles][precise]) .container{padding-block-start:calc(var(--calcite-slider-full-handle-height) + var(--calcite-slider-container-font-size) + 4px)}:host(:not([has-histogram])):host([label-handles][precise]) .container--range{padding-block-end:calc(var(--calcite-slider-full-handle-height) + var(--calcite-slider-container-font-size) + 4px)}.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}::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}:host([hidden]){display:none}[hidden]{display:none}`;
|
|
55
55
|
function isRange(value) {
|
|
56
56
|
return Array.isArray(value);
|
|
57
57
|
}
|
|
@@ -117,8 +117,11 @@ class Slider extends LitElement {
|
|
|
117
117
|
};
|
|
118
118
|
return numberStringFormatter.localize(value.toString());
|
|
119
119
|
};
|
|
120
|
+
this.formSupport = useForm({
|
|
121
|
+
inputType: "range"
|
|
122
|
+
})(this);
|
|
120
123
|
this.guid = IDS.host(guid());
|
|
121
|
-
this.messages = useT9n();
|
|
124
|
+
this.messages = useT9n({ blocking: true });
|
|
122
125
|
this.pointerUpDragEnd = (event) => {
|
|
123
126
|
if (this.disabled || !isPrimaryPointerButton(event)) {
|
|
124
127
|
return;
|
|
@@ -149,19 +152,6 @@ class Slider extends LitElement {
|
|
|
149
152
|
this.snap = false;
|
|
150
153
|
this.status = "idle";
|
|
151
154
|
this.step = 1;
|
|
152
|
-
this.validity = {
|
|
153
|
-
valid: false,
|
|
154
|
-
badInput: false,
|
|
155
|
-
customError: false,
|
|
156
|
-
patternMismatch: false,
|
|
157
|
-
rangeOverflow: false,
|
|
158
|
-
rangeUnderflow: false,
|
|
159
|
-
stepMismatch: false,
|
|
160
|
-
tooLong: false,
|
|
161
|
-
tooShort: false,
|
|
162
|
-
typeMismatch: false,
|
|
163
|
-
valueMissing: false
|
|
164
|
-
};
|
|
165
155
|
this.calciteSliderChange = createEvent({ cancelable: false });
|
|
166
156
|
this.calciteSliderInput = createEvent({ cancelable: false });
|
|
167
157
|
this.listen("pointerdown", this.pointerDownHandler);
|
|
@@ -169,7 +159,10 @@ class Slider extends LitElement {
|
|
|
169
159
|
this.listen("touchstart", this.handleTouchStart);
|
|
170
160
|
}
|
|
171
161
|
static {
|
|
172
|
-
this.properties = { activeProp: [16, {}, { state: true }], maxValueDragRange: [16, {}, { state: true }], minMaxValueRange: [16, {}, { state: true }], minValueDragRange: [16, {}, { state: true }], tickValues: [16, {}, { state: true }], disabled: [7, {}, { reflect: true, type: Boolean }], fillPlacement: [3, {}, { reflect: true }], form: [3, {}, { reflect: true }], groupSeparator: [7, {}, { reflect: true, type: Boolean }], hasHistogram: [7, {}, { reflect: true, type: Boolean }], histogram: [0, {}, { attribute: false }], histogramStops: [0, {}, { attribute: false }], labelFormatter: [0, {}, { attribute: false }], labelHandles: [7, {}, { reflect: true, type: Boolean }], labelTicks: [7, {}, { reflect: true, type: Boolean }], max: [11, {}, { reflect: true, type: Number }], maxLabel: 1, maxValue: [9, {}, { type: Number }], min: [11, {}, { reflect: true, type: Number }], minLabel: 1, labelText: 1, messageOverrides: [0, {}, { attribute: false }], minValue: [9, {}, { type: Number }], mirrored: [7, {}, { reflect: true, type: Boolean }], name: [3, {}, { reflect: true }], numberingSystem: 1, pageStep: [11, {}, { reflect: true, type: Number }], precise: [7, {}, { reflect: true, type: Boolean }], required: [7, {}, { reflect: true, type: Boolean }], scale: [3, {}, { reflect: true }], snap: [7, {}, { reflect: true, type: Boolean }], status: [3, {}, { reflect: true }], step: [11, {}, { reflect: true, type: Number }], ticks: [11, {}, { reflect: true, type: Number }], validationIcon: [3, { converter: stringOrBoolean, type: String }, { reflect: true }], validationMessage: 1, validity: [
|
|
162
|
+
this.properties = { activeProp: [16, {}, { state: true }], maxValueDragRange: [16, {}, { state: true }], minMaxValueRange: [16, {}, { state: true }], minValueDragRange: [16, {}, { state: true }], tickValues: [16, {}, { state: true }], disabled: [7, {}, { reflect: true, type: Boolean }], fillPlacement: [3, {}, { reflect: true }], form: [3, {}, { reflect: true }], groupSeparator: [7, {}, { reflect: true, type: Boolean }], hasHistogram: [7, {}, { reflect: true, type: Boolean }], histogram: [0, {}, { attribute: false }], histogramStops: [0, {}, { attribute: false }], labelFormatter: [0, {}, { attribute: false }], labelHandles: [7, {}, { reflect: true, type: Boolean }], labelTicks: [7, {}, { reflect: true, type: Boolean }], max: [11, {}, { reflect: true, type: Number }], maxLabel: 1, maxValue: [9, {}, { type: Number }], min: [11, {}, { reflect: true, type: Number }], minLabel: 1, labelText: 1, messageOverrides: [0, {}, { attribute: false }], minValue: [9, {}, { type: Number }], mirrored: [7, {}, { reflect: true, type: Boolean }], name: [3, {}, { reflect: true }], numberingSystem: 1, pageStep: [11, {}, { reflect: true, type: Number }], precise: [7, {}, { reflect: true, type: Boolean }], required: [7, {}, { reflect: true, type: Boolean }], scale: [3, {}, { reflect: true }], snap: [7, {}, { reflect: true, type: Boolean }], status: [3, {}, { reflect: true }], step: [11, {}, { reflect: true, type: Number }], ticks: [11, {}, { reflect: true, type: Number }], validationIcon: [3, { converter: stringOrBoolean, type: String }, { reflect: true }], validationMessage: 1, validity: [32, {}, { readOnly: true, attribute: false }], value: [11, {}, { reflect: true, type: Number }] };
|
|
163
|
+
}
|
|
164
|
+
static {
|
|
165
|
+
this.formAssociated = true;
|
|
173
166
|
}
|
|
174
167
|
static {
|
|
175
168
|
this.shadowRootOptions = { mode: "open", delegatesFocus: true };
|
|
@@ -202,12 +195,10 @@ class Slider extends LitElement {
|
|
|
202
195
|
this.setMinMaxFromValue();
|
|
203
196
|
this.setValueFromMinMax();
|
|
204
197
|
connectLabel(this);
|
|
205
|
-
connectForm(this);
|
|
206
198
|
this.previousEmittedValue = this.value;
|
|
207
199
|
}
|
|
208
200
|
load() {
|
|
209
201
|
this.setInitialValue();
|
|
210
|
-
afterConnectDefaultValueSet(this, this.value);
|
|
211
202
|
}
|
|
212
203
|
willUpdate(changes) {
|
|
213
204
|
if (changes.has("histogram")) {
|
|
@@ -238,7 +229,6 @@ class Slider extends LitElement {
|
|
|
238
229
|
disconnectedCallback() {
|
|
239
230
|
super.disconnectedCallback();
|
|
240
231
|
disconnectLabel(this);
|
|
241
|
-
disconnectForm(this);
|
|
242
232
|
this.removeDragListeners();
|
|
243
233
|
}
|
|
244
234
|
setInitialValue() {
|
|
@@ -690,7 +680,7 @@ class Slider extends LitElement {
|
|
|
690
680
|
left: mirror ? "" : tickOffset,
|
|
691
681
|
right: mirror ? tickOffset : ""
|
|
692
682
|
})}>${this.renderTickLabel(tick)}</span>`;
|
|
693
|
-
})}</div></div><div class=${safeClassMap(CSS.thumbContainer)}>${minThumb}${thumb}
|
|
683
|
+
})}</div></div><div class=${safeClassMap(CSS.thumbContainer)}>${minThumb}${thumb}</div></div>${this.validationMessage && this.status === "invalid" ? Validation({ icon: this.validationIcon, id: IDS.validationMessage, message: this.validationMessage, scale: this.scale, status: this.status }) : null}` });
|
|
694
684
|
}
|
|
695
685
|
renderThumb({ type, mirror, thumbPlacement, minInterval, maxInterval }) {
|
|
696
686
|
const isLabeled = type.includes("labeled");
|