@esri/calcite-components 5.1.0-next.9 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cdn/{L24DVRWE.js → 2I4IL7KB.js} +1 -1
- package/dist/cdn/{RPT5BJMD.js → 2P5ISR6V.js} +1 -1
- package/dist/cdn/2TVQXBLD.js +2 -0
- package/dist/cdn/2VKTPJWO.js +2 -0
- package/dist/cdn/3GDRQKT2.js +2 -0
- package/dist/cdn/{LQD663MA.js → 3HTVKOWE.js} +1 -1
- package/dist/cdn/{YJHXVSEP.js → 3IM4BLOF.js} +1 -1
- package/dist/cdn/44WHX5D3.js +2 -0
- package/dist/cdn/{JVAE3MLA.js → 46F35NGY.js} +1 -1
- package/dist/cdn/4A2BNZJW.js +2 -0
- package/dist/cdn/{S7XHDLIF.js → 4ANP3V6G.js} +1 -1
- package/dist/cdn/4PUYRVNO.js +2 -0
- package/dist/cdn/4RELRYKX.js +2 -0
- package/dist/cdn/4V5C3DSP.js +2 -0
- package/dist/cdn/54WP47EN.js +2 -0
- package/dist/cdn/5C72Z4LQ.js +2 -0
- package/dist/cdn/{34EJXQYF.js → 5OLLJHWT.js} +1 -1
- package/dist/cdn/5SDZUEAZ.js +2 -0
- package/dist/cdn/5ULM4EXU.js +2 -0
- package/dist/cdn/6U4CYHVA.js +2 -0
- package/dist/cdn/6UERLWMH.js +2 -0
- package/dist/cdn/{IJ7V345Q.js → 6XE2EP66.js} +1 -1
- package/dist/cdn/{VQHTMUYJ.js → 6YLT6LZJ.js} +1 -1
- package/dist/cdn/6ZUCCZI3.js +2 -0
- package/dist/cdn/{DYBHFMG7.js → 75ARST2G.js} +1 -1
- package/dist/cdn/{OQ2UCUQP.js → 7A746NXL.js} +1 -1
- package/dist/cdn/7DBM34FB.js +2 -0
- package/dist/cdn/7FTYXBPX.js +2 -0
- package/dist/cdn/7OWLHFPX.js +2 -0
- package/dist/cdn/7XMGNOPQ.js +2 -0
- package/dist/cdn/A5L2Q32C.js +2 -0
- package/dist/cdn/ADH55C3C.js +2 -0
- package/dist/cdn/{IZLDBAPA.js → ADH5D4IE.js} +1 -1
- package/dist/cdn/AFGFN5LE.js +2 -0
- package/dist/cdn/AKKQ5DPN.js +2 -0
- package/dist/cdn/{CSOE3CJR.js → AYFJCHPP.js} +1 -1
- package/dist/cdn/{QULVDSNJ.js → BL4CROY4.js} +1 -1
- package/dist/cdn/{GGGN54CY.js → BONCETQ5.js} +1 -1
- package/dist/cdn/BOZBB7XQ.js +2 -0
- package/dist/cdn/BPVUFU5U.js +4 -0
- package/dist/cdn/CY6G2WDI.js +2 -0
- package/dist/cdn/{MVA4NE6I.js → CYVIISMJ.js} +1 -1
- package/dist/cdn/{SHD6TE4R.js → D44AQ74K.js} +1 -1
- package/dist/cdn/{EHIAXJAL.js → DCWL5FUH.js} +1 -1
- package/dist/cdn/{NJRKH5Q7.js → DJTEYVEK.js} +1 -1
- package/dist/cdn/DK56URUM.js +2 -0
- package/dist/cdn/DMMA5ZYG.js +2 -0
- package/dist/cdn/DYMICF33.js +2 -0
- package/dist/cdn/{BAMCFG7H.js → E2T2QERX.js} +1 -1
- package/dist/cdn/{IWG7JAQJ.js → ECXU6B4A.js} +1 -1
- package/dist/cdn/EOJ2AVKD.js +2 -0
- package/dist/cdn/{O7BFREIB.js → EPDTHVMK.js} +1 -1
- package/dist/cdn/EPNCB6OJ.js +2 -0
- package/dist/cdn/FFB3HCSC.js +2 -0
- package/dist/cdn/{5TJGOI64.js → FHGV3WTN.js} +1 -1
- package/dist/cdn/{UKC7JB7P.js → GALIT4BA.js} +1 -1
- package/dist/cdn/{TKH5LW5O.js → GB2TPSAG.js} +1 -1
- package/dist/cdn/{VOTW2RMD.js → GCNYPWEC.js} +1 -1
- package/dist/cdn/GDZAGWDU.js +2 -0
- package/dist/cdn/{WEAILY72.js → GEEPTD4A.js} +1 -1
- package/dist/cdn/{6LA4PLL2.js → GFEJFYRL.js} +1 -1
- package/dist/cdn/{TXRFE5GH.js → GI6UQRPO.js} +1 -1
- package/dist/cdn/GJL5RMPQ.js +2 -0
- package/dist/cdn/{PFKFYB45.js → GT3BV452.js} +1 -1
- package/dist/cdn/GZHK6NCY.js +2 -0
- package/dist/cdn/HB4MH2EZ.js +2 -0
- package/dist/cdn/HRC6BJMW.js +2 -0
- package/dist/cdn/{BPIG37CO.js → I5D2AGK5.js} +1 -1
- package/dist/cdn/IEPYYQBO.js +2 -0
- package/dist/cdn/{7JGWCRII.js → ISTQU57G.js} +1 -1
- package/dist/cdn/J3ELP2FF.js +2 -0
- package/dist/cdn/JITQNOBY.js +2 -0
- package/dist/cdn/JIWTOV7Q.js +2 -0
- package/dist/cdn/JRHGPYNH.js +2 -0
- package/dist/cdn/{7XBTO6NQ.js → JWG2PPAV.js} +1 -1
- package/dist/cdn/{AS2M2ZWD.js → JZWVIZ2B.js} +1 -1
- package/dist/cdn/{6C76CPWO.js → K57DPE4N.js} +1 -1
- package/dist/cdn/{3IHT5FIP.js → KEAGVFG4.js} +1 -1
- package/dist/cdn/KED2RZ42.js +2 -0
- package/dist/cdn/KEFKNHSD.js +2 -0
- package/dist/cdn/KLW37VF4.js +2 -0
- package/dist/cdn/{XUSE3II4.js → KSR5E33C.js} +1 -1
- package/dist/cdn/{3GXLGKZV.js → KTBER6SN.js} +1 -1
- package/dist/cdn/{PIU3YYLU.js → KTUCOBBY.js} +1 -1
- package/dist/cdn/{XJZLGVT6.js → KWFOKTKG.js} +1 -1
- package/dist/cdn/LBFLMGFV.js +2 -0
- package/dist/cdn/LHYTGIZG.js +2 -0
- package/dist/cdn/{EB4M47KA.js → LO5HOYI2.js} +1 -1
- package/dist/cdn/LOAHLN6N.js +2 -0
- package/dist/cdn/{QCDS2TXE.js → LUWJNSYS.js} +1 -1
- package/dist/cdn/MJPROSY6.js +2 -0
- package/dist/cdn/{BZGE52YU.js → NBXPROCG.js} +1 -1
- package/dist/cdn/NERFMP54.js +2 -0
- package/dist/cdn/{CNR7IJIS.js → NKYEDCKH.js} +1 -1
- package/dist/cdn/NRALFORW.js +2 -0
- package/dist/cdn/{YM6QAFEQ.js → NRY3KXPN.js} +1 -1
- package/dist/cdn/{WBJUAZ65.js → NRYIW7DB.js} +1 -1
- package/dist/cdn/NTYYNNBV.js +2 -0
- package/dist/cdn/NU23JDGC.js +2 -0
- package/dist/cdn/NZC2U4OU.js +2 -0
- package/dist/cdn/ODKPYY3R.js +2 -0
- package/dist/cdn/OQHB5W7D.js +2 -0
- package/dist/cdn/PQ5ASGHR.js +2 -0
- package/dist/cdn/PZVPEXW2.js +2 -0
- package/dist/cdn/QOPSMYNJ.js +2 -0
- package/dist/cdn/QP76SSEW.js +2 -0
- package/dist/cdn/{I7BWPAOF.js → QSU37BPY.js} +1 -1
- package/dist/cdn/{C25ETLQX.js → QYODZAGH.js} +1 -1
- package/dist/cdn/R2VQIQOY.js +2 -0
- package/dist/cdn/R3SNXCXR.js +2 -0
- package/dist/cdn/RJTQLFW2.js +2 -0
- package/dist/cdn/{TTFCVVON.js → RRF6AKIF.js} +1 -1
- package/dist/cdn/RSCWCCYB.js +2 -0
- package/dist/cdn/{BMRN6G4T.js → RUVQ7O6L.js} +1 -1
- package/dist/cdn/RYLKDSFN.js +3 -0
- package/dist/cdn/STAAJHPM.js +2 -0
- package/dist/cdn/{43FMFYKZ.js → SUEXKJRG.js} +1 -1
- package/dist/cdn/TAZRZNVR.js +2 -0
- package/dist/cdn/{YMHR4PKM.js → TKHRV4GA.js} +1 -1
- package/dist/cdn/{E6EGKXUX.js → TSWJKW5G.js} +1 -1
- package/dist/cdn/UDRFE54L.js +2 -0
- package/dist/cdn/USZ4G42E.js +2 -0
- package/dist/cdn/{U4MTAQRM.js → UTEI7VLM.js} +1 -1
- package/dist/cdn/UWU3SSNM.js +2 -0
- package/dist/cdn/UY76KLJJ.js +2 -0
- package/dist/cdn/{CMVTCAFL.js → V5LDBUD2.js} +1 -1
- package/dist/cdn/VAXAY3BK.js +2 -0
- package/dist/cdn/{EIXE62NK.js → VD7KVHE6.js} +1 -1
- package/dist/cdn/{HQDFIE2B.js → VYK6NRTI.js} +1 -1
- package/dist/cdn/W5TINV5N.js +2 -0
- package/dist/cdn/W753MF3U.js +2 -0
- package/dist/cdn/WC3SB5B7.js +2 -0
- package/dist/cdn/{RH6ZIP65.js → WGGFNK4Z.js} +1 -1
- package/dist/cdn/WTP5LKQS.js +2 -0
- package/dist/cdn/{OPHJLVOH.js → X3WAJ4V4.js} +1 -1
- package/dist/cdn/XMHBPNOP.js +2 -0
- package/dist/cdn/{XW3UC4FN.js → XQXKNOUC.js} +1 -1
- package/dist/cdn/{HZGU4N3I.js → XTKAAKGX.js} +1 -1
- package/dist/cdn/XVCPLNXU.js +2 -0
- package/dist/cdn/XZK4WGVJ.js +4 -0
- package/dist/cdn/{BG7CCT2Q.js → Y47FX6CN.js} +1 -1
- package/dist/cdn/{ZGJRTQBX.js → YFT7U3IW.js} +1 -1
- package/dist/cdn/{67QHQNZF.js → YLZT3LR4.js} +1 -1
- package/dist/cdn/{JRWW665Q.js → ZQ4VNHFE.js} +1 -1
- package/dist/cdn/ZSTOD4V7.js +2 -0
- package/dist/cdn/ZYQDIIRU.js +2 -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/returnToDefault16.json +1 -0
- package/dist/cdn/assets/icon/returnToDefault24.json +1 -0
- package/dist/cdn/assets/icon/returnToDefault32.json +1 -0
- package/dist/cdn/assets/icon/reviewMap16.json +1 -0
- package/dist/cdn/assets/icon/reviewMap24.json +1 -0
- package/dist/cdn/assets/icon/reviewMap32.json +1 -0
- package/dist/cdn/assets/icon/totalStation16.json +1 -0
- package/dist/cdn/assets/icon/totalStation24.json +1 -0
- package/dist/cdn/assets/icon/totalStation32.json +1 -0
- package/dist/cdn/assets/icon/velocityServer16.json +1 -0
- package/dist/cdn/assets/icon/velocityServer24.json +1 -0
- package/dist/cdn/assets/icon/velocityServer32.json +1 -0
- package/dist/cdn/index.js +2 -2
- package/dist/cdn/main.css +2 -2
- package/dist/chunks/ClearButton.js +16 -0
- package/dist/chunks/ExpandToggle.js +2 -2
- package/dist/chunks/FloatingArrow.js +24 -0
- package/dist/chunks/Heading.js +3 -3
- package/dist/chunks/component.js +1 -1
- package/dist/chunks/dom.js +50 -29
- package/dist/chunks/floating-ui.js +1 -1
- package/dist/chunks/locale.js +29 -12
- package/dist/chunks/{useReferenceElement.js → manager.js} +114 -114
- package/dist/chunks/resources6.js +2 -0
- package/dist/chunks/runtime.js +4 -4
- package/dist/chunks/useFocusTrap.js +70 -28
- package/dist/chunks/useForm.js +225 -44
- package/dist/chunks/useFormTrigger.js +25 -0
- package/dist/chunks/{sortableComponent.js → useSortable.js} +70 -44
- package/dist/chunks/utils.js +6 -6
- package/dist/chunks/utils3.js +18 -3
- package/dist/components/calcite-accordion-item/customElement.d.ts +6 -6
- package/dist/components/calcite-action/customElement.d.ts +20 -12
- package/dist/components/calcite-action/customElement.js +10 -15
- package/dist/components/calcite-action-bar/customElement.d.ts +4 -4
- package/dist/components/calcite-action-bar/customElement.js +12 -6
- package/dist/components/calcite-action-group/customElement.d.ts +12 -6
- package/dist/components/calcite-action-group/customElement.js +2 -1
- package/dist/components/calcite-action-menu/customElement.d.ts +2 -2
- package/dist/components/calcite-action-pad/customElement.d.ts +3 -3
- package/dist/components/calcite-action-pad/customElement.js +12 -7
- package/dist/components/calcite-alert/customElement.d.ts +2 -2
- package/dist/components/calcite-alert/customElement.js +1 -1
- package/dist/components/calcite-autocomplete/customElement.d.ts +16 -13
- package/dist/components/calcite-autocomplete/customElement.js +21 -32
- package/dist/components/calcite-autocomplete-item/customElement.d.ts +6 -0
- package/dist/components/calcite-autocomplete-item/customElement.js +9 -4
- package/dist/components/calcite-block/customElement.d.ts +11 -7
- package/dist/components/calcite-block/customElement.js +1 -1
- package/dist/components/calcite-block-group/customElement.d.ts +1 -1
- package/dist/components/calcite-block-group/customElement.js +4 -11
- package/dist/components/calcite-block-group/interfaces.d.ts +2 -6
- package/dist/components/calcite-block-section/customElement.d.ts +1 -1
- package/dist/components/calcite-button/customElement.d.ts +6 -6
- package/dist/components/calcite-button/customElement.js +10 -22
- package/dist/components/calcite-card/customElement.d.ts +11 -5
- package/dist/components/calcite-card/customElement.js +5 -3
- package/dist/components/calcite-card-group/customElement.d.ts +9 -3
- package/dist/components/calcite-card-group/customElement.js +11 -1
- package/dist/components/calcite-carousel/customElement.d.ts +8 -2
- package/dist/components/calcite-carousel/customElement.js +11 -8
- package/dist/components/calcite-carousel/interfaces.d.ts +3 -1
- package/dist/components/calcite-checkbox/customElement.d.ts +4 -5
- package/dist/components/calcite-checkbox/customElement.js +2 -15
- 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 +57 -69
- package/dist/components/calcite-combobox/index.js +2 -1
- package/dist/components/calcite-combobox-item/customElement.d.ts +1 -1
- package/dist/components/calcite-combobox-item/customElement.js +1 -1
- package/dist/components/calcite-date-picker/customElement.d.ts +1 -1
- package/dist/components/calcite-date-picker/customElement.js +4 -14
- package/dist/components/calcite-date-picker-day/customElement.d.ts +1 -1
- package/dist/components/calcite-date-picker-day/customElement.js +1 -1
- package/dist/components/calcite-date-picker-month/customElement.js +2 -2
- package/dist/components/calcite-date-picker-month-header/customElement.js +1 -1
- package/dist/components/calcite-dialog/customElement.d.ts +7 -5
- package/dist/components/calcite-dialog/customElement.js +4 -2
- package/dist/components/calcite-dropdown/customElement.d.ts +15 -5
- package/dist/components/calcite-dropdown/customElement.js +166 -91
- package/dist/components/calcite-dropdown-item/customElement.d.ts +2 -2
- package/dist/components/calcite-dropdown-item/customElement.js +14 -32
- package/dist/components/calcite-fab/customElement.d.ts +1 -1
- package/dist/components/calcite-fab/customElement.js +2 -2
- package/dist/components/calcite-filter/customElement.d.ts +1 -1
- package/dist/components/calcite-flow/customElement.d.ts +1 -1
- package/dist/components/calcite-flow-item/customElement.d.ts +8 -5
- package/dist/components/calcite-flow-item/customElement.js +4 -2
- package/dist/components/calcite-focus-trap/customElement.d.ts +46 -0
- package/dist/components/calcite-focus-trap/customElement.js +56 -0
- package/dist/components/calcite-focus-trap/index.d.ts +1 -0
- package/dist/components/calcite-focus-trap/index.js +1 -0
- package/dist/components/calcite-graph/customElement.js +1 -1
- package/dist/components/calcite-handle/customElement.d.ts +1 -1
- package/dist/components/calcite-icon/customElement.d.ts +1 -1
- package/dist/components/calcite-inline-editable/customElement.d.ts +2 -2
- package/dist/components/calcite-inline-editable/customElement.js +1 -1
- package/dist/components/calcite-input/customElement.d.ts +17 -18
- package/dist/components/calcite-input/customElement.js +26 -49
- package/dist/components/calcite-input/index.js +1 -0
- package/dist/components/calcite-input-date-picker/customElement.d.ts +6 -7
- package/dist/components/calcite-input-date-picker/customElement.js +67 -76
- package/dist/components/calcite-input-message/customElement.d.ts +1 -1
- package/dist/components/calcite-input-number/customElement.d.ts +13 -14
- package/dist/components/calcite-input-number/customElement.js +22 -48
- package/dist/components/calcite-input-number/index.js +1 -0
- package/dist/components/calcite-input-text/customElement.d.ts +11 -12
- package/dist/components/calcite-input-text/customElement.js +6 -18
- 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 +18 -15
- package/dist/components/calcite-list/interfaces.d.ts +2 -6
- package/dist/components/calcite-list-item/customElement.d.ts +2 -2
- package/dist/components/calcite-list-item/customElement.js +7 -4
- package/dist/components/calcite-list-item-group/customElement.js +6 -0
- package/dist/components/calcite-loader/customElement.d.ts +1 -1
- package/dist/components/calcite-menu/customElement.d.ts +1 -1
- package/dist/components/calcite-menu/customElement.js +1 -1
- package/dist/components/calcite-menu-item/customElement.d.ts +3 -3
- package/dist/components/calcite-menu-item/customElement.js +1 -1
- package/dist/components/calcite-meter/customElement.js +4 -4
- package/dist/components/calcite-navigation/customElement.d.ts +9 -2
- package/dist/components/calcite-navigation/customElement.js +56 -3
- package/dist/components/calcite-navigation-logo/customElement.d.ts +3 -3
- package/dist/components/calcite-navigation-logo/customElement.js +4 -3
- package/dist/components/calcite-navigation-user/customElement.d.ts +2 -2
- package/dist/components/calcite-navigation-user/customElement.js +11 -6
- package/dist/components/calcite-notice/customElement.d.ts +3 -3
- package/dist/components/calcite-notice/customElement.js +1 -1
- package/dist/components/calcite-pagination/customElement.d.ts +1 -1
- package/dist/components/calcite-pagination/customElement.js +1 -1
- package/dist/components/calcite-panel/customElement.d.ts +7 -5
- package/dist/components/calcite-panel/customElement.js +20 -8
- package/dist/components/calcite-popover/customElement.d.ts +2 -2
- package/dist/components/calcite-popover/customElement.js +3 -2
- package/dist/components/calcite-radio-button/customElement.d.ts +30 -2
- package/dist/components/calcite-radio-button/customElement.js +12 -19
- package/dist/components/calcite-radio-button-group/customElement.d.ts +1 -1
- package/dist/components/calcite-radio-button-group/customElement.js +20 -1
- package/dist/components/calcite-rating/customElement.d.ts +3 -4
- package/dist/components/calcite-rating/customElement.js +12 -18
- package/dist/components/calcite-segmented-control/customElement.d.ts +3 -4
- package/dist/components/calcite-segmented-control/customElement.js +8 -19
- package/dist/components/calcite-segmented-control-item/customElement.d.ts +0 -1
- package/dist/components/calcite-segmented-control-item/customElement.js +1 -1
- package/dist/components/calcite-select/customElement.d.ts +3 -4
- package/dist/components/calcite-select/customElement.js +9 -20
- package/dist/components/calcite-sheet/customElement.d.ts +3 -3
- package/dist/components/calcite-sheet/customElement.js +3 -7
- package/dist/components/calcite-shell-panel/customElement.d.ts +4 -4
- package/dist/components/calcite-shell-panel/customElement.js +59 -30
- package/dist/components/calcite-slider/customElement.d.ts +3 -4
- package/dist/components/calcite-slider/customElement.js +12 -22
- package/dist/components/calcite-sort-handle/customElement.d.ts +4 -4
- package/dist/components/calcite-sort-handle/customElement.js +44 -17
- package/dist/components/calcite-sortable-list/customElement.d.ts +1 -1
- package/dist/components/calcite-sortable-list/customElement.js +3 -3
- package/dist/components/calcite-split-button/customElement.d.ts +8 -8
- package/dist/components/calcite-stepper/customElement.d.ts +2 -2
- package/dist/components/calcite-stepper/customElement.js +29 -42
- package/dist/components/calcite-stepper-item/customElement.d.ts +1 -1
- package/dist/components/calcite-stepper-item/customElement.js +2 -8
- package/dist/components/calcite-swatch/customElement.d.ts +1 -1
- package/dist/components/calcite-switch/customElement.d.ts +4 -4
- package/dist/components/calcite-switch/customElement.js +9 -8
- package/dist/components/calcite-tab/customElement.d.ts +1 -1
- package/dist/components/calcite-tab/customElement.js +1 -1
- package/dist/components/calcite-tab-nav/customElement.js +1 -1
- package/dist/components/calcite-tab-title/customElement.js +1 -1
- package/dist/components/calcite-table/customElement.js +1 -1
- package/dist/components/calcite-table-cell/customElement.d.ts +2 -2
- package/dist/components/calcite-table-header/customElement.d.ts +2 -2
- package/dist/components/calcite-table-row/customElement.d.ts +1 -1
- package/dist/components/calcite-tabs/customElement.js +2 -1
- package/dist/components/calcite-text-area/customElement.d.ts +13 -14
- package/dist/components/calcite-text-area/customElement.js +32 -37
- package/dist/components/calcite-tile/customElement.d.ts +1 -1
- package/dist/components/calcite-time-picker/customElement.d.ts +1 -1
- package/dist/components/calcite-time-picker/customElement.js +2 -2
- package/dist/components/calcite-tooltip/customElement.d.ts +15 -2
- package/dist/components/calcite-tooltip/customElement.js +16 -8
- package/dist/components/calcite-tree/customElement.js +1 -1
- package/dist/components/calcite-tree-item/customElement.js +2 -3
- package/dist/controllers/useSortable.d.ts +7 -0
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/supported-browsers.json +1 -1
- package/dist/docs/translations.json +1 -1
- package/dist/docs/vscode.css-custom-data.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +10 -0
- package/dist/loader.js +27 -26
- package/dist/types/lumina.d.ts +16 -10
- package/dist/types/preact.d.ts +17 -10
- package/dist/types/react.d.ts +18 -10
- package/dist/types/stencil.d.ts +16 -10
- package/package.json +22 -23
- package/dist/cdn/24BVOJIY.js +0 -2
- package/dist/cdn/3O7NXGXJ.js +0 -3
- package/dist/cdn/43SP7K3P.js +0 -2
- package/dist/cdn/45Z5R6GR.js +0 -2
- package/dist/cdn/47RTCYTX.js +0 -2
- package/dist/cdn/4AQ3DQDN.js +0 -2
- package/dist/cdn/4DJKUEBQ.js +0 -2
- package/dist/cdn/4IBKGKIH.js +0 -2
- package/dist/cdn/4JVVYRDW.js +0 -2
- package/dist/cdn/4U633XVG.js +0 -2
- package/dist/cdn/55GOZN42.js +0 -2
- package/dist/cdn/575ZYV35.js +0 -2
- package/dist/cdn/5LUEFKD3.js +0 -2
- package/dist/cdn/5RDU2ZNH.js +0 -2
- package/dist/cdn/6OKASMD7.js +0 -2
- package/dist/cdn/7ECYZZBW.js +0 -2
- package/dist/cdn/7UOYXJ3K.js +0 -2
- package/dist/cdn/A6XPQQWN.js +0 -2
- package/dist/cdn/ANQRSTGE.js +0 -2
- package/dist/cdn/BDQCESE7.js +0 -2
- package/dist/cdn/CKMZY3H7.js +0 -2
- package/dist/cdn/DRQCOAQ4.js +0 -2
- package/dist/cdn/DTUD5FAT.js +0 -2
- package/dist/cdn/EQZPTVS3.js +0 -2
- package/dist/cdn/ESATITDD.js +0 -2
- package/dist/cdn/ETIO6SPJ.js +0 -2
- package/dist/cdn/EY7FPNVS.js +0 -2
- package/dist/cdn/FIEDEHAP.js +0 -2
- package/dist/cdn/FZ6ZUHKQ.js +0 -2
- package/dist/cdn/GH34TDLL.js +0 -2
- package/dist/cdn/HG2EYXWI.js +0 -2
- package/dist/cdn/I5G3H4D4.js +0 -2
- package/dist/cdn/IBQYZCFQ.js +0 -2
- package/dist/cdn/IQ4VNR4Q.js +0 -2
- package/dist/cdn/J2OGE3DI.js +0 -2
- package/dist/cdn/JPWQ44GC.js +0 -2
- package/dist/cdn/JRF656V5.js +0 -2
- package/dist/cdn/K2H2TINH.js +0 -2
- package/dist/cdn/KDZRPYFR.js +0 -2
- package/dist/cdn/KHIMNKVO.js +0 -2
- package/dist/cdn/KMOFSKZF.js +0 -2
- package/dist/cdn/KQNOWW4C.js +0 -2
- package/dist/cdn/KYKC2CK2.js +0 -2
- package/dist/cdn/L5LBH4FP.js +0 -2
- package/dist/cdn/LKRLVAVK.js +0 -2
- package/dist/cdn/M6MHKAA5.js +0 -2
- package/dist/cdn/MMEADS6E.js +0 -2
- package/dist/cdn/NGXAYCAR.js +0 -2
- package/dist/cdn/NVHH3XZJ.js +0 -2
- package/dist/cdn/NVSO6GLT.js +0 -2
- package/dist/cdn/NY7A5LKZ.js +0 -2
- package/dist/cdn/OLYLT2L5.js +0 -2
- package/dist/cdn/OXCJDMGQ.js +0 -2
- package/dist/cdn/P4JFMLKY.js +0 -2
- package/dist/cdn/PCTQTX5N.js +0 -2
- package/dist/cdn/PHGT3YNE.js +0 -2
- package/dist/cdn/QR4JRFEP.js +0 -4
- package/dist/cdn/QWALXRY6.js +0 -2
- package/dist/cdn/RCUNETDY.js +0 -2
- package/dist/cdn/SAQAAU52.js +0 -2
- package/dist/cdn/SG24GAXY.js +0 -2
- package/dist/cdn/SIMNCT4V.js +0 -2
- package/dist/cdn/SJSCENKK.js +0 -2
- package/dist/cdn/SLVFP6JA.js +0 -2
- package/dist/cdn/TMOOTRK4.js +0 -2
- package/dist/cdn/TXYWJHYI.js +0 -2
- package/dist/cdn/UHQ454NG.js +0 -2
- package/dist/cdn/UTQKB5CS.js +0 -2
- package/dist/cdn/V2EVNXUV.js +0 -2
- package/dist/cdn/WITGQRKF.js +0 -2
- package/dist/cdn/WJXZ7BPV.js +0 -2
- package/dist/cdn/WM4NZNNA.js +0 -2
- package/dist/cdn/YANXY6FO.js +0 -2
- package/dist/cdn/YMSZKTCN.js +0 -2
- package/dist/cdn/YYDYHAP7.js +0 -2
- package/dist/cdn/ZEASFJJQ.js +0 -2
- package/dist/cdn/ZGCRVGEK.js +0 -2
- package/dist/cdn/ZPZI63EH.js +0 -3
- package/dist/cdn/ZQLGBHLZ.js +0 -2
- package/dist/cdn/ZTV4V5SF.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
|
@@ -5,9 +5,9 @@ import { live } from "lit/directives/live.js";
|
|
|
5
5
|
import { debounce } from "es-toolkit";
|
|
6
6
|
import { escapeRegExp } from "es-toolkit/compat";
|
|
7
7
|
import { c as calciteSize48 } from "../../chunks/core.js";
|
|
8
|
-
import { nothing, html
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
8
|
+
import { css, nothing, html } from "lit";
|
|
9
|
+
import { createRef, ref } from "lit/directives/ref.js";
|
|
10
|
+
import { LitElement, createEvent, stringOrBoolean, safeClassMap } from "@arcgis/lumina";
|
|
11
11
|
import { useDirection } from "@arcgis/lumina/controllers";
|
|
12
12
|
import { f as filter } from "../../chunks/filter.js";
|
|
13
13
|
import { k as getElementWidth, l as getTextWidth, i as focusElement } from "../../chunks/dom.js";
|
|
@@ -16,7 +16,8 @@ import { g as guid } from "../../chunks/guid.js";
|
|
|
16
16
|
import { c as connectLabel, d as disconnectLabel, g as getLabelText } from "../../chunks/label.js";
|
|
17
17
|
import { c as createObserver, u as updateRefObserver } from "../../chunks/observers.js";
|
|
18
18
|
import { t as toggleOpenClose } from "../../chunks/openCloseComponent.js";
|
|
19
|
-
import {
|
|
19
|
+
import { i as isHidden, g as getIconScale } from "../../chunks/component.js";
|
|
20
|
+
import { C as ClearButton } from "../../chunks/ClearButton.js";
|
|
20
21
|
import { I as InternalLabel } from "../../chunks/InternalLabel.js";
|
|
21
22
|
import { V as Validation } from "../../chunks/Validation.js";
|
|
22
23
|
import { u as useT9n } from "../../chunks/useT9n.js";
|
|
@@ -26,22 +27,12 @@ import { u as useCancelable } from "../../chunks/useCancelable.js";
|
|
|
26
27
|
import { u as useInteractive } from "../../chunks/useInteractive.js";
|
|
27
28
|
import { u as useTopLayer } from "../../chunks/useTopLayer.js";
|
|
28
29
|
import { u as useForm } from "../../chunks/useForm.js";
|
|
29
|
-
import { I as IDS, C as CSS
|
|
30
|
+
import { I as IDS, C as CSS, a as ComboboxItemSelector, b as ComboboxItemGroupSelector, c as ICONS } from "../../chunks/resources5.js";
|
|
30
31
|
import { h as hasActiveChildren, i as isSingleLike, g as getLabel, a as getItemAncestors, b as getItemChildren } from "../../chunks/utils2.js";
|
|
31
|
-
const CSS = {
|
|
32
|
-
button: "x-button",
|
|
33
|
-
buttonRound: "x-button--round"
|
|
34
|
-
};
|
|
35
|
-
const XButton = ({ disabled, focusable, key, label, onClick, ref: ref$1, round = true, scale, title }) => keyed(key, html`<button .ariaLabel=${label} class=${safeClassMap({
|
|
36
|
-
[((scale2) => `x-button--${scale2}`)(scale)]: true,
|
|
37
|
-
[CSS.button]: true,
|
|
38
|
-
[CSS.buttonRound]: round
|
|
39
|
-
})} .disabled=${disabled} @click=${onClick} .tabIndex=${focusable ? 0 : -1} title=${title ?? nothing} type=button ${ref(ref$1)}><calcite-icon icon=x .scale=${getIconScale(scale)}></calcite-icon></button>`);
|
|
40
|
-
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{position:relative;display:block}:host([scale=s]){font-size:var(--calcite-font-size-relative-sm);--calcite-internal-combobox-spacing-unit-l: .5rem;--calcite-internal-combobox-spacing-unit-s: .25rem;--calcite-internal-combobox-no-matches-spacing-unit-s: .25rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.25rem - 1px) ;--calcite-internal-close-size: 1rem}:host([scale=s]) .x-button{margin-inline:.5rem}:host([scale=m]){font-size:var(--calcite-font-size-relative-base);--calcite-internal-combobox-spacing-unit-l: .75rem;--calcite-internal-combobox-spacing-unit-s: .5rem;--calcite-internal-combobox-no-matches-spacing-unit-s: .375rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.5rem - 1px) ;--calcite-internal-close-size: 1.5rem}:host([scale=m]) .x-button{margin-inline-end:.75rem}:host([scale=l]){font-size:var(--calcite-font-size-relative-md);--calcite-internal-combobox-spacing-unit-l: 1rem;--calcite-internal-combobox-spacing-unit-s: .75rem;--calcite-internal-combobox-no-matches-spacing-unit-s: .625rem;--calcite-combobox-input-height: 1.5rem;--calcite-internal-combobox-input-margin-block: calc(.625rem - 1px) ;--calcite-internal-close-size: 2rem}:host([scale=l]) .x-button{margin-inline-end:1rem}.x-button{align-self:center}.wrapper{display:flex;border-width:1px;border-style:solid;outline-color:transparent;padding-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);padding-inline:var(--calcite-internal-combobox-spacing-unit-l);background-color:var(--calcite-combobox-input-background-color, var(--calcite-color-foreground-1));color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));border-color:var(--calcite-combobox-input-border-color, var(--calcite-color-border-input))}.wrapper:hover .icon{color:var(--calcite-combobox-icon-color-hover, var(--calcite-color-text-1))}:host(:focus-within) .wrapper,.wrapper--active{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))))}:host([read-only]) .wrapper{background-color:var(--calcite-color-background)}:host([read-only]) .label{font-weight:var(--calcite-font-weight-medium)}:host([status=invalid]) .wrapper{border-color:var(--calcite-color-status-danger)}:host([status=invalid]:focus-within) .wrapper{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))))}.wrapper--single{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l);cursor:pointer;flex-wrap:nowrap}.grid-input{position:relative;display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;gap:var(--calcite-internal-combobox-spacing-unit-s);margin-inline-end:var(--calcite-internal-combobox-spacing-unit-s)}.grid-input.selection-display--fit,.grid-input.selection-display--single{flex-wrap:nowrap;overflow:hidden}.input{flex-grow:1;appearance:none;overflow:hidden;text-overflow:ellipsis;border-style:none;background-color:transparent;padding:0;font-family:inherit;color:var(--calcite-color-text-1);font-size:inherit;block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);inline-size:100%;margin-block-end:var(--calcite-internal-combobox-spacing-unit-s);min-inline-size:4.8125rem}.input:focus{outline:2px solid transparent;outline-offset:2px}.input:placeholder-shown{text-overflow:ellipsis}.input--single{padding:0;margin-block:var(--calcite-internal-combobox-input-margin-block)}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;width:0px;min-width:0px;opacity:0}.input--icon{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.placeholder-icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.input-wrap{display:flex;flex-grow:1;align-items:center}.input-wrap--single{flex:1 1 0%;overflow:hidden}.label{pointer-events:none;max-width:100%;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;font-weight:var(--calcite-font-weight-normal);block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--icon{padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.icon-end,.icon-start{display:flex;cursor:pointer;align-items:center}.icon-end{flex:none}.icon-end .icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.floating-ui-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}@starting-style{.floating-ui-container{opacity:0;inset-block-start:0;left:0}}:host([top-layer-disabled]) .floating-ui-container{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown)}.floating-ui-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.floating-ui-container:popover-open{display:block}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}@media(forced-colors:active){.wrapper,.floating-ui-container{border:1px solid canvasText}}.screen-readers-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.list-container{max-height:45vh;overflow-y:auto;inline-size:var(--calcite-dropdown-width, 100%);background-color:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1))}.list{margin:0;display:block;padding:0}.list--hide{height:0px;overflow:hidden}calcite-chip{--calcite-animation-timing: 0}.chip{margin-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);max-inline-size:100%}.chip--invisible{visibility:hidden;position:absolute}.item{display:block}.select-all{background-color:var(--calcite-combobox-item-background-color-active, var(--calcite-color-foreground-1));border-block-end-color:var(--calcite-combobox-divider-color, var(--calcite-combobox-item-border-color, var(--calcite-color-border-3)));border-block-end-style:solid;border-block-end-width:var(--calcite-border-width-sm);inset-block-start:0;position:sticky;z-index:var(--calcite-z-index-sticky)}.no-matches{padding-block:var(--calcite-internal-combobox-no-matches-spacing-unit-s);padding-inline:var(--calcite-internal-combobox-spacing-unit-l);color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));background:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1));cursor:pointer}.no-matches-placeholder{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3));cursor:default}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.x-button{transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;border-style:none;cursor:pointer;outline-color:transparent;align-items:center;margin:0;background-color:var(--calcite-close-background-color, var(--calcite-color-foreground-2));-webkit-appearance:none;display:flex;align-content:center;justify-content:center;color:var(--calcite-close-icon-color, var(--calcite-color-text-3));block-size:var(--calcite-internal-close-size, 1.5rem);inline-size:var(--calcite-internal-close-size, 1.5rem);min-block-size:var(--calcite-internal-close-size, 1.5rem);min-inline-size:var(--calcite-internal-close-size, 1.5rem);padding:0}.x-button:hover,.x-button:focus{background-color:var(--calcite-close-background-color-hover, var(--calcite-color-foreground-3))}.x-button:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.x-button:active{background-color:var(--calcite-close-background-color-press, var(--calcite-color-transparent-press))}.x-button calcite-icon{color:inherit}.x-button--round{border-radius:9999px}.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}.text-match{background-color:transparent;color:inherit;font-weight:var(--calcite-font-weight-bold)}.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)}::placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-input-placeholder-text-color, var(--calcite-color-text-3))}`;
|
|
32
|
+
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{position:relative;display:block}:host([scale=s]){font-size:var(--calcite-font-size-relative-sm);--calcite-internal-combobox-spacing-unit-l: .5rem;--calcite-internal-combobox-spacing-unit-s: .25rem;--calcite-internal-combobox-padding-inline-end: var(--calcite-space-2xs);--calcite-internal-combobox-no-matches-spacing-unit-s: .25rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.25rem - 1px) ;--calcite-internal-close-size: 1rem}:host([scale=m]){font-size:var(--calcite-font-size-relative-base);--calcite-internal-combobox-spacing-unit-l: .75rem;--calcite-internal-combobox-spacing-unit-s: .5rem;--calcite-internal-combobox-padding-inline-end: var(--calcite-space-sm);--calcite-internal-combobox-no-matches-spacing-unit-s: .375rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.5rem - 1px) ;--calcite-internal-close-size: 1.5rem}:host([scale=l]){font-size:var(--calcite-font-size-relative-md);--calcite-internal-combobox-spacing-unit-l: 1rem;--calcite-internal-combobox-spacing-unit-s: .75rem;--calcite-internal-combobox-padding-inline-end: var(--calcite-space-sm-plus);--calcite-internal-combobox-no-matches-spacing-unit-s: var(--calcite-space-sm-plus);--calcite-combobox-input-height: 1.5rem;--calcite-internal-combobox-input-margin-block: calc(var(--calcite-space-sm-plus) - 1px);--calcite-internal-close-size: 2rem}.wrapper{display:flex;border-width:1px;border-style:solid;outline-color:transparent;padding-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);padding-inline:var(--calcite-internal-combobox-spacing-unit-l) var(--calcite-internal-combobox-padding-inline-end);background-color:var(--calcite-combobox-input-background-color, var(--calcite-color-foreground-1));color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));border-color:var(--calcite-combobox-input-border-color, var(--calcite-color-border-input))}.wrapper:hover .icon{color:var(--calcite-combobox-icon-color-hover, var(--calcite-color-text-1))}:host(:focus-within) .wrapper,.wrapper--active{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))))}:host([read-only]) .wrapper{background-color:var(--calcite-color-background)}:host([read-only]) .label{font-weight:var(--calcite-font-weight-medium)}:host([status=invalid]) .wrapper{border-color:var(--calcite-color-status-danger)}:host([status=invalid]:focus-within) .wrapper{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))))}.wrapper--single{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l) var(--calcite-internal-combobox-padding-inline-end);cursor:pointer;flex-wrap:nowrap}.grid-input{position:relative;display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;gap:var(--calcite-internal-combobox-spacing-unit-s);margin-inline-end:var(--calcite-internal-combobox-spacing-unit-s)}.grid-input.selection-display--fit,.grid-input.selection-display--single{flex-wrap:nowrap;overflow:hidden}.input{flex-grow:1;appearance:none;overflow:hidden;text-overflow:ellipsis;border-style:none;background-color:transparent;padding:0;font-family:inherit;color:var(--calcite-color-text-1);font-size:inherit;block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);inline-size:100%;margin-block-end:var(--calcite-internal-combobox-spacing-unit-s);min-inline-size:4.8125rem}.input:focus{outline:2px solid transparent;outline-offset:2px}.input:placeholder-shown{text-overflow:ellipsis}.input--single{padding:0;margin-block:var(--calcite-internal-combobox-input-margin-block)}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;width:0px;min-width:0px;opacity:0}.input--icon{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.placeholder-icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.input-wrap{display:flex;flex-grow:1;align-items:center}.input-wrap--single{flex:1 1 0%;overflow:hidden}.label{pointer-events:none;max-width:100%;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;font-weight:var(--calcite-font-weight-normal);block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--icon{padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.icon-end,.icon-start{display:flex;cursor:pointer;align-items:center}.icon-end{flex:none}.icon-end .icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.floating-ui-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}@starting-style{.floating-ui-container{opacity:0;inset-block-start:0;left:0}}:host([top-layer-disabled]) .floating-ui-container{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown)}.floating-ui-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.floating-ui-container:popover-open{display:block}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.floating-ui-container .calcite-floating-ui-anim{box-shadow:var(--calcite-shadow-md)}@media(forced-colors:active){.wrapper,.floating-ui-container{border:1px solid canvasText}}.screen-readers-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.list-container{max-height:45vh;overflow-y:auto;inline-size:var(--calcite-dropdown-width, 100%);background-color:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1))}.list{margin:0;display:block;padding:0;line-height:var(--calcite-font-line-height-relative-snug)}.list--hide{height:0px;overflow:hidden}calcite-chip{--calcite-animation-timing: 0}.chip{margin-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);max-inline-size:100%}.chip--invisible{visibility:hidden;position:absolute}.item{display:block}.select-all{background-color:var(--calcite-combobox-item-background-color-active, var(--calcite-color-foreground-1));border-block-end-color:var(--calcite-combobox-divider-color, var(--calcite-combobox-item-border-color, var(--calcite-color-border-3)));border-block-end-style:solid;border-block-end-width:var(--calcite-border-width-sm);inset-block-start:0;position:sticky;z-index:var(--calcite-z-index-sticky)}.no-matches{padding-block:var(--calcite-internal-combobox-no-matches-spacing-unit-s);padding-inline:var(--calcite-internal-combobox-spacing-unit-l);color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));background:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1));cursor:pointer}.no-matches-placeholder{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3));cursor:default}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.clear-button--container{display:flex;cursor:pointer;align-items:center}.clear-button--container:hover calcite-action{--calcite-action-background-color: var(--calcite-clear-button-background-color-hover, var(--calcite-color-foreground-3));--calcite-action-text-color: var(--calcite-clear-button-icon-color-hover, var(--calcite-color-text-1))}.clear-button--container:active calcite-action{--calcite-action-background-color: var(--calcite-clear-button-background-color-press, var(--calcite-color-border-2));--calcite-action-text-color: var(--calcite-clear-button-icon-color-press, var(--calcite-color-text-1))}.clear-button--container calcite-action{--calcite-internal-action-height: 100%;--calcite-internal-action-padding-inline: var(--calcite-spacing-none);--calcite-internal-action-padding-block: var(--calcite-spacing-none);--calcite-action-background-color: var(--calcite-clear-button-background-color, var(--calcite-color-foreground-2));--calcite-action-text-color: var(--calcite-clear-button-icon-color)}.clear-button--container calcite-action:hover{--calcite-action-background-color-hover: var(--calcite-clear-button-background-color-hover, var(--calcite-color-foreground-3));--calcite-action-text-color-press: var(--calcite-clear-button-icon-color-hover)}.clear-button--container calcite-action:active{--calcite-action-background-color-press: var(--calcite-clear-button-background-color-press, var(--calcite-color-border-2));--calcite-action-text-color-press: var(--calcite-clear-button-icon-color-press)}:host([scale=s]) .clear-button--container{padding:var(--calcite-spacing-xxs)}:host([scale=m]) .clear-button--container{padding:var(--calcite-spacing-xxs);padding-inline-end:var(--calcite-space-sm)}:host([scale=l]) .clear-button--container{padding-inline-end:var(--calcite-spacing-sm-plus)}.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}.text-match{background-color:transparent;color:inherit;font-weight:var(--calcite-font-weight-bold)}.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)}::placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-input-placeholder-text-color, var(--calcite-color-text-3))}`;
|
|
41
33
|
class Combobox extends LitElement {
|
|
42
34
|
constructor() {
|
|
43
35
|
super();
|
|
44
|
-
this.closeButtonRef = createRef();
|
|
45
36
|
this.direction = useDirection();
|
|
46
37
|
this.formSupport = useForm({
|
|
47
38
|
inputType: "text"
|
|
@@ -112,6 +103,7 @@ class Combobox extends LitElement {
|
|
|
112
103
|
this.refreshSelectionDisplay();
|
|
113
104
|
});
|
|
114
105
|
this.selectedIndicatorChipRef = createRef();
|
|
106
|
+
this.clearButtonRef = createRef();
|
|
115
107
|
this._selectedItems = [];
|
|
116
108
|
this.textInputRef = createRef();
|
|
117
109
|
this._value = null;
|
|
@@ -147,19 +139,6 @@ class Combobox extends LitElement {
|
|
|
147
139
|
this.selectionMode = "multiple";
|
|
148
140
|
this.status = "idle";
|
|
149
141
|
this.topLayerDisabled = false;
|
|
150
|
-
this.validity = {
|
|
151
|
-
valid: false,
|
|
152
|
-
badInput: false,
|
|
153
|
-
customError: false,
|
|
154
|
-
patternMismatch: false,
|
|
155
|
-
rangeOverflow: false,
|
|
156
|
-
rangeUnderflow: false,
|
|
157
|
-
stepMismatch: false,
|
|
158
|
-
tooLong: false,
|
|
159
|
-
tooShort: false,
|
|
160
|
-
typeMismatch: false,
|
|
161
|
-
valueMissing: false
|
|
162
|
-
};
|
|
163
142
|
this.calciteComboboxBeforeClose = createEvent({ cancelable: false });
|
|
164
143
|
this.calciteComboboxBeforeOpen = createEvent({ cancelable: false });
|
|
165
144
|
this.calciteComboboxChange = createEvent({ cancelable: false });
|
|
@@ -173,7 +152,7 @@ class Combobox extends LitElement {
|
|
|
173
152
|
this.listen("click", this.comboboxFocusHandler);
|
|
174
153
|
}
|
|
175
154
|
static {
|
|
176
|
-
this.properties = { activeChipIndex: [16, {}, { state: true }], activeDescendant: [16, {}, { state: true }], activeItemIndex: [16, {}, { state: true }], compactSelectionDisplay: [16, {}, { state: true }], selectedHiddenChipsCount: [16, {}, { state: true }], selectedVisibleChipsCount: [16, {}, { state: true }], items: [16, {}, { state: true }], noMatchesFound: [16, {}, { state: true }], allowCustomValues: [7, {}, { reflect: true, type: Boolean }], clearDisabled: [7, {}, { reflect: true, type: Boolean }], disabled: [7, {}, { reflect: true, type: Boolean }], filterText: [3, {}, { reflect: true }], filterProps: [0, {}, { attribute: false }], filteredItems: [32, {}, { attribute: false, readOnly: true }], flipPlacements: [0, {}, { attribute: false }], form: [3, {}, { reflect: true }], label: 1, labelText: 1, maxItems: [11, {}, { reflect: true, type: Number }], messageOverrides: [0, {}, { attribute: false }], name: [3, {}, { reflect: true }], open: [7, {}, { reflect: true, type: Boolean }], overlayPositioning: [3, {}, { reflect: true }], placeholder: 1, placeholderIcon: [3, { type: String }, { reflect: true }], placeholderIconFlipRtl: [7, {}, { reflect: true, type: Boolean }], placement: [3, {}, { reflect: true }], readOnly: [7, {}, { reflect: true, type: Boolean }], required: [7, {}, { reflect: true, type: Boolean }], scale: [3, {}, { reflect: true }], selectAllEnabled: [7, {}, { reflect: true, type: Boolean }], selectedItems: [0, {}, { attribute: false }], selectionDisplay: [3, {}, { reflect: true }], selectionAppearance: [3, {}, { reflect: true }], selectionMode: [3, {}, { reflect: true }], status: [3, {}, { reflect: true }], topLayerDisabled: [7, {}, { reflect: true, type: Boolean }], validationIcon: [3, { converter: stringOrBoolean, type: String }, { reflect: true }], validationMessage: 1, validity: [
|
|
155
|
+
this.properties = { activeChipIndex: [16, {}, { state: true }], activeDescendant: [16, {}, { state: true }], activeItemIndex: [16, {}, { state: true }], compactSelectionDisplay: [16, {}, { state: true }], selectedHiddenChipsCount: [16, {}, { state: true }], selectedVisibleChipsCount: [16, {}, { state: true }], items: [16, {}, { state: true }], noMatchesFound: [16, {}, { state: true }], allowCustomValues: [7, {}, { reflect: true, type: Boolean }], clearDisabled: [7, {}, { reflect: true, type: Boolean }], disabled: [7, {}, { reflect: true, type: Boolean }], filterText: [3, {}, { reflect: true }], filterProps: [0, {}, { attribute: false }], filteredItems: [32, {}, { attribute: false, readOnly: true }], flipPlacements: [0, {}, { attribute: false }], form: [3, {}, { reflect: true }], label: 1, labelText: 1, maxItems: [11, {}, { reflect: true, type: Number }], messageOverrides: [0, {}, { attribute: false }], name: [3, {}, { reflect: true }], open: [7, {}, { reflect: true, type: Boolean }], overlayPositioning: [3, {}, { reflect: true }], placeholder: 1, placeholderIcon: [3, { type: String }, { reflect: true }], placeholderIconFlipRtl: [7, {}, { reflect: true, type: Boolean }], placement: [3, {}, { reflect: true }], readOnly: [7, {}, { reflect: true, type: Boolean }], required: [7, {}, { reflect: true, type: Boolean }], scale: [3, {}, { reflect: true }], selectAllEnabled: [7, {}, { reflect: true, type: Boolean }], selectedItems: [0, {}, { attribute: false }], selectionDisplay: [3, {}, { reflect: true }], selectionAppearance: [3, {}, { reflect: true }], selectionMode: [3, {}, { reflect: true }], status: [3, {}, { reflect: true }], topLayerDisabled: [7, {}, { reflect: true, type: Boolean }], validationIcon: [3, { converter: stringOrBoolean, type: String }, { reflect: true }], validationMessage: 1, validity: [32, {}, { readOnly: true, attribute: false }], value: 1 };
|
|
177
156
|
}
|
|
178
157
|
static {
|
|
179
158
|
this.formAssociated = true;
|
|
@@ -515,11 +494,20 @@ class Combobox extends LitElement {
|
|
|
515
494
|
}
|
|
516
495
|
break;
|
|
517
496
|
case "Escape":
|
|
518
|
-
if (
|
|
519
|
-
this.
|
|
497
|
+
if (this.open) {
|
|
498
|
+
this.open = false;
|
|
499
|
+
event.preventDefault();
|
|
500
|
+
break;
|
|
501
|
+
}
|
|
502
|
+
if (!this.clearDisabled) {
|
|
503
|
+
if (this.textInputRef.value?.value.length > 0) {
|
|
504
|
+
this.resetText();
|
|
505
|
+
event.preventDefault();
|
|
506
|
+
} else if (this.selectedItems.length > 0 && this.selectionMode !== "single-persist") {
|
|
507
|
+
this.clearValue();
|
|
508
|
+
event.preventDefault();
|
|
509
|
+
}
|
|
520
510
|
}
|
|
521
|
-
this.open = false;
|
|
522
|
-
event.preventDefault();
|
|
523
511
|
break;
|
|
524
512
|
case "Enter":
|
|
525
513
|
if (this.open && this.activeItemIndex > -1) {
|
|
@@ -598,7 +586,7 @@ class Combobox extends LitElement {
|
|
|
598
586
|
event.preventDefault();
|
|
599
587
|
return;
|
|
600
588
|
}
|
|
601
|
-
if (composedPath.
|
|
589
|
+
if (composedPath.includes(this.clearButtonRef.value)) {
|
|
602
590
|
this.clearValue();
|
|
603
591
|
event.preventDefault();
|
|
604
592
|
return;
|
|
@@ -612,10 +600,10 @@ class Combobox extends LitElement {
|
|
|
612
600
|
this.updateActiveItemIndex(targetIndex);
|
|
613
601
|
}
|
|
614
602
|
hideChip(chipEl) {
|
|
615
|
-
chipEl.classList.add(CSS
|
|
603
|
+
chipEl.classList.add(CSS.chipInvisible);
|
|
616
604
|
}
|
|
617
605
|
showChip(chipEl) {
|
|
618
|
-
chipEl.classList.remove(CSS
|
|
606
|
+
chipEl.classList.remove(CSS.chipInvisible);
|
|
619
607
|
}
|
|
620
608
|
refreshChipDisplay({ chipEls, availableHorizontalChipElSpace, chipContainerElGap }) {
|
|
621
609
|
chipEls.forEach((chipEl) => {
|
|
@@ -705,7 +693,7 @@ class Combobox extends LitElement {
|
|
|
705
693
|
setVisibleAndHiddenChips(chipEls) {
|
|
706
694
|
let newSelectedVisibleChipsCount = 0;
|
|
707
695
|
chipEls.forEach((chipEl) => {
|
|
708
|
-
if (chipEl.selected && !chipEl.classList.contains(CSS
|
|
696
|
+
if (chipEl.selected && !chipEl.classList.contains(CSS.chipInvisible)) {
|
|
709
697
|
newSelectedVisibleChipsCount++;
|
|
710
698
|
}
|
|
711
699
|
});
|
|
@@ -982,22 +970,22 @@ class Combobox extends LitElement {
|
|
|
982
970
|
}
|
|
983
971
|
return this.selectedItems.map((item, i) => {
|
|
984
972
|
const chipClasses = {
|
|
985
|
-
[CSS
|
|
973
|
+
[CSS.chip]: true
|
|
986
974
|
};
|
|
987
975
|
const ancestors = [...getItemAncestors(item)].reverse();
|
|
988
976
|
const itemLabel = getLabel(item);
|
|
989
977
|
const pathLabel = [...ancestors, item].map((el) => getLabel(el));
|
|
990
978
|
const label = selectionMode !== "ancestors" ? itemLabel : pathLabel.join(" / ");
|
|
991
|
-
return keyed(itemLabel, html`<calcite-chip .appearance=${readOnly ? "outline" : "solid"} class=${safeClassMap(chipClasses)} .closable=${!readOnly} .icon=${item.icon} .iconFlipRtl=${item.iconFlipRtl} id=${(item.guid ? `${IDS.chip(item.guid)}` : null) ?? nothing} .label=${label} .messageOverrides=${{ dismissLabel: messages.removeTag }} @
|
|
979
|
+
return keyed(itemLabel, html`<calcite-chip .appearance=${readOnly ? "outline" : "solid"} class=${safeClassMap(chipClasses)} .closable=${!readOnly} .icon=${item.icon} .iconFlipRtl=${item.iconFlipRtl} id=${(item.guid ? `${IDS.chip(item.guid)}` : null) ?? nothing} .label=${label} .messageOverrides=${{ dismissLabel: messages.removeTag }} @calciteChipClose=${() => this.calciteChipCloseHandler(item)} @focusin=${() => this.activeChipIndex = i} .scale=${scale} .selected=${item.selected} .tabIndex=${activeChipIndex === i ? 0 : -1} title=${label ?? nothing} .value=${item.value}>${label}</calcite-chip>`);
|
|
992
980
|
});
|
|
993
981
|
}
|
|
994
982
|
renderAllSelectedIndicatorChip() {
|
|
995
983
|
const { allSelectedIndicatorChipRef, compactSelectionDisplay, scale, selectedVisibleChipsCount } = this;
|
|
996
984
|
const label = compactSelectionDisplay ? this.messages.all : this.messages.allSelected;
|
|
997
985
|
return html`<calcite-chip class=${safeClassMap({
|
|
998
|
-
[CSS
|
|
999
|
-
[CSS
|
|
1000
|
-
[CSS
|
|
986
|
+
[CSS.chip]: true,
|
|
987
|
+
[CSS.chipInvisible]: !(this.allSelected && !selectedVisibleChipsCount),
|
|
988
|
+
[CSS.allSelected]: true
|
|
1001
989
|
})} .label=${label} .scale=${scale} title=${label ?? nothing} value ${ref(allSelectedIndicatorChipRef)}>${label}</calcite-chip>`;
|
|
1002
990
|
}
|
|
1003
991
|
renderSelectedIndicatorChip() {
|
|
@@ -1023,8 +1011,8 @@ class Combobox extends LitElement {
|
|
|
1023
1011
|
}
|
|
1024
1012
|
}
|
|
1025
1013
|
return html`<calcite-chip class=${safeClassMap({
|
|
1026
|
-
[CSS
|
|
1027
|
-
[CSS
|
|
1014
|
+
[CSS.chip]: true,
|
|
1015
|
+
[CSS.chipInvisible]: chipInvisible
|
|
1028
1016
|
})} .label=${label} .scale=${scale} title=${label ?? nothing} value ${ref(selectedIndicatorChipRef)}>${label}</calcite-chip>`;
|
|
1029
1017
|
}
|
|
1030
1018
|
renderSelectedIndicatorChipCompact() {
|
|
@@ -1046,8 +1034,8 @@ class Combobox extends LitElement {
|
|
|
1046
1034
|
chipInvisible = true;
|
|
1047
1035
|
}
|
|
1048
1036
|
return html`<calcite-chip class=${safeClassMap({
|
|
1049
|
-
[CSS
|
|
1050
|
-
[CSS
|
|
1037
|
+
[CSS.chip]: true,
|
|
1038
|
+
[CSS.chipInvisible]: chipInvisible
|
|
1051
1039
|
})} .label=${label} .scale=${scale} title=${label ?? nothing} value>${label}</calcite-chip>`;
|
|
1052
1040
|
}
|
|
1053
1041
|
renderInput() {
|
|
@@ -1056,16 +1044,16 @@ class Combobox extends LitElement {
|
|
|
1056
1044
|
const selectedItem = selectedItems[0];
|
|
1057
1045
|
const showLabel = !open && single && !!selectedItem && !this.filterText;
|
|
1058
1046
|
return html`<span class=${safeClassMap({
|
|
1059
|
-
[CSS
|
|
1060
|
-
[CSS
|
|
1047
|
+
[CSS.inputWrap]: true,
|
|
1048
|
+
[CSS.inputWrapSingle]: single
|
|
1061
1049
|
})}>${showLabel && keyed("label", html`<span class=${safeClassMap({
|
|
1062
|
-
[CSS
|
|
1063
|
-
[CSS
|
|
1050
|
+
[CSS.label]: true,
|
|
1051
|
+
[CSS.labelIcon]: !!selectedItem?.icon
|
|
1064
1052
|
})}>${getLabel(selectedItem)}</span>`) || ""}${keyed("input", html`<input aria-activedescendant=${this.activeDescendant ?? nothing} aria-controls=${`${IDS.listbox(guid2)}`} aria-errormessage=${IDS.validationMessage} aria-owns=${`${IDS.listbox(guid2)}`} aria-autocomplete=list .ariaDescription=${this.getDescriptionMessage()} .ariaExpanded=${open} aria-haspopup=listbox .ariaInvalid=${this.status === "invalid"} .ariaLabel=${getLabelText(this)} class=${safeClassMap({
|
|
1065
|
-
[CSS
|
|
1066
|
-
[CSS
|
|
1067
|
-
[CSS
|
|
1068
|
-
[CSS
|
|
1053
|
+
[CSS.input]: true,
|
|
1054
|
+
[CSS.inputSingle]: true,
|
|
1055
|
+
[CSS.inputHidden]: showLabel,
|
|
1056
|
+
[CSS.inputIcon]: this.showingInlineIcon && !!this.placeholderIcon
|
|
1069
1057
|
})} .disabled=${disabled} .id=${`${IDS.input(guid2)}`} @focus=${this.comboboxFocusHandler} @input=${this.inputHandler} placeholder=${placeholder ?? nothing} .readOnly=${this.readOnly} .required=${this.required} role=combobox .tabIndex=${this.activeChipIndex === -1 ? 0 : -1} type=text .value=${live(this.filterText ?? "")} ${ref(this.textInputRef)}>`)}</span>`;
|
|
1070
1058
|
}
|
|
1071
1059
|
renderListBoxOptions() {
|
|
@@ -1090,29 +1078,29 @@ class Combobox extends LitElement {
|
|
|
1090
1078
|
renderFloatingUIContainer() {
|
|
1091
1079
|
const { messages, setFloatingEl, setContainerEl, open, scale } = this;
|
|
1092
1080
|
const classes = {
|
|
1093
|
-
[CSS
|
|
1081
|
+
[CSS.listContainer]: true,
|
|
1094
1082
|
[FloatingCSS.animation]: true,
|
|
1095
1083
|
[FloatingCSS.animationActive]: open
|
|
1096
1084
|
};
|
|
1097
1085
|
const label = (this.filterText && messages.add?.replace("{text}", `${this.filterText}`)) ?? "";
|
|
1098
|
-
return html`<div aria-hidden=true class=${safeClassMap(CSS
|
|
1086
|
+
return html`<div aria-hidden=true class=${safeClassMap(CSS.floatingUIContainer)} popover=manual ${ref(setFloatingEl)}><div class=${safeClassMap(classes)} ${ref(setContainerEl)}><ul class=${safeClassMap({ [CSS.list]: true, [CSS.listHide]: !open })}>${this.selectAllEnabled && this.selectionMode !== "single" && this.selectionMode !== "single-persist" && html`<calcite-combobox-item class=${safeClassMap(CSS.selectAll)} .heading=${messages.selectAll} .id=${`${this.guid}-select-all-enabled-interactive`} .indeterminate=${this.indeterminate} .label=${messages.selectAll} .scale=${scale} .selected=${this.allSelected} tabindex=-1 value=select-all ${ref(this.selectAllComboboxItemRef)}></calcite-combobox-item>` || ""}<slot></slot>${this.noMatchesFound && (this.allowCustomValues ? html`<li aria-label=${label ?? nothing} class=${safeClassMap(CSS.noMatches)} @click=${this.customChipAddHandler} role=option tabindex=0>${highlightText({
|
|
1099
1087
|
text: label,
|
|
1100
1088
|
pattern: new RegExp(`(${escapeRegExp(this.filterText)})`, "i")
|
|
1101
|
-
})}</li>` : html`<li class=${safeClassMap({ [CSS
|
|
1089
|
+
})}</li>` : html`<li class=${safeClassMap({ [CSS.noMatchesPlaceholder]: true, [CSS.noMatches]: true })}>${messages.noMatches}</li>`) || ""}</ul></div></div>`;
|
|
1102
1090
|
}
|
|
1103
1091
|
renderSelectedOrPlaceholderIcon() {
|
|
1104
1092
|
const { open, placeholderIcon, placeholderIconFlipRtl, selectedItems } = this;
|
|
1105
1093
|
const selectedItem = selectedItems[0];
|
|
1106
1094
|
const selectedIcon = selectedItem?.icon;
|
|
1107
1095
|
const showPlaceholder = placeholderIcon && (open || !selectedItem);
|
|
1108
|
-
return this.showingInlineIcon && keyed("selected-placeholder-icon", html`<span class=${safeClassMap(CSS
|
|
1109
|
-
[CSS
|
|
1110
|
-
[CSS
|
|
1096
|
+
return this.showingInlineIcon && keyed("selected-placeholder-icon", html`<span class=${safeClassMap(CSS.iconStart)}><calcite-icon class=${safeClassMap({
|
|
1097
|
+
[CSS.selectedIcon]: !showPlaceholder,
|
|
1098
|
+
[CSS.placeholderIcon]: showPlaceholder
|
|
1111
1099
|
})} .flipRtl=${showPlaceholder ? placeholderIconFlipRtl : selectedItem.iconFlipRtl} .icon=${showPlaceholder ? placeholderIcon : selectedIcon} .scale=${getIconScale(this.scale)}></calcite-icon></span>`) || "";
|
|
1112
1100
|
}
|
|
1113
1101
|
renderChevronIcon() {
|
|
1114
1102
|
const { open } = this;
|
|
1115
|
-
return keyed("chevron", html`<span class=${safeClassMap(CSS
|
|
1103
|
+
return keyed("chevron", html`<span class=${safeClassMap(CSS.iconEnd)}><calcite-icon class=${safeClassMap(CSS.icon)} .icon=${open ? ICONS.chevronUp : ICONS.chevronDown} .scale=${getIconScale(this.scale)}></calcite-icon></span>`);
|
|
1116
1104
|
}
|
|
1117
1105
|
render() {
|
|
1118
1106
|
const { selectionDisplay, guid: guid2, label, open, readOnly } = this;
|
|
@@ -1122,18 +1110,18 @@ class Combobox extends LitElement {
|
|
|
1122
1110
|
const fitSelectionDisplay = !singleSelectionMode && selectionDisplay === "fit";
|
|
1123
1111
|
const isClearable = !this.clearDisabled && this.selectionMode !== "single-persist" && !!this.value?.length;
|
|
1124
1112
|
return this.interactiveContainer({ disabled: this.disabled, children: html`${this.labelText && InternalLabel({ labelText: this.labelText, onClick: this.onLabelClick, required: this.required, tooltipText: this.messages.required }) || ""}<div aria-live=polite class=${safeClassMap({
|
|
1125
|
-
[CSS
|
|
1126
|
-
[CSS
|
|
1127
|
-
[CSS
|
|
1113
|
+
[CSS.wrapper]: true,
|
|
1114
|
+
[CSS.wrapperSingle]: singleSelectionMode || !this.selectedItems.length,
|
|
1115
|
+
[CSS.wrapperActive]: open
|
|
1128
1116
|
})} @click=${this.clickHandler} @keydown=${this.keyDownHandler} ${ref(this.setReferenceEl)}>${this.renderSelectedOrPlaceholderIcon()}${keyed("grid", html`<div class=${safeClassMap({
|
|
1129
|
-
[CSS
|
|
1130
|
-
[CSS
|
|
1131
|
-
[CSS
|
|
1117
|
+
[CSS.gridInput]: true,
|
|
1118
|
+
[CSS.selectionDisplayFit]: fitSelectionDisplay,
|
|
1119
|
+
[CSS.selectionDisplaySingle]: singleSelectionDisplay
|
|
1132
1120
|
})} ${ref(this.setChipContainerEl)}>${!singleSelectionMode && !singleSelectionDisplay && this.renderChips() || ""}${!singleSelectionMode && !singleSelectionDisplay && this.selectAllEnabled && this.renderAllSelectedIndicatorChip() || ""}${!singleSelectionMode && !allSelectionDisplay && [
|
|
1133
1121
|
this.renderSelectedIndicatorChip(),
|
|
1134
1122
|
this.renderSelectedIndicatorChipCompact(),
|
|
1135
1123
|
this.renderAllSelectedIndicatorChip()
|
|
1136
|
-
] || ""}<label class=${safeClassMap(CSS
|
|
1124
|
+
] || ""}<label class=${safeClassMap(CSS.screenReadersOnly)} .htmlFor=${`${IDS.input(guid2)}`} .id=${`${IDS.label(guid2)}`}>${label}</label>${this.renderInput()}</div>`)}${!readOnly && isClearable ? ClearButton({ ariaLabel: this.messages.clear, disabled: this.disabled, ref: this.clearButtonRef, scale: this.scale, title: this.messages.clear }) : null}${!readOnly && this.renderChevronIcon() || ""}</div><ul aria-labelledby=${`${IDS.label(guid2)}`} aria-multiselectable=true class=${safeClassMap(CSS.screenReadersOnly)} .id=${`${IDS.listbox(guid2)}`} role=listbox tabindex=-1>${this.renderListBoxOptions()}</ul>${this.renderFloatingUIContainer()}${this.validationMessage && this.status === "invalid" ? Validation({ icon: this.validationIcon, id: IDS.validationMessage, message: this.validationMessage, scale: this.scale, status: this.status }) : null}` });
|
|
1137
1125
|
}
|
|
1138
1126
|
}
|
|
1139
1127
|
customElement("calcite-combobox", Combobox);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import "../calcite-
|
|
1
|
+
import "../calcite-action/index.js";
|
|
2
2
|
import "../calcite-input-message/index.js";
|
|
3
3
|
import "../calcite-chip/index.js";
|
|
4
4
|
import "../calcite-combobox-item/index.js";
|
|
5
|
+
import "../calcite-icon/index.js";
|
|
5
6
|
export * from "./customElement.js";
|
|
@@ -4,7 +4,7 @@ import type { ComboboxChildElement } from "../calcite-combobox/interfaces.js";
|
|
|
4
4
|
import type { IconName } from "../calcite-icon/interfaces.js";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* @cssproperty [--calcite-combobox-item-border-color] - [Deprecated] Specifies the component's border color.
|
|
7
|
+
* @cssproperty [--calcite-combobox-item-border-color] - [Deprecated] in v3.3.0, removal target v6.0.0 - Specifies the component's border color.
|
|
8
8
|
* @cssproperty [--calcite-combobox-text-color] - Specifies the component's text and `icon` color.
|
|
9
9
|
* @cssproperty [--calcite-combobox-text-color-hover] - Specifies the component's text and `icon` color when hovered.
|
|
10
10
|
* @cssproperty [--calcite-combobox-item-background-color-active] - When `active`, specifies the component's background color.
|
|
@@ -36,7 +36,7 @@ const SLOTS = {
|
|
|
36
36
|
contentStart: "content-start"
|
|
37
37
|
};
|
|
38
38
|
const itemSpacingMultiplier = "--calcite-combobox-item-spacing-indent-multiplier";
|
|
39
|
-
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([hidden]){display:none}[hidden]{display:none}.scale--s{font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);--calcite-internal-combobox-item-spacing-unit-s: .25rem;--calcite-internal-combobox-item-spacing-unit-l: .5rem;--calcite-combobox-item-selector-icon-size: 1rem;--calcite-internal-combobox-item-description-font-size: var(--calcite-font-size-xs)}.scale--m{font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);--calcite-internal-combobox-item-spacing-unit-s: .375rem;--calcite-internal-combobox-item-spacing-unit-l: .75rem;--calcite-combobox-item-selector-icon-size: 1rem;--calcite-internal-combobox-item-description-font-size: var(--calcite-font-size-sm)}.scale--l{font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);--calcite-internal-combobox-item-spacing-unit-s:
|
|
39
|
+
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([hidden]){display:none}[hidden]{display:none}.scale--s{font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);--calcite-internal-combobox-item-spacing-unit-s: .25rem;--calcite-internal-combobox-item-spacing-unit-l: .5rem;--calcite-combobox-item-selector-icon-size: 1rem;--calcite-internal-combobox-item-description-font-size: var(--calcite-font-size-xs)}.scale--m{font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);--calcite-internal-combobox-item-spacing-unit-s: .375rem;--calcite-internal-combobox-item-spacing-unit-l: .75rem;--calcite-combobox-item-selector-icon-size: 1rem;--calcite-internal-combobox-item-description-font-size: var(--calcite-font-size-sm)}.scale--l{font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);--calcite-internal-combobox-item-spacing-unit-s: var(--calcite-space-sm-plus);--calcite-internal-combobox-item-spacing-unit-l: 1rem;--calcite-combobox-item-selector-icon-size: 1.5rem;--calcite-internal-combobox-item-description-font-size: var(--calcite-font-size)}.container{--calcite-combobox-item-indent-value: calc( var(--calcite-internal-combobox-item-spacing-unit-l) * var(--calcite-combobox-item-spacing-indent-multiplier) )}:host(:focus){--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host,ul{margin:0;display:flex;flex-direction:column;padding:0}:host(:focus),ul:focus{outline:2px solid transparent;outline-offset:2px}.label{position:relative;box-sizing:border-box;display:flex;inline-size:100%;min-inline-size:100%;cursor:pointer;align-items:center;text-decoration-line:none;transition-timing-function:cubic-bezier(.4,0,.2,1);outline-color:transparent;word-wrap:break-word;word-break:break-word;justify-content:space-around;gap:var(--calcite-internal-combobox-item-spacing-unit-l);padding-block:var(--calcite-internal-combobox-item-spacing-unit-s);padding-inline-end:var(--calcite-internal-combobox-item-spacing-unit-l);padding-inline-start:var(--calcite-combobox-item-indent-value);color:var(--calcite-combobox-text-color, var(--calcite-color-text-3));transition-duration:var(--calcite-animation-timing)}:host([disabled]) .label{cursor:default}.label--active{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))))}.label:hover{background-color:var(--calcite-combobox-item-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-combobox-text-color-hover, var(--calcite-color-text-1))}.label:active{background-color:var(--calcite-combobox-item-background-color-active, var(--calcite-color-foreground-3))}:host([selected]) .label,.label:active{color:var(--calcite-combobox-text-color-hover, var(--calcite-color-text-1))}:host([selected]) .label .description,:host([selected]) .label .short-text,.label:active .description,.label:active .short-text{color:var(--calcite-combobox-description-text-color-press, var(--calcite-color-text-2))}.icon{display:inline-flex;transition-timing-function:cubic-bezier(.4,0,.2,1);color:var(--calcite-color-border-input)}:host([selected]) .icon,:host([indeterminate]) .icon{color:var(--calcite-combobox-selected-icon-color, var(--calcite-color-brand))}.icon--custom{margin-block-start:-1px}.center-content{display:flex;flex-direction:column;flex-grow:1;padding-block:0}.description{font-size:var(--calcite-internal-combobox-item-description-font-size)}.short-text{white-space:nowrap}.heading{color:var(--calcite-combobox-heading-text-color, var(--calcite-color-text-1))}.description,.short-text{color:var(--calcite-combobox-description-text-color, var(--calcite-color-text-3))}:host([selected]) .heading{font-weight:var(--calcite-font-weight-medium)}.heading,.description,.short-text{line-height:var(--calcite-font-line-height-relative-snug)}.container--highlight-selected{background-color:var(--calcite-color-surface-highlight)}:host([item-hidden]){display:none}.text-match{background-color:transparent;color:inherit;font-weight:var(--calcite-font-weight-bold)}`;
|
|
40
40
|
class ComboboxItem extends LitElement {
|
|
41
41
|
constructor() {
|
|
42
42
|
super(...arguments);
|
|
@@ -105,7 +105,7 @@ export abstract class DatePicker extends LitElement {
|
|
|
105
105
|
* Sets focus on the component's first focusable element.
|
|
106
106
|
*
|
|
107
107
|
* @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
|
|
108
|
-
* @
|
|
108
|
+
* @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
|
|
109
109
|
*/
|
|
110
110
|
setFocus(options?: FocusOptions): Promise<void>;
|
|
111
111
|
/** Fires when a user changes the component's date. For `range` events, use `calciteDatePickerRangeChange`. */
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import { c as customElement } from "../../chunks/runtime.js";
|
|
3
3
|
import { css, isServer, html } from "lit";
|
|
4
4
|
import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
|
|
5
|
-
import { d as dateFromISO, a as dateToISO, n as nextMonth, p as prevMonth, g as getDaysDiff, b as dateFromRange,
|
|
5
|
+
import { d as dateFromISO, a as dateToISO, n as nextMonth, p as prevMonth, g as getDaysDiff, b as dateFromRange, s as sameDate, c as getFirstValidDateInMonth, i as inRange } from "../../chunks/date.js";
|
|
6
6
|
import { n as numberStringFormatter, g as getDateTimeFormat } from "../../chunks/locale.js";
|
|
7
7
|
import { u as useT9n } from "../../chunks/useT9n.js";
|
|
8
8
|
import { u as useSetFocus } from "../../chunks/useSetFocus.js";
|
|
9
|
-
import { g as
|
|
9
|
+
import { g as getMinMaxSource, a as getValueAsDateRange, b as applyLocaleOverride, c as getLocaleData } from "../../chunks/utils3.js";
|
|
10
10
|
const HEADING_LEVEL = 2;
|
|
11
11
|
const DATE_PICKER_FORMAT_OPTIONS = { dateStyle: "full" };
|
|
12
12
|
const CSS = {
|
|
@@ -52,18 +52,8 @@ class DatePicker extends LitElement {
|
|
|
52
52
|
if (changes.has("valueAsDate")) {
|
|
53
53
|
this.valueAsDateWatcher(this.valueAsDate);
|
|
54
54
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
if (changes.has("min") && !changes.has("minAsDate")) {
|
|
58
|
-
minSource = "min";
|
|
59
|
-
} else if (changes.has("minAsDate") && !changes.has("min")) {
|
|
60
|
-
minSource = "minAsDate";
|
|
61
|
-
}
|
|
62
|
-
if (changes.has("max") && !changes.has("maxAsDate")) {
|
|
63
|
-
maxSource = "max";
|
|
64
|
-
} else if (changes.has("maxAsDate") && !changes.has("max")) {
|
|
65
|
-
maxSource = "maxAsDate";
|
|
66
|
-
}
|
|
55
|
+
const minSource = getMinMaxSource(changes, "min");
|
|
56
|
+
const maxSource = getMinMaxSource(changes, "max");
|
|
67
57
|
if (minSource === "min") {
|
|
68
58
|
this.minAsDate = dateFromISO(this.min);
|
|
69
59
|
} else if (minSource === "minAsDate") {
|
|
@@ -71,7 +71,7 @@ export abstract class DatePickerDay extends LitElement {
|
|
|
71
71
|
* Sets focus on the component.
|
|
72
72
|
*
|
|
73
73
|
* @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
|
|
74
|
-
* @
|
|
74
|
+
* @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
|
|
75
75
|
*/
|
|
76
76
|
setFocus(options?: FocusOptions): Promise<void>;
|
|
77
77
|
}
|
|
@@ -9,7 +9,7 @@ import { i as isActivationKey } from "../../chunks/key.js";
|
|
|
9
9
|
import { n as numberStringFormatter } from "../../chunks/locale.js";
|
|
10
10
|
import { u as useSetFocus } from "../../chunks/useSetFocus.js";
|
|
11
11
|
import { u as useInteractive } from "../../chunks/useInteractive.js";
|
|
12
|
-
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{position:relative;display:flex;cursor:pointer;outline:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.day-wrapper{position:relative;display:flex;inline-size:100%;flex-direction:column;align-items:center;justify-content:center}.day{position:relative;display:flex;inline-size:100%;align-items:center;justify-content:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);line-height:1;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;line-height:var(--calcite-font-line-height-fixed-base);block-size:var(--calcite-internal-day-size);outline-color:var(--calcite-color-transparent);background-color:var(--calcite-date-picker-day-background-color);color:var(--calcite-date-picker-day-text-color, var(--calcite-color-text-1))}.text{margin-block:1px 0px;margin-inline-start:0px}:host([scale=s]){--calcite-internal-day-size: 32px}:host([scale=s]) .day{font-size:var(--calcite-font-size-relative-sm)}:host([scale=m]){--calcite-internal-day-size: 40px}:host([scale=m]) .day{font-size:var(--calcite-font-size-relative-base)}:host([scale=l]){--calcite-internal-day-size: 44px}:host([scale=l]) .day{font-size:var(--calcite-font-size-relative-md)}:host(:not([current-month])) .day{opacity:var(--calcite-opacity-full);color:var(--calcite-color-text-3)}:host(:focus:not([disabled]):not([selected]):not([current-month])) .day{color:var(--calcite-color-text-1)}:host(:hover:not([disabled]):not([selected])) .day{background-color:var(--calcite-date-picker-day-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-date-picker-day-text-color-hover, var(--calcite-color-text-1))}:host(:not([range]):not([selected]).current-day) .day{color:var(--calcite-date-picker-current-day-text-color, var(--calcite-color-brand));font-weight:var(--calcite-font-weight-bold)}:host(:focus[selected]) .day{z-index:var(--calcite-z-index);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))));box-shadow:0 0 0 2px var(--calcite-color-foreground-1)}:host(:focus:not([disabled]):not([selected])) .day{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))))}:host(:hover:not([disabled]):not([selected])) .day{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))))}:host([selected]) .day{font-weight:var(--calcite-font-weight-medium);background-color:var(--calcite-date-picker-day-background-color-selected, var(--calcite-color-brand));color:var(--calcite-date-picker-day-text-color-selected, var(--calcite-color-
|
|
12
|
+
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{position:relative;display:flex;cursor:pointer;outline:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.day-wrapper{position:relative;display:flex;inline-size:100%;flex-direction:column;align-items:center;justify-content:center}.day{position:relative;display:flex;inline-size:100%;align-items:center;justify-content:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);line-height:1;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;line-height:var(--calcite-font-line-height-fixed-base);block-size:var(--calcite-internal-day-size);outline-color:var(--calcite-color-transparent);background-color:var(--calcite-date-picker-day-background-color);color:var(--calcite-date-picker-day-text-color, var(--calcite-color-text-1))}.text{margin-block:1px 0px;margin-inline-start:0px}:host([scale=s]){--calcite-internal-day-size: 32px}:host([scale=s]) .day{font-size:var(--calcite-font-size-relative-sm)}:host([scale=m]){--calcite-internal-day-size: 40px}:host([scale=m]) .day{font-size:var(--calcite-font-size-relative-base)}:host([scale=l]){--calcite-internal-day-size: 44px}:host([scale=l]) .day{font-size:var(--calcite-font-size-relative-md)}:host(:not([current-month])) .day{opacity:var(--calcite-opacity-full);color:var(--calcite-color-text-3)}:host(:focus:not([disabled]):not([selected]):not([current-month])) .day{color:var(--calcite-color-text-1)}:host(:hover:not([disabled]):not([selected])) .day{background-color:var(--calcite-date-picker-day-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-date-picker-day-text-color-hover, var(--calcite-color-text-1))}:host(:not([range]):not([selected]).current-day) .day{color:var(--calcite-date-picker-current-day-text-color, var(--calcite-color-brand));font-weight:var(--calcite-font-weight-bold)}:host(:focus[selected]) .day{z-index:var(--calcite-z-index);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))));box-shadow:0 0 0 2px var(--calcite-color-foreground-1)}:host(:focus:not([disabled]):not([selected])) .day{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))))}:host(:hover:not([disabled]):not([selected])) .day{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))))}:host([selected]) .day{font-weight:var(--calcite-font-weight-medium);background-color:var(--calcite-date-picker-day-background-color-selected, var(--calcite-color-brand));color:var(--calcite-date-picker-day-text-color-selected, var(--calcite-color-text-inverse))}:host([range-hover]:not([selected])) .day{background-color:var(--calcite-date-picker-day-outside-range-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-date-picker-day-outside-range-text-color-hover, var(--calcite-color-text-1))}:host([highlighted]:not([selected])) .day,:host(:hover[highlighted]:not([selected])) .day{color:var(--calcite-date-picker-day-range-text-color, var(--calcite-color-text-highlight));background-color:var(--calcite-date-picker-day-range-background-color, var(--calcite-color-surface-highlight))}:host([disabled]) .day{color:var(--calcite-color-text-2);text-decoration-line:line-through;opacity:var(--calcite-opacity-disabled)}@media(forced-colors:active){.day{border-radius:0}:host([selected]){outline:2px solid canvasText}:host(:hover:not([selected])) .day{border-radius:50%}:host([range][selected]) .day,:host([highlighted]) .day,:host([range-hover]:not([selected])) .day{background-color:highlight}:host([range-hover]) .day,:host([range][selected][start-of-range]) .day,:host([range][selected][end-of-range]) .day{background-color:canvas}}:host([hidden]){display:none}[hidden]{display:none}`;
|
|
13
13
|
const CSS = {
|
|
14
14
|
dayWrapper: "day-wrapper",
|
|
15
15
|
day: "day",
|
|
@@ -4,7 +4,7 @@ import { ref } from "lit/directives/ref.js";
|
|
|
4
4
|
import { keyed } from "lit/directives/keyed.js";
|
|
5
5
|
import { css, html } from "lit";
|
|
6
6
|
import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
|
|
7
|
-
import {
|
|
7
|
+
import { i as inRange, b as dateFromRange, s as sameDate, h as hasSameMonthAndYear, c as getFirstValidDateInMonth, n as nextMonth } from "../../chunks/date.js";
|
|
8
8
|
const CSS = {
|
|
9
9
|
calendar: "calendar",
|
|
10
10
|
calendarContainer: "calendar-container",
|
|
@@ -332,7 +332,7 @@ class DatePickerMonth extends LitElement {
|
|
|
332
332
|
[CSS.currentDay]: currentDay,
|
|
333
333
|
[CSS.insideRangeHover]: this.isHoverInRange(),
|
|
334
334
|
[CSS.outsideRangeHover]: !this.isHoverInRange(),
|
|
335
|
-
[CSS.noncurrent]: this.range && !currentMonth
|
|
335
|
+
[CSS.noncurrent]: this.range && this.calendars === 2 && !currentMonth
|
|
336
336
|
})} .currentMonth=${currentMonth} .dateTimeFormat=${this.dateTimeFormat} .day=${day} .disabled=${!isDateInRange} .endOfRange=${this.isEndOfRange(date)} .highlighted=${this.betweenSelectedRange(date)} @calciteInternalDayHover=${this.dayHover} @calciteInternalDaySelect=${this.daySelect} .range=${!!this.startDate && !!this.endDate && !sameDate(this.startDate, this.endDate)} .rangeEdge=${dayInWeek === 0 ? "start" : dayInWeek === 6 ? "end" : void 0} .rangeHover=${isDateInRange && this.isRangeHover(date)} .scale=${this.scale} .selected=${this.isSelected(date)} .startOfRange=${this.isStartOfRange(date)} .value=${date} ${ref(this.storeDayRef)}></calcite-date-picker-day></div>`);
|
|
337
337
|
}
|
|
338
338
|
renderCalendar(weekDays, days, isEndCalendar = false) {
|
|
@@ -9,7 +9,7 @@ import { b as dateFromRange, n as nextMonth, p as prevMonth, f as formatCalendar
|
|
|
9
9
|
import { c as closestElementCrossShadowBoundary, l as getTextWidth } from "../../chunks/dom.js";
|
|
10
10
|
import { i as isActivationKey } from "../../chunks/key.js";
|
|
11
11
|
import { n as numberStringFormatter } from "../../chunks/locale.js";
|
|
12
|
-
const styles = css`:host{display:block}.header{display:flex;block-size:100%;align-items:center;justify-content:space-between}.chevron-container{display:flex;align-items:center}:host([scale=s]){block-size:24px;margin:var(--calcite-spacing-xs);margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .chevron-container,:host([scale=s]) .chevron{min-inline-size:24px;block-size:24px}:host([scale=m]){block-size:32px;margin:var(--calcite-spacing-sm);margin-inline-start:var(--calcite-spacing-sm-plus)}:host([scale=m]) .chevron-container,:host([scale=m]) .chevron{min-inline-size:32px;block-size:32px;--calcite-internal-action-padding-block: var(--calcite-spacing-xxs)}:host([scale=l]){block-size:44px;margin:var(--calcite-spacing-xs);margin-inline-start:var(--calcite-spacing-sm)}:host([scale=l]) .chevron-container,:host([scale=l]) .chevron{min-inline-size:44px;block-size:44px;--calcite-internal-action-padding-block: var(--calcite-spacing-sm-plus)}.chevron{box-sizing:content-box;display:flex;block-size:100%;inline-size:100%;flex-grow:0;cursor:pointer;align-items:center;justify-content:center;border-style:none;outline-color:transparent;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;--calcite-internal-action-padding-block: 0;--calcite-action-background-color: var(--calcite-date-picker-header-action-background-color);--calcite-action-background-color-hover: var(--calcite-date-picker-header-action-background-color-hover);--calcite-action-background-color-press: var(--calcite-date-picker-header-action-background-color-press);--calcite-action-text-color: var(--calcite-date-picker-header-action-text-color);--calcite-action-text-color-press: var(--calcite-date-picker-header-action-text-color-press)}.chevron: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))))}.chevron[aria-disabled=true]{pointer-events:none}.month-year-container{display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;align-items:center;justify-content:flex-start;text-align:center;line-height:1;gap:var(--calcite-spacing-xxs)}.month-year-container.range-calendar{justify-content:center}.year-container{position:relative;display:flex;block-size:100%}.suffix{display:flex;align-items:center}.year,.suffix{margin-inline:var(--calcite-spacing-xxs);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-date-picker-year-text-color, var(--calcite-color-text-1));font-size:var(--calcite-font-size-md);line-height:var(--calcite-font-line-height-fixed-lg)}.year{position:relative;display:inline-block;border-style:none;background-color:transparent;text-align:center;font-family:inherit;outline-color:transparent;inline-size:44px}.year:hover{transition-timing-function:cubic-bezier(.4,0,.2,1);transition-property:outline-color;outline:2px solid var(--calcite-color-border-2);outline-offset:-2px}.year: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))))}.month-select{--calcite-select-internal-border-width: 0;--calcite-select-internal-icon-border-inline-end-width: 0;--calcite-select-spacing-inline: var(--calcite-spacing-xxs);--calcite-select-font-size: var(--calcite-date-picker-month-select-font-size, var(--calcite-font-size-md));--calcite-select-text-color: var(--calcite-date-picker-month-select-text-color, var(--calcite-color-text-1));--calcite-select-icon-color: var(--calcite-date-picker-month-select-icon-color);--calcite-select-icon-color-hover: var(--calcite-date-picker-month-select-icon-color-hover);--calcite-internal-select-spacing-block: var(--calcite-spacing-xxs);--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-xxs);--calcite-internal-select-line-height: var(--calcite-font-line-height-fixed-lg);--calcite-internal-select-font-weight: var(--calcite-font-weight-medium)}:host([scale=s]) .month-year-container .month-select{--calcite-select-spacing-inline: var(--calcite-spacing-base);--calcite-select-font-size: var(--calcite-date-picker-month-select-font-size, var(--calcite-font-size));--calcite-internal-select-spacing-block: var(--calcite-spacing-base);--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-base);--calcite-internal-select-block-size: 24px;--calcite-internal-select-line-height: var(--calcite-font-line-height-fixed-base)}:host([scale=s]) .month-year-container .year{inline-size:40px}:host([scale=s]) .month-year-container .year,:host([scale=s]) .month-year-container .suffix{font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-fixed-base)}:host([scale=l]) .month-year-container .month-select{--calcite-select-spacing-inline: var(--calcite-spacing-sm);--calcite-select-font-size: var(--calcite-date-picker-month-select-font-size, var(--calcite-font-size-lg));--calcite-internal-select-spacing-block: var(--calcite-spacing-sm);--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-sm);--calcite-internal-select-block-size: 44px;--calcite-internal-select-line-height: var(--calcite-font-line-height-fixed-xl)}:host([scale=l]) .month-year-container .year{inline-size:48px}:host([scale=l]) .month-year-container .year,:host([scale=l]) .month-year-container .suffix{font-size:var(--calcite-font-size-lg);line-height:var(--calcite-font-line-height-fixed-xl)}:host([hidden]){display:none}[hidden]{display:none}`;
|
|
12
|
+
const styles = css`:host{display:block}.header{display:flex;block-size:100%;align-items:center;justify-content:space-between}.chevron-container{display:flex;align-items:center}:host([scale=s]){block-size:24px;margin:var(--calcite-spacing-xs);margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .chevron-container,:host([scale=s]) .chevron{min-inline-size:24px;block-size:24px}:host([scale=m]){block-size:32px;margin:var(--calcite-spacing-sm);margin-inline-start:var(--calcite-spacing-sm-plus)}:host([scale=m]) .chevron-container,:host([scale=m]) .chevron{min-inline-size:32px;block-size:32px;--calcite-internal-action-padding-block: var(--calcite-spacing-xxs)}:host([scale=l]){block-size:44px;margin:var(--calcite-spacing-xs);margin-inline-start:var(--calcite-spacing-sm)}:host([scale=l]) .chevron-container,:host([scale=l]) .chevron{min-inline-size:44px;block-size:44px;--calcite-internal-action-padding-block: var(--calcite-spacing-sm-plus)}.chevron{box-sizing:content-box;display:flex;block-size:100%;inline-size:100%;flex-grow:0;cursor:pointer;align-items:center;justify-content:center;border-style:none;outline-color:transparent;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;--calcite-internal-action-padding-block: 0;--calcite-action-background-color: var(--calcite-date-picker-header-action-background-color);--calcite-action-background-color-hover: var(--calcite-date-picker-header-action-background-color-hover);--calcite-action-background-color-press: var(--calcite-date-picker-header-action-background-color-press);--calcite-action-text-color: var(--calcite-date-picker-header-action-text-color);--calcite-action-text-color-press: var(--calcite-date-picker-header-action-text-color-press)}.chevron: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))))}.chevron[aria-disabled=true]{pointer-events:none}.month-year-container{display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;align-items:center;justify-content:flex-start;text-align:center;line-height:1;gap:var(--calcite-spacing-xxs)}.month-year-container.range-calendar{justify-content:center}.year-container{position:relative;display:flex;block-size:100%}.suffix{display:flex;align-items:center}.year,.suffix{margin-inline:var(--calcite-spacing-xxs);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-date-picker-year-text-color, var(--calcite-color-text-1));font-size:var(--calcite-font-size-md);line-height:var(--calcite-font-line-height-fixed-lg)}.year{position:relative;display:inline-block;border-style:none;background-color:transparent;text-align:center;font-family:inherit;outline-color:transparent;inline-size:44px}.year:hover{transition-timing-function:cubic-bezier(.4,0,.2,1);transition-property:outline-color;outline:2px solid var(--calcite-color-border-2);outline-offset:-2px}.year: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))))}.month-select{--calcite-select-internal-border-width: 0;--calcite-select-internal-icon-border-inline-end-width: 0;--calcite-internal-select-spacing-inline: var(--calcite-spacing-xxs);--calcite-select-font-size: var(--calcite-date-picker-month-select-font-size, var(--calcite-font-size-md));--calcite-select-text-color: var(--calcite-date-picker-month-select-text-color, var(--calcite-color-text-1));--calcite-select-icon-color: var(--calcite-date-picker-month-select-icon-color);--calcite-select-icon-color-hover: var(--calcite-date-picker-month-select-icon-color-hover);--calcite-internal-select-spacing-block: var(--calcite-spacing-xxs);--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-xxs);--calcite-internal-select-line-height: var(--calcite-font-line-height-fixed-lg);--calcite-internal-select-font-weight: var(--calcite-font-weight-medium)}:host([scale=s]) .month-year-container .month-select{--calcite-internal-select-spacing-inline: var(--calcite-spacing-base);--calcite-select-font-size: var(--calcite-date-picker-month-select-font-size, var(--calcite-font-size));--calcite-internal-select-spacing-block: var(--calcite-spacing-base);--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-base);--calcite-internal-select-block-size: 24px;--calcite-internal-select-line-height: var(--calcite-font-line-height-fixed-base)}:host([scale=s]) .month-year-container .year{inline-size:40px}:host([scale=s]) .month-year-container .year,:host([scale=s]) .month-year-container .suffix{font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-fixed-base)}:host([scale=l]) .month-year-container .month-select{--calcite-internal-select-spacing-inline: var(--calcite-spacing-sm);--calcite-select-font-size: var(--calcite-date-picker-month-select-font-size, var(--calcite-font-size-lg));--calcite-internal-select-spacing-block: var(--calcite-spacing-sm);--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-sm);--calcite-internal-select-block-size: 44px;--calcite-internal-select-line-height: var(--calcite-font-line-height-fixed-xl)}:host([scale=l]) .month-year-container .year{inline-size:48px}:host([scale=l]) .month-year-container .year,:host([scale=l]) .month-year-container .suffix{font-size:var(--calcite-font-size-lg);line-height:var(--calcite-font-line-height-fixed-xl)}:host([hidden]){display:none}[hidden]{display:none}`;
|
|
13
13
|
const CSS = {
|
|
14
14
|
header: "header",
|
|
15
15
|
chevron: "chevron",
|
|
@@ -48,6 +48,8 @@ import type { DialogPlacement } from "./interfaces.js";
|
|
|
48
48
|
* @slot [header-actions-end] - A slot for adding actions or content to the ending side of the component's header.
|
|
49
49
|
* @slot [header-content] - A slot for adding custom content to the component's header.
|
|
50
50
|
* @slot [header-menu-actions] - A slot for adding an overflow menu with actions inside a `calcite-dropdown`.
|
|
51
|
+
* @slot [heading] - A slot for adding content to the heading area of the default header. Takes precedence over the `heading` property.
|
|
52
|
+
* @slot [description] - A slot for adding content to the description area of the default header. Takes precedence over the `description` property.
|
|
51
53
|
* @slot [fab] - A slot for adding a `calcite-fab` (floating action button) to perform an action.
|
|
52
54
|
* @slot [footer] - A slot for adding custom content to the component's footer. Should not be used with the `footer-start` or `footer-end` slots.
|
|
53
55
|
* @slot [footer-end] - A slot for adding a trailing footer custom content. Should not be used with the `footer` slot.
|
|
@@ -76,7 +78,7 @@ export abstract class Dialog extends LitElement {
|
|
|
76
78
|
* By default, an open dialog can be dismissed by pressing the Esc key.
|
|
77
79
|
*
|
|
78
80
|
* @default false
|
|
79
|
-
* @see [Dialog Accessibility](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog#accessibility).
|
|
81
|
+
* @see [MDN - Dialog Accessibility](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog#accessibility).
|
|
80
82
|
*/
|
|
81
83
|
accessor escapeDisabled: boolean;
|
|
82
84
|
/**
|
|
@@ -146,7 +148,7 @@ export abstract class Dialog extends LitElement {
|
|
|
146
148
|
*/
|
|
147
149
|
accessor open: boolean;
|
|
148
150
|
/**
|
|
149
|
-
* When `true`, disables the closing of the component when clicked outside.
|
|
151
|
+
* When `true` and `modal` is `true`, disables the closing of the component when clicked outside.
|
|
150
152
|
*
|
|
151
153
|
* @default false
|
|
152
154
|
*/
|
|
@@ -185,7 +187,7 @@ export abstract class Dialog extends LitElement {
|
|
|
185
187
|
* Only set this if you need complex z-index control or if top layer placement causes conflicts with third-party components.
|
|
186
188
|
*
|
|
187
189
|
* @default false
|
|
188
|
-
* @
|
|
190
|
+
* @see [MDN - Top Layer](https://developer.mozilla.org/en-US/docs/Glossary/Top_layer)
|
|
189
191
|
*/
|
|
190
192
|
accessor topLayerDisabled: boolean;
|
|
191
193
|
/** Specifies the component's width. */
|
|
@@ -215,7 +217,7 @@ export abstract class Dialog extends LitElement {
|
|
|
215
217
|
*
|
|
216
218
|
* @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
|
|
217
219
|
* @returns A promise that is resolved when the operation has completed.
|
|
218
|
-
* @
|
|
220
|
+
* @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
|
|
219
221
|
*/
|
|
220
222
|
setFocus(options?: FocusOptions): Promise<void>;
|
|
221
223
|
/**
|
|
@@ -227,7 +229,7 @@ export abstract class Dialog extends LitElement {
|
|
|
227
229
|
/**
|
|
228
230
|
* Updates the component's size by setting its inline and/or block dimensions.
|
|
229
231
|
*
|
|
230
|
-
* Use this method to programmatically override the
|
|
232
|
+
* Use this method to programmatically override the component's width (inline) and/or height (block).
|
|
231
233
|
* Pass `null` to clear the override and revert to the default or CSS variable size.
|
|
232
234
|
*
|
|
233
235
|
* @param size
|