@arcgis/common-components 5.2.3 → 5.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/cdn/{KOLQFHMY.js → 2GBIDGIK.js} +1 -1
  2. package/dist/cdn/{XY5AK2W3.js → 3X2MVQTG.js} +1 -1
  3. package/dist/cdn/{XCTYBSBW.js → 4BQVTE3X.js} +1 -1
  4. package/dist/cdn/5WROHG4L.js +2 -0
  5. package/dist/cdn/777NEAW4.js +2 -0
  6. package/dist/cdn/{R65IF4U5.js → AVAVKE2C.js} +1 -1
  7. package/dist/cdn/{A5DTJWZH.js → B4MSRQLW.js} +1 -1
  8. package/dist/cdn/{CMU63EXA.js → BEAJKSDR.js} +1 -1
  9. package/dist/cdn/{AWJCRNKW.js → DZUTJ747.js} +1 -1
  10. package/dist/cdn/{MEL4LGYI.js → E3VHT6BQ.js} +1 -1
  11. package/dist/cdn/{6EJPYGT2.js → E6LVFD3S.js} +1 -1
  12. package/dist/cdn/{XHOXPVAV.js → GZXN456V.js} +1 -1
  13. package/dist/cdn/{T2QGTJK3.js → H5QWBJTH.js} +1 -1
  14. package/dist/cdn/HX2ZECWM.js +2 -0
  15. package/dist/cdn/{TDCK6RKQ.js → I23I3NHX.js} +1 -1
  16. package/dist/cdn/{PLMUM266.js → I6LJN2SJ.js} +1 -1
  17. package/dist/cdn/IS5NWPTN.js +2 -0
  18. package/dist/cdn/{NT4Q3HTB.js → JGHUIE7K.js} +1 -1
  19. package/dist/cdn/{U32B4T4H.js → KK62TWI2.js} +1 -1
  20. package/dist/cdn/OBMF3G26.js +2 -0
  21. package/dist/cdn/P3MNNMBR.js +2 -0
  22. package/dist/cdn/{WBJSFAE4.js → P7F647MW.js} +1 -1
  23. package/dist/cdn/{AZPD3AQX.js → PHW4TZXW.js} +1 -1
  24. package/dist/cdn/{DUGEIMLO.js → PJX34XKX.js} +1 -1
  25. package/dist/cdn/PL2HCI3R.js +2 -0
  26. package/dist/cdn/{KC6SHKDU.js → RESQTFUG.js} +1 -1
  27. package/dist/cdn/RHEPCTDX.js +2 -0
  28. package/dist/cdn/{NL6MOVQA.js → RWGWZAMM.js} +1 -1
  29. package/dist/cdn/{FQNGFFQR.js → RZWLH7SD.js} +1 -1
  30. package/dist/cdn/{VQFSHGNP.js → S26IP5GE.js} +1 -1
  31. package/dist/cdn/S5YQPDLN.js +2 -0
  32. package/dist/cdn/SL5UWHYF.js +2 -0
  33. package/dist/cdn/{35DEOAQE.js → TQL7NKXO.js} +1 -1
  34. package/dist/cdn/{57NKAAYE.js → UE3LF2VY.js} +1 -1
  35. package/dist/cdn/{AUJTLOQU.js → V4L3PXBZ.js} +1 -1
  36. package/dist/cdn/{EX7FD4WD.js → WLX2SENR.js} +1 -1
  37. package/dist/cdn/XDBI7TX7.js +2 -0
  38. package/dist/cdn/{ALKHSWWM.js → XQJALRRE.js} +1 -1
  39. package/dist/cdn/{EHQKLIZI.js → YPUQA6VS.js} +1 -1
  40. package/dist/cdn/{WQXS6SPW.js → YY2GCBWQ.js} +1 -1
  41. package/dist/cdn/index.js +1 -1
  42. package/dist/chunks/runtime.js +1 -1
  43. package/dist/chunks/utils.js +75 -37
  44. package/dist/chunks/utils2.js +9 -14
  45. package/dist/chunks/{intrinsic-sizing.js → well-known-sizes-controller.js} +38 -14
  46. package/dist/components/arcgis-slider/customElement.js +23 -16
  47. package/dist/components/arcgis-toolbar/customElement.js +34 -29
  48. package/dist/components/arcgis-toolbar/types.d.ts +20 -1
  49. package/dist/components/arcgis-toolbar-action/customElement.js +17 -18
  50. package/dist/components/arcgis-toolbar-group/customElement.js +20 -17
  51. package/dist/components/arcgis-toolbar-item/customElement.d.ts +2 -2
  52. package/dist/components/arcgis-toolbar-item/customElement.js +14 -14
  53. package/dist/components/arcgis-toolbar-more-button/customElement.js +28 -26
  54. package/dist/components/arcgis-toolbar-split-button/customElement.js +34 -34
  55. package/dist/components/arcgis-toolbar-stack/customElement.js +51 -46
  56. package/dist/components/arcgis-value-picker-slider/customElement.d.ts +12 -19
  57. package/dist/docs/api.json +1 -1
  58. package/dist/docs/docs.json +1 -1
  59. package/dist/docs/vscode.html-custom-data.json +1 -1
  60. package/dist/docs/web-types.json +1 -1
  61. package/package.json +5 -5
  62. package/dist/cdn/4LM3DJQY.js +0 -2
  63. package/dist/cdn/7RAD5DBW.js +0 -2
  64. package/dist/cdn/FUE6UHWW.js +0 -2
  65. package/dist/cdn/HOJ2R32S.js +0 -2
  66. package/dist/cdn/ILO4ZNNR.js +0 -2
  67. package/dist/cdn/L7XGWJZF.js +0 -2
  68. package/dist/cdn/O4H2JR53.js +0 -2
  69. package/dist/cdn/QPTDPFIJ.js +0 -2
  70. package/dist/cdn/S7NTQG2X.js +0 -2
  71. package/dist/cdn/VKEBRORA.js +0 -2
  72. package/dist/cdn/VMHBNIRF.js +0 -2
@@ -1,13 +1,14 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
2
  import { c as A } from "../../chunks/runtime.js";
3
3
  import { ref as u } from "lit/directives/ref.js";
4
- import { html as m } from "lit";
4
+ import { html as h } from "lit";
5
5
  import { LitElement as C, nothing as v, safeClassMap as $ } from "@arcgis/lumina";
6
6
  import { L as f } from "../../chunks/types.js";
7
7
  import { E as w } from "../../chunks/element-reference-controller.js";
8
- import { a as g, u as _, g as y } from "../../chunks/utils2.js";
9
- import { b as L } from "../../chunks/utils3.js";
10
- class R extends C {
8
+ import { u as _, g as y } from "../../chunks/utils2.js";
9
+ import { g, f as L } from "../../chunks/utils.js";
10
+ import { b as R } from "../../chunks/utils3.js";
11
+ class E extends C {
11
12
  constructor() {
12
13
  super(...arguments), this._elementReferenceController = new w(this), this._childrenObserver = new MutationObserver(() => {
13
14
  this._syncChildren();
@@ -20,22 +21,22 @@ class R extends C {
20
21
  const t = this._children?.length ?? 0;
21
22
  if (!t)
22
23
  return [0];
23
- const i = g(e), l = t * i;
24
+ const o = g(e), s = t * o;
24
25
  if (!(this.priority < f.NeverCollapse && t > 2))
25
- return [l];
26
- const s = Math.min(t, 2) * i, o = [s];
26
+ return [s];
27
+ const r = Math.min(t, 2) * o, n = [r];
27
28
  if (t <= 2 || this.priority <= f.ForceCollapse)
28
- return o;
29
- for (let n = 1; n < t - 1; n++)
30
- o.push(s + i * n);
31
- return _(o);
29
+ return n;
30
+ for (let i = 1; i < t - 1; i++)
31
+ n.push(r + o * i);
32
+ return _(n);
32
33
  }
33
34
  proxiedRender(e, t) {
34
- const i = this._children;
35
- if (!i)
35
+ const o = this._children;
36
+ if (!o)
36
37
  return;
37
- const { visible: l, hidden: r } = this._resolveActionsFromBudget(i, e, t), s = "hamburger", o = this.overflowActionLabel, n = e.tooltipAppearance, c = n !== "native", a = this._elementReferenceController.element, p = n === "calcite-dark" ? "calcite-mode-dark" : void 0, h = y(e), b = this.menuAppearance === "action-menu" ? m`<calcite-action-menu .label=${o} overlay-positioning=fixed .placement=${h}><calcite-action .icon=${s} .scale=${e.scale} slot=trigger .text=${o} title=${(n === "native" ? o : "") ?? v} ${u(this._elementReferenceController.ref)}></calcite-action>${r.map((d) => d.proxiedRender(e, "expanded-action"))}</calcite-action-menu>` : m`<calcite-action .icon=${s} .scale=${e.scale} .text=${o} title=${(n === "native" ? o : "") ?? v} ${u(this._elementReferenceController.ref)}></calcite-action><calcite-dropdown overlay-positioning=fixed .placement=${h} .referenceElement=${a}><calcite-dropdown-group selection-mode=none>${r.map((d) => d.proxiedRender(e, "dropdown-item"))}</calcite-dropdown-group></calcite-dropdown>`;
38
- return m`${l.map((d) => d.proxiedRender(e, "collapsed-action"))}${r.length ? b : void 0}${r.length && c ? m`<calcite-tooltip class=${$(p)} close-on-click overlay-positioning=fixed .placement=${h} .referenceElement=${a}><span>${o}</span></calcite-tooltip>` : void 0}`;
38
+ const { visible: s, hidden: l } = this._resolveActionsFromBudget(o, e, t), r = "hamburger", n = this.overflowActionLabel, i = e.tooltipAppearance, d = i !== "native", c = this._elementReferenceController.element, p = i === "calcite-dark" ? "calcite-mode-dark" : void 0, a = y(e), b = this.menuAppearance === "action-menu" ? h`<calcite-action-menu .label=${n} overlay-positioning=fixed .placement=${a}><calcite-action .icon=${r} .scale=${e.scale} slot=trigger .text=${n} title=${(i === "native" ? n : "") ?? v} ${u(this._elementReferenceController.ref)}></calcite-action>${l.map((m) => m.proxiedRender(e, "expanded-action"))}</calcite-action-menu>` : h`<calcite-action .icon=${r} .scale=${e.scale} .text=${n} title=${(i === "native" ? n : "") ?? v} ${u(this._elementReferenceController.ref)}></calcite-action><calcite-dropdown overlay-positioning=fixed .placement=${a} .referenceElement=${c}><calcite-dropdown-group selection-mode=none>${l.map((m) => m.proxiedRender(e, "dropdown-item"))}</calcite-dropdown-group></calcite-dropdown>`;
39
+ return h`${s.map((m) => m.proxiedRender(e, "collapsed-action"))}${l.length ? b : void 0}${l.length && d ? h`<calcite-tooltip class=${$(p)} close-on-click overlay-positioning=fixed .placement=${a} .referenceElement=${c}><span>${n}</span></calcite-tooltip>` : void 0}`;
39
40
  }
40
41
  connectedCallback() {
41
42
  super.connectedCallback(), this._childrenObserver.observe(this.el, { childList: !0 }), this._syncChildren();
@@ -46,23 +47,24 @@ class R extends C {
46
47
  _syncChildren() {
47
48
  this._componentWaitAbortController?.abort();
48
49
  const e = Array.from(this.el.querySelectorAll("arcgis-toolbar-item")), t = new AbortController();
49
- this._componentWaitAbortController = t, Promise.all(e.map((i) => i.componentOnReady())).then(() => {
50
+ this._componentWaitAbortController = t, Promise.all(e.map((o) => o.componentOnReady())).then(() => {
50
51
  !this.isConnected || t.signal.aborted || (this._children = e);
51
52
  });
52
53
  }
53
- _resolveActionsFromBudget(e, t, i) {
54
- const l = e.find((a) => a.active) ?? e?.toSorted(L)?.at(0), r = Math.floor(i / g(t));
55
- if (r >= e.length)
54
+ _resolveActionsFromBudget(e, t, o) {
55
+ const s = e.find((p) => p.active) ?? e?.toSorted(R)?.at(0), l = g(t);
56
+ let r = Math.floor(o / l);
57
+ if (L((r + 1) * l, o) && r++, r >= e.length)
56
58
  return { visible: [...e], hidden: [] };
57
- const o = r - 1, n = e.slice(0, o), c = e.slice(o);
58
- if (l && c.includes(l)) {
59
- const [a] = c.splice(c.indexOf(l), 1), p = n.pop();
60
- n.push(a), p && c.unshift(p);
59
+ const i = r - 1, d = e.slice(0, i), c = e.slice(i);
60
+ if (s && c.includes(s)) {
61
+ const [p] = c.splice(c.indexOf(s), 1), a = d.pop();
62
+ d.push(p), a && c.unshift(a);
61
63
  }
62
- return { visible: n, hidden: c };
64
+ return { visible: d, hidden: c };
63
65
  }
64
66
  }
65
- A("arcgis-toolbar-more-button", R);
67
+ A("arcgis-toolbar-more-button", E);
66
68
  export {
67
- R as ArcgisToolbarMoreButton
69
+ E as ArcgisToolbarMoreButton
68
70
  };
@@ -1,36 +1,36 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
2
  import { c as y } from "../../chunks/runtime.js";
3
3
  import { ref as $ } from "lit/directives/ref.js";
4
- import { html as d } from "lit";
5
- import { LitElement as _, nothing as h, safeClassMap as a } from "@arcgis/lumina";
4
+ import { html as h } from "lit";
5
+ import { LitElement as _, nothing as a, safeClassMap as d } from "@arcgis/lumina";
6
6
  import { E as L } from "../../chunks/element-reference-controller.js";
7
- import { L as f } from "../../chunks/types.js";
8
- import { a as C, u as R, g as E } from "../../chunks/utils2.js";
9
- import { b as k } from "../../chunks/utils3.js";
10
- import { W as O } from "../../chunks/utils.js";
11
- class S extends _ {
7
+ import { L as u } from "../../chunks/types.js";
8
+ import { u as R, g as k } from "../../chunks/utils2.js";
9
+ import { g as b, f as E } from "../../chunks/utils.js";
10
+ import { b as O } from "../../chunks/utils3.js";
11
+ class T extends _ {
12
12
  constructor() {
13
- super(...arguments), this._elementReferenceController = new L(this), this._childrenObserver = new MutationObserver(() => this._syncChildren()), this.priority = f.Medium, this.menuAppearance = "dropdown", this.overflowActionLabel = "More actions";
13
+ super(...arguments), this._elementReferenceController = new L(this), this._childrenObserver = new MutationObserver(() => this._syncChildren()), this.priority = u.Medium, this.menuAppearance = "dropdown", this.overflowActionLabel = "More actions";
14
14
  }
15
15
  static {
16
16
  this.properties = { _children: 16, priority: 9, menuAppearance: 1, overflowActionLabel: 1 };
17
17
  }
18
18
  measure(e) {
19
- const { priority: n, _children: i } = this, r = i?.length ?? 0;
20
- if (!r)
19
+ const { priority: t, _children: r } = this, l = r?.length ?? 0;
20
+ if (!l)
21
21
  return [0];
22
- const o = C(e), s = r * o;
23
- if (!(n < f.NeverCollapse) || r <= 1)
24
- return [s];
25
- const l = o + W(e);
26
- return n <= f.ForceCollapse ? [l] : R([l, s]);
22
+ const o = b(e), i = l * o;
23
+ if (!(t < u.NeverCollapse) || l <= 1)
24
+ return [i];
25
+ const s = o + P(e);
26
+ return t <= u.ForceCollapse ? [s] : R([s, i]);
27
27
  }
28
- proxiedRender(e, n) {
29
- const i = this._children;
30
- if (!i)
28
+ proxiedRender(e, t) {
29
+ const r = this._children;
30
+ if (!r)
31
31
  return;
32
- const { visible: r, hidden: o } = this._resolveActionsFromBudget(i, e, n, this.menuAppearance === "dropdown"), s = T(e), t = this.overflowActionLabel, l = e.tooltipAppearance, m = l !== "native", v = this._elementReferenceController.element, A = l === "calcite-dark" ? "calcite-mode-dark" : void 0, g = "split-anchor", b = o.length ? "split-menu" : "", u = E(e), w = this.menuAppearance === "action-menu" ? d`<calcite-action-menu class=${a(b)} .label=${t} overlay-positioning=fixed .placement=${u}><calcite-action class=${a(g)} data-layout=${e.layout ?? h} .icon=${s} .label=${t} .scale=${e.scale} slot=trigger .text=${t} title=${t ?? h} ${$(this._elementReferenceController.ref)}></calcite-action>${o.map((c) => c.proxiedRender(e, "expanded-action"))}</calcite-action-menu>` : d`<calcite-action class=${a(g)} data-layout=${e.layout ?? h} .icon=${s} .label=${t} .scale=${e.scale} .text=${l === "native" ? t : ""} title=${t ?? h} ${$(this._elementReferenceController.ref)}></calcite-action><calcite-dropdown class=${a(b)} overlay-positioning=fixed .placement=${u} .referenceElement=${v} .scale=${e.scale}><calcite-dropdown-group selection-mode=single>${o.map((c) => c.proxiedRender(e, "dropdown-item", c === r.at(0)))}</calcite-dropdown-group></calcite-dropdown>`;
33
- return d`<div class="split-host">${r.map((c) => c.proxiedRender(e, "collapsed-action"))}${o.length ? w : void 0}${o.length && m ? d`<calcite-tooltip class=${a(A)} close-on-click overlay-positioning=fixed .placement=${u} .referenceElement=${v}><span>${t}</span></calcite-tooltip>` : void 0}</div>`;
32
+ const { visible: l, hidden: o } = this._resolveActionsFromBudget(r, e, t, this.menuAppearance === "dropdown"), i = B(e), n = this.overflowActionLabel, s = e.tooltipAppearance, C = s !== "native", f = this._elementReferenceController.element, A = s === "calcite-dark" ? "calcite-mode-dark" : void 0, v = "split-anchor", g = o.length ? "split-menu" : "", m = k(e), w = this.menuAppearance === "action-menu" ? h`<calcite-action-menu class=${d(g)} .label=${n} overlay-positioning=fixed .placement=${m}><calcite-action class=${d(v)} data-layout=${e.layout ?? a} data-scale=${e.scale ?? a} .icon=${i} .label=${n} .scale=${e.scale} slot=trigger .text=${n} title=${n ?? a} ${$(this._elementReferenceController.ref)}></calcite-action>${o.map((c) => c.proxiedRender(e, "expanded-action"))}</calcite-action-menu>` : h`<calcite-action class=${d(v)} data-layout=${e.layout ?? a} data-scale=${e.scale ?? a} .icon=${i} .label=${n} .scale=${e.scale} .text=${s === "native" ? n : ""} title=${n ?? a} ${$(this._elementReferenceController.ref)}></calcite-action><calcite-dropdown class=${d(g)} overlay-positioning=fixed .placement=${m} .referenceElement=${f} .scale=${e.scale}><calcite-dropdown-group selection-mode=single>${o.map((c) => c.proxiedRender(e, "dropdown-item", c === l.at(0)))}</calcite-dropdown-group></calcite-dropdown>`;
33
+ return h`<div class="split-host">${l.map((c) => c.proxiedRender(e, "collapsed-action"))}${o.length ? w : void 0}${o.length && C ? h`<calcite-tooltip class=${d(A)} close-on-click overlay-positioning=fixed .placement=${m} .referenceElement=${f}><span>${n}</span></calcite-tooltip>` : void 0}</div>`;
34
34
  }
35
35
  connectedCallback() {
36
36
  super.connectedCallback(), this._childrenObserver.observe(this.el, { childList: !0 }), this._syncChildren();
@@ -38,30 +38,30 @@ class S extends _ {
38
38
  disconnectedCallback() {
39
39
  this._childrenObserver.disconnect(), super.disconnectedCallback();
40
40
  }
41
- _resolveActionsFromBudget(e, n, i, r) {
42
- const o = e.find((m) => m.active) ?? e?.toSorted(k)?.at(0);
43
- if (Math.floor(i / C(n)) >= e.length)
41
+ _resolveActionsFromBudget(e, t, r, l) {
42
+ const o = e.find((s) => s.active) ?? e?.toSorted(O)?.at(0);
43
+ if (E(e.length * b(t), r))
44
44
  return { visible: [...e], hidden: [] };
45
- if (r)
45
+ if (l)
46
46
  return { visible: [o ?? e[0]], hidden: [...e] };
47
- const t = [...e];
48
- return { visible: t.splice(t.indexOf(o), 1), hidden: t };
47
+ const i = [...e];
48
+ return { visible: i.splice(i.indexOf(o), 1), hidden: i };
49
49
  }
50
50
  _syncChildren() {
51
51
  this._componentWaitAbortController?.abort();
52
- const e = Array.from(this.el.querySelectorAll("arcgis-toolbar-item")), n = new AbortController();
53
- this._componentWaitAbortController = n, Promise.all(e.map((i) => i.componentOnReady())).then(() => {
54
- !this.isConnected || n.signal.aborted || (this._children = e);
52
+ const e = Array.from(this.el.querySelectorAll("arcgis-toolbar-item")), t = new AbortController();
53
+ this._componentWaitAbortController = t, Promise.all(e.map((r) => r.componentOnReady())).then(() => {
54
+ !this.isConnected || t.signal.aborted || (this._children = e);
55
55
  });
56
56
  }
57
57
  }
58
- function T({ layout: p, relativePosition: e }) {
58
+ function B({ layout: p, relativePosition: e }) {
59
59
  return p === "horizontal" ? e.startsWith("top") ? "chevron-down" : "chevron-up" : e.endsWith("left") ? "chevron-right" : "chevron-left";
60
60
  }
61
- function W({ layout: p, scale: e }) {
62
- return O.splitButtonPart[p][e];
61
+ function P({ layout: p, scale: e, sizes: t }) {
62
+ return t.splitButtonPart[p][e];
63
63
  }
64
- y("arcgis-toolbar-split-button", S);
64
+ y("arcgis-toolbar-split-button", T);
65
65
  export {
66
- S as ArcgisToolbarSplitButton
66
+ T as ArcgisToolbarSplitButton
67
67
  };
@@ -1,14 +1,14 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { c as k } from "../../chunks/runtime.js";
3
- import { css as _, render as C, nothing as z, html as b } from "lit";
4
- import { LitElement as L, nothing as P } from "@arcgis/lumina";
5
- import { useDirection as T } from "@arcgis/lumina/controllers";
6
- import { s as x, a as A, b as $, c as w, r as S } from "../../chunks/intrinsic-sizing.js";
7
- import { AsyncDirective as R } from "lit/async-directive.js";
8
- import { directive as D, PartType as K } from "lit/directive.js";
9
- import { getCommittedValue as u, clearPart as V, insertPart as v, setCommittedValue as g } from "lit/directive-helpers.js";
10
- const M = _`:host{--calcite-internal-animation-timing-slow: 0}.stack{block-size:100%}.toolbar-stack{display:flex;gap:8px}:host([toolbar-kind="docked"]) .toolbar-stack{gap:0}.line{display:flex;gap:8px}:host([layout="vertical"]) .line{block-size:100%;flex-direction:column}:host([layout="vertical"]) .line[data-alignment=bottom]{align-self:end}.line[data-alignment=left]{justify-content:left}.line[data-alignment=right]{justify-content:right}:host([layout="vertical"]) .toolbar-stack{block-size:100%}:host([layout="horizontal"]) .toolbar-stack{flex-direction:column}:host([toolbar-kind="docked"][layout="horizontal"]) .toolbar-stack{min-inline-size:100%}:host([toolbar-kind="docked"][layout="vertical"]) .toolbar-stack{min-block-size:100%}:host(:not([allocated-length])){.toolbar-stack{grid-area:1 / 1;min-inline-size:0;min-block-size:0}.toolbar-grid-wrapper{flex:1 1 auto}}`;
11
- class E {
2
+ import { c as z } from "../../chunks/runtime.js";
3
+ import { css as C, render as _, nothing as L, html as v } from "lit";
4
+ import { LitElement as P, nothing as T } from "@arcgis/lumina";
5
+ import { useDirection as w } from "@arcgis/lumina/controllers";
6
+ import { W as x, s as A, a as S, b as $, c as R, r as D } from "../../chunks/well-known-sizes-controller.js";
7
+ import { AsyncDirective as K } from "lit/async-directive.js";
8
+ import { directive as V, PartType as M } from "lit/directive.js";
9
+ import { getCommittedValue as m, clearPart as E, insertPart as p, setCommittedValue as g } from "lit/directive-helpers.js";
10
+ const I = C`:host{--calcite-internal-animation-timing-slow: 0}.stack{block-size:100%}.toolbar-stack{display:flex;gap:8px}:host([toolbar-kind="docked"]) .toolbar-stack{gap:0}.line{display:flex;gap:8px}:host([layout="vertical"]) .line{block-size:100%;flex-direction:column}:host([layout="vertical"]) .line[data-alignment=bottom]{align-self:end}.line[data-alignment=left]{justify-content:left}.line[data-alignment=right]{justify-content:right}:host([layout="vertical"]) .toolbar-stack{block-size:100%}:host([layout="horizontal"]) .toolbar-stack{flex-direction:column}:host([toolbar-kind="docked"][layout="horizontal"]) .toolbar-stack{min-inline-size:100%}:host([toolbar-kind="docked"][layout="vertical"]) .toolbar-stack{min-block-size:100%}:host(:not([allocated-length])){.toolbar-stack{grid-area:1 / 1;min-inline-size:0;min-block-size:0}.toolbar-grid-wrapper{flex:1 1 auto}}`;
11
+ class O {
12
12
  constructor(t = /* @__PURE__ */ new Map(), e = /* @__PURE__ */ new Set()) {
13
13
  this.cachedParts = t, this.directives = e;
14
14
  }
@@ -17,12 +17,12 @@ class E {
17
17
  t.moveToCache();
18
18
  }
19
19
  }
20
- class I extends R {
20
+ class W extends K {
21
21
  #i;
22
22
  #e;
23
23
  #t;
24
24
  constructor(t) {
25
- if (super(t), t.type !== K.CHILD)
25
+ if (super(t), t.type !== M.CHILD)
26
26
  throw new Error("sharedCache() can only be used in child expressions");
27
27
  }
28
28
  /**
@@ -33,10 +33,10 @@ class I extends R {
33
33
  render(t, e, i) {
34
34
  return [i];
35
35
  }
36
- update(t, [e, i, a]) {
36
+ update(t, [e, i, s]) {
37
37
  this.#t !== e && (this.#t && this.#t.directives.delete(this), e.directives.add(this), this.#t = e), this.#i = t, this.#e = i;
38
- const o = e.cachedParts.get(i), s = o ? u(o).pop() : void 0;
39
- return s && (V(t), v(t, void 0, s), g(t, [s])), this.render(e, i, a);
38
+ const o = e.cachedParts.get(i), a = o ? m(o).pop() : void 0;
39
+ return a && (E(t), p(t, void 0, a), g(t, [a])), this.render(e, i, s);
40
40
  }
41
41
  /**
42
42
  * During the update phase, a toolbar may need to be pulled from the cache in a situation
@@ -52,17 +52,17 @@ class I extends R {
52
52
  const t = this.#i, e = this.#t;
53
53
  if (!t || !e)
54
54
  return;
55
- const a = u(t).pop();
56
- if (!a)
55
+ const s = m(t).pop();
56
+ if (!s)
57
57
  return;
58
58
  let o = e.cachedParts.get(this.#e);
59
59
  if (!o) {
60
60
  const l = document.createDocumentFragment();
61
- o = C(z, l), e.cachedParts.set(this.#e, o);
61
+ o = _(L, l), e.cachedParts.set(this.#e, o);
62
62
  }
63
- if (u(o).length > 0)
63
+ if (m(o).length > 0)
64
64
  throw new Error("sharedCache() keys must be unique");
65
- g(o, [a]), v(o, void 0, a);
65
+ g(o, [s]), p(o, void 0, s);
66
66
  }
67
67
  disconnected() {
68
68
  this.#t?.directives.delete(this);
@@ -71,21 +71,22 @@ class I extends R {
71
71
  this.#t?.directives.add(this);
72
72
  }
73
73
  }
74
- const O = D(I), p = 8;
75
- class W extends L {
74
+ const j = V(W), f = 8;
75
+ class q extends P {
76
76
  constructor() {
77
- super(), this.#i = new ResizeObserver((t) => this._updateMeasurement(t)), this.#e = new MutationObserver(() => this._syncToolbars()), this.#a = T(), this.#o = new E(), this._layout = "horizontal", this.scale = "m", this.tooltipAppearance = "native", this.relativePosition = "top-left", this.toolbarKind = "floating", this.listen("arcgisInternalLayoutUpdate", () => this.requestUpdate());
77
+ super(), this.#i = new ResizeObserver((t) => this._updateMeasurement(t)), this.#e = new MutationObserver(() => this._syncToolbars()), this.#a = w(), this.#r = new x(this), this.#o = new O(), this._layout = "horizontal", this.scale = "m", this.tooltipAppearance = "native", this.relativePosition = "top-left", this.toolbarKind = "floating", this.listen("arcgisInternalLayoutUpdate", () => this.requestUpdate());
78
78
  }
79
79
  static {
80
80
  this.properties = { _observedSize: 16, _availableLength: 16, _toolbars: 16, effectiveRelativeDirection: 16, layout: 3, scale: 3, tooltipAppearance: 1, relativePosition: 1, toolbarKind: 3, allocatedLength: 11 };
81
81
  }
82
82
  static {
83
- this.styles = [M, x, A, $, w];
83
+ this.styles = [I, A, S, $, R];
84
84
  }
85
85
  #i;
86
86
  #e;
87
87
  #t;
88
88
  #a;
89
+ #r;
89
90
  #o;
90
91
  get _availableLength() {
91
92
  return this.allocatedLength ?? (this.layout === "horizontal" ? this._observedSize?.width : this._observedSize?.height) ?? 0;
@@ -119,29 +120,29 @@ class W extends L {
119
120
  }
120
121
  _syncToolbars() {
121
122
  this.#t?.abort();
122
- const t = Array.from(this.el.children).filter(j), e = new AbortController();
123
+ const t = Array.from(this.el.children).filter(U), e = new AbortController();
123
124
  this.#t = e, Promise.all(t.map((i) => i.componentOnReady())).then(() => {
124
125
  !this.isConnected || e.signal.aborted || (this._toolbars = t);
125
126
  });
126
127
  }
127
128
  _arrangeToolbarLines(t, e) {
128
129
  const i = t.map((r) => {
129
- const d = r.allocate(e, this._availableLength);
130
- return { toolbar: r, budget: d.reduce((f, y) => f + y.budget, 0) };
131
- }), a = [];
132
- let o = [], s = 0;
130
+ const u = r.allocate(e, this._availableLength);
131
+ return { toolbar: r, budget: u.reduce((y, k) => y + k.budget, 0) };
132
+ }), s = [];
133
+ let o = [], a = 0;
133
134
  for (const r of i) {
134
- const d = s + (o.length === 0 ? 0 : p) + r.budget;
135
- o.length > 0 && (this.toolbarKind === "docked" || d > this._availableLength) ? (a.push(o), o = [r], s = r.budget) : (o.push(r), s = d);
135
+ const u = a + (o.length === 0 ? 0 : f) + r.budget;
136
+ o.length > 0 && (this.toolbarKind === "docked" || u > this._availableLength) ? (s.push(o), o = [r], a = r.budget) : (o.push(r), a = u);
136
137
  }
137
- o.length > 0 && a.push(o);
138
- const [l, h] = e.relativePosition.split("-"), c = e.layout === "vertical";
139
- return (c ? h === "right" : l === "bottom") && a.reverse(), (c ? l === "bottom" : h === "right") && a.forEach((r) => r.reverse()), a;
138
+ o.length > 0 && s.push(o);
139
+ const [l, d] = e.relativePosition.split("-"), c = e.layout === "vertical";
140
+ return (c ? d === "right" : l === "bottom") && s.reverse(), (c ? l === "bottom" : d === "right") && s.forEach((r) => r.reverse()), s;
140
141
  }
141
142
  #s;
142
143
  _renderIntrinsicSizeContribution(t, e) {
143
- const i = t.map((s) => s.measureIntrinsicSize(e)), a = this.toolbarKind === "docked" ? Math.max(...i.map(({ maximum: s }) => s)) : i.reduce((s, { maximum: l }) => s + l, 0) + p * (t.length - 1), o = Math.max(...i.map(({ minimum: s }) => s));
144
- return S(o, a, this.layout);
144
+ const i = t.map((a) => a.measureIntrinsicSize(e)), s = this.toolbarKind === "docked" ? Math.max(...i.map(({ maximum: a }) => a)) : i.reduce((a, { maximum: l }) => a + l, 0) + f * (t.length - 1), o = Math.max(...i.map(({ minimum: a }) => a));
145
+ return D(o, s, this.layout);
145
146
  }
146
147
  render() {
147
148
  const t = this._toolbars;
@@ -149,25 +150,29 @@ class W extends L {
149
150
  this.#s?.length && (this.#o.moveAllToCache(), this.#s = []);
150
151
  return;
151
152
  }
152
- const e = {
153
+ const e = this.#r.exports;
154
+ if (!e)
155
+ return;
156
+ const i = {
157
+ sizes: e,
153
158
  layout: this.layout,
154
159
  relativePosition: this.effectiveRelativeDirection,
155
160
  scale: this.scale,
156
161
  tooltipAppearance: this.tooltipAppearance,
157
162
  toolbarKind: this.toolbarKind
158
- }, i = this._arrangeToolbarLines(t, e);
159
- q(this.#s, i) || (this.#o.moveAllToCache(), this.#s = i.map((h) => h.map(({ toolbar: c }) => c)));
160
- const [a, o] = e.relativePosition.split("-"), s = this.layout === "vertical" ? a : o, l = this.#o;
161
- return b`<div class="stack intrinsic-sizing-container">${this.allocatedLength === void 0 && this._renderIntrinsicSizeContribution(t, e) || ""}<div class="toolbar-stack">${i.map((h) => b`<div class="line" data-alignment=${s ?? P}>${h.map(({ toolbar: c, budget: m }) => O(l, c, c.proxiedRender(e, m, this.toolbarKind, this._availableLength)))}</div>`)}</div></div>`;
163
+ }, s = this._arrangeToolbarLines(t, i);
164
+ F(this.#s, s) || (this.#o.moveAllToCache(), this.#s = s.map((c) => c.map(({ toolbar: h }) => h)));
165
+ const [o, a] = i.relativePosition.split("-"), l = this.layout === "vertical" ? o : a, d = this.#o;
166
+ return v`<div class="stack intrinsic-sizing-container">${this.allocatedLength === void 0 && this._renderIntrinsicSizeContribution(t, i) || ""}<div class="toolbar-stack">${s.map((c) => v`<div class="line" data-alignment=${l ?? T}>${c.map(({ toolbar: h, budget: b }) => j(d, h, h.proxiedRender(i, b, this.toolbarKind, this._availableLength)))}</div>`)}</div></div>`;
162
167
  }
163
168
  }
164
- function j(n) {
169
+ function U(n) {
165
170
  return n.localName === "arcgis-toolbar";
166
171
  }
167
- function q(n, t) {
168
- return n?.length === t.length && t.every((e, i) => e.length === n[i].length && e.every(({ toolbar: a }, o) => a === n[i][o]));
172
+ function F(n, t) {
173
+ return n?.length === t.length && t.every((e, i) => e.length === n[i].length && e.every(({ toolbar: s }, o) => s === n[i][o]));
169
174
  }
170
- k("arcgis-toolbar-stack", W);
175
+ z("arcgis-toolbar-stack", q);
171
176
  export {
172
- W as ArcgisToolbarStack
177
+ q as ArcgisToolbarStack
173
178
  };
@@ -16,10 +16,7 @@ export abstract class ArcgisValuePickerSlider extends LitElement {
16
16
  /**
17
17
  * Determines whether the user can interact with the next button.
18
18
  * This property is automatically set to `false` when the index of [currentValue](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-slider/#currentValue) matches the last index of
19
- * [steps](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-slider/#steps). Regardless of the [layout](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-slider/#layout) property's value, the slider thumb will
20
- * move in the direction that the next button is pointing. This means that when the slider is visually flipped
21
- * (`layout` is `"horizontal"` and `mirrored` is `true`, or `layout` is `"vertical"` and `mirrored` is `false`), this property becomes `false`
22
- * when `currentValue` is equal to the first index of `steps` rather than the last.
19
+ * [steps](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-slider/#steps), or the first index if [mirrored](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-slider/#mirrored) is true.
23
20
  *
24
21
  * @default false
25
22
  * @example
@@ -47,10 +44,7 @@ export abstract class ArcgisValuePickerSlider extends LitElement {
47
44
  /**
48
45
  * Determines whether the user can interact with the previous button.
49
46
  * This property is automatically set to `false` when the index of [currentValue](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-slider/#currentValue) matches the first index of
50
- * [steps](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-slider/#steps). Regardless of the [layout](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-slider/#layout) property's value, the slider thumb will
51
- * move in the direction that the previous button is pointing. This means that when the slider is visually flipped
52
- * (`layout` is `"horizontal"` and `mirrored` is `true`, or `layout` is `"vertical"` and `mirrored` is `false`), this property becomes `false`
53
- * when `currentValue` is equal to the last index of `steps` rather than the first.
47
+ * [steps](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-slider/#steps), or the last index if [mirrored](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-slider/#mirrored) is true.
54
48
  *
55
49
  * @default false
56
50
  * @example
@@ -59,7 +53,7 @@ export abstract class ArcgisValuePickerSlider extends LitElement {
59
53
  * const valuePickerSlider = document.querySelector("arcgis-value-picker-slider");
60
54
  *
61
55
  * // `steps` will be rendered on a vertical track where "3" is the topmost value.
62
- * // The previous button (pointing upwards) will fail to increment the index of `steps` by 1.
56
+ * // The previous button (pointing down) will fail to decrement the index of `steps` by 1.
63
57
  *
64
58
  * valuePickerSlider.steps = [1, 2, 3];
65
59
  * valuePickerSlider.currentValue = 1;
@@ -67,16 +61,16 @@ export abstract class ArcgisValuePickerSlider extends LitElement {
67
61
  * valuePicker.layout = "vertical";
68
62
  *
69
63
  * if (valuePickerSlider.canPrevious) {
70
- * valuePicker.previous(); // this line will execute
64
+ * valuePicker.previous();
71
65
  * } else {
72
- * console.log("Cannot step upward.");
66
+ * console.log("Cannot step backward."); // this line will execute
73
67
  * }
74
68
  * ```
75
69
  */
76
70
  accessor canPrevious: boolean;
77
71
  /**
78
72
  * The value of the currently selected index in the slider's [steps](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-slider/#steps). If this property is not assigned by the
79
- * user, it will default to the last index of `steps`.
73
+ * user, it will default to [max](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-slider/#max).
80
74
  */
81
75
  accessor currentValue: number | undefined;
82
76
  /**
@@ -115,15 +109,13 @@ export abstract class ArcgisValuePickerSlider extends LitElement {
115
109
  accessor labels: number[] | undefined;
116
110
  /**
117
111
  * Determines whether the slider should be oriented horizontally or vertically. Note that if [arcgis-value-picker.layout](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker/#layout) on the Value Picker component
118
- * is mutated, this property will update to match it. The UI will behave as if the indices of [steps](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-slider/#steps) will ascend left to right, or bottom
119
- * to top on a horizontal or vertical layout, respectively. If you wish for the slider to be visually mirrored, set the [mirrored](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-slider/#mirrored)
120
- * property to true. This will also make the 'next' button responsible for stepping backwards to the previous index of `steps`, and
121
- * 'previous' responsible for advancing to the next index of `steps`.
112
+ * is mutated, this property will update to match it. If you wish for the slider to be visually mirrored, set the [mirrored](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-slider/#mirrored)
113
+ * property to true.
122
114
  *
123
115
  * @default "horizontal"
124
116
  * @example
125
117
  * ```js
126
- * // Display a vertical slider with `steps` ascending bottom to top. In this instance, the 'next'
118
+ * // Display a vertical slider with `steps` ascending bottom to top. In this instance, the 'previous'
127
119
  * // button (pointing downwards) will bring `currentValue` closer to 0 to match the slider's appearance.
128
120
  *
129
121
  * const valuePickerSlider = document.querySelector("arcgis-value-picker-slider");
@@ -152,8 +144,9 @@ export abstract class ArcgisValuePickerSlider extends LitElement {
152
144
  /** Positions along the slider track rendered as short tick marks under the track. */
153
145
  accessor minorTicks: number[] | undefined;
154
146
  /**
155
- * When `true`, the slider will display its [steps](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-slider/#steps) from right to left, or top to bottom,
156
- * depending on the value of [layout](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-slider/#layout). This inverts the direction of the slider.
147
+ * When `true`, the slider will display values increasing from right to left, or top to bottom,
148
+ * depending on the value of [layout](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-slider/#layout). This inverts the direction of the slider,
149
+ * where pressing the 'next' button will traverse the [steps](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-slider/#steps) array in reverse order.
157
150
  *
158
151
  * @default false
159
152
  */