@esri/calcite-components 5.1.0-next.4 → 5.1.0-next.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/{CAAZHUX4.js → 24MYDDCX.js} +1 -1
- package/dist/cdn/2CMEG656.js +2 -0
- package/dist/cdn/{SYSNPKVM.js → 2ERRVHOG.js} +1 -1
- package/dist/cdn/{5WKPS2ZT.js → 2FA462GH.js} +1 -1
- package/dist/cdn/2HNLUEFE.js +2 -0
- package/dist/cdn/{3W4NT367.js → 2S7YK3XB.js} +1 -1
- package/dist/cdn/2ZVRANSV.js +2 -0
- package/dist/cdn/3JPPSAVC.js +2 -0
- package/dist/cdn/{5TWM6GKK.js → 3PMEQAA4.js} +1 -1
- package/dist/cdn/3Z3BLSQV.js +2 -0
- package/dist/cdn/45PPV4KB.js +2 -0
- package/dist/cdn/{HRUVPNCI.js → 4BN3NFQE.js} +1 -1
- package/dist/cdn/{X7JEHH2B.js → 4EQVX3RN.js} +1 -1
- package/dist/cdn/4JQR5BFT.js +2 -0
- package/dist/cdn/{EW6277QZ.js → 4LF7JOWB.js} +1 -1
- package/dist/cdn/4R2OUXIA.js +2 -0
- package/dist/cdn/4RK74RAX.js +2 -0
- package/dist/cdn/{F7XISEIT.js → 4Y2EOU6I.js} +1 -1
- package/dist/cdn/{RRHN2PDB.js → 564OQMMG.js} +1 -1
- package/dist/cdn/{WR6QBFCR.js → 5DNRIF2T.js} +1 -1
- package/dist/cdn/5LFL3RZM.js +2 -0
- package/dist/cdn/{RROGXGP5.js → 5W3NUC35.js} +1 -1
- package/dist/cdn/{AYPT6VGV.js → 5XXHCJWT.js} +1 -1
- package/dist/cdn/{UTFS3HNB.js → 5YJHDAMC.js} +1 -1
- package/dist/cdn/{FAHLSHDH.js → 6ALR2RKE.js} +1 -1
- package/dist/cdn/{HXS3PD57.js → 6FYE5EO4.js} +1 -1
- package/dist/cdn/{DFXECQ6Z.js → 6HUNPYIU.js} +1 -1
- package/dist/cdn/6IXX24B5.js +2 -0
- package/dist/cdn/6OIJRLWE.js +2 -0
- package/dist/cdn/6OJ75BQL.js +2 -0
- package/dist/cdn/6W5UQMJB.js +2 -0
- package/dist/cdn/6WINJYQB.js +2 -0
- package/dist/cdn/{XDOFVA4S.js → 7FDVLRYA.js} +1 -1
- package/dist/cdn/{R6D5F2V7.js → 7MRRY2FG.js} +1 -1
- package/dist/cdn/7ZM7AHRH.js +2 -0
- package/dist/cdn/A3EVLDK2.js +2 -0
- package/dist/cdn/ABWDY3S3.js +2 -0
- package/dist/cdn/{GM6FZWSL.js → AGJOJXT7.js} +1 -1
- package/dist/cdn/AGT4E2MR.js +2 -0
- package/dist/cdn/AKNE222R.js +2 -0
- package/dist/cdn/AMBU24RT.js +2 -0
- package/dist/cdn/B5HEG3NU.js +2 -0
- package/dist/cdn/B6IJE67V.js +2 -0
- package/dist/cdn/{7DA7BZM3.js → B74NISG7.js} +1 -1
- package/dist/cdn/C3ZMZ6DZ.js +2 -0
- package/dist/cdn/CKN7KBBX.js +2 -0
- package/dist/cdn/{LGKOEBZ4.js → CQTKLBEA.js} +1 -1
- package/dist/cdn/CUEFJU5M.js +2 -0
- package/dist/cdn/CX6NYW6U.js +2 -0
- package/dist/cdn/DAN2REQH.js +2 -0
- package/dist/cdn/{EHIAXJAL.js → DCWL5FUH.js} +1 -1
- package/dist/cdn/DM4TDFHC.js +2 -0
- package/dist/cdn/DNCPJ3MF.js +2 -0
- package/dist/cdn/DQX5RKEG.js +2 -0
- package/dist/cdn/DREDLWCT.js +2 -0
- package/dist/cdn/{MTNYIXZQ.js → DSZEUV6U.js} +1 -1
- package/dist/cdn/DVT6XGRX.js +2 -0
- package/dist/cdn/{VLGFWPBL.js → E4G4YBUV.js} +1 -1
- package/dist/cdn/EDZNJS2P.js +2 -0
- package/dist/cdn/{XLGGANFA.js → EYQJAUTS.js} +1 -1
- package/dist/cdn/F2OT6ZS7.js +2 -0
- package/dist/cdn/FNUCXO5T.js +2 -0
- package/dist/cdn/FO5KZ2B4.js +2 -0
- package/dist/cdn/{TCAGY7OI.js → FUAQVSMM.js} +1 -1
- package/dist/cdn/FUUTIPHY.js +2 -0
- package/dist/cdn/FVJPSUND.js +2 -0
- package/dist/cdn/{A4OYPK5D.js → FWIH6QX6.js} +1 -1
- package/dist/cdn/FXPBVOSU.js +2 -0
- package/dist/cdn/G2N5QQQC.js +2 -0
- package/dist/cdn/{Z22BRBT4.js → GA7UTPCH.js} +1 -1
- package/dist/cdn/GEWK7CNC.js +2 -0
- package/dist/cdn/{QOSBMGOZ.js → GF6UHDWG.js} +1 -1
- package/dist/cdn/{TLAXB6HU.js → GPB37IZK.js} +1 -1
- package/dist/cdn/GRAXNZVF.js +2 -0
- package/dist/cdn/{KKH2HVQW.js → I2C2U4EG.js} +1 -1
- package/dist/cdn/{CZYFEVKF.js → II5Q35BQ.js} +1 -1
- package/dist/cdn/J75WMG5K.js +2 -0
- package/dist/cdn/JGCSNM6I.js +2 -0
- package/dist/cdn/{BWUA5WU5.js → JIPOSCDQ.js} +1 -1
- package/dist/cdn/{MXRMT4RB.js → JMESEQBV.js} +1 -1
- package/dist/cdn/{HCJDTU7F.js → JQ2SIN67.js} +1 -1
- package/dist/cdn/{AMZPSRIA.js → JQWPSLVQ.js} +1 -1
- package/dist/cdn/{OVU2NGHU.js → JTIOKO5Z.js} +1 -1
- package/dist/cdn/K2J5VOGN.js +2 -0
- package/dist/cdn/K3TXMTAA.js +2 -0
- package/dist/cdn/KGN7LNPW.js +2 -0
- package/dist/cdn/{IFHMJCAE.js → KKCLSEGI.js} +1 -1
- package/dist/cdn/KT5ZBHYJ.js +2 -0
- package/dist/cdn/KZ26ANWU.js +2 -0
- package/dist/cdn/LQJ57QQT.js +2 -0
- package/dist/cdn/M2AV52WE.js +2 -0
- package/dist/cdn/M3F5QBVV.js +2 -0
- package/dist/cdn/MDIOA3TB.js +2 -0
- package/dist/cdn/MHY3UNM6.js +4 -0
- package/dist/cdn/MWRUONCP.js +2 -0
- package/dist/cdn/{3GV45XL7.js → MYDCGCGV.js} +1 -1
- package/dist/cdn/N7RECCIH.js +2 -0
- package/dist/cdn/{ED2GANBI.js → NBJNGORU.js} +1 -1
- package/dist/cdn/{ZZNRLKQQ.js → NPL2RAJH.js} +1 -1
- package/dist/cdn/{6IZMIAV2.js → NT3HJBBX.js} +1 -1
- package/dist/cdn/OW7J4OUX.js +2 -0
- package/dist/cdn/PQFBEGNW.js +2 -0
- package/dist/cdn/{LIJYENWJ.js → PS3RNTX7.js} +1 -1
- package/dist/cdn/{4MFRMO5M.js → Q43RHQO7.js} +1 -1
- package/dist/cdn/{ZIOXZBYF.js → QA5WKG2V.js} +1 -1
- package/dist/cdn/{YQY6DOSF.js → QB4POCYZ.js} +1 -1
- package/dist/cdn/{QKUQGG2M.js → QH3YRMT7.js} +1 -1
- package/dist/cdn/QKTDNEVV.js +2 -0
- package/dist/cdn/R6ION3EX.js +2 -0
- package/dist/cdn/{A22XLAKZ.js → RBNGWGBY.js} +3 -3
- package/dist/cdn/{IMOAPVVW.js → RGLX6ZUD.js} +1 -1
- package/dist/cdn/RLDG7JKF.js +2 -0
- package/dist/cdn/{HYYJZO6T.js → RUV4NSFE.js} +1 -1
- package/dist/cdn/RVXWIAKA.js +2 -0
- package/dist/cdn/S6W6A66Z.js +2 -0
- package/dist/cdn/{Z3IVC2AV.js → S7XRYSLC.js} +1 -1
- package/dist/cdn/{7TEW7OYZ.js → SOV3TN4E.js} +1 -1
- package/dist/cdn/{XYAZINKS.js → T5FTXYCC.js} +1 -1
- package/dist/cdn/T5OE6UXW.js +2 -0
- package/dist/cdn/T5QTQYSJ.js +2 -0
- package/dist/cdn/{GZNBU3BV.js → TDPJ5IO7.js} +1 -1
- package/dist/cdn/{5HQ3O27G.js → TIOSPWRC.js} +1 -1
- package/dist/cdn/{KVSU3DLB.js → TRGMORRC.js} +1 -1
- package/dist/cdn/TWAQRNOV.js +2 -0
- package/dist/cdn/U4RNEEDS.js +2 -0
- package/dist/cdn/U66XQE3L.js +2 -0
- package/dist/cdn/UWTFVQZZ.js +2 -0
- package/dist/cdn/V2V4HEZE.js +2 -0
- package/dist/cdn/{IOSK2I75.js → V3MIT2UF.js} +1 -1
- package/dist/cdn/{RA4KNUNM.js → V7U5TUOP.js} +1 -1
- package/dist/cdn/{7B4D4WJ2.js → VFQ6FGYV.js} +1 -1
- package/dist/cdn/{LHJSBAM5.js → VG74OPNP.js} +1 -1
- package/dist/cdn/VIV5RTB5.js +2 -0
- package/dist/cdn/VJUAN25O.js +2 -0
- package/dist/cdn/{CDTY6WOM.js → VS7QNWXR.js} +1 -1
- package/dist/cdn/WLMV5NME.js +2 -0
- package/dist/cdn/{GJE7FY35.js → XDZU4ZCM.js} +1 -1
- package/dist/cdn/{HXVXRVZW.js → XL6HVXTT.js} +1 -1
- package/dist/cdn/{5YROPSGB.js → XQ2A5CAB.js} +1 -1
- package/dist/cdn/XWE4Y4LH.js +2 -0
- package/dist/cdn/Y73IXKXQ.js +2 -0
- package/dist/cdn/YK2YMJCK.js +2 -0
- package/dist/cdn/YZZ2SHC2.js +2 -0
- package/dist/cdn/{QBLAE2O5.js → Z3PR5L6P.js} +1 -1
- package/dist/cdn/{MJCRT7H4.js → ZDXIPCCV.js} +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/icon/arcgisQuickcapture16.json +1 -0
- package/dist/cdn/assets/icon/arcgisQuickcapture24.json +1 -0
- package/dist/cdn/assets/icon/arcgisQuickcapture32.json +1 -0
- package/dist/cdn/assets/icon/arcgisSurvey12316.json +1 -0
- package/dist/cdn/assets/icon/arcgisSurvey12324.json +1 -0
- package/dist/cdn/assets/icon/arcgisSurvey12332.json +1 -0
- package/dist/cdn/assets/icon/gpsReceiver16.json +1 -0
- package/dist/cdn/assets/icon/gpsReceiver24.json +1 -0
- package/dist/cdn/assets/icon/gpsReceiver32.json +1 -0
- package/dist/cdn/assets/icon/layerStreamSetting16.json +1 -0
- package/dist/cdn/assets/icon/layerStreamSetting24.json +1 -0
- package/dist/cdn/assets/icon/layerStreamSetting32.json +1 -0
- package/dist/cdn/assets/icon/publish16.json +1 -0
- package/dist/cdn/assets/icon/publish24.json +1 -0
- package/dist/cdn/assets/icon/publish32.json +1 -0
- package/dist/cdn/assets/icon/totalStation16.json +1 -0
- package/dist/cdn/assets/icon/totalStation24.json +1 -0
- package/dist/cdn/assets/icon/totalStation32.json +1 -0
- package/dist/cdn/assets/icon/velocityServer16.json +1 -0
- package/dist/cdn/assets/icon/velocityServer24.json +1 -0
- package/dist/cdn/assets/icon/velocityServer32.json +1 -0
- package/dist/cdn/index.js +2 -2
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/ClearButton.js +16 -0
- package/dist/chunks/ExpandToggle.js +4 -5
- package/dist/chunks/Heading.js +3 -3
- package/dist/chunks/dom.js +63 -49
- package/dist/chunks/floating-ui.js +3 -6
- package/dist/chunks/label.js +1 -1
- package/dist/chunks/locale.js +29 -12
- package/dist/chunks/manager.js +505 -0
- package/dist/chunks/openCloseComponent.js +1 -1
- package/dist/chunks/resources5.js +2 -1
- package/dist/chunks/resources6.js +2 -0
- package/dist/chunks/runtime.js +4 -4
- package/dist/chunks/useFocusTrap.js +22 -1
- package/dist/chunks/useForm.js +294 -0
- package/dist/chunks/useFormTrigger.js +25 -0
- package/dist/chunks/useSetFocus.js +1 -1
- package/dist/chunks/{sortableComponent.js → useSortable.js} +70 -44
- package/dist/chunks/utils2.js +1 -1
- package/dist/components/calcite-accordion-item/customElement.d.ts +6 -6
- package/dist/components/calcite-accordion-item/customElement.js +4 -3
- package/dist/components/calcite-action/customElement.d.ts +14 -12
- package/dist/components/calcite-action/customElement.js +8 -14
- package/dist/components/calcite-action-bar/customElement.d.ts +12 -3
- package/dist/components/calcite-action-bar/customElement.js +43 -15
- package/dist/components/calcite-action-group/customElement.d.ts +6 -6
- package/dist/components/calcite-action-menu/customElement.d.ts +2 -2
- package/dist/components/calcite-action-pad/customElement.d.ts +3 -3
- package/dist/components/calcite-action-pad/customElement.js +5 -3
- package/dist/components/calcite-alert/customElement.d.ts +2 -2
- package/dist/components/calcite-alert/customElement.js +2 -2
- package/dist/components/calcite-autocomplete/customElement.d.ts +16 -13
- package/dist/components/calcite-autocomplete/customElement.js +23 -32
- package/dist/components/calcite-autocomplete-item/customElement.d.ts +6 -0
- package/dist/components/calcite-autocomplete-item/customElement.js +9 -4
- package/dist/components/calcite-avatar/customElement.js +1 -1
- package/dist/components/calcite-block/customElement.d.ts +5 -5
- package/dist/components/calcite-block/customElement.js +2 -2
- package/dist/components/calcite-block-group/customElement.d.ts +1 -1
- package/dist/components/calcite-block-group/customElement.js +5 -12
- 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 +11 -23
- package/dist/components/calcite-card/customElement.d.ts +4 -4
- package/dist/components/calcite-card/customElement.js +5 -3
- package/dist/components/calcite-card-group/customElement.d.ts +9 -3
- package/dist/components/calcite-card-group/customElement.js +11 -1
- package/dist/components/calcite-carousel/customElement.d.ts +1 -1
- package/dist/components/calcite-carousel/customElement.js +27 -25
- package/dist/components/calcite-checkbox/customElement.d.ts +4 -5
- package/dist/components/calcite-checkbox/customElement.js +10 -23
- package/dist/components/calcite-chip/customElement.d.ts +2 -2
- package/dist/components/calcite-chip/customElement.js +2 -2
- package/dist/components/calcite-chip-group/customElement.d.ts +1 -1
- package/dist/components/calcite-chip-group/customElement.js +1 -1
- package/dist/components/calcite-color-picker/customElement.d.ts +2 -2
- package/dist/components/calcite-color-picker/customElement.js +4 -2
- package/dist/components/calcite-color-picker-hex-input/customElement.d.ts +1 -1
- package/dist/components/calcite-color-picker-swatch/customElement.d.ts +1 -1
- package/dist/components/calcite-color-picker-swatch/customElement.js +1 -1
- package/dist/components/calcite-combobox/customElement.d.ts +16 -6
- package/dist/components/calcite-combobox/customElement.js +189 -106
- 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 +10 -4
- package/dist/components/calcite-date-picker/customElement.d.ts +1 -1
- package/dist/components/calcite-date-picker-day/customElement.d.ts +1 -1
- package/dist/components/calcite-date-picker-month/customElement.js +1 -1
- package/dist/components/calcite-date-picker-month-header/customElement.js +1 -1
- package/dist/components/calcite-dialog/customElement.d.ts +8 -6
- package/dist/components/calcite-dialog/customElement.js +5 -3
- package/dist/components/calcite-dropdown/customElement.d.ts +15 -5
- package/dist/components/calcite-dropdown/customElement.js +168 -90
- package/dist/components/calcite-dropdown-item/customElement.d.ts +2 -2
- package/dist/components/calcite-dropdown-item/customElement.js +14 -32
- package/dist/components/calcite-fab/customElement.d.ts +1 -1
- package/dist/components/calcite-filter/customElement.d.ts +1 -1
- package/dist/components/calcite-flow/customElement.d.ts +1 -1
- package/dist/components/calcite-flow-item/customElement.d.ts +9 -7
- package/dist/components/calcite-flow-item/customElement.js +6 -4
- package/dist/components/calcite-handle/customElement.d.ts +1 -1
- package/dist/components/calcite-icon/customElement.d.ts +1 -1
- package/dist/components/calcite-icon/customElement.js +4 -3
- package/dist/components/calcite-inline-editable/customElement.d.ts +1 -1
- package/dist/components/calcite-inline-editable/customElement.js +1 -1
- package/dist/components/calcite-input/customElement.d.ts +17 -18
- package/dist/components/calcite-input/customElement.js +30 -52
- 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 +34 -28
- package/dist/components/calcite-input-message/customElement.d.ts +1 -1
- package/dist/components/calcite-input-message/customElement.js +1 -1
- package/dist/components/calcite-input-number/customElement.d.ts +13 -14
- package/dist/components/calcite-input-number/customElement.js +26 -51
- 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 +20 -44
- 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 +14 -25
- package/dist/components/calcite-input-time-zone/customElement.d.ts +5 -6
- package/dist/components/calcite-input-time-zone/customElement.js +21 -19
- package/dist/components/calcite-link/customElement.d.ts +9 -9
- package/dist/components/calcite-link/customElement.js +31 -25
- package/dist/components/calcite-list/customElement.d.ts +1 -1
- package/dist/components/calcite-list/customElement.js +30 -11
- package/dist/components/calcite-list/interfaces.d.ts +2 -6
- package/dist/components/calcite-list-item/customElement.d.ts +2 -2
- package/dist/components/calcite-list-item/customElement.js +6 -4
- package/dist/components/calcite-list-item-group/customElement.js +1 -1
- package/dist/components/calcite-loader/customElement.d.ts +1 -1
- package/dist/components/calcite-menu/customElement.d.ts +1 -1
- package/dist/components/calcite-menu/customElement.js +2 -2
- package/dist/components/calcite-menu-item/customElement.d.ts +3 -3
- package/dist/components/calcite-menu-item/customElement.js +4 -2
- package/dist/components/calcite-meter/customElement.d.ts +7 -1
- package/dist/components/calcite-meter/customElement.js +4 -8
- package/dist/components/calcite-navigation/customElement.d.ts +2 -2
- package/dist/components/calcite-navigation-logo/customElement.d.ts +3 -3
- package/dist/components/calcite-navigation-user/customElement.d.ts +1 -1
- package/dist/components/calcite-notice/customElement.d.ts +3 -3
- package/dist/components/calcite-notice/customElement.js +2 -2
- package/dist/components/calcite-pagination/customElement.d.ts +1 -1
- package/dist/components/calcite-pagination/customElement.js +1 -1
- package/dist/components/calcite-panel/customElement.d.ts +11 -9
- 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 +14 -175
- package/dist/components/calcite-progress/customElement.js +3 -2
- package/dist/components/calcite-radio-button/customElement.d.ts +1 -1
- package/dist/components/calcite-radio-button/customElement.js +173 -5
- package/dist/components/calcite-radio-button-group/customElement.d.ts +1 -1
- package/dist/components/calcite-rating/customElement.d.ts +3 -4
- package/dist/components/calcite-rating/customElement.js +12 -18
- package/dist/components/calcite-scrim/customElement.js +1 -1
- package/dist/components/calcite-segmented-control/customElement.d.ts +3 -4
- package/dist/components/calcite-segmented-control/customElement.js +13 -22
- package/dist/components/calcite-segmented-control-item/customElement.js +2 -2
- package/dist/components/calcite-select/customElement.d.ts +3 -4
- package/dist/components/calcite-select/customElement.js +8 -19
- package/dist/components/calcite-sheet/customElement.d.ts +2 -2
- package/dist/components/calcite-sheet/customElement.js +10 -11
- package/dist/components/calcite-shell/customElement.js +1 -1
- package/dist/components/calcite-shell-panel/customElement.d.ts +2 -2
- package/dist/components/calcite-shell-panel/customElement.js +11 -5
- package/dist/components/calcite-slider/customElement.d.ts +3 -4
- package/dist/components/calcite-slider/customElement.js +12 -22
- package/dist/components/calcite-sort-handle/customElement.d.ts +4 -4
- package/dist/components/calcite-sort-handle/customElement.js +44 -17
- package/dist/components/calcite-sortable-list/customElement.d.ts +1 -1
- package/dist/components/calcite-sortable-list/customElement.js +4 -4
- package/dist/components/calcite-split-button/customElement.d.ts +8 -8
- package/dist/components/calcite-stepper/customElement.d.ts +2 -2
- package/dist/components/calcite-stepper/customElement.js +30 -43
- package/dist/components/calcite-stepper-item/customElement.d.ts +1 -1
- package/dist/components/calcite-stepper-item/customElement.js +3 -9
- package/dist/components/calcite-swatch/customElement.d.ts +1 -1
- package/dist/components/calcite-swatch-group/customElement.js +1 -1
- package/dist/components/calcite-switch/customElement.d.ts +4 -4
- package/dist/components/calcite-switch/customElement.js +9 -8
- package/dist/components/calcite-tab/customElement.d.ts +1 -1
- package/dist/components/calcite-tab/customElement.js +2 -2
- package/dist/components/calcite-tab-nav/customElement.js +4 -2
- package/dist/components/calcite-tab-title/customElement.js +6 -4
- package/dist/components/calcite-table/customElement.js +1 -1
- package/dist/components/calcite-table-cell/customElement.d.ts +2 -2
- package/dist/components/calcite-table-cell/customElement.js +3 -2
- package/dist/components/calcite-table-header/customElement.d.ts +2 -2
- package/dist/components/calcite-table-row/customElement.d.ts +1 -1
- package/dist/components/calcite-tabs/customElement.js +1 -1
- package/dist/components/calcite-text-area/customElement.d.ts +13 -14
- package/dist/components/calcite-text-area/customElement.js +32 -37
- package/dist/components/calcite-tile/customElement.d.ts +1 -1
- package/dist/components/calcite-time-picker/customElement.d.ts +1 -1
- package/dist/components/calcite-time-picker/customElement.js +5 -4
- package/dist/components/calcite-tooltip/customElement.d.ts +15 -2
- package/dist/components/calcite-tooltip/customElement.js +27 -315
- package/dist/components/calcite-tree/customElement.js +1 -1
- package/dist/components/calcite-tree-item/customElement.js +5 -4
- package/dist/controllers/useSortable.d.ts +7 -0
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/supported-browsers.json +1 -1
- package/dist/docs/translations.json +1 -1
- package/dist/docs/vscode.css-custom-data.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +25 -25
- package/dist/types/lumina.d.ts +6 -6
- package/dist/types/preact.d.ts +6 -6
- package/dist/types/react.d.ts +6 -6
- package/dist/types/stencil.d.ts +6 -6
- package/package.json +14 -13
- package/dist/cdn/256EMMKX.js +0 -2
- package/dist/cdn/2ZJ5ADD2.js +0 -2
- package/dist/cdn/37APBABQ.js +0 -2
- package/dist/cdn/3OIE2RR5.js +0 -2
- package/dist/cdn/3TCEXRVB.js +0 -2
- package/dist/cdn/43T3HPVW.js +0 -2
- package/dist/cdn/4ET37OQN.js +0 -2
- package/dist/cdn/4SJVPWEI.js +0 -2
- package/dist/cdn/6NGWODBG.js +0 -2
- package/dist/cdn/7CLOFSLV.js +0 -2
- package/dist/cdn/7CZHE7FZ.js +0 -2
- package/dist/cdn/7KCC74EE.js +0 -2
- package/dist/cdn/7WPF3NTF.js +0 -2
- package/dist/cdn/CPDXUV3S.js +0 -2
- package/dist/cdn/EIFNZZAD.js +0 -2
- package/dist/cdn/F7SGO63N.js +0 -2
- package/dist/cdn/FAOX7WLQ.js +0 -2
- package/dist/cdn/FCNCDBSI.js +0 -2
- package/dist/cdn/FDGUUC3D.js +0 -2
- package/dist/cdn/FRI4RPRX.js +0 -2
- package/dist/cdn/G6R56WT6.js +0 -2
- package/dist/cdn/GAUJK4Z7.js +0 -2
- package/dist/cdn/GDTRICJF.js +0 -2
- package/dist/cdn/GFZYTB3O.js +0 -2
- package/dist/cdn/GW7IPUQS.js +0 -2
- package/dist/cdn/HBVQ77SB.js +0 -2
- package/dist/cdn/HD23H6LX.js +0 -2
- package/dist/cdn/HVBNJRAQ.js +0 -2
- package/dist/cdn/I6CQ5UW5.js +0 -2
- package/dist/cdn/ILES2J66.js +0 -2
- package/dist/cdn/IR6Z2XSF.js +0 -2
- package/dist/cdn/IUAHSZQ6.js +0 -2
- package/dist/cdn/JKLX623E.js +0 -2
- package/dist/cdn/JLB2FYLL.js +0 -2
- package/dist/cdn/JRCEHRYP.js +0 -2
- package/dist/cdn/KNDQJ2XX.js +0 -2
- package/dist/cdn/L6F7C3O7.js +0 -2
- package/dist/cdn/LIZ5IMMJ.js +0 -2
- package/dist/cdn/LR57FDVO.js +0 -2
- package/dist/cdn/LRL6N22U.js +0 -2
- package/dist/cdn/LYKD5N65.js +0 -2
- package/dist/cdn/MASQZEFU.js +0 -2
- package/dist/cdn/MAXAPKJ5.js +0 -2
- package/dist/cdn/MQPFYNQR.js +0 -2
- package/dist/cdn/MUGKSK5F.js +0 -2
- package/dist/cdn/N6QRZM7N.js +0 -2
- package/dist/cdn/NQEVKT6K.js +0 -2
- package/dist/cdn/OS7NHPEF.js +0 -2
- package/dist/cdn/P7RXOG72.js +0 -2
- package/dist/cdn/P7U46JDU.js +0 -2
- package/dist/cdn/PBMFDSRI.js +0 -2
- package/dist/cdn/PS64W4X6.js +0 -2
- package/dist/cdn/Q52SIZ3L.js +0 -2
- package/dist/cdn/Q7WYXKFZ.js +0 -2
- package/dist/cdn/R3EE76WN.js +0 -2
- package/dist/cdn/R6YSSNOG.js +0 -2
- package/dist/cdn/RSCA2AM5.js +0 -2
- package/dist/cdn/S22OVJTO.js +0 -3
- package/dist/cdn/SBPWZDAB.js +0 -2
- package/dist/cdn/SFEXJ2YW.js +0 -2
- package/dist/cdn/SXVCUXNL.js +0 -2
- package/dist/cdn/TPXLAPIE.js +0 -2
- package/dist/cdn/TSZAQNPK.js +0 -2
- package/dist/cdn/U6LKEFFT.js +0 -2
- package/dist/cdn/UAADJQTQ.js +0 -2
- package/dist/cdn/ULBA6IRN.js +0 -2
- package/dist/cdn/UOIMVKXE.js +0 -2
- package/dist/cdn/V4KATS7H.js +0 -2
- package/dist/cdn/WAC3IAWB.js +0 -2
- package/dist/cdn/WJXZ7BPV.js +0 -2
- package/dist/cdn/XSSG2WBN.js +0 -2
- package/dist/cdn/YHGC7HRA.js +0 -2
- package/dist/cdn/YOYLPMEA.js +0 -2
- package/dist/cdn/YUJ33VWR.js +0 -2
- package/dist/cdn/Z53AVC5H.js +0 -2
- package/dist/cdn/ZQLGBHLZ.js +0 -2
- package/dist/cdn/ZXUITROT.js +0 -2
- package/dist/chunks/form.js +0 -268
- package/dist/chunks/input.js +0 -30
- package/dist/utils/form.d.ts +0 -3
- package/dist/utils/sortableComponent.d.ts +0 -7
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
2
|
import { c as customElement } from "../../chunks/runtime.js";
|
|
3
|
-
import { css,
|
|
3
|
+
import { css, html } from "lit";
|
|
4
4
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
5
5
|
import { literal, html as html$1 } from "lit/static-html.js";
|
|
6
|
-
import { LitElement, stringOrBoolean, safeClassMap } from "@arcgis/lumina";
|
|
6
|
+
import { LitElement, stringOrBoolean, safeClassMap, nothing } from "@arcgis/lumina";
|
|
7
7
|
import { useWatchAttributes } from "@arcgis/lumina/controllers";
|
|
8
|
-
import { f as findAssociatedForm, s as submitForm, r as resetForm } from "../../chunks/form.js";
|
|
9
8
|
import { c as connectLabel, d as disconnectLabel, g as getLabelText } from "../../chunks/label.js";
|
|
10
9
|
import { c as createObserver, u as updateRefObserver } from "../../chunks/observers.js";
|
|
11
10
|
import { g as getIconScale } from "../../chunks/component.js";
|
|
12
11
|
import { u as useT9n } from "../../chunks/useT9n.js";
|
|
13
|
-
import {
|
|
12
|
+
import { h as hasVisibleContent } from "../../chunks/dom.js";
|
|
14
13
|
import { u as useSetFocus } from "../../chunks/useSetFocus.js";
|
|
15
14
|
import { u as useInteractive } from "../../chunks/useInteractive.js";
|
|
15
|
+
import { u as useFormTrigger } from "../../chunks/useFormTrigger.js";
|
|
16
16
|
const CSS = {
|
|
17
17
|
buttonLoader: "calcite-button--loader",
|
|
18
18
|
content: "content",
|
|
@@ -27,12 +27,13 @@ const CSS = {
|
|
|
27
27
|
buttonPadding: "button-padding",
|
|
28
28
|
buttonPaddingShrunk: "button-padding--shrunk"
|
|
29
29
|
};
|
|
30
|
-
const styles = css`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-block;inline-size:auto;vertical-align:middle;border-radius:var(--calcite-button-corner-radius, var(--calcite-internal-button-corner-radius, 0))}:host a,:host button{--calcite-internal-button-content-margin: .5rem;--calcite-internal-button-padding-x: 7px;--calcite-internal-button-padding-y: 3px;position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;-webkit-user-select:none;user-select:none;appearance:none;align-items:center;justify-content:center;border-style:none;text-align:center;font-family:inherit;font-weight:var(--calcite-font-weight-normal);text-decoration-line:none;outline-color:transparent;box-shadow:var(--calcite-button-shadow, var(--calcite-shadow-none));background-color:var(--calcite-button-background-color, var(--calcite-internal-button-background-color, var(--calcite-color-transparent)));border-block-start-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-block-start-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-block-end-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-block-end-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-inline-start-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-inline-start-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-inline-end-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-inline-end-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-style:solid;border-width:var(--calcite-border-width-sm);border-radius:var(--calcite-button-corner-radius, var(--calcite-internal-button-corner-radius, 0));color:var(--calcite-button-text-color, var(--calcite-internal-button-text-color, currentColor));padding-block:var(--calcite-internal-button-padding-y);padding-inline:var(--calcite-internal-button-padding-x);transition:color var(--calcite-animation-timing) ease-in-out,background-color var(--calcite-animation-timing) ease-in-out,box-shadow var(--calcite-animation-timing) ease-in-out,outline-color var(--calcite-internal-animation-timing-fast) ease-in-out}:host a:hover,:host button:hover{text-decoration-line:none;background-color:var(--calcite-button-background-color, var(--calcite-internal-button-background-color-hover, var(--calcite-color-transparent)))}:host a:focus,:host button:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))));background-color:var(--calcite-button-background-color, var(--calcite-internal-button-background-color))}:host a:active,:host button:active{background-color:var(--calcite-button-background-color, var(--calcite-internal-button-background-color-press, var(--calcite-color-transparent)))}:host a span,:host button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host a calcite-loader,:host button calcite-loader{color:var(--calcite-button-loader-color, var(--calcite-internal-button-loader-color, var(--calcite-button-text-color, var(--calcite-internal-button-text-color))))}:host([round]){--calcite-internal-button-corner-radius: 50px}.content{margin-inline:var(--calcite-internal-button-content-margin)}.icon-start-empty .content{margin-inline-start:unset}.icon-end-empty .content{margin-inline-end:unset}:host([scale=m]) button,:host([scale=m]) a{--calcite-internal-button-content-margin: .75rem}:host([scale=l]) button,:host([scale=l]) a{--calcite-internal-button-content-margin: 1rem}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}:host([alignment=center]:not([width=auto])) a,:host([alignment=center]:not([width=auto])) button{justify-content:center}:host([alignment=start]:not([width=auto])) a,:host([alignment=start]:not([width=auto])) button{justify-content:flex-start}:host([alignment=end]:not([width=auto])) a,:host([alignment=end]:not([width=auto])) button{justify-content:flex-end}:host([alignment*=space-between]:not([width=auto])) a,:host([alignment*=space-between]:not([width=auto])) button{justify-content:space-between}:host([alignment=icon-start-space-between]:not([width=auto])) .icon--start{margin-inline-end:auto}:host([alignment=icon-start-space-between]:not([width=auto])) a,:host([alignment=icon-start-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=icon-end-space-between]:not([width=auto])) .icon--end{margin-inline-start:auto}:host([alignment=icon-end-space-between]:not([width=auto])) a,:host([alignment=icon-end-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=center]) a:not(.content--slotted) .icon--start+.icon--end,:host([alignment=center]) button:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:var(--calcite-internal-button-content-margin)}.icon--start,.icon--end{color:var(--calcite-button-icon-color, var(--calcite-icon-color, var(--calcite-ui-icon-color)))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}@keyframes loader-in{0%{inline-size:0;opacity:0;transform:scale(.5)}to{inline-size:1em;opacity:1;transform:scale(1)}}@keyframes loader-out{0%{inline-size:1em;opacity:1;transform:scale(1)}to{inline-size:0;opacity:0;transform:scale(.5)}}.calcite-button--loader{display:flex}.calcite-button--loader calcite-loader{margin:0}:host([loading]) button.content--slotted .calcite-button--loader calcite-loader,:host([loading]) a.content--slotted .calcite-button--loader calcite-loader{margin-inline-end:var(--calcite-internal-button-content-margin)}:host([loading]) button:not(.content--slotted) .icon--start,:host([loading]) button:not(.content--slotted) .icon--end,:host([loading]) a:not(.content--slotted) .icon--start,:host([loading]) a:not(.content--slotted) .icon--end{display:none}:host([appearance]) button,:host([appearance]) a{--calcite-internal-button-border-color: var(--calcite-color-transparent);border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([kind=brand]){--calcite-internal-button-background-color: var(--calcite-color-brand);--calcite-internal-button-background-color-hover: var(--calcite-color-brand-hover);--calcite-internal-button-background-color-press: var(--calcite-color-brand-press);--calcite-internal-button-loader-color: var(--calcite-color-text-inverse);--calcite-internal-button-text-color: var(--calcite-color-text-inverse)}:host([kind=danger]){--calcite-internal-button-background-color: var(--calcite-color-status-danger);--calcite-internal-button-background-color-hover: var(--calcite-color-status-danger-hover);--calcite-internal-button-background-color-press: var(--calcite-color-status-danger-press);--calcite-internal-button-loader-color: var(--calcite-color-text-inverse);--calcite-internal-button-text-color: var(--calcite-color-text-inverse)}:host([kind=neutral]){--calcite-internal-button-background-color: var(--calcite-color-foreground-3);--calcite-internal-button-background-color-hover: var(--calcite-color-foreground-2);--calcite-internal-button-background-color-press: var(--calcite-color-foreground-1);--calcite-internal-button-loader-color: var(--calcite-color-text-1);--calcite-internal-button-text-color: var(--calcite-color-text-1)}:host([kind=inverse]){--calcite-internal-button-background-color: var(--calcite-color-inverse);--calcite-internal-button-background-color-hover: var(--calcite-color-inverse-hover);--calcite-internal-button-background-color-press: var(--calcite-color-inverse-press);--calcite-internal-button-loader-color: var(--calcite-color-text-inverse);--calcite-internal-button-text-color: var(--calcite-color-text-inverse)}:host([appearance=outline-fill]){--calcite-internal-button-background-color: var(--calcite-color-foreground-1);--calcite-internal-button-background-color-hover: var(--calcite-color-foreground-2);--calcite-internal-button-background-color-press: var(--calcite-color-foreground-3)}:host([appearance=outline-fill]) button,:host([appearance=outline-fill]) a{border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([appearance=outline-fill][kind=brand]) button,:host([appearance=outline-fill][kind=brand]) a{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=brand]) button:hover,:host([appearance=outline-fill][kind=brand]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-brand-hover);--calcite-internal-button-text-color: var(--calcite-color-brand-hover)}:host([appearance=outline-fill][kind=brand]) button:focus,:host([appearance=outline-fill][kind=brand]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=brand]) button:active,:host([appearance=outline-fill][kind=brand]) a:active{--calcite-internal-button-border-color: var(--calcite-color-brand-press);--calcite-internal-button-text-color: var(--calcite-color-brand-press)}:host([appearance=outline-fill][kind=brand]) button calcite-loader,:host([appearance=outline-fill][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=danger]) button,:host([appearance=outline-fill][kind=danger]) a{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=danger]) button:hover,:host([appearance=outline-fill][kind=danger]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-status-danger-hover);--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover)}:host([appearance=outline-fill][kind=danger]) button:focus,:host([appearance=outline-fill][kind=danger]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=danger]) button:active,:host([appearance=outline-fill][kind=danger]) a:active{--calcite-internal-button-border-color: var(--calcite-color-status-danger-press);--calcite-internal-button-text-color: var(--calcite-color-status-danger-press)}:host([appearance=outline-fill][kind=danger]) button calcite-loader,:host([appearance=outline-fill][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=neutral]) button,:host([appearance=outline-fill][kind=neutral]) a{--calcite-internal-button-border-color: var(--calcite-color-border-1);--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline-fill][kind=neutral]) button:hover,:host([appearance=outline-fill][kind=neutral]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-border-input)}:host([appearance=outline-fill][kind=neutral]) button:focus,:host([appearance=outline-fill][kind=neutral]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-foreground-3)}:host([appearance=outline-fill][kind=neutral]) button:active,:host([appearance=outline-fill][kind=neutral]) a:active{--calcite-internal-button-border-color: var(--calcite-color-text-3)}:host([appearance=solid][kind=neutral]){--calcite-internal-button-background-color-hover: var(--calcite-color-border-2);--calcite-internal-button-background-color-press: var(--calcite-color-border-1)}:host([appearance=outline-fill][kind=inverse]) button,:host([appearance=outline-fill][kind=inverse]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-border-color: var(--calcite-color-inverse);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline-fill][kind=inverse]) button:hover,:host([appearance=outline-fill][kind=inverse]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-inverse-hover)}:host([appearance=outline-fill][kind=inverse]) button:focus,:host([appearance=outline-fill][kind=inverse]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-inverse)}:host([appearance=outline-fill][kind=inverse]) button:active,:host([appearance=outline-fill][kind=inverse]) a:active{--calcite-internal-button-border-color: var(--calcite-color-inverse-press)}:host([appearance=outline]){--calcite-internal-button-background-color: var(--calcite-color-transparent);--calcite-internal-button-background-color-hover: var(--calcite-color-transparent-hover);--calcite-internal-button-background-color-press: var(--calcite-color-transparent-press)}:host([appearance=outline]) button,:host([appearance=outline]) a{border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([appearance=outline][kind=brand]) button,:host([appearance=outline][kind=brand]) a{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline][kind=brand]) button:hover,:host([appearance=outline][kind=brand]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-brand-hover);--calcite-internal-button-text-color: var(--calcite-color-brand-hover)}:host([appearance=outline][kind=brand]) button:focus,:host([appearance=outline][kind=brand]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=outline][kind=brand]) button:active,:host([appearance=outline][kind=brand]) a:active{--calcite-internal-button-border-color: var(--calcite-color-brand-press);--calcite-internal-button-text-color: var(--calcite-color-brand-press)}:host([appearance=outline][kind=brand]) button calcite-loader,:host([appearance=outline][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline][kind=danger]) button,:host([appearance=outline][kind=danger]) a{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=danger]) button:hover,:host([appearance=outline][kind=danger]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-status-danger-hover);--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover)}:host([appearance=outline][kind=danger]) button:focus,:host([appearance=outline][kind=danger]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=danger]) button:active,:host([appearance=outline][kind=danger]) a:active{--calcite-internal-button-border-color: var(--calcite-color-status-danger-press);--calcite-internal-button-text-color: var(--calcite-color-status-danger-press)}:host([appearance=outline][kind=danger]) button calcite-loader,:host([appearance=outline][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=neutral]) button,:host([appearance=outline][kind=neutral]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-border-color: var(--calcite-color-border-1);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline][kind=neutral]) button:hover,:host([appearance=outline][kind=neutral]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-border-input)}:host([appearance=outline][kind=neutral]) button:focus,:host([appearance=outline][kind=neutral]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-foreground-3)}:host([appearance=outline][kind=neutral]) button:active,:host([appearance=outline][kind=neutral]) a:active{--calcite-internal-button-border-color: var(--calcite-color-text-3)}:host([appearance=outline][kind=inverse]) button,:host([appearance=outline][kind=inverse]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-border-color: var(--calcite-color-inverse);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline][kind=inverse]) button:hover,:host([appearance=outline][kind=inverse]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-inverse-hover)}:host([appearance=outline][kind=inverse]) button:focus,:host([appearance=outline][kind=inverse]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-inverse)}:host([appearance=outline][kind=inverse]) button:active,:host([appearance=outline][kind=inverse]) a:active{--calcite-internal-button-border-color: var(--calcite-color-inverse-press)}:host([appearance=outline-fill][split-child=primary]) button,:host([appearance=outline][split-child=primary]) button,:host([appearance=outline-fill][split-child=primary]) a,:host([appearance=outline][split-child=primary]) a{border-inline-end-width:0;border-inline-start-width:1px}:host([appearance=outline-fill][split-child=secondary]) button,:host([appearance=outline][split-child=secondary]) button,:host([appearance=outline-fill][split-child=secondary]) a,:host([appearance=outline][split-child=secondary]) a{border-inline-start-width:0;border-inline-end-width:1px}:host([appearance=transparent]){--calcite-internal-button-background-color: var(--calcite-color-transparent);--calcite-internal-button-background-color-hover: var(--calcite-color-transparent-hover);--calcite-internal-button-background-color-press: var(--calcite-color-transparent-press)}:host([appearance=transparent]:not(.enable-editing-button)){--calcite-internal-button-background-color-hover: var(--calcite-color-transparent-hover);--calcite-internal-button-background-color-press: var(--calcite-color-transparent-press)}:host([appearance=transparent][kind=brand]) button,:host([appearance=transparent][kind=brand]) a{--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=brand]) button:hover,:host([appearance=transparent][kind=brand]) a:hover{--calcite-internal-button-text-color: var(--calcite-color-brand-hover)}:host([appearance=transparent][kind=brand]) button:focus,:host([appearance=transparent][kind=brand]) a:focus{--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=brand]) button:active,:host([appearance=transparent][kind=brand]) a:active{--calcite-internal-button-text-color: var(--calcite-color-brand-press)}:host([appearance=transparent][kind=brand]) button calcite-loader,:host([appearance=transparent][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=danger]) button,:host([appearance=transparent][kind=danger]) a{--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=danger]) button:hover,:host([appearance=transparent][kind=danger]) a:hover{--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover)}:host([appearance=transparent][kind=danger]) button:focus,:host([appearance=transparent][kind=danger]) a:focus{--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=danger]) button:active,:host([appearance=transparent][kind=danger]) a:active{--calcite-internal-button-text-color: var(--calcite-color-status-danger-press)}:host([appearance=transparent][kind=danger]) button calcite-loader,:host([appearance=transparent][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) button,:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) a,:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) calcite-loader{--calcite-internal-button-text-color: var(--calcite-color-text-1)}:host([appearance=transparent][kind=neutral].cancel-editing-button) button{--calcite-internal-button-text-color: var(--calcite-color-text-3)}:host([appearance=transparent][kind=neutral].cancel-editing-button) button:hover{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-padding-y: 0}:host(.confirm-changes-button) button:focus,:host(.cancel-editing-button) button:focus,:host(.enable-editing-button) button:focus{outline-offset:-2px}:host([appearance=transparent][kind=inverse]){--calcite-internal-button-background-color-hover: var(--calcite-color-transparent-hover);--calcite-internal-button-background-color-press: var(--calcite-color-transparent-press)}:host([appearance=transparent][kind=inverse]) button calcite-loader,:host([appearance=transparent][kind=inverse]) a calcite-loader{--calcite-internal-button-text-color: var(--calcite-color-text-inverse)}:host([scale=s]) button.content--slotted,:host([scale=s]) a.content--slotted{font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm)}:host([scale=s][appearance=transparent]) button.content--slotted,:host([scale=s][appearance=transparent]) a.content--slotted{--calcite-internal-button-padding-x: .5rem}:host([scale=s]) button,:host([scale=s]) a{--calcite-internal-button-padding-y: 3px}:host([scale=m]) button.content--slotted,:host([scale=m]) a.content--slotted{--calcite-internal-button-padding-x: 11px;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base)}:host([scale=m]) button,:host([scale=m]) a{--calcite-internal-button-padding-y: 7px}:host([scale=m][appearance=transparent]) button.content--slotted,:host([scale=m][appearance=transparent]) a.content--slotted{--calcite-internal-button-padding-x: .75rem}:host([scale=l]) button.content--slotted,:host([scale=l]) a.content--slotted{--calcite-internal-button-padding-x: 15px;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([scale=l]) .button-padding{--calcite-internal-button-padding-x: 1rem;--calcite-internal-button-padding-y: 11px}:host([scale=l]) .button-padding--shrunk{--calcite-internal-button-padding-y: 9px}:host([scale=s]) button:not(.content--slotted),:host([scale=s]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y: 3px;inline-size:1.5rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);min-block-size:1.5rem}:host([scale=m]) button:not(.content--slotted),:host([scale=m]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y: 7px;inline-size:2rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);min-block-size:2rem}:host([scale=l]) button:not(.content--slotted),:host([scale=l]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y: 9px;inline-size:2.75rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);min-block-size:2.75rem}:host(:is([scale=s],[scale=m],[scale=l])[width=full]) a:not(.content--slotted),:host(:is([scale=s],[scale=m],[scale=l])[width=full]) button:not(.content--slotted){inline-size:var(--calcite-container-size-content-fluid)}:host([scale=l][appearance=transparent]) button:not(.content--slotted),:host([scale=l][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-y: .625rem}:host([scale=s][icon-start][icon-end]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 23px;block-size:1.5rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([scale=s][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 1.5rem}:host([scale=m][icon-start][icon-end]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 2rem;block-size:2rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([scale=m][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 33px}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 43px;block-size:2.75rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted) .icon--start+.icon--end,:host([scale=l][icon-start][icon-end]) a:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:1rem}:host([scale=l][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 2.75rem}:host([hidden]){display:none}[hidden]{display:none}`;
|
|
30
|
+
const styles = css`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-block;inline-size:auto;vertical-align:middle;border-radius:var(--calcite-button-corner-radius, var(--calcite-internal-button-corner-radius, 0))}:host a,:host button{--calcite-internal-button-content-margin: .5rem;--calcite-internal-button-padding-x: 7px;--calcite-internal-button-padding-y: 3px;position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;-webkit-user-select:none;user-select:none;appearance:none;align-items:center;justify-content:center;border-style:none;text-align:center;font-family:inherit;font-weight:var(--calcite-font-weight-normal);text-decoration-line:none;outline-color:transparent;box-shadow:var(--calcite-button-shadow, var(--calcite-shadow-none));background-color:var(--calcite-button-background-color, var(--calcite-internal-button-background-color, var(--calcite-color-transparent)));border-block-start-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-block-start-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-block-end-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-block-end-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-inline-start-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-inline-start-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-inline-end-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-inline-end-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-style:solid;border-width:var(--calcite-border-width-sm);border-radius:var(--calcite-button-corner-radius, var(--calcite-internal-button-corner-radius, 0));color:var(--calcite-button-text-color, var(--calcite-internal-button-text-color, currentColor));padding-block:var(--calcite-internal-button-padding-y);padding-inline:var(--calcite-internal-button-padding-x);transition:color var(--calcite-animation-timing) ease-in-out,background-color var(--calcite-animation-timing) ease-in-out,box-shadow var(--calcite-animation-timing) ease-in-out,outline-color var(--calcite-internal-animation-timing-fast) ease-in-out}:host a:hover,:host button:hover{text-decoration-line:none;background-color:var(--calcite-button-background-color, var(--calcite-internal-button-background-color-hover, var(--calcite-color-transparent)))}:host a:focus,:host button:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))));background-color:var(--calcite-button-background-color, var(--calcite-internal-button-background-color))}:host a:active,:host button:active{background-color:var(--calcite-button-background-color, var(--calcite-internal-button-background-color-press, var(--calcite-color-transparent)))}:host a span,:host button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host a calcite-loader,:host button calcite-loader{color:var(--calcite-button-loader-color, var(--calcite-internal-button-loader-color, var(--calcite-button-text-color, var(--calcite-internal-button-text-color))))}:host([round]){--calcite-internal-button-corner-radius: 50px}.content{margin-inline:var(--calcite-internal-button-content-margin)}.icon-start-empty .content{margin-inline-start:unset}.icon-end-empty .content{margin-inline-end:unset}:host([scale=m]) button,:host([scale=m]) a{--calcite-internal-button-content-margin: .75rem}:host([scale=l]) button,:host([scale=l]) a{--calcite-internal-button-content-margin: 1rem}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}:host([alignment=center]:not([width=auto])) a,:host([alignment=center]:not([width=auto])) button{justify-content:center}:host([alignment=start]:not([width=auto])) a,:host([alignment=start]:not([width=auto])) button{justify-content:flex-start}:host([alignment=end]:not([width=auto])) a,:host([alignment=end]:not([width=auto])) button{justify-content:flex-end}:host([alignment*=space-between]:not([width=auto])) a,:host([alignment*=space-between]:not([width=auto])) button{justify-content:space-between}:host([alignment=icon-start-space-between]:not([width=auto])) .icon--start{margin-inline-end:auto}:host([alignment=icon-start-space-between]:not([width=auto])) a,:host([alignment=icon-start-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=icon-end-space-between]:not([width=auto])) .icon--end{margin-inline-start:auto}:host([alignment=icon-end-space-between]:not([width=auto])) a,:host([alignment=icon-end-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=center]) a:not(.content--slotted) .icon--start+.icon--end,:host([alignment=center]) button:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:var(--calcite-internal-button-content-margin)}.icon--start,.icon--end{color:var(--calcite-button-icon-color, var(--calcite-icon-color, var(--calcite-ui-icon-color)))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}@keyframes loader-in{0%{inline-size:0;opacity:0;transform:scale(.5)}to{inline-size:1em;opacity:1;transform:scale(1)}}@keyframes loader-out{0%{inline-size:1em;opacity:1;transform:scale(1)}to{inline-size:0;opacity:0;transform:scale(.5)}}.calcite-button--loader{display:flex}.calcite-button--loader calcite-loader{margin:0}:host([loading]) button.content--slotted .calcite-button--loader calcite-loader,:host([loading]) a.content--slotted .calcite-button--loader calcite-loader{margin-inline-end:var(--calcite-internal-button-content-margin)}:host([loading]) button:not(.content--slotted) .icon--start,:host([loading]) button:not(.content--slotted) .icon--end,:host([loading]) a:not(.content--slotted) .icon--start,:host([loading]) a:not(.content--slotted) .icon--end{display:none}:host([appearance]) button,:host([appearance]) a{--calcite-internal-button-border-color: var(--calcite-color-transparent);border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([kind=brand]){--calcite-internal-button-background-color: var(--calcite-color-brand);--calcite-internal-button-background-color-hover: var(--calcite-color-brand-hover);--calcite-internal-button-background-color-press: var(--calcite-color-brand-press);--calcite-internal-button-loader-color: var(--calcite-color-text-inverse);--calcite-internal-button-text-color: var(--calcite-color-text-inverse)}:host([kind=danger]){--calcite-internal-button-background-color: var(--calcite-color-status-danger);--calcite-internal-button-background-color-hover: var(--calcite-color-status-danger-hover);--calcite-internal-button-background-color-press: var(--calcite-color-status-danger-press);--calcite-internal-button-loader-color: var(--calcite-color-text-inverse);--calcite-internal-button-text-color: var(--calcite-color-text-inverse)}:host([kind=neutral]){--calcite-internal-button-background-color: var(--calcite-color-foreground-3);--calcite-internal-button-background-color-hover: var(--calcite-color-foreground-2);--calcite-internal-button-background-color-press: var(--calcite-color-foreground-1);--calcite-internal-button-loader-color: var(--calcite-color-text-1);--calcite-internal-button-text-color: var(--calcite-color-text-1)}:host([kind=inverse]){--calcite-internal-button-background-color: var(--calcite-color-inverse);--calcite-internal-button-background-color-hover: var(--calcite-color-inverse-hover);--calcite-internal-button-background-color-press: var(--calcite-color-inverse-press);--calcite-internal-button-loader-color: var(--calcite-color-text-inverse);--calcite-internal-button-text-color: var(--calcite-color-text-inverse)}:host([appearance=outline-fill]){--calcite-internal-button-background-color: var(--calcite-color-foreground-1);--calcite-internal-button-background-color-hover: var(--calcite-color-foreground-2);--calcite-internal-button-background-color-press: var(--calcite-color-foreground-3)}:host([appearance=outline-fill]) button,:host([appearance=outline-fill]) a{border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([appearance=outline-fill][kind=brand]) button,:host([appearance=outline-fill][kind=brand]) a{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=brand]) button:hover,:host([appearance=outline-fill][kind=brand]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-brand-hover);--calcite-internal-button-text-color: var(--calcite-color-brand-hover)}:host([appearance=outline-fill][kind=brand]) button:focus,:host([appearance=outline-fill][kind=brand]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=brand]) button:active,:host([appearance=outline-fill][kind=brand]) a:active{--calcite-internal-button-border-color: var(--calcite-color-brand-press);--calcite-internal-button-text-color: var(--calcite-color-brand-press)}:host([appearance=outline-fill][kind=brand]) button calcite-loader,:host([appearance=outline-fill][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=danger]) button,:host([appearance=outline-fill][kind=danger]) a{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=danger]) button:hover,:host([appearance=outline-fill][kind=danger]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-status-danger-hover);--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover)}:host([appearance=outline-fill][kind=danger]) button:focus,:host([appearance=outline-fill][kind=danger]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=danger]) button:active,:host([appearance=outline-fill][kind=danger]) a:active{--calcite-internal-button-border-color: var(--calcite-color-status-danger-press);--calcite-internal-button-text-color: var(--calcite-color-status-danger-press)}:host([appearance=outline-fill][kind=danger]) button calcite-loader,:host([appearance=outline-fill][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=neutral]) button,:host([appearance=outline-fill][kind=neutral]) a{--calcite-internal-button-border-color: var(--calcite-color-border-1);--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline-fill][kind=neutral]) button:hover,:host([appearance=outline-fill][kind=neutral]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-border-input)}:host([appearance=outline-fill][kind=neutral]) button:focus,:host([appearance=outline-fill][kind=neutral]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-foreground-3)}:host([appearance=outline-fill][kind=neutral]) button:active,:host([appearance=outline-fill][kind=neutral]) a:active{--calcite-internal-button-border-color: var(--calcite-color-text-3)}:host([appearance=solid][kind=neutral]){--calcite-internal-button-background-color-hover: var(--calcite-color-border-2);--calcite-internal-button-background-color-press: var(--calcite-color-border-1)}:host([appearance=outline-fill][kind=inverse]) button,:host([appearance=outline-fill][kind=inverse]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-border-color: var(--calcite-color-inverse);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline-fill][kind=inverse]) button:hover,:host([appearance=outline-fill][kind=inverse]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-inverse-hover)}:host([appearance=outline-fill][kind=inverse]) button:focus,:host([appearance=outline-fill][kind=inverse]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-inverse)}:host([appearance=outline-fill][kind=inverse]) button:active,:host([appearance=outline-fill][kind=inverse]) a:active{--calcite-internal-button-border-color: var(--calcite-color-inverse-press)}:host([appearance=outline]){--calcite-internal-button-background-color: var(--calcite-color-transparent);--calcite-internal-button-background-color-hover: var(--calcite-color-transparent-hover);--calcite-internal-button-background-color-press: var(--calcite-color-transparent-press)}:host([appearance=outline]) button,:host([appearance=outline]) a{border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([appearance=outline][kind=brand]) button,:host([appearance=outline][kind=brand]) a{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline][kind=brand]) button:hover,:host([appearance=outline][kind=brand]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-brand-hover);--calcite-internal-button-text-color: var(--calcite-color-brand-hover)}:host([appearance=outline][kind=brand]) button:focus,:host([appearance=outline][kind=brand]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=outline][kind=brand]) button:active,:host([appearance=outline][kind=brand]) a:active{--calcite-internal-button-border-color: var(--calcite-color-brand-press);--calcite-internal-button-text-color: var(--calcite-color-brand-press)}:host([appearance=outline][kind=brand]) button calcite-loader,:host([appearance=outline][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline][kind=danger]) button,:host([appearance=outline][kind=danger]) a{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=danger]) button:hover,:host([appearance=outline][kind=danger]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-status-danger-hover);--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover)}:host([appearance=outline][kind=danger]) button:focus,:host([appearance=outline][kind=danger]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=danger]) button:active,:host([appearance=outline][kind=danger]) a:active{--calcite-internal-button-border-color: var(--calcite-color-status-danger-press);--calcite-internal-button-text-color: var(--calcite-color-status-danger-press)}:host([appearance=outline][kind=danger]) button calcite-loader,:host([appearance=outline][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=neutral]) button,:host([appearance=outline][kind=neutral]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-border-color: var(--calcite-color-border-1);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline][kind=neutral]) button:hover,:host([appearance=outline][kind=neutral]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-border-input)}:host([appearance=outline][kind=neutral]) button:focus,:host([appearance=outline][kind=neutral]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-foreground-3)}:host([appearance=outline][kind=neutral]) button:active,:host([appearance=outline][kind=neutral]) a:active{--calcite-internal-button-border-color: var(--calcite-color-text-3)}:host([appearance=outline][kind=inverse]) button,:host([appearance=outline][kind=inverse]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-border-color: var(--calcite-color-inverse);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline][kind=inverse]) button:hover,:host([appearance=outline][kind=inverse]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-inverse-hover)}:host([appearance=outline][kind=inverse]) button:focus,:host([appearance=outline][kind=inverse]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-inverse)}:host([appearance=outline][kind=inverse]) button:active,:host([appearance=outline][kind=inverse]) a:active{--calcite-internal-button-border-color: var(--calcite-color-inverse-press)}:host([appearance=outline-fill][split-child=primary]) button,:host([appearance=outline][split-child=primary]) button,:host([appearance=outline-fill][split-child=primary]) a,:host([appearance=outline][split-child=primary]) a{border-inline-end-width:0;border-inline-start-width:1px}:host([appearance=outline-fill][split-child=secondary]) button,:host([appearance=outline][split-child=secondary]) button,:host([appearance=outline-fill][split-child=secondary]) a,:host([appearance=outline][split-child=secondary]) a{border-inline-start-width:0;border-inline-end-width:1px}:host([appearance=transparent]){--calcite-internal-button-background-color: var(--calcite-color-transparent);--calcite-internal-button-background-color-hover: var(--calcite-color-transparent-hover);--calcite-internal-button-background-color-press: var(--calcite-color-transparent-press)}:host([appearance=transparent]:not(.enable-editing-button)){--calcite-internal-button-background-color-hover: var(--calcite-color-transparent-hover);--calcite-internal-button-background-color-press: var(--calcite-color-transparent-press)}:host([appearance=transparent][kind=brand]) button,:host([appearance=transparent][kind=brand]) a{--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=brand]) button:hover,:host([appearance=transparent][kind=brand]) a:hover{--calcite-internal-button-text-color: var(--calcite-color-brand-hover)}:host([appearance=transparent][kind=brand]) button:focus,:host([appearance=transparent][kind=brand]) a:focus{--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=brand]) button:active,:host([appearance=transparent][kind=brand]) a:active{--calcite-internal-button-text-color: var(--calcite-color-brand-press)}:host([appearance=transparent][kind=brand]) button calcite-loader,:host([appearance=transparent][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=danger]) button,:host([appearance=transparent][kind=danger]) a{--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=danger]) button:hover,:host([appearance=transparent][kind=danger]) a:hover{--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover)}:host([appearance=transparent][kind=danger]) button:focus,:host([appearance=transparent][kind=danger]) a:focus{--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=danger]) button:active,:host([appearance=transparent][kind=danger]) a:active{--calcite-internal-button-text-color: var(--calcite-color-status-danger-press)}:host([appearance=transparent][kind=danger]) button calcite-loader,:host([appearance=transparent][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) button,:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) a,:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) calcite-loader{--calcite-internal-button-text-color: var(--calcite-color-text-1)}:host([appearance=transparent][kind=neutral].cancel-editing-button) button{--calcite-internal-button-text-color: var(--calcite-color-text-3)}:host([appearance=transparent][kind=neutral].cancel-editing-button) button:hover{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-padding-y: 0}:host(.confirm-changes-button) button:focus,:host(.cancel-editing-button) button:focus,:host(.enable-editing-button) button:focus{outline-offset:-2px}:host([appearance=transparent][kind=inverse]){--calcite-internal-button-background-color-hover: var(--calcite-color-transparent-hover);--calcite-internal-button-background-color-press: var(--calcite-color-transparent-press)}:host([appearance=transparent][kind=inverse]) button calcite-loader,:host([appearance=transparent][kind=inverse]) a calcite-loader{--calcite-internal-button-text-color: var(--calcite-color-text-inverse)}:host([scale=s]) button.content--slotted,:host([scale=s]) a.content--slotted{font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm)}:host([scale=s][appearance=transparent]) button.content--slotted,:host([scale=s][appearance=transparent]) a.content--slotted{--calcite-internal-button-padding-x: .5rem}:host([scale=s]) button,:host([scale=s]) a{--calcite-internal-button-padding-y: 3px}:host([scale=m]) button.content--slotted,:host([scale=m]) a.content--slotted{--calcite-internal-button-padding-x: 11px;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base)}:host([scale=m]) button,:host([scale=m]) a{--calcite-internal-button-padding-y: 7px}:host([scale=m][appearance=transparent]) button.content--slotted,:host([scale=m][appearance=transparent]) a.content--slotted{--calcite-internal-button-padding-x: .75rem}:host([scale=l]) button.content--slotted,:host([scale=l]) a.content--slotted{--calcite-internal-button-padding-x: 15px;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([scale=l]) .button-padding{--calcite-internal-button-padding-x: 1rem;--calcite-internal-button-padding-y: 11px}:host([scale=l]) .button-padding--shrunk{--calcite-internal-button-padding-y: 9px}:host([scale=s]) button:not(.content--slotted),:host([scale=s]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y: 3px;inline-size:1.5rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);min-block-size:1.5rem}:host([scale=m]) button:not(.content--slotted),:host([scale=m]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y: 7px;inline-size:2rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);min-block-size:2rem}:host([scale=l]) button:not(.content--slotted),:host([scale=l]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y: 9px;inline-size:2.75rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);min-block-size:2.75rem}:host(:is([scale=s],[scale=m],[scale=l])[width=full]) a:not(.content--slotted),:host(:is([scale=s],[scale=m],[scale=l])[width=full]) button:not(.content--slotted){inline-size:var(--calcite-container-size-content-fluid)}:host([scale=l][appearance=transparent]) button:not(.content--slotted),:host([scale=l][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-y: var(--calcite-space-sm-plus)}:host([scale=s][icon-start][icon-end]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 23px;block-size:1.5rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([scale=s][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 1.5rem}:host([scale=m][icon-start][icon-end]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 2rem;block-size:2rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([scale=m][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 33px}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 43px;block-size:2.75rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted) .icon--start+.icon--end,:host([scale=l][icon-start][icon-end]) a:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:1rem}:host([scale=l][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 2.75rem}:host([hidden]){display:none}[hidden]{display:none}`;
|
|
31
31
|
class Button extends LitElement {
|
|
32
32
|
constructor() {
|
|
33
33
|
super(...arguments);
|
|
34
34
|
this.attributeWatch = useWatchAttributes(["aria-expanded"], this.handleGlobalAttributesChanged);
|
|
35
35
|
this.contentRef = createRef();
|
|
36
|
+
this.formTrigger = useFormTrigger({ disabled: () => !!this.href })(this);
|
|
36
37
|
this.mutationObserver = createObserver("mutation", () => this.updateHasContent());
|
|
37
38
|
this.resizeObserver = createObserver("resize", () => this.setTooltipText());
|
|
38
39
|
this.focusSetter = useSetFocus()(this);
|
|
@@ -54,6 +55,9 @@ class Button extends LitElement {
|
|
|
54
55
|
static {
|
|
55
56
|
this.properties = { hasContent: [16, {}, { state: true }], tooltipText: [16, {}, { state: true }], alignment: [3, {}, { reflect: true }], appearance: [3, {}, { reflect: true }], disabled: [7, {}, { reflect: true, type: Boolean }], download: [3, { converter: stringOrBoolean }, { reflect: true }], form: [3, {}, { reflect: true }], href: [3, {}, { reflect: true }], iconEnd: [3, { type: String }, { reflect: true }], iconFlipRtl: [3, {}, { reflect: true }], iconStart: [3, { type: String }, { reflect: true }], kind: [3, {}, { reflect: true }], label: 1, loading: [7, {}, { reflect: true, type: Boolean }], messageOverrides: [0, {}, { attribute: false }], name: [3, {}, { reflect: true }], rel: [3, {}, { reflect: true }], round: [7, {}, { reflect: true, type: Boolean }], scale: [3, {}, { reflect: true }], splitChild: [3, {}, { reflect: true }], target: [3, {}, { reflect: true }], type: [3, {}, { reflect: true }], width: [3, {}, { reflect: true }] };
|
|
56
57
|
}
|
|
58
|
+
static {
|
|
59
|
+
this.formAssociated = true;
|
|
60
|
+
}
|
|
57
61
|
static {
|
|
58
62
|
this.styles = styles;
|
|
59
63
|
}
|
|
@@ -64,12 +68,9 @@ class Button extends LitElement {
|
|
|
64
68
|
super.connectedCallback();
|
|
65
69
|
this.setupTextContentObserver();
|
|
66
70
|
connectLabel(this);
|
|
67
|
-
this.formEl = findAssociatedForm(this);
|
|
68
71
|
}
|
|
69
72
|
async load() {
|
|
70
|
-
|
|
71
|
-
this.updateHasContent();
|
|
72
|
-
}
|
|
73
|
+
this.updateHasContent();
|
|
73
74
|
}
|
|
74
75
|
loaded() {
|
|
75
76
|
this.setTooltipText();
|
|
@@ -79,7 +80,6 @@ class Button extends LitElement {
|
|
|
79
80
|
this.mutationObserver?.disconnect();
|
|
80
81
|
disconnectLabel(this);
|
|
81
82
|
this.resizeObserver?.disconnect();
|
|
82
|
-
this.formEl = null;
|
|
83
83
|
}
|
|
84
84
|
handleGlobalAttributesChanged() {
|
|
85
85
|
this.requestUpdate();
|
|
@@ -91,20 +91,8 @@ class Button extends LitElement {
|
|
|
91
91
|
this.mutationObserver?.observe(this.el, { childList: true, subtree: true });
|
|
92
92
|
}
|
|
93
93
|
onLabelClick() {
|
|
94
|
-
this.handleClick();
|
|
95
94
|
this.setFocus();
|
|
96
95
|
}
|
|
97
|
-
handleClick() {
|
|
98
|
-
const { type } = this;
|
|
99
|
-
if (this.href) {
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
if (type === "submit") {
|
|
103
|
-
submitForm(this);
|
|
104
|
-
} else if (type === "reset") {
|
|
105
|
-
resetForm(this);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
96
|
setTooltipText() {
|
|
109
97
|
const { contentRef: { value: contentEl } } = this;
|
|
110
98
|
if (contentEl) {
|
|
@@ -129,7 +117,7 @@ class Button extends LitElement {
|
|
|
129
117
|
[CSS.contentSlotted]: this.hasContent,
|
|
130
118
|
[CSS.iconStartEmpty]: !this.iconStart,
|
|
131
119
|
[CSS.iconEndEmpty]: !this.iconEnd
|
|
132
|
-
})} .disabled=${childElType === "button" ? this.disabled : null} download=${(childElType === "a" ? this.download === true || this.download === "" ? "" : this.download || null : null) ?? nothing} href=${(childElType === "a" && this.href) ?? nothing} name=${(childElType === "button" && this.name) ?? nothing}
|
|
120
|
+
})} .disabled=${childElType === "button" ? this.disabled : null} download=${(childElType === "a" ? this.download === true || this.download === "" ? "" : this.download || null : null) ?? nothing} href=${(childElType === "a" && this.href) ?? nothing} name=${(childElType === "button" && this.name) ?? nothing} rel=${(childElType === "a" && this.rel) ?? nothing} tabindex=${(this.disabled ? -1 : null) ?? nothing} target=${(childElType === "a" && this.target) ?? nothing} title=${this.tooltipText ?? nothing} type=${(childElType === "button" ? this.type : null) ?? nothing} ${ref(this.setChildEl)}>${loaderNode}${this.iconStart ? iconStartEl : null}${this.hasContent ? contentEl : null}${this.iconEnd ? iconEndEl : null}</${DynamicHtmlTag}>` });
|
|
133
121
|
}
|
|
134
122
|
}
|
|
135
123
|
customElement("calcite-button", Button);
|
|
@@ -9,11 +9,11 @@ import type { LogicalFlowPosition } from "../interfaces.js";
|
|
|
9
9
|
* @cssproperty [--calcite-card-corner-radius] - Specifies the component's corner radius.
|
|
10
10
|
* @cssproperty [--calcite-card-selection-background-color-hover] - Specifies the component's selection element background color when hovered.
|
|
11
11
|
* @cssproperty [--calcite-card-selection-background-color-press] - Specifies the component's selection element background color when active.
|
|
12
|
-
* @cssproperty [--calcite-card-selection-background-color] - [Deprecated] Use `--calcite-card-background-color
|
|
12
|
+
* @cssproperty [--calcite-card-selection-background-color] - [Deprecated] in v2.13.0, removal target v6.0.0 - Use `--calcite-card-background-color` instead. Specifies the component's selection element background color.
|
|
13
13
|
* @cssproperty [--calcite-card-selection-color-hover] - Specifies the component's selection element color when hovered or focused.
|
|
14
14
|
* @cssproperty [--calcite-card-selection-color] - Specifies the component's selection element color.
|
|
15
|
-
* @cssproperty [--calcite-card-selection-icon-color-hover] - [Deprecated] Use `--calcite-card-selection-color-hover
|
|
16
|
-
* @cssproperty [--calcite-card-selection-icon-color-selected] - [Deprecated] Use `--calcite-card-accent-color-selected
|
|
15
|
+
* @cssproperty [--calcite-card-selection-icon-color-hover] - [Deprecated] in v2.13.0, removal target v6.0.0 - Use `--calcite-card-selection-color-hover` instead. Specifies the component's selection element icon color when hovered.
|
|
16
|
+
* @cssproperty [--calcite-card-selection-icon-color-selected] - [Deprecated] in v2.13.0, removal target v6.0.0 - Use `--calcite-card-accent-color-selected` instead. Specifies the component's selection element icon color when `selected`.
|
|
17
17
|
* @cssproperty [--calcite-card-shadow] - Specifies the component's shadow.
|
|
18
18
|
* @slot - A slot for adding content.
|
|
19
19
|
* @slot [thumbnail] - A slot for adding a thumbnail.
|
|
@@ -65,7 +65,7 @@ export abstract class Card extends LitElement {
|
|
|
65
65
|
* Sets focus on the component.
|
|
66
66
|
*
|
|
67
67
|
* @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
|
|
68
|
-
* @
|
|
68
|
+
* @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
|
|
69
69
|
*/
|
|
70
70
|
setFocus(options?: FocusOptions): Promise<void>;
|
|
71
71
|
/** Fires when the deprecated `selectable` is true, or `selectionMode` set on parent `calcite-card-group` is not `none` and the component is selected. */
|
|
@@ -3,6 +3,7 @@ import { c as customElement } from "../../chunks/runtime.js";
|
|
|
3
3
|
import { css, html } from "lit";
|
|
4
4
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
5
5
|
import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
|
|
6
|
+
import { g as getIconScale } from "../../chunks/component.js";
|
|
6
7
|
import { s as slotChangeHasAssignedElement } from "../../chunks/dom.js";
|
|
7
8
|
import { i as isActivationKey } from "../../chunks/key.js";
|
|
8
9
|
import { u as useT9n } from "../../chunks/useT9n.js";
|
|
@@ -33,7 +34,7 @@ const ICONS = {
|
|
|
33
34
|
selectedSingle: "circle-f",
|
|
34
35
|
unselectedSingle: "circle"
|
|
35
36
|
};
|
|
36
|
-
const styles = css`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block;max-inline-size:100%}.content-wrapper{position:relative;display:flex;block-size:100%;flex-direction:column;justify-content:space-between;overflow:hidden;border:var(--calcite-border-width-sm) solid var(--calcite-card-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-card-corner-radius, var(--calcite-corner-radius-sharp));background-color:var(--calcite-card-background-color, var(--calcite-color-foreground-1));box-shadow:var(--calcite-card-shadow, var(--calcite-shadow-none));pointer-events:none}::slotted(*){pointer-events:auto}:host(:not([selectable])) .content-wrapper:not(.non-interactive){outline-color:transparent}:host(:not([selectable])) .content-wrapper:not(.non-interactive):focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.container{position:relative;display:flex;flex:1 1 auto;flex-direction:column}:host([loading]) .content-wrapper *:not(calcite-loader):not(.calcite-card-loader-container){pointer-events:none;opacity:0}:host([loading]) .calcite-card-loader-container{position:absolute;inset:0;display:flex;align-items:center}.header{display:flex;flex-direction:row;align-items:flex-start}.
|
|
37
|
+
const styles = css`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block;max-inline-size:100%}:host([scale=s]){--calcite-internal-card-header-text-container-padding-inline: var(--calcite-space-sm);--calcite-internal-card-header-text-container-padding-block: var(--calcite-space-xs);--calcite-internal-card-header-text-container-padding-right: 0;--calcite-internal-card-heading-font-size: var(--calcite-font-size-relative-sm);--calcite-internal-card-description-font-size: var(--calcite-font-size-relative-xs);--calcite-internal-card-checkbox-wrapper-padding: var(--calcite-space-xs);--calcite-internal-card-checkbox-wrapper-margin: var(--calcite-space-xs);--calcite-internal-card-slotted-content-padding: var(--calcite-space-sm);--calcite-internal-card-footer-padding-inline: var(--calcite-space-sm);--calcite-internal-card-footer-start-end-gap: var(--calcite-space-base)}:host([scale=m]){--calcite-internal-card-header-text-container-padding-inline: var(--calcite-space-md);--calcite-internal-card-header-text-container-padding-block: var(--calcite-space-sm);--calcite-internal-card-header-text-container-padding-right: var(--calcite-space-base);--calcite-internal-card-heading-font-size: var(--calcite-font-size-relative-base);--calcite-internal-card-description-font-size: var(--calcite-font-size-relative-sm);--calcite-internal-card-checkbox-wrapper-padding: var(--calcite-space-sm);--calcite-internal-card-checkbox-wrapper-margin: var(--calcite-space-sm);--calcite-internal-card-slotted-content-padding: var(--calcite-space-md);--calcite-internal-card-footer-padding-inline: var(--calcite-space-md);--calcite-internal-card-footer-start-end-gap: var(--calcite-space-2xs)}:host([scale=l]){--calcite-internal-card-header-text-container-padding-inline: var(--calcite-space-lg);--calcite-internal-card-header-text-container-padding-block: var(--calcite-space-md);--calcite-internal-card-header-text-container-padding-right: var(--calcite-space-xs);--calcite-internal-card-heading-font-size: var(--calcite-font-size-relative-md);--calcite-internal-card-description-font-size: var(--calcite-font-size-relative-base);--calcite-internal-card-checkbox-wrapper-padding: var(--calcite-space-md);--calcite-internal-card-checkbox-wrapper-margin: var(--calcite-space-md);--calcite-internal-card-slotted-content-padding: var(--calcite-space-lg);--calcite-internal-card-footer-padding-inline: var(--calcite-space-lg);--calcite-internal-card-footer-start-end-gap: var(--calcite-space-sm)}.content-wrapper{position:relative;display:flex;block-size:100%;flex-direction:column;justify-content:space-between;overflow:hidden;border:var(--calcite-border-width-sm) solid var(--calcite-card-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-card-corner-radius, var(--calcite-corner-radius-sharp));background-color:var(--calcite-card-background-color, var(--calcite-color-foreground-1));box-shadow:var(--calcite-card-shadow, var(--calcite-shadow-none));pointer-events:none}::slotted(*){pointer-events:auto}:host(:not([selectable])) .content-wrapper:not(.non-interactive){outline-color:transparent}:host(:not([selectable])) .content-wrapper:not(.non-interactive):focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.container{position:relative;display:flex;flex:1 1 auto;flex-direction:column}:host([loading]) .content-wrapper *:not(calcite-loader):not(.calcite-card-loader-container){pointer-events:none;opacity:0}:host([loading]) .calcite-card-loader-container{position:absolute;inset:0;display:flex;align-items:center}.header{display:flex;flex-direction:row;align-items:flex-start}.header-text-container{display:flex;flex-direction:column;inline-size:100%;justify-content:center;padding-inline:var(--calcite-internal-card-header-text-container-padding-inline);padding-block:var(--calcite-internal-card-header-text-container-padding-block)}.header-text-container:not(:only-child){padding-inline-end:var(--calcite-internal-card-header-text-container-padding-right)}.footer{display:flex;margin-block-start:auto;flex-direction:row;align-content:space-between;justify-content:space-between;padding-inline:var(--calcite-internal-card-footer-padding-inline);padding-block-start:var(--calcite-space-2xs);padding-block-end:var(--calcite-space-md)}.card-content{block-size:auto;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug)}.has-slotted-content{padding:var(--calcite-internal-card-slotted-content-padding)}:host([selected]) .content-wrapper{border:1px solid var(--calcite-card-accent-color-selected, var(--calcite-color-brand))}:host([selectable]) .header{padding-inline-end:var(--calcite-spacing-xxxl)}slot[name=heading]::slotted(*),*::slotted([slot=heading]){color:var(--calcite-color-text-1);margin:0;font-weight:var(--calcite-font-weight-medium);line-height:var(--calcite-font-line-height-relative-snug);font-size:var(--calcite-internal-card-heading-font-size)}slot[name=description]::slotted(*),*::slotted([slot=description]){color:var(--calcite-color-text-2);margin:0;font-weight:var(--calcite-font-weight-normal);line-height:var(--calcite-font-line-height-relative-snug);font-size:var(--calcite-internal-card-description-font-size)}slot[name=thumbnail]::slotted(img),img::slotted([slot=thumbnail]){min-inline-size:100%;max-inline-size:100%}slot[name=footer-start]::slotted(*),*::slotted([slot=footer-start]){align-self:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);margin-inline-end:auto}slot[name=footer-end]::slotted(*),*::slotted([slot=footer-end]){align-self:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug)}.checkbox-wrapper-deprecated{pointer-events:auto;position:absolute;inset-block-start:var(--calcite-spacing-sm);inset-inline-end:var(--calcite-spacing-sm);margin:0;padding:0;color:var(--calcite-card-selection-color, var(--calcite-color-text-3))}.checkbox-wrapper-deprecated:hover{background-color:var(--calcite-card-selection-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-card-selection-color-hover, var(--calcite-card-selection-icon-color-hover, var(--calcite-color-text-2)))}.checkbox-wrapper-deprecated:active{background-color:var(--calcite-card-selection-background-color-press, var(--calcite-color-transparent-press))}.checkbox-wrapper{outline-color:transparent;cursor:pointer;pointer-events:auto;display:flex;align-items:center;justify-items:center;color:var(--calcite-card-selection-color, var(--calcite-color-text-3));padding:var(--calcite-internal-card-checkbox-wrapper-padding);margin:var(--calcite-internal-card-checkbox-wrapper-margin)}.checkbox-wrapper:hover{background-color:var(--calcite-card-selection-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-card-selection-color-hover, var(--calcite-card-selection-icon-color-hover, var(--calcite-color-text-2)))}.checkbox-wrapper:active{background-color:var(--calcite-card-selection-background-color-press, var(--calcite-color-transparent-press))}.checkbox-wrapper calcite-icon{pointer-events:none}:host([selected]) .checkbox-wrapper-deprecated,:host([selected]) .checkbox-wrapper{color:var(--calcite-card-accent-color-selected, var(--calcite-card-selection-icon-color-selected, var(--calcite-color-brand)))}:host(:not([selectable])) .content-wrapper:not(.non-interactive):focus .checkbox-wrapper-deprecated,:host(:not([selectable])) .content-wrapper:not(.non-interactive):focus .checkbox-wrapper{background-color:var(--calcite-card-selection-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-card-selection-color-hover, var(--calcite-card-selection-icon-color-hover, var(--calcite-color-text-2)))}:host([selected]:not([selectable])) .content-wrapper:not(.non-interactive):focus .checkbox-wrapper-deprecated,:host([selected]:not([selectable])) .content-wrapper:not(.non-interactive):focus .checkbox-wrapper{background-color:var(--calcite-card-selection-background-color-press, var(--calcite-color-transparent-press));color:var(--calcite-card-accent-color-selected, var(--calcite-card-selection-icon-color-selected, var(--calcite-color-brand)))}.thumbnail-wrapper{display:flex}.content-wrapper.inline{flex-direction:row}.content-wrapper.inline>.container{inline-size:60%}.content-wrapper.inline>.thumbnail-wrapper{inline-size:40%;align-items:flex-start}.content-wrapper.inline slot[name=thumbnail]::slotted(img),.content-wrapper.inline img::slotted([slot=thumbnail]){inline-size:100%}slot[name=footer-start]::slotted(*),slot[name=footer-end]::slotted(*){display:flex;gap:var(--calcite-internal-card-footer-start-end-gap)}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`;
|
|
37
38
|
class Card extends LitElement {
|
|
38
39
|
constructor() {
|
|
39
40
|
super(...arguments);
|
|
@@ -49,6 +50,7 @@ class Card extends LitElement {
|
|
|
49
50
|
this.hasThumbnail = false;
|
|
50
51
|
this.disabled = false;
|
|
51
52
|
this.loading = false;
|
|
53
|
+
this.scale = "m";
|
|
52
54
|
this.selectable = false;
|
|
53
55
|
this.selected = false;
|
|
54
56
|
this.selectionMode = "none";
|
|
@@ -57,7 +59,7 @@ class Card extends LitElement {
|
|
|
57
59
|
this.calciteInternalCardKeyEvent = createEvent({ cancelable: false });
|
|
58
60
|
}
|
|
59
61
|
static {
|
|
60
|
-
this.properties = { hasContent: [16, {}, { state: true }], hasDescription: [16, {}, { state: true }], hasFooterEnd: [16, {}, { state: true }], hasFooterStart: [16, {}, { state: true }], hasHeading: [16, {}, { state: true }], hasThumbnail: [16, {}, { state: true }], disabled: [7, {}, { reflect: true, type: Boolean }], label: 1, loading: [7, {}, { reflect: true, type: Boolean }], messageOverrides: [0, {}, { attribute: false }], selectable: [7, {}, { reflect: true, type: Boolean }], selected: [7, {}, { reflect: true, type: Boolean }], selectionMode: 1, thumbnailPosition: [3, {}, { reflect: true }] };
|
|
62
|
+
this.properties = { hasContent: [16, {}, { state: true }], hasDescription: [16, {}, { state: true }], hasFooterEnd: [16, {}, { state: true }], hasFooterStart: [16, {}, { state: true }], hasHeading: [16, {}, { state: true }], hasThumbnail: [16, {}, { state: true }], disabled: [7, {}, { reflect: true, type: Boolean }], label: 1, loading: [7, {}, { reflect: true, type: Boolean }], messageOverrides: [0, {}, { attribute: false }], scale: [3, {}, { reflect: true }], selectable: [7, {}, { reflect: true, type: Boolean }], selected: [7, {}, { reflect: true, type: Boolean }], selectionMode: 1, thumbnailPosition: [3, {}, { reflect: true }] };
|
|
61
63
|
}
|
|
62
64
|
static {
|
|
63
65
|
this.styles = styles;
|
|
@@ -126,7 +128,7 @@ class Card extends LitElement {
|
|
|
126
128
|
}
|
|
127
129
|
renderSelectionIcon() {
|
|
128
130
|
const icon = this.selectionMode === "multiple" && this.selected ? ICONS.selected : this.selectionMode === "multiple" ? ICONS.unselected : this.selected ? ICONS.selectedSingle : ICONS.unselectedSingle;
|
|
129
|
-
return html`<div class=${safeClassMap(CSS.checkboxWrapper)} @pointerdown=${this.cardSelectClick} tabindex=-1><calcite-icon .icon=${icon} scale
|
|
131
|
+
return html`<div class=${safeClassMap(CSS.checkboxWrapper)} @pointerdown=${this.cardSelectClick} tabindex=-1><calcite-icon .icon=${icon} .scale=${getIconScale(this.scale)}></calcite-icon></div>`;
|
|
130
132
|
}
|
|
131
133
|
renderHeader() {
|
|
132
134
|
const showHeader = this.hasHeading || this.hasDescription;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference path="../../index.d.ts" />
|
|
2
2
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
|
-
import type { SelectionMode } from "../interfaces.js";
|
|
3
|
+
import type { Scale, SelectionMode } from "../interfaces.js";
|
|
4
4
|
import type { Card } from "../calcite-card/customElement.js";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* @cssproperty [--calcite-card-group-gap] - [Deprecated] Use `--calcite-card-group-space
|
|
7
|
+
* @cssproperty [--calcite-card-group-gap] - [Deprecated] in v2.13.0, removal target v6.0.0 - Use `--calcite-card-group-space` instead. Specifies the gap between slotted elements.
|
|
8
8
|
* @cssproperty [--calcite-card-group-space] - Specifies the space between slotted elements.
|
|
9
9
|
* @slot - A slot for adding one or more `calcite-card`s.
|
|
10
10
|
*/
|
|
@@ -21,6 +21,12 @@ export abstract class CardGroup extends LitElement {
|
|
|
21
21
|
* @required
|
|
22
22
|
*/
|
|
23
23
|
accessor label: string;
|
|
24
|
+
/**
|
|
25
|
+
* Specifies the size of the component.
|
|
26
|
+
*
|
|
27
|
+
* @default "m"
|
|
28
|
+
*/
|
|
29
|
+
accessor scale: Scale;
|
|
24
30
|
/** Specifies the component's selected items. */
|
|
25
31
|
get selectedItems(): Card[];
|
|
26
32
|
/**
|
|
@@ -33,7 +39,7 @@ export abstract class CardGroup extends LitElement {
|
|
|
33
39
|
* Sets focus on the component's first focusable element.
|
|
34
40
|
*
|
|
35
41
|
* @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
|
|
36
|
-
* @
|
|
42
|
+
* @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
|
|
37
43
|
*/
|
|
38
44
|
setFocus(options?: FocusOptions): Promise<void>;
|
|
39
45
|
/** Fires when the component's selection changes and the `selectionMode` is not `none`. */
|
|
@@ -18,6 +18,7 @@ class CardGroup extends LitElement {
|
|
|
18
18
|
this.focusSetter = useSetFocus()(this);
|
|
19
19
|
this.interactiveContainer = useInteractive(this);
|
|
20
20
|
this.disabled = false;
|
|
21
|
+
this.scale = "m";
|
|
21
22
|
this.selectedItems = [];
|
|
22
23
|
this.selectionMode = "none";
|
|
23
24
|
this.calciteCardGroupSelect = createEvent({ cancelable: false });
|
|
@@ -25,7 +26,7 @@ class CardGroup extends LitElement {
|
|
|
25
26
|
this.listen("calciteCardSelect", this.calciteCardSelectListener);
|
|
26
27
|
}
|
|
27
28
|
static {
|
|
28
|
-
this.properties = { disabled: [7, {}, { reflect: true, type: Boolean }], label: 1, selectedItems: [0, {}, { attribute: false }], selectionMode: [3, {}, { reflect: true }] };
|
|
29
|
+
this.properties = { disabled: [7, {}, { reflect: true, type: Boolean }], label: 1, scale: [3, {}, { reflect: true }], selectedItems: [0, {}, { attribute: false }], selectionMode: [3, {}, { reflect: true }] };
|
|
29
30
|
}
|
|
30
31
|
static {
|
|
31
32
|
this.styles = styles;
|
|
@@ -37,6 +38,9 @@ class CardGroup extends LitElement {
|
|
|
37
38
|
if (changes.has("selectionMode") && this.hasUpdated) {
|
|
38
39
|
this.updateItemsOnSelectionModeChange();
|
|
39
40
|
}
|
|
41
|
+
if (changes.has("scale") && (this.hasUpdated || this.scale !== "m")) {
|
|
42
|
+
this.updateItemsScale();
|
|
43
|
+
}
|
|
40
44
|
}
|
|
41
45
|
loaded() {
|
|
42
46
|
this.updateSelectedItems();
|
|
@@ -72,10 +76,16 @@ class CardGroup extends LitElement {
|
|
|
72
76
|
updateItemsOnSlotChange(event) {
|
|
73
77
|
this.updateSlottedItems(event.target);
|
|
74
78
|
this.updateSelectedItems();
|
|
79
|
+
this.updateItemsScale();
|
|
75
80
|
}
|
|
76
81
|
updateSlottedItems(target) {
|
|
77
82
|
this.items = target?.assignedElements({ flatten: true }).filter((el) => el?.matches("calcite-card")) || [];
|
|
78
83
|
}
|
|
84
|
+
updateItemsScale() {
|
|
85
|
+
this.items.forEach((el) => {
|
|
86
|
+
el.scale = this.scale;
|
|
87
|
+
});
|
|
88
|
+
}
|
|
79
89
|
updateSelectedItems() {
|
|
80
90
|
this.items.forEach((el) => {
|
|
81
91
|
el.selectionMode = this.selectionMode;
|
|
@@ -78,7 +78,7 @@ export abstract class Carousel extends LitElement {
|
|
|
78
78
|
* Sets focus on the component.
|
|
79
79
|
*
|
|
80
80
|
* @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
|
|
81
|
-
* @
|
|
81
|
+
* @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
|
|
82
82
|
*/
|
|
83
83
|
setFocus(options?: FocusOptions): Promise<void>;
|
|
84
84
|
/** Stops the carousel. If `autoplay` is not enabled (initialized either to `true` or `"paused"`), these methods will have no effect. */
|
|
@@ -4,7 +4,8 @@ import { repeat } from "lit/directives/repeat.js";
|
|
|
4
4
|
import { css, nothing, html } from "lit";
|
|
5
5
|
import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
|
|
6
6
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
7
|
-
import {
|
|
7
|
+
import { useDirection } from "@arcgis/lumina/controllers";
|
|
8
|
+
import { w as whenAnimationDone, a as slotChangeGetAssignedElements, f as focusElementInGroup } from "../../chunks/dom.js";
|
|
8
9
|
import { g as guid } from "../../chunks/guid.js";
|
|
9
10
|
import { c as createObserver } from "../../chunks/observers.js";
|
|
10
11
|
import { b as breakpoints } from "../../chunks/responsive.js";
|
|
@@ -63,6 +64,7 @@ class Carousel extends LitElement {
|
|
|
63
64
|
};
|
|
64
65
|
this.containerRef = createRef();
|
|
65
66
|
this.containerId = IDS.host(guid());
|
|
67
|
+
this.direction = useDirection();
|
|
66
68
|
this.itemContainerRef = createRef();
|
|
67
69
|
this.resizeHandler = ({ contentRect: { width } }) => {
|
|
68
70
|
this.setMaxItemsToBreakpoint(width);
|
|
@@ -77,7 +79,7 @@ class Carousel extends LitElement {
|
|
|
77
79
|
if (notSuspended) {
|
|
78
80
|
if (time <= 0.01) {
|
|
79
81
|
time = 1;
|
|
80
|
-
this.
|
|
82
|
+
this.itemDirection = "forward";
|
|
81
83
|
this.nextItem(false);
|
|
82
84
|
} else {
|
|
83
85
|
time = time - 0.01;
|
|
@@ -90,7 +92,7 @@ class Carousel extends LitElement {
|
|
|
90
92
|
this.messages = useT9n();
|
|
91
93
|
this.focusSetter = useSetFocus()(this);
|
|
92
94
|
this.interactiveContainer = useInteractive(this);
|
|
93
|
-
this.
|
|
95
|
+
this.itemDirection = "standby";
|
|
94
96
|
this.hasMultiple = false;
|
|
95
97
|
this.items = [];
|
|
96
98
|
this.maxItems = centerItemsByBreakpoint.xxsmall;
|
|
@@ -113,7 +115,7 @@ class Carousel extends LitElement {
|
|
|
113
115
|
this.calciteCarouselStop = createEvent({ cancelable: false });
|
|
114
116
|
}
|
|
115
117
|
static {
|
|
116
|
-
this.properties = {
|
|
118
|
+
this.properties = { itemDirection: [16, {}, { state: true }], hasMultiple: [16, {}, { state: true }], items: [16, {}, { state: true }], maxItems: [16, {}, { state: true }], playing: [16, {}, { state: true }], selectedIndex: [16, {}, { state: true }], slideDurationRemaining: [16, {}, { state: true }], suspendedDueToFocus: [16, {}, { state: true }], suspendedDueToHover: [16, {}, { state: true }], suspendedSlideDurationRemaining: [16, {}, { state: true }], userPreventsSuspend: [16, {}, { state: true }], arrowType: [3, {}, { reflect: true }], autoplay: [3, {}, { reflect: true }], autoplayDuration: [11, {}, { type: Number, reflect: true }], controlOverlay: [7, {}, { reflect: true, type: Boolean }], disabled: [7, {}, { reflect: true, type: Boolean }], label: 1, messageOverrides: [0, {}, { attribute: false }], paginationDisabled: [5, {}, { type: Boolean }], paused: [5, {}, { type: Boolean }], selectedItem: [0, {}, { attribute: false }] };
|
|
117
119
|
}
|
|
118
120
|
static {
|
|
119
121
|
this.styles = styles;
|
|
@@ -151,8 +153,8 @@ class Carousel extends LitElement {
|
|
|
151
153
|
if (changes.has("autoplay") && this.hasUpdated) {
|
|
152
154
|
this.autoplayWatcher(this.autoplay);
|
|
153
155
|
}
|
|
154
|
-
if (changes.has("
|
|
155
|
-
this.
|
|
156
|
+
if (changes.has("itemDirection") && (this.hasUpdated || this.itemDirection !== "standby")) {
|
|
157
|
+
this.itemDirectionWatcher(this.itemDirection);
|
|
156
158
|
}
|
|
157
159
|
if (changes.has("playing") && (this.hasUpdated || this.playing !== false)) {
|
|
158
160
|
this.paused = !this.playing;
|
|
@@ -171,12 +173,12 @@ class Carousel extends LitElement {
|
|
|
171
173
|
this.handlePause(false);
|
|
172
174
|
}
|
|
173
175
|
}
|
|
174
|
-
async
|
|
175
|
-
if (
|
|
176
|
+
async itemDirectionWatcher(itemDirection) {
|
|
177
|
+
if (itemDirection === "standby" || !this.itemContainerRef.value) {
|
|
176
178
|
return;
|
|
177
179
|
}
|
|
178
|
-
await whenAnimationDone(this.itemContainerRef.value,
|
|
179
|
-
this.
|
|
180
|
+
await whenAnimationDone(this.itemContainerRef.value, itemDirection === "forward" ? "item-forward" : "item-backward");
|
|
181
|
+
this.itemDirection = "standby";
|
|
180
182
|
}
|
|
181
183
|
suspendWatcher() {
|
|
182
184
|
if (!this.suspendedDueToFocus && !this.suspendedDueToHover) {
|
|
@@ -271,15 +273,15 @@ class Carousel extends LitElement {
|
|
|
271
273
|
}
|
|
272
274
|
}
|
|
273
275
|
handleArrowClick(event) {
|
|
274
|
-
const direction = event.target.dataset.
|
|
276
|
+
const direction = event.target.dataset.itemDirection;
|
|
275
277
|
if (this.playing) {
|
|
276
278
|
this.handlePause(true);
|
|
277
279
|
}
|
|
278
280
|
if (direction === "next") {
|
|
279
|
-
this.
|
|
281
|
+
this.itemDirection = "forward";
|
|
280
282
|
this.nextItem(true);
|
|
281
283
|
} else if (direction === "previous") {
|
|
282
|
-
this.
|
|
284
|
+
this.itemDirection = "backward";
|
|
283
285
|
this.previousItem();
|
|
284
286
|
}
|
|
285
287
|
}
|
|
@@ -292,7 +294,7 @@ class Carousel extends LitElement {
|
|
|
292
294
|
if (this.playing) {
|
|
293
295
|
this.handlePause(true);
|
|
294
296
|
}
|
|
295
|
-
this.
|
|
297
|
+
this.itemDirection = requestedPosition > this.selectedIndex ? "forward" : "backward";
|
|
296
298
|
this.setSelectedItem(requestedPosition, true);
|
|
297
299
|
}
|
|
298
300
|
toggleRotation() {
|
|
@@ -361,7 +363,7 @@ class Carousel extends LitElement {
|
|
|
361
363
|
if (!this.hasMultiple) {
|
|
362
364
|
return;
|
|
363
365
|
}
|
|
364
|
-
this.
|
|
366
|
+
this.itemDirection = "forward";
|
|
365
367
|
this.nextItem(true);
|
|
366
368
|
break;
|
|
367
369
|
case "ArrowLeft":
|
|
@@ -369,7 +371,7 @@ class Carousel extends LitElement {
|
|
|
369
371
|
if (!this.hasMultiple) {
|
|
370
372
|
return;
|
|
371
373
|
}
|
|
372
|
-
this.
|
|
374
|
+
this.itemDirection = "backward";
|
|
373
375
|
this.previousItem();
|
|
374
376
|
break;
|
|
375
377
|
case "Home":
|
|
@@ -377,7 +379,7 @@ class Carousel extends LitElement {
|
|
|
377
379
|
if (this.selectedIndex === 0) {
|
|
378
380
|
return;
|
|
379
381
|
}
|
|
380
|
-
this.
|
|
382
|
+
this.itemDirection = "backward";
|
|
381
383
|
this.setSelectedItem(0, true);
|
|
382
384
|
break;
|
|
383
385
|
case "End":
|
|
@@ -385,7 +387,7 @@ class Carousel extends LitElement {
|
|
|
385
387
|
if (this.selectedIndex === lastItem) {
|
|
386
388
|
return;
|
|
387
389
|
}
|
|
388
|
-
this.
|
|
390
|
+
this.itemDirection = "forward";
|
|
389
391
|
this.setSelectedItem(lastItem, true);
|
|
390
392
|
break;
|
|
391
393
|
}
|
|
@@ -462,25 +464,25 @@ class Carousel extends LitElement {
|
|
|
462
464
|
};
|
|
463
465
|
return html`<div aria-live=off class=${safeClassMap(CSS.paginationAriaLive)} role=status>${messages.paginationStatus.replace("{current}", numberStringFormatter.localize(`${selectedIndex + 1}`)).replace("{total}", numberStringFormatter.localize(`${items.length}`))}</div>`;
|
|
464
466
|
}
|
|
465
|
-
renderArrow(
|
|
466
|
-
const isPrev =
|
|
467
|
-
const dir =
|
|
467
|
+
renderArrow(itemDirection) {
|
|
468
|
+
const isPrev = itemDirection === "previous";
|
|
469
|
+
const dir = this.direction;
|
|
468
470
|
const scale = this.arrowType === "edge" ? "m" : "s";
|
|
469
471
|
const css2 = isPrev ? CSS.pagePrevious : CSS.pageNext;
|
|
470
472
|
const title = isPrev ? this.messages.previous : this.messages.next;
|
|
471
473
|
const icon = isPrev ? ICONS.chevronLeft : ICONS.chevronRight;
|
|
472
|
-
return html`<button aria-controls=${this.containerId ?? nothing} class=${safeClassMap({ [CSS.paginationItem]: true, [css2]: true })} data-direction=${
|
|
474
|
+
return html`<button aria-controls=${this.containerId ?? nothing} class=${safeClassMap({ [CSS.paginationItem]: true, [css2]: true })} data-item-direction=${itemDirection ?? nothing} @click=${this.handleArrowClick} title=${title ?? nothing}><calcite-icon .flipRtl=${dir === "rtl"} .icon=${icon} .scale=${scale}></calcite-icon></button>`;
|
|
473
475
|
}
|
|
474
476
|
render() {
|
|
475
|
-
const {
|
|
477
|
+
const { itemDirection } = this;
|
|
476
478
|
return this.interactiveContainer({ disabled: this.disabled, children: html`<div .ariaLabel=${this.label} .ariaLive=${this.playing ? "off" : "polite"} .ariaRoleDescription=${this.messages.carousel} class=${safeClassMap({
|
|
477
479
|
[CSS.container]: true,
|
|
478
480
|
[CSS.containerOverlaid]: this.controlOverlay,
|
|
479
481
|
[CSS.containerEdged]: this.arrowType === "edge"
|
|
480
482
|
})} @focusin=${this.handleFocusIn} @focusout=${this.handleFocusOut} @keydown=${this.containerKeyDownHandler} @mouseenter=${this.handleMouseIn} @mouseleave=${this.handleMouseOut} role=group tabindex=0 ${ref(this.containerRef)}><section class=${safeClassMap({
|
|
481
483
|
[CSS.itemContainer]: true,
|
|
482
|
-
[CSS.itemContainerForward]:
|
|
483
|
-
[CSS.itemContainerBackward]:
|
|
484
|
+
[CSS.itemContainerForward]: itemDirection === "forward",
|
|
485
|
+
[CSS.itemContainerBackward]: itemDirection === "backward"
|
|
484
486
|
})} id=${this.containerId ?? nothing} ${ref(this.itemContainerRef)}><slot @slotchange=${this.handleSlotChange}></slot></section>${this.renderPaginationArea()}${this.arrowType === "edge" && this.hasMultiple && this.renderArrow("previous") || ""}${this.arrowType === "edge" && this.hasMultiple && this.renderArrow("next") || ""}</div>` });
|
|
485
487
|
}
|
|
486
488
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference path="../../index.d.ts" />
|
|
2
2
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
|
-
import type { MutableValidityState } from "../../utils/form.js";
|
|
4
3
|
import type { Scale, Status } from "../interfaces.js";
|
|
5
4
|
|
|
6
5
|
/**
|
|
@@ -35,7 +34,7 @@ export abstract class Checkbox extends LitElement {
|
|
|
35
34
|
* The state is visual only, and can look different across browsers.
|
|
36
35
|
*
|
|
37
36
|
* @default false
|
|
38
|
-
* @
|
|
37
|
+
* @see [MDN - indeterminate](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#indeterminate_state_checkboxes)
|
|
39
38
|
*/
|
|
40
39
|
accessor indeterminate: boolean;
|
|
41
40
|
/** Specifies an accessible label for the component. */
|
|
@@ -68,16 +67,16 @@ export abstract class Checkbox extends LitElement {
|
|
|
68
67
|
/**
|
|
69
68
|
* The component's current validation state.
|
|
70
69
|
*
|
|
71
|
-
* @
|
|
70
|
+
* @see [MDN - ValidityState](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)
|
|
72
71
|
*/
|
|
73
|
-
get validity():
|
|
72
|
+
get validity(): ValidityState;
|
|
74
73
|
/** The component's value. */
|
|
75
74
|
accessor value: any;
|
|
76
75
|
/**
|
|
77
76
|
* Sets focus on the component.
|
|
78
77
|
*
|
|
79
78
|
* @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
|
|
80
|
-
* @
|
|
79
|
+
* @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
|
|
81
80
|
*/
|
|
82
81
|
setFocus(options?: FocusOptions): Promise<void>;
|
|
83
82
|
/** Fires when the component's `checked` status changes. */
|