@esri/calcite-components 1.0.0-next.372 → 1.0.0-next.376

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 (175) hide show
  1. package/dist/calcite/assets/calcite-date-picker/nls/pt-BR.json +31 -0
  2. package/dist/calcite/assets/calcite-date-picker/nls/pt-PT.json +3 -3
  3. package/dist/calcite/calcite.esm.js +1 -1
  4. package/dist/calcite/p-05ad8606.system.entry.js +5 -0
  5. package/dist/calcite/{p-32d61433.system.entry.js → p-2f0d280a.system.entry.js} +1 -1
  6. package/dist/calcite/{p-617c3f30.system.entry.js → p-3dd50bac.system.entry.js} +1 -1
  7. package/dist/calcite/{p-f12c35de.system.entry.js → p-4d81b84b.system.entry.js} +2 -2
  8. package/dist/calcite/{p-7a6c932d.system.entry.js → p-4d88c604.system.entry.js} +1 -1
  9. package/dist/calcite/p-4e258f5c.entry.js +5 -0
  10. package/dist/calcite/{p-92d9b81d.system.entry.js → p-6a2ac09a.system.entry.js} +1 -1
  11. package/dist/calcite/{p-82491929.entry.js → p-6e37af80.entry.js} +1 -1
  12. package/dist/calcite/p-6eb1302b.entry.js +5 -0
  13. package/dist/calcite/p-7409e609.system.js +5 -0
  14. package/dist/calcite/p-7415264e.system.entry.js +5 -0
  15. package/dist/calcite/p-76c53ab5.entry.js +5 -0
  16. package/dist/calcite/{p-f24ddc56.system.entry.js → p-80eb08b3.system.entry.js} +1 -1
  17. package/dist/calcite/p-8a413063.js +5 -0
  18. package/dist/calcite/{p-ee14736a.entry.js → p-8c126095.entry.js} +1 -1
  19. package/dist/calcite/{p-2e324a56.system.entry.js → p-92711575.system.entry.js} +2 -2
  20. package/dist/calcite/p-99b729f6.entry.js +5 -0
  21. package/dist/calcite/p-99d32fc3.system.js +1 -1
  22. package/dist/calcite/p-a49d1a11.system.entry.js +5 -0
  23. package/dist/calcite/p-a5660ba5.entry.js +5 -0
  24. package/dist/calcite/p-aceeb62f.entry.js +5 -0
  25. package/dist/calcite/p-b3e034cb.entry.js +5 -0
  26. package/dist/calcite/p-b78f6de5.system.entry.js +5 -0
  27. package/dist/calcite/p-bab0c984.entry.js +5 -0
  28. package/dist/calcite/{p-39d4d1b1.system.entry.js → p-bd6cbbbd.system.entry.js} +1 -1
  29. package/dist/calcite/p-c39e7451.entry.js +5 -0
  30. package/dist/calcite/{p-8709d314.system.entry.js → p-c93dbb93.system.entry.js} +1 -1
  31. package/dist/calcite/{p-baca86e3.entry.js → p-cb3a8861.entry.js} +1 -1
  32. package/dist/calcite/p-d2bcb3ae.entry.js +5 -0
  33. package/dist/calcite/p-d6f6b6c1.entry.js +5 -0
  34. package/dist/calcite/p-dd8b6d4f.system.entry.js +5 -0
  35. package/dist/calcite/p-e05aa070.entry.js +5 -0
  36. package/dist/calcite/p-e66c335c.entry.js +5 -0
  37. package/dist/calcite/p-f3102bbb.system.entry.js +5 -0
  38. package/dist/calcite/p-f3a85d19.system.entry.js +5 -0
  39. package/dist/calcite/{p-3cdf0ad5.system.entry.js → p-fd3c4738.system.entry.js} +1 -1
  40. package/dist/calcite/p-fe6e3ff9.entry.js +5 -0
  41. package/dist/cjs/calcite-accordion_2.cjs.entry.js +6 -3
  42. package/dist/cjs/calcite-action-menu.cjs.entry.js +1 -4
  43. package/dist/cjs/calcite-alert.cjs.entry.js +4 -6
  44. package/dist/cjs/calcite-date-picker_4.cjs.entry.js +1 -1
  45. package/dist/cjs/calcite-dropdown_3.cjs.entry.js +1 -1
  46. package/dist/cjs/calcite-graph_2.cjs.entry.js +7 -3
  47. package/dist/cjs/calcite-inline-editable.cjs.entry.js +38 -13
  48. package/dist/cjs/calcite-input-date-picker.cjs.entry.js +1 -1
  49. package/dist/cjs/calcite-input-time-picker_2.cjs.entry.js +1 -1
  50. package/dist/cjs/calcite-input.cjs.entry.js +11 -7
  51. package/dist/cjs/calcite-modal.cjs.entry.js +1 -1
  52. package/dist/cjs/calcite-notice.cjs.entry.js +4 -6
  53. package/dist/cjs/calcite-panel.cjs.entry.js +17 -1
  54. package/dist/cjs/calcite-radio-button-group.cjs.entry.js +13 -0
  55. package/dist/cjs/calcite-radio-button.cjs.entry.js +0 -4
  56. package/dist/cjs/calcite-shell_3.cjs.entry.js +7 -4
  57. package/dist/cjs/calcite-tree_2.cjs.entry.js +14 -7
  58. package/dist/cjs/calcite.cjs.js +1 -1
  59. package/dist/cjs/loader.cjs.js +1 -1
  60. package/dist/cjs/{resources-11763017.js → resources-f70fb01b.js} +3 -0
  61. package/dist/collection/components/calcite-accordion/calcite-accordion.css +5 -5
  62. package/dist/collection/components/calcite-accordion/calcite-accordion.js +5 -1
  63. package/dist/collection/components/calcite-accordion-item/calcite-accordion-item.css +2 -16
  64. package/dist/collection/components/calcite-action-menu/calcite-action-menu.js +1 -4
  65. package/dist/collection/components/calcite-alert/calcite-alert.js +8 -7
  66. package/dist/collection/components/calcite-date-picker/assets/calcite-date-picker/nls/pt-BR.json +31 -0
  67. package/dist/collection/components/calcite-date-picker/assets/calcite-date-picker/nls/pt-PT.json +3 -3
  68. package/dist/collection/components/calcite-date-picker/utils.js +3 -0
  69. package/dist/collection/components/calcite-dropdown/calcite-dropdown.js +2 -2
  70. package/dist/collection/components/calcite-inline-editable/calcite-inline-editable.js +39 -14
  71. package/dist/collection/components/calcite-input/calcite-input.js +12 -8
  72. package/dist/collection/components/calcite-modal/calcite-modal.js +1 -1
  73. package/dist/collection/components/calcite-notice/calcite-notice.js +4 -6
  74. package/dist/collection/components/calcite-panel/calcite-panel.js +41 -5
  75. package/dist/collection/components/calcite-radio-button/calcite-radio-button.js +0 -4
  76. package/dist/collection/components/calcite-radio-button-group/calcite-radio-button-group.js +13 -0
  77. package/dist/collection/components/calcite-shell/calcite-shell.js +9 -7
  78. package/dist/collection/components/calcite-slider/calcite-slider.js +7 -3
  79. package/dist/collection/components/calcite-time-picker/calcite-time-picker.js +1 -1
  80. package/dist/collection/components/calcite-tree-item/calcite-tree-item.js +16 -7
  81. package/dist/components/calcite-accordion-item.js +1 -1
  82. package/dist/components/calcite-accordion.js +5 -2
  83. package/dist/components/calcite-action-menu2.js +1 -4
  84. package/dist/components/calcite-alert.js +5 -7
  85. package/dist/components/calcite-date-picker2.js +3 -0
  86. package/dist/components/calcite-dropdown2.js +2 -2
  87. package/dist/components/calcite-inline-editable.js +39 -14
  88. package/dist/components/calcite-input2.js +12 -8
  89. package/dist/components/calcite-modal.js +1 -1
  90. package/dist/components/calcite-notice.js +4 -6
  91. package/dist/components/calcite-panel.js +19 -2
  92. package/dist/components/calcite-radio-button-group.js +13 -0
  93. package/dist/components/calcite-radio-button.js +0 -4
  94. package/dist/components/calcite-shell.js +7 -4
  95. package/dist/components/calcite-slider.js +7 -3
  96. package/dist/components/calcite-time-picker2.js +1 -1
  97. package/dist/components/calcite-tree-item.js +14 -7
  98. package/dist/custom-elements/index.js +125 -61
  99. package/dist/esm/calcite-accordion_2.entry.js +6 -3
  100. package/dist/esm/calcite-action-menu.entry.js +1 -4
  101. package/dist/esm/calcite-alert.entry.js +5 -7
  102. package/dist/esm/calcite-date-picker_4.entry.js +1 -1
  103. package/dist/esm/calcite-dropdown_3.entry.js +2 -2
  104. package/dist/esm/calcite-graph_2.entry.js +7 -3
  105. package/dist/esm/calcite-inline-editable.entry.js +39 -14
  106. package/dist/esm/calcite-input-date-picker.entry.js +1 -1
  107. package/dist/esm/calcite-input-time-picker_2.entry.js +1 -1
  108. package/dist/esm/calcite-input.entry.js +12 -8
  109. package/dist/esm/calcite-modal.entry.js +1 -1
  110. package/dist/esm/calcite-notice.entry.js +4 -6
  111. package/dist/esm/calcite-panel.entry.js +17 -1
  112. package/dist/esm/calcite-radio-button-group.entry.js +13 -0
  113. package/dist/esm/calcite-radio-button.entry.js +0 -4
  114. package/dist/esm/calcite-shell_3.entry.js +7 -4
  115. package/dist/esm/calcite-tree_2.entry.js +14 -7
  116. package/dist/esm/calcite.js +1 -1
  117. package/dist/esm/loader.js +1 -1
  118. package/dist/esm/{resources-c768953c.js → resources-f02a1ab5.js} +3 -0
  119. package/dist/esm-es5/calcite-accordion_2.entry.js +1 -1
  120. package/dist/esm-es5/calcite-action-menu.entry.js +2 -2
  121. package/dist/esm-es5/calcite-alert.entry.js +1 -1
  122. package/dist/esm-es5/calcite-date-picker_4.entry.js +1 -1
  123. package/dist/esm-es5/calcite-dropdown_3.entry.js +1 -1
  124. package/dist/esm-es5/calcite-graph_2.entry.js +1 -1
  125. package/dist/esm-es5/calcite-inline-editable.entry.js +1 -1
  126. package/dist/esm-es5/calcite-input-date-picker.entry.js +1 -1
  127. package/dist/esm-es5/calcite-input-time-picker_2.entry.js +1 -1
  128. package/dist/esm-es5/calcite-input.entry.js +1 -1
  129. package/dist/esm-es5/calcite-modal.entry.js +1 -1
  130. package/dist/esm-es5/calcite-notice.entry.js +1 -1
  131. package/dist/esm-es5/calcite-panel.entry.js +2 -2
  132. package/dist/esm-es5/calcite-radio-button-group.entry.js +1 -1
  133. package/dist/esm-es5/calcite-radio-button.entry.js +1 -1
  134. package/dist/esm-es5/calcite-shell_3.entry.js +1 -1
  135. package/dist/esm-es5/calcite-tree_2.entry.js +1 -1
  136. package/dist/esm-es5/calcite.js +1 -1
  137. package/dist/esm-es5/loader.js +1 -1
  138. package/dist/esm-es5/resources-f02a1ab5.js +5 -0
  139. package/dist/extras/docs-json.json +12 -1
  140. package/dist/types/components/calcite-alert/calcite-alert.d.ts +0 -3
  141. package/dist/types/components/calcite-inline-editable/calcite-inline-editable.d.ts +3 -1
  142. package/dist/types/components/calcite-input/calcite-input.d.ts +2 -4
  143. package/dist/types/components/calcite-notice/calcite-notice.d.ts +0 -3
  144. package/dist/types/components/calcite-panel/calcite-panel.d.ts +12 -0
  145. package/dist/types/components/calcite-radio-button-group/calcite-radio-button-group.d.ts +2 -0
  146. package/dist/types/components/calcite-slider/calcite-slider.d.ts +1 -0
  147. package/dist/types/components/calcite-tree-item/calcite-tree-item.d.ts +2 -0
  148. package/dist/types/components.d.ts +4 -0
  149. package/hydrate/index.js +124 -62
  150. package/package.json +6 -2
  151. package/readme.md +2 -6
  152. package/dist/calcite/p-06fbc0f2.system.entry.js +0 -5
  153. package/dist/calcite/p-08be120f.entry.js +0 -5
  154. package/dist/calcite/p-0b552c00.system.entry.js +0 -5
  155. package/dist/calcite/p-20e3fc50.entry.js +0 -5
  156. package/dist/calcite/p-500300b5.entry.js +0 -5
  157. package/dist/calcite/p-5f5bfaa5.entry.js +0 -5
  158. package/dist/calcite/p-647d22ef.js +0 -5
  159. package/dist/calcite/p-64a5e88c.entry.js +0 -5
  160. package/dist/calcite/p-6969dabb.entry.js +0 -5
  161. package/dist/calcite/p-8ba8a357.system.js +0 -5
  162. package/dist/calcite/p-9716c57c.entry.js +0 -5
  163. package/dist/calcite/p-97375cc0.entry.js +0 -5
  164. package/dist/calcite/p-99422223.system.entry.js +0 -5
  165. package/dist/calcite/p-a50e52f1.entry.js +0 -5
  166. package/dist/calcite/p-abe7730b.entry.js +0 -5
  167. package/dist/calcite/p-b9adf89d.system.entry.js +0 -5
  168. package/dist/calcite/p-c5b3d90c.entry.js +0 -5
  169. package/dist/calcite/p-c6cb0aa2.entry.js +0 -5
  170. package/dist/calcite/p-cd9d106b.system.entry.js +0 -5
  171. package/dist/calcite/p-dba7c714.system.entry.js +0 -5
  172. package/dist/calcite/p-e5c2a6eb.entry.js +0 -5
  173. package/dist/calcite/p-e63f0806.entry.js +0 -5
  174. package/dist/calcite/p-fbd68dbf.system.entry.js +0 -5
  175. package/dist/esm-es5/resources-c768953c.js +0 -5
@@ -0,0 +1,31 @@
1
+ {
2
+ "default-calendar": "gregorian",
3
+ "separator": "/",
4
+ "unitOrder": "DD/MM/YYYY",
5
+ "weekStart": 7,
6
+ "placeholder": "DD/MM/YYYY",
7
+ "days": {
8
+ "abbreviated": ["dom.", "seg.", "ter.", "qua.", "qui.", "sex.", "sáb."],
9
+ "narrow": ["D", "S", "T", "Q", "Q", "S", "S"],
10
+ "wide": ["domingo", "segunda-feira", "terça-feira", "quarta-feira", "quinta-feira", "sexta-feira", "sábado"]
11
+ },
12
+ "numerals": "0123456789",
13
+ "months": {
14
+ "abbreviated": ["jan.", "fev.", "mar.", "abr.", "mai.", "jun.", "jul.", "ago.", "set.", "out.", "nov.", "dez."],
15
+ "narrow": ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
16
+ "wide": [
17
+ "janeiro",
18
+ "fevereiro",
19
+ "março",
20
+ "abril",
21
+ "maio",
22
+ "junho",
23
+ "julho",
24
+ "agosto",
25
+ "setembro",
26
+ "outubro",
27
+ "novembro",
28
+ "dezembro"
29
+ ]
30
+ }
31
+ }
@@ -5,9 +5,9 @@
5
5
  "weekStart": 7,
6
6
  "placeholder": "DD/MM/YYYY",
7
7
  "days": {
8
- "abbreviated": ["dom.", "seg.", "ter.", "qua.", "qui.", "sex.", "sáb."],
9
- "wide": ["domingo", "segunda", "terça", "quarta", "quinta", "sexta", "sábado"],
10
- "narrow": ["D", "S", "T", "Q", "Q", "S", "S"]
8
+ "abbreviated": ["domingo", "segunda", "terça", "quarta", "quinta", "sexta", "sábado"],
9
+ "narrow": ["D", "S", "T", "Q", "Q", "S", "S"],
10
+ "wide": ["domingo", "segunda-feira", "terça-feira", "quarta-feira", "quinta-feira", "sexta-feira", "sábado"]
11
11
  },
12
12
  "numerals": "0123456789",
13
13
  "months": {
@@ -16,6 +16,9 @@ function getSupportedLocale(lang = "") {
16
16
  lang = lang.toLowerCase();
17
17
  if (lang.includes("-")) {
18
18
  lang = lang.replace(/(\w+)-(\w+)/, (_match, language, region) => `${language}-${region.toUpperCase()}`);
19
+ if (!locales.includes(lang)) {
20
+ lang = lang.split("-")[0];
21
+ }
19
22
  }
20
23
  return locales.includes(lang) ? lang : "en";
21
24
  }
@@ -3,7 +3,7 @@
3
3
  * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
4
  */
5
5
  import { Component, Element, Event, h, Host, Listen, Method, Prop, Watch } from "@stencil/core";
6
- import { focusElement } from "../../utils/dom";
6
+ import { focusElement, getSlotted } from "../../utils/dom";
7
7
  import { createPopper, CSS as PopperCSS, updatePopper } from "../../utils/popper";
8
8
  import { DefaultDropdownPlacement, SLOTS } from "./resources";
9
9
  import { createObserver } from "../../utils/observers";
@@ -67,7 +67,7 @@ export class CalciteDropdown {
67
67
  //--------------------------------------------------------------------------
68
68
  this.updateItems = () => {
69
69
  this.updateSelectedItems();
70
- this.triggers = Array.from(this.el.querySelectorAll("[slot=dropdown-trigger]"));
70
+ this.triggers = getSlotted(this.el, "dropdown-trigger", { all: true });
71
71
  this.items = Array.from(this.el.querySelectorAll("calcite-dropdown-item"));
72
72
  this.reposition();
73
73
  };
@@ -3,9 +3,10 @@
3
3
  * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
4
  */
5
5
  import { Component, Element, Event, h, Listen, Method, Prop, Watch } from "@stencil/core";
6
- import { getElementProp } from "../../utils/dom";
6
+ import { getElementProp, getSlotted } from "../../utils/dom";
7
7
  import { TEXT, CSS } from "./resources";
8
8
  import { connectLabel, disconnectLabel, getLabelText } from "../../utils/label";
9
+ import { createObserver } from "../../utils/observers";
9
10
  /**
10
11
  * @slot - A slot for adding a `calcite-input`.
11
12
  */
@@ -36,26 +37,31 @@ export class CalciteInlineEditable {
36
37
  * @default "Save"
37
38
  */
38
39
  this.intlConfirmChanges = TEXT.intlConfirmChanges;
40
+ this.mutationObserver = createObserver("mutation", () => this.mutationObserverCallback());
39
41
  this.transitionEnd = () => {
40
42
  if (!this.editingEnabled && !!this.shouldEmitCancel) {
41
43
  this.calciteInlineEditableEditCancel.emit();
42
44
  }
43
45
  };
44
46
  this.enableEditing = () => {
45
- this.valuePriorToEditing = this.inputElement.value;
47
+ var _a, _b;
48
+ this.valuePriorToEditing = (_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.value;
46
49
  this.editingEnabled = true;
47
- this.inputElement.setFocus();
50
+ (_b = this.inputElement) === null || _b === void 0 ? void 0 : _b.setFocus();
48
51
  this.calciteInlineEditableEnableEditingChange.emit();
49
52
  };
50
53
  this.disableEditing = () => {
51
54
  this.editingEnabled = false;
52
55
  };
53
56
  this.cancelEditing = () => {
54
- this.inputElement.value = this.valuePriorToEditing;
57
+ if (this.inputElement) {
58
+ this.inputElement.value = this.valuePriorToEditing;
59
+ }
55
60
  this.disableEditing();
56
61
  this.enableEditingButton.setFocus();
57
62
  };
58
63
  this.escapeKeyHandler = async (e) => {
64
+ var _a;
59
65
  if (e.key !== "Escape") {
60
66
  if (e.key === "Tab" && this.shouldShowControls) {
61
67
  if (!e.shiftKey && e.target === this.inputElement) {
@@ -65,7 +71,7 @@ export class CalciteInlineEditable {
65
71
  if (!!e.shiftKey && e.target === this.cancelEditingButton) {
66
72
  e.preventDefault();
67
73
  e.stopPropagation();
68
- this.inputElement.setFocus();
74
+ (_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.setFocus();
69
75
  }
70
76
  }
71
77
  return;
@@ -107,10 +113,14 @@ export class CalciteInlineEditable {
107
113
  };
108
114
  }
109
115
  disabledWatcher(disabled) {
110
- this.inputElement.disabled = disabled;
116
+ if (this.inputElement) {
117
+ this.inputElement.disabled = disabled;
118
+ }
111
119
  }
112
120
  editingEnabledWatcher(newValue, oldValue) {
113
- this.inputElement.editingEnabled = newValue;
121
+ if (this.inputElement) {
122
+ this.inputElement.editingEnabled = newValue;
123
+ }
114
124
  if (!newValue && !!oldValue) {
115
125
  this.shouldEmitCancel = true;
116
126
  }
@@ -121,17 +131,15 @@ export class CalciteInlineEditable {
121
131
  //
122
132
  //--------------------------------------------------------------------------
123
133
  connectedCallback() {
134
+ var _a;
124
135
  connectLabel(this);
136
+ (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(this.el, { childList: true });
137
+ this.mutationObserverCallback();
125
138
  }
126
139
  disconnectedCallback() {
140
+ var _a;
127
141
  disconnectLabel(this);
128
- }
129
- componentWillLoad() {
130
- this.inputElement = this.el.querySelector("calcite-input");
131
- this.inputElement.disabled = this.disabled;
132
- this.inputElement.label = this.inputElement.label || getLabelText(this);
133
- this.scale =
134
- this.scale || this.inputElement.scale || getElementProp(this.el, "scale", undefined);
142
+ (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
135
143
  }
136
144
  render() {
137
145
  return (h("div", { class: CSS.wrapper, onClick: this.enableEditingHandler, onKeyDown: this.escapeKeyHandler, onTransitionEnd: this.transitionEnd },
@@ -177,9 +185,26 @@ export class CalciteInlineEditable {
177
185
  // Private Methods
178
186
  //
179
187
  //--------------------------------------------------------------------------
188
+ mutationObserverCallback() {
189
+ var _a;
190
+ this.updateSlottedInput();
191
+ this.scale =
192
+ this.scale || ((_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.scale) || getElementProp(this.el, "scale", undefined);
193
+ }
180
194
  onLabelClick() {
181
195
  this.setFocus();
182
196
  }
197
+ updateSlottedInput() {
198
+ const inputElement = getSlotted(this.el, {
199
+ matches: "calcite-input"
200
+ });
201
+ this.inputElement = inputElement;
202
+ if (!inputElement) {
203
+ return;
204
+ }
205
+ this.inputElement.disabled = this.disabled;
206
+ this.inputElement.label = this.inputElement.label || getLabelText(this);
207
+ }
183
208
  get shouldShowControls() {
184
209
  return this.editingEnabled && this.controls;
185
210
  }
@@ -3,7 +3,7 @@
3
3
  * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
4
  */
5
5
  import { Component, Element, Event, h, Host, Method, Prop, State, Watch } from "@stencil/core";
6
- import { getElementDir, getElementProp, setRequestedIcon } from "../../utils/dom";
6
+ import { getElementDir, getElementProp, getSlotted, setRequestedIcon } from "../../utils/dom";
7
7
  import { CSS, INPUT_TYPE_ICONS, SLOTS } from "./resources";
8
8
  import { connectLabel, disconnectLabel, getLabelText } from "../../utils/label";
9
9
  import { connectForm, disconnectForm, HiddenFormInputSlot } from "../../utils/form";
@@ -12,6 +12,7 @@ import { numberKeys } from "../../utils/key";
12
12
  import { isValidNumber, parseNumberString, sanitizeNumberString } from "../../utils/number";
13
13
  import { CSS_UTILITY, TEXT } from "../../utils/resources";
14
14
  import { decimalPlaces } from "../../utils/math";
15
+ import { createObserver } from "../../utils/observers";
15
16
  /**
16
17
  * @slot action - A slot for positioning a button next to an input
17
18
  */
@@ -76,6 +77,7 @@ export class CalciteInput {
76
77
  this.childElType = "input";
77
78
  /** whether the value of the input was changed as a result of user typing or not */
78
79
  this.internalValueChange = false;
80
+ this.mutationObserver = createObserver("mutation", () => this.setDisabledAction());
79
81
  //--------------------------------------------------------------------------
80
82
  //
81
83
  // Private Methods
@@ -114,7 +116,8 @@ export class CalciteInput {
114
116
  }
115
117
  };
116
118
  this.inputFocusHandler = (event) => {
117
- if (event.target !== this.slottedActionEl) {
119
+ const slottedActionEl = getSlotted(this.el, "action");
120
+ if (event.target !== slottedActionEl) {
118
121
  this.setFocus();
119
122
  }
120
123
  this.calciteInputFocus.emit({
@@ -358,6 +361,7 @@ export class CalciteInput {
358
361
  //
359
362
  //--------------------------------------------------------------------------
360
363
  connectedCallback() {
364
+ var _a;
361
365
  this.scale = getElementProp(this.el, "scale", this.scale);
362
366
  this.status = getElementProp(this.el, "status", this.status);
363
367
  this.inlineEditableEl = this.el.closest("calcite-inline-editable");
@@ -374,10 +378,14 @@ export class CalciteInput {
374
378
  }
375
379
  connectLabel(this);
376
380
  connectForm(this);
381
+ (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(this.el, { childList: true });
382
+ this.setDisabledAction();
377
383
  }
378
384
  disconnectedCallback() {
385
+ var _a;
379
386
  disconnectLabel(this);
380
387
  disconnectForm(this);
388
+ (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
381
389
  }
382
390
  componentWillLoad() {
383
391
  var _a, _b;
@@ -386,10 +394,6 @@ export class CalciteInput {
386
394
  this.minString = (_b = this.min) === null || _b === void 0 ? void 0 : _b.toString();
387
395
  this.requestedIcon = setRequestedIcon(INPUT_TYPE_ICONS, this.icon, this.type);
388
396
  }
389
- componentDidLoad() {
390
- this.slottedActionEl = this.el.querySelector("[slot=action]");
391
- this.setDisabledAction();
392
- }
393
397
  componentShouldUpdate(newValue, oldValue, property) {
394
398
  if (this.type === "number" && property === "value" && newValue && !isValidNumber(newValue)) {
395
399
  this.setValue({
@@ -461,10 +465,10 @@ export class CalciteInput {
461
465
  }
462
466
  }
463
467
  setDisabledAction() {
464
- if (!this.slottedActionEl) {
468
+ const slottedActionEl = getSlotted(this.el, "action");
469
+ if (!slottedActionEl) {
465
470
  return;
466
471
  }
467
- const slottedActionEl = this.slottedActionEl;
468
472
  this.disabled
469
473
  ? slottedActionEl.setAttribute("disabled", "")
470
474
  : slottedActionEl.removeAttribute("disabled");
@@ -98,7 +98,7 @@ export class CalciteModal {
98
98
  }
99
99
  };
100
100
  this.updateFooterVisibility = () => {
101
- this.hasFooter = !!this.el.querySelector(`[slot=${SLOTS.back}], [slot=${SLOTS.secondary}], [slot=${SLOTS.primary}]`);
101
+ this.hasFooter = !!getSlotted(this.el, [SLOTS.back, SLOTS.primary, SLOTS.secondary]);
102
102
  };
103
103
  }
104
104
  //--------------------------------------------------------------------------
@@ -66,9 +66,6 @@ export class CalciteNotice {
66
66
  componentWillLoad() {
67
67
  this.requestedIcon = setRequestedIcon(StatusIcons, this.icon, this.color);
68
68
  }
69
- componentDidLoad() {
70
- this.noticeLinkEl = this.el.querySelector("calcite-link");
71
- }
72
69
  render() {
73
70
  const { el } = this;
74
71
  const closeButton = (h("button", { "aria-label": this.intlClose, class: CSS.close, onClick: this.close, ref: (el) => (this.closeButton = el) },
@@ -92,11 +89,12 @@ export class CalciteNotice {
92
89
  //--------------------------------------------------------------------------
93
90
  /** Sets focus on the component. */
94
91
  async setFocus() {
95
- if (!this.closeButton && !this.noticeLinkEl) {
92
+ const noticeLinkEl = this.el.querySelector("calcite-link");
93
+ if (!this.closeButton && !noticeLinkEl) {
96
94
  return;
97
95
  }
98
- if (this.noticeLinkEl) {
99
- this.noticeLinkEl.setFocus();
96
+ if (noticeLinkEl) {
97
+ noticeLinkEl.setFocus();
100
98
  }
101
99
  else if (this.closeButton) {
102
100
  this.closeButton.focus();
@@ -110,6 +110,20 @@ export class CalcitePanel {
110
110
  }
111
111
  (_c = this.containerEl) === null || _c === void 0 ? void 0 : _c.focus();
112
112
  }
113
+ /** Scrolls panel content to a particular set of coordinates.
114
+ *
115
+ * ```
116
+ * myCalcitePanel.scrollContentTo({
117
+ * left: 0, // Specifies the number of pixels along the X axis to scroll the window or element.
118
+ * top: 0, // Specifies the number of pixels along the Y axis to scroll the window or element
119
+ * behavior: "auto" // Specifies whether the scrolling should animate smoothly (smooth), or happen instantly in a single jump (auto, the default value).
120
+ * });
121
+ * ```
122
+ */
123
+ async scrollContentTo(options) {
124
+ var _a;
125
+ (_a = this.panelScrollEl) === null || _a === void 0 ? void 0 : _a.scrollTo(options);
126
+ }
113
127
  // --------------------------------------------------------------------------
114
128
  //
115
129
  // Render Methods
@@ -193,11 +207,11 @@ export class CalcitePanel {
193
207
  renderContent() {
194
208
  const { el } = this;
195
209
  const hasFab = getSlotted(el, SLOTS.fab);
196
- return hasFab ? (h("div", { class: { [CSS.contentWrapper]: true, [CSS.contentHeight]: true }, onScroll: this.panelScrollHandler, tabIndex: 0 },
197
- h("section", { class: CSS.contentContainer },
198
- h("slot", null)),
199
- this.renderFab())) : (h("section", { class: { [CSS.contentWrapper]: true, [CSS.contentContainer]: true }, onScroll: this.panelScrollHandler, tabIndex: 0 },
200
- h("slot", null)));
210
+ const defaultSlotNode = h("slot", { key: "default-slot" });
211
+ const contentWrapperKey = "content-wrapper";
212
+ return hasFab ? (h("div", { class: { [CSS.contentWrapper]: true, [CSS.contentHeight]: true }, key: contentWrapperKey, onScroll: this.panelScrollHandler, ref: (el) => (this.panelScrollEl = el), tabIndex: 0 },
213
+ h("section", { class: CSS.contentContainer }, defaultSlotNode),
214
+ this.renderFab())) : (h("section", { class: { [CSS.contentWrapper]: true, [CSS.contentContainer]: true }, key: contentWrapperKey, onScroll: this.panelScrollHandler, ref: (el) => (this.panelScrollEl = el), tabIndex: 0 }, defaultSlotNode));
201
215
  }
202
216
  renderFab() {
203
217
  return (h("div", { class: CSS.fabContainer },
@@ -566,6 +580,28 @@ export class CalcitePanel {
566
580
  "text": "Sets focus on the component.",
567
581
  "tags": []
568
582
  }
583
+ },
584
+ "scrollContentTo": {
585
+ "complexType": {
586
+ "signature": "(options?: ScrollToOptions) => Promise<void>",
587
+ "parameters": [{
588
+ "tags": [],
589
+ "text": ""
590
+ }],
591
+ "references": {
592
+ "Promise": {
593
+ "location": "global"
594
+ },
595
+ "ScrollToOptions": {
596
+ "location": "global"
597
+ }
598
+ },
599
+ "return": "Promise<void>"
600
+ },
601
+ "docs": {
602
+ "text": "Scrolls panel content to a particular set of coordinates.\n\n```\n myCalcitePanel.scrollContentTo({\n left: 0, // Specifies the number of pixels along the X axis to scroll the window or element.\n top: 0, // Specifies the number of pixels along the Y axis to scroll the window or element\n behavior: \"auto\" // Specifies whether the scrolling should animate smoothly (smooth), or happen instantly in a single jump (auto, the default value).\n });\n```",
603
+ "tags": []
604
+ }
569
605
  }
570
606
  }; }
571
607
  static get elementRef() { return "el"; }
@@ -129,10 +129,6 @@ export class CalciteRadioButton {
129
129
  }
130
130
  nameChanged() {
131
131
  this.checkLastRadioButton();
132
- const currentValue = this.rootNode.querySelector(`input[name="${this.name}"]:checked`);
133
- if (!(currentValue === null || currentValue === void 0 ? void 0 : currentValue.value)) {
134
- this.uncheckAllRadioButtonsInGroup();
135
- }
136
132
  }
137
133
  //--------------------------------------------------------------------------
138
134
  //
@@ -3,6 +3,7 @@
3
3
  * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
4
  */
5
5
  import { Component, Host, h, Element, Prop, Watch, Event, Listen } from "@stencil/core";
6
+ import { createObserver } from "../../utils/observers";
6
7
  /**
7
8
  * @slot - A slot for adding `calcite-radio-button`s.
8
9
  */
@@ -23,6 +24,12 @@ export class CalciteRadioButtonGroup {
23
24
  this.required = false;
24
25
  /** The scale (size) of the radio button group. */
25
26
  this.scale = "m";
27
+ // --------------------------------------------------------------------------
28
+ //
29
+ // Private Properties
30
+ //
31
+ // --------------------------------------------------------------------------
32
+ this.mutationObserver = createObserver("mutation", () => this.passPropsToRadioButtons());
26
33
  //--------------------------------------------------------------------------
27
34
  //
28
35
  // Private Methods
@@ -59,7 +66,13 @@ export class CalciteRadioButtonGroup {
59
66
  //
60
67
  //--------------------------------------------------------------------------
61
68
  connectedCallback() {
69
+ var _a;
62
70
  this.passPropsToRadioButtons();
71
+ (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(this.el, { childList: true, subtree: true });
72
+ }
73
+ disconnectedCallback() {
74
+ var _a;
75
+ (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
63
76
  }
64
77
  //--------------------------------------------------------------------------
65
78
  //
@@ -47,19 +47,21 @@ export class CalciteShell {
47
47
  return hasHeader ? h("slot", { key: "header", name: SLOTS.header }) : null;
48
48
  }
49
49
  renderContent() {
50
+ const defaultSlotNode = h("slot", { key: "default-slot" });
51
+ const centerRowSlotNode = h("slot", { key: "center-row-slot", name: SLOTS.centerRow });
52
+ const contentContainerKey = "content-container";
50
53
  const content = !!this.contentBehind
51
54
  ? [
52
55
  h("div", { class: {
53
56
  [CSS.content]: true,
54
- [CSS.contentBehind]: !!this.contentBehind
55
- } },
56
- h("slot", null)),
57
- h("slot", { name: SLOTS.centerRow })
57
+ [CSS.contentBehind]: true
58
+ }, key: contentContainerKey }, defaultSlotNode),
59
+ centerRowSlotNode
58
60
  ]
59
61
  : [
60
- h("div", { class: CSS.content },
61
- h("slot", null),
62
- h("slot", { name: SLOTS.centerRow }))
62
+ h("div", { class: CSS.content, key: contentContainerKey },
63
+ defaultSlotNode,
64
+ centerRowSlotNode)
63
65
  ];
64
66
  return content;
65
67
  }
@@ -83,9 +83,7 @@ export class CalciteSlider {
83
83
  }
84
84
  };
85
85
  this.dragEnd = (event) => {
86
- document.removeEventListener("pointermove", this.dragUpdate);
87
- document.removeEventListener("pointerup", this.dragEnd);
88
- document.removeEventListener("pointercancel", this.dragEnd);
86
+ this.removeDragListeners();
89
87
  this.focusActiveHandle(event.clientX);
90
88
  if (this.lastDragPropValue != this[this.dragProp]) {
91
89
  this.emitChange();
@@ -120,6 +118,7 @@ export class CalciteSlider {
120
118
  disconnectedCallback() {
121
119
  disconnectLabel(this);
122
120
  disconnectForm(this);
121
+ this.removeDragListeners();
123
122
  }
124
123
  componentWillLoad() {
125
124
  this.isRange = !!(this.maxValue || this.maxValue === 0);
@@ -515,6 +514,11 @@ export class CalciteSlider {
515
514
  emitChange() {
516
515
  this.calciteSliderChange.emit();
517
516
  }
517
+ removeDragListeners() {
518
+ document.removeEventListener("pointermove", this.dragUpdate);
519
+ document.removeEventListener("pointerup", this.dragEnd);
520
+ document.removeEventListener("pointercancel", this.dragEnd);
521
+ }
518
522
  /**
519
523
  * Set the prop value if changed at the component level
520
524
  * @param valueProp
@@ -524,7 +524,7 @@ export class CalciteTimePicker {
524
524
  [CSS.showMeridiem]: showMeridiem,
525
525
  [CSS.showSecond]: this.showSecond,
526
526
  [CSS[`scale-${this.scale}`]]: true
527
- } },
527
+ }, dir: "ltr" },
528
528
  h("div", { class: CSS.column, role: "group" },
529
529
  h("span", { "aria-label": this.intlHourUp, class: {
530
530
  [CSS.button]: true,
@@ -34,7 +34,7 @@ export class CalciteTreeItem {
34
34
  this.expanded = !this.expanded;
35
35
  if (this.selectionMode !== TreeSelectionMode.Ancestors) {
36
36
  this.calciteTreeItemSelect.emit({
37
- modifyCurrentSelection: event.shiftKey,
37
+ modifyCurrentSelection: this.isSelectionMultiLike,
38
38
  forceToggle: true
39
39
  });
40
40
  }
@@ -68,6 +68,11 @@ export class CalciteTreeItem {
68
68
  expandedHandler(newValue) {
69
69
  this.updateParentIsExpanded(this.el, newValue);
70
70
  }
71
+ getselectionMode() {
72
+ this.isSelectionMultiLike =
73
+ this.selectionMode === TreeSelectionMode.Multi ||
74
+ this.selectionMode === TreeSelectionMode.MultiChildren;
75
+ }
71
76
  //--------------------------------------------------------------------------
72
77
  //
73
78
  // Lifecycle
@@ -119,9 +124,10 @@ export class CalciteTreeItem {
119
124
  [CSS.chevron]: true,
120
125
  [CSS_UTILITY.rtl]: rtl
121
126
  }, "data-test-id": "icon", icon: ICONS.chevronRight, onClick: this.iconClickHandler, scale: "s" })) : null;
122
- const checkbox = this.selectionMode === TreeSelectionMode.Ancestors ? (h("label", { class: CSS.checkboxLabel },
127
+ const defaultSlotNode = h("slot", { key: "default-slot" });
128
+ const checkbox = this.selectionMode === TreeSelectionMode.Ancestors ? (h("label", { class: CSS.checkboxLabel, key: "checkbox-label" },
123
129
  h("calcite-checkbox", { checked: this.selected, class: CSS.checkbox, "data-test-id": "checkbox", indeterminate: this.hasChildren && this.indeterminate, scale: this.scale, tabIndex: -1 }),
124
- h("slot", null))) : null;
130
+ defaultSlotNode)) : null;
125
131
  const selectedIcon = showBulletPoint
126
132
  ? ICONS.bulletPoint
127
133
  : showCheckmark
@@ -140,7 +146,7 @@ export class CalciteTreeItem {
140
146
  }, "data-selection-mode": this.selectionMode, ref: (el) => (this.defaultSlotWrapper = el) },
141
147
  chevron,
142
148
  bulletOrCheckIcon,
143
- checkbox ? checkbox : h("slot", null)),
149
+ checkbox ? checkbox : defaultSlotNode),
144
150
  h("div", { class: {
145
151
  [CSS.childrenContainer]: true,
146
152
  [CSS_UTILITY.rtl]: rtl
@@ -161,7 +167,7 @@ export class CalciteTreeItem {
161
167
  window.open(link.href, target);
162
168
  }
163
169
  this.calciteTreeItemSelect.emit({
164
- modifyCurrentSelection: e.shiftKey || this.selectionMode === TreeSelectionMode.Ancestors,
170
+ modifyCurrentSelection: this.selectionMode === TreeSelectionMode.Ancestors || this.isSelectionMultiLike,
165
171
  forceToggle: false
166
172
  });
167
173
  }
@@ -170,7 +176,7 @@ export class CalciteTreeItem {
170
176
  switch (e.key) {
171
177
  case " ":
172
178
  this.calciteTreeItemSelect.emit({
173
- modifyCurrentSelection: e.shiftKey,
179
+ modifyCurrentSelection: this.isSelectionMultiLike,
174
180
  forceToggle: false
175
181
  });
176
182
  e.preventDefault();
@@ -185,7 +191,7 @@ export class CalciteTreeItem {
185
191
  }
186
192
  else {
187
193
  this.calciteTreeItemSelect.emit({
188
- modifyCurrentSelection: e.shiftKey,
194
+ modifyCurrentSelection: this.isSelectionMultiLike,
189
195
  forceToggle: false
190
196
  });
191
197
  }
@@ -504,6 +510,9 @@ export class CalciteTreeItem {
504
510
  static get watchers() { return [{
505
511
  "propName": "expanded",
506
512
  "methodName": "expandedHandler"
513
+ }, {
514
+ "propName": "selectionMode",
515
+ "methodName": "getselectionMode"
507
516
  }]; }
508
517
  static get listeners() { return [{
509
518
  "name": "click",
@@ -6,7 +6,7 @@ import { HTMLElement, createEvent, h, Host, proxyCustomElement } from '@stencil/
6
6
  import { g as getElementProp, a as getElementDir, C as CSS_UTILITY } from './dom.js';
7
7
  import { d as defineCustomElement$2 } from './calcite-icon2.js';
8
8
 
9
- const calciteAccordionItemCss = "@-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}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}.icon-position--end,.icon-position--start{--calcite-accordion-item-icon-rotation:calc(90deg * -1);--calcite-accordion-item-active-icon-rotation:0deg;--calcite-accordion-item-icon-rotation-rtl:90deg;--calcite-accordion-item-active-icon-rotation-rtl:0deg}.icon-position--start{--calcite-accordion-item-flex-direction:row-reverse;--calcite-accordion-item-icon-spacing-start:0;--calcite-accordion-item-icon-spacing-end:var(--calcite-accordion-icon-margin)}.icon-position--end{--calcite-accordion-item-flex-direction:row;--calcite-accordion-item-icon-spacing-start:var(--calcite-accordion-icon-margin);--calcite-accordion-item-icon-spacing-end:0}.icon-position--end:not(.icon-type--plus-minus){--calcite-accordion-item-icon-rotation:0deg;--calcite-accordion-item-active-icon-rotation:180deg;--calcite-accordion-item-icon-rotation-rtl:0deg;--calcite-accordion-item-active-icon-rotation-rtl:calc(180deg * -1)}:host{--calcite-accordion-item-background:var(--calcite-ui-foreground-1)}:host-context([appearance=minimal]){--calcite-accordion-item-padding:var(--calcite-accordion-item-spacing-unit) 0}:host-context([appearance=transparent]){--calcite-accordion-item-border:transparent;--calcite-accordion-item-background:transparent}:host{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;color:var(--calcite-ui-text-3);-webkit-text-decoration-line:none;text-decoration-line:none;outline:2px solid transparent;outline-offset:2px;background-color:var(--calcite-accordion-item-background);--calcite-accordion-item-border:var(--calcite-ui-border-2)}:host .accordion-item-header{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}:host(:focus) .accordion-item-header{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}:host([active]){color:var(--calcite-ui-text-1)}:host([active]) .accordion-item-content{display:block;color:var(--calcite-ui-text-1)}:host([active]) .accordion-item-header{border-bottom-color:transparent}:host .accordion-item-header{display:-ms-flexbox;display:flex;cursor:pointer;-ms-flex-align:center;align-items:center;-ms-flex-direction:var(--calcite-accordion-item-flex-direction);flex-direction:var(--calcite-accordion-item-flex-direction)}:host .accordion-item-icon{position:relative;margin:0px;display:-ms-inline-flexbox;display:inline-flex;color:var(--calcite-ui-text-3);-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-margin-end:var(--calcite-accordion-item-icon-spacing-start);margin-inline-end:var(--calcite-accordion-item-icon-spacing-start);-webkit-margin-start:var(--calcite-accordion-item-icon-spacing-end);margin-inline-start:var(--calcite-accordion-item-icon-spacing-end)}:host .accordion-item-content,:host .accordion-item-header{padding:var(--calcite-accordion-item-padding);border-bottom:1px solid var(--calcite-accordion-item-border)}:host .accordion-item-header *{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host .accordion-item-content{display:none;padding-top:0px;color:var(--calcite-ui-text-3);text-align:initial}:host .accordion-item-expand-icon{color:var(--calcite-ui-text-3);-webkit-margin-start:var(--calcite-accordion-item-icon-spacing-start);margin-inline-start:var(--calcite-accordion-item-icon-spacing-start);-webkit-margin-end:var(--calcite-accordion-item-icon-spacing-end);margin-inline-end:var(--calcite-accordion-item-icon-spacing-end);-webkit-transform:rotate(var(--calcite-accordion-item-icon-rotation));transform:rotate(var(--calcite-accordion-item-icon-rotation))}.calcite--rtl .accordion-item-expand-icon{-webkit-transform:rotate(var(--calcite-accordion-item-icon-rotation-rtl));transform:rotate(var(--calcite-accordion-item-icon-rotation-rtl))}:host([active]) .accordion-item-expand-icon{color:var(--calcite-ui-text-1);-webkit-transform:rotate(var(--calcite-accordion-item-active-icon-rotation));transform:rotate(var(--calcite-accordion-item-active-icon-rotation))}:host([active]) .calcite--rtl .accordion-item-expand-icon{-webkit-transform:rotate(var(--calcite-accordion-item-active-icon-rotation-rtl));transform:rotate(var(--calcite-accordion-item-active-icon-rotation-rtl))}:host .accordion-item-header-text{margin-top:0px;margin-bottom:0px;-ms-flex-positive:1;flex-grow:1;-ms-flex-direction:column;flex-direction:column;padding-top:0px;padding-bottom:0px;text-align:initial;-webkit-margin-end:auto;margin-inline-end:auto}:host .accordion-item-title,:host .accordion-item-subtitle{display:-ms-flexbox;display:flex;width:100%}:host .accordion-item-title{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-2)}:host .accordion-item-subtitle{margin-top:0.25rem;color:var(--calcite-ui-text-3)}:host(:focus) .accordion-item-title,:host(:hover) .accordion-item-title{color:var(--calcite-ui-text-1)}:host(:focus) .accordion-item-icon,:host(:hover) .accordion-item-icon{color:var(--calcite-ui-text-1)}:host(:focus) .accordion-item-expand-icon,:host(:hover) .accordion-item-expand-icon{color:var(--calcite-ui-text-1)}:host(:focus) .accordion-item-subtitle,:host(:hover) .accordion-item-subtitle{color:var(--calcite-ui-text-2)}:host(:focus) .accordion-item-title,:host(:active) .accordion-item-title,:host([active]) .accordion-item-title{color:var(--calcite-ui-text-1)}:host(:focus) .accordion-item-icon,:host(:active) .accordion-item-icon,:host([active]) .accordion-item-icon{color:var(--calcite-ui-text-1)}:host(:focus) .accordion-item-expand-icon,:host(:active) .accordion-item-expand-icon,:host([active]) .accordion-item-expand-icon{color:var(--calcite-ui-text-1)}:host(:focus) .accordion-item-subtitle,:host(:active) .accordion-item-subtitle,:host([active]) .accordion-item-subtitle{color:var(--calcite-ui-text-2)}";
9
+ const calciteAccordionItemCss = "@-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}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}.icon-position--end,.icon-position--start{--calcite-accordion-item-icon-rotation:calc(90deg * -1);--calcite-accordion-item-active-icon-rotation:0deg;--calcite-accordion-item-icon-rotation-rtl:90deg;--calcite-accordion-item-active-icon-rotation-rtl:0deg}.icon-position--start{--calcite-accordion-item-flex-direction:row-reverse;--calcite-accordion-item-icon-spacing-start:0;--calcite-accordion-item-icon-spacing-end:var(--calcite-accordion-icon-margin)}.icon-position--end{--calcite-accordion-item-flex-direction:row;--calcite-accordion-item-icon-spacing-start:var(--calcite-accordion-icon-margin);--calcite-accordion-item-icon-spacing-end:0}.icon-position--end:not(.icon-type--plus-minus){--calcite-accordion-item-icon-rotation:0deg;--calcite-accordion-item-active-icon-rotation:180deg;--calcite-accordion-item-icon-rotation-rtl:0deg;--calcite-accordion-item-active-icon-rotation-rtl:calc(180deg * -1)}:host{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;color:var(--calcite-ui-text-3);-webkit-text-decoration-line:none;text-decoration-line:none;outline:2px solid transparent;outline-offset:2px;background-color:var(--calcite-accordion-item-background, var(--calcite-ui-foreground-1))}:host .accordion-item-header{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}:host(:focus) .accordion-item-header{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}:host([active]){color:var(--calcite-ui-text-1)}:host([active]) .accordion-item-content{display:block;color:var(--calcite-ui-text-1)}:host([active]) .accordion-item-header{border-bottom-color:transparent}:host .accordion-item-header{display:-ms-flexbox;display:flex;cursor:pointer;-ms-flex-align:center;align-items:center;-ms-flex-direction:var(--calcite-accordion-item-flex-direction);flex-direction:var(--calcite-accordion-item-flex-direction)}:host .accordion-item-icon{position:relative;margin:0px;display:-ms-inline-flexbox;display:inline-flex;color:var(--calcite-ui-text-3);-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-margin-end:var(--calcite-accordion-item-icon-spacing-start);margin-inline-end:var(--calcite-accordion-item-icon-spacing-start);-webkit-margin-start:var(--calcite-accordion-item-icon-spacing-end);margin-inline-start:var(--calcite-accordion-item-icon-spacing-end)}:host .accordion-item-content,:host .accordion-item-header{padding:var(--calcite-accordion-item-padding);border-bottom:1px solid var(--calcite-accordion-item-border, var(--calcite-ui-border-2))}:host .accordion-item-header *{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host .accordion-item-content{display:none;padding-top:0px;color:var(--calcite-ui-text-3);text-align:initial}:host .accordion-item-expand-icon{color:var(--calcite-ui-text-3);-webkit-margin-start:var(--calcite-accordion-item-icon-spacing-start);margin-inline-start:var(--calcite-accordion-item-icon-spacing-start);-webkit-margin-end:var(--calcite-accordion-item-icon-spacing-end);margin-inline-end:var(--calcite-accordion-item-icon-spacing-end);-webkit-transform:rotate(var(--calcite-accordion-item-icon-rotation));transform:rotate(var(--calcite-accordion-item-icon-rotation))}.calcite--rtl .accordion-item-expand-icon{-webkit-transform:rotate(var(--calcite-accordion-item-icon-rotation-rtl));transform:rotate(var(--calcite-accordion-item-icon-rotation-rtl))}:host([active]) .accordion-item-expand-icon{color:var(--calcite-ui-text-1);-webkit-transform:rotate(var(--calcite-accordion-item-active-icon-rotation));transform:rotate(var(--calcite-accordion-item-active-icon-rotation))}:host([active]) .calcite--rtl .accordion-item-expand-icon{-webkit-transform:rotate(var(--calcite-accordion-item-active-icon-rotation-rtl));transform:rotate(var(--calcite-accordion-item-active-icon-rotation-rtl))}:host .accordion-item-header-text{margin-top:0px;margin-bottom:0px;-ms-flex-positive:1;flex-grow:1;-ms-flex-direction:column;flex-direction:column;padding-top:0px;padding-bottom:0px;text-align:initial;-webkit-margin-end:auto;margin-inline-end:auto}:host .accordion-item-title,:host .accordion-item-subtitle{display:-ms-flexbox;display:flex;width:100%}:host .accordion-item-title{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-2)}:host .accordion-item-subtitle{margin-top:0.25rem;color:var(--calcite-ui-text-3)}:host(:focus) .accordion-item-title,:host(:hover) .accordion-item-title{color:var(--calcite-ui-text-1)}:host(:focus) .accordion-item-icon,:host(:hover) .accordion-item-icon{color:var(--calcite-ui-text-1)}:host(:focus) .accordion-item-expand-icon,:host(:hover) .accordion-item-expand-icon{color:var(--calcite-ui-text-1)}:host(:focus) .accordion-item-subtitle,:host(:hover) .accordion-item-subtitle{color:var(--calcite-ui-text-2)}:host(:focus) .accordion-item-title,:host(:active) .accordion-item-title,:host([active]) .accordion-item-title{color:var(--calcite-ui-text-1)}:host(:focus) .accordion-item-icon,:host(:active) .accordion-item-icon,:host([active]) .accordion-item-icon{color:var(--calcite-ui-text-1)}:host(:focus) .accordion-item-expand-icon,:host(:active) .accordion-item-expand-icon,:host([active]) .accordion-item-expand-icon{color:var(--calcite-ui-text-1)}:host(:focus) .accordion-item-subtitle,:host(:active) .accordion-item-subtitle,:host([active]) .accordion-item-subtitle{color:var(--calcite-ui-text-2)}";
10
10
 
11
11
  let CalciteAccordionItem$1 = class extends HTMLElement {
12
12
  constructor() {