@arcgis/common-components 5.1.0-next.2 → 5.1.0-next.21

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 (53) hide show
  1. package/README.md +24 -1
  2. package/dist/cdn/23DDMSOB.js +2 -0
  3. package/dist/cdn/3O7GAC23.js +2 -0
  4. package/dist/cdn/4CW7U27R.js +2 -0
  5. package/dist/cdn/4DCAUWTC.js +2 -0
  6. package/dist/cdn/EKKJN7WZ.js +2 -0
  7. package/dist/cdn/GAR4QMLU.js +2 -0
  8. package/dist/cdn/JTRO7GRS.js +2 -0
  9. package/dist/cdn/ZLXAKPUH.js +2 -0
  10. package/dist/cdn/index.js +1 -1
  11. package/dist/chunks/commonFunctions.js +3 -13
  12. package/dist/components/arcgis-ckeditor5/customElement.d.ts +1 -0
  13. package/dist/components/arcgis-ckeditor5/types.d.ts +9 -0
  14. package/dist/components/arcgis-ckeditor5-popover/customElement.d.ts +1 -0
  15. package/dist/components/arcgis-color-input/customElement.d.ts +1 -0
  16. package/dist/components/arcgis-field-info/customElement.d.ts +1 -0
  17. package/dist/components/arcgis-field-info/customElement.js +10 -10
  18. package/dist/components/arcgis-field-info/utils/basic.d.ts +1 -0
  19. package/dist/components/arcgis-field-pick-list/customElement.d.ts +1 -0
  20. package/dist/components/arcgis-field-pick-list/utils/types.d.ts +5 -1
  21. package/dist/components/arcgis-histogram/customElement.d.ts +46 -28
  22. package/dist/components/arcgis-label-input/customElement.d.ts +5 -4
  23. package/dist/components/arcgis-picker-input/customElement.d.ts +1 -0
  24. package/dist/components/arcgis-ramp-color/customElement.d.ts +2 -0
  25. package/dist/components/arcgis-ramp-color-break/customElement.d.ts +2 -0
  26. package/dist/components/arcgis-ramp-opacity/customElement.d.ts +1 -0
  27. package/dist/components/arcgis-slider/customElement.d.ts +269 -73
  28. package/dist/components/arcgis-slider/customElement.js +318 -289
  29. package/dist/components/arcgis-slider-input/customElement.d.ts +1 -0
  30. package/dist/components/arcgis-ticks/customElement.d.ts +101 -13
  31. package/dist/components/arcgis-ticks/customElement.js +27 -27
  32. package/dist/components/arcgis-ticks/types.d.ts +23 -0
  33. package/dist/components/arcgis-unique-values-list/customElement.d.ts +8 -1
  34. package/dist/components/arcgis-unique-values-list/customElement.js +155 -149
  35. package/dist/components/arcgis-unique-values-list/utils/basic.d.ts +1 -0
  36. package/dist/docs/api.json +1 -1
  37. package/dist/docs/docs.json +1 -1
  38. package/dist/docs/vscode.html-custom-data.json +1 -1
  39. package/dist/docs/web-types.json +1 -1
  40. package/dist/loader.js +2 -2
  41. package/dist/types/lumina.d.ts +2 -2
  42. package/dist/types/preact.d.ts +2 -2
  43. package/dist/types/react.d.ts +2 -2
  44. package/dist/types/stencil.d.ts +2 -2
  45. package/dist/utils/types.d.ts +24 -7
  46. package/package.json +3 -3
  47. package/dist/cdn/6MGBOM6S.js +0 -2
  48. package/dist/cdn/6NYYZIHB.js +0 -2
  49. package/dist/cdn/BAVGT3I5.js +0 -2
  50. package/dist/cdn/GQLKGVRX.js +0 -2
  51. package/dist/cdn/P45VPBNI.js +0 -2
  52. package/dist/cdn/S7T3XQPB.js +0 -2
  53. package/dist/cdn/ZP76EPVI.js +0 -2
@@ -1,6 +1,7 @@
1
1
  /// <reference path="../../index.d.ts" />
2
2
  import type { PublicLitElement as LitElement } from "@arcgis/lumina";
3
3
 
4
+ /** @internal */
4
5
  export abstract class ArcgisSliderInput extends LitElement {
5
6
  /**
6
7
  * If true, prevents interaction with the component.
@@ -1,17 +1,44 @@
1
1
  /// <reference path="../../index.d.ts" />
2
2
  /// <reference types="@arcgis/core/interfaces.d.ts" />
3
3
  import type { PublicLitElement as LitElement } from "@arcgis/lumina";
4
+ import type { Layout, TickMode, TickValues } from "./types.js";
4
5
 
5
6
  /**
7
+ * The ticks component displays visual markers along a line to indicate scale, intervals, or specific values. It is often used in conjunction with the
8
+ * [Slider component](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/). Ticks help users understand the
9
+ * slider’s range and make more precise selections.
10
+ *
11
+ * Tick placement is controlled by the [mode](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-ticks/#mode), which defines how the [values](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-ticks/#values) are parsed and translated into positions along the
12
+ * line. Tick positions are derived from the component’s [min](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-ticks/#min) and [max](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-ticks/#max) range, with optional none-linear scaling via
13
+ * [interpolationExponent](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-ticks/#interpolationExponent). Ticks can be displayed in vertical or horizontal [layout](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-ticks/#layout), with optional [showLabels](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-ticks/#showLabels) and a [showBaseline](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-ticks/#showBaseline).
14
+ * The component can also be made [interactive](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-ticks/#interactive) to respond to user clicks on individual ticks. The [labelFormatter](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-ticks/#labelFormatter) property allows customization of tick label formatting.
15
+ *
6
16
  * @cssproperty [--arcgis-ticks-tick-length] - Specifies the length of the ticks.
7
17
  * @cssproperty [--arcgis-ticks-tick-color] - Specifies the color of the ticks.
8
18
  * @cssproperty [--arcgis-ticks-gap] - Specifies the gap between the ticks and labels.
19
+ * @since 5.0
20
+ * @example
21
+ * The following example creates a vertical slider with vertical ticks displayed at every 10 units from 0 to 100.
22
+ * The ticks are labeled and positioned on the end side of the slider.
23
+ * ```html
24
+ * <arcgis-slider id="sliderComponent" min="0" max="100" show-range-labels values="50" layout="vertical">
25
+ * <arcgis-ticks slot="content-end" style="flex:1;"
26
+ * min="0" max="100"
27
+ * mode="value"
28
+ * show-labels
29
+ * label-placement="end"
30
+ * values="0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100"
31
+ * layout="vertical">
32
+ * </arcgis-ticks>
33
+ * </arcgis-slider>
34
+ * ```
9
35
  */
10
36
  export abstract class ArcgisTicks extends LitElement {
11
37
  /**
12
- * When `true`, the component will allow clicking on ticks.
38
+ * When `true`, ticks are clickable and the component emits [@arcgisTickClick](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-ticks/#event-arcgisTickClick) when the user selects a tick.
13
39
  *
14
40
  * @default false
41
+ * @see [@arcgisTickClick](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-ticks/#event-arcgisTickClick)
15
42
  */
16
43
  accessor interactive: boolean;
17
44
  /**
@@ -27,16 +54,28 @@ export abstract class ArcgisTicks extends LitElement {
27
54
  * @default 0
28
55
  */
29
56
  accessor interpolationExponent: number;
30
- /** A function used to format each tick's label. */
57
+ /**
58
+ * Allows customizing how tick labels are formatted based on their numeric value.
59
+ *
60
+ * @example
61
+ * The following example formats tick labels as percentages.
62
+ * ```js
63
+ * const ticks = document.querySelector("arcgis-ticks");
64
+ * ticks.labelFormatter = (value, defaultFormatter) => {
65
+ * return value + "%";
66
+ * };
67
+ * ```
68
+ */
31
69
  accessor labelFormatter: ((value: number, defaultFormatter: (value: number) => string) => nullish | string) | undefined;
32
70
  /**
33
71
  * Determines whether the labels are placed before or after the ticks.
34
72
  *
35
- * @default "trailing"
73
+ * @default "end"
36
74
  */
37
- accessor labelPlacement: "leading" | "trailing";
75
+ accessor labelPlacement: "end" | "start";
38
76
  /**
39
- * Determines the layout/orientation of the component.
77
+ * Determines the layout/orientation of the ticks component. By default, the ticks will render horizontally.
78
+ * When set to `vertical`, the ticks will render vertically.
40
79
  *
41
80
  * @default "horizontal"
42
81
  */
@@ -66,6 +105,49 @@ export abstract class ArcgisTicks extends LitElement {
66
105
  * - `value`: Indicates that ticks will only be placed at the values specified in the property.
67
106
  *
68
107
  * @default "count"
108
+ * @example
109
+ * ```html
110
+ * <!-- Place ticks at each value listed in `values` -->
111
+ * <arcgis-slider min="0" max="100" show-range-labels values="20, 50">
112
+ * <arcgis-ticks
113
+ * slot="content-end" style="flex:1;"
114
+ * min="0" max="100"
115
+ * show-labels label-placement="end"
116
+ * mode="value"
117
+ * values="0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100">
118
+ * </arcgis-ticks>
119
+ * </arcgis-slider>
120
+ * ```
121
+ * @example
122
+ * In count mode, values is the number of ticks to render (not a list of tick values).
123
+ * For example, use `11` ticks to show 0–100 in steps of 10 (0, 10, 20, ..., 100).
124
+ * ```html
125
+ * <!-- 11 ticks from 0 to 100 -->
126
+ * <arcgis-slider min="0" max="100" show-range-labels values="20, 50">
127
+ * <arcgis-ticks
128
+ * slot="content-end" style="flex:1;"
129
+ * min="0" max="100"
130
+ * show-labels label-placement="end"
131
+ * mode="count"
132
+ * values="11">
133
+ * </arcgis-ticks>
134
+ * </arcgis-slider>
135
+ * ```
136
+ * @example
137
+ * In percent mode, values are percentages along the track.
138
+ * Use an array to place ticks at specific percentages, or a single number as a repeating interval.
139
+ * ```html
140
+ * <!-- Ticks at 0%, 25%, 50%, 75%, and 100% -->
141
+ * <arcgis-slider min="0" max="200" show-range-labels values="50, 150">
142
+ * <arcgis-ticks
143
+ * slot="content-end" style="flex:1;"
144
+ * min="0" max="200"
145
+ * show-labels label-placement="end"
146
+ * mode="percent"
147
+ * values="0, 25, 50, 75, 100">
148
+ * </arcgis-ticks>
149
+ * </arcgis-slider>
150
+ * ```
69
151
  * @see [values](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-ticks/#values)
70
152
  */
71
153
  accessor mode: TickMode;
@@ -88,15 +170,21 @@ export abstract class ArcgisTicks extends LitElement {
88
170
  * @see [mode](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-ticks/#mode)
89
171
  */
90
172
  accessor values: TickValues;
91
- /** Fires when the user clicks on one of the ticks. */
173
+ /**
174
+ * Fires when the user clicks on one of the ticks. This event is only emitted when the [interactive](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-ticks/#interactive) property is set to `true`.
175
+ *
176
+ * @see [interactive](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-ticks/#interactive)
177
+ * @example
178
+ * The following example listens for the `arcgisTickClick` event and logs the clicked tick's value.
179
+ * ```js
180
+ * const ticks = document.querySelector("arcgis-ticks");
181
+ * ticks.addEventListener("arcgisTickClick", (event) => {
182
+ * console.log("Clicked tick value:", event.detail.value);
183
+ * });
184
+ * ```
185
+ */
92
186
  readonly arcgisTickClick: import("@arcgis/lumina").TargetedEvent<this, { value: number; }>;
93
187
  readonly "@eventTypes": {
94
188
  arcgisTickClick: ArcgisTicks["arcgisTickClick"]["detail"];
95
189
  };
96
- }
97
-
98
- export type Layout = "horizontal" | "vertical";
99
-
100
- export type TickMode = "count" | "percent" | "value";
101
-
102
- export type TickValues = number[] | number;
190
+ }
@@ -3,7 +3,7 @@ import { c as $ } from "../../chunks/runtime.js";
3
3
  import { css as M, html as c } from "lit";
4
4
  import { LitElement as _, createEvent as C, safeClassMap as h, safeStyleMap as u, nothing as v } from "@arcgis/lumina";
5
5
  import { formatNumber as z } from "@arcgis/core/intl.js";
6
- const s = {
6
+ const n = {
7
7
  container: "container",
8
8
  ticksContainer: "ticks-container",
9
9
  labelsContainer: "labels-container",
@@ -12,7 +12,7 @@ const s = {
12
12
  tickMax: "tick--max",
13
13
  tickLabel: "tick-label",
14
14
  baseline: "baseline"
15
- }, A = M`:host{display:flex;--arcgis-ticks-tick-length: .5rem;--arcgis-ticks-tick-color: var(--calcite-color-border-input);--arcgis-ticks-gap: 1em;--arcgis-ticks-font-size: var(--calcite-font-size--2)}.container{align-items:stretch;display:flex;color:var(--calcite-color-text-2);flex:1;font-weight:var(--calcite-font-weight-medium);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"))}:host([layout="horizontal"]){.ticks-container{height:var(--arcgis-ticks-tick-length)}.labels-container{height:var(--labels-container-height, "auto")}.tick{width:.125rem;height:var(--arcgis-ticks-tick-length);transform:translate(-50%)}.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:.125rem;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="leading"]){.container{flex-direction:column;justify-content:flex-end}.labels-container{margin-bottom:var(--arcgis-ticks-gap)}}:host([layout="horizontal"][label-placement="trailing"]){.container{flex-direction:column-reverse;justify-content:flex-end}.labels-container{margin-top:var(--arcgis-ticks-gap)}}:host([layout="vertical"][label-placement="leading"]){.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="trailing"]){.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}}`;
15
+ }, A = M`:host{display:flex;--arcgis-ticks-tick-length: .5rem;--arcgis-ticks-tick-color: var(--calcite-color-border-input);--arcgis-ticks-gap: 1em;--arcgis-ticks-font-size: var(--calcite-font-size--2)}.container{align-items:stretch;display:flex;color:var(--calcite-color-text-2);flex:1;font-weight:var(--calcite-font-weight-medium);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"))}:host([layout="horizontal"]){.ticks-container{height:var(--arcgis-ticks-tick-length)}.labels-container{height:var(--labels-container-height, "auto")}.tick{width:.125rem;height:var(--arcgis-ticks-tick-length);transform:translate(-50%)}.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:.125rem;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
16
  class F extends _ {
17
17
  constructor() {
18
18
  super(...arguments), this._formatValue = (e) => z(e, this._formatOptions), this._formatOptions = {
@@ -20,7 +20,7 @@ class F extends _ {
20
20
  useGrouping: !0,
21
21
  minimumFractionDigits: 0,
22
22
  maximumFractionDigits: 2
23
- }, this.interactive = !1, this.interpolationExponent = 0, this.labelPlacement = "trailing", 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 });
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 });
24
24
  }
25
25
  static {
26
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: {
@@ -38,10 +38,10 @@ class F extends _ {
38
38
  this.styles = A;
39
39
  }
40
40
  updated() {
41
- const e = this.renderRoot.querySelector(`.${s.labelsContainer}`);
41
+ const e = this.renderRoot.querySelector(`.${n.labelsContainer}`);
42
42
  if (e) {
43
43
  let t = 0, i = 0;
44
- for (const r of this.renderRoot.querySelectorAll(`.${s.tickLabel}`)) {
44
+ for (const r of this.renderRoot.querySelectorAll(`.${n.tickLabel}`)) {
45
45
  const a = r.getBoundingClientRect();
46
46
  t = Math.max(t, a.width), i = Math.max(i, a.height);
47
47
  }
@@ -62,30 +62,30 @@ class F extends _ {
62
62
  return i ?? this._formatValue(e);
63
63
  }
64
64
  render() {
65
- return c`<div class=${h(s.container)} touch-action=none @click=${this._handleClick}>${this._renderContent()}${this._renderBaseline()}</div>`;
65
+ return c`<div class=${h(n.container)} touch-action=none @click=${this._handleClick}>${this._renderContent()}${this._renderBaseline()}</div>`;
66
66
  }
67
67
  _renderContent() {
68
- const { interpolationExponent: e, max: t, min: i, mode: r, values: a, layout: o, mirrored: l, showLabels: x } = this, k = [], b = [];
68
+ const { interpolationExponent: e, max: t, min: i, mode: r, values: a, layout: o, mirrored: l, showLabels: x } = this, g = [], b = [];
69
69
  for (const [f, d] of L(r, i, t, e, a)) {
70
70
  const p = { [o === "horizontal" ? l ? "right" : "left" : l ? "top" : "bottom"]: `${f}%` }, w = {
71
- [s.tick]: !0,
72
- [s.tickMin]: f === 0,
73
- [s.tickMax]: f === 100
71
+ [n.tick]: !0,
72
+ [n.tickMin]: f === 0,
73
+ [n.tickMax]: f === 100
74
74
  };
75
- k.push(c`<div class=${h(w)} style=${u(p)} data-value=${d ?? v}></div>`), x && b.push(c`<div class=${h(s.tickLabel)} style=${u(p)} data-value=${d ?? v}>${this._internalLabelFormatter(d)}</div>`);
75
+ g.push(c`<div class=${h(w)} style=${u(p)} data-value=${d ?? v}></div>`), x && b.push(c`<div class=${h(n.tickLabel)} style=${u(p)} data-value=${d ?? v}>${this._internalLabelFormatter(d)}</div>`);
76
76
  }
77
- return [c`<div class=${h(s.labelsContainer)}>${b}</div>`, c`<div class=${h(s.ticksContainer)}>${k}</div>`];
77
+ return [c`<div class=${h(n.labelsContainer)}>${b}</div>`, c`<div class=${h(n.ticksContainer)}>${g}</div>`];
78
78
  }
79
79
  _renderBaseline() {
80
80
  const { showBaseline: e, layout: t } = this;
81
- return e && c`<div class=${h(s.baseline)} style=${u({
81
+ return e && c`<div class=${h(n.baseline)} style=${u({
82
82
  [t === "horizontal" ? "width" : "height"]: "100%",
83
83
  [t === "horizontal" ? "height" : "width"]: "0.125rem"
84
84
  })}></div>` || "";
85
85
  }
86
86
  }
87
- function* L(n, e, t, i, r) {
88
- switch (n) {
87
+ function* L(s, e, t, i, r) {
88
+ switch (s) {
89
89
  case "value": {
90
90
  const a = Array.isArray(r) ? r : [r];
91
91
  for (const o of a) {
@@ -116,24 +116,24 @@ function* L(n, e, t, i, r) {
116
116
  }
117
117
  }
118
118
  }
119
- function g(n, e, t) {
120
- return t < n ? n : t > e ? e : t;
119
+ function k(s, e, t) {
120
+ return t < s ? s : t > e ? e : t;
121
121
  }
122
- function y(n, e, t) {
123
- return n + (e - n) * t;
122
+ function y(s, e, t) {
123
+ return s + (e - s) * t;
124
124
  }
125
- function P(n, e, t, i = 0) {
126
- let r = (t - n) / (e - n);
127
- if (r = g(0, 1, r), Math.abs(i) < 1e-9)
125
+ function P(s, e, t, i = 0) {
126
+ let r = (t - s) / (e - s);
127
+ if (r = k(0, 1, r), Math.abs(i) < 1e-9)
128
128
  return r;
129
129
  const a = 1 + Math.expm1(i) * r;
130
- return r = Math.log(a) / i, g(0, 1, r);
130
+ return r = Math.log(a) / i, k(0, 1, r);
131
131
  }
132
- function m(n, e, t, i = 0) {
133
- if (t = g(0, 1, t), Math.abs(i) < 1e-9)
134
- return y(n, e, t);
132
+ function m(s, e, t, i = 0) {
133
+ if (t = k(0, 1, t), Math.abs(i) < 1e-9)
134
+ return y(s, e, t);
135
135
  const r = Math.expm1(i * t) / Math.expm1(i);
136
- return y(n, e, r);
136
+ return y(s, e, r);
137
137
  }
138
138
  $("arcgis-ticks", F);
139
139
  export {
@@ -0,0 +1,23 @@
1
+ /**
2
+ * The layout of the [arcgis-ticks](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-ticks/) component, which determines the orientation of the ticks.
3
+ *
4
+ * @since 5.0
5
+ */
6
+ export type Layout = "horizontal" | "vertical";
7
+
8
+ /**
9
+ * The mode of positioning ticks along the [arcgis-ticks](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-ticks/) component. It drives how [arcgis-ticks.values](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-ticks/#values) is interpreted.
10
+ * - `count`: Places a fixed number of ticks (provided in the [arcgis-ticks.values](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-ticks/#values) property) at equal distances from each other.
11
+ * - `percent`: [arcgis-ticks.values](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-ticks/#values) is interpreted as percentage. If [arcgis-ticks.values](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-ticks/#values) is a number, it indicates the interval between ticks. If it is an array, it indicates the percentage values at which to place the ticks.
12
+ * - `value`: Indicates that ticks will only be placed at the values specified in the property.
13
+ *
14
+ * @since 5.0
15
+ */
16
+ export type TickMode = "count" | "percent" | "value";
17
+
18
+ /**
19
+ * Indicates where ticks will be rendered along the [arcgis-ticks](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-ticks/) component.
20
+ *
21
+ * @since 5.0
22
+ */
23
+ export type TickValues = number[] | number;
@@ -2,9 +2,14 @@
2
2
  /// <reference types="@arcgis/core/interfaces.d.ts" />
3
3
  import type { PublicLitElement as LitElement } from "@arcgis/lumina";
4
4
  import type { SupportedLayer } from "./utils/basic.js";
5
+ import type { FieldSource } from "../../utils/types.js";
5
6
  import type { T9nMeta } from "@arcgis/lumina/controllers";
6
7
 
7
- /** Displays a list of unique values taking into account field type formatting and field domains. */
8
+ /**
9
+ * Displays a list of unique values taking into account field type formatting and field domains.
10
+ *
11
+ * @internal
12
+ */
8
13
  export abstract class ArcgisUniqueValuesList extends LitElement {
9
14
  /** @internal */
10
15
  protected _messages: {
@@ -28,6 +33,8 @@ export abstract class ArcgisUniqueValuesList extends LitElement {
28
33
  }>;
29
34
  /** Field name, required if uniqueValues is not provided, if component needs to format values, or needs to check for field domains. */
30
35
  accessor fieldName: string | undefined;
36
+ /** Optional, specify field source other than the layer's fields. */
37
+ accessor fieldSource: FieldSource | undefined;
31
38
  /** Layer instance, required if uniqueValues is not provided, if component needs to format values, or needs to check for field domains. */
32
39
  accessor layer: SupportedLayer | undefined;
33
40
  /** Optional, max height of list in pixel. */