@esri/calcite-components 1.0.0-next.421 → 1.0.0-next.424

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 (56) hide show
  1. package/dist/calcite/calcite.esm.js +1 -1
  2. package/dist/calcite/calcite.js +1 -1
  3. package/dist/calcite/p-0ba91238.system.entry.js +5 -0
  4. package/dist/calcite/{p-afe59546.entry.js → p-2139226c.entry.js} +1 -1
  5. package/dist/calcite/p-2692ac43.entry.js +5 -0
  6. package/dist/calcite/p-58392046.system.entry.js +5 -0
  7. package/dist/calcite/p-62afcb36.system.js +5 -0
  8. package/dist/calcite/p-69d5736f.entry.js +5 -0
  9. package/dist/calcite/p-7fb5fec5.entry.js +5 -0
  10. package/dist/calcite/p-958600ba.system.entry.js +5 -0
  11. package/dist/calcite/{p-9ad8c7c5.system.entry.js → p-fe3f4e0e.system.entry.js} +1 -1
  12. package/dist/cjs/calcite-date-picker_4.cjs.entry.js +27 -19
  13. package/dist/cjs/calcite-graph_2.cjs.entry.js +67 -38
  14. package/dist/cjs/calcite-input-date-picker.cjs.entry.js +10 -5
  15. package/dist/cjs/calcite-input-time-picker_2.cjs.entry.js +6 -1
  16. package/dist/cjs/calcite.cjs.js +2 -2
  17. package/dist/cjs/loader.cjs.js +2 -2
  18. package/dist/collection/collection-manifest.json +1 -1
  19. package/dist/collection/components/date-picker-month-header/date-picker-month-header.js +27 -19
  20. package/dist/collection/components/input-date-picker/input-date-picker.css +5 -0
  21. package/dist/collection/components/input-date-picker/input-date-picker.js +35 -4
  22. package/dist/collection/components/input-time-picker/input-time-picker.js +32 -1
  23. package/dist/collection/components/slider/slider.js +76 -41
  24. package/dist/components/calcite-input-date-picker.js +12 -6
  25. package/dist/components/calcite-input-time-picker.js +7 -1
  26. package/dist/components/calcite-slider.js +67 -38
  27. package/dist/components/date-picker-month-header.js +27 -19
  28. package/dist/custom-elements/index.js +112 -65
  29. package/dist/esm/calcite-date-picker_4.entry.js +27 -19
  30. package/dist/esm/calcite-graph_2.entry.js +67 -38
  31. package/dist/esm/calcite-input-date-picker.entry.js +11 -6
  32. package/dist/esm/calcite-input-time-picker_2.entry.js +6 -1
  33. package/dist/esm/calcite.js +2 -2
  34. package/dist/esm/loader.js +2 -2
  35. package/dist/esm-es5/calcite-date-picker_4.entry.js +1 -1
  36. package/dist/esm-es5/calcite-graph_2.entry.js +1 -1
  37. package/dist/esm-es5/calcite-input-date-picker.entry.js +1 -1
  38. package/dist/esm-es5/calcite-input-time-picker_2.entry.js +1 -1
  39. package/dist/esm-es5/calcite.js +1 -1
  40. package/dist/esm-es5/loader.js +1 -1
  41. package/dist/extras/docs-json.json +94 -4
  42. package/dist/types/components/date-picker-month-header/date-picker-month-header.d.ts +3 -1
  43. package/dist/types/components/input-date-picker/input-date-picker.d.ts +6 -1
  44. package/dist/types/components/input-time-picker/input-time-picker.d.ts +6 -0
  45. package/dist/types/components/slider/slider.d.ts +5 -2
  46. package/dist/types/components.d.ts +22 -2
  47. package/hydrate/index.js +115 -66
  48. package/package.json +14 -14
  49. package/readme.md +2 -2
  50. package/dist/calcite/p-872e82a6.system.entry.js +0 -5
  51. package/dist/calcite/p-a3527241.system.entry.js +0 -5
  52. package/dist/calcite/p-a38fe099.entry.js +0 -5
  53. package/dist/calcite/p-c4cb35ba.system.entry.js +0 -5
  54. package/dist/calcite/p-cb847074.entry.js +0 -5
  55. package/dist/calcite/p-e22ab8fa.entry.js +0 -5
  56. package/dist/calcite/p-fe9380a0.system.js +0 -5
@@ -39,6 +39,11 @@ export class InputDatePicker {
39
39
  this.locale = document.documentElement.lang || "en";
40
40
  /** specify the scale of the date picker */
41
41
  this.scale = "m";
42
+ /**
43
+ * Determines where the date-picker component will be positioned relative to the input.
44
+ * @default "bottom-leading"
45
+ */
46
+ this.placement = defaultMenuPlacement;
42
47
  /** Range mode activation */
43
48
  this.range = false;
44
49
  /**
@@ -191,13 +196,13 @@ export class InputDatePicker {
191
196
  }
192
197
  /** Updates the position of the component. */
193
198
  async reposition() {
194
- const { popper, menuEl } = this;
199
+ const { placement, popper, menuEl } = this;
195
200
  const modifiers = this.getModifiers();
196
201
  popper
197
202
  ? await updatePopper({
198
203
  el: menuEl,
199
204
  modifiers,
200
- placement: defaultMenuPlacement,
205
+ placement,
201
206
  popper
202
207
  })
203
208
  : this.createPopper();
@@ -314,7 +319,7 @@ export class InputDatePicker {
314
319
  }
315
320
  createPopper() {
316
321
  this.destroyPopper();
317
- const { menuEl, referenceEl, overlayPositioning } = this;
322
+ const { menuEl, placement, referenceEl, overlayPositioning } = this;
318
323
  if (!menuEl || !referenceEl) {
319
324
  return;
320
325
  }
@@ -323,7 +328,7 @@ export class InputDatePicker {
323
328
  el: menuEl,
324
329
  modifiers,
325
330
  overlayPositioning,
326
- placement: defaultMenuPlacement,
331
+ placement,
327
332
  referenceEl
328
333
  });
329
334
  }
@@ -818,6 +823,32 @@ export class InputDatePicker {
818
823
  "reflect": true,
819
824
  "defaultValue": "\"m\""
820
825
  },
826
+ "placement": {
827
+ "type": "string",
828
+ "mutable": false,
829
+ "complexType": {
830
+ "original": "MenuPlacement",
831
+ "resolved": "\"bottom\" | \"bottom-end\" | \"bottom-leading\" | \"bottom-start\" | \"bottom-trailing\" | \"top\" | \"top-end\" | \"top-leading\" | \"top-start\" | \"top-trailing\"",
832
+ "references": {
833
+ "MenuPlacement": {
834
+ "location": "import",
835
+ "path": "../../utils/popper"
836
+ }
837
+ }
838
+ },
839
+ "required": false,
840
+ "optional": false,
841
+ "docs": {
842
+ "tags": [{
843
+ "name": "default",
844
+ "text": "\"bottom-leading\""
845
+ }],
846
+ "text": "Determines where the date-picker component will be positioned relative to the input."
847
+ },
848
+ "attribute": "placement",
849
+ "reflect": true,
850
+ "defaultValue": "defaultMenuPlacement"
851
+ },
821
852
  "range": {
822
853
  "type": "boolean",
823
854
  "mutable": false,
@@ -32,6 +32,11 @@ export class InputTimePicker {
32
32
  this.required = false;
33
33
  /** The scale (size) of the time input */
34
34
  this.scale = "m";
35
+ /**
36
+ * Determines where the popover will be positioned relative to the input.
37
+ * @see [PopperPlacement](https://github.com/Esri/calcite-components/blob/master/src/utils/popper.ts#L25)
38
+ */
39
+ this.placement = "auto";
35
40
  /** number (seconds) that specifies the granularity that the value must adhere to */
36
41
  this.step = 60;
37
42
  /** The selected time in UTC (always 24-hour format) */
@@ -208,7 +213,7 @@ export class InputTimePicker {
208
213
  return (h(Host, null,
209
214
  h("div", { "aria-controls": popoverId, "aria-haspopup": "dialog", "aria-label": this.name, "aria-owns": popoverId, id: this.referenceElementId, role: "combobox" },
210
215
  h("calcite-input", { disabled: this.disabled, icon: "clock", label: getLabelText(this), onCalciteInputBlur: this.calciteInputBlurHandler, onCalciteInputFocus: this.calciteInputFocusHandler, onCalciteInputInput: this.calciteInputInputHandler, ref: this.setCalciteInputEl, scale: this.scale, step: this.step })),
211
- h("calcite-popover", { id: popoverId, label: "Time Picker", open: this.active, referenceElement: this.referenceElementId },
216
+ h("calcite-popover", { id: popoverId, label: "Time Picker", open: this.active, placement: this.placement, referenceElement: this.referenceElementId },
212
217
  h("calcite-time-picker", { intlHour: this.intlHour, intlHourDown: this.intlHourDown, intlHourUp: this.intlHourUp, intlMeridiem: this.intlMeridiem, intlMeridiemDown: this.intlMeridiemDown, intlMeridiemUp: this.intlMeridiemUp, intlMinute: this.intlMinute, intlMinuteDown: this.intlMinuteDown, intlMinuteUp: this.intlMinuteUp, intlSecond: this.intlSecond, intlSecondDown: this.intlSecondDown, intlSecondUp: this.intlSecondUp, lang: this.locale, onCalciteTimePickerChange: this.timePickerChangeHandler, ref: this.setCalciteTimePickerEl, scale: this.scale, step: this.step, value: this.value })),
213
218
  h(HiddenFormInputSlot, { component: this })));
214
219
  }
@@ -543,6 +548,32 @@ export class InputTimePicker {
543
548
  "reflect": true,
544
549
  "defaultValue": "\"m\""
545
550
  },
551
+ "placement": {
552
+ "type": "string",
553
+ "mutable": false,
554
+ "complexType": {
555
+ "original": "PopperPlacement",
556
+ "resolved": "Placement | PlacementRtl | VariationRtl",
557
+ "references": {
558
+ "PopperPlacement": {
559
+ "location": "import",
560
+ "path": "../../utils/popper"
561
+ }
562
+ }
563
+ },
564
+ "required": false,
565
+ "optional": false,
566
+ "docs": {
567
+ "tags": [{
568
+ "name": "see",
569
+ "text": "[PopperPlacement](https://github.com/Esri/calcite-components/blob/master/src/utils/popper.ts#L25)"
570
+ }],
571
+ "text": "Determines where the popover will be positioned relative to the input."
572
+ },
573
+ "attribute": "placement",
574
+ "reflect": true,
575
+ "defaultValue": "\"auto\""
576
+ },
546
577
  "step": {
547
578
  "type": "number",
548
579
  "mutable": false,
@@ -9,6 +9,9 @@ import { clamp, decimalPlaces } from "../../utils/math";
9
9
  import { connectLabel, disconnectLabel } from "../../utils/label";
10
10
  import { afterConnectDefaultValueSet, connectForm, disconnectForm, HiddenFormInputSlot } from "../../utils/form";
11
11
  import { updateHostInteraction } from "../../utils/interactive";
12
+ function isRange(value) {
13
+ return Array.isArray(value);
14
+ }
12
15
  export class Slider {
13
16
  constructor() {
14
17
  //--------------------------------------------------------------------------
@@ -45,13 +48,12 @@ export class Slider {
45
48
  /** Interval to move on up/down keys */
46
49
  this.step = 1;
47
50
  /** Currently selected number (if single select) */
48
- this.value = null;
51
+ this.value = 0;
49
52
  /**
50
53
  * Specify the scale of the slider, defaults to m
51
54
  */
52
55
  this.scale = "m";
53
56
  this.guid = `calcite-slider-${guid()}`;
54
- this.isRange = false;
55
57
  this.activeProp = "value";
56
58
  this.minMaxValueRange = null;
57
59
  this.minValueDragRange = null;
@@ -61,7 +63,7 @@ export class Slider {
61
63
  event.preventDefault();
62
64
  if (this.dragProp) {
63
65
  const value = this.translate(event.clientX || event.pageX);
64
- if (this.isRange && this.dragProp === "minMaxValue") {
66
+ if (isRange(this.value) && this.dragProp === "minMaxValue") {
65
67
  if (this.minValueDragRange && this.maxValueDragRange && this.minMaxValueRange) {
66
68
  const newMinValue = value - this.minValueDragRange;
67
69
  const newMaxValue = value + this.maxValueDragRange;
@@ -107,12 +109,20 @@ export class Slider {
107
109
  histogramWatcher(newHistogram) {
108
110
  this.hasHistogram = !!newHistogram;
109
111
  }
112
+ valueHandler() {
113
+ this.setMinMaxFromValue();
114
+ }
115
+ minMaxValueHandler() {
116
+ this.setValueFromMinMax();
117
+ }
110
118
  //--------------------------------------------------------------------------
111
119
  //
112
120
  // Lifecycle
113
121
  //
114
122
  //--------------------------------------------------------------------------
115
123
  connectedCallback() {
124
+ this.setMinMaxFromValue();
125
+ this.setValueFromMinMax();
116
126
  connectLabel(this);
117
127
  connectForm(this);
118
128
  }
@@ -122,11 +132,12 @@ export class Slider {
122
132
  this.removeDragListeners();
123
133
  }
124
134
  componentWillLoad() {
125
- this.isRange = !!(this.maxValue || this.maxValue === 0);
126
135
  this.tickValues = this.generateTickValues();
127
- this.value = this.clamp(this.value);
136
+ if (!isRange(this.value)) {
137
+ this.value = this.clamp(this.value);
138
+ }
128
139
  afterConnectDefaultValueSet(this, this.value);
129
- if (this.snap) {
140
+ if (this.snap && !isRange(this.value)) {
130
141
  this.value = this.getClosestStep(this.value);
131
142
  }
132
143
  if (this.histogram) {
@@ -136,9 +147,9 @@ export class Slider {
136
147
  componentDidRender() {
137
148
  if (this.labelHandles) {
138
149
  this.adjustHostObscuredHandleLabel("value");
139
- if (this.isRange) {
150
+ if (isRange(this.value)) {
140
151
  this.adjustHostObscuredHandleLabel("minValue");
141
- if (!(this.precise && this.isRange && !this.hasHistogram)) {
152
+ if (!(this.precise && !this.hasHistogram)) {
142
153
  this.hyphenateCollidingRangeHandleLabels();
143
154
  }
144
155
  }
@@ -148,23 +159,23 @@ export class Slider {
148
159
  }
149
160
  render() {
150
161
  const id = this.el.id || this.guid;
162
+ const maxProp = isRange(this.value) ? "maxValue" : "value";
163
+ const value = isRange(this.value) ? this.maxValue : this.value;
151
164
  const min = this.minValue || this.min;
152
- const max = this.maxValue || this.value;
153
- const maxProp = this.isRange ? "maxValue" : "value";
154
- const value = this[maxProp];
155
165
  const useMinValue = this.shouldUseMinValue();
156
166
  const minInterval = this.getUnitInterval(useMinValue ? this.minValue : min) * 100;
157
- const maxInterval = this.getUnitInterval(max) * 100;
167
+ const maxInterval = this.getUnitInterval(value) * 100;
158
168
  const mirror = this.shouldMirror();
159
169
  const leftThumbOffset = `${mirror ? 100 - minInterval : minInterval}%`;
160
170
  const rightThumbOffset = `${mirror ? maxInterval : 100 - maxInterval}%`;
161
- const handle = (h("div", { "aria-disabled": this.disabled, "aria-label": this.isRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
171
+ const valueIsRange = isRange(this.value);
172
+ const handle = (h("div", { "aria-disabled": this.disabled, "aria-label": valueIsRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
162
173
  thumb: true,
163
174
  "thumb--value": true,
164
175
  "thumb--active": this.lastDragProp !== "minMaxValue" && this.dragProp === maxProp
165
176
  }, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = maxProp), onPointerDown: () => this.dragStart(maxProp), ref: (el) => (this.maxHandle = el), role: "slider", style: { right: rightThumbOffset }, tabIndex: 0 },
166
177
  h("div", { class: "handle" })));
167
- const labeledHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": this.isRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
178
+ const labeledHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": valueIsRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
168
179
  thumb: true,
169
180
  "thumb--value": true,
170
181
  "thumb--active": this.lastDragProp !== "minMaxValue" && this.dragProp === maxProp
@@ -173,7 +184,7 @@ export class Slider {
173
184
  h("span", { "aria-hidden": "true", class: "handle__label handle__label--value static" }, value ? value.toLocaleString() : value),
174
185
  h("span", { "aria-hidden": "true", class: "handle__label handle__label--value transformed" }, value ? value.toLocaleString() : value),
175
186
  h("div", { class: "handle" })));
176
- const histogramLabeledHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": this.isRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
187
+ const histogramLabeledHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": valueIsRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
177
188
  thumb: true,
178
189
  "thumb--value": true,
179
190
  "thumb--active": this.lastDragProp !== "minMaxValue" && this.dragProp === maxProp
@@ -182,7 +193,7 @@ export class Slider {
182
193
  h("span", { "aria-hidden": "true", class: "handle__label handle__label--value" }, value ? value.toLocaleString() : value),
183
194
  h("span", { "aria-hidden": "true", class: "handle__label handle__label--value static" }, value ? value.toLocaleString() : value),
184
195
  h("span", { "aria-hidden": "true", class: "handle__label handle__label--value transformed" }, value ? value.toLocaleString() : value)));
185
- const preciseHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": this.isRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
196
+ const preciseHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": valueIsRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
186
197
  thumb: true,
187
198
  "thumb--value": true,
188
199
  "thumb--active": this.lastDragProp !== "minMaxValue" && this.dragProp === maxProp,
@@ -190,7 +201,7 @@ export class Slider {
190
201
  }, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = maxProp), onPointerDown: () => this.dragStart(maxProp), ref: (el) => (this.maxHandle = el), role: "slider", style: { right: rightThumbOffset }, tabIndex: 0 },
191
202
  h("div", { class: "handle" }),
192
203
  h("div", { class: "handle-extension" })));
193
- const histogramPreciseHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": this.isRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
204
+ const histogramPreciseHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": valueIsRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
194
205
  thumb: true,
195
206
  "thumb--value": true,
196
207
  "thumb--active": this.lastDragProp !== "minMaxValue" && this.dragProp === maxProp,
@@ -198,7 +209,7 @@ export class Slider {
198
209
  }, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = maxProp), onPointerDown: () => this.dragStart(maxProp), ref: (el) => (this.maxHandle = el), role: "slider", style: { right: rightThumbOffset }, tabIndex: 0 },
199
210
  h("div", { class: "handle-extension" }),
200
211
  h("div", { class: "handle" })));
201
- const labeledPreciseHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": this.isRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
212
+ const labeledPreciseHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": valueIsRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
202
213
  thumb: true,
203
214
  "thumb--value": true,
204
215
  "thumb--active": this.lastDragProp !== "minMaxValue" && this.dragProp === maxProp,
@@ -209,7 +220,7 @@ export class Slider {
209
220
  h("span", { "aria-hidden": "true", class: "handle__label handle__label--value transformed" }, value ? value.toLocaleString() : value),
210
221
  h("div", { class: "handle" }),
211
222
  h("div", { class: "handle-extension" })));
212
- const histogramLabeledPreciseHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": this.isRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
223
+ const histogramLabeledPreciseHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": valueIsRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
213
224
  thumb: true,
214
225
  "thumb--value": true,
215
226
  "thumb--active": this.lastDragProp !== "minMaxValue" && this.dragProp === maxProp,
@@ -266,7 +277,7 @@ export class Slider {
266
277
  return (h(Host, { id: id, onTouchStart: this.handleTouchStart },
267
278
  h("div", { class: {
268
279
  ["container"]: true,
269
- ["container--range"]: this.isRange,
280
+ ["container--range"]: valueIsRange,
270
281
  [`scale--${this.scale}`]: true
271
282
  } },
272
283
  this.renderGraph(),
@@ -277,7 +288,7 @@ export class Slider {
277
288
  } }),
278
289
  h("div", { class: "ticks" }, this.tickValues.map((tick) => {
279
290
  const tickOffset = `${this.getUnitInterval(tick) * 100}%`;
280
- let activeTicks = tick >= min && tick <= max;
291
+ let activeTicks = tick >= min && tick <= value;
281
292
  if (useMinValue) {
282
293
  activeTicks = tick >= this.minValue && tick <= this.maxValue;
283
294
  }
@@ -290,18 +301,18 @@ export class Slider {
290
301
  } }, this.renderTickLabel(tick)));
291
302
  }))),
292
303
  h("div", { class: "thumb-container" },
293
- !this.precise && !this.labelHandles && this.isRange && minHandle,
304
+ !this.precise && !this.labelHandles && valueIsRange && minHandle,
294
305
  !this.hasHistogram &&
295
306
  !this.precise &&
296
307
  this.labelHandles &&
297
- this.isRange &&
308
+ valueIsRange &&
298
309
  minLabeledHandle,
299
- this.precise && !this.labelHandles && this.isRange && minPreciseHandle,
300
- this.precise && this.labelHandles && this.isRange && minLabeledPreciseHandle,
310
+ this.precise && !this.labelHandles && valueIsRange && minPreciseHandle,
311
+ this.precise && this.labelHandles && valueIsRange && minLabeledPreciseHandle,
301
312
  this.hasHistogram &&
302
313
  !this.precise &&
303
314
  this.labelHandles &&
304
- this.isRange &&
315
+ valueIsRange &&
305
316
  minHistogramLabeledHandle,
306
317
  !this.precise && !this.labelHandles && handle,
307
318
  !this.hasHistogram && !this.precise && this.labelHandles && labeledHandle,
@@ -316,9 +327,10 @@ export class Slider {
316
327
  h(HiddenFormInputSlot, { component: this })))));
317
328
  }
318
329
  renderGraph() {
319
- return this.histogram ? (h("calcite-graph", { class: "graph", colorStops: this.histogramStops, data: this.histogram, highlightMax: this.isRange ? this.maxValue : this.value, highlightMin: this.isRange ? this.minValue : this.min, max: this.max, min: this.min })) : null;
330
+ return this.histogram ? (h("calcite-graph", { class: "graph", colorStops: this.histogramStops, data: this.histogram, highlightMax: isRange(this.value) ? this.maxValue : this.value, highlightMin: isRange(this.value) ? this.minValue : this.min, max: this.max, min: this.min })) : null;
320
331
  }
321
332
  renderTickLabel(tick) {
333
+ const valueIsRange = isRange(this.value);
322
334
  const isMinTickLabel = tick === this.min;
323
335
  const isMaxTickLabel = tick === this.max;
324
336
  const tickLabel = (h("span", { class: {
@@ -326,26 +338,26 @@ export class Slider {
326
338
  "tick__label--min": isMinTickLabel,
327
339
  "tick__label--max": isMaxTickLabel
328
340
  } }, tick.toLocaleString()));
329
- if (this.labelTicks && !this.hasHistogram && !this.isRange) {
341
+ if (this.labelTicks && !this.hasHistogram && !valueIsRange) {
330
342
  return tickLabel;
331
343
  }
332
344
  if (this.labelTicks &&
333
345
  !this.hasHistogram &&
334
- this.isRange &&
346
+ valueIsRange &&
335
347
  !this.precise &&
336
348
  !this.labelHandles) {
337
349
  return tickLabel;
338
350
  }
339
351
  if (this.labelTicks &&
340
352
  !this.hasHistogram &&
341
- this.isRange &&
353
+ valueIsRange &&
342
354
  !this.precise &&
343
355
  this.labelHandles) {
344
356
  return tickLabel;
345
357
  }
346
358
  if (this.labelTicks &&
347
359
  !this.hasHistogram &&
348
- this.isRange &&
360
+ valueIsRange &&
349
361
  this.precise &&
350
362
  (isMinTickLabel || isMaxTickLabel)) {
351
363
  return tickLabel;
@@ -429,7 +441,7 @@ export class Slider {
429
441
  const x = event.clientX || event.pageX;
430
442
  const position = this.translate(x);
431
443
  let prop = "value";
432
- if (this.isRange) {
444
+ if (isRange(this.value)) {
433
445
  const inRange = position >= this.minValue && position <= this.maxValue;
434
446
  if (inRange && this.lastDragProp === "minMaxValue") {
435
447
  prop = "minMaxValue";
@@ -465,6 +477,19 @@ export class Slider {
465
477
  // Private Methods
466
478
  //
467
479
  //--------------------------------------------------------------------------
480
+ setValueFromMinMax() {
481
+ const { minValue, maxValue } = this;
482
+ if (typeof minValue === "number" && typeof maxValue === "number") {
483
+ this.value = [minValue, maxValue];
484
+ }
485
+ }
486
+ setMinMaxFromValue() {
487
+ const { value } = this;
488
+ if (isRange(value)) {
489
+ this.minValue = value[0];
490
+ this.maxValue = value[1];
491
+ }
492
+ }
468
493
  onLabelClick() {
469
494
  this.setFocus();
470
495
  }
@@ -472,7 +497,7 @@ export class Slider {
472
497
  return this.mirrored && !this.hasHistogram;
473
498
  }
474
499
  shouldUseMinValue() {
475
- if (!this.isRange) {
500
+ if (!isRange(this.value)) {
476
501
  return false;
477
502
  }
478
503
  return ((this.hasHistogram && this.maxValue === 0) || (!this.hasHistogram && this.minValue === 0));
@@ -687,19 +712,20 @@ export class Slider {
687
712
  * Hides bounding tick labels that are obscured by either handle.
688
713
  */
689
714
  hideObscuredBoundingTickLabels() {
690
- if (!this.hasHistogram && !this.isRange && !this.labelHandles && !this.precise) {
715
+ const valueIsRange = isRange(this.value);
716
+ if (!this.hasHistogram && !valueIsRange && !this.labelHandles && !this.precise) {
691
717
  return;
692
718
  }
693
- if (!this.hasHistogram && !this.isRange && this.labelHandles && !this.precise) {
719
+ if (!this.hasHistogram && !valueIsRange && this.labelHandles && !this.precise) {
694
720
  return;
695
721
  }
696
- if (!this.hasHistogram && !this.isRange && !this.labelHandles && this.precise) {
722
+ if (!this.hasHistogram && !valueIsRange && !this.labelHandles && this.precise) {
697
723
  return;
698
724
  }
699
- if (!this.hasHistogram && !this.isRange && this.labelHandles && this.precise) {
725
+ if (!this.hasHistogram && !valueIsRange && this.labelHandles && this.precise) {
700
726
  return;
701
727
  }
702
- if (!this.hasHistogram && this.isRange && !this.precise) {
728
+ if (!this.hasHistogram && valueIsRange && !this.precise) {
703
729
  return;
704
730
  }
705
731
  if (this.hasHistogram && !this.precise && !this.labelHandles) {
@@ -1147,8 +1173,8 @@ export class Slider {
1147
1173
  "type": "number",
1148
1174
  "mutable": true,
1149
1175
  "complexType": {
1150
- "original": "null | number",
1151
- "resolved": "number",
1176
+ "original": "null | number | number[]",
1177
+ "resolved": "number | number[]",
1152
1178
  "references": {}
1153
1179
  },
1154
1180
  "required": false,
@@ -1159,7 +1185,7 @@ export class Slider {
1159
1185
  },
1160
1186
  "attribute": "value",
1161
1187
  "reflect": true,
1162
- "defaultValue": "null"
1188
+ "defaultValue": "0"
1163
1189
  },
1164
1190
  "scale": {
1165
1191
  "type": "string",
@@ -1263,6 +1289,15 @@ export class Slider {
1263
1289
  static get watchers() { return [{
1264
1290
  "propName": "histogram",
1265
1291
  "methodName": "histogramWatcher"
1292
+ }, {
1293
+ "propName": "value",
1294
+ "methodName": "valueHandler"
1295
+ }, {
1296
+ "propName": "minValue",
1297
+ "methodName": "minMaxValueHandler"
1298
+ }, {
1299
+ "propName": "maxValue",
1300
+ "methodName": "minMaxValueHandler"
1266
1301
  }]; }
1267
1302
  static get listeners() { return [{
1268
1303
  "name": "keydown",
@@ -7,7 +7,7 @@ import { T as TEXT, g as getLocaleData, d as defineCustomElement$8 } from './dat
7
7
  import { d as dateToISO, a as dateFromISO, b as dateFromRange, s as sameDate, f as parseDateString, i as inRange } from './date.js';
8
8
  import { c as connectLabel, d as disconnectLabel, g as getLabelText } from './label.js';
9
9
  import { c as connectForm, d as disconnectForm, H as HiddenFormInputSlot } from './form.js';
10
- import { u as updatePopper, C as CSS, c as createPopper, a as defaultMenuPlacement, p as popperMenuFlipPlacements } from './popper.js';
10
+ import { a as defaultMenuPlacement, u as updatePopper, C as CSS, c as createPopper, p as popperMenuFlipPlacements } from './popper.js';
11
11
  import { u as updateHostInteraction } from './interactive.js';
12
12
  import { d as defineCustomElement$7 } from './date-picker-day.js';
13
13
  import { d as defineCustomElement$6 } from './date-picker-month.js';
@@ -16,7 +16,7 @@ import { d as defineCustomElement$4 } from './icon.js';
16
16
  import { d as defineCustomElement$3 } from './input.js';
17
17
  import { d as defineCustomElement$2 } from './progress.js';
18
18
 
19
- const inputDatePickerCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:host{--calcite-icon-size:1rem;--calcite-spacing-eighth:0.125rem;--calcite-spacing-quarter:0.25rem;--calcite-spacing-half:0.5rem;--calcite-spacing-three-quarters:0.75rem;--calcite-spacing:1rem;--calcite-spacing-plus-quarter:1.25rem;--calcite-spacing-plus-half:1.5rem;--calcite-spacing-double:2rem;--calcite-menu-min-width:10rem;--calcite-header-min-height:3rem;--calcite-footer-min-height:3rem}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{position:relative;display:inline-block;width:100%;overflow:visible;vertical-align:top;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.calendar-picker-wrapper{position:static;width:100%;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}.input-wrapper{position:relative}:host([range]) .input-container{display:-ms-flexbox;display:flex}:host([range]) .input-wrapper{-ms-flex:1 1 auto;flex:1 1 auto}:host([range]) .horizontal-arrow-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-width:1px;border-left-width:0px;border-right-width:0px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-background);padding-top:0px;padding-bottom:0px;padding-left:0.25rem;padding-right:0.25rem}:host([range][layout=vertical]) .input-wrapper{width:100%}:host([range][layout=vertical]) .input-container{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start}:host([range][layout=vertical]) .calendar-picker-wrapper--end{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}:host([range][layout=vertical]) .vertical-arrow-container{top:1.5rem;position:absolute;left:0px;z-index:10;margin-left:1px;margin-right:1px;background-color:var(--calcite-ui-foreground-1);padding-left:0.625rem;padding-right:0.625rem}:host([scale=s][range]:not([layout=vertical])) .calendar-picker-wrapper{width:216px}:host([scale=m][range]:not([layout=vertical])) .calendar-picker-wrapper{width:286px}:host([scale=l][range]:not([layout=vertical])) .calendar-picker-wrapper{width:398px}.menu-container{display:block;position:absolute;z-index:900;-webkit-transform:scale(0);transform:scale(0);visibility:hidden;pointer-events:none}.menu-container .calcite-popper-anim{position:relative;z-index:1;-webkit-transition:var(--calcite-popper-transition);transition:var(--calcite-popper-transition);visibility:hidden;-webkit-transition-property:visibility, opacity, -webkit-transform;transition-property:visibility, opacity, -webkit-transform;transition-property:transform, visibility, opacity;transition-property:transform, visibility, opacity, -webkit-transform;opacity:0;-webkit-box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);border-radius:0.25rem}.menu-container[data-popper-placement^=bottom] .calcite-popper-anim{-webkit-transform:translateY(-5px);transform:translateY(-5px)}.menu-container[data-popper-placement^=top] .calcite-popper-anim{-webkit-transform:translateY(5px);transform:translateY(5px)}.menu-container[data-popper-placement^=left] .calcite-popper-anim{-webkit-transform:translateX(5px);transform:translateX(5px)}.menu-container[data-popper-placement^=right] .calcite-popper-anim{-webkit-transform:translateX(-5px);transform:translateX(-5px)}.menu-container[data-popper-placement] .calcite-popper-anim--active{opacity:1;visibility:visible;-webkit-transform:translate(0);transform:translate(0)}.menu-container--active .menu-container .calcite-popper-anim{position:relative;z-index:1;-webkit-transition:var(--calcite-popper-transition);transition:var(--calcite-popper-transition);visibility:hidden;-webkit-transition-property:visibility, opacity, -webkit-transform;transition-property:visibility, opacity, -webkit-transform;transition-property:transform, visibility, opacity;transition-property:transform, visibility, opacity, -webkit-transform;opacity:0;-webkit-box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);border-radius:0.25rem}.menu-container--active .menu-container[data-popper-placement^=bottom] .calcite-popper-anim{-webkit-transform:translateY(-5px);transform:translateY(-5px)}.menu-container--active .menu-container[data-popper-placement^=top] .calcite-popper-anim{-webkit-transform:translateY(5px);transform:translateY(5px)}.menu-container--active .menu-container[data-popper-placement^=left] .calcite-popper-anim{-webkit-transform:translateX(5px);transform:translateX(5px)}.menu-container--active .menu-container[data-popper-placement^=right] .calcite-popper-anim{-webkit-transform:translateX(-5px);transform:translateX(-5px)}.menu-container--active .menu-container[data-popper-placement] .calcite-popper-anim--active{opacity:1;visibility:visible;-webkit-transform:translate(0);transform:translate(0)}.input .calcite-input__wrapper{margin-top:0px}:host([range][layout=vertical][scale=m]) .vertical-arrow-container{top:1.5rem;padding-left:0.75rem}:host([range][layout=vertical][scale=m]) .vertical-arrow-container calcite-icon{height:0.75rem;width:0.75rem;min-width:0px}:host([range][layout=vertical][scale=l]) .vertical-arrow-container{top:2.25rem;padding-left:0.875rem;padding-right:0.875rem}:host([range][layout=vertical][active]) .vertical-arrow-container{display:none}::slotted(input[slot=hidden-form-input]){bottom:0 !important;left:0 !important;margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;right:0 !important;top:0 !important;-webkit-transform:none !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";
19
+ const inputDatePickerCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:host{--calcite-icon-size:1rem;--calcite-spacing-eighth:0.125rem;--calcite-spacing-quarter:0.25rem;--calcite-spacing-half:0.5rem;--calcite-spacing-three-quarters:0.75rem;--calcite-spacing:1rem;--calcite-spacing-plus-quarter:1.25rem;--calcite-spacing-plus-half:1.5rem;--calcite-spacing-double:2rem;--calcite-menu-min-width:10rem;--calcite-header-min-height:3rem;--calcite-footer-min-height:3rem}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{position:relative;display:inline-block;width:100%;overflow:visible;vertical-align:top;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.calendar-picker-wrapper{position:static;width:100%;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}.input-wrapper{position:relative}:host([range]) .input-container{display:-ms-flexbox;display:flex}:host([range]) .input-wrapper{-ms-flex:1 1 auto;flex:1 1 auto}:host([range]) .horizontal-arrow-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-width:1px;border-left-width:0px;border-right-width:0px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-background);padding-top:0px;padding-bottom:0px;padding-left:0.25rem;padding-right:0.25rem}:host([range][layout=vertical]) .input-wrapper{width:100%}:host([range][layout=vertical]) .input-container{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start}:host([range][layout=vertical]) .calendar-picker-wrapper--end{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}:host([range][layout=vertical]) .vertical-arrow-container{top:1.5rem;position:absolute;left:0px;z-index:10;margin-left:1px;margin-right:1px;background-color:var(--calcite-ui-foreground-1);padding-left:0.625rem;padding-right:0.625rem}:host([scale=s][range]:not([layout=vertical])) .calendar-picker-wrapper{width:216px}:host([scale=m][range]:not([layout=vertical])) .calendar-picker-wrapper{width:286px}:host([scale=l][range]:not([layout=vertical])) .calendar-picker-wrapper{width:398px}.menu-container{display:block;position:absolute;z-index:900;-webkit-transform:scale(0);transform:scale(0);visibility:hidden;pointer-events:none}.menu-container .calcite-popper-anim{position:relative;z-index:1;-webkit-transition:var(--calcite-popper-transition);transition:var(--calcite-popper-transition);visibility:hidden;-webkit-transition-property:visibility, opacity, -webkit-transform;transition-property:visibility, opacity, -webkit-transform;transition-property:transform, visibility, opacity;transition-property:transform, visibility, opacity, -webkit-transform;opacity:0;-webkit-box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);border-radius:0.25rem}.menu-container[data-popper-placement^=bottom] .calcite-popper-anim{-webkit-transform:translateY(-5px);transform:translateY(-5px)}.menu-container[data-popper-placement^=top] .calcite-popper-anim{-webkit-transform:translateY(5px);transform:translateY(5px)}.menu-container[data-popper-placement^=left] .calcite-popper-anim{-webkit-transform:translateX(5px);transform:translateX(5px)}.menu-container[data-popper-placement^=right] .calcite-popper-anim{-webkit-transform:translateX(-5px);transform:translateX(-5px)}.menu-container[data-popper-placement] .calcite-popper-anim--active{opacity:1;visibility:visible;-webkit-transform:translate(0);transform:translate(0)}:host([active]) .menu-container{pointer-events:initial;visibility:visible}.menu-container--active .menu-container .calcite-popper-anim{position:relative;z-index:1;-webkit-transition:var(--calcite-popper-transition);transition:var(--calcite-popper-transition);visibility:hidden;-webkit-transition-property:visibility, opacity, -webkit-transform;transition-property:visibility, opacity, -webkit-transform;transition-property:transform, visibility, opacity;transition-property:transform, visibility, opacity, -webkit-transform;opacity:0;-webkit-box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);border-radius:0.25rem}.menu-container--active .menu-container[data-popper-placement^=bottom] .calcite-popper-anim{-webkit-transform:translateY(-5px);transform:translateY(-5px)}.menu-container--active .menu-container[data-popper-placement^=top] .calcite-popper-anim{-webkit-transform:translateY(5px);transform:translateY(5px)}.menu-container--active .menu-container[data-popper-placement^=left] .calcite-popper-anim{-webkit-transform:translateX(5px);transform:translateX(5px)}.menu-container--active .menu-container[data-popper-placement^=right] .calcite-popper-anim{-webkit-transform:translateX(-5px);transform:translateX(-5px)}.menu-container--active .menu-container[data-popper-placement] .calcite-popper-anim--active{opacity:1;visibility:visible;-webkit-transform:translate(0);transform:translate(0)}.input .calcite-input__wrapper{margin-top:0px}:host([range][layout=vertical][scale=m]) .vertical-arrow-container{top:1.5rem;padding-left:0.75rem}:host([range][layout=vertical][scale=m]) .vertical-arrow-container calcite-icon{height:0.75rem;width:0.75rem;min-width:0px}:host([range][layout=vertical][scale=l]) .vertical-arrow-container{top:2.25rem;padding-left:0.875rem;padding-right:0.875rem}:host([range][layout=vertical][active]) .vertical-arrow-container{display:none}::slotted(input[slot=hidden-form-input]){bottom:0 !important;left:0 !important;margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;right:0 !important;top:0 !important;-webkit-transform:none !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";
20
20
 
21
21
  const InputDatePicker = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
22
22
  constructor() {
@@ -55,6 +55,11 @@ const InputDatePicker = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
55
55
  this.locale = document.documentElement.lang || "en";
56
56
  /** specify the scale of the date picker */
57
57
  this.scale = "m";
58
+ /**
59
+ * Determines where the date-picker component will be positioned relative to the input.
60
+ * @default "bottom-leading"
61
+ */
62
+ this.placement = defaultMenuPlacement;
58
63
  /** Range mode activation */
59
64
  this.range = false;
60
65
  /**
@@ -207,13 +212,13 @@ const InputDatePicker = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
207
212
  }
208
213
  /** Updates the position of the component. */
209
214
  async reposition() {
210
- const { popper, menuEl } = this;
215
+ const { placement, popper, menuEl } = this;
211
216
  const modifiers = this.getModifiers();
212
217
  popper
213
218
  ? await updatePopper({
214
219
  el: menuEl,
215
220
  modifiers,
216
- placement: defaultMenuPlacement,
221
+ placement,
217
222
  popper
218
223
  })
219
224
  : this.createPopper();
@@ -317,7 +322,7 @@ const InputDatePicker = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
317
322
  }
318
323
  createPopper() {
319
324
  this.destroyPopper();
320
- const { menuEl, referenceEl, overlayPositioning } = this;
325
+ const { menuEl, placement, referenceEl, overlayPositioning } = this;
321
326
  if (!menuEl || !referenceEl) {
322
327
  return;
323
328
  }
@@ -326,7 +331,7 @@ const InputDatePicker = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
326
331
  el: menuEl,
327
332
  modifiers,
328
333
  overlayPositioning,
329
- placement: defaultMenuPlacement,
334
+ placement,
330
335
  referenceEl
331
336
  });
332
337
  }
@@ -499,6 +504,7 @@ const InputDatePicker = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
499
504
  "intlYear": [1, "intl-year"],
500
505
  "locale": [1],
501
506
  "scale": [513],
507
+ "placement": [513],
502
508
  "range": [516],
503
509
  "required": [516],
504
510
  "start": [1025],
@@ -45,6 +45,11 @@ const InputTimePicker = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
45
45
  this.required = false;
46
46
  /** The scale (size) of the time input */
47
47
  this.scale = "m";
48
+ /**
49
+ * Determines where the popover will be positioned relative to the input.
50
+ * @see [PopperPlacement](https://github.com/Esri/calcite-components/blob/master/src/utils/popper.ts#L25)
51
+ */
52
+ this.placement = "auto";
48
53
  /** number (seconds) that specifies the granularity that the value must adhere to */
49
54
  this.step = 60;
50
55
  /** The selected time in UTC (always 24-hour format) */
@@ -218,7 +223,7 @@ const InputTimePicker = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
218
223
  // --------------------------------------------------------------------------
219
224
  render() {
220
225
  const popoverId = `${this.referenceElementId}-popover`;
221
- return (h(Host, null, h("div", { "aria-controls": popoverId, "aria-haspopup": "dialog", "aria-label": this.name, "aria-owns": popoverId, id: this.referenceElementId, role: "combobox" }, h("calcite-input", { disabled: this.disabled, icon: "clock", label: getLabelText(this), onCalciteInputBlur: this.calciteInputBlurHandler, onCalciteInputFocus: this.calciteInputFocusHandler, onCalciteInputInput: this.calciteInputInputHandler, ref: this.setCalciteInputEl, scale: this.scale, step: this.step })), h("calcite-popover", { id: popoverId, label: "Time Picker", open: this.active, referenceElement: this.referenceElementId }, h("calcite-time-picker", { intlHour: this.intlHour, intlHourDown: this.intlHourDown, intlHourUp: this.intlHourUp, intlMeridiem: this.intlMeridiem, intlMeridiemDown: this.intlMeridiemDown, intlMeridiemUp: this.intlMeridiemUp, intlMinute: this.intlMinute, intlMinuteDown: this.intlMinuteDown, intlMinuteUp: this.intlMinuteUp, intlSecond: this.intlSecond, intlSecondDown: this.intlSecondDown, intlSecondUp: this.intlSecondUp, lang: this.locale, onCalciteTimePickerChange: this.timePickerChangeHandler, ref: this.setCalciteTimePickerEl, scale: this.scale, step: this.step, value: this.value })), h(HiddenFormInputSlot, { component: this })));
226
+ return (h(Host, null, h("div", { "aria-controls": popoverId, "aria-haspopup": "dialog", "aria-label": this.name, "aria-owns": popoverId, id: this.referenceElementId, role: "combobox" }, h("calcite-input", { disabled: this.disabled, icon: "clock", label: getLabelText(this), onCalciteInputBlur: this.calciteInputBlurHandler, onCalciteInputFocus: this.calciteInputFocusHandler, onCalciteInputInput: this.calciteInputInputHandler, ref: this.setCalciteInputEl, scale: this.scale, step: this.step })), h("calcite-popover", { id: popoverId, label: "Time Picker", open: this.active, placement: this.placement, referenceElement: this.referenceElementId }, h("calcite-time-picker", { intlHour: this.intlHour, intlHourDown: this.intlHourDown, intlHourUp: this.intlHourUp, intlMeridiem: this.intlMeridiem, intlMeridiemDown: this.intlMeridiemDown, intlMeridiemUp: this.intlMeridiemUp, intlMinute: this.intlMinute, intlMinuteDown: this.intlMinuteDown, intlMinuteUp: this.intlMinuteUp, intlSecond: this.intlSecond, intlSecondDown: this.intlSecondDown, intlSecondUp: this.intlSecondUp, lang: this.locale, onCalciteTimePickerChange: this.timePickerChangeHandler, ref: this.setCalciteTimePickerEl, scale: this.scale, step: this.step, value: this.value })), h(HiddenFormInputSlot, { component: this })));
222
227
  }
223
228
  get el() { return this; }
224
229
  static get watchers() { return {
@@ -247,6 +252,7 @@ const InputTimePicker = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
247
252
  "name": [1],
248
253
  "required": [516],
249
254
  "scale": [513],
255
+ "placement": [513],
250
256
  "step": [2],
251
257
  "value": [1025],
252
258
  "localizedValue": [32],