@arcgis/common-components 6.0.0-next.37 → 6.0.0-next.39

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 (71) hide show
  1. package/dist/cdn/{IZD4AM2W.js → 24FE5GMT.js} +1 -1
  2. package/dist/cdn/2XTXXTEZ.js +2 -0
  3. package/dist/cdn/3QTMLOOM.js +2 -0
  4. package/dist/cdn/4X2SOHYB.js +2 -0
  5. package/dist/cdn/{3ZTHRAIZ.js → 4ZVHN3V7.js} +1 -1
  6. package/dist/cdn/{TWPYXZ2O.js → 55VDXBLV.js} +1 -1
  7. package/dist/cdn/{ANK7TFWV.js → 5YQK5TCH.js} +1 -1
  8. package/dist/cdn/{TE77L77R.js → 7S4ZZPSA.js} +1 -1
  9. package/dist/cdn/{HX2AL2HN.js → 7VGSZDT7.js} +1 -1
  10. package/dist/cdn/{5TNOGXJJ.js → ABDFJWQO.js} +1 -1
  11. package/dist/cdn/{BUPRL52I.js → BAMK6STW.js} +1 -1
  12. package/dist/cdn/CC74AHNF.js +2 -0
  13. package/dist/cdn/CCJ7MF3B.js +2 -0
  14. package/dist/cdn/{LLLQXE2U.js → EYOJNGUG.js} +1 -1
  15. package/dist/cdn/{J4AV4EAC.js → F5IBLVYU.js} +1 -1
  16. package/dist/cdn/{D4JWM5PW.js → HMGFS4YI.js} +1 -1
  17. package/dist/cdn/HYR5WUUX.js +2 -0
  18. package/dist/cdn/JAMYEW7N.js +2 -0
  19. package/dist/cdn/{SRO2CZ77.js → JCWKK6FB.js} +1 -1
  20. package/dist/cdn/{74TVQE6W.js → LIFJOO55.js} +1 -1
  21. package/dist/cdn/{BDIGRQ2U.js → LPKRIISW.js} +1 -1
  22. package/dist/cdn/{V5FMQXMU.js → LRP7XW5X.js} +1 -1
  23. package/dist/cdn/{M7F7EBFY.js → LZPZYGFW.js} +1 -1
  24. package/dist/cdn/{PIXY2HTI.js → MWQVR7SB.js} +1 -1
  25. package/dist/cdn/{6LZNNXUL.js → N5YNSPMD.js} +1 -1
  26. package/dist/cdn/{4L362IQJ.js → NEJQBOXB.js} +1 -1
  27. package/dist/cdn/{2K4XK5CC.js → NSTQTWS5.js} +1 -1
  28. package/dist/cdn/{32JRESCI.js → ONYZMGVN.js} +1 -1
  29. package/dist/cdn/{NZDJ3HVF.js → OQRMI3K5.js} +1 -1
  30. package/dist/cdn/{ZMYTELNC.js → OVW45JGX.js} +1 -1
  31. package/dist/cdn/{4IMLX5B4.js → Q73UFMJY.js} +1 -1
  32. package/dist/cdn/{PJGWH4LW.js → RBTFN5SR.js} +1 -1
  33. package/dist/cdn/{T57JKNGO.js → RU4PILTH.js} +1 -1
  34. package/dist/cdn/RU722XDV.js +2 -0
  35. package/dist/cdn/{ZLVMV6TP.js → S2EORL4N.js} +1 -1
  36. package/dist/cdn/{HWVDNUPX.js → S3GK6UB7.js} +1 -1
  37. package/dist/cdn/{JYWWX277.js → T7LZIFNY.js} +1 -1
  38. package/dist/cdn/TZBDDGN3.js +2 -0
  39. package/dist/cdn/VLVINHT3.js +2 -0
  40. package/dist/cdn/{WIOMW22N.js → WDQV5Y4K.js} +1 -1
  41. package/dist/cdn/{FESNPMRM.js → X44CHGA6.js} +1 -1
  42. package/dist/cdn/{EOGA62GK.js → Y72KV72H.js} +1 -1
  43. package/dist/cdn/{IOAVVVNO.js → YOPZGJMF.js} +1 -1
  44. package/dist/cdn/index.js +1 -1
  45. package/dist/chunks/utils.js +75 -37
  46. package/dist/chunks/utils2.js +9 -14
  47. package/dist/chunks/{intrinsic-sizing.js → well-known-sizes-controller.js} +38 -14
  48. package/dist/components/arcgis-toolbar/customElement.js +34 -29
  49. package/dist/components/arcgis-toolbar/types.d.ts +20 -1
  50. package/dist/components/arcgis-toolbar-action/customElement.js +17 -18
  51. package/dist/components/arcgis-toolbar-group/customElement.js +20 -17
  52. package/dist/components/arcgis-toolbar-item/customElement.d.ts +2 -2
  53. package/dist/components/arcgis-toolbar-item/customElement.js +14 -14
  54. package/dist/components/arcgis-toolbar-more-button/customElement.js +28 -26
  55. package/dist/components/arcgis-toolbar-split-button/customElement.js +34 -34
  56. package/dist/components/arcgis-toolbar-stack/customElement.js +48 -43
  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/32MHBJSZ.js +0 -2
  63. package/dist/cdn/4D35RDOE.js +0 -2
  64. package/dist/cdn/BAALW3SQ.js +0 -2
  65. package/dist/cdn/DPJGC3YQ.js +0 -2
  66. package/dist/cdn/E5VIZW6M.js +0 -2
  67. package/dist/cdn/FVFYAK24.js +0 -2
  68. package/dist/cdn/RYVWIAKZ.js +0 -2
  69. package/dist/cdn/UFSM3GRY.js +0 -2
  70. package/dist/cdn/W2W34T5K.js +0 -2
  71. package/dist/cdn/XQ65BGER.js +0 -2
@@ -1,39 +1,40 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import { c as v } from "../../chunks/runtime.js";
3
- import { css as f, html as b } from "lit";
4
- import { LitElement as y, nothing as k } from "@arcgis/lumina";
5
- import { useDirection as z } from "@arcgis/lumina/controllers";
6
- import { s as _, a as L, b as C, c as $, r as x } from "../../chunks/intrinsic-sizing.js";
7
- import { S as A, s as S } from "../../chunks/sharedCacheDirective.js";
8
- const T = f`: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}}`, m = 8;
9
- class P extends y {
2
+ import { c as f } from "../../chunks/runtime.js";
3
+ import { css as y, html as m } from "lit";
4
+ import { LitElement as k, nothing as z } from "@arcgis/lumina";
5
+ import { useDirection as _ } from "@arcgis/lumina/controllers";
6
+ import { W as L, s as C, a as x, b as S, c as $, r as A } from "../../chunks/well-known-sizes-controller.js";
7
+ import { S as T, s as P } from "../../chunks/sharedCacheDirective.js";
8
+ const R = y`: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}}`, g = 8;
9
+ class w extends k {
10
10
  constructor() {
11
- super(), this.#i = new ResizeObserver((t) => this._updateMeasurement(t)), this.#o = new MutationObserver(() => this._syncToolbars()), this.#a = z(), this.#t = new A(), this._layout = "horizontal", this.scale = "m", this.tooltipAppearance = "native", this.relativePosition = "top-left", this.toolbarKind = "floating", this.listen("arcgisInternalLayoutUpdate", () => this.requestUpdate());
11
+ super(), this.#i = new ResizeObserver((t) => this._updateMeasurement(t)), this.#o = new MutationObserver(() => this._syncToolbars()), this.#a = _(), this.#n = new L(this), this.#t = new T(), this._layout = "horizontal", this.scale = "m", this.tooltipAppearance = "native", this.relativePosition = "top-left", this.toolbarKind = "floating", this.listen("arcgisInternalLayoutUpdate", () => this.requestUpdate());
12
12
  }
13
13
  static {
14
14
  this.properties = { _observedSize: 16, _availableLength: 16, _toolbars: 16, effectiveRelativeDirection: 16, layout: 3, scale: 3, tooltipAppearance: 1, relativePosition: 1, toolbarKind: 3, allocatedLength: 11 };
15
15
  }
16
16
  static {
17
- this.styles = [T, _, L, C, $];
17
+ this.styles = [R, C, x, S, $];
18
18
  }
19
19
  #i;
20
20
  #o;
21
21
  #s;
22
22
  #a;
23
+ #n;
23
24
  #t;
24
25
  get _availableLength() {
25
26
  return this.allocatedLength ?? (this.layout === "horizontal" ? this._observedSize?.width : this._observedSize?.height) ?? 0;
26
27
  }
27
28
  get effectiveRelativeDirection() {
28
- const [t, e] = this.relativePosition.split("-"), i = this.#a;
29
- switch (e) {
29
+ const [t, i] = this.relativePosition.split("-"), e = this.#a;
30
+ switch (i) {
30
31
  case "left":
31
32
  case "right":
32
- return `${t}-${e}`;
33
+ return `${t}-${i}`;
33
34
  case "end":
34
- return `${t}-${i === "ltr" ? "right" : "left"}`;
35
+ return `${t}-${e === "ltr" ? "right" : "left"}`;
35
36
  case "start":
36
- return `${t}-${i === "ltr" ? "left" : "right"}`;
37
+ return `${t}-${e === "ltr" ? "left" : "right"}`;
37
38
  }
38
39
  }
39
40
  get layout() {
@@ -53,29 +54,29 @@ class P extends y {
53
54
  }
54
55
  _syncToolbars() {
55
56
  this.#s?.abort();
56
- const t = Array.from(this.el.children).filter(R), e = new AbortController();
57
- this.#s = e, Promise.all(t.map((i) => i.componentOnReady())).then(() => {
58
- !this.isConnected || e.signal.aborted || (this._toolbars = t);
57
+ const t = Array.from(this.el.children).filter(K), i = new AbortController();
58
+ this.#s = i, Promise.all(t.map((e) => e.componentOnReady())).then(() => {
59
+ !this.isConnected || i.signal.aborted || (this._toolbars = t);
59
60
  });
60
61
  }
61
- _arrangeToolbarLines(t, e) {
62
- const i = t.map((n) => {
63
- const d = n.allocate(e, this._availableLength);
64
- return { toolbar: n, budget: d.reduce((g, p) => g + p.budget, 0) };
65
- }), a = [];
66
- let o = [], s = 0;
67
- for (const n of i) {
68
- const d = s + (o.length === 0 ? 0 : m) + n.budget;
69
- o.length > 0 && (this.toolbarKind === "docked" || d > this._availableLength) ? (a.push(o), o = [n], s = n.budget) : (o.push(n), s = d);
62
+ _arrangeToolbarLines(t, i) {
63
+ const e = t.map((n) => {
64
+ const u = n.allocate(i, this._availableLength);
65
+ return { toolbar: n, budget: u.reduce((p, v) => p + v.budget, 0) };
66
+ }), o = [];
67
+ let s = [], a = 0;
68
+ for (const n of e) {
69
+ const u = a + (s.length === 0 ? 0 : g) + n.budget;
70
+ s.length > 0 && (this.toolbarKind === "docked" || u > this._availableLength) ? (o.push(s), s = [n], a = n.budget) : (s.push(n), a = u);
70
71
  }
71
- o.length > 0 && a.push(o);
72
- const [c, h] = e.relativePosition.split("-"), r = e.layout === "vertical";
73
- return (r ? h === "right" : c === "bottom") && a.reverse(), (r ? c === "bottom" : h === "right") && a.forEach((n) => n.reverse()), a;
72
+ s.length > 0 && o.push(s);
73
+ const [l, d] = i.relativePosition.split("-"), c = i.layout === "vertical";
74
+ return (c ? d === "right" : l === "bottom") && o.reverse(), (c ? l === "bottom" : d === "right") && o.forEach((n) => n.reverse()), o;
74
75
  }
75
76
  #e;
76
- _renderIntrinsicSizeContribution(t, e) {
77
- const i = t.map((s) => s.measureIntrinsicSize(e)), a = this.toolbarKind === "docked" ? Math.max(...i.map(({ maximum: s }) => s)) : i.reduce((s, { maximum: c }) => s + c, 0) + m * (t.length - 1), o = Math.max(...i.map(({ minimum: s }) => s));
78
- return x(o, a, this.layout);
77
+ _renderIntrinsicSizeContribution(t, i) {
78
+ const e = t.map((a) => a.measureIntrinsicSize(i)), o = this.toolbarKind === "docked" ? Math.max(...e.map(({ maximum: a }) => a)) : e.reduce((a, { maximum: l }) => a + l, 0) + g * (t.length - 1), s = Math.max(...e.map(({ minimum: a }) => a));
79
+ return A(s, o, this.layout);
79
80
  }
80
81
  render() {
81
82
  const t = this._toolbars;
@@ -83,25 +84,29 @@ class P extends y {
83
84
  this.#e?.length && (this.#t.moveAllToCache(), this.#e = []);
84
85
  return;
85
86
  }
87
+ const i = this.#n.exports;
88
+ if (!i)
89
+ return;
86
90
  const e = {
91
+ sizes: i,
87
92
  layout: this.layout,
88
93
  relativePosition: this.effectiveRelativeDirection,
89
94
  scale: this.scale,
90
95
  tooltipAppearance: this.tooltipAppearance,
91
96
  toolbarKind: this.toolbarKind
92
- }, i = this._arrangeToolbarLines(t, e);
93
- w(this.#e, i) || (this.#t.moveAllToCache(), this.#e = i.map((h) => h.map(({ toolbar: r }) => r)));
94
- const [a, o] = e.relativePosition.split("-"), s = this.layout === "vertical" ? a : o, c = this.#t;
95
- 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 ?? k}>${h.map(({ toolbar: r, budget: u }) => S(c, r, r.proxiedRender(e, u, this.toolbarKind, this._availableLength)))}</div>`)}</div></div>`;
97
+ }, o = this._arrangeToolbarLines(t, e);
98
+ I(this.#e, o) || (this.#t.moveAllToCache(), this.#e = o.map((c) => c.map(({ toolbar: h }) => h)));
99
+ const [s, a] = e.relativePosition.split("-"), l = this.layout === "vertical" ? s : a, d = this.#t;
100
+ return m`<div class="stack intrinsic-sizing-container">${this.allocatedLength === void 0 && this._renderIntrinsicSizeContribution(t, e) || ""}<div class="toolbar-stack">${o.map((c) => m`<div class="line" data-alignment=${l ?? z}>${c.map(({ toolbar: h, budget: b }) => P(d, h, h.proxiedRender(e, b, this.toolbarKind, this._availableLength)))}</div>`)}</div></div>`;
96
101
  }
97
102
  }
98
- function R(l) {
99
- return l.localName === "arcgis-toolbar";
103
+ function K(r) {
104
+ return r.localName === "arcgis-toolbar";
100
105
  }
101
- function w(l, t) {
102
- return l?.length === t.length && t.every((e, i) => e.length === l[i].length && e.every(({ toolbar: a }, o) => a === l[i][o]));
106
+ function I(r, t) {
107
+ return r?.length === t.length && t.every((i, e) => i.length === r[e].length && i.every(({ toolbar: o }, s) => o === r[e][s]));
103
108
  }
104
- v("arcgis-toolbar-stack", P);
109
+ f("arcgis-toolbar-stack", w);
105
110
  export {
106
- P as ArcgisToolbarStack
111
+ w as ArcgisToolbarStack
107
112
  };