@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
|
@@ -58,26 +58,22 @@ export abstract class InputDatePicker extends LitElement {
|
|
|
58
58
|
* @default false
|
|
59
59
|
*/
|
|
60
60
|
accessor disabled: boolean;
|
|
61
|
-
/** Specifies the component's fallback `placement` for slotted content when
|
|
62
|
-
accessor flipPlacements: FlipPlacement[];
|
|
61
|
+
/** Specifies the component's fallback `placement` for slotted content when its initial or specified `placement` has insufficient space available. */
|
|
62
|
+
accessor flipPlacements: FlipPlacement[] | undefined;
|
|
63
63
|
/**
|
|
64
64
|
* When `true`, prevents focus trapping.
|
|
65
65
|
*
|
|
66
66
|
* @default false
|
|
67
67
|
*/
|
|
68
68
|
accessor focusTrapDisabled: boolean;
|
|
69
|
-
/**
|
|
70
|
-
|
|
71
|
-
*
|
|
72
|
-
* When not set, the component is associated with its ancestor form element, if one exists.
|
|
73
|
-
*/
|
|
74
|
-
accessor form: string;
|
|
69
|
+
/** Specifies the `id` of the component's associated form. When not set, the component is associated with its ancestor form element, if one exists. */
|
|
70
|
+
accessor form: string | undefined;
|
|
75
71
|
/** Specifies the heading level number of the component's `heading` for proper document structure, without affecting visual styling. */
|
|
76
|
-
accessor headingLevel: HeadingLevel;
|
|
72
|
+
accessor headingLevel: HeadingLevel | undefined;
|
|
77
73
|
/** Specifies an accessible label for the component. */
|
|
78
|
-
accessor label: string;
|
|
74
|
+
accessor label: string | undefined;
|
|
79
75
|
/** Specifies the component's label text. */
|
|
80
|
-
accessor labelText: string;
|
|
76
|
+
accessor labelText: string | undefined;
|
|
81
77
|
/**
|
|
82
78
|
* Defines the component's layout.
|
|
83
79
|
*
|
|
@@ -88,9 +84,9 @@ export abstract class InputDatePicker extends LitElement {
|
|
|
88
84
|
* When the component resides in a form,
|
|
89
85
|
* specifies the latest allowed date ("yyyy-mm-dd").
|
|
90
86
|
*/
|
|
91
|
-
accessor max: string;
|
|
87
|
+
accessor max: string | undefined;
|
|
92
88
|
/** Specifies the latest allowed date as a full date object. */
|
|
93
|
-
accessor maxAsDate: Date;
|
|
89
|
+
accessor maxAsDate: Date | undefined;
|
|
94
90
|
/** Overrides individual strings used by the component. */
|
|
95
91
|
accessor messageOverrides: {
|
|
96
92
|
chooseDate?: string;
|
|
@@ -104,9 +100,9 @@ export abstract class InputDatePicker extends LitElement {
|
|
|
104
100
|
* When the component resides in a form,
|
|
105
101
|
* specifies the earliest allowed date ("yyyy-mm-dd").
|
|
106
102
|
*/
|
|
107
|
-
accessor min: string;
|
|
103
|
+
accessor min: string | undefined;
|
|
108
104
|
/** Specifies the earliest allowed date as a full date object. */
|
|
109
|
-
accessor minAsDate: Date;
|
|
105
|
+
accessor minAsDate: Date | undefined;
|
|
110
106
|
/**
|
|
111
107
|
* Specifies the component's month style.
|
|
112
108
|
*
|
|
@@ -114,9 +110,9 @@ export abstract class InputDatePicker extends LitElement {
|
|
|
114
110
|
*/
|
|
115
111
|
accessor monthStyle: "abbreviated" | "wide";
|
|
116
112
|
/** Specifies the name of the component. Required to pass the component's `value` on form submission. */
|
|
117
|
-
accessor name: string;
|
|
113
|
+
accessor name: string | undefined;
|
|
118
114
|
/** Specifies the Unicode numeral system used by the component for localization. This property cannot be dynamically changed. */
|
|
119
|
-
accessor numberingSystem: NumberingSystem;
|
|
115
|
+
accessor numberingSystem: NumberingSystem | undefined;
|
|
120
116
|
/**
|
|
121
117
|
* When `true`, displays the `calcite-date-picker` component.
|
|
122
118
|
*
|
|
@@ -179,18 +175,16 @@ export abstract class InputDatePicker extends LitElement {
|
|
|
179
175
|
*/
|
|
180
176
|
accessor status: Status;
|
|
181
177
|
/**
|
|
182
|
-
* When `true` and the component is `open`, disables top layer placement.
|
|
183
|
-
*
|
|
184
|
-
* Only set this if you need complex z-index control or if top layer placement causes conflicts with third-party components.
|
|
178
|
+
* 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.
|
|
185
179
|
*
|
|
186
180
|
* @default false
|
|
187
181
|
* @see [MDN - Top Layer](https://developer.mozilla.org/en-US/docs/Glossary/Top_layer)
|
|
188
182
|
*/
|
|
189
183
|
accessor topLayerDisabled: boolean;
|
|
190
184
|
/** Specifies the validation icon to display under the component. */
|
|
191
|
-
accessor validationIcon: IconName | boolean;
|
|
185
|
+
accessor validationIcon: IconName | boolean | undefined;
|
|
192
186
|
/** Specifies the validation message to display under the component. */
|
|
193
|
-
accessor validationMessage: string;
|
|
187
|
+
accessor validationMessage: string | undefined;
|
|
194
188
|
/**
|
|
195
189
|
* The component's current validation state.
|
|
196
190
|
*
|
|
@@ -200,7 +194,7 @@ export abstract class InputDatePicker extends LitElement {
|
|
|
200
194
|
/** Selected date as a string in ISO format (`"yyyy-mm-dd"`). */
|
|
201
195
|
accessor value: string | string[];
|
|
202
196
|
/** The component's `value` as a full date object. */
|
|
203
|
-
accessor valueAsDate: Date | Date[];
|
|
197
|
+
accessor valueAsDate: Date | Date[] | undefined;
|
|
204
198
|
/**
|
|
205
199
|
* Updates the component's position.
|
|
206
200
|
*
|
|
@@ -199,19 +199,19 @@ class InputDatePicker extends LitElement {
|
|
|
199
199
|
const minSource = getMinMaxSource(changes, "min");
|
|
200
200
|
const maxSource = getMinMaxSource(changes, "max");
|
|
201
201
|
if (minSource === "min") {
|
|
202
|
-
this.minAsDate = dateFromISO(this.min);
|
|
202
|
+
this.minAsDate = dateFromISO(this.min) ?? void 0;
|
|
203
203
|
} else if (minSource === "minAsDate") {
|
|
204
|
-
this.minAsDate = dateFromISO(dateToISO(this.minAsDate));
|
|
204
|
+
this.minAsDate = dateFromISO(dateToISO(this.minAsDate)) ?? void 0;
|
|
205
205
|
}
|
|
206
206
|
if (maxSource === "max") {
|
|
207
|
-
this.maxAsDate = dateFromISO(this.max);
|
|
207
|
+
this.maxAsDate = dateFromISO(this.max) ?? void 0;
|
|
208
208
|
} else if (maxSource === "maxAsDate") {
|
|
209
|
-
this.maxAsDate = dateFromISO(dateToISO(this.maxAsDate));
|
|
209
|
+
this.maxAsDate = dateFromISO(dateToISO(this.maxAsDate)) ?? void 0;
|
|
210
210
|
}
|
|
211
211
|
if ((minSource || maxSource) && !Array.isArray(this.valueAsDate)) {
|
|
212
212
|
const validValueAsDate = dateFromRange(this.valueAsDate, this.minAsDate, this.maxAsDate);
|
|
213
213
|
if (validValueAsDate !== this.valueAsDate) {
|
|
214
|
-
this.valueAsDate = validValueAsDate;
|
|
214
|
+
this.valueAsDate = validValueAsDate ?? void 0;
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
if (changes.has("open") && (this.hasUpdated || this.open !== false)) {
|
|
@@ -255,7 +255,7 @@ class InputDatePicker extends LitElement {
|
|
|
255
255
|
if (Array.isArray(newValue)) {
|
|
256
256
|
newValueAsDate = getValueAsDateRange(newValue);
|
|
257
257
|
} else if (newValue) {
|
|
258
|
-
newValueAsDate = dateFromISO(newValue);
|
|
258
|
+
newValueAsDate = dateFromISO(newValue) ?? void 0;
|
|
259
259
|
} else {
|
|
260
260
|
newValueAsDate = void 0;
|
|
261
261
|
}
|
|
@@ -333,7 +333,7 @@ class InputDatePicker extends LitElement {
|
|
|
333
333
|
const wasToggleClicked = path.find((el) => el.classList?.contains(CSS.toggleIcon));
|
|
334
334
|
if (wasToggleClicked) {
|
|
335
335
|
const targetInput = position === "start" ? startInputRef : endInputRef;
|
|
336
|
-
targetInput.value
|
|
336
|
+
targetInput.value?.setFocus();
|
|
337
337
|
}
|
|
338
338
|
if (!range || !this.open || currentOpenInput === position) {
|
|
339
339
|
this.open = !this.open;
|
|
@@ -341,7 +341,7 @@ class InputDatePicker extends LitElement {
|
|
|
341
341
|
}
|
|
342
342
|
setFilteredPlacements() {
|
|
343
343
|
const { el, flipPlacements } = this;
|
|
344
|
-
this.filteredFlipPlacements = flipPlacements ? filterValidFlipPlacements(flipPlacements, el) :
|
|
344
|
+
this.filteredFlipPlacements = flipPlacements ? filterValidFlipPlacements(flipPlacements, el) : void 0;
|
|
345
345
|
}
|
|
346
346
|
onLabelClick() {
|
|
347
347
|
this.setFocus();
|
|
@@ -371,7 +371,7 @@ class InputDatePicker extends LitElement {
|
|
|
371
371
|
commitValue() {
|
|
372
372
|
const { focusedInput, value } = this;
|
|
373
373
|
const focusedInputRef = this.getInputRef(focusedInput);
|
|
374
|
-
const date = dateFromLocalizedString(focusedInputRef.value
|
|
374
|
+
const date = focusedInputRef.value ? dateFromLocalizedString(focusedInputRef.value?.value, this.localeData) : void 0;
|
|
375
375
|
const dateAsISO = dateToISO(date);
|
|
376
376
|
const valueIsArray = Array.isArray(value);
|
|
377
377
|
if (this.range) {
|
|
@@ -382,21 +382,21 @@ class InputDatePicker extends LitElement {
|
|
|
382
382
|
}
|
|
383
383
|
if (date) {
|
|
384
384
|
this.setRangeValue([
|
|
385
|
-
focusedInput === "start" ? date : dateFromISO(value[0]),
|
|
386
|
-
focusedInput === "end" ? date : dateFromISO(value[1])
|
|
385
|
+
focusedInput === "start" ? date : dateFromISO(value[0]) ?? void 0,
|
|
386
|
+
focusedInput === "end" ? date : dateFromISO(value[1]) ?? void 0
|
|
387
387
|
]);
|
|
388
388
|
this.localizeInputValues();
|
|
389
389
|
} else {
|
|
390
390
|
this.setRangeValue([
|
|
391
|
-
focusedInput === "end"
|
|
392
|
-
focusedInput === "start"
|
|
391
|
+
focusedInput === "end" ? dateFromISO(value[0]) ?? void 0 : void 0,
|
|
392
|
+
focusedInput === "start" ? dateFromISO(value[1]) ?? void 0 : void 0
|
|
393
393
|
]);
|
|
394
394
|
}
|
|
395
395
|
} else {
|
|
396
396
|
if (date) {
|
|
397
397
|
this.setRangeValue([
|
|
398
|
-
focusedInput === "start" ? date : dateFromISO(value[0]),
|
|
399
|
-
focusedInput === "end" ? date : dateFromISO(value[1])
|
|
398
|
+
focusedInput === "start" ? date : dateFromISO(value[0]) ?? void 0,
|
|
399
|
+
focusedInput === "end" ? date : dateFromISO(value[1]) ?? void 0
|
|
400
400
|
]);
|
|
401
401
|
this.localizeInputValues();
|
|
402
402
|
}
|
|
@@ -520,7 +520,7 @@ class InputDatePicker extends LitElement {
|
|
|
520
520
|
}
|
|
521
521
|
restoreInputFocus(isDatePickerClosed = false) {
|
|
522
522
|
if (!this.range) {
|
|
523
|
-
this.startInputRef.value
|
|
523
|
+
this.startInputRef.value?.setFocus();
|
|
524
524
|
this.open = false;
|
|
525
525
|
return;
|
|
526
526
|
}
|
|
@@ -533,7 +533,7 @@ class InputDatePicker extends LitElement {
|
|
|
533
533
|
if (this.shouldFocusRangeStart() || this.rangeStartValueChangedByUser) {
|
|
534
534
|
return;
|
|
535
535
|
}
|
|
536
|
-
if (this.proximitySelectionDisabled && this.valueAsDate[1] === null) {
|
|
536
|
+
if (this.proximitySelectionDisabled && this.valueAsDate && this.valueAsDate[1] === null) {
|
|
537
537
|
return;
|
|
538
538
|
}
|
|
539
539
|
this.open = false;
|
|
@@ -542,8 +542,8 @@ class InputDatePicker extends LitElement {
|
|
|
542
542
|
localizeInputValues() {
|
|
543
543
|
const date = dateFromRange(this.range ? Array.isArray(this.valueAsDate) && this.valueAsDate[0] || void 0 : this.valueAsDate, this.minAsDate, this.maxAsDate);
|
|
544
544
|
const endDate = this.range ? dateFromRange(Array.isArray(this.valueAsDate) && this.valueAsDate[1] || void 0, this.minAsDate, this.maxAsDate) : null;
|
|
545
|
-
this.setInputValue((date && this.dateTimeFormat
|
|
546
|
-
this.setInputValue(
|
|
545
|
+
this.setInputValue((date && this.dateTimeFormat?.format(date)) ?? "", "start");
|
|
546
|
+
this.setInputValue(this.range && endDate && this.dateTimeFormat?.format(endDate) || "", "end");
|
|
547
547
|
}
|
|
548
548
|
getInputRef(input = "start") {
|
|
549
549
|
return input === "start" ? this.startInputRef : this.endInputRef;
|
|
@@ -562,12 +562,12 @@ class InputDatePicker extends LitElement {
|
|
|
562
562
|
const { value: oldValue } = this;
|
|
563
563
|
const oldValueIsArray = Array.isArray(oldValue);
|
|
564
564
|
const valueIsArray = Array.isArray(valueAsDate);
|
|
565
|
-
const newStartDate = valueIsArray ? valueAsDate[0] :
|
|
565
|
+
const newStartDate = valueIsArray ? valueAsDate[0] : void 0;
|
|
566
566
|
let newStartDateISO = valueIsArray ? dateToISO(newStartDate) : "";
|
|
567
567
|
if (newStartDateISO) {
|
|
568
568
|
newStartDateISO = this.getNormalizedDate(newStartDateISO);
|
|
569
569
|
}
|
|
570
|
-
const newEndDate = valueIsArray ? valueAsDate[1] :
|
|
570
|
+
const newEndDate = valueIsArray ? valueAsDate[1] : void 0;
|
|
571
571
|
let newEndDateISO = valueIsArray ? dateToISO(newEndDate) : "";
|
|
572
572
|
if (newEndDateISO) {
|
|
573
573
|
newEndDateISO = this.getNormalizedDate(newEndDateISO);
|
|
@@ -602,7 +602,7 @@ class InputDatePicker extends LitElement {
|
|
|
602
602
|
return;
|
|
603
603
|
}
|
|
604
604
|
this.userChangedValue = true;
|
|
605
|
-
this.valueAsDate = newValue ? dateFromISO(newValue) : void 0;
|
|
605
|
+
this.valueAsDate = newValue ? dateFromISO(newValue) ?? void 0 : void 0;
|
|
606
606
|
this.value = newValue || "";
|
|
607
607
|
const changeEvent = this.calciteInputDatePickerChange.emit();
|
|
608
608
|
if (changeEvent.defaultPrevented) {
|
|
@@ -632,7 +632,7 @@ class InputDatePicker extends LitElement {
|
|
|
632
632
|
}
|
|
633
633
|
focusInput() {
|
|
634
634
|
const focusedInput = this.focusedInput === "start" ? this.startInputRef : this.endInputRef;
|
|
635
|
-
focusedInput.value
|
|
635
|
+
focusedInput.value?.setFocus();
|
|
636
636
|
}
|
|
637
637
|
render() {
|
|
638
638
|
const { disabled, messages: { _lang: effectiveLocale }, messages, numberingSystem, readOnly } = this;
|
|
@@ -12,7 +12,7 @@ import type { IconName } from "../calcite-icon/interfaces.js";
|
|
|
12
12
|
*/
|
|
13
13
|
export abstract class InputMessage extends LitElement {
|
|
14
14
|
/** Specifies an icon to display. */
|
|
15
|
-
accessor icon: IconName | boolean;
|
|
15
|
+
accessor icon: IconName | boolean | undefined;
|
|
16
16
|
/**
|
|
17
17
|
* When `true` and the element direction is right-to-left (`"rtl"`), flips the component`s `icon`.
|
|
18
18
|
*
|
|
@@ -42,7 +42,7 @@ export abstract class InputNumber extends LitElement {
|
|
|
42
42
|
*
|
|
43
43
|
* @see [MDN - autocomplete](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete)
|
|
44
44
|
*/
|
|
45
|
-
accessor autocomplete: AutoFill;
|
|
45
|
+
accessor autocomplete: AutoFill | undefined;
|
|
46
46
|
/**
|
|
47
47
|
* When `true` and the component has a `value`, a clear button is displayed.
|
|
48
48
|
*
|
|
@@ -56,12 +56,8 @@ export abstract class InputNumber extends LitElement {
|
|
|
56
56
|
* @see [MDN - disabled](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled)
|
|
57
57
|
*/
|
|
58
58
|
accessor disabled: boolean;
|
|
59
|
-
/**
|
|
60
|
-
|
|
61
|
-
*
|
|
62
|
-
* When not set, the component is associated with its ancestor form element, if one exists.
|
|
63
|
-
*/
|
|
64
|
-
accessor form: string;
|
|
59
|
+
/** Specifies the `id` of the component's associated form. When not set, the component is associated with its ancestor form element, if one exists. */
|
|
60
|
+
accessor form: string | undefined;
|
|
65
61
|
/**
|
|
66
62
|
* When `true`, number values are displayed with a group separator corresponding to the language and country format.
|
|
67
63
|
*
|
|
@@ -73,7 +69,7 @@ export abstract class InputNumber extends LitElement {
|
|
|
73
69
|
*
|
|
74
70
|
* @futureBreaking Remove boolean type as it is not supported.
|
|
75
71
|
*/
|
|
76
|
-
accessor icon: IconName | boolean;
|
|
72
|
+
accessor icon: IconName | boolean | undefined;
|
|
77
73
|
/**
|
|
78
74
|
* When `true` and the element direction is right-to-left (`"rtl"`), flips the component`s `icon`.
|
|
79
75
|
*
|
|
@@ -87,9 +83,9 @@ export abstract class InputNumber extends LitElement {
|
|
|
87
83
|
*/
|
|
88
84
|
accessor integer: boolean;
|
|
89
85
|
/** Specifies an accessible label for the component's button or hyperlink. */
|
|
90
|
-
accessor label: string;
|
|
86
|
+
accessor label: string | undefined;
|
|
91
87
|
/** Specifies the component's label text. */
|
|
92
|
-
accessor labelText: string;
|
|
88
|
+
accessor labelText: string | undefined;
|
|
93
89
|
/**
|
|
94
90
|
* When `true`, displays a busy indicator.
|
|
95
91
|
*
|
|
@@ -102,7 +98,7 @@ export abstract class InputNumber extends LitElement {
|
|
|
102
98
|
*
|
|
103
99
|
* @see [MDN - max](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#max)
|
|
104
100
|
*/
|
|
105
|
-
accessor max: number;
|
|
101
|
+
accessor max: number | undefined;
|
|
106
102
|
/**
|
|
107
103
|
* When the component resides in a form,
|
|
108
104
|
* specifies the maximum length of text for the component's `value`.
|
|
@@ -110,10 +106,13 @@ export abstract class InputNumber extends LitElement {
|
|
|
110
106
|
* @deprecated in v3.0.0, removal target v6.0.0 - This property has no effect on the component.
|
|
111
107
|
* @see [MDN - maxlength](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#maxlength)
|
|
112
108
|
*/
|
|
113
|
-
accessor maxLength: number;
|
|
109
|
+
accessor maxLength: number | undefined;
|
|
114
110
|
/** Overrides individual strings used by the component. */
|
|
115
111
|
accessor messageOverrides: {
|
|
112
|
+
cancelInlineEditing?: string;
|
|
116
113
|
clear?: string;
|
|
114
|
+
confirmInlineEditingChanges?: string;
|
|
115
|
+
enableInlineEditing?: string;
|
|
117
116
|
loading?: string;
|
|
118
117
|
required?: string;
|
|
119
118
|
};
|
|
@@ -123,7 +122,7 @@ export abstract class InputNumber extends LitElement {
|
|
|
123
122
|
*
|
|
124
123
|
* @see [MDN - min](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#min)
|
|
125
124
|
*/
|
|
126
|
-
accessor min: number;
|
|
125
|
+
accessor min: number | undefined;
|
|
127
126
|
/**
|
|
128
127
|
* When the component resides in a form,
|
|
129
128
|
* specifies the minimum length of text for the component's `value`.
|
|
@@ -131,15 +130,13 @@ export abstract class InputNumber extends LitElement {
|
|
|
131
130
|
* @deprecated in v3.0.0, removal target v6.0.0 - This property has no effect on the component.
|
|
132
131
|
* @see [MDN - minlength](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#minlength)
|
|
133
132
|
*/
|
|
134
|
-
accessor minLength: number;
|
|
133
|
+
accessor minLength: number | undefined;
|
|
135
134
|
/**
|
|
136
|
-
* Specifies the name of the component.
|
|
137
|
-
*
|
|
138
|
-
* Required to pass the component's `value` on form submission.
|
|
135
|
+
* Specifies the name of the component. Required to pass the component's `value` on form submission.
|
|
139
136
|
*
|
|
140
137
|
* @see [MDN - name](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#name)
|
|
141
138
|
*/
|
|
142
|
-
accessor name: string;
|
|
139
|
+
accessor name: string | undefined;
|
|
143
140
|
/**
|
|
144
141
|
* Specifies the placement of the buttons.
|
|
145
142
|
*
|
|
@@ -147,15 +144,15 @@ export abstract class InputNumber extends LitElement {
|
|
|
147
144
|
*/
|
|
148
145
|
accessor numberButtonType: InputPlacement;
|
|
149
146
|
/** Specifies the Unicode numeral system used by the component for localization. */
|
|
150
|
-
accessor numberingSystem: NumberingSystem;
|
|
147
|
+
accessor numberingSystem: NumberingSystem | undefined;
|
|
151
148
|
/**
|
|
152
149
|
* Specifies the component's placeholder text.
|
|
153
150
|
*
|
|
154
151
|
* @see [MDN - placeholder](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#placeholder)
|
|
155
152
|
*/
|
|
156
|
-
accessor placeholder: string;
|
|
153
|
+
accessor placeholder: string | undefined;
|
|
157
154
|
/** Specifies text to display at the start of the component. */
|
|
158
|
-
accessor prefixText: string;
|
|
155
|
+
accessor prefixText: string | undefined;
|
|
159
156
|
/**
|
|
160
157
|
* When `true`, the component's `value` can be read, but cannot be modified.
|
|
161
158
|
*
|
|
@@ -187,13 +184,13 @@ export abstract class InputNumber extends LitElement {
|
|
|
187
184
|
*
|
|
188
185
|
* @see [MDN - step](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/step)
|
|
189
186
|
*/
|
|
190
|
-
accessor step: number | "any";
|
|
187
|
+
accessor step: number | "any" | undefined;
|
|
191
188
|
/** Specifies text to display at the end of the component. */
|
|
192
|
-
accessor suffixText: string;
|
|
189
|
+
accessor suffixText: string | undefined;
|
|
193
190
|
/** Specifies the validation icon to display under the component. */
|
|
194
|
-
accessor validationIcon: IconName | boolean;
|
|
191
|
+
accessor validationIcon: IconName | boolean | undefined;
|
|
195
192
|
/** Specifies the validation message to display under the component. */
|
|
196
|
-
accessor validationMessage: string;
|
|
193
|
+
accessor validationMessage: string | undefined;
|
|
197
194
|
/**
|
|
198
195
|
* The component's current validation state.
|
|
199
196
|
*
|
|
@@ -49,7 +49,7 @@ const DIRECTION = {
|
|
|
49
49
|
down: "down"
|
|
50
50
|
};
|
|
51
51
|
const NUDGE_DELAY_IN_MS = 150;
|
|
52
|
-
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;--calcite-internal-input-number-focus-outline-color: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) );--calcite-internal-input-number-number-button-item-height: auto}:host([scale=s]){--calcite-internal-input-number-icon-padding-inline: var(--calcite-spacing-fixed-sm)}:host([scale=s]) input,:host([scale=s]) .prefix,:host([scale=s]) .suffix{font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);block-size:var(--calcite-input-number-height, 1.5rem)}:host([scale=s]) input{padding-inline:var(--calcite-spacing-sm)}:host([scale=s]) .has-prefix input{padding-inline-start:var(--calcite-spacing-xxs)}:host([scale=s]) .prefix{padding-inline:var(--calcite-spacing-sm) var(--calcite-spacing-xxs)}:host([scale=s]) .has-suffix input{padding-inline-end:var(--calcite-spacing-xxs)}:host([scale=s]) .suffix{padding-inline:var(--calcite-spacing-xxs) var(--calcite-spacing-sm)}:host([scale=s]) .number-button-wrapper,:host([scale=s]) .action-wrapper{block-size:var(--calcite-input-number-height, 1.5rem)}:host([scale=s]) .clear-button{block-size:var(--calcite-spacing-xxl)}:host([scale=s]):host([number-button-type=horizontal]){--calcite-internal-input-number-number-button-item-horizontal-padding: var(--calcite-spacing-xxs)}:host([scale=s]):host([number-button-type=vertical]){--calcite-internal-input-number-number-button-item-height: 8px;--calcite-internal-input-number-number-button-item-horizontal-padding: var(--calcite-spacing-xxs);--calcite-internal-input-number-number-button-item-vertical-padding: 3px}:host([scale=m]){--calcite-internal-input-number-icon-padding-inline: var(--calcite-spacing-fixed-md)}:host([scale=m]) input,:host([scale=m]) .prefix,:host([scale=m]) .suffix{font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);block-size:var(--calcite-input-number-height, 2rem)}:host([scale=m]) input{padding-inline:var(--calcite-spacing-md)}:host([scale=m]) .has-prefix input{padding-inline-start:var(--calcite-spacing-xs)}:host([scale=m]) .prefix{padding-inline:var(--calcite-spacing-md) var(--calcite-spacing-xs)}:host([scale=m]) .has-suffix input{padding-inline-end:var(--calcite-spacing-xs)}:host([scale=m]) .suffix{padding-inline:var(--calcite-spacing-xs) var(--calcite-spacing-md)}:host([scale=m]) .number-button-wrapper,:host([scale=m]) .action-wrapper{block-size:var(--calcite-input-number-height, 2rem)}:host([scale=m]):host([number-button-type=horizontal]){--calcite-internal-input-number-number-button-item-horizontal-padding: var(--calcite-space-sm)}:host([scale=m]):host([number-button-type=vertical]){--calcite-internal-input-number-number-button-item-height: 11px;--calcite-internal-input-number-number-button-item-horizontal-padding: var(--calcite-space-sm);--calcite-internal-input-number-number-button-item-vertical-padding: var(--calcite-space-2xs)}:host([scale=l]){--calcite-internal-input-number-icon-padding-inline: var(--calcite-spacing-fixed-lg)}:host([scale=l]) input,:host([scale=l]) .prefix,:host([scale=l]) .suffix{font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);block-size:var(--calcite-input-number-height, 2.75rem)}:host([scale=l]) input{padding-inline:var(--calcite-spacing-lg)}:host([scale=l]) .has-prefix input{padding-inline-start:var(--calcite-spacing-sm)}:host([scale=l]) .prefix{padding-inline:var(--calcite-spacing-lg) var(--calcite-spacing-sm)}:host([scale=l]) .has-suffix input{padding-inline-end:var(--calcite-spacing-sm)}:host([scale=l]) .suffix{padding-inline:var(--calcite-spacing-sm) var(--calcite-spacing-lg)}:host([scale=l]) .number-button-wrapper,:host([scale=l]) .action-wrapper{block-size:var(--calcite-input-number-height, 2.75rem)}:host([scale=l]):host([number-button-type=horizontal]){--calcite-internal-input-number-number-button-item-horizontal-padding: var(--calcite-spacing-sm-plus)}:host([scale=l]):host([number-button-type=vertical]){--calcite-internal-input-number-number-button-item-height: 16px;--calcite-internal-input-number-number-button-item-horizontal-padding: var(--calcite-spacing-sm-plus);--calcite-internal-input-number-number-button-item-vertical-padding: 5px}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}input{transition:var(--calcite-animation-timing),block-size 0,outline-offset 0s;-webkit-appearance:none;position:relative;margin:0;box-sizing:border-box;display:flex;max-block-size:100%;inline-size:100%;max-inline-size:100%;flex:1 1 0%;text-overflow:ellipsis;font-family:inherit;font-weight:var(--calcite-font-weight-normal);outline:none;background-color:var(--calcite-input-number-background-color, var(--calcite-color-foreground-1));color:var(--calcite-input-number-text-color, var(--calcite-color-text-1));text-align:var(--calcite-internal-input-number-alignment)}input:placeholder-shown{text-overflow:ellipsis}.element-wrapper,input{border-radius:var(--calcite-input-number-corner-radius, var(--calcite-corner-radius-sharp))}.has-prefix input,.element-wrapper:has(.icon) input{border-start-start-radius:0;border-end-start-radius:0}.element-wrapper:has(.number-button-item--horizontal[data-adjustment=down]) input,.has-prefix input,.element-wrapper:has(.icon) input{border-inline-start-width:0}.element-wrapper:has(.clear-button) input,.has-suffix input,.element-wrapper:has(.number-button-item--horizontal[data-adjustment=up]) input,.element-wrapper:has(.number-button-item) input{border-inline-end-width:0}.has-suffix input,.clearable input,:host(:not([read-only])) input,.suffix,.clear-button{border-start-end-radius:0;border-end-end-radius:0}.has-prefix :is(.prefix:first-child,.loader+.prefix),:host([number-button-type=horizontal]) .number-button-item[data-adjustment=down],.element-wrapper:has(.icon) :is(.icon:first-child,.loader+.icon){border-start-start-radius:var(--calcite-input-number-corner-radius, var(--calcite-corner-radius-sharp));border-end-start-radius:var(--calcite-input-number-corner-radius, var(--calcite-corner-radius-sharp))}:host([read-only]) .suffix,:host([read-only]) .wrapper:not(.has-suffix) .clear-button,:host([number-button-type=horizontal]) .number-button-item[data-adjustment=up]{border-end-end-radius:var(--calcite-input-number-corner-radius, var(--calcite-corner-radius-sharp));border-start-end-radius:var(--calcite-input-number-corner-radius, var(--calcite-corner-radius-sharp))}:host([number-button-type=vertical]) .number-button-item[data-adjustment=down]{border-block-start-width:0px;border-end-end-radius:var(--calcite-input-number-corner-radius, var(--calcite-corner-radius-sharp))}:host([number-button-type=vertical]) .number-button-item[data-adjustment=up]{border-start-end-radius:var(--calcite-input-number-corner-radius, var(--calcite-corner-radius-sharp))}:host(:not([read-only])[number-button-type=horizontal]) .prefix,:host(:not([read-only])[number-button-type=horizontal]) input,.has-prefix input{border-start-start-radius:0;border-end-start-radius:0}input{border-width:1px;border-style:solid;border-color:var(--calcite-input-number-border-color, var(--calcite-color-border-input))}input::placeholder,input:-ms-input-placeholder,input::-ms-input-placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-input-number-placeholder-text-color, var(--calcite-color-text-3))}input:focus{border-color:var(--calcite-color-brand);color:var(--calcite-input-number-text-color-focus, var(--calcite-color-text-1))}input[readonly]{font-weight:var(--calcite-font-weight-medium);background-color:var(--calcite-input-number-background-color, var(--calcite-color-background))}input[readonly]:focus{color:var(--calcite-input-number-text-color-focus, var(--calcite-color-text-1))}:host([read-only]) .prefix,:host([read-only]) .icon,:host([read-only]) .clear-button,:host([read-only]) .suffix{background-color:var(--calcite-input-number-background-color, var(--calcite-color-background))}.element-wrapper{position:relative;display:inline-flex;flex:1 1 0%;align-items:center;order:3;isolation:isolate}.element-wrapper:has(input:focus){outline:var(--calcite-border-width-md) solid var(--calcite-internal-input-number-focus-outline-color);outline-offset:calc(var(--calcite-border-width-sm) * -2)}.element-wrapper:has(input:focus) input{z-index:calc(var(--calcite-z-index) * -1)}:host([status=invalid]) .prefix,:host([status=invalid]) .icon,:host([status=invalid]) input,:host([status=invalid]) .clear-button,:host([status=invalid]) .suffix,:host([status=invalid]) .number-button-item{border-color:var(--calcite-color-status-danger)}:host([status=invalid]){--calcite-internal-input-number-focus-outline-color: var(--calcite-color-status-danger)}.icon{box-sizing:border-box;display:flex;align-self:stretch;border-width:var(--calcite-border-width-sm);border-style:solid;border-color:var(--calcite-input-number-border-color, var(--calcite-color-border-input));border-inline-end-width:var(--calcite-border-width-none);background-color:var(--calcite-input-number-background-color, var(--calcite-color-foreground-1));--calcite-icon-color: var( --calcite-input-number-icon-color, var(--calcite-ui-icon-color, var(--calcite-color-text-3)) );align-items:center;padding-inline-start:var(--calcite-internal-input-number-icon-padding-inline)}.element-wrapper:has(.number-button-item--horizontal[data-adjustment=down]) .icon,.has-prefix .icon{border-inline-start-width:0}.clear-button{box-sizing:border-box;display:flex;align-self:stretch;order:4;border-width:var(--calcite-border-width-sm);border-style:solid;border-color:var(--calcite-input-number-border-color, var(--calcite-color-border-input));border-inline-start-width:var(--calcite-border-width-none);background-color:var(--calcite-input-number-background-color, var(--calcite-color-foreground-1))}.has-suffix .clear-button,.element-wrapper:has(.number-button-item.number-button-item--horizontal[data-adjustment=up]) .clear-button,.element-wrapper:has(.number-button-item) .clear-button{border-inline-end-width:0}.loader{inset-block-start:var(--calcite-border-width-sm);inset-inline:var(--calcite-border-width-sm);pointer-events:none;position:absolute;display:block}.loader calcite-progress{--calcite-progress-background-color: var(--calcite-input-loading-background-color);--calcite-progress-fill-color: var(--calcite-input-loading-fill-color)}.action-wrapper{order:7;display:flex}.prefix,.suffix{box-sizing:border-box;display:flex;block-size:auto;min-block-size:100%;-webkit-user-select:none;user-select:none;align-content:center;align-items:center;overflow-wrap:break-word;border-width:1px;border-style:solid;line-height:1;font-weight:var(--calcite-font-weight-regular);border-color:var(--calcite-input-number-border-color, var(--calcite-color-border-input))}.prefix{order:0;border-inline-end-width:0px;inline-size:var(--calcite-input-prefix-size, auto);background-color:var(--calcite-input-number-background-color, var(--calcite-color-foreground-1));color:var(--calcite-input-prefix-text-color, var(--calcite-color-text-2))}.suffix{order:5;border-inline-start-width:0px;inline-size:var(--calcite-input-suffix-size, auto);background-color:var(--calcite-input-number-background-color, var(--calcite-color-foreground-1));color:var(--calcite-input-suffix-text-color, var(--calcite-color-text-2))}.element-wrapper:has(.number-button-item--horizontal[data-adjustment=down]) .prefix{border-inline-start-width:var(--calcite-border-width-none)}.element-wrapper:has(.number-button-item--horizontal[data-adjustment=up]) .suffix,.element-wrapper:has(.number-button-item) .suffix{border-inline-end-width:var(--calcite-border-width-none)}:host([alignment=start]){--calcite-internal-input-number-alignment: start}:host([alignment=center]){--calcite-internal-input-number-alignment: center}:host([alignment=end]){--calcite-internal-input-number-alignment: end}.number-button-wrapper{pointer-events:none;box-sizing:border-box;display:flex;flex-direction:column;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;order:6}:host([number-button-type=vertical]) .wrapper{flex-direction:row;display:flex}:host([number-button-type=vertical]) input{order:2}:host([number-button-type=horizontal]) .calcite--rtl .number-button-item[data-adjustment=down] calcite-action{transform:rotate(-90deg)}:host([number-button-type=horizontal]) .calcite--rtl .number-button-item[data-adjustment=up] calcite-action{transform:rotate(-90deg)}.number-button-item.number-button-item--horizontal[data-adjustment=down],.number-button-item.number-button-item--horizontal[data-adjustment=up]{max-block-size:100%;min-block-size:100%;align-self:stretch;order:1}.number-button-item.number-button-item--horizontal[data-adjustment=down] calcite-action,.number-button-item.number-button-item--horizontal[data-adjustment=up] calcite-action{transform:rotate(90deg)}.number-button-item.number-button-item--horizontal[data-adjustment=down]{border-inline-start-width:var(--calcite-border-width-sm);border-inline-end-width:0px;order:0;padding-inline-start:var(--calcite-internal-input-number-number-button-item-horizontal-padding)}.number-button-item.number-button-item--horizontal[data-adjustment=up]{order:5;padding-inline-end:var(--calcite-internal-input-number-number-button-item-horizontal-padding)}:host([number-button-type=vertical]) .number-button-item{padding-inline-end:var(--calcite-internal-input-number-number-button-item-horizontal-padding)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=up]{border-start-end-radius:var(--calcite-input-number-corner-radius, var(--calcite-corner-radius-sharp));border-block-end-width:var(--calcite-border-width-none);padding-block-start:var(--calcite-internal-input-number-number-button-item-vertical-padding)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=down]{border-block-start-width:0px;border-end-end-radius:var(--calcite-input-number-corner-radius, var(--calcite-corner-radius-sharp));padding-block-end:var(--calcite-internal-input-number-number-button-item-vertical-padding)}.number-button-item{max-block-size:50%;min-block-size:50%;pointer-events:initial;box-sizing:border-box;display:flex;cursor:pointer;align-items:center;align-self:center;border-width:var(--calcite-border-width-sm);border-style:solid;border-color:var(--calcite-input-number-border-color, var(--calcite-color-border-input));background-color:var(--calcite-input-number-background-color, var(--calcite-color-foreground-1));border-inline-start-width:var(--calcite-border-width-none)}.number-button-item:hover calcite-action{--calcite-action-background-color: var( --calcite-input-actions-background-color-hover, var(--calcite-color-foreground-2) );--calcite-action-text-color: var(--calcite-input-actions-icon-color-hover, var(--calcite-color-text-1))}.number-button-item:active calcite-action{--calcite-action-background-color: var( --calcite-input-actions-background-color-press, var(--calcite-color-foreground-3) );--calcite-action-text-color: var(--calcite-input-actions-icon-color-press, var(--calcite-color-text-1))}.number-button-item calcite-action{--calcite-internal-action-height: var(--calcite-internal-input-number-number-button-item-height);--calcite-internal-action-padding-inline: var(--calcite-spacing-none);--calcite-internal-action-padding-block: var(--calcite-spacing-none);--calcite-action-background-color: var(--calcite-input-actions-background-color);--calcite-action-text-color: var(--calcite-input-actions-icon-color)}.number-button-item calcite-action:hover{--calcite-action-background-color-hover: var(--calcite-input-actions-background-color-hover);--calcite-action-text-color-press: var(--calcite-input-actions-icon-color-hover)}.number-button-item calcite-action:active{--calcite-action-background-color-press: var(--calcite-input-actions-background-color-press);--calcite-action-text-color-press: var(--calcite-input-actions-icon-color-press)}.wrapper{position:relative;display:flex;flex-direction:row;align-items:center}:host(.no-bottom-border) input{border-block-end-width:0px}:host(.border-top-color-one) input{border-block-start-color:var(--calcite-color-border-1)}input.inline-child{background-color:transparent;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out}input.inline-child .editing-enabled{background-color:inherit}input.inline-child:not(.editing-enabled){display:flex;cursor:pointer;text-overflow:ellipsis;border-color:transparent;padding-inline-start:0}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}::placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-input-placeholder-text-color, var(--calcite-color-text-3))}.clear-button--container{display:flex;cursor:pointer;align-items:center}.clear-button--container:hover calcite-action{--calcite-action-background-color: var(--calcite-input-actions-background-color-hover, var(--calcite-color-foreground-3));--calcite-action-text-color: var(--calcite-input-actions-icon-color-hover, var(--calcite-color-text-1))}.clear-button--container:active calcite-action{--calcite-action-background-color: var(--calcite-input-actions-background-color-press, var(--calcite-color-border-2));--calcite-action-text-color: var(--calcite-input-actions-icon-color-press, var(--calcite-color-text-1))}.clear-button--container calcite-action{--calcite-internal-action-height: 100%;--calcite-internal-action-padding-inline: var(--calcite-spacing-none);--calcite-internal-action-padding-block: var(--calcite-spacing-none);--calcite-action-background-color: var(--calcite-input-actions-background-color, var(--calcite-color-foreground-2));--calcite-action-text-color: var(--calcite-input-actions-icon-color)}.clear-button--container calcite-action:hover{--calcite-action-background-color-hover: var(--calcite-input-actions-background-color-hover, var(--calcite-color-foreground-3));--calcite-action-text-color-press: var(--calcite-input-actions-icon-color-hover)}.clear-button--container calcite-action:active{--calcite-action-background-color-press: var(--calcite-input-actions-background-color-press, var(--calcite-color-border-2));--calcite-action-text-color-press: var(--calcite-input-actions-icon-color-press)}:host([scale=s]) .clear-button--container{padding:var(--calcite-spacing-xxs)}:host([scale=m]) .clear-button--container{padding:var(--calcite-spacing-xxs);padding-inline-end:var(--calcite-space-sm)}:host([scale=l]) .clear-button--container{padding-inline-end:var(--calcite-spacing-sm-plus)}`;
|
|
52
|
+
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;--calcite-internal-input-number-focus-outline-color: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) );--calcite-internal-input-number-number-button-item-height: auto}:host([scale=s]){--calcite-internal-input-number-icon-padding-inline: var(--calcite-spacing-fixed-sm)}:host([scale=s]) input,:host([scale=s]) .prefix,:host([scale=s]) .suffix{font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);block-size:var(--calcite-input-number-height, 1.5rem)}:host([scale=s]) input{padding-inline:var(--calcite-spacing-sm)}:host([scale=s]) .has-prefix input{padding-inline-start:var(--calcite-spacing-xxs)}:host([scale=s]) .prefix{padding-inline:var(--calcite-spacing-sm) var(--calcite-spacing-xxs)}:host([scale=s]) .has-suffix input{padding-inline-end:var(--calcite-spacing-xxs)}:host([scale=s]) .suffix{padding-inline:var(--calcite-spacing-xxs) var(--calcite-spacing-sm)}:host([scale=s]) .number-button-wrapper,:host([scale=s]) .action-wrapper{block-size:var(--calcite-input-number-height, 1.5rem)}:host([scale=s]) .clear-button{block-size:var(--calcite-spacing-xxl)}:host([scale=s]):host([number-button-type=horizontal]){--calcite-internal-input-number-number-button-item-horizontal-padding: var(--calcite-spacing-xxs)}:host([scale=s]):host([number-button-type=vertical]){--calcite-internal-input-number-number-button-item-height: 8px;--calcite-internal-input-number-number-button-item-horizontal-padding: var(--calcite-spacing-xxs);--calcite-internal-input-number-number-button-item-vertical-padding: 3px}:host([scale=m]){--calcite-internal-input-number-icon-padding-inline: var(--calcite-spacing-fixed-md)}:host([scale=m]) input,:host([scale=m]) .prefix,:host([scale=m]) .suffix{font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);block-size:var(--calcite-input-number-height, 2rem)}:host([scale=m]) input{padding-inline:var(--calcite-spacing-md)}:host([scale=m]) .has-prefix input{padding-inline-start:var(--calcite-spacing-xs)}:host([scale=m]) .prefix{padding-inline:var(--calcite-spacing-md) var(--calcite-spacing-xs)}:host([scale=m]) .has-suffix input{padding-inline-end:var(--calcite-spacing-xs)}:host([scale=m]) .suffix{padding-inline:var(--calcite-spacing-xs) var(--calcite-spacing-md)}:host([scale=m]) .number-button-wrapper,:host([scale=m]) .action-wrapper{block-size:var(--calcite-input-number-height, 2rem)}:host([scale=m]):host([number-button-type=horizontal]){--calcite-internal-input-number-number-button-item-horizontal-padding: var(--calcite-space-sm)}:host([scale=m]):host([number-button-type=vertical]){--calcite-internal-input-number-number-button-item-height: 11px;--calcite-internal-input-number-number-button-item-horizontal-padding: var(--calcite-space-sm);--calcite-internal-input-number-number-button-item-vertical-padding: var(--calcite-space-2xs)}:host([scale=l]){--calcite-internal-input-number-icon-padding-inline: var(--calcite-spacing-fixed-lg)}:host([scale=l]) input,:host([scale=l]) .prefix,:host([scale=l]) .suffix{font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);block-size:var(--calcite-input-number-height, 2.75rem)}:host([scale=l]) input{padding-inline:var(--calcite-spacing-lg)}:host([scale=l]) .has-prefix input{padding-inline-start:var(--calcite-spacing-sm)}:host([scale=l]) .prefix{padding-inline:var(--calcite-spacing-lg) var(--calcite-spacing-sm)}:host([scale=l]) .has-suffix input{padding-inline-end:var(--calcite-spacing-sm)}:host([scale=l]) .suffix{padding-inline:var(--calcite-spacing-sm) var(--calcite-spacing-lg)}:host([scale=l]) .number-button-wrapper,:host([scale=l]) .action-wrapper{block-size:var(--calcite-input-number-height, 2.75rem)}:host([scale=l]):host([number-button-type=horizontal]){--calcite-internal-input-number-number-button-item-horizontal-padding: var(--calcite-spacing-sm-plus)}:host([scale=l]):host([number-button-type=vertical]){--calcite-internal-input-number-number-button-item-height: 16px;--calcite-internal-input-number-number-button-item-horizontal-padding: var(--calcite-spacing-sm-plus);--calcite-internal-input-number-number-button-item-vertical-padding: 5px}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}input{transition:var(--calcite-animation-timing),block-size 0,outline-offset 0s;-webkit-appearance:none;position:relative;margin:0;box-sizing:border-box;display:flex;max-block-size:100%;inline-size:100%;max-inline-size:100%;flex:1 1 0%;text-overflow:ellipsis;font-family:inherit;font-weight:var(--calcite-font-weight-normal);outline:none;background-color:var(--calcite-input-number-background-color, var(--calcite-color-foreground-1));color:var(--calcite-input-number-text-color, var(--calcite-color-text-1));text-align:var(--calcite-internal-input-number-alignment)}input:placeholder-shown{text-overflow:ellipsis}.element-wrapper,input{border-radius:var(--calcite-input-number-corner-radius, var(--calcite-corner-radius-sharp))}.has-prefix input,.element-wrapper:has(.icon) input{border-start-start-radius:0;border-end-start-radius:0}.element-wrapper:has(.number-button-item--horizontal[data-adjustment=down]) input,.has-prefix input,.element-wrapper:has(.icon) input{border-inline-start-width:0}.element-wrapper:has(.clear-button) input,.has-suffix input,.element-wrapper:has(.number-button-item--horizontal[data-adjustment=up]) input,.element-wrapper:has(.number-button-item) input{border-inline-end-width:0}.has-suffix input,.clearable input,:host(:not([read-only])) input,.suffix,.clear-button{border-start-end-radius:0;border-end-end-radius:0}.has-prefix :is(.prefix:first-child,.loader+.prefix),:host([number-button-type=horizontal]) .number-button-item[data-adjustment=down],.element-wrapper:has(.icon) :is(.icon:first-child,.loader+.icon){border-start-start-radius:var(--calcite-input-number-corner-radius, var(--calcite-corner-radius-sharp));border-end-start-radius:var(--calcite-input-number-corner-radius, var(--calcite-corner-radius-sharp))}:host([read-only]) .suffix,:host([read-only]) .wrapper:not(.has-suffix) .clear-button,:host([number-button-type=horizontal]) .number-button-item[data-adjustment=up]{border-end-end-radius:var(--calcite-input-number-corner-radius, var(--calcite-corner-radius-sharp));border-start-end-radius:var(--calcite-input-number-corner-radius, var(--calcite-corner-radius-sharp))}:host([number-button-type=vertical]) .number-button-item[data-adjustment=down]{border-block-start-width:0px;border-end-end-radius:var(--calcite-input-number-corner-radius, var(--calcite-corner-radius-sharp))}:host([number-button-type=vertical]) .number-button-item[data-adjustment=up]{border-start-end-radius:var(--calcite-input-number-corner-radius, var(--calcite-corner-radius-sharp))}:host(:not([read-only])[number-button-type=horizontal]) .prefix,:host(:not([read-only])[number-button-type=horizontal]) input,.has-prefix input{border-start-start-radius:0;border-end-start-radius:0}input{border-width:1px;border-style:solid;border-color:var(--calcite-input-number-border-color, var(--calcite-color-border-input))}input:focus{border-color:var(--calcite-color-brand);color:var(--calcite-input-number-text-color-focus, var(--calcite-color-text-1))}input[readonly]{font-weight:var(--calcite-font-weight-medium);background-color:var(--calcite-input-number-background-color, var(--calcite-color-background))}input[readonly]:focus{color:var(--calcite-input-number-text-color-focus, var(--calcite-color-text-1))}:host([read-only]) .prefix,:host([read-only]) .icon,:host([read-only]) .clear-button,:host([read-only]) .suffix{background-color:var(--calcite-input-number-background-color, var(--calcite-color-background))}.element-wrapper{position:relative;display:inline-flex;flex:1 1 0%;align-items:center;order:3;isolation:isolate}.element-wrapper:has(input:focus){outline:var(--calcite-border-width-md) solid var(--calcite-internal-input-number-focus-outline-color);outline-offset:calc(var(--calcite-border-width-sm) * -2)}.element-wrapper:has(input:focus) input{z-index:calc(var(--calcite-z-index) * -1)}:host([status=invalid]) .prefix,:host([status=invalid]) .icon,:host([status=invalid]) input,:host([status=invalid]) .clear-button,:host([status=invalid]) .suffix,:host([status=invalid]) .number-button-item{border-color:var(--calcite-color-status-danger)}:host([status=invalid]){--calcite-internal-input-number-focus-outline-color: var(--calcite-color-status-danger)}.icon{box-sizing:border-box;display:flex;align-self:stretch;border-width:var(--calcite-border-width-sm);border-style:solid;border-color:var(--calcite-input-number-border-color, var(--calcite-color-border-input));border-inline-end-width:var(--calcite-border-width-none);background-color:var(--calcite-input-number-background-color, var(--calcite-color-foreground-1));--calcite-icon-color: var( --calcite-input-number-icon-color, var(--calcite-ui-icon-color, var(--calcite-color-text-3)) );align-items:center;padding-inline-start:var(--calcite-internal-input-number-icon-padding-inline)}.element-wrapper:has(.number-button-item--horizontal[data-adjustment=down]) .icon,.has-prefix .icon{border-inline-start-width:0}.clear-button{box-sizing:border-box;display:flex;align-self:stretch;order:4;border-width:var(--calcite-border-width-sm);border-style:solid;border-color:var(--calcite-input-number-border-color, var(--calcite-color-border-input));border-inline-start-width:var(--calcite-border-width-none);background-color:var(--calcite-input-number-background-color, var(--calcite-color-foreground-1))}.has-suffix .clear-button,.element-wrapper:has(.number-button-item.number-button-item--horizontal[data-adjustment=up]) .clear-button,.element-wrapper:has(.number-button-item) .clear-button{border-inline-end-width:0}.loader{inset-block-start:var(--calcite-border-width-sm);inset-inline:var(--calcite-border-width-sm);pointer-events:none;position:absolute;display:block}.loader calcite-progress{--calcite-progress-background-color: var(--calcite-input-loading-background-color);--calcite-progress-fill-color: var(--calcite-input-loading-fill-color)}.action-wrapper{order:7;display:flex}.prefix,.suffix{box-sizing:border-box;display:flex;block-size:auto;min-block-size:100%;-webkit-user-select:none;user-select:none;align-content:center;align-items:center;overflow-wrap:break-word;border-width:1px;border-style:solid;line-height:1;font-weight:var(--calcite-font-weight-regular);border-color:var(--calcite-input-number-border-color, var(--calcite-color-border-input))}.prefix{order:0;border-inline-end-width:0px;inline-size:var(--calcite-input-prefix-size, auto);background-color:var(--calcite-input-number-background-color, var(--calcite-color-foreground-1));color:var(--calcite-input-prefix-text-color, var(--calcite-color-text-2))}.suffix{order:5;border-inline-start-width:0px;inline-size:var(--calcite-input-suffix-size, auto);background-color:var(--calcite-input-number-background-color, var(--calcite-color-foreground-1));color:var(--calcite-input-suffix-text-color, var(--calcite-color-text-2))}.element-wrapper:has(.number-button-item--horizontal[data-adjustment=down]) .prefix{border-inline-start-width:var(--calcite-border-width-none)}.element-wrapper:has(.number-button-item--horizontal[data-adjustment=up]) .suffix,.element-wrapper:has(.number-button-item) .suffix{border-inline-end-width:var(--calcite-border-width-none)}:host([alignment=start]){--calcite-internal-input-number-alignment: start}:host([alignment=center]){--calcite-internal-input-number-alignment: center}:host([alignment=end]){--calcite-internal-input-number-alignment: end}.number-button-wrapper{pointer-events:none;box-sizing:border-box;display:flex;flex-direction:column;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;order:6}:host([number-button-type=vertical]) .wrapper{flex-direction:row;display:flex}:host([number-button-type=vertical]) input{order:2}:host([number-button-type=horizontal]) .calcite--rtl .number-button-item[data-adjustment=down] calcite-action{transform:rotate(-90deg)}:host([number-button-type=horizontal]) .calcite--rtl .number-button-item[data-adjustment=up] calcite-action{transform:rotate(-90deg)}.number-button-item.number-button-item--horizontal[data-adjustment=down],.number-button-item.number-button-item--horizontal[data-adjustment=up]{max-block-size:100%;min-block-size:100%;align-self:stretch;order:1}.number-button-item.number-button-item--horizontal[data-adjustment=down] calcite-action,.number-button-item.number-button-item--horizontal[data-adjustment=up] calcite-action{transform:rotate(90deg)}.number-button-item.number-button-item--horizontal[data-adjustment=down]{border-inline-start-width:var(--calcite-border-width-sm);border-inline-end-width:0px;order:0;padding-inline-start:var(--calcite-internal-input-number-number-button-item-horizontal-padding)}.number-button-item.number-button-item--horizontal[data-adjustment=up]{order:5;padding-inline-end:var(--calcite-internal-input-number-number-button-item-horizontal-padding)}:host([number-button-type=vertical]) .number-button-item{padding-inline-end:var(--calcite-internal-input-number-number-button-item-horizontal-padding)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=up]{border-start-end-radius:var(--calcite-input-number-corner-radius, var(--calcite-corner-radius-sharp));border-block-end-width:var(--calcite-border-width-none);padding-block-start:var(--calcite-internal-input-number-number-button-item-vertical-padding)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=down]{border-block-start-width:0px;border-end-end-radius:var(--calcite-input-number-corner-radius, var(--calcite-corner-radius-sharp));padding-block-end:var(--calcite-internal-input-number-number-button-item-vertical-padding)}.number-button-item{max-block-size:50%;min-block-size:50%;pointer-events:initial;box-sizing:border-box;display:flex;cursor:pointer;align-items:center;align-self:center;border-width:var(--calcite-border-width-sm);border-style:solid;border-color:var(--calcite-input-number-border-color, var(--calcite-color-border-input));background-color:var(--calcite-input-number-background-color, var(--calcite-color-foreground-1));border-inline-start-width:var(--calcite-border-width-none)}.number-button-item:hover calcite-action{--calcite-action-background-color: var( --calcite-input-actions-background-color-hover, var(--calcite-color-foreground-2) );--calcite-action-text-color: var(--calcite-input-actions-icon-color-hover, var(--calcite-color-text-1))}.number-button-item:active calcite-action{--calcite-action-background-color: var( --calcite-input-actions-background-color-press, var(--calcite-color-foreground-3) );--calcite-action-text-color: var(--calcite-input-actions-icon-color-press, var(--calcite-color-text-1))}.number-button-item calcite-action{--calcite-internal-action-height: var(--calcite-internal-input-number-number-button-item-height);--calcite-internal-action-padding-inline: var(--calcite-spacing-none);--calcite-internal-action-padding-block: var(--calcite-spacing-none);--calcite-action-background-color: var(--calcite-input-actions-background-color);--calcite-action-text-color: var(--calcite-input-actions-icon-color)}.number-button-item calcite-action:hover{--calcite-action-background-color-hover: var(--calcite-input-actions-background-color-hover);--calcite-action-text-color-press: var(--calcite-input-actions-icon-color-hover)}.number-button-item calcite-action:active{--calcite-action-background-color-press: var(--calcite-input-actions-background-color-press);--calcite-action-text-color-press: var(--calcite-input-actions-icon-color-press)}.wrapper{position:relative;display:flex;flex-direction:row;align-items:center}:host(.no-bottom-border) input{border-block-end-width:0px}:host(.border-top-color-one) input{border-block-start-color:var(--calcite-color-border-1)}input.inline-child{background-color:transparent;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out}input.inline-child .editing-enabled{background-color:inherit}input.inline-child:not(.editing-enabled){display:flex;cursor:pointer;text-overflow:ellipsis;border-color:transparent;padding-inline-start:0}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}::placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-input-number-placeholder-text-color, var(--calcite-color-text-3))}.clear-button--container{display:flex;cursor:pointer;align-items:center}.clear-button--container:hover calcite-action{--calcite-action-background-color: var(--calcite-input-actions-background-color-hover, var(--calcite-color-foreground-3));--calcite-action-text-color: var(--calcite-input-actions-icon-color-hover, var(--calcite-color-text-1))}.clear-button--container:active calcite-action{--calcite-action-background-color: var(--calcite-input-actions-background-color-press, var(--calcite-color-border-2));--calcite-action-text-color: var(--calcite-input-actions-icon-color-press, var(--calcite-color-text-1))}.clear-button--container calcite-action{--calcite-internal-action-height: 100%;--calcite-internal-action-padding-inline: var(--calcite-spacing-none);--calcite-internal-action-padding-block: var(--calcite-spacing-none);--calcite-action-background-color: var(--calcite-input-actions-background-color, var(--calcite-color-foreground-2));--calcite-action-text-color: var(--calcite-input-actions-icon-color)}.clear-button--container calcite-action:hover{--calcite-action-background-color-hover: var(--calcite-input-actions-background-color-hover, var(--calcite-color-foreground-3));--calcite-action-text-color-press: var(--calcite-input-actions-icon-color-hover)}.clear-button--container calcite-action:active{--calcite-action-background-color-press: var(--calcite-input-actions-background-color-press, var(--calcite-color-border-2));--calcite-action-text-color-press: var(--calcite-input-actions-icon-color-press)}:host([scale=s]) .clear-button--container{padding:var(--calcite-spacing-xxs)}:host([scale=m]) .clear-button--container{padding:var(--calcite-spacing-xxs);padding-inline-end:var(--calcite-space-sm)}:host([scale=l]) .clear-button--container{padding-inline-end:var(--calcite-spacing-sm-plus)}`;
|
|
53
53
|
class InputNumber extends LitElement {
|
|
54
54
|
constructor() {
|
|
55
55
|
super();
|
|
@@ -125,7 +125,7 @@ class InputNumber extends LitElement {
|
|
|
125
125
|
}
|
|
126
126
|
connectedCallback() {
|
|
127
127
|
super.connectedCallback();
|
|
128
|
-
this.inlineEditableEl = this.el.closest("calcite-inline-editable");
|
|
128
|
+
this.inlineEditableEl = this.el.closest("calcite-inline-editable") ?? void 0;
|
|
129
129
|
if (this.inlineEditableEl) {
|
|
130
130
|
this.editingEnabled = this.inlineEditableEl.editingEnabled || false;
|
|
131
131
|
}
|
|
@@ -150,10 +150,10 @@ class InputNumber extends LitElement {
|
|
|
150
150
|
}
|
|
151
151
|
willUpdate(changes) {
|
|
152
152
|
if (changes.has("max")) {
|
|
153
|
-
this.maxString = this.max?.toString() ||
|
|
153
|
+
this.maxString = this.max?.toString() || void 0;
|
|
154
154
|
}
|
|
155
155
|
if (changes.has("min")) {
|
|
156
|
-
this.minString = this.min?.toString() ||
|
|
156
|
+
this.minString = this.min?.toString() || void 0;
|
|
157
157
|
}
|
|
158
158
|
if (changes.has("icon")) {
|
|
159
159
|
this.requestedIcon = setRequestedIcon({}, this.icon, "number");
|
|
@@ -218,7 +218,7 @@ class InputNumber extends LitElement {
|
|
|
218
218
|
return;
|
|
219
219
|
}
|
|
220
220
|
const adjustment = direction === "up" ? 1 : -1;
|
|
221
|
-
const stepHandleInteger = this.integer && this.step
|
|
221
|
+
const stepHandleInteger = this.integer && typeof this.step === "number" ? Math.round(this.step) : this.step;
|
|
222
222
|
const inputStep = stepHandleInteger === "any" ? 1 : Math.abs(stepHandleInteger || 1);
|
|
223
223
|
const inputVal = new BigDecimal(value !== "" ? value : "0");
|
|
224
224
|
const nudgedValue = inputVal.add(`${inputStep * adjustment}`);
|
|
@@ -287,7 +287,9 @@ class InputNumber extends LitElement {
|
|
|
287
287
|
origin: "user",
|
|
288
288
|
value: parseNumberString(delocalizedValue)
|
|
289
289
|
});
|
|
290
|
-
this.childNumberRef.value
|
|
290
|
+
if (this.childNumberRef.value) {
|
|
291
|
+
this.childNumberRef.value.value = this.displayedValue;
|
|
292
|
+
}
|
|
291
293
|
} else {
|
|
292
294
|
this.setNumberValue({
|
|
293
295
|
nativeEvent,
|
|
@@ -343,26 +345,26 @@ class InputNumber extends LitElement {
|
|
|
343
345
|
useGrouping: this.groupSeparator
|
|
344
346
|
};
|
|
345
347
|
if (event.key === numberStringFormatter.decimal && !this.integer) {
|
|
346
|
-
if (!this.value && !this.childNumberRef.value
|
|
348
|
+
if (!this.value && !this.childNumberRef.value?.value) {
|
|
347
349
|
return;
|
|
348
350
|
}
|
|
349
|
-
if (this.value && this.childNumberRef.value
|
|
351
|
+
if (this.value && this.childNumberRef.value?.value.indexOf(numberStringFormatter.decimal) === -1) {
|
|
350
352
|
return;
|
|
351
353
|
}
|
|
352
354
|
}
|
|
353
355
|
if (/[eE]/.test(event.key) && !this.integer) {
|
|
354
|
-
if (!this.value && !this.childNumberRef.value
|
|
356
|
+
if (!this.value && !this.childNumberRef.value?.value) {
|
|
355
357
|
return;
|
|
356
358
|
}
|
|
357
|
-
if (this.value && !/[eE]/.test(this.childNumberRef.value.value)) {
|
|
359
|
+
if (this.value && this.childNumberRef.value && !/[eE]/.test(this.childNumberRef.value.value)) {
|
|
358
360
|
return;
|
|
359
361
|
}
|
|
360
362
|
}
|
|
361
363
|
if (event.key === "-") {
|
|
362
|
-
if (!this.value && !this.childNumberRef.value
|
|
364
|
+
if (!this.value && !this.childNumberRef.value?.value) {
|
|
363
365
|
return;
|
|
364
366
|
}
|
|
365
|
-
if (this.value && this.childNumberRef.value.value.split("-").length <= 2) {
|
|
367
|
+
if (this.value && this.childNumberRef.value && this.childNumberRef.value.value.split("-").length <= 2) {
|
|
366
368
|
return;
|
|
367
369
|
}
|
|
368
370
|
}
|