@esri/calcite-components 1.0.0-next.305 → 1.0.0-next.309

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 (161) hide show
  1. package/dist/calcite/calcite.esm.js +1 -1
  2. package/dist/calcite/calcite.js +1 -1
  3. package/dist/calcite/p-2a714a22.entry.js +5 -0
  4. package/dist/calcite/p-362cb320.entry.js +5 -0
  5. package/dist/calcite/{p-e62a9b1d.system.entry.js → p-4778c5cf.system.entry.js} +1 -1
  6. package/dist/calcite/{p-9f240615.system.entry.js → p-59a285d8.system.entry.js} +1 -1
  7. package/dist/calcite/p-688f06b9.entry.js +5 -0
  8. package/dist/calcite/p-8c02f97a.entry.js +5 -0
  9. package/dist/calcite/p-8e252799.system.js +5 -0
  10. package/dist/calcite/{p-243d95ab.system.entry.js → p-a5e8f022.system.entry.js} +2 -2
  11. package/dist/calcite/{p-88b875d3.system.entry.js → p-b0e21c19.system.entry.js} +1 -1
  12. package/dist/calcite/p-c61ebee9.entry.js +5 -0
  13. package/dist/calcite/p-ca6025ab.system.entry.js +5 -0
  14. package/dist/calcite/p-dbe899c6.system.entry.js +5 -0
  15. package/dist/calcite/p-e616f9b5.entry.js +5 -0
  16. package/dist/cjs/calcite-alert.cjs.entry.js +22 -5
  17. package/dist/cjs/calcite-graph_2.cjs.entry.js +18 -10
  18. package/dist/cjs/calcite-input.cjs.entry.js +16 -14
  19. package/dist/cjs/calcite-radio_2.cjs.entry.js +3 -7
  20. package/dist/cjs/calcite-shell_3.cjs.entry.js +156 -5
  21. package/dist/cjs/calcite-tile-select_2.cjs.entry.js +2 -2
  22. package/dist/cjs/calcite.cjs.js +2 -2
  23. package/dist/cjs/loader.cjs.js +2 -2
  24. package/dist/collection/collection-manifest.json +1 -1
  25. package/dist/collection/components/calcite-alert/calcite-alert.js +23 -4
  26. package/dist/collection/components/calcite-input/calcite-input.js +16 -14
  27. package/dist/collection/components/calcite-radio-button/calcite-radio-button.js +3 -7
  28. package/dist/collection/components/calcite-shell-panel/calcite-shell-panel.css +43 -0
  29. package/dist/collection/components/calcite-shell-panel/calcite-shell-panel.js +194 -5
  30. package/dist/collection/components/calcite-shell-panel/resources.js +5 -1
  31. package/dist/collection/components/calcite-slider/calcite-slider.css +1 -0
  32. package/dist/collection/components/calcite-slider/calcite-slider.js +19 -9
  33. package/dist/collection/components/calcite-tile-select/calcite-tile-select.js +16 -4
  34. package/dist/components/calcite-accordion-item.js +4 -1
  35. package/dist/components/calcite-accordion.js +4 -1
  36. package/dist/components/calcite-action-bar.js +4 -1
  37. package/dist/components/calcite-action-group2.js +4 -1
  38. package/dist/components/calcite-action-menu2.js +4 -1
  39. package/dist/components/calcite-action-pad.js +4 -1
  40. package/dist/components/calcite-action2.js +4 -1
  41. package/dist/components/calcite-alert.js +26 -6
  42. package/dist/components/calcite-avatar.js +4 -1
  43. package/dist/components/calcite-block-section.js +4 -1
  44. package/dist/components/calcite-block.js +4 -1
  45. package/dist/components/calcite-button2.js +5 -2
  46. package/dist/components/calcite-card.js +4 -1
  47. package/dist/components/calcite-checkbox2.js +4 -1
  48. package/dist/components/calcite-chip2.js +4 -1
  49. package/dist/components/calcite-color-picker-hex-input2.js +4 -1
  50. package/dist/components/calcite-color-picker-swatch2.js +4 -1
  51. package/dist/components/calcite-color-picker.js +4 -1
  52. package/dist/components/calcite-combobox-item-group.js +4 -1
  53. package/dist/components/calcite-combobox-item.js +4 -1
  54. package/dist/components/calcite-combobox.js +4 -1
  55. package/dist/components/calcite-date-picker-day2.js +4 -1
  56. package/dist/components/calcite-date-picker-month-header2.js +4 -1
  57. package/dist/components/calcite-date-picker-month2.js +4 -1
  58. package/dist/components/calcite-date-picker2.js +4 -1
  59. package/dist/components/calcite-dropdown-group.js +4 -1
  60. package/dist/components/calcite-dropdown-item.js +4 -1
  61. package/dist/components/calcite-dropdown2.js +4 -1
  62. package/dist/components/calcite-fab.js +4 -1
  63. package/dist/components/calcite-filter2.js +4 -1
  64. package/dist/components/calcite-flow.js +4 -1
  65. package/dist/components/calcite-graph2.js +4 -1
  66. package/dist/components/calcite-handle2.js +4 -1
  67. package/dist/components/calcite-icon2.js +4 -1
  68. package/dist/components/calcite-inline-editable.js +4 -1
  69. package/dist/components/calcite-input-date-picker.js +4 -1
  70. package/dist/components/calcite-input-message.js +4 -1
  71. package/dist/components/calcite-input-time-picker.js +4 -1
  72. package/dist/components/calcite-input2.js +20 -15
  73. package/dist/components/calcite-label2.js +4 -1
  74. package/dist/components/calcite-link2.js +4 -1
  75. package/dist/components/calcite-list-item-group.js +4 -1
  76. package/dist/components/calcite-list-item.js +4 -1
  77. package/dist/components/calcite-list.js +4 -1
  78. package/dist/components/calcite-loader2.js +4 -1
  79. package/dist/components/calcite-modal.js +4 -1
  80. package/dist/components/calcite-notice.js +4 -1
  81. package/dist/components/calcite-option-group.js +4 -1
  82. package/dist/components/calcite-option.js +4 -1
  83. package/dist/components/calcite-pagination.js +4 -1
  84. package/dist/components/calcite-panel.js +4 -1
  85. package/dist/components/calcite-pick-list-group.js +4 -1
  86. package/dist/components/calcite-pick-list-item2.js +4 -1
  87. package/dist/components/calcite-pick-list.js +4 -1
  88. package/dist/components/calcite-popover-manager.js +4 -1
  89. package/dist/components/calcite-popover2.js +4 -1
  90. package/dist/components/calcite-progress2.js +4 -1
  91. package/dist/components/calcite-radio-button-group.js +4 -1
  92. package/dist/components/calcite-radio-button.js +7 -8
  93. package/dist/components/calcite-radio-group-item.js +4 -1
  94. package/dist/components/calcite-radio-group.js +4 -1
  95. package/dist/components/calcite-radio2.js +4 -1
  96. package/dist/components/calcite-rating.js +4 -1
  97. package/dist/components/calcite-scrim2.js +4 -1
  98. package/dist/components/calcite-select.js +4 -1
  99. package/dist/components/calcite-shell-center-row.js +4 -1
  100. package/dist/components/calcite-shell-panel.js +164 -7
  101. package/dist/components/calcite-shell.js +4 -1
  102. package/dist/components/calcite-slider.js +22 -11
  103. package/dist/components/calcite-sortable-list.js +4 -1
  104. package/dist/components/calcite-split-button.js +4 -1
  105. package/dist/components/calcite-stepper-item.js +4 -1
  106. package/dist/components/calcite-stepper.js +4 -1
  107. package/dist/components/calcite-switch2.js +4 -1
  108. package/dist/components/calcite-tab-nav2.js +4 -1
  109. package/dist/components/calcite-tab-title2.js +4 -1
  110. package/dist/components/calcite-tab2.js +4 -1
  111. package/dist/components/calcite-tabs2.js +4 -1
  112. package/dist/components/calcite-tile-select-group.js +4 -1
  113. package/dist/components/calcite-tile-select.js +7 -4
  114. package/dist/components/calcite-tile2.js +4 -1
  115. package/dist/components/calcite-time-picker2.js +4 -1
  116. package/dist/components/calcite-tip-group.js +4 -1
  117. package/dist/components/calcite-tip-manager.js +4 -1
  118. package/dist/components/calcite-tip.js +4 -1
  119. package/dist/components/calcite-tooltip-manager2.js +4 -1
  120. package/dist/components/calcite-tooltip.js +4 -1
  121. package/dist/components/calcite-tree-item.js +4 -1
  122. package/dist/components/calcite-tree.js +4 -1
  123. package/dist/components/calcite-value-list-item.js +4 -1
  124. package/dist/components/calcite-value-list.js +4 -1
  125. package/dist/custom-elements/index.js +403 -230
  126. package/dist/esm/calcite-alert.entry.js +22 -5
  127. package/dist/esm/calcite-graph_2.entry.js +18 -10
  128. package/dist/esm/calcite-input.entry.js +16 -14
  129. package/dist/esm/calcite-radio_2.entry.js +3 -7
  130. package/dist/esm/calcite-shell_3.entry.js +157 -6
  131. package/dist/esm/calcite-tile-select_2.entry.js +2 -2
  132. package/dist/esm/calcite.js +2 -2
  133. package/dist/esm/loader.js +2 -2
  134. package/dist/esm-es5/calcite-alert.entry.js +2 -2
  135. package/dist/esm-es5/calcite-graph_2.entry.js +1 -1
  136. package/dist/esm-es5/calcite-input.entry.js +1 -1
  137. package/dist/esm-es5/calcite-radio_2.entry.js +1 -1
  138. package/dist/esm-es5/calcite-shell_3.entry.js +1 -1
  139. package/dist/esm-es5/calcite-tile-select_2.entry.js +1 -1
  140. package/dist/esm-es5/calcite.js +1 -1
  141. package/dist/esm-es5/loader.js +1 -1
  142. package/dist/extras/docs-json.json +51 -2
  143. package/dist/types/components/calcite-alert/calcite-alert.d.ts +3 -0
  144. package/dist/types/components/calcite-input/calcite-input.d.ts +1 -1
  145. package/dist/types/components/calcite-shell-panel/calcite-shell-panel.d.ts +31 -0
  146. package/dist/types/components/calcite-shell-panel/resources.d.ts +4 -0
  147. package/dist/types/components/calcite-slider/calcite-slider.d.ts +3 -1
  148. package/dist/types/components/calcite-tile-select/calcite-tile-select.d.ts +2 -2
  149. package/dist/types/components.d.ts +18 -0
  150. package/hydrate/index.js +316 -140
  151. package/package.json +10 -10
  152. package/readme.md +2 -2
  153. package/dist/calcite/p-3eb1dc0f.entry.js +0 -5
  154. package/dist/calcite/p-42696c81.system.entry.js +0 -5
  155. package/dist/calcite/p-56e28cef.entry.js +0 -5
  156. package/dist/calcite/p-5c0c29bc.entry.js +0 -5
  157. package/dist/calcite/p-5f817b79.entry.js +0 -5
  158. package/dist/calcite/p-6f1cca21.system.js +0 -5
  159. package/dist/calcite/p-737fb960.entry.js +0 -5
  160. package/dist/calcite/p-82139130.entry.js +0 -5
  161. package/dist/calcite/p-b1a96c72.system.entry.js +0 -5
@@ -60,8 +60,13 @@ let CalciteAlert = class {
60
60
  this.queueLength = 0;
61
61
  /** is the alert queued */
62
62
  this.queued = false;
63
+ this.autoDismissTimeout = null;
64
+ this.trackTimer = new Date();
63
65
  /** close and emit the closed alert and the queue */
64
66
  this.closeAlert = () => {
67
+ if (this.autoDismissTimeout) {
68
+ this.autoDismissTimeout = null;
69
+ }
65
70
  this.queued = false;
66
71
  this.active = false;
67
72
  this.queue = this.queue.filter((e) => e !== this.el);
@@ -85,6 +90,12 @@ let CalciteAlert = class {
85
90
  updateRequestedIcon() {
86
91
  this.requestedIcon = setRequestedIcon(StatusIcons, this.icon, this.color);
87
92
  }
93
+ updateDuration(newDuration, prevDuration) {
94
+ if (this.autoDismiss && prevDuration !== newDuration && this.autoDismissTimeout) {
95
+ window.clearTimeout(this.autoDismissTimeout);
96
+ this.autoDismissTimeout = window.setTimeout(() => this.closeAlert(), DURATIONS[this.autoDismissDuration] - (new Date().valueOf() - this.trackTimer.valueOf()));
97
+ }
98
+ }
88
99
  //--------------------------------------------------------------------------
89
100
  //
90
101
  // Lifecycle
@@ -101,20 +112,25 @@ let CalciteAlert = class {
101
112
  componentDidLoad() {
102
113
  this.alertLinkEl = this.el.querySelectorAll("calcite-link")[0];
103
114
  }
115
+ disconnectedCallback() {
116
+ if (this.autoDismissTimeout) {
117
+ window.clearTimeout(this.autoDismissTimeout);
118
+ }
119
+ }
104
120
  render() {
105
121
  const dir = getElementDir(this.el);
106
122
  const closeButton = (h("button", { "aria-label": this.intlClose, class: "alert-close", onClick: this.closeAlert, ref: (el) => (this.closeButton = el), type: "button" }, h("calcite-icon", { icon: "x", scale: this.scale === "l" ? "m" : "s" })));
107
123
  const queueText = `+${this.queueLength > 2 ? this.queueLength - 1 : 1}`;
108
124
  const queueCount = (h("div", { class: `${this.queueLength > 1 ? "active " : ""}alert-queue-count` }, h("calcite-chip", { scale: this.scale, value: queueText }, queueText)));
109
125
  const { active, autoDismiss, label, queued, requestedIcon } = this;
110
- const progress = h("div", { class: "alert-dismiss-progress" });
126
+ const progressBar = h("div", { class: "alert-dismiss-progress" });
111
127
  const role = autoDismiss ? "alert" : "alertdialog";
112
128
  const hidden = !active;
113
129
  return (h(Host, { "aria-hidden": hidden.toString(), "aria-label": label, "calcite-hydrated-hidden": hidden, role: role }, h("div", { class: {
114
130
  container: true,
115
131
  queued,
116
132
  [CSS_UTILITY.rtl]: dir === "rtl"
117
- } }, requestedIcon ? (h("div", { class: "alert-icon" }, h("calcite-icon", { icon: requestedIcon, scale: this.scale === "l" ? "m" : "s" }))) : null, h("div", { class: "alert-content" }, h("slot", { name: SLOTS.title }), h("slot", { name: SLOTS.message }), h("slot", { name: SLOTS.link })), queueCount, !autoDismiss ? closeButton : null, active && !queued && autoDismiss ? progress : null)));
133
+ } }, requestedIcon ? (h("div", { class: "alert-icon" }, h("calcite-icon", { icon: requestedIcon, scale: this.scale === "l" ? "m" : "s" }))) : null, h("div", { class: "alert-content" }, h("slot", { name: SLOTS.title }), h("slot", { name: SLOTS.message }), h("slot", { name: SLOTS.link })), queueCount, !autoDismiss ? closeButton : null, active && !queued && autoDismiss ? progressBar : null)));
118
134
  }
119
135
  // when an alert is opened or closed, update queue and determine active alert
120
136
  alertSync(event) {
@@ -160,8 +176,8 @@ let CalciteAlert = class {
160
176
  var _a;
161
177
  if (((_a = this.queue) === null || _a === void 0 ? void 0 : _a[0]) === this.el) {
162
178
  this.openAlert();
163
- clearTimeout(this.autoDismissTimeout);
164
- if (this.autoDismiss) {
179
+ if (this.autoDismiss && !this.autoDismissTimeout) {
180
+ this.trackTimer = new Date();
165
181
  this.autoDismissTimeout = window.setTimeout(() => this.closeAlert(), DURATIONS[this.autoDismissDuration]);
166
182
  }
167
183
  }
@@ -182,7 +198,8 @@ let CalciteAlert = class {
182
198
  static get watchers() { return {
183
199
  "active": ["watchActive"],
184
200
  "icon": ["updateRequestedIcon"],
185
- "color": ["updateRequestedIcon"]
201
+ "color": ["updateRequestedIcon"],
202
+ "autoDismissDuration": ["updateDuration"]
186
203
  }; }
187
204
  };
188
205
  CalciteAlert.style = calciteAlertCss;
@@ -192,7 +192,7 @@ let CalciteGraph = class {
192
192
  };
193
193
  CalciteGraph.style = calciteGraphCss;
194
194
 
195
- const calciteSliderCss = "@charset \"UTF-8\";@-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:300ms}.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}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{display:block}.container{display:block;position:relative;padding:7px 0;margin:7px 0.5rem}:host([disabled]){opacity:var(--calcite-ui-opacity-disabled);pointer-events:none}:host([disabled]) .track__range,:host([disabled]) .tick--active{background-color:var(--calcite-ui-text-3)}:host([disabled]) .graph .graph-path--highlight{fill:var(--calcite-ui-text-3)}:host([label-handles]) .container,:host([precise]:not([precise=false])) .container{margin-top:21px}:host([label-ticks]),:host([precise]:not([precise=false])) .container--range{margin-bottom:21px}:host([precise]:not([precise=false])[label-handles]) .container{margin-top:35px}:host([precise]:not([precise=false])[label-handles]) .container--range{margin-bottom:35px}.thumb{position:absolute;border-style:none;background-color:transparent;cursor:pointer;outline:2px solid transparent;outline-offset:2px;padding:0;margin:0;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;font-family:inherit;z-index:2;-webkit-transform:translate(7px, -8px);transform:translate(7px, -8px)}.thumb .handle__label{font-size:var(--calcite-font-size--2);font-weight:500;line-height:1;color:var(--calcite-ui-text-2);margin-bottom:5px}.thumb .handle__label.static,.thumb .handle__label.transformed{opacity:0;position:absolute;top:0;bottom:0}.thumb .handle__label.hyphen::after{content:\"—\";display:inline-block;width:1em}.thumb .handle{outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;height:14px;width:14px;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:100%;background-color:var(--calcite-ui-foreground-1);-webkit-box-shadow:0 0 0 2px var(--calcite-ui-text-3) inset;box-shadow:0 0 0 2px var(--calcite-ui-text-3) inset;-webkit-transition:border 0.25s ease, background-color 0.25s ease, -webkit-box-shadow 0.25s ease;transition:border 0.25s ease, background-color 0.25s ease, -webkit-box-shadow 0.25s ease;transition:border 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;transition:border 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease, -webkit-box-shadow 0.25s ease}.thumb .handle-extension{width:2px;height:7px;background-color:var(--calcite-ui-text-3)}.thumb:hover .handle{-webkit-box-shadow:0 0 0 3px var(--calcite-ui-brand) inset;box-shadow:0 0 0 3px var(--calcite-ui-brand) inset}.thumb:hover .handle-extension{background-color:var(--calcite-ui-brand)}.thumb:focus .handle{outline:2px solid var(--calcite-ui-brand);outline-offset:2px;outline-offset:2px}.thumb:focus .handle-extension{background-color:var(--calcite-ui-brand)}.thumb--minValue{-webkit-transform:translate(-7px, -8px);transform:translate(-7px, -8px)}:host([label-handles]) .thumb{-webkit-transform:translate(50%, -25px);transform:translate(50%, -25px)}:host([label-handles]) .thumb--minValue{-webkit-transform:translate(-50%, -25px);transform:translate(-50%, -25px)}:host([has-histogram][label-handles]) .thumb{-webkit-transform:translate(50%, -8px);transform:translate(50%, -8px)}:host([has-histogram][label-handles]) .thumb .handle__label{margin-bottom:unset;margin-top:5px}:host([has-histogram][label-handles]) .thumb--minValue{-webkit-transform:translate(-50%, -8px);transform:translate(-50%, -8px)}:host([precise]:not([precise=false])) .thumb{-webkit-transform:translate(7px, -21px);transform:translate(7px, -21px)}:host([precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-7px, -2px);transform:translate(-7px, -2px)}:host([precise]:not([precise=false])) .thumb--minValue .handle__label{margin-bottom:unset;margin-top:5px}:host([has-histogram][precise]:not([precise=false])) .thumb{-webkit-transform:translate(7px, -2px);transform:translate(7px, -2px)}:host([has-histogram][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -2px);transform:translate(-50%, -2px)}:host([ticks][precise]:not([precise=false])) .thumb{-webkit-transform:translate(7px, -20px);transform:translate(7px, -20px)}:host([ticks][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-7px, -3px);transform:translate(-7px, -3px)}:host([has-histogram][ticks][precise]:not([precise=false])) .thumb{-webkit-transform:translate(7px, -3px);transform:translate(7px, -3px)}:host([has-histogram][ticks][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -3px);transform:translate(-50%, -3px)}:host([label-handles][precise]:not([precise=false])) .thumb{-webkit-transform:translate(50%, -38px);transform:translate(50%, -38px)}:host([label-handles][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -2px);transform:translate(-50%, -2px)}:host([has-histogram][label-handles][precise]:not([precise=false])) .thumb{-webkit-transform:translate(50%, -2px);transform:translate(50%, -2px)}:host([has-histogram][label-handles][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -2px);transform:translate(-50%, -2px)}:host([ticks][label-handles][precise]:not([precise=false])) .thumb{-webkit-transform:translate(50%, -37px);transform:translate(50%, -37px)}:host([ticks][label-handles][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -3px);transform:translate(-50%, -3px)}:host([has-histogram][ticks][label-handles][precise]:not([precise=false])) .thumb{-webkit-transform:translate(50%, -3px);transform:translate(50%, -3px)}:host([has-histogram][ticks][label-handles][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -3px);transform:translate(-50%, -3px)}.thumb:focus,.thumb--active{z-index:3}.thumb:focus .handle,.thumb--active .handle{background-color:var(--calcite-ui-brand);-webkit-box-shadow:0 0 8px 0 rgba(0, 0, 0, 0.16);box-shadow:0 0 8px 0 rgba(0, 0, 0, 0.16)}.thumb:hover.thumb--precise:after,.thumb:focus.thumb--precise:after,.thumb--active.thumb--precise:after{background-color:var(--calcite-ui-brand)}.track{height:2px;border-radius:0;z-index:1;background-color:var(--calcite-ui-border-2);-webkit-transition:all 250ms ease-in;transition:all 250ms ease-in;position:relative}.track__range{position:absolute;top:0;height:2px;background-color:var(--calcite-ui-brand)}.container--range .track__range:hover{cursor:ew-resize}.container--range .track__range:after{content:\"\";position:absolute;top:-5px;width:100%;height:14px}.tick{position:absolute;top:-2px;width:2px;height:4px;left:var(--calcite-ui-border-1-offset);margin-left:-2px;border:1px solid var(--calcite-ui-foreground-1);background-color:var(--calcite-ui-border-1)}.tick--active{background-color:var(--calcite-ui-brand)}.tick__label{position:absolute;font-size:var(--calcite-font-size--2);font-weight:500;color:var(--calcite-ui-text-2);width:4em;margin:14px -2em;text-align:center;display:block;pointer-events:none}.tick__label--min{left:0;margin:14px -3px;text-align:left;-webkit-transition:opacity 150ms;transition:opacity 150ms}.tick__label--max{left:unset;right:0;margin:14px -3px;text-align:right;-webkit-transition:opacity 50ms;transition:opacity 50ms}:host([has-histogram][label-handles]) .tick__label--min,:host([has-histogram][label-handles]) .tick__label--max{margin:6px -3px;font-weight:300;color:var(--calcite-ui-text-3)}:host([has-histogram][precise]:not([precise=false])) .tick__label--min,:host([has-histogram][precise]:not([precise=false])) .tick__label--max{margin:6px -3px;font-weight:300;color:var(--calcite-ui-text-3)}.graph{color:var(--calcite-ui-foreground-3)}:host([mirrored]:not([has-histogram])) .tick__label--min{right:0;left:unset;text-align:right}:host([mirrored]:not([has-histogram])) .tick__label--max{right:unset;left:0;text-align:left}::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}";
195
+ const calciteSliderCss = "@charset \"UTF-8\";@-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:300ms}.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}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{display:block}.container{display:block;position:relative;padding:7px 0;margin:7px 0.5rem}:host([disabled]){opacity:var(--calcite-ui-opacity-disabled);pointer-events:none}:host([disabled]) .track__range,:host([disabled]) .tick--active{background-color:var(--calcite-ui-text-3)}:host([disabled]) .graph .graph-path--highlight{fill:var(--calcite-ui-text-3)}:host([label-handles]) .container,:host([precise]:not([precise=false])) .container{margin-top:21px}:host([label-ticks]),:host([precise]:not([precise=false])) .container--range{margin-bottom:21px}:host([precise]:not([precise=false])[label-handles]) .container{margin-top:35px}:host([precise]:not([precise=false])[label-handles]) .container--range{margin-bottom:35px}.thumb{position:absolute;border-style:none;background-color:transparent;cursor:pointer;outline:2px solid transparent;outline-offset:2px;padding:0;margin:0;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;font-family:inherit;z-index:2;-webkit-transform:translate(7px, -8px);transform:translate(7px, -8px)}.thumb .handle__label{font-size:var(--calcite-font-size--2);font-weight:500;line-height:1;color:var(--calcite-ui-text-2);margin-bottom:5px}.thumb .handle__label.static,.thumb .handle__label.transformed{opacity:0;position:absolute;top:0;bottom:0}.thumb .handle__label.hyphen::after{content:\"—\";display:inline-block;width:1em}.thumb .handle{outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;height:14px;width:14px;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:100%;background-color:var(--calcite-ui-foreground-1);-webkit-box-shadow:0 0 0 2px var(--calcite-ui-text-3) inset;box-shadow:0 0 0 2px var(--calcite-ui-text-3) inset;-webkit-transition:border 0.25s ease, background-color 0.25s ease, -webkit-box-shadow 0.25s ease;transition:border 0.25s ease, background-color 0.25s ease, -webkit-box-shadow 0.25s ease;transition:border 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;transition:border 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease, -webkit-box-shadow 0.25s ease}.thumb .handle-extension{width:2px;height:7px;background-color:var(--calcite-ui-text-3)}.thumb:hover .handle{-webkit-box-shadow:0 0 0 3px var(--calcite-ui-brand) inset;box-shadow:0 0 0 3px var(--calcite-ui-brand) inset}.thumb:hover .handle-extension{background-color:var(--calcite-ui-brand)}.thumb:focus .handle{outline:2px solid var(--calcite-ui-brand);outline-offset:2px;outline-offset:2px}.thumb:focus .handle-extension{background-color:var(--calcite-ui-brand)}.thumb--minValue{-webkit-transform:translate(-7px, -8px);transform:translate(-7px, -8px)}:host([label-handles]) .thumb{-webkit-transform:translate(50%, -25px);transform:translate(50%, -25px)}:host([label-handles]) .thumb--minValue{-webkit-transform:translate(-50%, -25px);transform:translate(-50%, -25px)}:host([has-histogram][label-handles]) .thumb{-webkit-transform:translate(50%, -8px);transform:translate(50%, -8px)}:host([has-histogram][label-handles]) .thumb .handle__label{margin-bottom:unset;margin-top:5px}:host([has-histogram][label-handles]) .thumb--minValue{-webkit-transform:translate(-50%, -8px);transform:translate(-50%, -8px)}:host([precise]:not([precise=false])) .thumb{-webkit-transform:translate(7px, -21px);transform:translate(7px, -21px)}:host([precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-7px, -2px);transform:translate(-7px, -2px)}:host([precise]:not([precise=false])) .thumb--minValue .handle__label{margin-bottom:unset;margin-top:5px}:host([has-histogram][precise]:not([precise=false])) .thumb{-webkit-transform:translate(7px, -2px);transform:translate(7px, -2px)}:host([has-histogram][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -2px);transform:translate(-50%, -2px)}:host([ticks][precise]:not([precise=false])) .thumb{-webkit-transform:translate(7px, -20px);transform:translate(7px, -20px)}:host([ticks][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-7px, -3px);transform:translate(-7px, -3px)}:host([has-histogram][ticks][precise]:not([precise=false])) .thumb{-webkit-transform:translate(7px, -3px);transform:translate(7px, -3px)}:host([has-histogram][ticks][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -3px);transform:translate(-50%, -3px)}:host([label-handles][precise]:not([precise=false])) .thumb{-webkit-transform:translate(50%, -38px);transform:translate(50%, -38px)}:host([label-handles][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -2px);transform:translate(-50%, -2px)}:host([has-histogram][label-handles][precise]:not([precise=false])) .thumb{-webkit-transform:translate(50%, -2px);transform:translate(50%, -2px)}:host([has-histogram][label-handles][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -2px);transform:translate(-50%, -2px)}:host([ticks][label-handles][precise]:not([precise=false])) .thumb{-webkit-transform:translate(50%, -37px);transform:translate(50%, -37px)}:host([ticks][label-handles][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -3px);transform:translate(-50%, -3px)}:host([has-histogram][ticks][label-handles][precise]:not([precise=false])) .thumb{-webkit-transform:translate(50%, -3px);transform:translate(50%, -3px)}:host([has-histogram][ticks][label-handles][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -3px);transform:translate(-50%, -3px)}.thumb:focus,.thumb--active{z-index:3}.thumb:focus .handle,.thumb--active .handle{background-color:var(--calcite-ui-brand);-webkit-box-shadow:0 0 8px 0 rgba(0, 0, 0, 0.16);box-shadow:0 0 8px 0 rgba(0, 0, 0, 0.16)}.thumb:hover.thumb--precise:after,.thumb:focus.thumb--precise:after,.thumb--active.thumb--precise:after{background-color:var(--calcite-ui-brand)}.track{height:2px;border-radius:0;z-index:1;background-color:var(--calcite-ui-border-2);-webkit-transition:all 250ms ease-in;transition:all 250ms ease-in;position:relative}.track__range{position:absolute;top:0;height:2px;background-color:var(--calcite-ui-brand)}.container--range .track__range:hover{cursor:ew-resize}.container--range .track__range:after{content:\"\";position:absolute;top:-5px;width:100%;height:14px}.tick{position:absolute;top:-2px;width:2px;height:4px;left:var(--calcite-ui-border-1-offset);margin-left:-2px;border:1px solid var(--calcite-ui-foreground-1);background-color:var(--calcite-ui-border-1);pointer-events:none}.tick--active{background-color:var(--calcite-ui-brand)}.tick__label{position:absolute;font-size:var(--calcite-font-size--2);font-weight:500;color:var(--calcite-ui-text-2);width:4em;margin:14px -2em;text-align:center;display:block;pointer-events:none}.tick__label--min{left:0;margin:14px -3px;text-align:left;-webkit-transition:opacity 150ms;transition:opacity 150ms}.tick__label--max{left:unset;right:0;margin:14px -3px;text-align:right;-webkit-transition:opacity 50ms;transition:opacity 50ms}:host([has-histogram][label-handles]) .tick__label--min,:host([has-histogram][label-handles]) .tick__label--max{margin:6px -3px;font-weight:300;color:var(--calcite-ui-text-3)}:host([has-histogram][precise]:not([precise=false])) .tick__label--min,:host([has-histogram][precise]:not([precise=false])) .tick__label--max{margin:6px -3px;font-weight:300;color:var(--calcite-ui-text-3)}.graph{color:var(--calcite-ui-foreground-3)}:host([mirrored]:not([has-histogram])) .tick__label--min{right:0;left:unset;text-align:right}:host([mirrored]:not([has-histogram])) .tick__label--max{right:unset;left:0;text-align:left}::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}";
196
196
 
197
197
  let CalciteSlider = class {
198
198
  constructor(hostRef) {
@@ -268,11 +268,11 @@ let CalciteSlider = class {
268
268
  }
269
269
  }
270
270
  };
271
- this.dragEnd = () => {
271
+ this.dragEnd = (event) => {
272
272
  document.removeEventListener("pointermove", this.dragUpdate);
273
273
  document.removeEventListener("pointerup", this.dragEnd);
274
274
  document.removeEventListener("pointercancel", this.dragEnd);
275
- this.focusActiveHandle();
275
+ this.focusActiveHandle(event.clientX);
276
276
  if (this.lastDragPropValue != this[this.dragProp]) {
277
277
  this.emitChange();
278
278
  }
@@ -541,8 +541,8 @@ let CalciteSlider = class {
541
541
  event.preventDefault();
542
542
  this.setValue(activeProp, this.clamp(adjustment, activeProp));
543
543
  }
544
- clickHandler() {
545
- this.focusActiveHandle();
544
+ clickHandler(event) {
545
+ this.focusActiveHandle(event.clientX);
546
546
  }
547
547
  pointerDownHandler(event) {
548
548
  const x = event.clientX || event.pageX;
@@ -613,16 +613,16 @@ let CalciteSlider = class {
613
613
  document.addEventListener("pointerup", this.dragEnd);
614
614
  document.addEventListener("pointercancel", this.dragEnd);
615
615
  }
616
- focusActiveHandle() {
616
+ focusActiveHandle(valueX) {
617
617
  switch (this.dragProp) {
618
- default:
619
- case "maxValue":
620
- this.maxHandle.focus();
621
- break;
622
618
  case "minValue":
623
619
  this.minHandle.focus();
624
620
  break;
621
+ case "maxValue":
622
+ this.maxHandle.focus();
623
+ break;
625
624
  case "minMaxValue":
625
+ this.getClosestHandle(valueX).focus();
626
626
  break;
627
627
  }
628
628
  }
@@ -693,6 +693,14 @@ let CalciteSlider = class {
693
693
  }
694
694
  return num;
695
695
  }
696
+ getClosestHandle(valueX) {
697
+ return this.getDistanceX(this.maxHandle, valueX) > this.getDistanceX(this.minHandle, valueX)
698
+ ? this.minHandle
699
+ : this.maxHandle;
700
+ }
701
+ getDistanceX(el, valueX) {
702
+ return Math.abs(el.getBoundingClientRect().left - valueX);
703
+ }
696
704
  getFontSizeForElement(element) {
697
705
  return Number(window.getComputedStyle(element).getPropertyValue("font-size").match(/\d+/)[0]);
698
706
  }
@@ -230,12 +230,13 @@ let CalciteInput = class {
230
230
  const inputMin = this.minString ? parseFloat(this.minString) : null;
231
231
  const valueNudgeDelayInMs = 100;
232
232
  this.incrementOrDecrementNumberValue(direction, inputMax, inputMin, nativeEvent);
233
- let nudgeNumberValueIntervalCount = 0;
233
+ let firstValueNudge = true;
234
234
  this.nudgeNumberValueIntervalId = setInterval(() => {
235
- nudgeNumberValueIntervalCount !== 0
236
- ? this.incrementOrDecrementNumberValue(direction, inputMax, inputMin, nativeEvent)
237
- : null;
238
- nudgeNumberValueIntervalCount++;
235
+ if (firstValueNudge) {
236
+ firstValueNudge = false;
237
+ return;
238
+ }
239
+ this.incrementOrDecrementNumberValue(direction, inputMax, inputMin, nativeEvent);
239
240
  }, valueNudgeDelayInMs);
240
241
  };
241
242
  this.numberButtonMouseUpAndMouseOutHandler = () => {
@@ -380,17 +381,18 @@ let CalciteInput = class {
380
381
  this.setFocus();
381
382
  }
382
383
  incrementOrDecrementNumberValue(direction, inputMax, inputMin, nativeEvent) {
383
- const value = this.value;
384
+ const { value } = this;
384
385
  const inputStep = this.step === "any" ? 1 : Math.abs(this.step || 1);
385
386
  const inputVal = value && value !== "" ? parseFloat(value) : 0;
386
- let newValue = value;
387
- if (direction === "up" && ((!inputMax && inputMax !== 0) || inputVal < inputMax)) {
388
- newValue = (inputVal + inputStep).toFixed(decimalPlaces(inputStep)).toString();
389
- }
390
- if (direction === "down" && ((!inputMin && inputMin !== 0) || inputVal > inputMin)) {
391
- newValue = (inputVal - inputStep).toFixed(decimalPlaces(inputStep)).toString();
392
- }
393
- this.setValue(newValue, nativeEvent, true);
387
+ const adjustment = direction === "up" ? 1 : -1;
388
+ const nudgedValue = inputVal + inputStep * adjustment;
389
+ const finalValue = (typeof inputMin === "number" && !isNaN(inputMin) && nudgedValue < inputMin) ||
390
+ (typeof inputMax === "number" && !isNaN(inputMax) && nudgedValue > inputMax)
391
+ ? inputVal
392
+ : nudgedValue;
393
+ const inputValPlaces = decimalPlaces(inputVal);
394
+ const inputStepPlaces = decimalPlaces(inputStep);
395
+ this.setValue(finalValue.toFixed(Math.max(inputValPlaces, inputStepPlaces)), nativeEvent, true);
394
396
  }
395
397
  onFormReset() {
396
398
  this.setValue(this.defaultValue);
@@ -94,11 +94,7 @@ let CalciteRadioButton = class {
94
94
  //
95
95
  //--------------------------------------------------------------------------
96
96
  this.selectItem = (items, selectedIndex) => {
97
- items.forEach((item, index) => {
98
- const selected = index === selectedIndex;
99
- item.checked = selected;
100
- item.focused = selected;
101
- });
97
+ items[selectedIndex].click();
102
98
  };
103
99
  this.queryButtons = () => {
104
100
  return Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden]")).filter((radioButton) => radioButton.name === this.name);
@@ -113,8 +109,8 @@ let CalciteRadioButton = class {
113
109
  }
114
110
  this.uncheckAllRadioButtonsInGroup();
115
111
  this.checked = true;
116
- this.focused = true;
117
112
  this.calciteRadioButtonChange.emit();
113
+ this.setFocus();
118
114
  };
119
115
  this.clickHandler = () => {
120
116
  this.check();
@@ -275,7 +271,7 @@ let CalciteRadioButton = class {
275
271
  }
276
272
  componentDidLoad() {
277
273
  if (this.focused) {
278
- this.containerEl.focus();
274
+ this.setFocus();
279
275
  }
280
276
  }
281
277
  disconnectedCallback() {
@@ -2,8 +2,9 @@
2
2
  * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
4
  */
5
- import { r as registerInstance, h, F as Fragment, g as getElement, c as createEvent } from './index-9de00868.js';
5
+ import { r as registerInstance, h, F as Fragment, g as getElement, c as createEvent, f as forceUpdate } from './index-9de00868.js';
6
6
  import { g as getSlotted, a as getElementDir, C as CSS_UTILITY } from './dom-f24e866c.js';
7
+ import { c as clamp } from './math-456207f5.js';
7
8
  import './guid-196bd5ea.js';
8
9
 
9
10
  const CSS$2 = {
@@ -135,14 +136,18 @@ const CSS = {
135
136
  content: "content",
136
137
  contentHeader: "content__header",
137
138
  contentBody: "content__body",
138
- contentDetached: "content--detached"
139
+ contentDetached: "content--detached",
140
+ separator: "separator"
139
141
  };
140
142
  const SLOTS = {
141
143
  actionBar: "action-bar",
142
144
  header: "header"
143
145
  };
146
+ const TEXT = {
147
+ resize: "Resize"
148
+ };
144
149
 
145
- const calciteShellPanelCss = "@-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:300ms}.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}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;-ms-flex:0 1 auto;flex:0 1 auto;--calcite-shell-panel-detached-max-height:unset}.container{-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;background-color:transparent;-ms-flex:1 1 auto;flex:1 1 auto;pointer-events:none;color:var(--calcite-ui-text-2);font-size:var(--calcite-font-size--1)}.container *{-webkit-box-sizing:border-box;box-sizing:border-box}::slotted(calcite-panel),::slotted(calcite-flow){-ms-flex:1 1 auto;flex:1 1 auto;height:100%;width:100%;max-height:unset;max-width:unset}::slotted(.calcite-match-height){display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;overflow:hidden}.content{-ms-flex-align:stretch;align-items:stretch;-ms-flex-item-align:stretch;align-self:stretch;background-color:var(--calcite-ui-background);display:-ms-flexbox;display:flex;padding:0;pointer-events:auto;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;width:var(--calcite-shell-panel-width);max-width:var(--calcite-shell-panel-max-width);min-width:var(--calcite-shell-panel-min-width);-webkit-transition:max-height 150ms ease-in-out, max-width 150ms ease-in-out;transition:max-height 150ms ease-in-out, max-width 150ms ease-in-out}.content__header{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:0 1 auto;flex:0 1 auto;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-align:stretch;align-items:stretch}.content__body{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-direction:column;flex-direction:column;overflow:hidden}:host([width-scale=s]) .content{--calcite-shell-panel-width:calc(var(--calcite-panel-width-multiplier) * 12vw);--calcite-shell-panel-max-width:calc(var(--calcite-panel-width-multiplier) * 300px);--calcite-shell-panel-min-width:calc(var(--calcite-panel-width-multiplier) * 150px)}:host([width-scale=m]) .content{--calcite-shell-panel-width:calc(var(--calcite-panel-width-multiplier) * 20vw);--calcite-shell-panel-max-width:calc(var(--calcite-panel-width-multiplier) * 420px);--calcite-shell-panel-min-width:calc(var(--calcite-panel-width-multiplier) * 240px)}:host([width-scale=l]) .content{--calcite-shell-panel-width:calc(var(--calcite-panel-width-multiplier) * 45vw);--calcite-shell-panel-max-width:calc(var(--calcite-panel-width-multiplier) * 680px);--calcite-shell-panel-min-width:calc(var(--calcite-panel-width-multiplier) * 340px)}:host([detached-height-scale=s]) .content--detached{--calcite-shell-panel-detached-max-height:40vh}:host([detached-height-scale=m]) .content--detached{--calcite-shell-panel-detached-max-height:60vh}:host([detached-height-scale=l]) .content--detached{--calcite-shell-panel-detached-max-height:80vh}.content--detached{border-radius:0.25rem;-webkit-box-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);box-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);height:auto;overflow:hidden;margin-top:0.5rem;margin-bottom:auto;margin-left:0.5rem;margin-right:0.5rem;max-height:var(--calcite-shell-panel-detached-max-height)}.content--detached ::slotted(calcite-panel),.content--detached ::slotted(calcite-flow){max-height:unset}:host([position=start]) .content--detached ::slotted(calcite-panel),:host([position=start]) .content--detached ::slotted(calcite-flow),:host([position=end]) .content--detached ::slotted(calcite-panel),:host([position=end]) .content--detached ::slotted(calcite-flow){border-style:none}.content[hidden]{display:none}slot[name=action-bar]::slotted(calcite-action-bar),.content ::slotted(calcite-flow),.content ::slotted(calcite-panel){border-width:1px;border-color:var(--calcite-ui-border-3);border-style:solid}:host([position=start]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=start]) .content ::slotted(calcite-flow),:host([position=start]) .content ::slotted(calcite-panel){-webkit-border-start:none;border-inline-start:none}:host([position=end]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=end]) .content ::slotted(calcite-flow),:host([position=end]) .content ::slotted(calcite-panel){-webkit-border-end:none;border-inline-end:none}";
150
+ const calciteShellPanelCss = "@-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:300ms}.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}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;-ms-flex:0 1 auto;flex:0 1 auto;--calcite-shell-panel-detached-max-height:unset}.container{-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;background-color:transparent;-ms-flex:1 1 auto;flex:1 1 auto;pointer-events:none;color:var(--calcite-ui-text-2);font-size:var(--calcite-font-size--1)}.container *{-webkit-box-sizing:border-box;box-sizing:border-box}:host(:hover) .separator:not(:hover):not(:focus),:host(:focus-within) .separator:not(:hover):not(:focus){opacity:1;background-color:var(--calcite-ui-border-3)}.separator{position:absolute;background-color:transparent;bottom:0;display:-ms-flexbox;display:flex;height:100%;opacity:0;pointer-events:auto;top:0;-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transition-delay:0s;transition-delay:0s;width:0.125rem;z-index:10;cursor:col-resize;outline:none}.separator:hover{opacity:1;background-color:var(--calcite-ui-border-2)}.separator:focus{background-color:var(--calcite-ui-brand);opacity:1}:host([position=start]) .separator{inset-inline-end:-2px}:host([position=end]) .separator{inset-inline-start:-2px}::slotted(calcite-panel),::slotted(calcite-flow){-ms-flex:1 1 auto;flex:1 1 auto;height:100%;width:100%;max-height:unset;max-width:unset}::slotted(.calcite-match-height){display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;overflow:hidden}.content{-ms-flex-align:stretch;align-items:stretch;-ms-flex-item-align:stretch;align-self:stretch;background-color:var(--calcite-ui-background);display:-ms-flexbox;display:flex;padding:0;pointer-events:auto;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;width:var(--calcite-shell-panel-width);max-width:var(--calcite-shell-panel-max-width);min-width:var(--calcite-shell-panel-min-width);-webkit-transition:max-height 150ms ease-in-out, max-width 150ms ease-in-out;transition:max-height 150ms ease-in-out, max-width 150ms ease-in-out}.content__header{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:0 1 auto;flex:0 1 auto;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-align:stretch;align-items:stretch}.content__body{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-direction:column;flex-direction:column;overflow:hidden}:host([width-scale=s]) .content{--calcite-shell-panel-width:calc(var(--calcite-panel-width-multiplier) * 12vw);--calcite-shell-panel-max-width:calc(var(--calcite-panel-width-multiplier) * 300px);--calcite-shell-panel-min-width:calc(var(--calcite-panel-width-multiplier) * 150px)}:host([width-scale=m]) .content{--calcite-shell-panel-width:calc(var(--calcite-panel-width-multiplier) * 20vw);--calcite-shell-panel-max-width:calc(var(--calcite-panel-width-multiplier) * 420px);--calcite-shell-panel-min-width:calc(var(--calcite-panel-width-multiplier) * 240px)}:host([width-scale=l]) .content{--calcite-shell-panel-width:calc(var(--calcite-panel-width-multiplier) * 45vw);--calcite-shell-panel-max-width:calc(var(--calcite-panel-width-multiplier) * 680px);--calcite-shell-panel-min-width:calc(var(--calcite-panel-width-multiplier) * 340px)}:host([detached-height-scale=s]) .content--detached{--calcite-shell-panel-detached-max-height:40vh}:host([detached-height-scale=m]) .content--detached{--calcite-shell-panel-detached-max-height:60vh}:host([detached-height-scale=l]) .content--detached{--calcite-shell-panel-detached-max-height:80vh}.content--detached{border-radius:0.25rem;-webkit-box-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);box-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);height:auto;overflow:hidden;margin-top:0.5rem;margin-bottom:auto;margin-left:0.5rem;margin-right:0.5rem;max-height:var(--calcite-shell-panel-detached-max-height)}.content--detached ::slotted(calcite-panel),.content--detached ::slotted(calcite-flow){max-height:unset}:host([position=start]) .content--detached ::slotted(calcite-panel),:host([position=start]) .content--detached ::slotted(calcite-flow),:host([position=end]) .content--detached ::slotted(calcite-panel),:host([position=end]) .content--detached ::slotted(calcite-flow){border-style:none}.content[hidden]{display:none}slot[name=action-bar]::slotted(calcite-action-bar),.content ::slotted(calcite-flow),.content ::slotted(calcite-panel){border-width:1px;border-color:var(--calcite-ui-border-3);border-style:solid}:host([position=start]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=start]) .content ::slotted(calcite-flow),:host([position=start]) .content ::slotted(calcite-panel){-webkit-border-start:none;border-inline-start:none}:host([position=end]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=end]) .content ::slotted(calcite-flow),:host([position=end]) .content ::slotted(calcite-panel){-webkit-border-end:none;border-inline-end:none}";
146
151
 
147
152
  let CalciteShellPanel = class {
148
153
  constructor(hostRef) {
@@ -169,10 +174,121 @@ let CalciteShellPanel = class {
169
174
  * This sets width of the content area.
170
175
  */
171
176
  this.widthScale = "m";
177
+ /**
178
+ * Accessible label for resize separator.
179
+ * @default "Resize"
180
+ */
181
+ this.intlResize = TEXT.resize;
182
+ /**
183
+ * This property makes the content area resizable if the calcite-shell-panel is not 'detached'.
184
+ */
185
+ this.resizable = false;
186
+ this.contentWidth = null;
187
+ this.initialContentWidth = null;
188
+ this.initialClientX = null;
189
+ this.contentWidthMax = null;
190
+ this.contentWidthMin = null;
191
+ this.step = 1;
192
+ this.stepMultiplier = 10;
193
+ this.storeContentEl = (contentEl) => {
194
+ this.contentEl = contentEl;
195
+ };
196
+ this.getKeyAdjustedWidth = (event) => {
197
+ const { key } = event;
198
+ const { step, stepMultiplier, contentWidthMin, contentWidthMax, initialContentWidth, position } = this;
199
+ const multipliedStep = step * stepMultiplier;
200
+ const MOVEMENT_KEYS = [
201
+ "ArrowUp",
202
+ "ArrowDown",
203
+ "ArrowLeft",
204
+ "ArrowRight",
205
+ "Home",
206
+ "End",
207
+ "PageUp",
208
+ "PageDown"
209
+ ];
210
+ if (MOVEMENT_KEYS.indexOf(key) > -1) {
211
+ event.preventDefault();
212
+ }
213
+ const increaseKeys = key === "ArrowUp" || (position === "end" ? key === "ArrowLeft" : key === "ArrowRight");
214
+ if (increaseKeys) {
215
+ const stepValue = event.shiftKey ? multipliedStep : step;
216
+ return initialContentWidth + stepValue;
217
+ }
218
+ const decreaseKeys = key === "ArrowDown" || (position === "end" ? key === "ArrowRight" : key === "ArrowLeft");
219
+ if (decreaseKeys) {
220
+ const stepValue = event.shiftKey ? multipliedStep : step;
221
+ return initialContentWidth - stepValue;
222
+ }
223
+ if (typeof contentWidthMin === "number" && key === "Home") {
224
+ return contentWidthMin;
225
+ }
226
+ if (typeof contentWidthMax === "number" && key === "End") {
227
+ return contentWidthMax;
228
+ }
229
+ if (key === "PageDown") {
230
+ return initialContentWidth - multipliedStep;
231
+ }
232
+ if (key === "PageUp") {
233
+ return initialContentWidth + multipliedStep;
234
+ }
235
+ return null;
236
+ };
237
+ this.separatorKeyDown = (event) => {
238
+ this.setInitialContentWidth();
239
+ const width = this.getKeyAdjustedWidth(event);
240
+ if (typeof width === "number") {
241
+ this.setContentWidth(width);
242
+ }
243
+ };
244
+ this.separatorPointerMove = (event) => {
245
+ event.preventDefault();
246
+ const { initialContentWidth, position, initialClientX } = this;
247
+ const offset = event.clientX - initialClientX;
248
+ this.setContentWidth(position === "end" ? initialContentWidth - offset : initialContentWidth + offset);
249
+ };
250
+ this.separatorPointerUp = (event) => {
251
+ event.preventDefault();
252
+ document.removeEventListener("pointerup", this.separatorPointerUp);
253
+ document.removeEventListener("pointermove", this.separatorPointerMove);
254
+ };
255
+ this.setInitialContentWidth = () => {
256
+ var _a;
257
+ this.initialContentWidth = (_a = this.contentEl) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().width;
258
+ };
259
+ this.separatorPointerDown = (event) => {
260
+ event.preventDefault();
261
+ const { separatorEl } = this;
262
+ separatorEl && document.activeElement !== separatorEl && separatorEl.focus();
263
+ this.setInitialContentWidth();
264
+ this.initialClientX = event.clientX;
265
+ document.addEventListener("pointerup", this.separatorPointerUp);
266
+ document.addEventListener("pointermove", this.separatorPointerMove);
267
+ };
268
+ this.connectSeparator = (separatorEl) => {
269
+ this.disconnectSeparator();
270
+ this.separatorEl = separatorEl;
271
+ separatorEl.addEventListener("pointerdown", this.separatorPointerDown);
272
+ };
273
+ this.disconnectSeparator = () => {
274
+ var _a;
275
+ (_a = this.separatorEl) === null || _a === void 0 ? void 0 : _a.removeEventListener("pointerdown", this.separatorPointerDown);
276
+ };
172
277
  }
173
278
  watchHandler() {
174
279
  this.calciteShellPanelToggle.emit();
175
280
  }
281
+ //--------------------------------------------------------------------------
282
+ //
283
+ // Lifecycle
284
+ //
285
+ //--------------------------------------------------------------------------
286
+ disconnectedCallback() {
287
+ this.disconnectSeparator();
288
+ }
289
+ componentDidLoad() {
290
+ this.updateAriaValues();
291
+ }
176
292
  // --------------------------------------------------------------------------
177
293
  //
178
294
  // Render Methods
@@ -184,15 +300,50 @@ let CalciteShellPanel = class {
184
300
  return hasHeader ? (h("div", { class: CSS.contentHeader }, h("slot", { name: SLOTS.header }))) : null;
185
301
  }
186
302
  render() {
187
- const { collapsed, detached, position } = this;
188
- const contentNode = (h("div", { class: { [CSS.content]: true, [CSS.contentDetached]: detached }, hidden: collapsed }, this.renderHeader(), h("div", { class: CSS.contentBody }, h("slot", null))));
303
+ const { collapsed, detached, position, initialContentWidth, contentWidth, contentWidthMax, contentWidthMin, intlResize, resizable } = this;
304
+ const allowResizing = !detached && resizable;
305
+ const contentNode = (h("div", { class: { [CSS.content]: true, [CSS.contentDetached]: detached }, hidden: collapsed, ref: this.storeContentEl, style: allowResizing && contentWidth ? { width: `${contentWidth}px` } : null }, this.renderHeader(), h("div", { class: CSS.contentBody }, h("slot", null))));
306
+ const separatorNode = allowResizing ? (h("div", { "aria-label": intlResize, "aria-orientation": "horizontal", "aria-valuemax": contentWidthMax, "aria-valuemin": contentWidthMin, "aria-valuenow": contentWidth !== null && contentWidth !== void 0 ? contentWidth : initialContentWidth, class: CSS.separator, onKeyDown: this.separatorKeyDown, ref: this.connectSeparator, role: "separator", tabIndex: 0, "touch-action": "none" })) : null;
189
307
  const actionBarNode = h("slot", { name: SLOTS.actionBar });
190
- const mainNodes = [actionBarNode, contentNode];
308
+ const mainNodes = [actionBarNode, contentNode, separatorNode];
191
309
  if (position === "end") {
192
310
  mainNodes.reverse();
193
311
  }
194
312
  return h("div", { class: { [CSS.container]: true } }, mainNodes);
195
313
  }
314
+ // --------------------------------------------------------------------------
315
+ //
316
+ // private Methods
317
+ //
318
+ // --------------------------------------------------------------------------
319
+ setContentWidth(width) {
320
+ const { contentWidthMax, contentWidthMin } = this;
321
+ const roundedWidth = Math.round(width);
322
+ this.contentWidth =
323
+ typeof contentWidthMax === "number" && typeof contentWidthMin === "number"
324
+ ? clamp(roundedWidth, contentWidthMin, contentWidthMax)
325
+ : roundedWidth;
326
+ }
327
+ updateAriaValues() {
328
+ const { contentEl } = this;
329
+ const computedStyle = contentEl && getComputedStyle(contentEl);
330
+ if (!computedStyle) {
331
+ return;
332
+ }
333
+ const max = parseInt(computedStyle.getPropertyValue("max-width"), 10);
334
+ const min = parseInt(computedStyle.getPropertyValue("min-width"), 10);
335
+ const valueNow = parseInt(computedStyle.getPropertyValue("width"), 10);
336
+ if (typeof valueNow === "number" && !isNaN(valueNow)) {
337
+ this.initialContentWidth = valueNow;
338
+ }
339
+ if (typeof max === "number" && !isNaN(max)) {
340
+ this.contentWidthMax = max;
341
+ }
342
+ if (typeof min === "number" && !isNaN(min)) {
343
+ this.contentWidthMin = min;
344
+ }
345
+ forceUpdate(this);
346
+ }
196
347
  get el() { return getElement(this); }
197
348
  static get watchers() { return {
198
349
  "collapsed": ["watchHandler"]
@@ -68,7 +68,7 @@ let CalciteTileSelect = class {
68
68
  event.stopPropagation();
69
69
  this.calciteTileSelectChange.emit();
70
70
  }
71
- checkboxFocusHandler(event) {
71
+ checkboxFocusBlurHandler(event) {
72
72
  const checkbox = event.target;
73
73
  if (checkbox === this.input) {
74
74
  this.focused = event.detail;
@@ -90,7 +90,7 @@ let CalciteTileSelect = class {
90
90
  }
91
91
  event.stopPropagation();
92
92
  }
93
- radioButtonFocusHandler(event) {
93
+ radioButtonFocusBlurHandler(event) {
94
94
  const radioButton = event.target;
95
95
  if (radioButton === this.input) {
96
96
  this.focused = radioButton.focused;