@esri/calcite-components 5.1.1-next.3 → 5.1.1-next.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/{VZCLTVXQ.js → 26TKJ45G.js} +1 -1
- package/dist/cdn/{KPQ7QKLW.js → 27CKMD4S.js} +1 -1
- package/dist/cdn/{I5TYSCGY.js → 2B22J6N7.js} +1 -1
- package/dist/cdn/{4M36NHKY.js → 2TUMH7BJ.js} +1 -1
- package/dist/cdn/{MHL6OD2A.js → 2UXB22NZ.js} +1 -1
- package/dist/cdn/{Z5OV3CGT.js → 3BFO4M6M.js} +1 -1
- package/dist/cdn/{K4ECYLPH.js → 3NAS4Q4X.js} +1 -1
- package/dist/cdn/{AN24LRX4.js → 3WWVPHTN.js} +1 -1
- package/dist/cdn/{VCIRPO4U.js → 4OKNI2ME.js} +1 -1
- package/dist/cdn/{2LXTK3M6.js → 4U2T5QCF.js} +1 -1
- package/dist/cdn/{VSD57PLS.js → 4YU7KVLN.js} +1 -1
- package/dist/cdn/{ASW675OW.js → 4ZARBNVE.js} +1 -1
- package/dist/cdn/{3KNMK5SQ.js → 56OUAFHZ.js} +1 -1
- package/dist/cdn/{RH7NE7PQ.js → 5CZT7ZF2.js} +1 -1
- package/dist/cdn/{4Z5LA72W.js → 5KHTOS43.js} +1 -1
- package/dist/cdn/{XTSXFNUW.js → 5UM2PD3Y.js} +1 -1
- package/dist/cdn/{B7CQ4JRL.js → 5VR5L3IN.js} +1 -1
- package/dist/cdn/{5WRS6WPQ.js → 5X5GP5QD.js} +1 -1
- package/dist/cdn/{B7QE5WFS.js → 6HZDBIQR.js} +1 -1
- package/dist/cdn/{I7FGFZ6K.js → 6JJSMJ5O.js} +1 -1
- package/dist/cdn/{XYAVS2OX.js → 6OQ7N7VS.js} +1 -1
- package/dist/cdn/{KVRNQED3.js → 6PA56XE3.js} +1 -1
- package/dist/cdn/{YADG2FLX.js → 6PNEL3GY.js} +1 -1
- package/dist/cdn/{IJ5O452I.js → 7MDIWERA.js} +1 -1
- package/dist/cdn/{2DKBIGVK.js → 7P74AKWI.js} +1 -1
- package/dist/cdn/{CERRAXUL.js → 7TWNW2BD.js} +1 -1
- package/dist/cdn/{QTBSMOZZ.js → 7UQ4BXIA.js} +1 -1
- package/dist/cdn/{73TM7AC3.js → 7YW5YF3W.js} +1 -1
- package/dist/cdn/{EUUIFTPO.js → A7T3VN2V.js} +1 -1
- package/dist/cdn/{IA6RTEIG.js → ACHU3T7F.js} +1 -1
- package/dist/cdn/AJKRULVQ.js +2 -0
- package/dist/cdn/{C465LMYP.js → ANS7V4RO.js} +1 -1
- package/dist/cdn/{IRKROAV6.js → APBFB6S3.js} +1 -1
- package/dist/cdn/{3EHO5MHY.js → AQ3IFEKN.js} +1 -1
- package/dist/cdn/{55BU4BKF.js → ARP32LFE.js} +1 -1
- package/dist/cdn/{FYEZIEAC.js → AXVF2756.js} +1 -1
- package/dist/cdn/BDZQSO2J.js +2 -0
- package/dist/cdn/{K5FQLERT.js → BJ4ABCUP.js} +1 -1
- package/dist/cdn/BQES6LWB.js +2 -0
- package/dist/cdn/{CJNHGAKV.js → BTFUTGOB.js} +1 -1
- package/dist/cdn/{26KZ6INU.js → BZ2ZKLD7.js} +1 -1
- package/dist/cdn/{GXTMLJY2.js → CISWZLPM.js} +1 -1
- package/dist/cdn/{4HSQ3MH4.js → CY2QEKCK.js} +1 -1
- package/dist/cdn/{YLTLFUV4.js → D2NNUCFT.js} +1 -1
- package/dist/cdn/{YPXCJQIR.js → D2VTJOPM.js} +1 -1
- package/dist/cdn/{X2BBMLBB.js → D5H6K3NA.js} +1 -1
- package/dist/cdn/{RECKWJ47.js → DBQJQXU6.js} +1 -1
- package/dist/cdn/{DNIMBCHX.js → DYWNKQ25.js} +1 -1
- package/dist/cdn/ECNYDS76.js +2 -0
- package/dist/cdn/{JRKZSZK7.js → EOXVTTON.js} +1 -1
- package/dist/cdn/{7Q5JURTW.js → EV4D2B4G.js} +1 -1
- package/dist/cdn/{FYUMSWJT.js → F5LUOXQA.js} +1 -1
- package/dist/cdn/{WDRTEXNS.js → F7DJCE7J.js} +1 -1
- package/dist/cdn/{7XFVXJB5.js → FGLX24UP.js} +1 -1
- package/dist/cdn/{QN2EDOZS.js → FIDNERXC.js} +1 -1
- package/dist/cdn/{UDOSDUVZ.js → FIIPI4TO.js} +1 -1
- package/dist/cdn/{BEL7JEJT.js → FMGMUK7H.js} +1 -1
- package/dist/cdn/{GS2J7N67.js → FNQJGIT5.js} +1 -1
- package/dist/cdn/{P57WVAE6.js → G2GTTVSE.js} +1 -1
- package/dist/cdn/{IJPD5VVH.js → GATVDTCX.js} +1 -1
- package/dist/cdn/{VHQAPKYZ.js → GKHYTKRX.js} +1 -1
- package/dist/cdn/{NF5HG2L6.js → GLODC255.js} +1 -1
- package/dist/cdn/{MSWVGLZL.js → GLRM5ZT5.js} +1 -1
- package/dist/cdn/{5QNAVXAT.js → H4DJFHRD.js} +1 -1
- package/dist/cdn/H4MCSFNA.js +2 -0
- package/dist/cdn/{YGAM5ZGX.js → H4QDWLO2.js} +1 -1
- package/dist/cdn/{NBBZ2RCP.js → HETBUMGG.js} +1 -1
- package/dist/cdn/{X5MI4AJB.js → HHH7H3RQ.js} +1 -1
- package/dist/cdn/{ULDASAF6.js → HIUFMP4S.js} +1 -1
- package/dist/cdn/{TOQZCO77.js → HWD5HVPG.js} +1 -1
- package/dist/cdn/{BY7AQBTP.js → IPV6SRQB.js} +1 -1
- package/dist/cdn/{C44BQNE3.js → J4CNKBKA.js} +1 -1
- package/dist/cdn/{QGBDUFYH.js → JCCTCJBT.js} +1 -1
- package/dist/cdn/{TXX4YUZE.js → JZQC7UCN.js} +1 -1
- package/dist/cdn/{RNAF7VZA.js → K3J3HP3C.js} +1 -1
- package/dist/cdn/{LYR3SG7G.js → KC4N5X3R.js} +1 -1
- package/dist/cdn/{UKNLJI6H.js → KLK5B7QV.js} +1 -1
- package/dist/cdn/KNKMPJAL.js +2 -0
- package/dist/cdn/{4N7IMNTU.js → KOB2L5OF.js} +1 -1
- package/dist/cdn/{IQLK3X6G.js → KU7JKZKM.js} +1 -1
- package/dist/cdn/{Z4NRODR3.js → L3DV3PDZ.js} +1 -1
- package/dist/cdn/{JVDT4ESQ.js → L4PX2B5Q.js} +1 -1
- package/dist/cdn/{XQFIE7OG.js → LBC3QOSD.js} +1 -1
- package/dist/cdn/{HI2MHLI4.js → LLESMANM.js} +1 -1
- package/dist/cdn/{SPDWQ3X7.js → LTTOM2CS.js} +1 -1
- package/dist/cdn/{DDGNYV3G.js → LW32DABQ.js} +1 -1
- package/dist/cdn/{EJDW5H7K.js → LYU2H6SF.js} +1 -1
- package/dist/cdn/{NSA227RN.js → M3IE6HID.js} +1 -1
- package/dist/cdn/{RWDPNLZL.js → M47XC6PF.js} +1 -1
- package/dist/cdn/{ZV35SZ3B.js → MKMBDYHE.js} +1 -1
- package/dist/cdn/MR5GODA3.js +2 -0
- package/dist/cdn/{VJ7RRSTN.js → MUEVO64B.js} +1 -1
- package/dist/cdn/{O7X634VO.js → MUUP34X3.js} +1 -1
- package/dist/cdn/{IR3RO6CE.js → ODZLYUK3.js} +1 -1
- package/dist/cdn/{PN4F47X5.js → ONJA74QA.js} +1 -1
- package/dist/cdn/{NCWWAHRX.js → OORT75JS.js} +1 -1
- package/dist/cdn/P3CJF65O.js +2 -0
- package/dist/cdn/{5DAEMQDV.js → PWME5N37.js} +1 -1
- package/dist/cdn/{TX5ELMHY.js → QAQYS3BO.js} +1 -1
- package/dist/cdn/{2HPZ2LZX.js → QER5D477.js} +1 -1
- package/dist/cdn/{4TLO4I7E.js → QGJMSJYV.js} +1 -1
- package/dist/cdn/{SHI5TFAM.js → QJNZ4DGE.js} +1 -1
- package/dist/cdn/{XGNYY3DG.js → QKYRWKTU.js} +1 -1
- package/dist/cdn/{GTWN7BPR.js → RQWRV3MX.js} +1 -1
- package/dist/cdn/RX6W4SRU.js +2 -0
- package/dist/cdn/{TLFPDRN4.js → SB5RUV2I.js} +1 -1
- package/dist/cdn/{GQNVN73Q.js → SKUVMTOE.js} +1 -1
- package/dist/cdn/{5LXNJLDP.js → SSDV2Z4W.js} +1 -1
- package/dist/cdn/{E77V6B3J.js → SY4OTCR3.js} +1 -1
- package/dist/cdn/{EZUQRFG5.js → T6AQWGKD.js} +1 -1
- package/dist/cdn/TL7FQYNH.js +2 -0
- package/dist/cdn/{USJSJIQG.js → TQ74DQDG.js} +1 -1
- package/dist/cdn/{462AIJMG.js → TR3GWZR3.js} +1 -1
- package/dist/cdn/{WN4PUWAA.js → U54ZTDU5.js} +1 -1
- package/dist/cdn/{ZZ2SI3QY.js → UWMTXTYU.js} +1 -1
- package/dist/cdn/{AJQT5NY5.js → V4P7PWKU.js} +1 -1
- package/dist/cdn/{KSI4ARWP.js → V4PO6GRD.js} +1 -1
- package/dist/cdn/{C2ORI74C.js → V7UCH3LL.js} +1 -1
- package/dist/cdn/{UFPZDUSI.js → VG7NP4T6.js} +1 -1
- package/dist/cdn/{KEYU3UTM.js → VNLB6ONW.js} +1 -1
- package/dist/cdn/{GERZGXNJ.js → VOJ3FHN7.js} +1 -1
- package/dist/cdn/VOXGCDBD.js +2 -0
- package/dist/cdn/{4QQ3EVQP.js → VPAYQE3N.js} +1 -1
- package/dist/cdn/VPGSTQTT.js +2 -0
- package/dist/cdn/{QJMUF7LF.js → VWXOBCBN.js} +1 -1
- package/dist/cdn/{3IIR2IYM.js → W3FK3ZCB.js} +1 -1
- package/dist/cdn/{GMIAQOJ4.js → WA2S45EI.js} +1 -1
- package/dist/cdn/{KCDVEUM2.js → WCQV2FD5.js} +1 -1
- package/dist/cdn/{EGIGTE23.js → WTNLCUMG.js} +1 -1
- package/dist/cdn/{NCPZQ732.js → WY23ABPE.js} +1 -1
- package/dist/cdn/{OOAEIRPO.js → YDF4DHQ3.js} +1 -1
- package/dist/cdn/{74QLHBGF.js → YENIJIGH.js} +1 -1
- package/dist/cdn/{2APRKMNC.js → YHXTGLCG.js} +1 -1
- package/dist/cdn/{FAPCVWCN.js → YIUURHN4.js} +1 -1
- package/dist/cdn/{LTVCO7RI.js → YL72ZNRG.js} +1 -1
- package/dist/cdn/{5BSHZPZF.js → YWOGIBVU.js} +1 -1
- package/dist/cdn/{IXDLIUWE.js → ZACTCZNT.js} +1 -1
- package/dist/cdn/{UY5AIMVC.js → ZCF63ZNP.js} +1 -1
- package/dist/cdn/{4U5ABDZF.js → ZD2AZI2C.js} +1 -1
- package/dist/cdn/{BFFHJ7V3.js → ZD5WXZ5Y.js} +1 -1
- package/dist/cdn/{UH5XPUXK.js → ZFON2VHB.js} +1 -1
- package/dist/cdn/{ESEFVCYL.js → ZG5BEBIM.js} +1 -1
- package/dist/cdn/{X4SFURDR.js → ZRMUXK2V.js} +1 -1
- package/dist/cdn/{NGYPHTON.js → ZYP2R6KW.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/date.js +3 -3
- package/dist/chunks/dom.js +15 -3
- package/dist/chunks/floating-ui.js +1 -1
- package/dist/chunks/label.js +6 -6
- package/dist/chunks/locale.js +3 -6
- package/dist/chunks/manager.js +5 -5
- package/dist/chunks/runtime.js +4 -4
- package/dist/chunks/useForm.js +20 -15
- package/dist/components/calcite-card/customElement.d.ts +1 -1
- package/dist/components/calcite-carousel/customElement.js +5 -6
- package/dist/components/calcite-checkbox/customElement.d.ts +4 -4
- package/dist/components/calcite-chip-group/customElement.js +1 -1
- package/dist/components/calcite-color-picker/customElement.js +1 -1
- package/dist/components/calcite-color-picker-hex-input/customElement.js +1 -1
- package/dist/components/calcite-date-picker/customElement.js +8 -10
- package/dist/components/calcite-date-picker-day/customElement.js +1 -1
- package/dist/components/calcite-date-picker-month/customElement.js +2 -11
- package/dist/components/calcite-flow/customElement.d.ts +2 -2
- package/dist/components/calcite-flow/customElement.js +1 -1
- package/dist/components/calcite-flow-item/customElement.js +1 -1
- package/dist/components/calcite-input/customElement.js +4 -6
- package/dist/components/calcite-input-date-picker/customElement.js +0 -1
- package/dist/components/calcite-input-text/customElement.js +1 -1
- package/dist/components/calcite-list/customElement.d.ts +4 -4
- package/dist/components/calcite-list/customElement.js +4 -5
- package/dist/components/calcite-list-item/customElement.d.ts +6 -6
- package/dist/components/calcite-list-item/customElement.js +12 -15
- package/dist/components/calcite-list-item-group/customElement.d.ts +1 -1
- package/dist/components/calcite-loader/customElement.js +3 -3
- package/dist/components/calcite-menu-item/customElement.d.ts +7 -7
- package/dist/components/calcite-menu-item/customElement.js +3 -0
- package/dist/components/calcite-meter/customElement.d.ts +6 -6
- package/dist/components/calcite-meter/customElement.js +14 -7
- package/dist/components/calcite-pagination/customElement.d.ts +1 -1
- package/dist/components/calcite-pagination/customElement.js +3 -0
- package/dist/components/calcite-panel/customElement.d.ts +6 -6
- package/dist/components/calcite-popover/customElement.d.ts +4 -4
- package/dist/components/calcite-popover/customElement.js +1 -1
- package/dist/components/calcite-progress/customElement.d.ts +2 -2
- package/dist/components/calcite-radio-button/customElement.d.ts +5 -5
- package/dist/components/calcite-radio-button/customElement.js +1 -1
- package/dist/components/calcite-radio-button-group/customElement.d.ts +4 -4
- package/dist/components/calcite-radio-button-group/customElement.js +3 -3
- package/dist/components/calcite-rating/customElement.d.ts +7 -7
- package/dist/components/calcite-rating/customElement.js +13 -9
- package/dist/controllers/useSortable.d.ts +2 -2
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.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/utils/dom.d.ts +1 -1
- package/package.json +3 -4
- package/dist/cdn/3YEIOG5K.js +0 -2
- package/dist/cdn/5Z2NRA5O.js +0 -2
- package/dist/cdn/6XD7JQMH.js +0 -2
- package/dist/cdn/H3X6JWD6.js +0 -2
- package/dist/cdn/H7A7IEZM.js +0 -2
- package/dist/cdn/JRSUWSDE.js +0 -2
- package/dist/cdn/KELKMID5.js +0 -2
- package/dist/cdn/OCKF5CDZ.js +0 -2
- package/dist/cdn/S2TMKDXN.js +0 -2
- package/dist/cdn/WL5VMMRE.js +0 -2
- package/dist/cdn/WUMRFH6V.js +0 -2
- package/dist/cdn/XW6GOGMS.js +0 -2
|
@@ -46,7 +46,7 @@ import type { IconName } from "../calcite-icon/interfaces.js";
|
|
|
46
46
|
*/
|
|
47
47
|
export abstract class Panel extends LitElement {
|
|
48
48
|
/** Passes a function to run before the component closes. */
|
|
49
|
-
accessor beforeClose: () => Promise<void
|
|
49
|
+
accessor beforeClose: (() => Promise<void>) | undefined;
|
|
50
50
|
/**
|
|
51
51
|
* When `true`, displays a close button in the component.
|
|
52
52
|
*
|
|
@@ -78,7 +78,7 @@ export abstract class Panel extends LitElement {
|
|
|
78
78
|
*/
|
|
79
79
|
accessor collapsible: boolean;
|
|
80
80
|
/** Specifies a description for the component. */
|
|
81
|
-
accessor description: string;
|
|
81
|
+
accessor description: string | undefined;
|
|
82
82
|
/**
|
|
83
83
|
* When `true`, interaction is prevented and the component is displayed with lower opacity.
|
|
84
84
|
*
|
|
@@ -86,11 +86,11 @@ export abstract class Panel extends LitElement {
|
|
|
86
86
|
*/
|
|
87
87
|
accessor disabled: boolean;
|
|
88
88
|
/** Specifies the component's heading text. */
|
|
89
|
-
accessor heading: string;
|
|
89
|
+
accessor heading: string | undefined;
|
|
90
90
|
/** Specifies the heading level number of the component's `heading` for proper document structure, without affecting visual styling. */
|
|
91
|
-
accessor headingLevel: HeadingLevel;
|
|
91
|
+
accessor headingLevel: HeadingLevel | undefined;
|
|
92
92
|
/** Specifies an icon to display. */
|
|
93
|
-
accessor icon: IconName;
|
|
93
|
+
accessor icon: IconName | undefined;
|
|
94
94
|
/**
|
|
95
95
|
* When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`).
|
|
96
96
|
*
|
|
@@ -104,7 +104,7 @@ export abstract class Panel extends LitElement {
|
|
|
104
104
|
*/
|
|
105
105
|
accessor loading: boolean;
|
|
106
106
|
/** Specifies the component's fallback `menuPlacement` when it's initial or specified `menuPlacement` has insufficient space available. */
|
|
107
|
-
accessor menuFlipPlacements: FlipPlacement[];
|
|
107
|
+
accessor menuFlipPlacements: FlipPlacement[] | undefined;
|
|
108
108
|
/**
|
|
109
109
|
* When `true`, the action menu items in the `header-menu-actions` slot are open.
|
|
110
110
|
*
|
|
@@ -33,7 +33,7 @@ export abstract class Popover extends LitElement {
|
|
|
33
33
|
*/
|
|
34
34
|
accessor flipDisabled: boolean;
|
|
35
35
|
/** Specifies the component's fallback `placement` for slotted content when it's initial or specified `placement` has insufficient space available. */
|
|
36
|
-
accessor flipPlacements: FlipPlacement[];
|
|
36
|
+
accessor flipPlacements: FlipPlacement[] | undefined;
|
|
37
37
|
/**
|
|
38
38
|
* When `true`, prevents focus trapping.
|
|
39
39
|
*
|
|
@@ -49,11 +49,11 @@ export abstract class Popover extends LitElement {
|
|
|
49
49
|
* `"extraContainers"` specifies additional focusable elements external to the trap, such as 3rd-party components appending elements to the document body, and
|
|
50
50
|
* `"setReturnFocus"` customizes the element to which focus is returned when the trap is deactivated. Return `false` to prevent focus return, or `undefined` to use the default behavior (returning focus to the element focused before activation).
|
|
51
51
|
*/
|
|
52
|
-
accessor focusTrapOptions: Partial<FocusTrapOptions
|
|
52
|
+
accessor focusTrapOptions: Partial<FocusTrapOptions> | undefined;
|
|
53
53
|
/** Specifies the component's heading text. */
|
|
54
|
-
accessor heading: string;
|
|
54
|
+
accessor heading: string | undefined;
|
|
55
55
|
/** Specifies the heading level number of the component's `heading` for proper document structure, without affecting visual styling. */
|
|
56
|
-
accessor headingLevel: HeadingLevel;
|
|
56
|
+
accessor headingLevel: HeadingLevel | undefined;
|
|
57
57
|
/**
|
|
58
58
|
* Specifies an accessible label for the component.
|
|
59
59
|
*
|
|
@@ -147,7 +147,7 @@ class Popover extends LitElement {
|
|
|
147
147
|
}
|
|
148
148
|
setFilteredPlacements() {
|
|
149
149
|
const { el, flipPlacements } = this;
|
|
150
|
-
this.filteredFlipPlacements = flipPlacements ? filterValidFlipPlacements(flipPlacements, el) :
|
|
150
|
+
this.filteredFlipPlacements = flipPlacements ? filterValidFlipPlacements(flipPlacements, el) : void 0;
|
|
151
151
|
}
|
|
152
152
|
hide() {
|
|
153
153
|
this.open = false;
|
|
@@ -8,7 +8,7 @@ import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
|
8
8
|
*/
|
|
9
9
|
export abstract class Progress extends LitElement {
|
|
10
10
|
/** Specifies an accessible label for the component. */
|
|
11
|
-
accessor label: string;
|
|
11
|
+
accessor label: string | undefined;
|
|
12
12
|
/**
|
|
13
13
|
* When `true` and type is `"indeterminate"`, reverses the animation direction.
|
|
14
14
|
*
|
|
@@ -16,7 +16,7 @@ export abstract class Progress extends LitElement {
|
|
|
16
16
|
*/
|
|
17
17
|
accessor reversed: boolean;
|
|
18
18
|
/** Text that displays under the component's indicator. */
|
|
19
|
-
accessor text: string;
|
|
19
|
+
accessor text: string | undefined;
|
|
20
20
|
/**
|
|
21
21
|
* Specifies the component type.
|
|
22
22
|
*
|
|
@@ -26,11 +26,11 @@ export abstract class RadioButton extends LitElement {
|
|
|
26
26
|
*
|
|
27
27
|
* When not set, the component is associated with its ancestor form element, if one exists.
|
|
28
28
|
*/
|
|
29
|
-
accessor form: string;
|
|
29
|
+
accessor form: string | undefined;
|
|
30
30
|
/** Specifies the component's label text. */
|
|
31
|
-
accessor labelText: string;
|
|
31
|
+
accessor labelText: string | undefined;
|
|
32
32
|
/** Specifies the name of the component. Required to pass the component's `value` on form submission. */
|
|
33
|
-
accessor name: string;
|
|
33
|
+
accessor name: string | undefined;
|
|
34
34
|
/**
|
|
35
35
|
* When `true` and the component resides in a form,
|
|
36
36
|
* the component must have a value selected from the `calcite-radio-button-group` in order for the form to submit.
|
|
@@ -56,7 +56,7 @@ export abstract class RadioButton extends LitElement {
|
|
|
56
56
|
* @internal
|
|
57
57
|
* @mdn [validationMessage](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/validationMessage)
|
|
58
58
|
*/
|
|
59
|
-
accessor validationMessage: string;
|
|
59
|
+
accessor validationMessage: string | undefined;
|
|
60
60
|
/**
|
|
61
61
|
* The component's current validation state.
|
|
62
62
|
*
|
|
@@ -84,7 +84,7 @@ export abstract class RadioButton extends LitElement {
|
|
|
84
84
|
* @param validationMessage
|
|
85
85
|
* @internal
|
|
86
86
|
*/
|
|
87
|
-
setValidity(validity: ValidityStateFlags, validationMessage?: string): Promise<void>;
|
|
87
|
+
setValidity(validity: ValidityStateFlags, validationMessage?: string | undefined): Promise<void>;
|
|
88
88
|
/**
|
|
89
89
|
* Fires only when the radio button is checked. This behavior is identical to the native HTML input element.
|
|
90
90
|
* Since this event does not fire when the radio button is unchecked, it's not recommended to attach a listener for this event
|
|
@@ -55,7 +55,7 @@ class RadioButton extends LitElement {
|
|
|
55
55
|
return this.focusSetter(() => this.containerRef.value, options);
|
|
56
56
|
}
|
|
57
57
|
async setValidity(validity, validationMessage = this.validationMessage) {
|
|
58
|
-
this.elementInternals.setValidity(validity, validationMessage);
|
|
58
|
+
this.elementInternals.setValidity(validity, validationMessage || "");
|
|
59
59
|
}
|
|
60
60
|
connectedCallback() {
|
|
61
61
|
this.rootNode = this.el.getRootNode();
|
|
@@ -18,7 +18,7 @@ export abstract class RadioButtonGroup extends LitElement {
|
|
|
18
18
|
*/
|
|
19
19
|
accessor disabled: boolean;
|
|
20
20
|
/** Specifies the component's label text. */
|
|
21
|
-
accessor labelText: string;
|
|
21
|
+
accessor labelText: string | undefined;
|
|
22
22
|
/**
|
|
23
23
|
* Specifies the layout of the component.
|
|
24
24
|
*
|
|
@@ -47,7 +47,7 @@ export abstract class RadioButtonGroup extends LitElement {
|
|
|
47
47
|
*/
|
|
48
48
|
accessor scale: Scale;
|
|
49
49
|
/** Specifies the component's selected item. */
|
|
50
|
-
get selectedItem(): RadioButton;
|
|
50
|
+
get selectedItem(): RadioButton | null;
|
|
51
51
|
/**
|
|
52
52
|
* Specifies the status of the validation message.
|
|
53
53
|
*
|
|
@@ -55,9 +55,9 @@ export abstract class RadioButtonGroup extends LitElement {
|
|
|
55
55
|
*/
|
|
56
56
|
accessor status: Status;
|
|
57
57
|
/** Specifies the validation icon to display under the component. */
|
|
58
|
-
accessor validationIcon: IconName | boolean;
|
|
58
|
+
accessor validationIcon: IconName | boolean | undefined;
|
|
59
59
|
/** Specifies the validation message to display under the component. */
|
|
60
|
-
accessor validationMessage: string;
|
|
60
|
+
accessor validationMessage: string | undefined;
|
|
61
61
|
/**
|
|
62
62
|
* Sets focus on the fist focusable `calcite-radio-button` element in the component.
|
|
63
63
|
*
|
|
@@ -64,7 +64,7 @@ class RadioButtonGroup extends LitElement {
|
|
|
64
64
|
this.mutationObserver?.disconnect();
|
|
65
65
|
}
|
|
66
66
|
handleInvalidFormEvent(event) {
|
|
67
|
-
const message = this.validationMessage || event.target.validationMessage;
|
|
67
|
+
const message = this.validationMessage || event.target.validationMessage || "";
|
|
68
68
|
displayValidationMessage(this, {
|
|
69
69
|
message,
|
|
70
70
|
icon: true,
|
|
@@ -73,7 +73,7 @@ class RadioButtonGroup extends LitElement {
|
|
|
73
73
|
}
|
|
74
74
|
passPropsToRadioButtons() {
|
|
75
75
|
this.radioButtons = Array.from(this.el.querySelectorAll("calcite-radio-button"));
|
|
76
|
-
this.selectedItem = Array.from(this.radioButtons).reverse().find((radioButton) => radioButton.checked)
|
|
76
|
+
this.selectedItem = Array.from(this.radioButtons).reverse().find((radioButton) => radioButton.checked) ?? null;
|
|
77
77
|
if (this.radioButtons.length > 0) {
|
|
78
78
|
this.radioButtons.forEach((radioButton) => {
|
|
79
79
|
if (this.hasUpdated) {
|
|
@@ -87,7 +87,7 @@ class RadioButtonGroup extends LitElement {
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
getFocusableRadioButton() {
|
|
90
|
-
return this.radioButtons.find((radiobutton) => !radiobutton.disabled)
|
|
90
|
+
return this.radioButtons.find((radiobutton) => !radiobutton.disabled);
|
|
91
91
|
}
|
|
92
92
|
radioButtonChangeHandler(event) {
|
|
93
93
|
this.selectedItem = event.target;
|
|
@@ -15,9 +15,9 @@ import type { IconName } from "../calcite-icon/interfaces.js";
|
|
|
15
15
|
*/
|
|
16
16
|
export abstract class Rating extends LitElement {
|
|
17
17
|
/** Specifies a cumulative average from previous ratings to display. */
|
|
18
|
-
accessor average: number;
|
|
18
|
+
accessor average: number | undefined;
|
|
19
19
|
/** Specifies the number of previous ratings to display. */
|
|
20
|
-
accessor count: number;
|
|
20
|
+
accessor count: number | undefined;
|
|
21
21
|
/**
|
|
22
22
|
* When `true`, interaction is prevented and the component is displayed with lower opacity.
|
|
23
23
|
*
|
|
@@ -29,9 +29,9 @@ export abstract class Rating extends LitElement {
|
|
|
29
29
|
*
|
|
30
30
|
* When not set, the component is associated with its ancestor form element, if one exists.
|
|
31
31
|
*/
|
|
32
|
-
accessor form: string;
|
|
32
|
+
accessor form: string | undefined;
|
|
33
33
|
/** Specifies the component's label text. */
|
|
34
|
-
accessor labelText: string;
|
|
34
|
+
accessor labelText: string | undefined;
|
|
35
35
|
/** Overrides individual strings used by the component. */
|
|
36
36
|
accessor messageOverrides: {
|
|
37
37
|
rating?: string;
|
|
@@ -39,7 +39,7 @@ export abstract class Rating extends LitElement {
|
|
|
39
39
|
stars?: string;
|
|
40
40
|
};
|
|
41
41
|
/** Specifies the name of the component. Required to pass the component's `value` on form submission. */
|
|
42
|
-
accessor name: string;
|
|
42
|
+
accessor name: string | undefined;
|
|
43
43
|
/**
|
|
44
44
|
* When `true`, the component's value can be read, but cannot be modified.
|
|
45
45
|
*
|
|
@@ -65,9 +65,9 @@ export abstract class Rating extends LitElement {
|
|
|
65
65
|
*/
|
|
66
66
|
accessor status: Status;
|
|
67
67
|
/** Specifies the validation icon to display under the component. */
|
|
68
|
-
accessor validationIcon: IconName | boolean;
|
|
68
|
+
accessor validationIcon: IconName | boolean | undefined;
|
|
69
69
|
/** Specifies the validation message to display under the component. */
|
|
70
|
-
accessor validationMessage: string;
|
|
70
|
+
accessor validationMessage: string | undefined;
|
|
71
71
|
/**
|
|
72
72
|
* The component's current validation state.
|
|
73
73
|
*
|
|
@@ -90,12 +90,16 @@ class Rating extends LitElement {
|
|
|
90
90
|
willUpdate() {
|
|
91
91
|
this.starsMap = Array.from({ length: this.max }, (_, i) => {
|
|
92
92
|
const value = i + 1;
|
|
93
|
-
const
|
|
93
|
+
const hoverValue = this.hoverValue ?? 0;
|
|
94
|
+
const hasHoverValue = hoverValue > 0;
|
|
95
|
+
const hasAverage = this.average != null;
|
|
96
|
+
const averageValue = this.average ?? 0;
|
|
97
|
+
const average = !hasHoverValue && hasAverage && !this.value && value <= averageValue;
|
|
94
98
|
const checked = value === this.value;
|
|
95
|
-
const fraction =
|
|
96
|
-
const hovered = value <=
|
|
99
|
+
const fraction = hasAverage ? averageValue + 1 - value : 0;
|
|
100
|
+
const hovered = hasHoverValue && value <= hoverValue;
|
|
97
101
|
const id = `${this.guid}-${value}`;
|
|
98
|
-
const partial = !
|
|
102
|
+
const partial = !hasHoverValue && !this.value && hasAverage && !hovered && fraction > 0 && fraction < 1;
|
|
99
103
|
const selected = this.value >= value;
|
|
100
104
|
const tabIndex = this.getTabIndex(value);
|
|
101
105
|
return {
|
|
@@ -133,7 +137,7 @@ class Rating extends LitElement {
|
|
|
133
137
|
}
|
|
134
138
|
handleRatingPointerOut() {
|
|
135
139
|
this.isKeyboardInteraction = true;
|
|
136
|
-
this.hoverValue =
|
|
140
|
+
this.hoverValue = void 0;
|
|
137
141
|
}
|
|
138
142
|
handleHostKeyDown() {
|
|
139
143
|
this.isKeyboardInteraction = true;
|
|
@@ -141,7 +145,7 @@ class Rating extends LitElement {
|
|
|
141
145
|
handleLabelKeyDown(event) {
|
|
142
146
|
const inputValue = this.getValueFromLabelEvent(event);
|
|
143
147
|
const key = event.key;
|
|
144
|
-
const numberKey = key == " " ?
|
|
148
|
+
const numberKey = key == " " ? NaN : Number(key);
|
|
145
149
|
this.emit = true;
|
|
146
150
|
if (isNaN(numberKey)) {
|
|
147
151
|
switch (key) {
|
|
@@ -160,7 +164,7 @@ class Rating extends LitElement {
|
|
|
160
164
|
event.preventDefault();
|
|
161
165
|
break;
|
|
162
166
|
case "Tab":
|
|
163
|
-
this.hoverValue =
|
|
167
|
+
this.hoverValue = void 0;
|
|
164
168
|
break;
|
|
165
169
|
}
|
|
166
170
|
} else {
|
|
@@ -174,7 +178,7 @@ class Rating extends LitElement {
|
|
|
174
178
|
}
|
|
175
179
|
handleInputChange(event) {
|
|
176
180
|
if (this.isKeyboardInteraction === true) {
|
|
177
|
-
const inputVal = Number(event.target
|
|
181
|
+
const inputVal = Number(event.target.value);
|
|
178
182
|
this.hoverValue = inputVal;
|
|
179
183
|
this.value = inputVal;
|
|
180
184
|
}
|
|
@@ -199,7 +203,7 @@ class Rating extends LitElement {
|
|
|
199
203
|
}
|
|
200
204
|
updateFocus() {
|
|
201
205
|
this.hoverValue = this.value;
|
|
202
|
-
this.labelElements[this.value - 1]
|
|
206
|
+
this.labelElements[this.value - 1]?.focus();
|
|
203
207
|
}
|
|
204
208
|
getTabIndex(value) {
|
|
205
209
|
if (this.readOnly || this.value !== value && (this.value || value !== 1)) {
|