@arcgis/common-components 5.2.0-next.11 → 5.2.0-next.111

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 (155) hide show
  1. package/LICENSE.md +4 -2
  2. package/README.md +2 -2
  3. package/dist/cdn/{L2JNUMXB.js → 3UH3ZOZB.js} +1 -1
  4. package/dist/cdn/475SP47T.js +2 -0
  5. package/dist/cdn/{4W7JZPB6.js → 4JMH3KRC.js} +1 -1
  6. package/dist/cdn/{VQLI4IE7.js → 4LO2YSUJ.js} +1 -1
  7. package/dist/cdn/4TZVXSQZ.js +2 -0
  8. package/dist/cdn/56HK5TL6.js +2 -0
  9. package/dist/cdn/5IM4X2GT.js +2 -0
  10. package/dist/cdn/6HBX6QDQ.js +2 -0
  11. package/dist/cdn/{OBIWQRXY.js → 73ETIJP2.js} +1 -1
  12. package/dist/cdn/7EP7KDAN.js +2 -0
  13. package/dist/cdn/7YNFXAZI.js +2 -0
  14. package/dist/cdn/{GVOQ2CB7.js → AWK4HGJV.js} +1 -1
  15. package/dist/cdn/DG5IVKVO.js +2 -0
  16. package/dist/cdn/{5KS7T5BY.js → DRV7OKQT.js} +1 -1
  17. package/dist/cdn/EA5M73N4.js +2 -0
  18. package/dist/cdn/EPTZSQ77.js +2 -0
  19. package/dist/cdn/{3P53QRGS.js → G2LLGGQQ.js} +1 -1
  20. package/dist/cdn/{XRARFMJ7.js → GQ2PO4L4.js} +1 -1
  21. package/dist/cdn/GSQIARZL.js +2 -0
  22. package/dist/cdn/HJZA4ZUL.js +2 -0
  23. package/dist/cdn/I7CTLPWD.js +2 -0
  24. package/dist/cdn/{LKUOAV7B.js → ICJXMKTL.js} +1 -1
  25. package/dist/cdn/{L5RMOAO3.js → J6ZKTXN7.js} +1 -1
  26. package/dist/cdn/KMYFQIQ7.js +2 -0
  27. package/dist/cdn/L7XGWJZF.js +2 -0
  28. package/dist/cdn/LAQNGXPG.js +2 -0
  29. package/dist/cdn/ND7AQ3X6.js +2 -0
  30. package/dist/cdn/NNNE4T7L.js +2 -0
  31. package/dist/cdn/O4H2JR53.js +2 -0
  32. package/dist/cdn/{3V5M7OHL.js → OSOV6LK3.js} +3 -3
  33. package/dist/cdn/PMV2N3L3.js +2 -0
  34. package/dist/cdn/{MCZBUYS5.js → PQG3COJ4.js} +1 -1
  35. package/dist/cdn/PSVNG2MS.js +2 -0
  36. package/dist/cdn/PUNWW4GY.js +2 -0
  37. package/dist/cdn/PWYFUIF6.js +4 -0
  38. package/dist/cdn/Q3AMPMQV.js +2 -0
  39. package/dist/cdn/{WEKRF34E.js → QWRE6ILV.js} +1 -1
  40. package/dist/cdn/RC2HNFFD.js +2 -0
  41. package/dist/cdn/{JLPZ3OR2.js → SKLYKTDC.js} +1 -1
  42. package/dist/cdn/TKCEZXLC.js +2 -0
  43. package/dist/cdn/TWW63D32.js +2 -0
  44. package/dist/cdn/XMGOCO2S.js +2 -0
  45. package/dist/cdn/Z5QBBHLD.js +2 -0
  46. package/dist/cdn/{N7C4DINF.js → Z5SIZJN5.js} +1 -1
  47. package/dist/cdn/ZMZH3Z5A.js +2 -0
  48. package/dist/cdn/assets/field-pick-list/t9n/messages.en.json +1 -1
  49. package/dist/cdn/assets/slider-field/t9n/messages.en.json +1 -0
  50. package/dist/cdn/assets/slider-histogram-range/t9n/messages.en.json +1 -0
  51. package/dist/cdn/index.js +1 -1
  52. package/dist/cdn/main.css +1 -1
  53. package/dist/chunks/element-reference-controller.js +19 -0
  54. package/dist/chunks/layer-utils.js +52 -40
  55. package/dist/chunks/locale.js +14 -6
  56. package/dist/chunks/strategies.js +287 -0
  57. package/dist/chunks/toolbar.js +9 -0
  58. package/dist/chunks/types.js +16 -0
  59. package/dist/chunks/utils.js +59 -0
  60. package/dist/chunks/utils2.js +20 -0
  61. package/dist/chunks/utils3.js +7 -0
  62. package/dist/components/arcgis-ckeditor5/customElement.d.ts +23 -0
  63. package/dist/components/arcgis-ckeditor5/customElement.js +2 -2
  64. package/dist/components/arcgis-ckeditor5-popover/customElement.js +1 -1
  65. package/dist/components/arcgis-color-input/customElement.d.ts +2 -1
  66. package/dist/components/arcgis-color-input/customElement.js +1 -1
  67. package/dist/components/arcgis-coordinate-system-picker/customElement.d.ts +23 -0
  68. package/dist/components/arcgis-coordinate-system-picker/customElement.js +1 -1
  69. package/dist/components/arcgis-field-info/customElement.d.ts +1 -1
  70. package/dist/components/arcgis-field-info/customElement.js +248 -225
  71. package/dist/components/arcgis-field-info/index.js +1 -0
  72. package/dist/components/arcgis-field-info/utils/basic.d.ts +3 -1
  73. package/dist/components/arcgis-field-pick-list/customElement.d.ts +15 -12
  74. package/dist/components/arcgis-field-pick-list/customElement.js +205 -122
  75. package/dist/components/arcgis-field-pick-list/index.js +4 -3
  76. package/dist/components/arcgis-field-pick-list/utils/types.d.ts +3 -1
  77. package/dist/components/arcgis-histogram/customElement.d.ts +39 -2
  78. package/dist/components/arcgis-histogram/customElement.js +105 -90
  79. package/dist/components/arcgis-label-input/customElement.js +18 -14
  80. package/dist/components/arcgis-slider/customElement.d.ts +11 -3
  81. package/dist/components/arcgis-slider/customElement.js +371 -348
  82. package/dist/components/arcgis-slider-field/customElement.d.ts +298 -0
  83. package/dist/components/arcgis-slider-field/customElement.js +96 -0
  84. package/dist/components/arcgis-slider-field/index.d.ts +1 -0
  85. package/dist/components/arcgis-slider-field/index.js +2 -0
  86. package/dist/components/arcgis-slider-histogram-range/customElement.d.ts +390 -0
  87. package/dist/components/arcgis-slider-histogram-range/customElement.js +120 -0
  88. package/dist/components/arcgis-slider-histogram-range/index.d.ts +1 -0
  89. package/dist/components/arcgis-slider-histogram-range/index.js +3 -0
  90. package/dist/components/arcgis-slider-histogram-range/types.d.ts +6 -0
  91. package/dist/components/arcgis-ticks/customElement.d.ts +11 -3
  92. package/dist/components/arcgis-ticks/customElement.js +100 -79
  93. package/dist/components/arcgis-toolbar/customElement.d.ts +67 -0
  94. package/dist/components/arcgis-toolbar/customElement.js +108 -0
  95. package/dist/components/arcgis-toolbar/index.d.ts +1 -0
  96. package/dist/components/arcgis-toolbar/index.js +2 -0
  97. package/dist/components/arcgis-toolbar/types.d.ts +41 -0
  98. package/dist/components/arcgis-toolbar-action/customElement.d.ts +97 -0
  99. package/dist/components/arcgis-toolbar-action/customElement.js +52 -0
  100. package/dist/components/arcgis-toolbar-action/index.d.ts +1 -0
  101. package/dist/components/arcgis-toolbar-action/index.js +3 -0
  102. package/dist/components/arcgis-toolbar-group/customElement.d.ts +38 -0
  103. package/dist/components/arcgis-toolbar-group/customElement.js +48 -0
  104. package/dist/components/arcgis-toolbar-group/index.d.ts +1 -0
  105. package/dist/components/arcgis-toolbar-group/index.js +2 -0
  106. package/dist/components/arcgis-toolbar-item/customElement.d.ts +83 -0
  107. package/dist/components/arcgis-toolbar-item/customElement.js +42 -0
  108. package/dist/components/arcgis-toolbar-item/index.d.ts +1 -0
  109. package/dist/components/arcgis-toolbar-item/index.js +4 -0
  110. package/dist/components/arcgis-toolbar-more-button/customElement.d.ts +52 -0
  111. package/dist/components/arcgis-toolbar-more-button/customElement.js +68 -0
  112. package/dist/components/arcgis-toolbar-more-button/index.d.ts +1 -0
  113. package/dist/components/arcgis-toolbar-more-button/index.js +6 -0
  114. package/dist/components/arcgis-toolbar-split-button/customElement.d.ts +51 -0
  115. package/dist/components/arcgis-toolbar-split-button/customElement.js +67 -0
  116. package/dist/components/arcgis-toolbar-split-button/index.d.ts +1 -0
  117. package/dist/components/arcgis-toolbar-split-button/index.js +6 -0
  118. package/dist/components/arcgis-toolbar-stack/customElement.d.ts +48 -0
  119. package/dist/components/arcgis-toolbar-stack/customElement.js +174 -0
  120. package/dist/components/arcgis-toolbar-stack/index.d.ts +1 -0
  121. package/dist/components/arcgis-toolbar-stack/index.js +1 -0
  122. package/dist/components/arcgis-unique-values-list/customElement.js +115 -95
  123. package/dist/components/arcgis-value-picker/customElement.js +5 -5
  124. package/dist/docs/api.json +1 -1
  125. package/dist/docs/docs.json +1 -1
  126. package/dist/docs/vscode.css-custom-data.json +1 -1
  127. package/dist/docs/vscode.html-custom-data.json +1 -1
  128. package/dist/docs/web-types.json +1 -1
  129. package/dist/index.d.ts +62 -0
  130. package/dist/index.js +2 -0
  131. package/dist/loader.js +13 -4
  132. package/dist/types/lumina.d.ts +58 -2
  133. package/dist/types/preact.d.ts +67 -2
  134. package/dist/types/react.d.ts +76 -2
  135. package/dist/types/stencil.d.ts +60 -4
  136. package/dist/utils/types.d.ts +14 -1
  137. package/package.json +6 -6
  138. package/dist/cdn/2XA6O2MP.js +0 -2
  139. package/dist/cdn/4BJYJUMR.js +0 -2
  140. package/dist/cdn/5U5NQ3F5.js +0 -2
  141. package/dist/cdn/77HZGUSC.js +0 -2
  142. package/dist/cdn/A3CISHRB.js +0 -2
  143. package/dist/cdn/AFBKMYU6.js +0 -4
  144. package/dist/cdn/IUJ4ILLQ.js +0 -2
  145. package/dist/cdn/JPD7Z3MB.js +0 -2
  146. package/dist/cdn/LB7I345F.js +0 -2
  147. package/dist/cdn/LBD3GPSD.js +0 -2
  148. package/dist/cdn/MCH3WQ4X.js +0 -2
  149. package/dist/cdn/NKMDS2IH.js +0 -2
  150. package/dist/cdn/PSITQBDP.js +0 -2
  151. package/dist/cdn/TXYPZ6MB.js +0 -2
  152. package/dist/cdn/WLYFLEI6.js +0 -2
  153. package/dist/cdn/assets/coordinate-system-picker/t9n/messages.en-US.json +0 -1
  154. /package/dist/cdn/{ECNI2A4K.js → XEK22IDA.js} +0 -0
  155. /package/dist/chunks/{commonFunctions.js → general.js} +0 -0
@@ -1,9 +1,9 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { c as $ } from "../../chunks/runtime.js";
3
- import { css as M, html as o } from "lit";
4
- import { LitElement as _, createEvent as C, safeClassMap as h, nothing as v, safeStyleMap as f } from "@arcgis/lumina";
5
- import { formatNumber as z } from "@arcgis/core/intl.js";
6
- const n = {
2
+ import { c as M } from "../../chunks/runtime.js";
3
+ import { css as C, html as h } from "lit";
4
+ import { LitElement as F, createEvent as L, safeClassMap as o, nothing as y, safeStyleMap as m } from "@arcgis/lumina";
5
+ import { formatNumber as T } from "@arcgis/core/intl.js";
6
+ const c = {
7
7
  container: "container",
8
8
  ticksContainer: "ticks-container",
9
9
  labelsContainer: "labels-container",
@@ -11,131 +11,152 @@ const n = {
11
11
  tickMin: "tick--min",
12
12
  tickMax: "tick--max",
13
13
  tickLabel: "tick-label",
14
+ tickLabelFocused: "tick-label--focused",
15
+ tickLabelText: "tick-label-text",
14
16
  baseline: "baseline"
15
- }, A = M`:host{display:flex;--arcgis-ticks-font-size: var(--calcite-font-size--2);--arcgis-ticks-font-weight: var(--calcite-font-weight-medium);--arcgis-ticks-gap: 1em;--arcgis-ticks-tick-color: var(--calcite-color-border-input);--arcgis-ticks-tick-length: .5rem;--arcgis-ticks-tick-transform: translateX(-50%);--arcgis-ticks-tick-width: .125rem}.container{align-items:stretch;display:flex;color:var(--calcite-color-text-2);flex:1;font-weight:var(--arcgis-ticks-font-weight);font-size:var(--arcgis-ticks-font-size);line-height:1em;position:relative;user-select:none;word-wrap:normal;word-break:normal}.baseline{background-color:var(--arcgis-ticks-tick-color, var(--calcite-color-border-input))}.tick{position:absolute;background-color:var(--arcgis-ticks-tick-color, var(--calcite-color-border-input))}.tick-label{position:absolute;text-align:var(--arcgis-ticks-label-text-align, center);width:var(--arcgis-ticks-label-width, var(--labels-container-width, "auto"))}:dir(rtl){.tick-label{direction:rtl}}:host([layout="horizontal"]){.ticks-container{height:var(--arcgis-ticks-tick-length)}.labels-container{height:var(--labels-container-height, "auto")}.tick{width:var(--arcgis-ticks-tick-width);height:var(--arcgis-ticks-tick-length);transform:var(--arcgis-ticks-tick-transform)}.tick-label{transform:translate(-50%)}.tick--min{transform:unset}.tick--max{transform:translate(-100%)}}:host([layout="vertical"]){.ticks-container{width:var(--arcgis-ticks-tick-length)}.labels-container{width:var(--labels-container-width)}.tick{width:var(--arcgis-ticks-tick-length);height:var(--arcgis-ticks-tick-width);transform:translateY(50%)}.tick-label{text-align:right;transform:translateY(50%)}.tick--min{transform:unset}.tick--max{transform:translateY(100%)}}:host([layout="horizontal"][mirrored]){.tick,.tick-label{transform:translate(50%)}.tick--min{transform:unset}.tick--max{transform:translate(100%)}}:host([layout="vertical"][mirrored]){.tick,.tick-label{transform:translateY(-50%)}.tick--min{transform:unset}.tick--max{transform:translateY(-100%)}}:host([layout="horizontal"][label-placement="start"]){.container{flex-direction:column;justify-content:flex-end}.labels-container{margin-bottom:var(--arcgis-ticks-gap)}}:host([layout="horizontal"][label-placement="end"]){.container{flex-direction:column-reverse;justify-content:flex-end}.labels-container{margin-top:var(--arcgis-ticks-gap)}}:host([layout="vertical"][label-placement="start"]){.container{flex-direction:row;justify-content:flex-end}:dir(ltr){.labels-container{margin-right:var(--arcgis-ticks-gap)}.tick-label{text-align:right}}:dir(rtl){.labels-container{margin-left:var(--arcgis-ticks-gap)}.tick-label{text-align:left;unicode-bidi:plaintext}}}:host([layout="vertical"][label-placement="end"]){.container{flex-direction:row-reverse;justify-content:flex-end}:dir(ltr){.labels-container{margin-left:var(--arcgis-ticks-gap)}.tick-label{text-align:left}}:dir(rtl){.labels-container{margin-right:var(--arcgis-ticks-gap)}.tick-label{text-align:right;unicode-bidi:plaintext}}}:host([interactive]){pointer-events:none;.tick,.tick-label{pointer-events:auto;cursor:pointer}.tick-label:hover{text-decoration:underline}}`;
16
- class F extends _ {
17
+ }, z = C`:host{display:flex;--arcgis-ticks-font-size: var(--calcite-font-size--2);--arcgis-ticks-font-weight: var(--calcite-font-weight-medium);--arcgis-ticks-gap: 1em;--arcgis-ticks-tick-color: var(--calcite-color-border-input);--arcgis-ticks-tick-length: .5rem;--arcgis-ticks-tick-transform: translateX(-50%);--arcgis-ticks-tick-width: .125rem}.container{align-items:stretch;display:flex;color:var(--calcite-color-text-2);flex:1;font-weight:var(--arcgis-ticks-font-weight);font-size:var(--arcgis-ticks-font-size);line-height:1em;position:relative;user-select:none;word-wrap:normal;word-break:normal}.baseline{background-color:var(--arcgis-ticks-tick-color, var(--calcite-color-border-input))}.tick{position:absolute;background-color:var(--arcgis-ticks-tick-color, var(--calcite-color-border-input))}.tick-label{position:absolute;text-align:var(--arcgis-ticks-label-text-align, center);width:var(--arcgis-ticks-label-width, var(--labels-container-width, "auto"))}.tick-label-text:hover{text-decoration:underline}.tick-label-text{display:inline-block;line-height:1}.tick-label--focused .tick-label-text{outline:2px solid var(--calcite-color-focus, var(--calcite-color-brand));outline-offset:calc(2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:dir(rtl){.tick-label{direction:rtl}}:host([layout="horizontal"]){.ticks-container{height:var(--arcgis-ticks-tick-length)}.labels-container{height:var(--labels-container-height, "auto")}.tick{width:var(--arcgis-ticks-tick-width);height:var(--arcgis-ticks-tick-length);transform:var(--arcgis-ticks-tick-transform)}.tick-label{transform:translate(-50%)}.tick--min{transform:unset}.tick--max{transform:translate(-100%)}}:host([layout="vertical"]){.ticks-container{width:var(--arcgis-ticks-tick-length)}.labels-container{width:var(--labels-container-width)}.tick{width:var(--arcgis-ticks-tick-length);height:var(--arcgis-ticks-tick-width);transform:translateY(50%)}.tick-label{text-align:right;transform:translateY(50%)}.tick--min{transform:unset}.tick--max{transform:translateY(100%)}}:host([layout="horizontal"][mirrored]){.tick,.tick-label{transform:translate(50%)}.tick--min{transform:unset}.tick--max{transform:translate(100%)}}:host([layout="vertical"][mirrored]){.tick,.tick-label{transform:translateY(-50%)}.tick--min{transform:unset}.tick--max{transform:translateY(-100%)}}:host([layout="horizontal"][label-placement="start"]){.container{flex-direction:column;justify-content:flex-end}.labels-container{margin-bottom:var(--arcgis-ticks-gap)}}:host([layout="horizontal"][label-placement="end"]){.container{flex-direction:column-reverse;justify-content:flex-end}.labels-container{margin-top:var(--arcgis-ticks-gap)}}:host([layout="vertical"][label-placement="start"]){.container{flex-direction:row;justify-content:flex-end}:dir(ltr){.labels-container{margin-right:var(--arcgis-ticks-gap)}.tick-label{text-align:right}}:dir(rtl){.labels-container{margin-left:var(--arcgis-ticks-gap)}.tick-label{text-align:left;unicode-bidi:plaintext}}}:host([layout="vertical"][label-placement="end"]){.container{flex-direction:row-reverse;justify-content:flex-end}:dir(ltr){.labels-container{margin-left:var(--arcgis-ticks-gap)}.tick-label{text-align:left}}:dir(rtl){.labels-container{margin-right:var(--arcgis-ticks-gap)}.tick-label{text-align:right;unicode-bidi:plaintext}}}:host([interactive]){pointer-events:none;.tick,.tick-label{pointer-events:auto;cursor:pointer}.tick:focus{background-color:var(--calcite-color-brand);outline:2px solid var(--calcite-color-focus, var(--calcite-color-brand));outline-offset:calc(2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}}`;
18
+ class A extends F {
17
19
  constructor() {
18
- super(...arguments), this._formatValue = (e) => z(e, this._formatOptions), this._formatOptions = {
20
+ super(...arguments), this._formatValue = (t) => T(t, this._formatOptions), this._activeTick = null, this._formatOptions = {
19
21
  style: "decimal",
20
22
  useGrouping: !0,
21
23
  minimumFractionDigits: 0,
22
24
  maximumFractionDigits: 2
23
- }, this.interactive = !1, this.interpolationExponent = 0, this.labelPlacement = "end", this.layout = "horizontal", this.max = 100, this.min = 0, this.mirrored = !1, this.mode = "count", this.showLabels = !1, this.showBaseline = !1, this.values = [], this.arcgisTickClick = C({ cancelable: !1 });
25
+ }, this.interactive = !1, this.interpolationExponent = 0, this.labelPlacement = "end", this.layout = "horizontal", this.max = 100, this.min = 0, this.mirrored = !1, this.mode = "count", this.showLabels = !1, this.showBaseline = !1, this.values = [], this.arcgisTickClick = L({ cancelable: !1 });
24
26
  }
25
27
  static {
26
- this.properties = { _formatOptions: 16, interactive: 7, interpolationExponent: 9, labelFormatter: 0, labelPlacement: 3, layout: 3, max: 9, min: 9, mirrored: 7, mode: 1, showLabels: 5, showBaseline: 5, values: [9, { converter: {
27
- fromAttribute(e) {
28
- if (e.includes(","))
29
- return e.split(",").filter((t) => t.trim() !== "").map(parseFloat).filter((t) => Number.isFinite(t));
28
+ this.properties = { _activeTick: 16, _formatOptions: 16, interactive: 7, interpolationExponent: 9, labelFormatter: 0, labelPlacement: 3, layout: 3, max: 9, min: 9, mirrored: 7, mode: 1, showLabels: 5, showBaseline: 5, values: [9, { converter: {
29
+ fromAttribute(t) {
30
+ if (t.includes(","))
31
+ return t.split(",").filter((e) => e.trim() !== "").map(parseFloat).filter((e) => Number.isFinite(e));
30
32
  {
31
- const t = parseFloat(e);
32
- return Number.isFinite(t) ? [t] : [];
33
+ const e = parseFloat(t);
34
+ return Number.isFinite(e) ? [e] : [];
33
35
  }
34
36
  }
35
37
  } }] };
36
38
  }
37
39
  static {
38
- this.styles = A;
40
+ this.styles = z;
39
41
  }
40
42
  updated() {
41
- const e = this.renderRoot.querySelector(`.${n.labelsContainer}`);
42
- if (e) {
43
- let t = 0, i = 0;
44
- for (const r of this.renderRoot.querySelectorAll(`.${n.tickLabel}`)) {
45
- const a = r.getBoundingClientRect();
46
- t = Math.max(t, a.width), i = Math.max(i, a.height);
43
+ const t = this.renderRoot.querySelector(`.${c.labelsContainer}`);
44
+ if (t) {
45
+ t.style.removeProperty("--labels-container-width"), t.style.removeProperty("--labels-container-height");
46
+ let e = 0, i = 0;
47
+ for (const a of this.renderRoot.querySelectorAll(`.${c.tickLabel}`)) {
48
+ const r = a.getBoundingClientRect();
49
+ e = Math.max(e, r.width), i = Math.max(i, r.height);
47
50
  }
48
- t = Math.ceil(t), i = Math.ceil(i), !t || !i ? (e.style.removeProperty("--labels-container-width"), e.style.removeProperty("--labels-container-height")) : (e.style.setProperty("--labels-container-width", `${t}px`), e.style.setProperty("--labels-container-height", `${i}px`));
51
+ e = Math.ceil(e), i = Math.ceil(i), e && i && (t.style.setProperty("--labels-container-width", `${e}px`), t.style.setProperty("--labels-container-height", `${i}px`));
49
52
  }
50
53
  }
51
- _handleClick(e) {
54
+ _handleBlur() {
55
+ this._activeTick = null;
56
+ }
57
+ _handleClick(t) {
52
58
  if (!this.interactive)
53
59
  return;
54
- const i = e.target.dataset.value;
60
+ const i = t.currentTarget.dataset.value;
55
61
  i && this.arcgisTickClick.emit({ value: Number(i) });
56
62
  }
57
- _internalLabelFormatter(e) {
58
- const t = this.labelFormatter;
59
- if (!t)
60
- return this._formatValue(e);
61
- const i = t(e, this._formatValue);
62
- return i ?? this._formatValue(e);
63
+ _handleFocus(t) {
64
+ this._activeTick = t.currentTarget.dataset.value ?? null;
65
+ }
66
+ _handleKeyDown(t) {
67
+ t.key === "Enter" && this._handleClick(t);
68
+ }
69
+ _handleMouseDown(t) {
70
+ this.interactive && t.preventDefault();
71
+ }
72
+ _internalLabelFormatter(t) {
73
+ const e = this.labelFormatter;
74
+ if (!e)
75
+ return this._formatValue(t);
76
+ const i = e(t, this._formatValue);
77
+ return i ?? this._formatValue(t);
63
78
  }
64
79
  render() {
65
- return o`<div class=${h(n.container)} touch-action=none @click=${this._handleClick}>${this._renderContent()}${this._renderBaseline()}</div>`;
80
+ return h`<div class=${o(c.container)} touch-action=none>${this._renderContent()}${this._renderBaseline()}</div>`;
66
81
  }
67
82
  _renderContent() {
68
- const { interpolationExponent: e, max: t, min: i, mode: r, values: a, layout: c, mirrored: l, showLabels: w } = this, u = [], b = [];
69
- for (const [k, d] of L(r, i, t, e, a)) {
70
- const p = { [c === "horizontal" ? l ? "right" : "left" : l ? "top" : "bottom"]: `${k}%` }, x = {
71
- [n.tick]: !0,
72
- [n.tickMin]: k === 0,
73
- [n.tickMax]: k === 100
83
+ const { interpolationExponent: t, max: e, min: i, mode: a, values: r, layout: n, mirrored: s, showLabels: w, interactive: k } = this, g = [], v = [];
84
+ for (const [f, d] of P(a, i, e, t, r)) {
85
+ const p = { [n === "horizontal" ? s ? "right" : "left" : s ? "top" : "bottom"]: `${f}%` }, $ = {
86
+ [c.tick]: !0,
87
+ [c.tickMin]: f === 0,
88
+ [c.tickMax]: f === 100
74
89
  };
75
- u.push(o`<div class=${h(x)} style=${f(p)} data-value=${d ?? v}></div>`), w && b.push(o`<div class=${h(n.tickLabel)} style=${f(p)} data-value=${d ?? v}>${this._internalLabelFormatter(d)}</div>`);
90
+ if (g.push(h`<div class=${o($)} .role=${k ? "button" : void 0} .ariaLabel=${k ? this._internalLabelFormatter(d) : void 0} style=${m(p)} data-value=${d ?? y} .tabIndex=${k ? 0 : -1} @blur=${this._handleBlur} @click=${this._handleClick} @focus=${this._handleFocus} @keydown=${this._handleKeyDown} @mousedown=${this._handleMouseDown}></div>`), w) {
91
+ const _ = {
92
+ [c.tickLabel]: !0,
93
+ [c.tickLabelFocused]: this._activeTick === String(d)
94
+ };
95
+ v.push(h`<div class=${o(_)} style=${m(p)} data-value=${d ?? y} @click=${this._handleClick}><span class=${o(c.tickLabelText)}>${this._internalLabelFormatter(d)}</span></div>`);
96
+ }
76
97
  }
77
- return [o`<div class=${h(n.labelsContainer)}>${b}</div>`, o`<div class=${h(n.ticksContainer)}>${u}</div>`];
98
+ return [h`<div class=${o(c.labelsContainer)}>${v}</div>`, h`<div class=${o(c.ticksContainer)}>${g}</div>`];
78
99
  }
79
100
  _renderBaseline() {
80
- const { showBaseline: e, layout: t } = this;
81
- return e && o`<div class=${h(n.baseline)} style=${f({
82
- [t === "horizontal" ? "width" : "height"]: "100%",
83
- [t === "horizontal" ? "height" : "width"]: "0.125rem"
101
+ const { showBaseline: t, layout: e } = this;
102
+ return t && h`<div class=${o(c.baseline)} style=${m({
103
+ [e === "horizontal" ? "width" : "height"]: "100%",
104
+ [e === "horizontal" ? "height" : "width"]: "0.125rem"
84
105
  })}></div>` || "";
85
106
  }
86
107
  }
87
- function* L(s, e, t, i, r) {
88
- switch (s) {
108
+ function* P(l, t, e, i, a) {
109
+ switch (l) {
89
110
  case "value": {
90
- const a = Array.isArray(r) ? r : [r];
91
- for (const c of a) {
92
- const l = P(e, t, c, i) * 100;
93
- l >= 0 && l <= 100 && (yield [l, c]);
111
+ const r = Array.isArray(a) ? a : [a];
112
+ for (const n of r) {
113
+ const s = B(t, e, n, i) * 100;
114
+ s >= 0 && s <= 100 && (yield [s, n]);
94
115
  }
95
116
  break;
96
117
  }
97
118
  case "percent": {
98
- if (Array.isArray(r))
99
- for (const a of r)
100
- a >= 0 && a <= 100 && (yield [a, m(e, t, a / 100, i)]);
101
- else if (r > 0)
102
- for (let a = 0; a <= 100; a += r)
103
- yield [a, m(e, t, a / 100, i)];
119
+ if (Array.isArray(a))
120
+ for (const r of a)
121
+ r >= 0 && r <= 100 && (yield [r, u(t, e, r / 100, i)]);
122
+ else if (a > 0)
123
+ for (let r = 0; r <= 100; r += a)
124
+ yield [r, u(t, e, r / 100, i)];
104
125
  break;
105
126
  }
106
127
  case "count": {
107
- const a = Array.isArray(r) ? r[0] : r;
108
- if (a <= 1)
109
- yield [50, m(e, t, 0.5, i)];
128
+ const r = Array.isArray(a) ? a[0] : a;
129
+ if (r <= 1)
130
+ yield [50, u(t, e, 0.5, i)];
110
131
  else
111
- for (let c = 0; c < a; c++) {
112
- const l = c * 100 / (a - 1);
113
- yield [l, m(e, t, l / 100, i)];
132
+ for (let n = 0; n < r; n++) {
133
+ const s = n * 100 / (r - 1);
134
+ yield [s, u(t, e, s / 100, i)];
114
135
  }
115
136
  break;
116
137
  }
117
138
  }
118
139
  }
119
- function g(s, e, t) {
120
- return t < s ? s : t > e ? e : t;
140
+ function b(l, t, e) {
141
+ return e < l ? l : e > t ? t : e;
121
142
  }
122
- function y(s, e, t) {
123
- return s + (e - s) * t;
143
+ function x(l, t, e) {
144
+ return l + (t - l) * e;
124
145
  }
125
- function P(s, e, t, i = 0) {
126
- let r = (t - s) / (e - s);
127
- if (r = g(0, 1, r), Math.abs(i) < 1e-9)
128
- return r;
129
- const a = 1 + Math.expm1(i) * r;
130
- return r = Math.log(a) / i, g(0, 1, r);
146
+ function B(l, t, e, i = 0) {
147
+ let a = (e - l) / (t - l);
148
+ if (a = b(0, 1, a), Math.abs(i) < 1e-9)
149
+ return a;
150
+ const r = 1 + Math.expm1(i) * a;
151
+ return a = Math.log(r) / i, b(0, 1, a);
131
152
  }
132
- function m(s, e, t, i = 0) {
133
- if (t = g(0, 1, t), Math.abs(i) < 1e-9)
134
- return y(s, e, t);
135
- const r = Math.expm1(i * t) / Math.expm1(i);
136
- return y(s, e, r);
153
+ function u(l, t, e, i = 0) {
154
+ if (e = b(0, 1, e), Math.abs(i) < 1e-9)
155
+ return x(l, t, e);
156
+ const a = Math.expm1(i * e) / Math.expm1(i);
157
+ return x(l, t, a);
137
158
  }
138
- $("arcgis-ticks", F);
159
+ M("arcgis-ticks", A);
139
160
  export {
140
- F as ArcgisTicks
161
+ A as ArcgisTicks
141
162
  };
@@ -0,0 +1,67 @@
1
+ /// <reference path="../../index.d.ts" />
2
+ import type { JsxNode, PublicLitElement as LitElement } from "@arcgis/lumina";
3
+ import type { MeasurementContext, RenderableToolbarContent, RenderContext } from "./types.js";
4
+ import type { ActionBar as ActionBar } from "@esri/calcite-components/components/calcite-action-bar";
5
+
6
+ /**
7
+ * Toolbar for action-based interfaces that need priority-aware collapsing.
8
+ *
9
+ * Measures the child elements then renders their content within its own shadow root.
10
+ *
11
+ * Can be used alone, or in conjunction with a toolbar-stack (ideal in cases with multiple toolbars).
12
+ *
13
+ * @internal
14
+ */
15
+ export abstract class ArcgisToolbar extends LitElement {
16
+ get barElement(): ActionBar | undefined;
17
+ /** Toolbar orientation. */
18
+ accessor layout: "horizontal" | "vertical";
19
+ /**
20
+ * Relative position is used to control how popover element placement and directional arrows
21
+ * are chosen. This is used in conjunction with the layout property.
22
+ *
23
+ * This will affect how split buttons, overflow menus, and tooltips are displayed.
24
+ *
25
+ * @default "top-left"
26
+ */
27
+ accessor relativePosition: "bottom-end" | "bottom-left" | "bottom-right" | "bottom-start" | "top-end" | "top-left" | "top-right" | "top-start";
28
+ /**
29
+ * Action scale, will be applied to all rendered actions.
30
+ *
31
+ * @default "m"
32
+ */
33
+ accessor scale: "l" | "m" | "s";
34
+ /**
35
+ * Toolbar visual treatment.
36
+ *
37
+ * @default "floating"
38
+ */
39
+ accessor toolbarKind: "docked" | "floating";
40
+ /**
41
+ * Controls whether individual actions render native tooltips or Calcite tooltips.
42
+ *
43
+ * @default "native"
44
+ */
45
+ accessor tooltipAppearance: "calcite-dark" | "calcite" | "native";
46
+ /**
47
+ * @param context
48
+ * @param budget
49
+ * @internal
50
+ */
51
+ allocate(context: RenderContext, budget: number): {
52
+ group: RenderableToolbarContent;
53
+ budget: number;
54
+ }[];
55
+ /**
56
+ * @param context
57
+ * @internal
58
+ */
59
+ measure(context: MeasurementContext): number[];
60
+ /**
61
+ * @param context
62
+ * @param budget
63
+ * @param toolbarKind
64
+ * @internal
65
+ */
66
+ proxiedRender(context: RenderContext, budget: number, toolbarKind?: "docked" | "floating"): JsxNode;
67
+ }
@@ -0,0 +1,108 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import { c as d } from "../../chunks/runtime.js";
3
+ import { ref as l } from "lit/directives/ref.js";
4
+ import { html as c } from "lit";
5
+ import { keyed as u } from "lit/directives/keyed.js";
6
+ import { LitElement as p, createEvent as g } from "@arcgis/lumina";
7
+ import { useDirection as m } from "@arcgis/lumina/controllers";
8
+ import { s as f, a as b, b as _, c as v } from "../../chunks/toolbar.js";
9
+ import { a as o } from "../../chunks/utils.js";
10
+ import { i as y } from "../../chunks/types.js";
11
+ class R extends p {
12
+ constructor() {
13
+ super(), this.#t = new ResizeObserver((t) => this._updateMeasurement(t)), this.#r = new MutationObserver(() => this._syncGroups()), this.#i = m(), this._layout = "horizontal", this._setRenderedBar = (t) => {
14
+ t == null && (this._renderedBar = void 0, this._hydratedRenderedBar = void 0), !(t === this._renderedBar || t === this._hydratedRenderedBar) && (this._renderedBar = t, this._hydratedRenderedBar = void 0, t && t.componentOnReady().then(() => {
15
+ !this.isConnected || this._renderedBar !== t || (this._hydratedRenderedBar = t);
16
+ }));
17
+ }, this._availableLength = 0, this.scale = "m", this.tooltipAppearance = "native", this.relativePosition = "top-left", this.toolbarKind = "floating", this.arcgisInternalLayoutUpdate = g(), this.listen("arcgisInternalLayoutUpdate", (t) => {
18
+ t.target !== this.el && this.requestUpdate(), this.el.parentElement?.localName !== "arcgis-toolbar-stack" && t.stopPropagation();
19
+ });
20
+ }
21
+ static {
22
+ this.properties = { _availableLength: 16, _groups: 16, _renderedBar: 16, _hydratedRenderedBar: 16, layout: 3, scale: 3, tooltipAppearance: 1, relativePosition: 1, toolbarKind: 3, barElement: 32, effectiveRelativeDirection: 16 };
23
+ }
24
+ static {
25
+ this.styles = [f, b, _, v];
26
+ }
27
+ #t;
28
+ #r;
29
+ #s;
30
+ #i;
31
+ #e;
32
+ get layout() {
33
+ return this._layout;
34
+ }
35
+ set layout(t) {
36
+ t !== this._layout && (this._layout = t, this._updateMeasurement());
37
+ }
38
+ get barElement() {
39
+ return this._hydratedRenderedBar;
40
+ }
41
+ get effectiveRelativeDirection() {
42
+ const [t, e] = this.relativePosition.split("-"), r = this.#i;
43
+ switch (e) {
44
+ case "left":
45
+ case "right":
46
+ return `${t}-${e}`;
47
+ case "end":
48
+ return `${t}-${r === "ltr" ? "right" : "left"}`;
49
+ case "start":
50
+ return `${t}-${r === "ltr" ? "left" : "right"}`;
51
+ }
52
+ }
53
+ measure(t) {
54
+ const e = this._groups;
55
+ if (!e?.length)
56
+ return [0];
57
+ const n = e.map((s) => s.measure(t)).reduce((s, i) => s.flatMap((a) => i.map((h) => a + h)), [0]).map((s) => o(e, t, s).reduce((i, { budget: a }) => i + a, 0));
58
+ return Array.from(new Set(n)).sort((s, i) => s - i);
59
+ }
60
+ allocate(t, e) {
61
+ const r = this._groups;
62
+ return r?.length ? o(r, t, e) : [];
63
+ }
64
+ proxiedRender(t, e, r = this.toolbarKind) {
65
+ if (!this._groups?.length)
66
+ return;
67
+ const s = this.allocate(t, e);
68
+ return u(this, c`<div class="toolbar-grid-wrapper"><div class="toolbar-shadow-wrapper"><calcite-action-bar expand-toggle-disabled .floating=${r === "floating"} .layout=${t.layout} overflow-mode=none .scale=${t.scale} ${l(this._setRenderedBar)}>${s.map(({ group: i, budget: a }) => i.proxiedRender(t, a))}</calcite-action-bar></div></div>`);
69
+ }
70
+ connectedCallback() {
71
+ super.connectedCallback(), this._connectMeasurement(this.#e), this.#r.observe(this.el, { childList: !0 }), this._syncGroups();
72
+ }
73
+ disconnectedCallback() {
74
+ this.#t.disconnect(), this.#r.disconnect(), super.disconnectedCallback();
75
+ }
76
+ _setRulerEl(t) {
77
+ this.#e !== t && (this.#e = t, this.isConnected && this._connectMeasurement(t));
78
+ }
79
+ _connectMeasurement(t) {
80
+ this.#t.disconnect(), t && (this.#t.observe(t), this._updateMeasurement());
81
+ }
82
+ _updateMeasurement(t) {
83
+ const e = t?.at(0)?.contentRect ?? this.#e?.getBoundingClientRect();
84
+ e && (this._availableLength = this.layout === "horizontal" ? e.width : e.height);
85
+ }
86
+ _syncGroups() {
87
+ this.#s?.abort();
88
+ const t = Array.from(this.el.children).filter(y), e = new AbortController();
89
+ this.#s = e, Promise.all(t.map((r) => r.componentOnReady())).then(() => {
90
+ !this.isConnected || e.signal.aborted || (this._groups = t, this.arcgisInternalLayoutUpdate.emit());
91
+ });
92
+ }
93
+ render() {
94
+ if (!this._groups?.length || this.el.parentElement?.localName === "arcgis-toolbar-stack")
95
+ return;
96
+ const e = {
97
+ layout: this.layout,
98
+ relativePosition: this.effectiveRelativeDirection,
99
+ scale: this.scale,
100
+ tooltipAppearance: this.tooltipAppearance
101
+ }, [{ budget: r }] = o([this], e, this._availableLength);
102
+ return c`<div class="ruler" ${l(this._setRulerEl)}></div>${this.proxiedRender(e, r)}`;
103
+ }
104
+ }
105
+ d("arcgis-toolbar", R);
106
+ export {
107
+ R as ArcgisToolbar
108
+ };
@@ -0,0 +1 @@
1
+ export * from "./customElement.js";
@@ -0,0 +1,2 @@
1
+ import "@esri/calcite-components/components/calcite-action-bar";
2
+ export * from "./customElement.js";
@@ -0,0 +1,41 @@
1
+ import type { JsxNode } from "@arcgis/lumina";
2
+
3
+ /**
4
+ * Priority values that control when toolbar content collapses as available space changes.
5
+ *
6
+ * @internal
7
+ */
8
+ export const LayoutPriorities: {
9
+ ForceCollapse: number;
10
+ Default: number;
11
+ Medium: number;
12
+ High: number;
13
+ Max: number;
14
+ NeverCollapse: number;
15
+ };
16
+
17
+ export type MeasurementContext = {
18
+ layout: "horizontal" | "vertical";
19
+ scale: "l" | "m" | "s";
20
+ };
21
+
22
+ export type RenderContext = MeasurementContext
23
+ & {
24
+ relativePosition: "bottom-left" | "bottom-right" | "top-left" | "top-right";
25
+ tooltipAppearance: "calcite-dark" | "calcite" | "native";
26
+ };
27
+
28
+ /**
29
+ * Represents a component that can be discovered and used to drive rendering
30
+ * in a toolbar.
31
+ *
32
+ * Some elements might need additional capabilities to participate; for example,
33
+ * split-button and more-button require additional rendering capabilities for child
34
+ * elements, and will filter out elements that don't conform.
35
+ */
36
+ export interface RenderableToolbarContent {
37
+ measure: (context: MeasurementContext) => number[];
38
+ proxiedRender: (context: RenderContext, budget: number) => JsxNode;
39
+ priority?: number;
40
+ componentOnReady: () => Promise<unknown>;
41
+ }
@@ -0,0 +1,97 @@
1
+ /// <reference path="../../index.d.ts" />
2
+ import type { PublicLitElement as LitElement, JsxNode } from "@arcgis/lumina";
3
+ import type { Icon } from "@esri/calcite-components/components/calcite-icon";
4
+ import type { MeasurementContext, RenderContext } from "../arcgis-toolbar/types.js";
5
+ import type { Action as Action } from "@esri/calcite-components/components/calcite-action";
6
+
7
+ /**
8
+ * A configuration for an `arcgis-toolbar` action.
9
+ *
10
+ * This is a non-rendering element; it will have no effect unless used
11
+ * correctly within an `arcgis-toolbar`.
12
+ *
13
+ * Notes:
14
+ *
15
+ * - there is no `scale` for this element; rendered scale is controlled
16
+ * exclusively by the host `arcgis-toolbar`
17
+ *
18
+ * @internal
19
+ */
20
+ export abstract class ArcgisToolbarAction extends LitElement {
21
+ get actionElement(): Action | undefined;
22
+ /**
23
+ * Whether or not this action is shown in an 'active'/selected state.
24
+ *
25
+ * @default false
26
+ */
27
+ accessor active: boolean;
28
+ /**
29
+ * Determines how the color scheme determined by `brand` is presented.
30
+ *
31
+ * @default "transparent"
32
+ */
33
+ accessor appearance: "outline" | "solid" | "transparent";
34
+ /**
35
+ * Determines if the action should be rendered in a disabled state.
36
+ *
37
+ * @default false
38
+ */
39
+ accessor disabled: boolean;
40
+ /** The icon to show in the rendered action; should not be omitted for best user experience. */
41
+ accessor icon: Icon["icon"] | undefined;
42
+ /**
43
+ * Determines if the icon will be flipped when direction is RTL.
44
+ *
45
+ * @default false
46
+ */
47
+ accessor iconFlipRtl: boolean;
48
+ /**
49
+ * Determines if the action is rendered with a "notification-style" indicator dot.
50
+ *
51
+ * @default false
52
+ */
53
+ accessor indicator: boolean;
54
+ /** Determines the color scheme for the action. */
55
+ accessor kind: "brand" | "danger" | "info" | "success" | "warning" | undefined;
56
+ /**
57
+ * Text to show in the primary label field; do not depend on this ever being visible to the user.
58
+ * It is only shown if textEnabled is true.
59
+ *
60
+ * @default ""
61
+ */
62
+ accessor labelText: string;
63
+ /**
64
+ * Determines if the action is rendered with a loading spinner.
65
+ *
66
+ * @default false
67
+ */
68
+ accessor loading: boolean;
69
+ /**
70
+ * Determines if the action is rendered with text visible.
71
+ *
72
+ * @default false
73
+ */
74
+ accessor textEnabled: boolean;
75
+ /**
76
+ * Text to show in the tooltip for the action.
77
+ *
78
+ * @default ""
79
+ */
80
+ accessor tooltipText: string;
81
+ /**
82
+ * @param parameter0
83
+ * @internal
84
+ */
85
+ measure(parameter0: MeasurementContext): number[];
86
+ /**
87
+ * @param context
88
+ * @internal
89
+ */
90
+ proxiedRender(context: RenderContext): JsxNode;
91
+ readonly arcgisRenderedActionChanged: import("@arcgis/lumina").TargetedEvent<this, { element?: Action; }>;
92
+ readonly arcgisToolbarItemSelected: import("@arcgis/lumina").TargetedEvent<this, { element?: Action; }>;
93
+ readonly "@eventTypes": {
94
+ arcgisRenderedActionChanged: ArcgisToolbarAction["arcgisRenderedActionChanged"]["detail"];
95
+ arcgisToolbarItemSelected: ArcgisToolbarAction["arcgisToolbarItemSelected"]["detail"];
96
+ };
97
+ }
@@ -0,0 +1,52 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import { c as p } from "../../chunks/runtime.js";
3
+ import { ref as u } from "lit/directives/ref.js";
4
+ import { css as g, html as o } from "lit";
5
+ import { keyed as f } from "lit/directives/keyed.js";
6
+ import { LitElement as b, createEvent as l, nothing as s, safeClassMap as _ } from "@arcgis/lumina";
7
+ import { W as r } from "../../chunks/utils.js";
8
+ import { g as $ } from "../../chunks/utils2.js";
9
+ const v = g`:host([text-enabled][data-layout="vertical"]){.interaction-container>button{flex-direction:column;>.text-container{writing-mode:vertical-lr}}}`;
10
+ class x extends b {
11
+ constructor() {
12
+ super(...arguments), this.#e = (t) => {
13
+ t !== this._element && (this.#t?.disconnect(), this._element = t, this._hydratedElement = void 0, this.isConnected && this.arcgisRenderedActionChanged.emit({ element: t }), t && (this._measureAction(), this.#t ??= new ResizeObserver((e) => {
14
+ !this.textEnabled || !this._element || this._measureAction(e);
15
+ }), this.#t.observe(t), t.componentOnReady().then(() => {
16
+ !this.isConnected || this._element !== t || (this._hydratedElement = t, t.shadowRoot?.adoptedStyleSheets.push(v.styleSheet));
17
+ })));
18
+ }, this._measuredWidth = 0, this._measuredHeight = 0, this.active = !1, this.tooltipText = "", this.labelText = "", this.disabled = !1, this.loading = !1, this.indicator = !1, this.textEnabled = !1, this.appearance = "transparent", this.iconFlipRtl = !1, this.arcgisRenderedActionChanged = l(), this.arcgisToolbarItemSelected = l();
19
+ }
20
+ static {
21
+ this.properties = { _element: 16, _hydratedElement: 16, _measuredWidth: 16, _measuredHeight: 16, icon: 1, active: 7, tooltipText: 1, labelText: 1, disabled: 5, loading: 5, indicator: 5, textEnabled: 5, kind: 3, appearance: 3, iconFlipRtl: 5, actionElement: 32 };
22
+ }
23
+ #t;
24
+ #e;
25
+ get actionElement() {
26
+ return this._element;
27
+ }
28
+ measure({ layout: t, scale: e }) {
29
+ const a = r.actionPadding[e], i = r.action[e], n = t === "horizontal" ? this._measuredWidth : this._measuredHeight;
30
+ return [Math.max(i, n) + a];
31
+ }
32
+ proxiedRender(t) {
33
+ const { tooltipAppearance: e, scale: a } = t, i = this.tooltipText || this.labelText, n = this._hydratedElement, c = e !== "native" && !!i && n, d = e === "calcite-dark" ? "calcite-mode-dark" : void 0, h = $(t);
34
+ return o`${f(this, o`<calcite-action .active=${this.active} data-appearance=${this.appearance ?? s} data-kind=${this.kind ?? s} data-layout=${t.layout ?? s} .disabled=${this.disabled} .icon=${this.icon} .iconFlipRtl=${this.iconFlipRtl} .indicator=${this.indicator} .label=${i} .loading=${this.loading} @click=${(m) => this._handleActionClick(m)} .scale=${a} .text=${this.labelText} .textEnabled=${this.textEnabled} title=${(e === "native" ? i : void 0) ?? s} ${u(this.#e)}></calcite-action>`)}${c ? o`<calcite-tooltip class=${_(d)} overlay-positioning=fixed .placement=${h} .referenceElement=${n} .scale=${a}><span>${i}</span></calcite-tooltip>` : void 0}`;
35
+ }
36
+ disconnectedCallback() {
37
+ this.#t?.disconnect(), super.disconnectedCallback();
38
+ }
39
+ _handleActionClick(t) {
40
+ this.arcgisToolbarItemSelected?.emit({
41
+ element: t.currentTarget
42
+ });
43
+ }
44
+ _measureAction(t) {
45
+ const e = t?.at(0)?.contentRect ?? this._element?.getBoundingClientRect();
46
+ e && (this._measuredWidth = Math.round(e.width), this._measuredHeight = Math.round(e.height));
47
+ }
48
+ }
49
+ p("arcgis-toolbar-action", x);
50
+ export {
51
+ x as ArcgisToolbarAction
52
+ };
@@ -0,0 +1 @@
1
+ export * from "./customElement.js";
@@ -0,0 +1,3 @@
1
+ import "@esri/calcite-components/components/calcite-action";
2
+ import "@esri/calcite-components/components/calcite-tooltip";
3
+ export * from "./customElement.js";