@esri/calcite-components 5.2.0-next.66 → 5.2.0-next.68

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 (213) hide show
  1. package/dist/cdn/{BUYQKHFH.js → 27QX5RUS.js} +1 -1
  2. package/dist/cdn/{ZWT2RKT4.js → 2GRCSXSQ.js} +1 -1
  3. package/dist/cdn/{PHMYUCV4.js → 2I44HTOM.js} +1 -1
  4. package/dist/cdn/{YBY6CWZ2.js → 2IQVRNKT.js} +1 -1
  5. package/dist/cdn/{DMLTRFJF.js → 2JOO2OH4.js} +1 -1
  6. package/dist/cdn/{5QHAM5VD.js → 2MR75BSN.js} +1 -1
  7. package/dist/cdn/{HPIZGCCW.js → 2MUTMUWU.js} +1 -1
  8. package/dist/cdn/{5MIMTX7C.js → 2SEVH46T.js} +1 -1
  9. package/dist/cdn/{NQG4BB2P.js → 2WMEFWTK.js} +1 -1
  10. package/dist/cdn/32R5PQAS.js +2 -0
  11. package/dist/cdn/{V6RYR4C4.js → 3ALHCYEN.js} +1 -1
  12. package/dist/cdn/{DWYSF2HX.js → 3DMRGQU5.js} +1 -1
  13. package/dist/cdn/{Z3VBHGHE.js → 3F62G32N.js} +1 -1
  14. package/dist/cdn/{KMR2344E.js → 3LONAYS6.js} +1 -1
  15. package/dist/cdn/{IJG4KS5P.js → 3VR3LUTO.js} +1 -1
  16. package/dist/cdn/{5OYEWLEF.js → 4MNIAMUB.js} +1 -1
  17. package/dist/cdn/{7WAURHJU.js → 4WV4XD5Z.js} +1 -1
  18. package/dist/cdn/{KHPY4I4U.js → 55IHHHZL.js} +1 -1
  19. package/dist/cdn/{GU6WGD2R.js → 55J3ENME.js} +1 -1
  20. package/dist/cdn/{LHAMW73W.js → 5IXSSEMU.js} +1 -1
  21. package/dist/cdn/{IDY2PICV.js → 5LR7KBTO.js} +1 -1
  22. package/dist/cdn/5M2M55VV.js +2 -0
  23. package/dist/cdn/{TNS7HXP7.js → 5OAV6AI4.js} +1 -1
  24. package/dist/cdn/{JLMQXO4G.js → 5OSDQS7F.js} +1 -1
  25. package/dist/cdn/{OHVQ3GZQ.js → 5PJOHFWJ.js} +1 -1
  26. package/dist/cdn/{X55IVJUV.js → 5R7A5G2E.js} +1 -1
  27. package/dist/cdn/{66YYHVLE.js → 5XX6CXLR.js} +1 -1
  28. package/dist/cdn/{JP7NIXEK.js → 6GHWWI72.js} +1 -1
  29. package/dist/cdn/{3HAGJ23L.js → 6HDRFJAB.js} +1 -1
  30. package/dist/cdn/{E5ZJR273.js → 6JRXZI3C.js} +1 -1
  31. package/dist/cdn/{IIL3YGHZ.js → 6P77JU7P.js} +1 -1
  32. package/dist/cdn/{QVV2WPNX.js → 6PD3ODM4.js} +1 -1
  33. package/dist/cdn/{VY5SKCYT.js → 74XJ2VAL.js} +1 -1
  34. package/dist/cdn/{GY2CYQI6.js → 76LSVPKI.js} +1 -1
  35. package/dist/cdn/{RIJQIWPS.js → 7AC77B7K.js} +1 -1
  36. package/dist/cdn/{JAFUSV6D.js → 7B3BBI3W.js} +1 -1
  37. package/dist/cdn/{Q52T2KQK.js → 7E7NENXJ.js} +1 -1
  38. package/dist/cdn/{YDMMUJRI.js → ADUVOFM5.js} +1 -1
  39. package/dist/cdn/{HVL4J27L.js → AFEWTS7J.js} +1 -1
  40. package/dist/cdn/{XZLDXTHK.js → APEIZJKN.js} +1 -1
  41. package/dist/cdn/{WUAMMMHP.js → AXWANMN7.js} +1 -1
  42. package/dist/cdn/{36PQFONO.js → B323KBU4.js} +1 -1
  43. package/dist/cdn/{USS3ZBUQ.js → B73GA7NL.js} +1 -1
  44. package/dist/cdn/{4ZA7AVVV.js → BKKLODVS.js} +1 -1
  45. package/dist/cdn/BND7Z7BL.js +2 -0
  46. package/dist/cdn/{ZKZJCFKM.js → BR74YKF7.js} +1 -1
  47. package/dist/cdn/{XQ3NFFAT.js → C77TEIA4.js} +1 -1
  48. package/dist/cdn/{MPGPUF5W.js → DD2J4EQE.js} +1 -1
  49. package/dist/cdn/{57E2LMC2.js → DHBWQ4YQ.js} +1 -1
  50. package/dist/cdn/{QTV63JPF.js → DWRLK3QT.js} +1 -1
  51. package/dist/cdn/{5VUXKB4L.js → EJPKRT4Y.js} +1 -1
  52. package/dist/cdn/{2VVL4TXM.js → FTYN5CJB.js} +1 -1
  53. package/dist/cdn/{S3GAV6IT.js → FUOUKP7I.js} +1 -1
  54. package/dist/cdn/{56Z5KUY7.js → G2IA36KI.js} +1 -1
  55. package/dist/cdn/{UKS5NIPZ.js → GMLE6RUC.js} +1 -1
  56. package/dist/cdn/{D3JB5ZKH.js → GWKOLN5G.js} +1 -1
  57. package/dist/cdn/{AEXTS4GI.js → GWQ3WI3Y.js} +1 -1
  58. package/dist/cdn/{QMB7DTDX.js → H4Y4P6N7.js} +1 -1
  59. package/dist/cdn/{DOJHZPXV.js → HDPUGDVW.js} +1 -1
  60. package/dist/cdn/HQIVVRHW.js +2 -0
  61. package/dist/cdn/HWVXINQK.js +2 -0
  62. package/dist/cdn/{TNNCPRM2.js → I4T6YYVP.js} +1 -1
  63. package/dist/cdn/{HTESGM54.js → IA2U7MS5.js} +1 -1
  64. package/dist/cdn/{U5HO3HFE.js → IBVUW6OV.js} +1 -1
  65. package/dist/cdn/{BZVSGRJO.js → IDFO7BFX.js} +1 -1
  66. package/dist/cdn/{QLDZJ743.js → IGOWRL6C.js} +1 -1
  67. package/dist/cdn/{D2HMIETU.js → IPRX4YHC.js} +1 -1
  68. package/dist/cdn/{VOYQGXRR.js → IZB3NIYO.js} +1 -1
  69. package/dist/cdn/{WWUVMFZI.js → JOEHFN2T.js} +1 -1
  70. package/dist/cdn/{W72MKNDC.js → JRG2ZHB5.js} +1 -1
  71. package/dist/cdn/{XAUVHNDA.js → JRNO4HS3.js} +1 -1
  72. package/dist/cdn/{UFJG6NMJ.js → JXP242B4.js} +1 -1
  73. package/dist/cdn/K3RDZFLU.js +2 -0
  74. package/dist/cdn/{VRLYRYTO.js → KC4MPQ7Z.js} +1 -1
  75. package/dist/cdn/{JY6TT2QB.js → KL736MKV.js} +1 -1
  76. package/dist/cdn/{FRKWX3IA.js → KMSBJAUF.js} +1 -1
  77. package/dist/cdn/{HD6KFRWO.js → KUGGUJIK.js} +1 -1
  78. package/dist/cdn/{3POIZWGT.js → L5L46OFD.js} +1 -1
  79. package/dist/cdn/{CDPGQU2Z.js → LDGHGSK2.js} +1 -1
  80. package/dist/cdn/{AMPDBO7O.js → LFYYGDN5.js} +1 -1
  81. package/dist/cdn/{PETPVR47.js → LHBE473G.js} +1 -1
  82. package/dist/cdn/{VIA6J3XE.js → LIONUOZP.js} +1 -1
  83. package/dist/cdn/LOVJC5SF.js +2 -0
  84. package/dist/cdn/{7CZAWSPN.js → MCWD375T.js} +1 -1
  85. package/dist/cdn/{LUYE5XKR.js → MGGTO3OC.js} +1 -1
  86. package/dist/cdn/{6IZVU4TS.js → MGLY3N7I.js} +1 -1
  87. package/dist/cdn/{6HZQUGCI.js → MJCOCKM7.js} +1 -1
  88. package/dist/cdn/{YZML4DG4.js → MYZVZEEL.js} +1 -1
  89. package/dist/cdn/{VO4AAUFX.js → ND2L7EHB.js} +1 -1
  90. package/dist/cdn/{3HB55P26.js → NI7RHCAJ.js} +1 -1
  91. package/dist/cdn/{JO5DQIH3.js → NIFUCDJK.js} +1 -1
  92. package/dist/cdn/NQ4ONI7Q.js +2 -0
  93. package/dist/cdn/{WLJKHWJN.js → NWJ4PTPY.js} +1 -1
  94. package/dist/cdn/{7R2OHTUX.js → NZD67SUP.js} +1 -1
  95. package/dist/cdn/{E4AYJ7XB.js → O5IHTADJ.js} +1 -1
  96. package/dist/cdn/{ZWCCUVYR.js → OUF56SBA.js} +1 -1
  97. package/dist/cdn/{6G7HK3DF.js → P2GEY7AZ.js} +1 -1
  98. package/dist/cdn/{XKIKN6ZZ.js → P7AOEK7Q.js} +1 -1
  99. package/dist/cdn/PI7UEAV2.js +2 -0
  100. package/dist/cdn/{OOVH4ZPV.js → PPSYU4O2.js} +1 -1
  101. package/dist/cdn/{G4S55KX5.js → PSUGOPQR.js} +1 -1
  102. package/dist/cdn/{NQ2UNC27.js → PUYKPER7.js} +1 -1
  103. package/dist/cdn/{CIPMZLSD.js → QSBLB3BJ.js} +1 -1
  104. package/dist/cdn/{QZVOJPHR.js → QSLEFJMI.js} +1 -1
  105. package/dist/cdn/{WQSPSYCB.js → RALD3O7W.js} +1 -1
  106. package/dist/cdn/RN6BC2VL.js +2 -0
  107. package/dist/cdn/{ZZ7IVCCX.js → RPDGGFQX.js} +1 -1
  108. package/dist/cdn/{YDYZ3RKW.js → RQBPXQQH.js} +1 -1
  109. package/dist/cdn/{F6RENHT5.js → RRZ3F6QH.js} +1 -1
  110. package/dist/cdn/{FGHKM52J.js → RTARUOW4.js} +1 -1
  111. package/dist/cdn/{TNQFT7A4.js → RVHA7VIU.js} +1 -1
  112. package/dist/cdn/{ON3WDKBS.js → S2XITRDA.js} +1 -1
  113. package/dist/cdn/{ZYWFPCA4.js → SFMTVNQY.js} +1 -1
  114. package/dist/cdn/{JJG2JBPE.js → SQLCDYZW.js} +1 -1
  115. package/dist/cdn/{CR4MU73D.js → T3HTRLQU.js} +1 -1
  116. package/dist/cdn/{Z3OKBA7K.js → T5IJSQLI.js} +1 -1
  117. package/dist/cdn/{4O2IYMDZ.js → TGXXVRC6.js} +1 -1
  118. package/dist/cdn/{E65DBDRP.js → THLYVOUI.js} +1 -1
  119. package/dist/cdn/{KR2UWOYO.js → TKEGDNWM.js} +1 -1
  120. package/dist/cdn/{BKQBLUE7.js → TQFQFJHR.js} +1 -1
  121. package/dist/cdn/{AKNVPJP5.js → U2CGE6AP.js} +1 -1
  122. package/dist/cdn/{MQZ2PM2C.js → UHCIG3QJ.js} +1 -1
  123. package/dist/cdn/{BY4ZVGX5.js → UKIN534I.js} +1 -1
  124. package/dist/cdn/{GDCFFQ53.js → UOALUHN2.js} +1 -1
  125. package/dist/cdn/{GWWCCH7I.js → US5COZTM.js} +1 -1
  126. package/dist/cdn/{WWBDVDAS.js → V73OGBZM.js} +1 -1
  127. package/dist/cdn/{INY2G6X6.js → VBOMGRXI.js} +1 -1
  128. package/dist/cdn/{MR53EU6T.js → VIBT5ZJH.js} +1 -1
  129. package/dist/cdn/{RLWBL52I.js → VPNLX2P6.js} +1 -1
  130. package/dist/cdn/{I3ROWCUH.js → VT4VVH3P.js} +1 -1
  131. package/dist/cdn/{HF57X6NI.js → VUPJU3LI.js} +1 -1
  132. package/dist/cdn/{V2WRQ7I7.js → WH2I6BWN.js} +1 -1
  133. package/dist/cdn/{ZJQEDR4H.js → WH3EE5Z7.js} +1 -1
  134. package/dist/cdn/{32Q6FDMA.js → WHW22T3G.js} +1 -1
  135. package/dist/cdn/{UVFMFP7C.js → WIDJPJW3.js} +1 -1
  136. package/dist/cdn/{QSZ6MSOE.js → WPX4CZO7.js} +1 -1
  137. package/dist/cdn/{MK6IYIPB.js → XDEXDF5X.js} +1 -1
  138. package/dist/cdn/{PDWWAB3O.js → XFQZ4H3O.js} +1 -1
  139. package/dist/cdn/{UCHFNT6G.js → XT2MQVH7.js} +1 -1
  140. package/dist/cdn/{63OSRUIO.js → YIWPIM3S.js} +1 -1
  141. package/dist/cdn/{A3IDZ4HP.js → YTSYFTX2.js} +1 -1
  142. package/dist/cdn/{6Y2IG3NI.js → Z554WZNN.js} +1 -1
  143. package/dist/cdn/{HCOFTOGW.js → ZDCCECV2.js} +1 -1
  144. package/dist/cdn/{JTUMCWAV.js → ZOTCWV26.js} +1 -1
  145. package/dist/cdn/assets/icon/columnGroup16.json +1 -0
  146. package/dist/cdn/assets/icon/columnGroup24.json +1 -0
  147. package/dist/cdn/assets/icon/columnGroup32.json +1 -0
  148. package/dist/cdn/assets/icon/columnRemove16.json +1 -0
  149. package/dist/cdn/assets/icon/columnRemove24.json +1 -0
  150. package/dist/cdn/assets/icon/columnRemove32.json +1 -0
  151. package/dist/cdn/assets/icon/columnUngroup16.json +1 -0
  152. package/dist/cdn/assets/icon/columnUngroup24.json +1 -0
  153. package/dist/cdn/assets/icon/columnUngroup32.json +1 -0
  154. package/dist/cdn/assets/icon/envelopeOpen16.json +1 -0
  155. package/dist/cdn/assets/icon/envelopeOpen24.json +1 -0
  156. package/dist/cdn/assets/icon/envelopeOpen32.json +1 -0
  157. package/dist/cdn/assets/icon/handDraw16.json +1 -0
  158. package/dist/cdn/assets/icon/handDraw24.json +1 -0
  159. package/dist/cdn/assets/icon/handDraw32.json +1 -0
  160. package/dist/cdn/assets/icon/monitorShare16.json +1 -0
  161. package/dist/cdn/assets/icon/monitorShare24.json +1 -0
  162. package/dist/cdn/assets/icon/monitorShare32.json +1 -0
  163. package/dist/cdn/assets/icon/pi16.json +1 -0
  164. package/dist/cdn/assets/icon/pi24.json +1 -0
  165. package/dist/cdn/assets/icon/pi32.json +1 -0
  166. package/dist/cdn/assets/icon/rowGroup16.json +1 -0
  167. package/dist/cdn/assets/icon/rowGroup24.json +1 -0
  168. package/dist/cdn/assets/icon/rowGroup32.json +1 -0
  169. package/dist/cdn/assets/icon/rowRemove16.json +1 -0
  170. package/dist/cdn/assets/icon/rowRemove24.json +1 -0
  171. package/dist/cdn/assets/icon/rowRemove32.json +1 -0
  172. package/dist/cdn/assets/icon/rowUngroup16.json +1 -0
  173. package/dist/cdn/assets/icon/rowUngroup24.json +1 -0
  174. package/dist/cdn/assets/icon/rowUngroup32.json +1 -0
  175. package/dist/cdn/assets/icon/sdCard16.json +1 -0
  176. package/dist/cdn/assets/icon/sdCard24.json +1 -0
  177. package/dist/cdn/assets/icon/sdCard32.json +1 -0
  178. package/dist/cdn/assets/icon/swatchPalette16.json +1 -0
  179. package/dist/cdn/assets/icon/swatchPalette24.json +1 -0
  180. package/dist/cdn/assets/icon/swatchPalette32.json +1 -0
  181. package/dist/cdn/assets/icon/thermometer16.json +1 -0
  182. package/dist/cdn/assets/icon/thermometer24.json +1 -0
  183. package/dist/cdn/assets/icon/thermometer32.json +1 -0
  184. package/dist/cdn/assets/icon/webCamera16.json +1 -0
  185. package/dist/cdn/assets/icon/webCamera24.json +1 -0
  186. package/dist/cdn/assets/icon/webCamera32.json +1 -0
  187. package/dist/cdn/index.js +1 -1
  188. package/dist/chunks/openCloseComponent.js +5 -5
  189. package/dist/chunks/runtime.js +4 -4
  190. package/dist/chunks/text.js +0 -4
  191. package/dist/chunks/useForm.js +14 -2
  192. package/dist/chunks/useTime.js +6 -2
  193. package/dist/components/calcite-action/customElement.js +2 -2
  194. package/dist/components/calcite-button/customElement.js +1 -1
  195. package/dist/components/calcite-color-picker/customElement.js +38 -13
  196. package/dist/components/calcite-flow/customElement.js +12 -5
  197. package/dist/components/calcite-input-time-zone/customElement.js +6 -2
  198. package/dist/components/calcite-slider/customElement.js +70 -44
  199. package/dist/docs/api.json +1 -1
  200. package/dist/docs/docs.json +1 -1
  201. package/dist/docs/vscode.html-custom-data.json +1 -1
  202. package/dist/docs/web-types.json +1 -1
  203. package/package.json +5 -4
  204. package/dist/cdn/26T43QVU.js +0 -2
  205. package/dist/cdn/26YAYKO6.js +0 -2
  206. package/dist/cdn/3K5UHJ22.js +0 -2
  207. package/dist/cdn/JNO6KD4V.js +0 -2
  208. package/dist/cdn/N5GBL74D.js +0 -2
  209. package/dist/cdn/NBE3AKGO.js +0 -2
  210. package/dist/cdn/QXIOI3UW.js +0 -2
  211. package/dist/cdn/SAWC22RJ.js +0 -2
  212. package/dist/cdn/UHJJXMEK.js +0 -2
  213. package/dist/cdn/UHXV6JXZ.js +0 -2
@@ -4,9 +4,6 @@ import { safeClassMap } from "@arcgis/lumina";
4
4
  const CSS = {
5
5
  textMatch: "text-match"
6
6
  };
7
- function capitalizeWord(word) {
8
- return word.charAt(0).toUpperCase() + word.slice(1);
9
- }
10
7
  function highlightText({ text, pattern }) {
11
8
  if (!pattern || !text) {
12
9
  return text;
@@ -18,6 +15,5 @@ function highlightText({ text, pattern }) {
18
15
  return parts;
19
16
  }
20
17
  export {
21
- capitalizeWord as c,
22
18
  highlightText as h
23
19
  };
@@ -35,6 +35,18 @@ function isSupportedType(type) {
35
35
  }
36
36
  const joinableValueTypes = ["text", "email", "search", "hidden", "tel", "url"];
37
37
  const allValid = Object.freeze({ validity: {}, validationMessage: "" });
38
+ const validityFlagKeys = [
39
+ "badInput",
40
+ "customError",
41
+ "patternMismatch",
42
+ "rangeOverflow",
43
+ "rangeUnderflow",
44
+ "stepMismatch",
45
+ "tooLong",
46
+ "tooShort",
47
+ "typeMismatch",
48
+ "valueMissing"
49
+ ];
38
50
  function validate({
39
51
  component,
40
52
  input,
@@ -108,8 +120,8 @@ function validateValue(inputDelegate, valueToValidate) {
108
120
  }
109
121
  function getValidityFlags(validityState) {
110
122
  const validityFlags = {};
111
- for (const key in validityState) {
112
- if (key !== "valid" && validityState[key]) {
123
+ for (const key of validityFlagKeys) {
124
+ if (validityState[key]) {
113
125
  validityFlags[key] = true;
114
126
  }
115
127
  }
@@ -3,7 +3,6 @@ import { toFunction, GenericController } from "@arcgis/lumina/controllers";
3
3
  import { createEvent } from "@arcgis/lumina";
4
4
  import { l as localizedTwentyFourHourMeridiems, i as isValidNumber, n as numberStringFormatter, g as getDateTimeFormat, a as getSupportedNumberingSystem } from "./locale.js";
5
5
  import { d as decimalPlaces, g as getDecimals } from "./math.js";
6
- import { c as capitalizeWord } from "./text.js";
7
6
  import { n as numberKeys } from "./key.js";
8
7
  const maxTenthForMinuteAndSecond = 5;
9
8
  function createLocaleDateTimeFormatter({
@@ -392,6 +391,11 @@ function toISOTimeString(value, step = 60) {
392
391
  }
393
392
  return isoTimeString;
394
393
  }
394
+ const localizedTimePartProperty = {
395
+ hour: "localizedHour",
396
+ minute: "localizedMinute",
397
+ second: "localizedSecond"
398
+ };
395
399
  class TimeController extends GenericController {
396
400
  constructor() {
397
401
  super(...arguments);
@@ -828,7 +832,7 @@ class TimeController extends GenericController {
828
832
  } else {
829
833
  const oldValue = this[key];
830
834
  this[key] = typeof value === "number" ? formatTimePart(value) : value;
831
- this[`localized${capitalizeWord(key)}`] = localizeTimePart({
835
+ this[localizedTimePartProperty[key]] = localizeTimePart({
832
836
  value: this[key],
833
837
  part: key,
834
838
  locale,
@@ -16,7 +16,7 @@ const styles$1 = css`:host{box-sizing:border-box;background-color:var(--calcite-
16
16
  const styles = css`.screen-reader-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}`;
17
17
  class Action extends LitElement {
18
18
  constructor() {
19
- super(...arguments);
19
+ super();
20
20
  this.guid = guid();
21
21
  this.buttonRef = createRef();
22
22
  this.buttonId = IDS.button(this.guid);
@@ -25,7 +25,6 @@ class Action extends LitElement {
25
25
  this.focusSetter = useSetFocus()(this);
26
26
  this.indicatorRef = createRef();
27
27
  this.interactiveContainer = useInteractive(this);
28
- this.formTrigger = useFormTrigger()(this);
29
28
  this.labelElRef = createRef();
30
29
  this.active = false;
31
30
  this.activeDescendant = false;
@@ -41,6 +40,7 @@ class Action extends LitElement {
41
40
  this.width = "auto";
42
41
  this.textEnabled = false;
43
42
  this.type = "button";
43
+ useFormTrigger()(this);
44
44
  }
45
45
  static {
46
46
  this.properties = { aria: [0, {}, { attribute: false }], active: [7, {}, { reflect: true, type: Boolean }], activeDescendant: [7, {}, { reflect: true, type: Boolean }], alignment: [3, {}, { reflect: true }], appearance: [3, {}, { reflect: true }], compact: [7, {}, { reflect: true, type: Boolean }], disabled: [7, {}, { reflect: true, type: Boolean }], dragHandle: [7, {}, { reflect: true, type: Boolean }], form: [3, {}, { reflect: true }], icon: [3, {}, { reflect: true }], iconFlipRtl: [7, {}, { reflect: true, type: Boolean }], indicator: [7, {}, { reflect: true, type: Boolean }], label: 1, loading: [7, {}, { reflect: true, type: Boolean }], messageOverrides: [0, {}, { attribute: false }], overflowDisabled: [7, {}, { reflect: true, type: Boolean }], scale: [3, {}, { reflect: true }], width: [3, {}, { reflect: true }], text: 1, textEnabled: [7, {}, { reflect: true, type: Boolean }], type: [3, {}, { reflect: true }], selectionAppearance: [3, {}, { reflect: true }] };
@@ -34,7 +34,6 @@ class Button extends LitElement {
34
34
  super();
35
35
  this.attributeWatch = useWatchAttributes(["aria-expanded"], this.handleGlobalAttributesChanged);
36
36
  this.contentRef = createRef();
37
- this.formTrigger = useFormTrigger({ disabled: () => !!this.href })(this);
38
37
  this.mutationObserver = createObserver("mutation", () => this.updateHasContent());
39
38
  this.resizeObserver = createObserver("resize", () => this.setTooltipText());
40
39
  this.focusSetter = useSetFocus()(this);
@@ -52,6 +51,7 @@ class Button extends LitElement {
52
51
  this.splitChild = false;
53
52
  this.type = "button";
54
53
  this.width = "auto";
54
+ useFormTrigger({ disabled: () => !!this.href })(this);
55
55
  useLabel(this);
56
56
  }
57
57
  static {
@@ -297,10 +297,11 @@ class ColorPicker extends LitElement {
297
297
  ArrowDown: { x: 0, y: 10 },
298
298
  ArrowLeft: { x: -10, y: 0 }
299
299
  };
300
- if (arrowKeyToXYOffset[key]) {
300
+ const offset = arrowKeyToXYOffset[key];
301
+ if (offset) {
301
302
  event.preventDefault();
302
303
  this.scopeOrientation = key === "ArrowDown" || key === "ArrowUp" ? "vertical" : "horizontal";
303
- this.captureColorFieldColor(this.colorFieldScopeLeft + arrowKeyToXYOffset[key].x || 0, this.colorFieldScopeTop + arrowKeyToXYOffset[key].y || 0, false);
304
+ this.captureColorFieldColor(this.colorFieldScopeLeft === void 0 ? 0 : this.colorFieldScopeLeft + offset.x, this.colorFieldScopeTop === void 0 ? 0 : this.colorFieldScopeTop + offset.y, false);
304
305
  }
305
306
  }
306
307
  handleHueScopeKeyDown(event) {
@@ -312,9 +313,10 @@ class ColorPicker extends LitElement {
312
313
  ArrowDown: -1,
313
314
  ArrowLeft: -1
314
315
  };
315
- if (arrowKeyToXOffset[key]) {
316
+ const offset = arrowKeyToXOffset[key];
317
+ if (offset) {
316
318
  event.preventDefault();
317
- const delta = arrowKeyToXOffset[key] * modifier;
319
+ const delta = offset * modifier;
318
320
  const hue = this.baseColorFieldColor.hue();
319
321
  const color = this.baseColorFieldColor.hue(hue + delta);
320
322
  this.internalColorSet(color, false);
@@ -342,7 +344,7 @@ class ColorPicker extends LitElement {
342
344
  const input = event.currentTarget;
343
345
  const channelIndex = Number(input.getAttribute("data-channel-index"));
344
346
  const isAlphaChannel = channelIndex === 3;
345
- const limit = isAlphaChannel ? OPACITY_LIMITS.max : this.channelMode === "rgb" ? RGB_LIMITS[Object.keys(RGB_LIMITS)[channelIndex]] : HSV_LIMITS[Object.keys(HSV_LIMITS)[channelIndex]];
347
+ const limit = isAlphaChannel ? OPACITY_LIMITS.max : this.channelMode === "rgb" ? Object.values(RGB_LIMITS)[channelIndex] : Object.values(HSV_LIMITS)[channelIndex];
346
348
  let inputValue;
347
349
  if (!input.value) {
348
350
  inputValue = "";
@@ -397,7 +399,7 @@ class ColorPicker extends LitElement {
397
399
  }
398
400
  }
399
401
  getChannelInputLimit(channelIndex) {
400
- return this.channelMode === "rgb" ? RGB_LIMITS[Object.keys(RGB_LIMITS)[channelIndex]] : HSV_LIMITS[Object.keys(HSV_LIMITS)[channelIndex]];
402
+ return this.channelMode === "rgb" ? Object.values(RGB_LIMITS)[channelIndex] : Object.values(HSV_LIMITS)[channelIndex];
401
403
  }
402
404
  handleChannelChange(event) {
403
405
  const input = event.currentTarget;
@@ -512,7 +514,7 @@ class ColorPicker extends LitElement {
512
514
  return normalizeHex(hexify(color.round(), hasAlpha), hasAlpha);
513
515
  }
514
516
  if (format.includes("-css")) {
515
- const value = color[format.replace("-css", "").replace("a", "")]().round().string();
517
+ const value = (format.startsWith("rgb") ? color.rgb() : color.hsl()).round().string();
516
518
  const needToInjectAlpha = (format.endsWith("a") || format.endsWith("a-css")) && color.alpha() === 1;
517
519
  if (needToInjectAlpha) {
518
520
  const model = value.slice(0, 3);
@@ -521,14 +523,36 @@ class ColorPicker extends LitElement {
521
523
  }
522
524
  return value;
523
525
  }
524
- const colorObject = (
526
+ const nonAlphaMode = toNonAlphaMode(format);
527
+ const roundedColor = (
525
528
  /* Color() does not support hsva, hsla nor rgba, so we use the non-alpha mode */
526
- color[toNonAlphaMode(format)]().round().object()
529
+ (nonAlphaMode === "rgb" ? color.rgb() : nonAlphaMode === "hsl" ? color.hsl() : color.hsv()).round()
527
530
  );
531
+ const colorObject = roundedColor.object();
528
532
  if (format.endsWith("a")) {
529
533
  return normalizeAlpha(colorObject);
530
534
  }
531
- return colorObject;
535
+ if (nonAlphaMode === "rgb") {
536
+ const { r, g, b } = colorObject;
537
+ return {
538
+ r,
539
+ g,
540
+ b
541
+ };
542
+ }
543
+ const { h, s } = colorObject;
544
+ if (nonAlphaMode === "hsl") {
545
+ return {
546
+ h,
547
+ s,
548
+ l: colorObject.l
549
+ };
550
+ }
551
+ return {
552
+ h,
553
+ s,
554
+ v: colorObject.v
555
+ };
532
556
  }
533
557
  getSliderCapSpacing() {
534
558
  const { staticDimensions: { slider: { height }, thumb: { radius } } } = this;
@@ -805,9 +829,10 @@ class ColorPicker extends LitElement {
805
829
  ArrowDown: -0.01,
806
830
  ArrowLeft: -0.01
807
831
  };
808
- if (arrowKeyToXOffset[key]) {
832
+ const offset = arrowKeyToXOffset[key];
833
+ if (offset) {
809
834
  event.preventDefault();
810
- const delta = arrowKeyToXOffset[key] * modifier;
835
+ const delta = offset * modifier;
811
836
  const alpha = this.baseColorFieldColor.alpha();
812
837
  const color = this.baseColorFieldColor.alpha(alpha + delta);
813
838
  this.internalColorSet(color, false);
@@ -821,7 +846,7 @@ class ColorPicker extends LitElement {
821
846
  }
822
847
  toChannels(color) {
823
848
  const { channelMode } = this;
824
- const channels = color[channelMode]().round().array();
849
+ const channels = (channelMode === "rgb" ? color.rgb() : color.hsv()).round().array();
825
850
  if (channels.length === 3) {
826
851
  channels.push(1);
827
852
  }
@@ -3,19 +3,26 @@ import { c as customElement } from "../../chunks/runtime.js";
3
3
  import { css, html } from "lit";
4
4
  import { LitElement, safeClassMap } from "@arcgis/lumina";
5
5
  import { createRef, ref } from "lit/directives/ref.js";
6
+ import { x as whenAnimationDone, a as getSlotAssignedElements } from "../../chunks/dom.js";
6
7
  import { c as createObserver } from "../../chunks/observers.js";
7
- import { x as whenAnimationDone } from "../../chunks/dom.js";
8
8
  import { u as useSetFocus } from "../../chunks/useSetFocus.js";
9
9
  const CSS = {
10
10
  frame: "frame",
11
11
  frameAdvancing: "frame--advancing",
12
12
  frameRetreating: "frame--retreating"
13
13
  };
14
+ const SELECTORS = {
15
+ item: "calcite-flow-item"
16
+ };
14
17
  const styles = css`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host{position:relative;display:flex;inline-size:100%;flex:1 1 auto;align-items:stretch;overflow:hidden;background-color:transparent}:host .frame{position:relative;margin:0;display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;padding:0;animation-name:none;animation-duration:var(--calcite-animation-timing);background-color:var(--calcite-flow-background-color)}:host ::slotted(*){display:none;block-size:100%}:host ::slotted(*[selected]){display:flex}:host .frame--advancing{animation-name:calcite-frame-advance}:host .frame--retreating{animation-name:calcite-frame-retreat}@keyframes calcite-frame-advance{0%{--tw-bg-opacity: .5;transform:translate3d(50px,0,0)}to{--tw-bg-opacity: 1;transform:translateZ(0)}}@keyframes calcite-frame-retreat{0%{--tw-bg-opacity: .5;transform:translate3d(-50px,0,0)}to{--tw-bg-opacity: 1;transform:translateZ(0)}}:host([hidden]){display:none}[hidden]{display:none}`;
18
+ function getFlowItemSelectors(customItemSelectors) {
19
+ return customItemSelectors ? `${SELECTORS.item},${customItemSelectors}` : SELECTORS.item;
20
+ }
15
21
  class Flow extends LitElement {
16
22
  constructor() {
17
23
  super();
18
24
  this.frameRef = createRef();
25
+ this.defaultSlotRef = createRef();
19
26
  this.itemMutationObserver = createObserver("mutation", () => this.updateItemsAndProps());
20
27
  this.items = [];
21
28
  this.selectedIndex = -1;
@@ -96,9 +103,9 @@ class Flow extends LitElement {
96
103
  return newSelectedIndex < oldSelectedIndex ? "retreating" : "advancing";
97
104
  }
98
105
  updateItemsAndProps() {
99
- const { customItemSelectors, el } = this;
100
- const newItems = Array.from(el.querySelectorAll(`calcite-flow-item${customItemSelectors ? `,${customItemSelectors}` : ""}`)).filter((flowItem) => flowItem.closest("calcite-flow") === el);
101
- this.items = newItems;
106
+ const itemSelectors = getFlowItemSelectors(this.customItemSelectors);
107
+ const slottedItems = this.defaultSlotRef.value ? getSlotAssignedElements(this.defaultSlotRef.value, itemSelectors) : [];
108
+ this.items = slottedItems;
102
109
  this.ensureSelectedFlowItemExists();
103
110
  this.updateFlowProps();
104
111
  }
@@ -142,7 +149,7 @@ class Flow extends LitElement {
142
149
  [CSS.frameAdvancing]: flowDirection === "advancing",
143
150
  [CSS.frameRetreating]: flowDirection === "retreating"
144
151
  };
145
- return html`<div class=${safeClassMap(frameDirectionClasses)} ${ref(this.frameRef)}><slot></slot></div>`;
152
+ return html`<div class=${safeClassMap(frameDirectionClasses)} ${ref(this.frameRef)}><slot @slotchange=${this.updateItemsAndProps} ${ref(this.defaultSlotRef)}></slot></div>`;
146
153
  }
147
154
  }
148
155
  customElement("calcite-flow", Flow);
@@ -157,14 +157,18 @@ async function createTimeZoneItems(locale, messages, mode, referenceDate, standa
157
157
  }).filter((group) => !!group).sort((groupA, groupB) => groupA.value - groupB.value);
158
158
  }
159
159
  function getTimeZoneLabel(timeZone, messages) {
160
- return messages[timeZone] || getCity(timeZone);
160
+ return getMessage(messages, timeZone) || getCity(timeZone);
161
161
  }
162
162
  function getSelectedRegionTimeZoneLabel(city, country, messages) {
163
163
  const template = messages.timeZoneRegionLabel;
164
164
  return template.replace("{city}", city).replace("{country}", getMessageOrKeyFallback(messages, country));
165
165
  }
166
166
  function getMessageOrKeyFallback(messages, key) {
167
- return messages[key] || key;
167
+ return getMessage(messages, key) || key;
168
+ }
169
+ function getMessage(messages, key) {
170
+ const message = messages[key];
171
+ return typeof message === "string" ? message : void 0;
168
172
  }
169
173
  function getCity(timeZone) {
170
174
  return timeZone.split("/").pop() ?? "";
@@ -17,6 +17,7 @@ import { u as useT9n } from "../../chunks/useT9n.js";
17
17
  import { u as useSetFocus } from "../../chunks/useSetFocus.js";
18
18
  import { u as useInteractive } from "../../chunks/useInteractive.js";
19
19
  import { u as useForm } from "../../chunks/useForm.js";
20
+ import { isEqual } from "es-toolkit";
20
21
  const CSS = {
21
22
  container: "container",
22
23
  containerRange: "container--range",
@@ -66,7 +67,7 @@ class Slider extends LitElement {
66
67
  }
67
68
  this.removeDragListeners();
68
69
  this.focusActiveHandle(event.clientX);
69
- if (this.dragProp && this.lastDragPropValue != this[this.dragProp]) {
70
+ if (this.dragProp && !isEqual(this.lastDragPropValue, this.getDragPropValue(this.dragProp))) {
70
71
  this.emitChange();
71
72
  }
72
73
  this.dragProp = void 0;
@@ -97,11 +98,11 @@ class Slider extends LitElement {
97
98
  this.maxValueDragRange = this.maxValue - value;
98
99
  this.minMaxValueRange = this.maxValue - this.minValue;
99
100
  }
100
- } else if (isRange(this.value) && isRange(this.previousEmittedValue) && this.dragProp === "maxValue") {
101
+ } else if (isRange(this.value) && this.previousEmittedValue !== void 0 && isRange(this.previousEmittedValue) && this.dragProp === "maxValue") {
101
102
  const [previousEmittedMinValue, previousEmittedMaxValue] = this.previousEmittedValue;
102
103
  if (previousEmittedMinValue === previousEmittedMaxValue && value < previousEmittedMinValue) {
103
104
  this.dragProp = "minValue";
104
- this.minHandle.focus();
105
+ this.minHandleRef.value.focus();
105
106
  } else {
106
107
  this.setValue({ [this.dragProp]: this.clamp(value, this.dragProp) });
107
108
  }
@@ -122,7 +123,21 @@ class Slider extends LitElement {
122
123
  inputType: "range"
123
124
  })(this);
124
125
  this.guid = IDS.host(guid());
126
+ this.maxHandleRef = createRef();
127
+ this.maxValueLabelRefs = {
128
+ label: createRef(),
129
+ static: createRef(),
130
+ transformed: createRef()
131
+ };
132
+ this.maxTickLabelRef = createRef();
125
133
  this.messages = useT9n({ blocking: true });
134
+ this.minHandleRef = createRef();
135
+ this.minValueLabelRefs = {
136
+ label: createRef(),
137
+ static: createRef(),
138
+ transformed: createRef()
139
+ };
140
+ this.minTickLabelRef = createRef();
126
141
  this.pointerUpDragEnd = (event) => {
127
142
  if (this.disabled || !isPrimaryPointerButton(event)) {
128
143
  return;
@@ -187,7 +202,7 @@ class Slider extends LitElement {
187
202
  this._value = Array.isArray(this._value) ? [this.minValue, this.maxValue] : defaultValue;
188
203
  }
189
204
  async setFocus(options) {
190
- return this.focusSetter(() => this.minHandle || this.maxHandle, options);
205
+ return this.focusSetter(() => this.minHandleRef.value || this.maxHandleRef.value, options);
191
206
  }
192
207
  connectedCallback() {
193
208
  super.connectedCallback();
@@ -213,6 +228,9 @@ class Slider extends LitElement {
213
228
  }
214
229
  }
215
230
  updated() {
231
+ if (!this.isConnected) {
232
+ return;
233
+ }
216
234
  if (this.labelHandles) {
217
235
  this.adjustHostObscuredHandleLabel("value");
218
236
  if (isRange(this.value)) {
@@ -287,9 +305,10 @@ class Slider extends LitElement {
287
305
  prop = closerToMax || position >= this.maxValue ? "maxValue" : "minValue";
288
306
  }
289
307
  }
290
- this.lastDragPropValue = this[prop];
308
+ this.lastDragPropValue = this.getDragPropValue(prop);
291
309
  this.dragStart(prop);
292
- const isThumbActive = this.el.shadowRoot.querySelector(`.${CSS.thumb}:active`);
310
+ const eventPath = event.composedPath();
311
+ const isThumbActive = [this.minHandleRef.value, this.maxHandleRef.value].some((handle) => handle && eventPath.includes(handle));
293
312
  if (!isThumbActive) {
294
313
  this.setValue({ [prop]: this.clamp(position, prop) });
295
314
  }
@@ -386,11 +405,14 @@ class Slider extends LitElement {
386
405
  window.addEventListener("pointerup", this.pointerUpDragEnd);
387
406
  window.addEventListener("pointercancel", this.dragEnd);
388
407
  }
408
+ getDragPropValue(prop) {
409
+ return prop === "minMaxValue" ? this.value : this[prop];
410
+ }
389
411
  focusActiveHandle(valueX) {
390
412
  if (this.dragProp === "minValue") {
391
- this.minHandle.focus();
413
+ this.minHandleRef.value.focus();
392
414
  } else if (this.dragProp === "maxValue" || this.dragProp === "value") {
393
- this.maxHandle.focus();
415
+ this.maxHandleRef.value.focus();
394
416
  } else if (this.dragProp === "minMaxValue") {
395
417
  this.getClosestHandle(valueX).focus();
396
418
  }
@@ -408,6 +430,9 @@ class Slider extends LitElement {
408
430
  let valueChanged = false;
409
431
  Object.keys(values).forEach((propName) => {
410
432
  const newValue = values[propName];
433
+ if (newValue === void 0) {
434
+ return;
435
+ }
411
436
  if (!valueChanged) {
412
437
  const oldValue = this[propName];
413
438
  valueChanged = oldValue !== newValue;
@@ -426,17 +451,6 @@ class Slider extends LitElement {
426
451
  }
427
452
  this.calciteSliderInput.emit();
428
453
  }
429
- setThumbEl(el) {
430
- if (!el) {
431
- return;
432
- }
433
- const valueProp = el.getAttribute("data-value-prop");
434
- if (valueProp === "minValue") {
435
- this.minHandle = el;
436
- } else {
437
- this.maxHandle = el;
438
- }
439
- }
440
454
  clamp(value, prop) {
441
455
  value = clamp(value, this.min, this.max);
442
456
  if (prop === "maxValue") {
@@ -466,7 +480,9 @@ class Slider extends LitElement {
466
480
  return snappedValue;
467
481
  }
468
482
  getClosestHandle(valueX) {
469
- return this.getDistanceX(this.maxHandle, valueX) > this.getDistanceX(this.minHandle, valueX) ? this.minHandle : this.maxHandle;
483
+ const minHandle = this.minHandleRef.value;
484
+ const maxHandle = this.maxHandleRef.value;
485
+ return this.getDistanceX(maxHandle, valueX) > this.getDistanceX(minHandle, valueX) ? minHandle : maxHandle;
470
486
  }
471
487
  getDistanceX(el, valueX) {
472
488
  return Math.abs(el.getBoundingClientRect().left - valueX);
@@ -480,27 +496,26 @@ class Slider extends LitElement {
480
496
  return (num - this.min) / range;
481
497
  }
482
498
  adjustHostObscuredHandleLabel(name) {
483
- const shadowRoot = this.el.shadowRoot;
484
- const label = shadowRoot.querySelector(`.handle__label--${name}`);
485
- const labelStatic = shadowRoot.querySelector(`.handle__label--${name}.static`);
486
- const labelTransformed = shadowRoot.querySelector(`.handle__label--${name}.transformed`);
499
+ const labelRefs = name === "minValue" ? this.minValueLabelRefs : this.maxValueLabelRefs;
500
+ const label = labelRefs.label.value;
501
+ const labelStatic = labelRefs.static.value;
502
+ const labelTransformed = labelRefs.transformed.value;
487
503
  const labelStaticBounds = labelStatic.getBoundingClientRect();
488
504
  const labelStaticOffset = this.getHostOffset(labelStaticBounds.left, labelStaticBounds.right);
489
505
  label.style.transform = `translateX(${labelStaticOffset}px)`;
490
506
  labelTransformed.style.transform = `translateX(${labelStaticOffset}px)`;
491
507
  }
492
508
  hyphenateCollidingRangeHandleLabels() {
493
- const shadowRoot = this.el.shadowRoot;
494
509
  const mirror = this.shouldMirror();
495
- const leftModifier = mirror ? "value" : "minValue";
496
- const rightModifier = mirror ? "minValue" : "value";
497
- const leftValueLabel = shadowRoot.querySelector(`.handle__label--${leftModifier}`);
498
- const leftValueLabelStatic = shadowRoot.querySelector(`.handle__label--${leftModifier}.static`);
499
- const leftValueLabelTransformed = shadowRoot.querySelector(`.handle__label--${leftModifier}.transformed`);
510
+ const leftValueLabelRefs = mirror ? this.maxValueLabelRefs : this.minValueLabelRefs;
511
+ const rightValueLabelRefs = mirror ? this.minValueLabelRefs : this.maxValueLabelRefs;
512
+ const leftValueLabel = leftValueLabelRefs.label.value;
513
+ const leftValueLabelStatic = leftValueLabelRefs.static.value;
514
+ const leftValueLabelTransformed = leftValueLabelRefs.transformed.value;
500
515
  const leftValueLabelStaticHostOffset = this.getHostOffset(leftValueLabelStatic.getBoundingClientRect().left, leftValueLabelStatic.getBoundingClientRect().right);
501
- const rightValueLabel = shadowRoot.querySelector(`.handle__label--${rightModifier}`);
502
- const rightValueLabelStatic = shadowRoot.querySelector(`.handle__label--${rightModifier}.static`);
503
- const rightValueLabelTransformed = shadowRoot.querySelector(`.handle__label--${rightModifier}.transformed`);
516
+ const rightValueLabel = rightValueLabelRefs.label.value;
517
+ const rightValueLabelStatic = rightValueLabelRefs.static.value;
518
+ const rightValueLabelTransformed = rightValueLabelRefs.transformed.value;
504
519
  const rightValueLabelStaticHostOffset = this.getHostOffset(rightValueLabelStatic.getBoundingClientRect().left, rightValueLabelStatic.getBoundingClientRect().right);
505
520
  const labelFontSize = this.getFontSizeForElement(leftValueLabel);
506
521
  const labelTransformedOverlap = this.getRangeLabelOverlap(leftValueLabelTransformed, rightValueLabelTransformed);
@@ -564,11 +579,10 @@ class Slider extends LitElement {
564
579
  if (this.hasHistogram && !this.precise && !this.labelHandles) {
565
580
  return;
566
581
  }
567
- const shadowRoot = this.el.shadowRoot;
568
- const minHandle = shadowRoot.querySelector(`.${CSS.thumbMinValue}`);
569
- const maxHandle = shadowRoot.querySelector(`.${CSS.thumbValue}`);
570
- const minTickLabel = shadowRoot.querySelector(`.${CSS.tickMin}`);
571
- const maxTickLabel = shadowRoot.querySelector(`.${CSS.tickMax}`);
582
+ const minHandle = this.minHandleRef.value;
583
+ const maxHandle = this.maxHandleRef.value;
584
+ const minTickLabel = this.minTickLabelRef.value;
585
+ const maxTickLabel = this.maxTickLabelRef.value;
572
586
  if (!minHandle && maxHandle && minTickLabel && maxTickLabel) {
573
587
  minTickLabel.style.opacity = this.isMinTickLabelObscured(minTickLabel, maxHandle) ? "0" : "1";
574
588
  maxTickLabel.style.opacity = this.isMaxTickLabelObscured(maxTickLabel, maxHandle) ? "0" : "1";
@@ -697,10 +711,11 @@ class Slider extends LitElement {
697
711
  const displayedValue = valueProp === "minValue" ? this.internalLabelFormatter(this.minValue, "min") : valueProp === "maxValue" ? this.internalLabelFormatter(this.maxValue, "max") : this.internalLabelFormatter(value, "value");
698
712
  const thumbStyle = isMinThumb ? { left: `${mirror ? 100 - minInterval : minInterval}%` } : { right: `${mirror ? maxInterval : 100 - maxInterval}%` };
699
713
  const thumbLabelClasses = `${CSS.handleLabel} ${isMinThumb ? CSS.handleLabelMinValue : CSS.handleLabelValue}`;
714
+ const labelRefs = isMinThumb ? this.minValueLabelRefs : this.maxValueLabelRefs;
700
715
  const labels = isLabeled ? [
701
- html`<span aria-hidden=true class=${safeClassMap(thumbLabelClasses)}>${displayedValue}</span>`,
702
- html`<span aria-hidden=true class=${`${thumbLabelClasses} ${CSS.static}`}>${displayedValue}</span>`,
703
- html`<span aria-hidden=true class=${`${thumbLabelClasses} ${CSS.transformed}`}>${displayedValue}</span>`
716
+ html`<span aria-hidden=true class=${safeClassMap(thumbLabelClasses)} ${ref(labelRefs.label)}>${displayedValue}</span>`,
717
+ html`<span aria-hidden=true class=${`${thumbLabelClasses} ${CSS.static}`} ${ref(labelRefs.static)}>${displayedValue}</span>`,
718
+ html`<span aria-hidden=true class=${`${thumbLabelClasses} ${CSS.transformed}`} ${ref(labelRefs.transformed)}>${displayedValue}</span>`
704
719
  ] : [];
705
720
  const thumbContent = [
706
721
  ...labels,
@@ -716,7 +731,7 @@ class Slider extends LitElement {
716
731
  [CSS.thumbActive]: this.lastDragProp !== "minMaxValue" && this.dragProp === valueProp,
717
732
  [CSS.thumbPrecise]: isPrecise,
718
733
  [CSS.thumbMinValue]: isMinThumb
719
- })} data-value-prop=${valueProp ?? nothing} @blur=${this.onThumbBlur} @focus=${this.onThumbFocus} @pointerdown=${this.onThumbPointerDown} role=slider style=${safeStyleMap(thumbStyle)} tabindex=0 ${ref(this.setThumbEl)}>${thumbContent}</div>`);
734
+ })} data-value-prop=${valueProp ?? nothing} @blur=${this.onThumbBlur} @focus=${this.onThumbFocus} @pointerdown=${this.onThumbPointerDown} role=slider style=${safeStyleMap(thumbStyle)} tabindex=0 ${ref(isMinThumb ? this.minHandleRef : this.maxHandleRef)}>${thumbContent}</div>`);
720
735
  }
721
736
  renderGraph() {
722
737
  return this.histogram ? html`<calcite-graph class=${safeClassMap(CSS.graph)} .colorStops=${this.histogramStops} .data=${this.histogram} .highlightMax=${isRange(this.value) ? this.maxValue : this.value} .highlightMin=${isRange(this.value) ? this.minValue : this.min} .max=${this.max} .min=${this.min}></calcite-graph>` : null;
@@ -728,11 +743,22 @@ class Slider extends LitElement {
728
743
  const isMaxTickLabel = tick === max;
729
744
  const isAtEdge = isMinTickLabel || isMaxTickLabel;
730
745
  const shouldDisplayLabel = labelTicks && (!hasHistogram && (isAtEdge || !precise || !valueIsRange) || hasHistogram && (isAtEdge || !precise && !labelHandles));
731
- return shouldDisplayLabel ? html`<span class=${safeClassMap({
746
+ if (!shouldDisplayLabel) {
747
+ return null;
748
+ }
749
+ const tickLabelClasses = {
732
750
  [CSS.tickLabel]: true,
733
751
  [CSS.tickMin]: isMinTickLabel,
734
752
  [CSS.tickMax]: isMaxTickLabel
735
- })}>${this.internalLabelFormatter(tick, "tick")}</span>` : null;
753
+ };
754
+ const tickLabel = this.internalLabelFormatter(tick, "tick");
755
+ if (isMinTickLabel) {
756
+ return html`<span class=${safeClassMap(tickLabelClasses)} ${ref(this.minTickLabelRef)}>${tickLabel}</span>`;
757
+ }
758
+ if (isMaxTickLabel) {
759
+ return html`<span class=${safeClassMap(tickLabelClasses)} ${ref(this.maxTickLabelRef)}>${tickLabel}</span>`;
760
+ }
761
+ return html`<span class=${safeClassMap(tickLabelClasses)}>${tickLabel}</span>`;
736
762
  }
737
763
  }
738
764
  customElement("calcite-slider", Slider);