@esri/calcite-components 5.2.0-next.2 → 5.2.0-next.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cdn/{QXVZRQDN.js → 24XW36XW.js} +1 -1
- package/dist/cdn/{GNF44UQG.js → 2BIW77FS.js} +1 -1
- package/dist/cdn/{IOBH7Q3C.js → 2CPNDRJN.js} +1 -1
- package/dist/cdn/{V3ADMKIU.js → 2GFEIPYA.js} +1 -1
- package/dist/cdn/{DJIJFKYH.js → 2GIYJ5S4.js} +1 -1
- package/dist/cdn/{ENNOBBY4.js → 2NVBHC4D.js} +1 -1
- package/dist/cdn/2OKTIK5P.js +2 -0
- package/dist/cdn/{YL4XYPPL.js → 2WTFQ6VU.js} +1 -1
- package/dist/cdn/{TD2P54UR.js → 3AZFSAZW.js} +1 -1
- package/dist/cdn/{SVEPQ765.js → 3GYZZNF6.js} +1 -1
- package/dist/cdn/{R2DOA2MN.js → 3VTWLNYM.js} +1 -1
- package/dist/cdn/{W7DJIM2F.js → 3W6YYTUS.js} +1 -1
- package/dist/cdn/{J32XKCXC.js → 44WTMUOU.js} +1 -1
- package/dist/cdn/{RC3UVUK3.js → 4ENZX7JD.js} +1 -1
- package/dist/cdn/{FPVMYG6A.js → 4XXCMSYK.js} +1 -1
- package/dist/cdn/{4PN5ZOFS.js → 5BRHCY56.js} +1 -1
- package/dist/cdn/{FEMVD7MC.js → 5F5N45N2.js} +1 -1
- package/dist/cdn/{JW2SKWED.js → 5HQW2B4L.js} +1 -1
- package/dist/cdn/{XR4GGZRV.js → 5J5YPAQF.js} +1 -1
- package/dist/cdn/{XNAMWMN5.js → 5MJOA2EC.js} +1 -1
- package/dist/cdn/{KZUHKTIQ.js → 5Z6Y27PN.js} +1 -1
- package/dist/cdn/{7JMYJBWS.js → 6M54QVXX.js} +1 -1
- package/dist/cdn/{6A4WSEWS.js → 7CTKDBNP.js} +1 -1
- package/dist/cdn/{WYJ5MJ5T.js → 7KZDKRE5.js} +1 -1
- package/dist/cdn/{CC6MIBOX.js → AC3VJGBR.js} +1 -1
- package/dist/cdn/{5EY2EEDX.js → AH2ILKOU.js} +1 -1
- package/dist/cdn/{T5VR3PV2.js → ARJXIE5E.js} +1 -1
- package/dist/cdn/{AV53YUYO.js → AV2KGCM3.js} +1 -1
- package/dist/cdn/{BDJAXYZ6.js → B255QVJJ.js} +1 -1
- package/dist/cdn/{BUNBY5RM.js → BC2RGQAT.js} +1 -1
- package/dist/cdn/{TWT5XRCW.js → BKETK56P.js} +1 -1
- package/dist/cdn/{RQVOT4ZO.js → BQXZQXDH.js} +1 -1
- package/dist/cdn/{GLH6ZAVP.js → BUA4VQLY.js} +1 -1
- package/dist/cdn/{N7DI6G6M.js → BXPPKXA4.js} +1 -1
- package/dist/cdn/C5UFPB7M.js +2 -0
- package/dist/cdn/{U5IWCBXE.js → C7G4TGZX.js} +1 -1
- package/dist/cdn/{KQN3IXDE.js → CARY3C4R.js} +1 -1
- package/dist/cdn/{B34QFBVX.js → CCXEESJV.js} +1 -1
- package/dist/cdn/{BETERP4W.js → CF6R3CEF.js} +1 -1
- package/dist/cdn/CHVPHDET.js +2 -0
- package/dist/cdn/{YEFCURY4.js → CKNWJGRW.js} +1 -1
- package/dist/cdn/CMY74TQR.js +2 -0
- package/dist/cdn/{EGQ75QVP.js → CORQ5EDZ.js} +1 -1
- package/dist/cdn/{RXXRSLAB.js → CP4Z56ZR.js} +1 -1
- package/dist/cdn/{MSB35HIA.js → CTLPGOB7.js} +1 -1
- package/dist/cdn/{A2QVKNTN.js → CYYQXD64.js} +1 -1
- package/dist/cdn/{3FH6QU7Y.js → D7PUB2VW.js} +1 -1
- package/dist/cdn/{JQVKQIWK.js → DFHWYAUO.js} +1 -1
- package/dist/cdn/{TE3IGQZH.js → DGXWUFHV.js} +1 -1
- package/dist/cdn/{4CHUXMKI.js → DM5PCYTC.js} +1 -1
- package/dist/cdn/{43MK3FDM.js → DYLGNP2R.js} +1 -1
- package/dist/cdn/{DJL42XA3.js → EPBMP22J.js} +1 -1
- package/dist/cdn/{QNSEEZF5.js → EW27G33J.js} +1 -1
- package/dist/cdn/{6WR7WF5X.js → EWIM5HH4.js} +1 -1
- package/dist/cdn/{LZDIBXYZ.js → F2DLFMMQ.js} +1 -1
- package/dist/cdn/{PKAYPMQL.js → FSYJWUBV.js} +1 -1
- package/dist/cdn/{ATPHVTBE.js → FWMASCBJ.js} +1 -1
- package/dist/cdn/{FVB2OZEH.js → G2WKLE63.js} +1 -1
- package/dist/cdn/{XZJNPGQT.js → GBYDFEYR.js} +1 -1
- package/dist/cdn/{W7BKEQCB.js → GCQOLCYX.js} +1 -1
- package/dist/cdn/{GUSPFAZS.js → GLB7VDX7.js} +1 -1
- package/dist/cdn/{KVWHPPP5.js → GWO7M4CB.js} +1 -1
- package/dist/cdn/{D6PPMEQM.js → HHOCH2WQ.js} +1 -1
- package/dist/cdn/{GGCO6DJE.js → HPI37X3H.js} +1 -1
- package/dist/cdn/HUHXPX4S.js +2 -0
- package/dist/cdn/{UOQXEKIF.js → I2YZCTNB.js} +1 -1
- package/dist/cdn/I62TONNU.js +2 -0
- package/dist/cdn/{HBRGGPQS.js → IC76575N.js} +1 -1
- package/dist/cdn/{SU44IFYE.js → IKJKNZRO.js} +1 -1
- package/dist/cdn/{QLMCMCFN.js → IOQX4VTU.js} +1 -1
- package/dist/cdn/{QIW2VXWS.js → IWFPWFJR.js} +1 -1
- package/dist/cdn/{QXIJOBKX.js → JACGCENG.js} +1 -1
- package/dist/cdn/{F25HCCSH.js → JJRBBNII.js} +1 -1
- package/dist/cdn/{UMHABPZB.js → JL6EDIGB.js} +1 -1
- package/dist/cdn/{CYCLHZ3A.js → JMOU4F7W.js} +1 -1
- package/dist/cdn/{7Q57OJ6S.js → JNWSTJU6.js} +1 -1
- package/dist/cdn/{IJZH5BV3.js → JOSZJ4U5.js} +1 -1
- package/dist/cdn/JXHQEAMO.js +2 -0
- package/dist/cdn/{2RCOMSJ4.js → KAINKHTB.js} +1 -1
- package/dist/cdn/{GBNEJ7ZF.js → L4565LYV.js} +1 -1
- package/dist/cdn/{SVIANZ3V.js → L7ZU6UHP.js} +1 -1
- package/dist/cdn/{YAQRXHHQ.js → LQPCOJZC.js} +1 -1
- package/dist/cdn/{G4ZSDWUZ.js → MFPSZIXT.js} +1 -1
- package/dist/cdn/{AA7ZRB5K.js → MHDQTRTS.js} +1 -1
- package/dist/cdn/{2AZU4JLL.js → MU324X7S.js} +1 -1
- package/dist/cdn/{B5M44JJO.js → N5DDKO3N.js} +1 -1
- package/dist/cdn/{MIE7SGGW.js → NKZDXCA3.js} +1 -1
- package/dist/cdn/{GBGFI7SS.js → NNVS72ZQ.js} +1 -1
- package/dist/cdn/{KPR7F2IQ.js → NO2IBH5N.js} +1 -1
- package/dist/cdn/{2U7LTQ5E.js → NTTXPITY.js} +1 -1
- package/dist/cdn/NUPS67PK.js +2 -0
- package/dist/cdn/{AOWO3CEE.js → NY4L6FEN.js} +1 -1
- package/dist/cdn/{JL5V6LHI.js → O7X3EP3R.js} +1 -1
- package/dist/cdn/{KQ322MPA.js → OGL4GEZF.js} +1 -1
- package/dist/cdn/{GOBJFJO6.js → OH6YFLLX.js} +1 -1
- package/dist/cdn/{MNBJJORH.js → P6AYQBI6.js} +1 -1
- package/dist/cdn/{RE4YAX46.js → PFQXFR3J.js} +1 -1
- package/dist/cdn/{45HPDOT4.js → PQIVVLWM.js} +1 -1
- package/dist/cdn/{FFUBSUZQ.js → PT3URJPT.js} +1 -1
- package/dist/cdn/{C7C55I5S.js → Q6D2HYAM.js} +1 -1
- package/dist/cdn/{AFNW6NWU.js → Q74VIYYT.js} +1 -1
- package/dist/cdn/{JZCXLE2H.js → QNANJC5N.js} +1 -1
- package/dist/cdn/{DI3IXSN2.js → QURCJOLS.js} +1 -1
- package/dist/cdn/{ZLOMPF4H.js → QZXRRHZI.js} +1 -1
- package/dist/cdn/{C4VPLSW7.js → R2HCYTV3.js} +1 -1
- package/dist/cdn/{NF3TF2WJ.js → R4LR6JBT.js} +1 -1
- package/dist/cdn/{OLCC5YK5.js → RLQPAL3G.js} +1 -1
- package/dist/cdn/{EL7GGALP.js → S6A7QIY2.js} +1 -1
- package/dist/cdn/{4AM5CFW2.js → S6CBIU4I.js} +1 -1
- package/dist/cdn/{TJC3KPVJ.js → S7RFXIID.js} +1 -1
- package/dist/cdn/T2LA26T7.js +2 -0
- package/dist/cdn/{5GA4KYR2.js → TFI32YIW.js} +1 -1
- package/dist/cdn/{AO3S4HXU.js → TJKKXO65.js} +1 -1
- package/dist/cdn/{CQ6NGNY6.js → TTBDTS7V.js} +1 -1
- package/dist/cdn/{NFPHYIMY.js → TWVG44TI.js} +1 -1
- package/dist/cdn/{X33GQ3A3.js → TZEYHRND.js} +1 -1
- package/dist/cdn/{W6UFYWVG.js → U6OTDRDG.js} +1 -1
- package/dist/cdn/{CFFCEFZK.js → U7OV6L43.js} +1 -1
- package/dist/cdn/{LVF7G7IY.js → UF2N6ABQ.js} +1 -1
- package/dist/cdn/{EXXGZUR3.js → UFPS5THO.js} +1 -1
- package/dist/cdn/{57I2TDEP.js → UJQUDROZ.js} +1 -1
- package/dist/cdn/{LRPJV2DQ.js → UJRHNVSJ.js} +1 -1
- package/dist/cdn/{3GSXR65T.js → UMVL2A7E.js} +1 -1
- package/dist/cdn/{LJJZC4QK.js → USMDWOOR.js} +1 -1
- package/dist/cdn/{OTKKHBLB.js → UZLV6ZKB.js} +1 -1
- package/dist/cdn/{S5JJMYDX.js → VFE65IIH.js} +1 -1
- package/dist/cdn/{BBQFFEZH.js → VIAY4ZRC.js} +1 -1
- package/dist/cdn/{TEGKHQ5W.js → VMUOIKWP.js} +1 -1
- package/dist/cdn/{5ISZFTOQ.js → VXQU67VG.js} +1 -1
- package/dist/cdn/{PO4GQAOO.js → WV7Y7ZAG.js} +1 -1
- package/dist/cdn/{FLX6RAXY.js → X4J4PEMW.js} +1 -1
- package/dist/cdn/{OGWGMCYY.js → XCKTCFWS.js} +1 -1
- package/dist/cdn/{HIXRGJPQ.js → XFLOOJCN.js} +1 -1
- package/dist/cdn/{7IOEAAJN.js → XI3FBKU5.js} +1 -1
- package/dist/cdn/{I2ZCMXRB.js → XJQE4TBM.js} +1 -1
- package/dist/cdn/{IVJANKWM.js → XL7EXU56.js} +1 -1
- package/dist/cdn/XSDBVOII.js +2 -0
- package/dist/cdn/{E3RE3E2N.js → XUGBNEVM.js} +1 -1
- package/dist/cdn/{XD2JOD4K.js → XZ3BWCEM.js} +1 -1
- package/dist/cdn/Y6TCI7PY.js +2 -0
- package/dist/cdn/{4XBIPWD2.js → YM3XWOJY.js} +1 -1
- package/dist/cdn/{F7AKW6A4.js → YZTUQM6P.js} +1 -1
- package/dist/cdn/{CAWTUKNX.js → Z32RDX4L.js} +1 -1
- package/dist/cdn/Z3TMJ6KM.js +2 -0
- package/dist/cdn/{OQY72DXY.js → ZN2URSJV.js} +1 -1
- package/dist/cdn/assets/icon/buildingIndex16.json +1 -0
- package/dist/cdn/assets/icon/buildingIndex24.json +1 -0
- package/dist/cdn/assets/icon/buildingIndex32.json +1 -0
- package/dist/cdn/assets/icon/fireIndex16.json +1 -0
- package/dist/cdn/assets/icon/fireIndex24.json +1 -0
- package/dist/cdn/assets/icon/fireIndex32.json +1 -0
- package/dist/cdn/assets/icon/geologyIndex16.json +1 -0
- package/dist/cdn/assets/icon/geologyIndex24.json +1 -0
- package/dist/cdn/assets/icon/geologyIndex32.json +1 -0
- package/dist/cdn/assets/icon/returnToDefault16.json +1 -1
- package/dist/cdn/assets/icon/returnToDefault32.json +1 -1
- package/dist/cdn/assets/icon/smartSearch16.json +1 -0
- package/dist/cdn/assets/icon/smartSearch24.json +1 -0
- package/dist/cdn/assets/icon/smartSearch32.json +1 -0
- package/dist/cdn/assets/icon/snowIndex16.json +1 -0
- package/dist/cdn/assets/icon/snowIndex24.json +1 -0
- package/dist/cdn/assets/icon/snowIndex32.json +1 -0
- package/dist/cdn/assets/icon/soilAdjustedVegetationIndex16.json +1 -0
- package/dist/cdn/assets/icon/soilAdjustedVegetationIndex24.json +1 -0
- package/dist/cdn/assets/icon/soilAdjustedVegetationIndex32.json +1 -0
- package/dist/cdn/assets/icon/vegetationIndex16.json +1 -0
- package/dist/cdn/assets/icon/vegetationIndex24.json +1 -0
- package/dist/cdn/assets/icon/vegetationIndex32.json +1 -0
- package/dist/cdn/assets/input/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/input/t9n/messages.json +1 -1
- package/dist/cdn/assets/input-number/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/input-number/t9n/messages.json +1 -1
- package/dist/cdn/assets/input-text/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/input-text/t9n/messages.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/ClearButton.js +1 -1
- package/dist/chunks/resources12.js +27 -0
- package/dist/chunks/runtime.js +4 -4
- package/dist/chunks/useSizeOverride.js +1 -1
- package/dist/chunks/useTime.js +3 -0
- package/dist/chunks/utils2.js +58 -5
- package/dist/components/calcite-action/customElement.d.ts +1 -5
- package/dist/components/calcite-action-group/customElement.d.ts +2 -4
- package/dist/components/calcite-action-menu/customElement.d.ts +2 -4
- package/dist/components/calcite-alert/customElement.d.ts +1 -3
- package/dist/components/calcite-autocomplete/customElement.d.ts +3 -9
- package/dist/components/calcite-autocomplete-item/customElement.d.ts +1 -1
- package/dist/components/calcite-block/customElement.d.ts +3 -5
- package/dist/components/calcite-button/customElement.d.ts +1 -5
- package/dist/components/calcite-checkbox/customElement.d.ts +1 -5
- package/dist/components/calcite-combobox/customElement.d.ts +3 -9
- package/dist/components/calcite-combobox/customElement.js +44 -42
- package/dist/components/calcite-combobox-item/customElement.d.ts +1 -1
- package/dist/components/calcite-combobox-item/customElement.js +1 -1
- package/dist/components/calcite-combobox-item-group/customElement.js +1 -1
- package/dist/components/calcite-dialog/customElement.d.ts +1 -3
- package/dist/components/calcite-dropdown/customElement.d.ts +2 -4
- package/dist/components/calcite-filter/customElement.js +1 -1
- package/dist/components/calcite-flow-item/customElement.d.ts +2 -4
- package/dist/components/calcite-icon/customElement.d.ts +2 -2
- package/dist/components/calcite-icon/customElement.js +4 -4
- package/dist/components/calcite-inline-editable/customElement.d.ts +1 -1
- package/dist/components/calcite-inline-editable/customElement.js +4 -2
- package/dist/components/calcite-input/customElement.d.ts +23 -24
- package/dist/components/calcite-input/customElement.js +14 -12
- package/dist/components/calcite-input-date-picker/customElement.d.ts +17 -23
- package/dist/components/calcite-input-date-picker/customElement.js +23 -23
- package/dist/components/calcite-input-message/customElement.d.ts +1 -1
- package/dist/components/calcite-input-number/customElement.d.ts +22 -25
- package/dist/components/calcite-input-number/customElement.js +14 -12
- package/dist/components/calcite-input-text/customElement.d.ts +18 -19
- package/dist/components/calcite-input-text/customElement.js +3 -3
- package/dist/components/calcite-input-time-picker/customElement.d.ts +11 -13
- package/dist/components/calcite-input-time-picker/customElement.js +34 -10
- package/dist/components/calcite-input-time-zone/customElement.d.ts +9 -15
- package/dist/components/calcite-input-time-zone/customElement.js +11 -9
- package/dist/components/calcite-list-item/customElement.d.ts +1 -3
- package/dist/components/calcite-meter/customElement.d.ts +1 -3
- package/dist/components/calcite-panel/customElement.d.ts +4 -6
- package/dist/components/calcite-popover/customElement.d.ts +2 -4
- package/dist/components/calcite-radio-button/customElement.d.ts +1 -5
- package/dist/components/calcite-rating/customElement.d.ts +1 -5
- package/dist/components/calcite-segmented-control/customElement.d.ts +1 -5
- package/dist/components/calcite-select/customElement.d.ts +1 -5
- package/dist/components/calcite-sheet/customElement.d.ts +1 -3
- package/dist/components/calcite-slider/customElement.d.ts +13 -17
- package/dist/components/calcite-slider/customElement.js +19 -20
- package/dist/components/calcite-sort-handle/customElement.d.ts +2 -4
- package/dist/components/calcite-split-button/customElement.d.ts +12 -14
- package/dist/components/calcite-split-button/customElement.js +1 -1
- package/dist/components/calcite-stepper/customElement.d.ts +1 -1
- package/dist/components/calcite-stepper/customElement.js +10 -10
- package/dist/components/calcite-stepper-item/customElement.d.ts +3 -3
- package/dist/components/calcite-stepper-item/customElement.js +8 -24
- package/dist/components/calcite-swatch/customElement.d.ts +1 -1
- package/dist/components/calcite-swatch/customElement.js +2 -2
- package/dist/components/calcite-swatch-group/customElement.js +8 -6
- package/dist/components/calcite-switch/customElement.d.ts +6 -10
- package/dist/components/calcite-table-header/customElement.d.ts +1 -1
- package/dist/components/calcite-text-area/customElement.d.ts +1 -5
- package/dist/components/calcite-tile/customElement.d.ts +1 -1
- package/dist/components/calcite-tooltip/customElement.d.ts +1 -3
- package/dist/controllers/useTime.d.ts +3 -0
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/translations.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 +1 -1
- package/dist/types/lumina.d.ts +1 -1
- package/dist/types/preact.d.ts +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/stencil.d.ts +1 -1
- package/package.json +4 -3
- package/dist/cdn/2C57GVL7.js +0 -2
- package/dist/cdn/4C4FXK46.js +0 -2
- package/dist/cdn/6ZDUL7DM.js +0 -2
- package/dist/cdn/AI4EP5I7.js +0 -2
- package/dist/cdn/GMY4OPXB.js +0 -2
- package/dist/cdn/H2JTOLL2.js +0 -2
- package/dist/cdn/PYEU7ILW.js +0 -2
- package/dist/cdn/TDOPUO3L.js +0 -2
- package/dist/cdn/W5TTJ4T3.js +0 -2
- package/dist/cdn/Y3U2N2BQ.js +0 -2
- package/dist/cdn/YYGQFOZ7.js +0 -2
|
@@ -48,13 +48,13 @@ export abstract class Panel extends LitElement {
|
|
|
48
48
|
/** Passes a function to run before the component closes. */
|
|
49
49
|
accessor beforeClose: (() => Promise<void>) | undefined;
|
|
50
50
|
/**
|
|
51
|
-
* When `true`, displays a close button in the component.
|
|
51
|
+
* When `true`, displays a close button in the trailing side of the component's header.
|
|
52
52
|
*
|
|
53
53
|
* @default false
|
|
54
54
|
*/
|
|
55
55
|
accessor closable: boolean;
|
|
56
56
|
/**
|
|
57
|
-
* When `true`, the component
|
|
57
|
+
* When `true`, hides the component.
|
|
58
58
|
*
|
|
59
59
|
* @default false
|
|
60
60
|
*/
|
|
@@ -103,7 +103,7 @@ export abstract class Panel extends LitElement {
|
|
|
103
103
|
* @default false
|
|
104
104
|
*/
|
|
105
105
|
accessor loading: boolean;
|
|
106
|
-
/** Specifies the component's fallback `menuPlacement` when
|
|
106
|
+
/** Specifies the component's fallback `menuPlacement` when its initial or specified `menuPlacement` has insufficient space available. */
|
|
107
107
|
accessor menuFlipPlacements: FlipPlacement[] | undefined;
|
|
108
108
|
/**
|
|
109
109
|
* When `true`, the action menu items in the `header-menu-actions` slot are open.
|
|
@@ -141,9 +141,7 @@ export abstract class Panel extends LitElement {
|
|
|
141
141
|
*/
|
|
142
142
|
accessor scale: Scale;
|
|
143
143
|
/**
|
|
144
|
-
* When `true` and the component is `open`, disables top layer placement.
|
|
145
|
-
*
|
|
146
|
-
* Only set this if you need complex z-index control or if top layer placement causes conflicts with third-party components.
|
|
144
|
+
* When `true` and the component is `open`, disables top layer placement. Only set this if you need complex z-index control or if top layer placement causes conflicts with third-party components.
|
|
147
145
|
*
|
|
148
146
|
* @default false
|
|
149
147
|
* @see [MDN - Top Layer](https://developer.mozilla.org/en-US/docs/Glossary/Top_layer)
|
|
@@ -32,7 +32,7 @@ export abstract class Popover extends LitElement {
|
|
|
32
32
|
* @default false
|
|
33
33
|
*/
|
|
34
34
|
accessor flipDisabled: boolean;
|
|
35
|
-
/** Specifies the component's fallback `placement` for slotted content when
|
|
35
|
+
/** Specifies the component's fallback `placement` for slotted content when its initial or specified `placement` has insufficient space available. */
|
|
36
36
|
accessor flipPlacements: FlipPlacement[] | undefined;
|
|
37
37
|
/**
|
|
38
38
|
* When `true`, prevents focus trapping.
|
|
@@ -117,9 +117,7 @@ export abstract class Popover extends LitElement {
|
|
|
117
117
|
*/
|
|
118
118
|
accessor scale: Scale;
|
|
119
119
|
/**
|
|
120
|
-
* When `true` and the component is `open`, disables top layer placement.
|
|
121
|
-
*
|
|
122
|
-
* Only set this if you need complex z-index control or if top layer placement causes conflicts with third-party components.
|
|
120
|
+
* When `true` and the component is `open`, disables top layer placement. Only set this if you need complex z-index control or if top layer placement causes conflicts with third-party components.
|
|
123
121
|
*
|
|
124
122
|
* @default false
|
|
125
123
|
* @see [MDN - Top Layer](https://developer.mozilla.org/en-US/docs/Glossary/Top_layer)
|
|
@@ -21,11 +21,7 @@ export abstract class RadioButton extends LitElement {
|
|
|
21
21
|
* @default false
|
|
22
22
|
*/
|
|
23
23
|
accessor disabled: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Specifies the `id` of the component's associated form.
|
|
26
|
-
*
|
|
27
|
-
* When not set, the component is associated with its ancestor form element, if one exists.
|
|
28
|
-
*/
|
|
24
|
+
/** Specifies the `id` of the component's associated form. When not set, the component is associated with its ancestor form element, if one exists. */
|
|
29
25
|
accessor form: string | undefined;
|
|
30
26
|
/** Specifies the component's label text. */
|
|
31
27
|
accessor labelText: string | undefined;
|
|
@@ -24,11 +24,7 @@ export abstract class Rating extends LitElement {
|
|
|
24
24
|
* @default false
|
|
25
25
|
*/
|
|
26
26
|
accessor disabled: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Specifies the `id` of the component's associated form.
|
|
29
|
-
*
|
|
30
|
-
* When not set, the component is associated with its ancestor form element, if one exists.
|
|
31
|
-
*/
|
|
27
|
+
/** Specifies the `id` of the component's associated form. When not set, the component is associated with its ancestor form element, if one exists. */
|
|
32
28
|
accessor form: string | undefined;
|
|
33
29
|
/** Specifies the component's label text. */
|
|
34
30
|
accessor labelText: string | undefined;
|
|
@@ -22,11 +22,7 @@ export abstract class SegmentedControl extends LitElement {
|
|
|
22
22
|
* @default false
|
|
23
23
|
*/
|
|
24
24
|
accessor disabled: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Specifies the `id` of the component's associated form.
|
|
27
|
-
*
|
|
28
|
-
* When not set, the component is associated with its ancestor form element, if one exists.
|
|
29
|
-
*/
|
|
25
|
+
/** Specifies the `id` of the component's associated form. When not set, the component is associated with its ancestor form element, if one exists. */
|
|
30
26
|
accessor form: string;
|
|
31
27
|
/** Specifies the component's label text. */
|
|
32
28
|
accessor labelText: string;
|
|
@@ -23,11 +23,7 @@ export abstract class Select extends LitElement {
|
|
|
23
23
|
* @default false
|
|
24
24
|
*/
|
|
25
25
|
accessor disabled: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Specifies the `id` of the component's associated form.
|
|
28
|
-
*
|
|
29
|
-
* When not set, the component is associated with its ancestor form element, if one exists.
|
|
30
|
-
*/
|
|
26
|
+
/** Specifies the `id` of the component's associated form. When not set, the component is associated with its ancestor form element, if one exists. */
|
|
31
27
|
accessor form: string;
|
|
32
28
|
/**
|
|
33
29
|
* Specifies an accessible label for the component.
|
|
@@ -97,9 +97,7 @@ export abstract class Sheet extends LitElement {
|
|
|
97
97
|
*/
|
|
98
98
|
accessor resizable: boolean;
|
|
99
99
|
/**
|
|
100
|
-
* When `true` and the component is `open`, disables top layer placement.
|
|
101
|
-
*
|
|
102
|
-
* Only set this if you need complex z-index control or if top layer placement causes conflicts with third-party components.
|
|
100
|
+
* When `true` and the component is `open`, disables top layer placement. Only set this if you need complex z-index control or if top layer placement causes conflicts with third-party components.
|
|
103
101
|
*
|
|
104
102
|
* @default false
|
|
105
103
|
* @see [MDN - Top Layer](https://developer.mozilla.org/en-US/docs/Glossary/Top_layer)
|
|
@@ -33,12 +33,8 @@ export abstract class Slider extends LitElement {
|
|
|
33
33
|
* @default "start"
|
|
34
34
|
*/
|
|
35
35
|
accessor fillPlacement: "start" | "none" | "end";
|
|
36
|
-
/**
|
|
37
|
-
|
|
38
|
-
*
|
|
39
|
-
* When not set, the component is associated with its ancestor form element, if one exists.
|
|
40
|
-
*/
|
|
41
|
-
accessor form: string;
|
|
36
|
+
/** Specifies the `id` of the component's associated form. When not set, the component is associated with its ancestor form element, if one exists. */
|
|
37
|
+
accessor form: string | undefined;
|
|
42
38
|
/**
|
|
43
39
|
* When `true`, number values are displayed with a group separator corresponding to the language and country format.
|
|
44
40
|
*
|
|
@@ -56,9 +52,9 @@ export abstract class Slider extends LitElement {
|
|
|
56
52
|
*
|
|
57
53
|
* @see [DataSeries](https://github.com/Esri/calcite-design-system/blob/dev/packages/components/src/components/graph/interfaces.ts#L5).
|
|
58
54
|
*/
|
|
59
|
-
accessor histogram: DataSeries;
|
|
55
|
+
accessor histogram: DataSeries | undefined;
|
|
60
56
|
/** Specifies a list of single color stops for a histogram, sorted by offset in ascending order. */
|
|
61
|
-
accessor histogramStops: ColorStop[];
|
|
57
|
+
accessor histogramStops: ColorStop[] | undefined;
|
|
62
58
|
/** When specified, allows users to customize handle labels. */
|
|
63
59
|
accessor labelFormatter: (value: number, type: "value" | "min" | "max" | "tick", defaultFormatter: (value: number) => string) => string | undefined;
|
|
64
60
|
/**
|
|
@@ -68,7 +64,7 @@ export abstract class Slider extends LitElement {
|
|
|
68
64
|
*/
|
|
69
65
|
accessor labelHandles: boolean;
|
|
70
66
|
/** Specifies the component's label text. */
|
|
71
|
-
accessor labelText: string;
|
|
67
|
+
accessor labelText: string | undefined;
|
|
72
68
|
/**
|
|
73
69
|
* When `true` and `ticks` is specified, displays label tick marks with their numeric value.
|
|
74
70
|
*
|
|
@@ -82,7 +78,7 @@ export abstract class Slider extends LitElement {
|
|
|
82
78
|
*/
|
|
83
79
|
accessor max: number;
|
|
84
80
|
/** When `minValue` and `maxValue` are specified for multiple values, specifies the accessible name for the `maxValue` handle, such as `"Temperature, upper bound"`. */
|
|
85
|
-
accessor maxLabel: string;
|
|
81
|
+
accessor maxLabel: string | undefined;
|
|
86
82
|
/** For multiple values, specifies the component's upper value. */
|
|
87
83
|
accessor maxValue: number;
|
|
88
84
|
/** Overrides individual strings used by the component. */
|
|
@@ -94,7 +90,7 @@ export abstract class Slider extends LitElement {
|
|
|
94
90
|
*/
|
|
95
91
|
accessor min: number;
|
|
96
92
|
/** Specifies the accessible name associated with the `value` handle (for single values) or `minValue` handle (for multiple values). For instance, `"Temperature, lower bound"`. */
|
|
97
|
-
accessor minLabel: string;
|
|
93
|
+
accessor minLabel: string | undefined;
|
|
98
94
|
/** For multiple values, the component's lower value. */
|
|
99
95
|
accessor minValue: number;
|
|
100
96
|
/**
|
|
@@ -110,11 +106,11 @@ export abstract class Slider extends LitElement {
|
|
|
110
106
|
*
|
|
111
107
|
* Required to pass the component's `value` on form submission
|
|
112
108
|
*/
|
|
113
|
-
accessor name: string;
|
|
109
|
+
accessor name: string | undefined;
|
|
114
110
|
/** Specifies the Unicode numeral system used by the component for localization. */
|
|
115
|
-
accessor numberingSystem: NumberingSystem;
|
|
111
|
+
accessor numberingSystem: NumberingSystem | undefined;
|
|
116
112
|
/** Specifies the interval to move with the `Page up` or `Page down` keys. */
|
|
117
|
-
accessor pageStep: number;
|
|
113
|
+
accessor pageStep: number | undefined;
|
|
118
114
|
/**
|
|
119
115
|
* When `true`, sets a finer point for handles.
|
|
120
116
|
*
|
|
@@ -153,11 +149,11 @@ export abstract class Slider extends LitElement {
|
|
|
153
149
|
*/
|
|
154
150
|
accessor step: number;
|
|
155
151
|
/** Specifies the interval between tick marks on the number line. */
|
|
156
|
-
accessor ticks: number;
|
|
152
|
+
accessor ticks: number | undefined;
|
|
157
153
|
/** Specifies the validation icon to display under the component. */
|
|
158
|
-
accessor validationIcon: IconName | boolean;
|
|
154
|
+
accessor validationIcon: IconName | boolean | undefined;
|
|
159
155
|
/** Specifies the validation message to display under the component. */
|
|
160
|
-
accessor validationMessage: string;
|
|
156
|
+
accessor validationMessage: string | undefined;
|
|
161
157
|
/**
|
|
162
158
|
* The component's current validation state.
|
|
163
159
|
*
|
|
@@ -65,14 +65,14 @@ class Slider extends LitElement {
|
|
|
65
65
|
}
|
|
66
66
|
this.removeDragListeners();
|
|
67
67
|
this.focusActiveHandle(event.clientX);
|
|
68
|
-
if (this.lastDragPropValue != this[this.dragProp]) {
|
|
68
|
+
if (this.dragProp && this.lastDragPropValue != this[this.dragProp]) {
|
|
69
69
|
this.emitChange();
|
|
70
70
|
}
|
|
71
|
-
this.dragProp =
|
|
72
|
-
this.lastDragPropValue =
|
|
73
|
-
this.minValueDragRange =
|
|
74
|
-
this.maxValueDragRange =
|
|
75
|
-
this.minMaxValueRange =
|
|
71
|
+
this.dragProp = void 0;
|
|
72
|
+
this.lastDragPropValue = void 0;
|
|
73
|
+
this.minValueDragRange = void 0;
|
|
74
|
+
this.maxValueDragRange = void 0;
|
|
75
|
+
this.minMaxValueRange = void 0;
|
|
76
76
|
};
|
|
77
77
|
this.dragUpdate = (event) => {
|
|
78
78
|
if (this.disabled || !this.trackRef.value) {
|
|
@@ -133,9 +133,6 @@ class Slider extends LitElement {
|
|
|
133
133
|
this.interactiveContainer = useInteractive(this);
|
|
134
134
|
this._value = defaultValue;
|
|
135
135
|
this.activeProp = "value";
|
|
136
|
-
this.maxValueDragRange = null;
|
|
137
|
-
this.minMaxValueRange = null;
|
|
138
|
-
this.minValueDragRange = null;
|
|
139
136
|
this.tickValues = [];
|
|
140
137
|
this.disabled = false;
|
|
141
138
|
this.fillPlacement = "start";
|
|
@@ -245,7 +242,7 @@ class Slider extends LitElement {
|
|
|
245
242
|
event.preventDefault();
|
|
246
243
|
return;
|
|
247
244
|
}
|
|
248
|
-
let adjustment;
|
|
245
|
+
let adjustment = NaN;
|
|
249
246
|
if (key === "ArrowUp" || key === "ArrowRight") {
|
|
250
247
|
const directionFactor = mirror && key === "ArrowRight" ? -1 : 1;
|
|
251
248
|
adjustment = value + step * directionFactor;
|
|
@@ -362,7 +359,7 @@ class Slider extends LitElement {
|
|
|
362
359
|
return ticks;
|
|
363
360
|
}
|
|
364
361
|
onThumbBlur() {
|
|
365
|
-
this.activeProp =
|
|
362
|
+
this.activeProp = void 0;
|
|
366
363
|
}
|
|
367
364
|
onThumbFocus(event) {
|
|
368
365
|
const thumb = event.currentTarget;
|
|
@@ -408,7 +405,7 @@ class Slider extends LitElement {
|
|
|
408
405
|
window.removeEventListener("pointercancel", this.dragEnd);
|
|
409
406
|
}
|
|
410
407
|
setValue(values) {
|
|
411
|
-
let valueChanged;
|
|
408
|
+
let valueChanged = false;
|
|
412
409
|
Object.keys(values).forEach((propName) => {
|
|
413
410
|
const newValue = values[propName];
|
|
414
411
|
if (!valueChanged) {
|
|
@@ -483,16 +480,17 @@ class Slider extends LitElement {
|
|
|
483
480
|
return (num - this.min) / range;
|
|
484
481
|
}
|
|
485
482
|
adjustHostObscuredHandleLabel(name) {
|
|
486
|
-
const
|
|
487
|
-
const
|
|
488
|
-
const
|
|
483
|
+
const shadowRoot = this.el.shadowRoot;
|
|
484
|
+
const label = shadowRoot.querySelector(`.handle__label--${name}`);
|
|
485
|
+
const labelStatic = shadowRoot.querySelector(`.handle__label--${name}.static`);
|
|
486
|
+
const labelTransformed = shadowRoot.querySelector(`.handle__label--${name}.transformed`);
|
|
489
487
|
const labelStaticBounds = labelStatic.getBoundingClientRect();
|
|
490
488
|
const labelStaticOffset = this.getHostOffset(labelStaticBounds.left, labelStaticBounds.right);
|
|
491
489
|
label.style.transform = `translateX(${labelStaticOffset}px)`;
|
|
492
490
|
labelTransformed.style.transform = `translateX(${labelStaticOffset}px)`;
|
|
493
491
|
}
|
|
494
492
|
hyphenateCollidingRangeHandleLabels() {
|
|
495
|
-
const
|
|
493
|
+
const shadowRoot = this.el.shadowRoot;
|
|
496
494
|
const mirror = this.shouldMirror();
|
|
497
495
|
const leftModifier = mirror ? "value" : "minValue";
|
|
498
496
|
const rightModifier = mirror ? "minValue" : "value";
|
|
@@ -566,10 +564,11 @@ class Slider extends LitElement {
|
|
|
566
564
|
if (this.hasHistogram && !this.precise && !this.labelHandles) {
|
|
567
565
|
return;
|
|
568
566
|
}
|
|
569
|
-
const
|
|
570
|
-
const
|
|
571
|
-
const
|
|
572
|
-
const
|
|
567
|
+
const shadowRoot = this.el.shadowRoot;
|
|
568
|
+
const minHandle = shadowRoot.querySelector(`.${CSS.thumbMinValue}`);
|
|
569
|
+
const maxHandle = shadowRoot.querySelector(`.${CSS.thumbValue}`);
|
|
570
|
+
const minTickLabel = shadowRoot.querySelector(`.${CSS.tickMin}`);
|
|
571
|
+
const maxTickLabel = shadowRoot.querySelector(`.${CSS.tickMax}`);
|
|
573
572
|
if (!minHandle && maxHandle && minTickLabel && maxTickLabel) {
|
|
574
573
|
minTickLabel.style.opacity = this.isMinTickLabelObscured(minTickLabel, maxHandle) ? "0" : "1";
|
|
575
574
|
maxTickLabel.style.opacity = this.isMaxTickLabelObscured(maxTickLabel, maxHandle) ? "0" : "1";
|
|
@@ -13,7 +13,7 @@ export abstract class SortHandle extends LitElement {
|
|
|
13
13
|
* @default false
|
|
14
14
|
*/
|
|
15
15
|
accessor disabled: boolean;
|
|
16
|
-
/** Specifies the component's fallback `placement` for slotted content when
|
|
16
|
+
/** Specifies the component's fallback `placement` for slotted content when its initial or specified `placement` has insufficient space available. */
|
|
17
17
|
accessor flipPlacements: FlipPlacement[];
|
|
18
18
|
/** Specifies an accessible label for the component. */
|
|
19
19
|
accessor label: string;
|
|
@@ -70,9 +70,7 @@ export abstract class SortHandle extends LitElement {
|
|
|
70
70
|
*/
|
|
71
71
|
accessor sortDisabled: boolean;
|
|
72
72
|
/**
|
|
73
|
-
* When `true` and the component is `open`, disables top layer placement.
|
|
74
|
-
*
|
|
75
|
-
* Only set this if you need complex z-index control or if top layer placement causes conflicts with third-party components.
|
|
73
|
+
* When `true` and the component is `open`, disables top layer placement. Only set this if you need complex z-index control or if top layer placement causes conflicts with third-party components.
|
|
76
74
|
*
|
|
77
75
|
* @default false
|
|
78
76
|
* @see [MDN - Top Layer](https://developer.mozilla.org/en-US/docs/Glossary/Top_layer)
|
|
@@ -52,11 +52,11 @@ export abstract class SplitButton extends LitElement {
|
|
|
52
52
|
*/
|
|
53
53
|
accessor dropdownIconType: DropdownIconType;
|
|
54
54
|
/** Accessible name for the dropdown menu. */
|
|
55
|
-
accessor dropdownLabel: string;
|
|
56
|
-
/** Specifies the component's fallback `placement` for slotted content when
|
|
57
|
-
accessor flipPlacements: FlipPlacement[];
|
|
55
|
+
accessor dropdownLabel: string | undefined;
|
|
56
|
+
/** Specifies the component's fallback `placement` for slotted content when its initial or specified `placement` has insufficient space available. */
|
|
57
|
+
accessor flipPlacements: FlipPlacement[] | undefined;
|
|
58
58
|
/** Specifies the URL of the linked resource, which can be set as an absolute or relative path. */
|
|
59
|
-
accessor href: string;
|
|
59
|
+
accessor href: string | undefined;
|
|
60
60
|
/**
|
|
61
61
|
* Specifies the kind of the component, which will apply to border and background, if applicable.
|
|
62
62
|
*
|
|
@@ -86,21 +86,21 @@ export abstract class SplitButton extends LitElement {
|
|
|
86
86
|
*/
|
|
87
87
|
accessor placement: LogicalPlacement;
|
|
88
88
|
/** Specifies an icon to display at the end of the primary button. */
|
|
89
|
-
accessor primaryIconEnd: IconName;
|
|
89
|
+
accessor primaryIconEnd: IconName | undefined;
|
|
90
90
|
/** Displays the `primaryIconStart` and/or `primaryIconEnd` as flipped when the element direction is right-to-left (`"rtl"`). */
|
|
91
|
-
accessor primaryIconFlipRtl: FlipContext;
|
|
91
|
+
accessor primaryIconFlipRtl: FlipContext | undefined;
|
|
92
92
|
/** Specifies an icon to display at the start of the primary button. */
|
|
93
|
-
accessor primaryIconStart: IconName;
|
|
93
|
+
accessor primaryIconStart: IconName | undefined;
|
|
94
94
|
/** Specifies an accessible name for the primary button. */
|
|
95
|
-
accessor primaryLabel: string;
|
|
95
|
+
accessor primaryLabel: string | undefined;
|
|
96
96
|
/** Specifies the text displayed in the primary button. */
|
|
97
|
-
accessor primaryText: string;
|
|
97
|
+
accessor primaryText: string | undefined;
|
|
98
98
|
/**
|
|
99
99
|
* Defines the relationship between the `href` value and the current document.
|
|
100
100
|
*
|
|
101
101
|
* @see [MDN - rel](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel)
|
|
102
102
|
*/
|
|
103
|
-
accessor rel: string;
|
|
103
|
+
accessor rel: string | undefined;
|
|
104
104
|
/**
|
|
105
105
|
* Specifies the component's size.
|
|
106
106
|
*
|
|
@@ -112,11 +112,9 @@ export abstract class SplitButton extends LitElement {
|
|
|
112
112
|
*
|
|
113
113
|
* @see [MDN - target](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target)
|
|
114
114
|
*/
|
|
115
|
-
accessor target: string;
|
|
115
|
+
accessor target: string | undefined;
|
|
116
116
|
/**
|
|
117
|
-
* When `true` and the component is `open`, disables top layer placement.
|
|
118
|
-
*
|
|
119
|
-
* Only set this if you need complex z-index control or if top layer placement causes conflicts with third-party components.
|
|
117
|
+
* When `true` and the component is `open`, disables top layer placement. Only set this if you need complex z-index control or if top layer placement causes conflicts with third-party components.
|
|
120
118
|
*
|
|
121
119
|
* @default false
|
|
122
120
|
* @see [MDN - Top Layer](https://developer.mozilla.org/en-US/docs/Glossary/Top_layer)
|
|
@@ -62,7 +62,7 @@ class SplitButton extends LitElement {
|
|
|
62
62
|
}
|
|
63
63
|
render() {
|
|
64
64
|
const buttonWidth = this.width === "auto" ? "auto" : "full";
|
|
65
|
-
return this.interactiveContainer({ disabled: this.disabled, children: html`<div class=${safeClassMap(CSS.container)}><calcite-button .appearance=${this.appearance} .disabled=${this.disabled} .download=${this.download} .href=${this.href} .iconEnd=${this.primaryIconEnd
|
|
65
|
+
return this.interactiveContainer({ disabled: this.disabled, children: html`<div class=${safeClassMap(CSS.container)}><calcite-button .appearance=${this.appearance} .disabled=${this.disabled} .download=${this.download} .href=${this.href} .iconEnd=${this.primaryIconEnd} .iconFlipRtl=${this.primaryIconFlipRtl} .iconStart=${this.primaryIconStart} .kind=${this.kind} .label=${this.primaryLabel} .loading=${this.loading} @click=${this.calciteSplitButtonPrimaryClickHandler} .rel=${this.rel} .scale=${this.scale} split-child=primary .target=${this.target} type=button .width=${buttonWidth}>${this.primaryText}</calcite-button><div class=${safeClassMap(CSS.dividerContainer)}><div class=${safeClassMap(CSS.divider)}></div></div><calcite-dropdown .disabled=${this.disabled} .flipPlacements=${this.flipPlacements} @click=${this.calciteSplitButtonSecondaryClickHandler} .open=${this.active} .overlayPositioning=${this.overlayPositioning} .placement=${this.placement} .scale=${this.scale} .topLayerDisabled=${this.topLayerDisabled} .widthScale=${this.scale}><calcite-button .appearance=${this.appearance} .disabled=${this.disabled} .iconStart=${this.dropdownIcon} .kind=${this.kind} .label=${this.dropdownLabel} .scale=${this.scale} slot=${SLOTS.trigger} split-child=secondary type=button></calcite-button><slot></slot></calcite-dropdown></div>` });
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
customElement("calcite-split-button", SplitButton);
|
|
@@ -47,7 +47,7 @@ export abstract class Stepper extends LitElement {
|
|
|
47
47
|
*/
|
|
48
48
|
accessor scale: Scale;
|
|
49
49
|
/** Specifies the component's selected item. */
|
|
50
|
-
get selectedItem(): StepperItem;
|
|
50
|
+
get selectedItem(): StepperItem | null;
|
|
51
51
|
/** Set the last `calcite-stepper-item` as active. */
|
|
52
52
|
endStep(): Promise<void>;
|
|
53
53
|
/**
|
|
@@ -7,6 +7,7 @@ import { f as focusElementInGroup, a as slotChangeGetAssignedElements } from "..
|
|
|
7
7
|
import { c as createObserver } from "../../chunks/observers.js";
|
|
8
8
|
import { g as guid } from "../../chunks/guid.js";
|
|
9
9
|
import { u as useT9n } from "../../chunks/useT9n.js";
|
|
10
|
+
import { i as isStepperItem } from "../../chunks/resources12.js";
|
|
10
11
|
const CSS$1 = {
|
|
11
12
|
actionIcon: "action-icon",
|
|
12
13
|
actionContainer: "action-container",
|
|
@@ -50,6 +51,7 @@ class Stepper extends LitElement {
|
|
|
50
51
|
this.multipleViewMode = false;
|
|
51
52
|
this.mutationObserver = createObserver("mutation", () => this.updateItems());
|
|
52
53
|
this.messages = useT9n();
|
|
54
|
+
this.currentActivePosition = -1;
|
|
53
55
|
this.icon = false;
|
|
54
56
|
this.layout = "horizontal";
|
|
55
57
|
this.numbered = false;
|
|
@@ -123,11 +125,9 @@ class Stepper extends LitElement {
|
|
|
123
125
|
}
|
|
124
126
|
}
|
|
125
127
|
loaded() {
|
|
126
|
-
if (
|
|
128
|
+
if (this.currentActivePosition === -1) {
|
|
127
129
|
const enabledStepIndex = this.getFirstEnabledStepperPosition();
|
|
128
|
-
|
|
129
|
-
this.currentActivePosition = enabledStepIndex;
|
|
130
|
-
}
|
|
130
|
+
this.currentActivePosition = enabledStepIndex;
|
|
131
131
|
this.calciteInternalStepperItemChange.emit({
|
|
132
132
|
position: enabledStepIndex
|
|
133
133
|
});
|
|
@@ -194,7 +194,7 @@ class Stepper extends LitElement {
|
|
|
194
194
|
const { currentActivePosition, layout } = this;
|
|
195
195
|
this.multipleViewMode = layout !== "horizontal-single";
|
|
196
196
|
visibleItems.forEach((item, index) => {
|
|
197
|
-
item.itemHidden = layout === "horizontal-single" && index !==
|
|
197
|
+
item.itemHidden = layout === "horizontal-single" && index !== currentActivePosition;
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
200
|
getEnabledStepIndex(startIndex, direction = "next") {
|
|
@@ -231,15 +231,15 @@ class Stepper extends LitElement {
|
|
|
231
231
|
return 0;
|
|
232
232
|
}
|
|
233
233
|
handleDefaultSlotChange(event) {
|
|
234
|
-
|
|
235
|
-
this.items = items;
|
|
234
|
+
this.items = slotChangeGetAssignedElements(event).filter((el) => isStepperItem(el));
|
|
236
235
|
this.updateItems();
|
|
237
236
|
const spacing = Array(this.visibleItems.length).fill("1fr").join(" ");
|
|
238
|
-
this.containerRef.value
|
|
239
|
-
|
|
237
|
+
const value = this.containerRef.value;
|
|
238
|
+
value.style.gridTemplateAreas = spacing;
|
|
239
|
+
value.style.gridTemplateColumns = spacing;
|
|
240
240
|
}
|
|
241
241
|
render() {
|
|
242
|
-
this.el.ariaLabel = this.messages.label;
|
|
242
|
+
this.el.ariaLabel = this.messages.label ?? null;
|
|
243
243
|
this.el.role = "region";
|
|
244
244
|
return html`<div class=${safeClassMap({ container: true, [CSS$1.singleView]: this.layout === "horizontal-single" })} ${ref(this.containerRef)}>${this.layout === "horizontal-single" && html`<div class=${safeClassMap({ [CSS$1.stepBarContainer]: true })}>${this.visibleItems.map((item, index) => StepBar({ active: index === this.currentActivePosition, complete: item.complete && index !== this.currentActivePosition && !item.error, disabled: item.disabled && index !== this.currentActivePosition, error: item.error && index !== this.currentActivePosition }))}</div>` || ""}${this.layout === "horizontal-single" && html`<div class=${safeClassMap({ [CSS$1.actionContainer]: true })}>${this.renderAction("start")}${this.renderAction("end")}</div>` || ""}<slot @slotchange=${this.handleDefaultSlotChange}></slot></div>`;
|
|
245
245
|
}
|
|
@@ -29,8 +29,8 @@ export abstract class StepperItem extends LitElement {
|
|
|
29
29
|
* @default false
|
|
30
30
|
*/
|
|
31
31
|
accessor complete: boolean;
|
|
32
|
-
/** Specifies a description for the component. Displays below the
|
|
33
|
-
accessor description: string;
|
|
32
|
+
/** Specifies a description for the component. Displays below the `heading`. */
|
|
33
|
+
accessor description: string | undefined;
|
|
34
34
|
/**
|
|
35
35
|
* When `true`, prevents interaction and decreases the component's opacity.
|
|
36
36
|
*
|
|
@@ -44,7 +44,7 @@ export abstract class StepperItem extends LitElement {
|
|
|
44
44
|
*/
|
|
45
45
|
accessor error: boolean;
|
|
46
46
|
/** Specifies the component's heading text. */
|
|
47
|
-
accessor heading: string;
|
|
47
|
+
accessor heading: string | undefined;
|
|
48
48
|
/**
|
|
49
49
|
* When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`).
|
|
50
50
|
*
|
|
@@ -9,32 +9,18 @@ import { i as isHidden } from "../../chunks/component.js";
|
|
|
9
9
|
import { u as useSetFocus } from "../../chunks/useSetFocus.js";
|
|
10
10
|
import { m as slotChangeHasContent } from "../../chunks/dom.js";
|
|
11
11
|
import { u as useInteractive } from "../../chunks/useInteractive.js";
|
|
12
|
-
|
|
13
|
-
container: "container",
|
|
14
|
-
hasSlottedContent: "has-slotted-content",
|
|
15
|
-
stepperItemContent: "stepper-item-content",
|
|
16
|
-
stepperItemDescription: "stepper-item-description",
|
|
17
|
-
stepperItemHeader: "stepper-item-header",
|
|
18
|
-
stepperItemHeading: "stepper-item-heading",
|
|
19
|
-
stepperItemHeaderText: "stepper-item-header-text",
|
|
20
|
-
stepperItemIcon: "stepper-item-icon",
|
|
21
|
-
stepperItemNumber: "stepper-item-number",
|
|
22
|
-
visuallyHidden: "visually-hidden"
|
|
23
|
-
};
|
|
24
|
-
const ICONS = {
|
|
25
|
-
circle: "circle",
|
|
26
|
-
circleF: "circleF",
|
|
27
|
-
exclamationMarkCircleF: "exclamationMarkCircleF",
|
|
28
|
-
checkCircleF: "checkCircleF"
|
|
29
|
-
};
|
|
12
|
+
import { C as CSS, I as ICONS } from "../../chunks/resources12.js";
|
|
30
13
|
const styles = css`:host([disabled]),:host([layout=horizontal][disabled]) .stepper-item-header,:host([layout=horizontal-single][disabled]) .stepper-item-header{cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([layout=horizontal][disabled]) .stepper-item-header *,:host([layout=horizontal-single][disabled]) .stepper-item-header *,:host([disabled]) ::slotted(*),:host([layout=horizontal][disabled]) .stepper-item-header ::slotted(*),:host([layout=horizontal-single][disabled]) .stepper-item-header ::slotted(*){pointer-events:none}:host([scale=s]){--calcite-internal-stepper-item-spacing-unit-s: .25rem;--calcite-internal-stepper-item-spacing-unit-m: .75rem;--calcite-internal-stepper-item-spacing-unit-l: 1rem;--calcite-internal-stepper-item-header-padding: var(--calcite-spacing-md);--calcite-internal-stepper-action-inline-size: 2rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);margin-inline-end:.25rem}:host([scale=s]) .stepper-item-description{font-size:var(--calcite-font-size-relative-sm)}:host([scale=m]){--calcite-internal-stepper-item-spacing-unit-s: .5rem;--calcite-internal-stepper-item-spacing-unit-m: 1rem;--calcite-internal-stepper-item-spacing-unit-l: 1.25rem;--calcite-internal-stepper-item-header-padding: var(--calcite-spacing-lg);--calcite-internal-stepper-action-inline-size: 2.5rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);margin-inline-end:.5rem}:host([scale=m]) .stepper-item-description{font-size:var(--calcite-font-size-relative-base)}:host([scale=l]){--calcite-internal-stepper-item-spacing-unit-s: .75rem;--calcite-internal-stepper-item-spacing-unit-m: 1.25rem;--calcite-internal-stepper-item-spacing-unit-l: 1.5rem;--calcite-internal-stepper-item-header-padding: var(--calcite-spacing-xl);--calcite-internal-stepper-action-inline-size: 3rem;font-size:var(--calcite-font-size-relative-lg);line-height:var(--calcite-font-line-height-lg);margin-inline-end:.75rem}:host([scale=l]) .stepper-item-description{font-size:var(--calcite-font-size-relative-md)}:host{position:relative;display:flex;flex-grow:1;flex-direction:column;align-self:flex-start;margin-block-end:var(--calcite-stepper-bar-gap, var(--calcite-internal-stepper-item-spacing-unit-s))}:host .container{position:relative;display:flex;flex-grow:1;cursor:pointer;flex-direction:column;border-width:0px;border-block-start-width:2px;border-style:solid;border-color:var(--calcite-color-border-3);color:var(--calcite-color-text-3);text-decoration-line:none;outline:2px solid transparent;outline-offset:2px}:host .container:active{background-color:var(--calcite-stepper-item-background-color-press, var(--calcite-color-foreground-3))}:host{outline-color:transparent}:host(:focus){outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host .stepper-item-content,:host .stepper-item-header{box-sizing:border-box;padding-block:var(--calcite-internal-stepper-item-spacing-unit-l);padding-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);text-align:start}:host .stepper-item-header{display:flex;cursor:pointer;align-items:flex-start;padding-block:var(--calcite-internal-stepper-item-header-padding)}:host .stepper-item-header:active{background-color:var(--calcite-stepper-item-background-color-press, var(--calcite-color-foreground-3))}:host .stepper-item-header *{display:inline-flex;align-items:center}:host .stepper-item-content{display:none;inline-size:100%;flex-direction:column;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug)}:host .stepper-item-icon{margin-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);display:inline-flex;block-size:.75rem;flex-shrink:0;align-self:flex-start;margin-block-start:var(--calcite-spacing-base);color:var(--calcite-stepper-item-icon-color, var(--calcite-color-border-input))}:host([complete]) .stepper-item-icon{opacity:var(--calcite-opacity-disabled)}:host .stepper-item-header-text{flex-direction:column;text-align:initial;margin-inline-end:auto}:host .stepper-item-heading,:host .stepper-item-description{display:flex;inline-size:100%}.stepper-item-heading,.stepper-item-description,.stepper-item-number{line-height:var(--calcite-font-line-height-relative-snug)}:host .stepper-item-heading{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-stepper-item-header-text-color, var(--calcite-color-text-1))}:host .stepper-item-description{color:var(--calcite-stepper-item-description-text-color, var(--calcite-color-text-3))}:host .stepper-item-number{font-weight:var(--calcite-font-weight-normal);margin-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);color:var(--calcite-stepper-item-description-text-color, var(--calcite-color-text-1))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([complete]) .container{border-color:#007ac280}:host([complete]) .container .stepper-item-icon{color:var(--calcite-stepper-item-complete-icon-color, var(--calcite-color-brand))}:host([error]) .container{border-block-start-color:var(--calcite-color-status-danger)}:host([error]) .container .stepper-item-number{color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host([error]) .container .stepper-item-icon{opacity:1;color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host(:hover:not([disabled]):not([selected])) .container,:host(:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-color-brand)}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-heading,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-heading{color:var(--calcite-stepper-item-header-text-color-hover, var(--calcite-color-text-1))}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-description,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-description{color:var(--calcite-stepper-item-description-text-color-hover, var(--calcite-color-text-2))}:host([error]:hover:not([disabled]):not([selected])) .container,:host([error]:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-color-status-danger-hover)}:host([selected]) .container{border-block-start-color:var(--calcite-color-brand)}:host([selected]) .container .stepper-item-heading{color:var(--calcite-stepper-item-selected-header-text-color, var(--calcite-color-text-1));font-weight:var(--calcite-font-weight-medium)}:host([selected]) .container .stepper-item-description{color:var(--calcite-stepper-item-description-text-color-hover, var(--calcite-color-text-2))}:host([selected]) .container .stepper-item-number{color:var(--calcite-stepper-item-selected-icon-color, var(--calcite-color-brand));font-weight:var(--calcite-font-weight-medium)}:host([selected]) .container .stepper-item-icon{color:var(--calcite-stepper-item-selected-icon-color, var(--calcite-color-brand));opacity:1}:host([selected]) .container .stepper-item-content{display:flex}:host([layout=vertical]){inline-size:100%}:host([layout=vertical]) .container{margin-inline:0px;margin-block-start:0px;flex:1 1 auto;border-block-start-width:0px;border-style:solid;padding-block:0px;border-inline-start-width:2px;padding-inline-start:var(--calcite-internal-stepper-item-spacing-unit-l);border-color:var(--calcite-stepper-bar-fill-color, var(--calcite-color-border-2))}:host([layout=vertical]) .container .stepper-item-icon{order:3;margin-block:1px 0px;padding-inline-start:var(--calcite-internal-stepper-item-spacing-unit-s);margin-inline-start:auto}:host([layout=vertical]) .container .stepper-item-header{padding-inline-end:0px}:host([layout=vertical]) .container .stepper-item-content{padding:0}:host([layout=vertical][complete]) .container{border-color:var(--calcite-stepper-bar-complete-fill-color, rgba(0, 122, 194, .5))}:host([layout=vertical][complete]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][complete]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-stepper-bar-complete-fill-color-hover, var(--calcite-color-brand))}:host([layout=vertical][error]) .container{border-color:var(--calcite-stepper-bar-error-fill-color, var(--calcite-color-status-danger))}:host([layout=vertical][selected]) .container{border-color:var(--calcite-stepper-bar-selected-fill-color, var(--calcite-color-brand))}:host([layout=vertical][selected]) .container .stepper-item-content.has-slotted-content{margin-block-end:var(--calcite-internal-stepper-item-spacing-unit-l)}:host([layout=vertical]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-stepper-bar-fill-color-hover, rgba(0, 122, 194, .5))}:host([layout=vertical][error]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][error]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-stepper-bar-error-fill-color-hover, var(--calcite-color-status-danger-hover))}:host([layout=horizontal]),:host([layout=horizontal-single]){display:contents}:host([layout=horizontal]) .container,:host([layout=horizontal-single]) .container{display:contents}:host([layout=horizontal]) .stepper-item-header,:host([layout=horizontal-single]) .stepper-item-header{border-width:0px;border-block-start-width:2px;border-style:solid;outline-color:transparent;grid-row:items;border-color:var(--calcite-stepper-bar-fill-color, var(--calcite-color-border-2))}:host([layout=horizontal]) .stepper-item-header:focus,:host([layout=horizontal-single]) .stepper-item-header: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))))}:host([layout=horizontal]) .stepper-item-content,:host([layout=horizontal-single]) .stepper-item-content{cursor:auto;transition-timing-function:cubic-bezier(.4,0,.2,1);padding-block:0;padding-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);text-align:start}:host([layout=horizontal-single]) .stepper-item-header{grid-area:1/1/1/-1}:host([layout=horizontal]) .stepper-item-content,:host([layout=horizontal-single]) .stepper-item-content{grid-area:2/1/2/-1}:host([layout=horizontal][complete]) .stepper-item-header,:host([layout=horizontal-single][complete]) .stepper-item-header{border-color:var(--calcite-stepper-bar-complete-fill-color, rgba(0, 122, 194, .5))}:host([layout=horizontal][complete]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][complete]:focus:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][complete]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][complete]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-stepper-bar-complete-fill-color-hover, var(--calcite-color-brand))}:host([layout=horizontal][error]) .stepper-item-header,:host([layout=horizontal-single][error]) .stepper-item-header{border-color:var(--calcite-stepper-bar-error-fill-color, var(--calcite-color-status-danger))}:host([layout=horizontal][selected]) .stepper-item-header,:host([layout=horizontal-single][selected]) .stepper-item-header{border-color:var(--calcite-stepper-bar-selected-fill-color, var(--calcite-color-brand))}:host([layout=horizontal]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal]:focus:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-stepper-bar-fill-color-hover, rgba(0, 122, 194, .5))}:host([layout=horizontal][error]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][error]:focus:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][error]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][error]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-stepper-bar-error-fill-color-hover, var(--calcite-color-status-danger-hover))}@media(forced-colors:active){:host .container{outline-width:0;outline-offset:0}:host(:focus),:host(:focus-visible){outline-color:canvasText}:host([selected]) .container{border-block-start-color:highlight}:host([selected]) .container .stepper-item-number{color:highlight}:host([selected]) .container .stepper-item-icon{color:highlight}:host([layout=vertical][selected]) .container{border-color:highlight}}:host([layout=horizontal-single]) .stepper-item-header{margin-inline-end:0px;border-style:none;inline-size:100%;padding-inline:calc(var(--calcite-internal-stepper-action-inline-size) + .5rem)}:host([layout=horizontal-single][error]) .container .stepper-item-number{color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host([layout=horizontal-single][error]) .container .stepper-item-icon{opacity:1;color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host([layout=horizontal-single][error][selected]),:host([layout=horizontal-single][complete][selected]) .container{color:var(--calcite-color-text-3)}:host([layout=horizontal-single][error][selected]) .stepper-item-heading,:host([layout=horizontal-single][complete][selected]) .container .stepper-item-heading{color:var(--calcite-stepper-item-header-text-color, var(--calcite-color-text-2))}:host([layout=horizontal-single][complete][selected]) .container .stepper-item-icon{opacity:var(--calcite-opacity-disabled)}:host([layout=horizontal-single][complete][selected]) .container .stepper-item-number{color:var(--calcite-stepper-item-selected-icon-color, var(--calcite-color-text-3))}.visually-hidden{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}:host([hidden]){display:none}[hidden]{display:none}:host([item-hidden]){display:none}`;
|
|
31
14
|
class StepperItem extends LitElement {
|
|
32
15
|
constructor() {
|
|
33
16
|
super();
|
|
34
17
|
this.headerRef = createRef();
|
|
18
|
+
this.itemPosition = 0;
|
|
19
|
+
this.selectedPosition = 0;
|
|
35
20
|
this.messages = useT9n();
|
|
36
21
|
this.focusSetter = useSetFocus()(this);
|
|
37
22
|
this.interactiveContainer = useInteractive(this);
|
|
23
|
+
this.stepperItemHasContent = false;
|
|
38
24
|
this.complete = false;
|
|
39
25
|
this.disabled = false;
|
|
40
26
|
this.error = false;
|
|
@@ -146,15 +132,13 @@ class StepperItem extends LitElement {
|
|
|
146
132
|
}
|
|
147
133
|
}
|
|
148
134
|
getItemPosition() {
|
|
149
|
-
|
|
135
|
+
const stepperItems = this.parentStepperEl?.querySelectorAll("calcite-stepper-item:not([hidden]):not([item-hidden])");
|
|
136
|
+
return stepperItems ? Array.from(stepperItems).indexOf(this.el) : -1;
|
|
150
137
|
}
|
|
151
138
|
render() {
|
|
152
139
|
this.el.ariaCurrent = this.selected ? "step" : "false";
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
this.layout === "horizontal" && !this.disabled ? 0 : null
|
|
156
|
-
);
|
|
157
|
-
return this.interactiveContainer({ disabled: this.disabled, children: html`<div class=${safeClassMap(CSS.container)}>${this.complete && html`<span aria-live=polite class=${safeClassMap(CSS.visuallyHidden)}>${this.messages.complete}</span>` || ""}<div class=${safeClassMap(CSS.stepperItemHeader)} tabindex=${innerDisplayContextTabIndex ?? nothing} ${ref(this.headerRef)}>${this.icon ? this.renderIcon() : null}${this.numbered ? html`<div class=${safeClassMap(CSS.stepperItemNumber)}>${this.renderNumbers()}.</div>` : null}<div class=${safeClassMap(CSS.stepperItemHeaderText)}><span class=${safeClassMap(CSS.stepperItemHeading)}>${this.heading}</span><span class=${safeClassMap(CSS.stepperItemDescription)}>${this.description}</span></div></div><div class=${safeClassMap({
|
|
140
|
+
return this.interactiveContainer({ disabled: this.disabled, children: html`<div class=${safeClassMap(CSS.container)}>${this.complete && html`<span aria-live=polite class=${safeClassMap(CSS.visuallyHidden)}>${this.messages.complete}</span>` || ""}<div class=${safeClassMap(CSS.stepperItemHeader)} tabindex=${// additional tab index logic needed because of display: contents for horizontal layout
|
|
141
|
+
(this.layout === "horizontal" && !this.disabled ? 0 : void 0) ?? nothing} ${ref(this.headerRef)}>${this.icon ? this.renderIcon() : null}${this.numbered ? html`<div class=${safeClassMap(CSS.stepperItemNumber)}>${this.renderNumbers()}.</div>` : null}<div class=${safeClassMap(CSS.stepperItemHeaderText)}><span class=${safeClassMap(CSS.stepperItemHeading)}>${this.heading}</span><span class=${safeClassMap(CSS.stepperItemDescription)}>${this.description}</span></div></div><div class=${safeClassMap({
|
|
158
142
|
[CSS.stepperItemContent]: true,
|
|
159
143
|
[CSS.hasSlottedContent]: this.stepperItemHasContent
|
|
160
144
|
})}><slot @slotchange=${(event) => this.stepperItemHasContent = slotChangeHasContent(event)}></slot></div></div>` });
|
|
@@ -12,7 +12,7 @@ export abstract class Swatch extends LitElement {
|
|
|
12
12
|
*
|
|
13
13
|
* @see [MDN - CSS color value](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value)
|
|
14
14
|
*/
|
|
15
|
-
accessor color: string;
|
|
15
|
+
accessor color: string | undefined;
|
|
16
16
|
/**
|
|
17
17
|
* When `true`, interaction is prevented and the component is displayed with lower opacity.
|
|
18
18
|
*
|
|
@@ -117,7 +117,7 @@ class Swatch extends LitElement {
|
|
|
117
117
|
if (this.selectionMode === "single") {
|
|
118
118
|
this.calciteInternalSyncSelectedSwatches.emit();
|
|
119
119
|
}
|
|
120
|
-
const selectedInParent = this.parentSwatchGroup
|
|
120
|
+
const selectedInParent = this.parentSwatchGroup?.selectedItems.includes(this.el);
|
|
121
121
|
if (!selectedInParent && selected && this.selectionMode !== "multiple") {
|
|
122
122
|
this.calciteInternalSwatchSelect.emit();
|
|
123
123
|
}
|
|
@@ -126,7 +126,7 @@ class Swatch extends LitElement {
|
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
handleColorChange(color) {
|
|
129
|
-
this.internalColor = color ? Color(color) :
|
|
129
|
+
this.internalColor = color ? Color(color) : void 0;
|
|
130
130
|
}
|
|
131
131
|
renderSwatchImage() {
|
|
132
132
|
return html`<div class=${safeClassMap(CSS.imageContainer)}><slot name=${SLOTS.image} @slotchange=${this.handleSlotImageChange}></slot></div>`;
|