@esri/calcite-components 5.1.1-next.4 → 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.
Files changed (189) hide show
  1. package/dist/cdn/{GMX26I6Z.js → 26TKJ45G.js} +1 -1
  2. package/dist/cdn/{SAP7K723.js → 27CKMD4S.js} +1 -1
  3. package/dist/cdn/{WRN5WBB6.js → 2B22J6N7.js} +1 -1
  4. package/dist/cdn/{W3RFQNTS.js → 2TUMH7BJ.js} +1 -1
  5. package/dist/cdn/{SJCVYBDF.js → 2UXB22NZ.js} +1 -1
  6. package/dist/cdn/{3WYNE4QF.js → 3BFO4M6M.js} +1 -1
  7. package/dist/cdn/{B6TEVZWE.js → 3NAS4Q4X.js} +1 -1
  8. package/dist/cdn/{DT2W5XTJ.js → 3WWVPHTN.js} +1 -1
  9. package/dist/cdn/{H36BMH7D.js → 4OKNI2ME.js} +1 -1
  10. package/dist/cdn/{KVFTDPP2.js → 4U2T5QCF.js} +1 -1
  11. package/dist/cdn/{CKKHWLPH.js → 4YU7KVLN.js} +1 -1
  12. package/dist/cdn/{2IBAD62X.js → 4ZARBNVE.js} +1 -1
  13. package/dist/cdn/{KDQ3UZH7.js → 56OUAFHZ.js} +1 -1
  14. package/dist/cdn/{4ZPAVVYJ.js → 5CZT7ZF2.js} +1 -1
  15. package/dist/cdn/{ICR6VGXW.js → 5KHTOS43.js} +1 -1
  16. package/dist/cdn/{7UDR7DFA.js → 5UM2PD3Y.js} +1 -1
  17. package/dist/cdn/{UZDC6JVX.js → 5VR5L3IN.js} +1 -1
  18. package/dist/cdn/{HRXTLTVO.js → 5X5GP5QD.js} +1 -1
  19. package/dist/cdn/{IHAUCNQX.js → 6HZDBIQR.js} +1 -1
  20. package/dist/cdn/{M7L5IJNX.js → 6JJSMJ5O.js} +1 -1
  21. package/dist/cdn/{GS6RPTCF.js → 6OQ7N7VS.js} +1 -1
  22. package/dist/cdn/{NKHYGAEA.js → 6PA56XE3.js} +1 -1
  23. package/dist/cdn/{KN2YMMJU.js → 6PNEL3GY.js} +1 -1
  24. package/dist/cdn/{B4XZL24D.js → 7MDIWERA.js} +1 -1
  25. package/dist/cdn/{6QHKZ6N2.js → 7P74AKWI.js} +1 -1
  26. package/dist/cdn/{WVRMCTHV.js → 7TWNW2BD.js} +1 -1
  27. package/dist/cdn/{IVJ5CA2B.js → 7UQ4BXIA.js} +1 -1
  28. package/dist/cdn/{4KKONFB4.js → 7YW5YF3W.js} +1 -1
  29. package/dist/cdn/{AO2HCAIF.js → A7T3VN2V.js} +1 -1
  30. package/dist/cdn/{X5NQ6JCY.js → ACHU3T7F.js} +1 -1
  31. package/dist/cdn/{WGTXCQ3O.js → AJKRULVQ.js} +1 -1
  32. package/dist/cdn/{TNBTRBEH.js → ANS7V4RO.js} +1 -1
  33. package/dist/cdn/{YVAWGS4S.js → APBFB6S3.js} +1 -1
  34. package/dist/cdn/{PHXN4HLP.js → AQ3IFEKN.js} +1 -1
  35. package/dist/cdn/{4KMJ4MXD.js → ARP32LFE.js} +1 -1
  36. package/dist/cdn/{D53MEGF3.js → AXVF2756.js} +1 -1
  37. package/dist/cdn/BDZQSO2J.js +2 -0
  38. package/dist/cdn/{LNQQJUF3.js → BJ4ABCUP.js} +1 -1
  39. package/dist/cdn/{3E5HT7WV.js → BQES6LWB.js} +1 -1
  40. package/dist/cdn/{H5AJS6TE.js → BTFUTGOB.js} +1 -1
  41. package/dist/cdn/{JPLDIX5B.js → BZ2ZKLD7.js} +1 -1
  42. package/dist/cdn/{7HNSFXSY.js → CISWZLPM.js} +1 -1
  43. package/dist/cdn/{D2VHXI3B.js → CY2QEKCK.js} +1 -1
  44. package/dist/cdn/{J7AXA5LK.js → D2NNUCFT.js} +1 -1
  45. package/dist/cdn/{IONE557M.js → D2VTJOPM.js} +1 -1
  46. package/dist/cdn/{2DULJTZM.js → D5H6K3NA.js} +1 -1
  47. package/dist/cdn/{7Y3634W2.js → DBQJQXU6.js} +1 -1
  48. package/dist/cdn/{ZC4LZHSU.js → DYWNKQ25.js} +1 -1
  49. package/dist/cdn/ECNYDS76.js +2 -0
  50. package/dist/cdn/{EILZPSBO.js → EOXVTTON.js} +1 -1
  51. package/dist/cdn/{JSEQVKIC.js → EV4D2B4G.js} +1 -1
  52. package/dist/cdn/{TXPXLQUH.js → F5LUOXQA.js} +1 -1
  53. package/dist/cdn/{UZZ34E4T.js → F7DJCE7J.js} +1 -1
  54. package/dist/cdn/{T7EQTOMC.js → FGLX24UP.js} +1 -1
  55. package/dist/cdn/{JV3HNXO4.js → FIDNERXC.js} +1 -1
  56. package/dist/cdn/{GBZSLSHZ.js → FIIPI4TO.js} +1 -1
  57. package/dist/cdn/{ORWPOYLO.js → FMGMUK7H.js} +1 -1
  58. package/dist/cdn/{XKBIB37X.js → FNQJGIT5.js} +1 -1
  59. package/dist/cdn/{62HI5T32.js → G2GTTVSE.js} +1 -1
  60. package/dist/cdn/{GVWCR74G.js → GATVDTCX.js} +1 -1
  61. package/dist/cdn/{VRXZT4W2.js → GKHYTKRX.js} +1 -1
  62. package/dist/cdn/{HCDCLO25.js → GLODC255.js} +1 -1
  63. package/dist/cdn/{FJHS7DDZ.js → GLRM5ZT5.js} +1 -1
  64. package/dist/cdn/{EPDFNXOA.js → H4DJFHRD.js} +1 -1
  65. package/dist/cdn/H4MCSFNA.js +2 -0
  66. package/dist/cdn/{X433YAPN.js → H4QDWLO2.js} +1 -1
  67. package/dist/cdn/{M4N5KK5H.js → HETBUMGG.js} +1 -1
  68. package/dist/cdn/{H7USABMA.js → HHH7H3RQ.js} +1 -1
  69. package/dist/cdn/{KY6BBDSF.js → HIUFMP4S.js} +1 -1
  70. package/dist/cdn/{JJ2XXUYL.js → HWD5HVPG.js} +1 -1
  71. package/dist/cdn/{SB3DKUEP.js → IPV6SRQB.js} +1 -1
  72. package/dist/cdn/{WF3KH3KX.js → J4CNKBKA.js} +1 -1
  73. package/dist/cdn/{ZQZPGG2I.js → JCCTCJBT.js} +1 -1
  74. package/dist/cdn/{54YEESGE.js → JZQC7UCN.js} +1 -1
  75. package/dist/cdn/{BIBFBRJ4.js → K3J3HP3C.js} +1 -1
  76. package/dist/cdn/{WKGWLLC5.js → KC4N5X3R.js} +1 -1
  77. package/dist/cdn/{ACJ3OWNF.js → KLK5B7QV.js} +1 -1
  78. package/dist/cdn/KNKMPJAL.js +2 -0
  79. package/dist/cdn/{NUAG24SD.js → KOB2L5OF.js} +1 -1
  80. package/dist/cdn/{IFEFYG7Y.js → KU7JKZKM.js} +1 -1
  81. package/dist/cdn/{N32WSYSG.js → L3DV3PDZ.js} +1 -1
  82. package/dist/cdn/{ADNBYFDU.js → L4PX2B5Q.js} +1 -1
  83. package/dist/cdn/{MGC2TVCO.js → LBC3QOSD.js} +1 -1
  84. package/dist/cdn/{ACPUOOSS.js → LLESMANM.js} +1 -1
  85. package/dist/cdn/{6334DHXU.js → LTTOM2CS.js} +1 -1
  86. package/dist/cdn/{VYRAJF74.js → LW32DABQ.js} +1 -1
  87. package/dist/cdn/{WG6S2XJI.js → LYU2H6SF.js} +1 -1
  88. package/dist/cdn/{7TRR6NS7.js → M3IE6HID.js} +1 -1
  89. package/dist/cdn/{QMKT34NA.js → M47XC6PF.js} +1 -1
  90. package/dist/cdn/{FBWOZGYD.js → MKMBDYHE.js} +1 -1
  91. package/dist/cdn/{3ZONR255.js → MR5GODA3.js} +1 -1
  92. package/dist/cdn/{OKQZCFIY.js → MUEVO64B.js} +1 -1
  93. package/dist/cdn/{VNENCDEM.js → MUUP34X3.js} +1 -1
  94. package/dist/cdn/{GUV5FMJI.js → ODZLYUK3.js} +1 -1
  95. package/dist/cdn/{EZMKINVL.js → ONJA74QA.js} +1 -1
  96. package/dist/cdn/{YZYPUE3P.js → OORT75JS.js} +1 -1
  97. package/dist/cdn/P3CJF65O.js +2 -0
  98. package/dist/cdn/{LZFQODN7.js → PWME5N37.js} +1 -1
  99. package/dist/cdn/{YVL6U4S3.js → QAQYS3BO.js} +1 -1
  100. package/dist/cdn/{GZU4L4YE.js → QER5D477.js} +1 -1
  101. package/dist/cdn/{ID36ZNWO.js → QGJMSJYV.js} +1 -1
  102. package/dist/cdn/{LNTMBB4T.js → QJNZ4DGE.js} +1 -1
  103. package/dist/cdn/{WC7KZ5RN.js → QKYRWKTU.js} +1 -1
  104. package/dist/cdn/{TWFY346Z.js → RQWRV3MX.js} +1 -1
  105. package/dist/cdn/{HOII54SV.js → RX6W4SRU.js} +1 -1
  106. package/dist/cdn/{MVD7UGWN.js → SB5RUV2I.js} +1 -1
  107. package/dist/cdn/{ZNN7Y3Q2.js → SKUVMTOE.js} +1 -1
  108. package/dist/cdn/{54FANYIK.js → SSDV2Z4W.js} +1 -1
  109. package/dist/cdn/{SUKQDR3P.js → SY4OTCR3.js} +1 -1
  110. package/dist/cdn/{AFDMIMYJ.js → T6AQWGKD.js} +1 -1
  111. package/dist/cdn/{FO5JD4B6.js → TL7FQYNH.js} +1 -1
  112. package/dist/cdn/{CQYUSMYI.js → TQ74DQDG.js} +1 -1
  113. package/dist/cdn/{PJFK6R25.js → TR3GWZR3.js} +1 -1
  114. package/dist/cdn/{DPV2S2W4.js → U54ZTDU5.js} +1 -1
  115. package/dist/cdn/{H3KW6SFE.js → UWMTXTYU.js} +1 -1
  116. package/dist/cdn/{GZLUCGFN.js → V4P7PWKU.js} +1 -1
  117. package/dist/cdn/{GMC5U6MT.js → V4PO6GRD.js} +1 -1
  118. package/dist/cdn/{BAKFDEYB.js → V7UCH3LL.js} +1 -1
  119. package/dist/cdn/{BAK72T45.js → VG7NP4T6.js} +1 -1
  120. package/dist/cdn/{FAXETKEB.js → VNLB6ONW.js} +1 -1
  121. package/dist/cdn/{OVLA6XSV.js → VOJ3FHN7.js} +1 -1
  122. package/dist/cdn/VOXGCDBD.js +2 -0
  123. package/dist/cdn/{2ESXTULI.js → VPAYQE3N.js} +1 -1
  124. package/dist/cdn/VPGSTQTT.js +2 -0
  125. package/dist/cdn/{LJBIF6OV.js → VWXOBCBN.js} +1 -1
  126. package/dist/cdn/{TB6QF6QC.js → W3FK3ZCB.js} +1 -1
  127. package/dist/cdn/{KZII5LW7.js → WA2S45EI.js} +1 -1
  128. package/dist/cdn/{ROZCUEUS.js → WCQV2FD5.js} +1 -1
  129. package/dist/cdn/{B6JI7EFV.js → WTNLCUMG.js} +1 -1
  130. package/dist/cdn/{GLXEUJPR.js → WY23ABPE.js} +1 -1
  131. package/dist/cdn/{KCOVOOEW.js → YDF4DHQ3.js} +1 -1
  132. package/dist/cdn/{SGRN6ZVC.js → YENIJIGH.js} +1 -1
  133. package/dist/cdn/{SCWOG2PF.js → YHXTGLCG.js} +1 -1
  134. package/dist/cdn/{S6Y5KXTC.js → YIUURHN4.js} +1 -1
  135. package/dist/cdn/{RCL7WVWK.js → YL72ZNRG.js} +1 -1
  136. package/dist/cdn/{5DZK4XYB.js → YWOGIBVU.js} +1 -1
  137. package/dist/cdn/{UWYNYTMN.js → ZACTCZNT.js} +1 -1
  138. package/dist/cdn/{UEXXVM6G.js → ZCF63ZNP.js} +1 -1
  139. package/dist/cdn/{XPPVR4JK.js → ZD2AZI2C.js} +1 -1
  140. package/dist/cdn/{2URTQOMI.js → ZD5WXZ5Y.js} +1 -1
  141. package/dist/cdn/{6TAMH7YM.js → ZFON2VHB.js} +1 -1
  142. package/dist/cdn/{ACTDFQ7A.js → ZG5BEBIM.js} +1 -1
  143. package/dist/cdn/{YQWYH3MV.js → ZRMUXK2V.js} +1 -1
  144. package/dist/cdn/{AVEA3JYC.js → ZYP2R6KW.js} +1 -1
  145. package/dist/cdn/index.js +1 -1
  146. package/dist/chunks/date.js +3 -3
  147. package/dist/chunks/dom.js +15 -3
  148. package/dist/chunks/floating-ui.js +1 -1
  149. package/dist/chunks/label.js +6 -6
  150. package/dist/chunks/locale.js +3 -6
  151. package/dist/chunks/runtime.js +4 -4
  152. package/dist/chunks/useForm.js +10 -4
  153. package/dist/components/calcite-card/customElement.d.ts +1 -1
  154. package/dist/components/calcite-carousel/customElement.js +5 -6
  155. package/dist/components/calcite-checkbox/customElement.d.ts +4 -4
  156. package/dist/components/calcite-chip-group/customElement.js +1 -1
  157. package/dist/components/calcite-color-picker/customElement.js +1 -1
  158. package/dist/components/calcite-color-picker-hex-input/customElement.js +1 -1
  159. package/dist/components/calcite-flow/customElement.d.ts +2 -2
  160. package/dist/components/calcite-flow/customElement.js +1 -1
  161. package/dist/components/calcite-flow-item/customElement.js +1 -1
  162. package/dist/components/calcite-input/customElement.js +4 -6
  163. package/dist/components/calcite-input-text/customElement.js +1 -1
  164. package/dist/components/calcite-list/customElement.d.ts +4 -4
  165. package/dist/components/calcite-list/customElement.js +4 -5
  166. package/dist/components/calcite-list-item/customElement.d.ts +6 -6
  167. package/dist/components/calcite-list-item/customElement.js +12 -15
  168. package/dist/components/calcite-list-item-group/customElement.d.ts +1 -1
  169. package/dist/components/calcite-loader/customElement.js +3 -3
  170. package/dist/components/calcite-radio-button/customElement.d.ts +5 -5
  171. package/dist/components/calcite-radio-button/customElement.js +1 -1
  172. package/dist/components/calcite-radio-button-group/customElement.d.ts +4 -4
  173. package/dist/components/calcite-radio-button-group/customElement.js +3 -3
  174. package/dist/components/calcite-rating/customElement.d.ts +7 -7
  175. package/dist/components/calcite-rating/customElement.js +13 -9
  176. package/dist/controllers/useSortable.d.ts +2 -2
  177. package/dist/docs/api.json +1 -1
  178. package/dist/docs/docs.json +1 -1
  179. package/dist/docs/vscode.html-custom-data.json +1 -1
  180. package/dist/docs/web-types.json +1 -1
  181. package/dist/utils/dom.d.ts +1 -1
  182. package/package.json +2 -2
  183. package/dist/cdn/2MWPMRNJ.js +0 -2
  184. package/dist/cdn/5ZXYOEVA.js +0 -2
  185. package/dist/cdn/BTML4MEJ.js +0 -2
  186. package/dist/cdn/RW3PY4A7.js +0 -2
  187. package/dist/cdn/UWZCA674.js +0 -2
  188. package/dist/cdn/ZWWMN3TM.js +0 -2
  189. package/dist/cdn/ZXAA7KJS.js +0 -2
@@ -57,9 +57,9 @@ export abstract class List extends LitElement {
57
57
  */
58
58
  accessor filterEnabled: boolean;
59
59
  /** Specifies an accessible name for the filter input field. */
60
- accessor filterLabel: string;
60
+ accessor filterLabel: string | undefined;
61
61
  /** Specifies placeholder text for the component's filter input field. */
62
- accessor filterPlaceholder: string;
62
+ accessor filterPlaceholder: string | undefined;
63
63
  /**
64
64
  * Specifies a function to handle filtering.
65
65
  *
@@ -71,7 +71,7 @@ export abstract class List extends LitElement {
71
71
  */
72
72
  accessor filterPredicate: ((item: ListItem) => boolean) | undefined;
73
73
  /** Specifies the properties to match against when filtering. If not set, all properties will be matched (`description`, `label`, `metadata`, and the `calcite-list-item-group`'s `heading`). */
74
- accessor filterProps: string[];
74
+ accessor filterProps: string[] | undefined;
75
75
  /**
76
76
  * Text for the component's filter input field.
77
77
  *
@@ -116,7 +116,7 @@ export abstract class List extends LitElement {
116
116
  total?: string;
117
117
  };
118
118
  /** Specifies the Unicode numeral system used by the component for localization. */
119
- accessor numberingSystem: NumberingSystem;
119
+ accessor numberingSystem: NumberingSystem | undefined;
120
120
  /**
121
121
  * Specifies the size of the component.
122
122
  *
@@ -111,13 +111,13 @@ class List extends LitElement {
111
111
  this.styles = styles;
112
112
  }
113
113
  get hasActiveFilter() {
114
- return this.filterEnabled && this.filterText && this.filteredItems.length !== this.visibleItems.length;
114
+ return !!(this.filterEnabled && this.filterText && this.filteredItems.length !== this.visibleItems.length);
115
115
  }
116
116
  get showEmptyContentContainer() {
117
117
  return !this.hasContent && this.hasEmptyContent;
118
118
  }
119
119
  get showNoResultsContainer() {
120
- return this.filterEnabled && this.filterText && this.hasFilterNoResults && this.visibleItems.length && !this.filteredItems.length;
120
+ return !!(this.filterEnabled && this.filterText && this.hasFilterNoResults && this.visibleItems.length && !this.filteredItems.length);
121
121
  }
122
122
  get effectiveFilterProps() {
123
123
  if (!this.filterProps) {
@@ -366,7 +366,7 @@ class List extends LitElement {
366
366
  this.calciteListOrderChange.emit(detail);
367
367
  }
368
368
  setParentList() {
369
- this.parentListEl = this.el.parentElement?.closest(listSelector);
369
+ this.parentListEl = this.el.parentElement?.closest(listSelector) || void 0;
370
370
  }
371
371
  handleDefaultSlotChange(event) {
372
372
  if (this.parentListEl) {
@@ -493,8 +493,7 @@ class List extends LitElement {
493
493
  }));
494
494
  }
495
495
  getGroupHeading(item) {
496
- const heading = this.listItemGroups.filter((group) => group.contains(item)).map((group) => group.heading);
497
- return heading;
496
+ return this.listItemGroups.filter((group) => group.contains(item) && group.heading).map((group) => group.heading);
498
497
  }
499
498
  updateGroupItems() {
500
499
  const { el, group, scale } = this;
@@ -35,7 +35,7 @@ export abstract class ListItem extends LitElement {
35
35
  */
36
36
  accessor closed: boolean;
37
37
  /** Specifies a description for the component. Displays below the `label`. */
38
- accessor description: string;
38
+ accessor description: string | undefined;
39
39
  /**
40
40
  * When `true`, interaction is prevented and the component is displayed with lower opacity.
41
41
  *
@@ -55,13 +55,13 @@ export abstract class ListItem extends LitElement {
55
55
  */
56
56
  accessor expanded: boolean;
57
57
  /** Specifies an icon to display at the end of the component. */
58
- accessor iconEnd: IconName;
58
+ accessor iconEnd: IconName | undefined;
59
59
  /** Displays the `iconStart` and/or `iconEnd` as flipped when the element direction is right-to-left (`"rtl"`). */
60
- accessor iconFlipRtl: FlipContext;
60
+ accessor iconFlipRtl: FlipContext | undefined;
61
61
  /** Specifies an icon to display at the start of the component. */
62
- accessor iconStart: IconName;
62
+ accessor iconStart: IconName | undefined;
63
63
  /** Specifies an accessible label for the component, displays above the `description`. */
64
- accessor label: string;
64
+ accessor label: string | undefined;
65
65
  /** Overrides individual strings used by the component. */
66
66
  accessor messageOverrides: {
67
67
  close?: string;
@@ -69,7 +69,7 @@ export abstract class ListItem extends LitElement {
69
69
  collapse?: string;
70
70
  };
71
71
  /** Provides additional metadata to the component. Primary use is for a filter on the parent `calcite-list`. */
72
- accessor metadata: Record<string, unknown>;
72
+ accessor metadata: Record<string, unknown> | undefined;
73
73
  /**
74
74
  * When `true`, the item is open to show child components.
75
75
  *
@@ -35,7 +35,6 @@ class ListItem extends LitElement {
35
35
  this.hasContentEnd = false;
36
36
  this.hasContentStart = false;
37
37
  this.hasCustomContent = false;
38
- this.level = null;
39
38
  this.expandable = false;
40
39
  this.active = false;
41
40
  this.bordered = false;
@@ -47,13 +46,11 @@ class ListItem extends LitElement {
47
46
  this.dragHandle = false;
48
47
  this.expanded = false;
49
48
  this.filterHidden = false;
50
- this.interactionMode = null;
51
49
  this.displayMode = "flat";
52
50
  this.addToItems = [];
53
51
  this.moveToItems = [];
54
52
  this.scale = "m";
55
53
  this.selected = false;
56
- this.selectionMode = null;
57
54
  this.sortHandleOpen = false;
58
55
  this.unavailable = false;
59
56
  this.topLayerDisabled = false;
@@ -110,7 +107,7 @@ class ListItem extends LitElement {
110
107
  connectedCallback() {
111
108
  super.connectedCallback();
112
109
  const { el } = this;
113
- this.parentListEl = el.closest(listSelector);
110
+ this.parentListEl = el.closest(listSelector) || void 0;
114
111
  this.level = getDepth(el) + 1;
115
112
  this.setSelectionDefaults();
116
113
  }
@@ -151,7 +148,7 @@ class ListItem extends LitElement {
151
148
  }
152
149
  activeHandler(active) {
153
150
  if (!active) {
154
- this.focusCell(null, false);
151
+ this.focusCell(void 0, false);
155
152
  }
156
153
  }
157
154
  handleClosedChange() {
@@ -289,7 +286,7 @@ class ListItem extends LitElement {
289
286
  this.actionsStartRef.value,
290
287
  this.contentRef.value,
291
288
  this.actionsEndRef.value
292
- ].filter((el) => el && !el.hidden);
289
+ ].filter((el) => !!(el && !el.hidden));
293
290
  }
294
291
  handleItemKeyDown(event) {
295
292
  if (event.defaultPrevented) {
@@ -300,7 +297,7 @@ class ListItem extends LitElement {
300
297
  const { containerRef, actionsStartRef: { value: actionsStartEl }, actionsEndRef: { value: actionsEndEl }, expanded, expandable } = this;
301
298
  const cells = this.getGridCells();
302
299
  const currentIndex = cells.findIndex((cell) => composedPath.includes(cell));
303
- if (key === "Enter" && !composedPath.includes(actionsStartEl) && !composedPath.includes(actionsEndEl)) {
300
+ if (key === "Enter" && actionsStartEl && !composedPath.includes(actionsStartEl) && actionsEndEl && !composedPath.includes(actionsEndEl)) {
304
301
  event.preventDefault();
305
302
  this.toggleSelected(event.shiftKey);
306
303
  } else if (key === "ArrowRight") {
@@ -309,7 +306,7 @@ class ListItem extends LitElement {
309
306
  if (currentIndex === -1) {
310
307
  if (!expanded && expandable) {
311
308
  this.toggle(true);
312
- this.focusCell(null);
309
+ this.focusCell();
313
310
  } else if (cells[0]) {
314
311
  this.focusCell(cells[0]);
315
312
  }
@@ -320,27 +317,27 @@ class ListItem extends LitElement {
320
317
  event.preventDefault();
321
318
  const prevIndex = currentIndex - 1;
322
319
  if (currentIndex === -1) {
323
- this.focusCell(null);
320
+ this.focusCell();
324
321
  if (expanded && expandable) {
325
322
  this.toggle(false);
326
323
  } else {
327
324
  this.calciteInternalFocusPreviousItem.emit();
328
325
  }
329
326
  } else if (currentIndex === 0) {
330
- this.focusCell(null);
327
+ this.focusCell();
331
328
  containerRef.value.focus();
332
329
  } else if (cells[currentIndex] && cells[prevIndex]) {
333
330
  this.focusCell(cells[prevIndex]);
334
331
  }
335
332
  }
336
333
  }
337
- focusCellNull() {
338
- this.focusCell(null);
334
+ clearCellFocus() {
335
+ this.focusCell();
339
336
  }
340
337
  setFocusCell(focusEl, focusedEl, saveFocusIndex) {
341
338
  const { parentListEl } = this;
342
339
  if (saveFocusIndex) {
343
- focusMap.set(parentListEl, null);
340
+ focusMap.set(parentListEl, void 0);
344
341
  }
345
342
  const gridCells = this.getGridCells();
346
343
  gridCells.forEach((tableCell) => {
@@ -459,14 +456,14 @@ class ListItem extends LitElement {
459
456
  const showSelectionBorder = selectionMode !== "none" && selectionAppearance === "border";
460
457
  const showSelectionHighlight = selectionMode !== "none" && selectionAppearance === "highlight";
461
458
  const containerInteractive = interactionMode === "interactive";
462
- return this.interactiveContainer({ disabled, children: html`<div class=${safeClassMap({ [CSS.wrapper]: true, [CSS.wrapperBordered]: wrapperBordered })}><div .ariaExpanded=${expandable ? expanded : null} .ariaLabel=${label} .ariaLevel=${level} .ariaSelected=${selected} class=${safeClassMap({
459
+ return this.interactiveContainer({ disabled, children: html`<div class=${safeClassMap({ [CSS.wrapper]: true, [CSS.wrapperBordered]: wrapperBordered })}><div .ariaExpanded=${expandable ? expanded : void 0} .ariaLabel=${label} .ariaLevel=${level} .ariaSelected=${selected} class=${safeClassMap({
463
460
  [CSS.row]: true,
464
461
  [CSS.container]: true,
465
462
  [CSS.containerHover]: containerInteractive,
466
463
  [CSS.containerBorder]: showSelectionBorder,
467
464
  [CSS.containerBorderSelected]: showSelectionBorder && selected,
468
465
  [CSS.containerHighlightSelected]: showSelectionHighlight && selected
469
- })} .hidden=${closed || filterHidden} @focus=${this.focusCellNull} @focusin=${this.emitInternalListItemActive} @keydown=${this.handleItemKeyDown} role=row .tabIndex=${active ? 0 : -1} ${ref(this.containerRef)}>${this.renderDragHandle()}${this.renderSelected()}${this.renderExpanded()}<div class=${safeClassMap({
466
+ })} .hidden=${closed || filterHidden} @focus=${this.clearCellFocus} @focusin=${this.emitInternalListItemActive} @keydown=${this.handleItemKeyDown} role=row .tabIndex=${active ? 0 : -1} ${ref(this.containerRef)}>${this.renderDragHandle()}${this.renderSelected()}${this.renderExpanded()}<div class=${safeClassMap({
470
467
  [CSS.contentContainerWrapper]: true,
471
468
  [CSS.contentContainerWrapperBordered]: contentContainerWrapperBordered
472
469
  })}>${this.renderActionsStart()}${this.renderContentContainer()}${this.renderActionsEnd()}</div></div>${this.renderContentBottom()}</div>${this.renderDefaultContainer()}` });
@@ -15,7 +15,7 @@ export abstract class ListItemGroup extends LitElement {
15
15
  */
16
16
  accessor disabled: boolean;
17
17
  /** Specifies the heading text for the nested `calcite-list-item` rows. */
18
- accessor heading: string;
18
+ accessor heading: string | undefined;
19
19
  /**
20
20
  * Specifies the size of the component.
21
21
  *
@@ -82,9 +82,9 @@ class Loader extends LitElement {
82
82
  const isDeterminate = type !== "indeterminate";
83
83
  const valueNow = Math.floor(value);
84
84
  this.el.ariaLabel = label;
85
- this.el.ariaValueMax = isDeterminate ? "100" : void 0;
86
- this.el.ariaValueMin = isDeterminate ? "0" : void 0;
87
- this.el.ariaValueNow = isDeterminate ? valueNow.toString() : void 0;
85
+ this.el.ariaValueMax = isDeterminate ? "100" : null;
86
+ this.el.ariaValueMin = isDeterminate ? "0" : null;
87
+ this.el.ariaValueNow = isDeterminate ? valueNow.toString() : null;
88
88
  setAttribute(this.el, "id", id);
89
89
  this.el.role = "progressbar";
90
90
  return html`<div class=${safeClassMap(CSS.rings)}>${this.renderRing("track")}${this.renderRing("progress")}${!inline && isDeterminate && html`<div class=${safeClassMap(CSS.percentage)}>${this.formatValue()}</div>` || ""}</div>${!inline && text && html`<div class=${safeClassMap(CSS.text)}>${text}</div>` || ""}`;
@@ -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) || null;
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) ?? null;
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 average = !this.hoverValue && this.average && !this.value && value <= this.average;
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 = this.average && this.average + 1 - value;
96
- const hovered = value <= this.hoverValue;
99
+ const fraction = hasAverage ? averageValue + 1 - value : 0;
100
+ const hovered = hasHoverValue && value <= hoverValue;
97
101
  const id = `${this.guid}-${value}`;
98
- const partial = !this.hoverValue && !this.value && !hovered && fraction > 0 && fraction < 1;
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 = null;
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 == " " ? void 0 : Number(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 = null;
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["value"]);
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].focus();
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)) {
@@ -2,6 +2,6 @@ export interface DragDetail<To extends HTMLElement = HTMLElement, From extends H
2
2
  toEl: To;
3
3
  fromEl: From;
4
4
  dragEl: Drag;
5
- newIndex: number;
6
- oldIndex: number;
5
+ newIndex?: number;
6
+ oldIndex?: number;
7
7
  }