@esri/solutions-components 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. package/dist/assets/arcgis-pdf-creator/PDFCreator.js +6 -3
  2. package/dist/assets/arcgis-pdf-creator/PDFCreator_jsPDF.js +1 -1
  3. package/dist/assets/arcgis-pdf-creator/PDFCreator_pdf_lib.js +1 -1
  4. package/dist/assets/arcgis-pdf-creator/PDFLabels.js +54 -3
  5. package/dist/assets/arcgis-pdf-creator/grid.js +1 -1
  6. package/dist/assets/data/images/grid.png +0 -0
  7. package/dist/assets/data/images/horizontal.png +0 -0
  8. package/dist/assets/data/images/vertical.png +0 -0
  9. package/dist/assets/t9n/crowdsource-manager/resources.json +7 -1
  10. package/dist/assets/t9n/crowdsource-manager/resources_en.json +7 -1
  11. package/dist/cjs/buffer-tools_6.cjs.entry.js +85 -85
  12. package/dist/cjs/{calcite-block_2.cjs.entry.js → calcite-action-bar_4.cjs.entry.js} +307 -18
  13. package/dist/cjs/{calcite-action.cjs.entry.js → calcite-action_2.cjs.entry.js} +84 -1
  14. package/dist/cjs/{calcite-combobox_3.cjs.entry.js → calcite-chip_4.cjs.entry.js} +187 -61
  15. package/dist/cjs/{calcite-dropdown-group_4.cjs.entry.js → calcite-dropdown_5.cjs.entry.js} +467 -1
  16. package/dist/cjs/calcite-input-message_5.cjs.entry.js +283 -283
  17. package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +2 -2
  18. package/dist/cjs/{calcite-action-bar_2.cjs.entry.js → calcite-tooltip.cjs.entry.js} +2 -208
  19. package/dist/cjs/crowdsource-manager.cjs.entry.js +88 -14
  20. package/dist/cjs/{downloadUtils-b85476e8.js → downloadUtils-9359e9ff.js} +1218 -1127
  21. package/dist/cjs/{index.es-3ba50626.js → index.es-9c0d0ed6.js} +10682 -10682
  22. package/dist/cjs/{interfaces-17c631bf.js → interfaces-cac36920.js} +6 -0
  23. package/dist/cjs/layer-table_2.cjs.entry.js +512 -0
  24. package/dist/cjs/loader.cjs.js +30 -30
  25. package/dist/cjs/{mapViewUtils-df63bfa4.js → mapViewUtils-090f4d4d.js} +24 -24
  26. package/dist/cjs/public-notification.cjs.entry.js +69 -49
  27. package/dist/cjs/solution-configuration.cjs.entry.js +2 -2
  28. package/dist/cjs/solution-contents_3.cjs.entry.js +2 -2
  29. package/dist/cjs/{solution-store-b86759b2.js → solution-store-d28c332e.js} +1 -1
  30. package/dist/cjs/solutions-components.cjs.js +31 -31
  31. package/dist/collection/assets/arcgis-pdf-creator/PDFCreator.js +6 -3
  32. package/dist/collection/assets/arcgis-pdf-creator/PDFCreator_jsPDF.js +1 -1
  33. package/dist/collection/assets/arcgis-pdf-creator/PDFCreator_pdf_lib.js +1 -1
  34. package/dist/collection/assets/arcgis-pdf-creator/PDFLabels.js +54 -3
  35. package/dist/collection/assets/arcgis-pdf-creator/grid.js +1 -1
  36. package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +122 -0
  37. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +130 -14
  38. package/dist/collection/components/layer-table/layer-table.css +2 -70
  39. package/dist/collection/components/layer-table/layer-table.js +66 -106
  40. package/dist/collection/components/map-card/map-card.css +4 -7
  41. package/dist/collection/components/map-card/map-card.js +44 -10
  42. package/dist/collection/components/map-draw-tools/map-draw-tools.js +1 -1
  43. package/dist/collection/components/map-select-tools/map-select-tools.js +1 -1
  44. package/dist/collection/components/public-notification/public-notification.js +45 -27
  45. package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +1 -1
  46. package/dist/collection/demos/crowdsource-manager.html +14 -41
  47. package/dist/collection/utils/csvDownload.js +41 -0
  48. package/dist/collection/utils/csvDownload.ts +42 -0
  49. package/dist/collection/utils/csvUtils.js +6 -23
  50. package/dist/collection/utils/csvUtils.ts +8 -27
  51. package/dist/collection/utils/downloadUtils.js +30 -14
  52. package/dist/collection/utils/downloadUtils.ts +36 -14
  53. package/dist/collection/utils/interfaces.js +6 -0
  54. package/dist/collection/utils/interfaces.ts +6 -0
  55. package/dist/collection/utils/pdfUtils.js +9 -6
  56. package/dist/collection/utils/pdfUtils.ts +13 -8
  57. package/dist/collection/utils/test/csvUtils.spec.tsx +56 -0
  58. package/dist/collection/utils/test/downloadUtils.spec.tsx +133 -0
  59. package/dist/components/crowdsource-manager.js +293 -17
  60. package/dist/components/downloadUtils.js +133 -42
  61. package/dist/components/interfaces3.js +7 -1
  62. package/dist/components/layer-table.js +1 -443
  63. package/dist/components/layer-table2.js +429 -0
  64. package/dist/components/map-card.js +1 -339
  65. package/dist/{esm/map-card.entry.js → components/map-card2.js} +118 -22
  66. package/dist/components/map-draw-tools2.js +16 -16
  67. package/dist/components/map-layer-picker2.js +1 -1
  68. package/dist/components/map-select-tools2.js +38 -38
  69. package/dist/components/public-notification.js +102 -82
  70. package/dist/components/queryUtils.js +10 -10
  71. package/dist/components/refine-selection-tools2.js +3 -3
  72. package/dist/components/refine-selection2.js +1 -1
  73. package/dist/components/solution-resource-item2.js +1 -1
  74. package/dist/components/solution-store.js +1 -1
  75. package/dist/esm/buffer-tools_6.entry.js +76 -76
  76. package/dist/esm/{calcite-block_2.entry.js → calcite-action-bar_4.entry.js} +307 -20
  77. package/dist/esm/{calcite-action.entry.js → calcite-action_2.entry.js} +84 -2
  78. package/dist/esm/{calcite-combobox_3.entry.js → calcite-chip_4.entry.js} +181 -56
  79. package/dist/esm/{calcite-dropdown-group_4.entry.js → calcite-dropdown_5.entry.js} +468 -3
  80. package/dist/esm/calcite-input-message_5.entry.js +275 -275
  81. package/dist/esm/calcite-shell-panel_14.entry.js +2 -2
  82. package/dist/esm/{calcite-action-bar_2.entry.js → calcite-tooltip.entry.js} +4 -209
  83. package/dist/esm/crowdsource-manager.entry.js +88 -14
  84. package/dist/esm/{downloadUtils-f278742f.js → downloadUtils-a8f139c5.js} +1214 -1123
  85. package/dist/esm/{index.es-6f3a1143.js → index.es-a75412ff.js} +10596 -10596
  86. package/dist/esm/{interfaces-d0d83efa.js → interfaces-cd4054e5.js} +7 -1
  87. package/dist/esm/layer-table_2.entry.js +507 -0
  88. package/dist/esm/loader.js +26 -26
  89. package/dist/esm/{mapViewUtils-bd1809f0.js → mapViewUtils-8ffcd36d.js} +12 -12
  90. package/dist/esm/public-notification.entry.js +65 -45
  91. package/dist/esm/solution-configuration.entry.js +2 -2
  92. package/dist/esm/solution-contents_3.entry.js +2 -2
  93. package/dist/esm/{solution-store-477288ac.js → solution-store-1b67f2c8.js} +1 -1
  94. package/dist/esm/solutions-components.js +26 -26
  95. package/dist/solutions-components/demos/crowdsource-manager.html +14 -41
  96. package/dist/solutions-components/{p-dd11eeb2.js → p-1395b0ef.js} +1 -1
  97. package/dist/solutions-components/{p-cbac29fb.entry.js → p-1affd711.entry.js} +18 -18
  98. package/dist/solutions-components/p-30de8da1.entry.js +17 -0
  99. package/dist/solutions-components/{p-91cad71e.entry.js → p-439c878d.entry.js} +3 -9
  100. package/dist/solutions-components/{p-03e2c6fd.js → p-765a27f3.js} +60 -60
  101. package/dist/solutions-components/p-813a04c3.entry.js +6 -0
  102. package/dist/solutions-components/{p-9e8a371f.entry.js → p-874b39a7.entry.js} +3 -3
  103. package/dist/solutions-components/p-8cece97f.js +21 -0
  104. package/dist/solutions-components/{p-dd0241fb.entry.js → p-97aa7211.entry.js} +1 -1
  105. package/dist/solutions-components/{p-0e459cc7.entry.js → p-a955a3e6.entry.js} +10 -4
  106. package/dist/solutions-components/{p-40c12650.js → p-bb64bd47.js} +453 -437
  107. package/dist/solutions-components/{p-70e1d4d8.entry.js → p-c392dd95.entry.js} +17 -17
  108. package/dist/solutions-components/p-ca386a72.entry.js +6 -0
  109. package/dist/solutions-components/p-d47d74a6.entry.js +23 -0
  110. package/dist/solutions-components/p-db846ee2.entry.js +11 -0
  111. package/dist/solutions-components/{p-88e5a76d.js → p-dc53c9c1.js} +36 -36
  112. package/dist/solutions-components/p-e1c93241.entry.js +6 -0
  113. package/dist/solutions-components/{p-4cbaf0f1.entry.js → p-e6d235d6.entry.js} +1 -1
  114. package/dist/solutions-components/solutions-components.esm.js +6 -6
  115. package/dist/solutions-components/utils/csvDownload.ts +42 -0
  116. package/dist/solutions-components/utils/csvUtils.ts +8 -27
  117. package/dist/solutions-components/utils/downloadUtils.ts +36 -14
  118. package/dist/solutions-components/utils/interfaces.ts +6 -0
  119. package/dist/solutions-components/utils/pdfUtils.ts +13 -8
  120. package/dist/solutions-components/utils/test/csvUtils.spec.tsx +56 -0
  121. package/dist/solutions-components/utils/test/downloadUtils.spec.tsx +133 -0
  122. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +39 -0
  123. package/dist/types/components/layer-table/layer-table.d.ts +35 -48
  124. package/dist/types/components/map-card/map-card.d.ts +10 -6
  125. package/dist/types/components/public-notification/public-notification.d.ts +18 -6
  126. package/dist/types/components.d.ts +1621 -1601
  127. package/dist/types/preact.d.ts +2 -1
  128. package/dist/types/utils/csvDownload.d.ts +24 -0
  129. package/dist/types/utils/csvUtils.d.ts +2 -1
  130. package/dist/types/utils/downloadUtils.d.ts +25 -0
  131. package/dist/types/utils/interfaces.d.ts +5 -0
  132. package/dist/types/utils/pdfUtils.d.ts +2 -1
  133. package/package.json +4 -4
  134. package/dist/cjs/calcite-chip.cjs.entry.js +0 -142
  135. package/dist/cjs/calcite-dropdown.cjs.entry.js +0 -481
  136. package/dist/cjs/calcite-handle.cjs.entry.js +0 -99
  137. package/dist/cjs/calcite-loader.cjs.entry.js +0 -95
  138. package/dist/cjs/layer-table.cjs.entry.js +0 -317
  139. package/dist/cjs/map-card.cjs.entry.js +0 -252
  140. package/dist/esm/calcite-chip.entry.js +0 -138
  141. package/dist/esm/calcite-dropdown.entry.js +0 -477
  142. package/dist/esm/calcite-handle.entry.js +0 -95
  143. package/dist/esm/calcite-loader.entry.js +0 -91
  144. package/dist/esm/layer-table.entry.js +0 -313
  145. package/dist/solutions-components/p-045d3988.entry.js +0 -12
  146. package/dist/solutions-components/p-11132485.entry.js +0 -11
  147. package/dist/solutions-components/p-15b43c29.entry.js +0 -11
  148. package/dist/solutions-components/p-5034aabc.entry.js +0 -11
  149. package/dist/solutions-components/p-6f012424.entry.js +0 -6
  150. package/dist/solutions-components/p-7fd10eb3.entry.js +0 -11
  151. package/dist/solutions-components/p-a57ef371.entry.js +0 -6
  152. package/dist/solutions-components/p-bc39f296.entry.js +0 -6
  153. package/dist/solutions-components/p-c93d8e80.entry.js +0 -6
  154. package/dist/solutions-components/p-dbc9a5a8.js +0 -21
  155. package/dist/solutions-components/p-f5c70be2.entry.js +0 -6
  156. package/dist/solutions-components/p-f6b17cc6.entry.js +0 -11
@@ -8,25 +8,228 @@
8
8
  Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
10
  const index = require('./index-c6979cbb.js');
11
+ const ExpandToggle = require('./ExpandToggle-c990e1d5.js');
11
12
  const dom = require('./dom-4a580af6.js');
12
- const Heading = require('./Heading-c10b33b5.js');
13
+ const observers = require('./observers-5311faf8.js');
13
14
  const conditionalSlot = require('./conditionalSlot-baada7a3.js');
15
+ const debounce = require('./debounce-69c3bada.js');
16
+ const Heading = require('./Heading-c10b33b5.js');
14
17
  const interactive = require('./interactive-0a68ab99.js');
15
18
  const guid = require('./guid-84ac4d91.js');
16
19
  const resources = require('./resources-9c55e05c.js');
17
20
  const sharedListRender = require('./shared-list-render-6977a4b3.js');
18
- const observers = require('./observers-5311faf8.js');
21
+ require('./resources-2260d186.js');
22
+ require('./resources-2a9862c7.js');
19
23
  require('./resources-b56bce71.js');
20
24
  require('./array-ace6d4b5.js');
21
25
  require('./resources-808cfca8.js');
22
- require('./debounce-69c3bada.js');
23
26
 
24
27
  /*!
25
28
  * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
26
29
  * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
27
30
  * v1.0.0-beta.97
28
31
  */
29
- const CSS = {
32
+ const CSS$2 = {
33
+ actionGroupBottom: "action-group--bottom"
34
+ };
35
+ const SLOTS$1 = {
36
+ bottomActions: "bottom-actions",
37
+ expandTooltip: "expand-tooltip"
38
+ };
39
+ const TEXT$1 = {
40
+ expand: "Expand",
41
+ collapse: "Collapse"
42
+ };
43
+
44
+ const actionBarCss = "@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity: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;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:host{box-sizing:border-box;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{pointer-events:auto;display:inline-flex;align-self:stretch;background:transparent;--calcite-action-bar-expanded-max-width:auto}:host([layout=vertical]){flex-direction:column}:host([layout=horizontal]){flex-direction:row}:host([layout=vertical][overflow-actions-disabled]){overflow-y:auto}:host([layout=horizontal][overflow-actions-disabled]){overflow-x:auto}:host([layout=vertical][expanded]){max-inline-size:var(--calcite-action-bar-expanded-max-width)}::slotted(calcite-action-group){border-width:0px;border-block-end-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}:host([layout=horizontal]) ::slotted(calcite-action-group){border-width:0px;border-inline-end-width:1px;border-style:solid}::slotted(calcite-action-group:last-child){border-block-end-width:0px;border-inline-end-width:0px}.action-group--bottom{flex-grow:1;justify-content:flex-end;-webkit-padding-after:0px;padding-block-end:0px;-webkit-padding-end:0px;padding-inline-end:0px}";
45
+
46
+ const ActionBar = class {
47
+ constructor(hostRef) {
48
+ index.registerInstance(this, hostRef);
49
+ this.calciteActionBarToggle = index.createEvent(this, "calciteActionBarToggle", 6);
50
+ // --------------------------------------------------------------------------
51
+ //
52
+ // Properties
53
+ //
54
+ // --------------------------------------------------------------------------
55
+ /**
56
+ * When `true`, the expand-toggling behavior is disabled.
57
+ */
58
+ this.expandDisabled = false;
59
+ /**
60
+ * When `true`, the component is expanded.
61
+ */
62
+ this.expanded = false;
63
+ /**
64
+ * The layout direction of the actions.
65
+ */
66
+ this.layout = "vertical";
67
+ /**
68
+ * Disables automatically overflowing `calcite-action`s that won't fit into menus.
69
+ */
70
+ this.overflowActionsDisabled = false;
71
+ this.mutationObserver = observers.createObserver("mutation", () => {
72
+ const { el, expanded } = this;
73
+ ExpandToggle.toggleChildActionText({ parent: el, expanded });
74
+ this.conditionallyOverflowActions();
75
+ });
76
+ this.resizeObserver = observers.createObserver("resize", (entries) => this.resizeHandlerEntries(entries));
77
+ // --------------------------------------------------------------------------
78
+ //
79
+ // Private Methods
80
+ //
81
+ // --------------------------------------------------------------------------
82
+ this.actionMenuOpenChangeHandler = (event) => {
83
+ if (event.detail) {
84
+ const composedPath = event.composedPath();
85
+ Array.from(this.el.querySelectorAll("calcite-action-group")).forEach((group) => {
86
+ if (!composedPath.includes(group)) {
87
+ group.menuOpen = false;
88
+ }
89
+ });
90
+ }
91
+ };
92
+ this.resizeHandlerEntries = (entries) => {
93
+ entries.forEach(this.resizeHandler);
94
+ };
95
+ this.resizeHandler = (entry) => {
96
+ const { width, height } = entry.contentRect;
97
+ this.resize({ width, height });
98
+ };
99
+ this.resize = debounce.debounce(({ width, height }) => {
100
+ const { el, expanded, expandDisabled, layout } = this;
101
+ if ((layout === "vertical" && !height) || (layout === "horizontal" && !width)) {
102
+ return;
103
+ }
104
+ const actions = ExpandToggle.queryActions(el);
105
+ const actionCount = expandDisabled ? actions.length : actions.length + 1;
106
+ const actionGroups = Array.from(el.querySelectorAll("calcite-action-group"));
107
+ const groupCount = dom.getSlotted(el, SLOTS$1.bottomActions) || !expandDisabled
108
+ ? actionGroups.length + 1
109
+ : actionGroups.length;
110
+ const { actionHeight, actionWidth } = ExpandToggle.geActionDimensions(actions);
111
+ const overflowCount = ExpandToggle.getOverflowCount({
112
+ layout,
113
+ actionCount,
114
+ actionHeight,
115
+ actionWidth,
116
+ height,
117
+ width,
118
+ groupCount
119
+ });
120
+ ExpandToggle.overflowActions({
121
+ actionGroups,
122
+ expanded,
123
+ overflowCount
124
+ });
125
+ }, ExpandToggle.overflowActionsDebounceInMs);
126
+ this.conditionallyOverflowActions = () => {
127
+ if (!this.overflowActionsDisabled) {
128
+ this.overflowActions();
129
+ }
130
+ };
131
+ this.toggleExpand = () => {
132
+ this.expanded = !this.expanded;
133
+ this.calciteActionBarToggle.emit();
134
+ };
135
+ this.setExpandToggleRef = (el) => {
136
+ this.expandToggleEl = el;
137
+ };
138
+ }
139
+ expandHandler() {
140
+ this.conditionallyOverflowActions();
141
+ }
142
+ expandedHandler(expanded) {
143
+ ExpandToggle.toggleChildActionText({ parent: this.el, expanded });
144
+ this.conditionallyOverflowActions();
145
+ }
146
+ overflowDisabledHandler(overflowActionsDisabled) {
147
+ overflowActionsDisabled
148
+ ? this.resizeObserver.disconnect()
149
+ : this.resizeObserver.observe(this.el);
150
+ }
151
+ // --------------------------------------------------------------------------
152
+ //
153
+ // Lifecycle
154
+ //
155
+ // --------------------------------------------------------------------------
156
+ componentDidLoad() {
157
+ this.conditionallyOverflowActions();
158
+ }
159
+ connectedCallback() {
160
+ var _a, _b;
161
+ const { el, expanded } = this;
162
+ ExpandToggle.toggleChildActionText({ parent: el, expanded });
163
+ (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(el, { childList: true, subtree: true });
164
+ if (!this.overflowActionsDisabled) {
165
+ (_b = this.resizeObserver) === null || _b === void 0 ? void 0 : _b.observe(el);
166
+ }
167
+ this.conditionallyOverflowActions();
168
+ conditionalSlot.connectConditionalSlotComponent(this);
169
+ }
170
+ disconnectedCallback() {
171
+ var _a, _b;
172
+ (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
173
+ (_b = this.resizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
174
+ conditionalSlot.disconnectConditionalSlotComponent(this);
175
+ }
176
+ // --------------------------------------------------------------------------
177
+ //
178
+ // Methods
179
+ //
180
+ // --------------------------------------------------------------------------
181
+ /**
182
+ * Overflows actions that won't fit into menus.
183
+ *
184
+ * @internal
185
+ */
186
+ async overflowActions() {
187
+ this.resize({ width: this.el.clientWidth, height: this.el.clientHeight });
188
+ }
189
+ /**
190
+ * Sets focus on the component.
191
+ *
192
+ * @param focusId
193
+ */
194
+ async setFocus(focusId) {
195
+ var _a;
196
+ if (focusId === "expand-toggle") {
197
+ await dom.focusElement(this.expandToggleEl);
198
+ return;
199
+ }
200
+ (_a = this.el) === null || _a === void 0 ? void 0 : _a.focus();
201
+ }
202
+ // --------------------------------------------------------------------------
203
+ //
204
+ // Render Methods
205
+ //
206
+ // --------------------------------------------------------------------------
207
+ renderBottomActionGroup() {
208
+ const { expanded, expandDisabled, intlExpand, intlCollapse, el, position, toggleExpand, scale, layout } = this;
209
+ const tooltip = dom.getSlotted(el, SLOTS$1.expandTooltip);
210
+ const expandLabel = intlExpand || TEXT$1.expand;
211
+ const collapseLabel = intlCollapse || TEXT$1.collapse;
212
+ const expandToggleNode = !expandDisabled ? (index.h(ExpandToggle.ExpandToggle, { el: el, expanded: expanded, intlCollapse: collapseLabel, intlExpand: expandLabel, position: position, ref: this.setExpandToggleRef, scale: scale, toggle: toggleExpand, tooltip: tooltip })) : null;
213
+ return dom.getSlotted(el, SLOTS$1.bottomActions) || expandToggleNode ? (index.h("calcite-action-group", { class: CSS$2.actionGroupBottom, layout: layout, scale: scale }, index.h("slot", { name: SLOTS$1.bottomActions }), index.h("slot", { name: SLOTS$1.expandTooltip }), expandToggleNode)) : null;
214
+ }
215
+ render() {
216
+ return (index.h(index.Host, { onCalciteActionMenuOpenChange: this.actionMenuOpenChangeHandler }, index.h("slot", null), this.renderBottomActionGroup()));
217
+ }
218
+ get el() { return index.getElement(this); }
219
+ static get watchers() { return {
220
+ "expandDisabled": ["expandHandler"],
221
+ "expanded": ["expandedHandler"],
222
+ "overflowActionsDisabled": ["overflowDisabledHandler"]
223
+ }; }
224
+ };
225
+ ActionBar.style = actionBarCss;
226
+
227
+ /*!
228
+ * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
229
+ * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
230
+ * v1.0.0-beta.97
231
+ */
232
+ const CSS$1 = {
30
233
  container: "container",
31
234
  content: "content",
32
235
  contentSpaced: "content--spaced",
@@ -57,7 +260,7 @@ const SLOTS = {
57
260
  control: "control",
58
261
  headerMenuActions: "header-menu-actions"
59
262
  };
60
- const ICONS = {
263
+ const ICONS$1 = {
61
264
  opened: "chevron-up",
62
265
  closed: "chevron-down",
63
266
  valid: "check-circle",
@@ -170,42 +373,126 @@ const Block = class {
170
373
  renderIcon() {
171
374
  const { el, status } = this;
172
375
  const showingLoadingStatus = this.loading && !this.open;
173
- const statusIcon = showingLoadingStatus ? ICONS.refresh : ICONS[status];
376
+ const statusIcon = showingLoadingStatus ? ICONS$1.refresh : ICONS$1[status];
174
377
  const hasIcon = dom.getSlotted(el, SLOTS.icon) || statusIcon;
175
378
  const iconEl = !statusIcon ? (index.h("slot", { key: "icon-slot", name: SLOTS.icon })) : (index.h("calcite-icon", { class: {
176
- [CSS.statusIcon]: true,
177
- [CSS.valid]: status == "valid",
178
- [CSS.invalid]: status == "invalid",
179
- [CSS.loading]: showingLoadingStatus
379
+ [CSS$1.statusIcon]: true,
380
+ [CSS$1.valid]: status == "valid",
381
+ [CSS$1.invalid]: status == "invalid",
382
+ [CSS$1.loading]: showingLoadingStatus
180
383
  }, icon: statusIcon, scale: "m" }));
181
- return hasIcon ? index.h("div", { class: CSS.icon }, iconEl) : null;
384
+ return hasIcon ? index.h("div", { class: CSS$1.icon }, iconEl) : null;
182
385
  }
183
386
  renderTitle() {
184
387
  const { heading, headingLevel, summary, description } = this;
185
- return heading || summary || description ? (index.h("div", { class: CSS.title }, index.h(Heading.Heading, { class: CSS.heading, level: headingLevel || HEADING_LEVEL }, heading), summary || description ? (index.h("div", { class: CSS.description }, summary || description)) : null)) : null;
388
+ return heading || summary || description ? (index.h("div", { class: CSS$1.title }, index.h(Heading.Heading, { class: CSS$1.heading, level: headingLevel || HEADING_LEVEL }, heading), summary || description ? (index.h("div", { class: CSS$1.description }, summary || description)) : null)) : null;
186
389
  }
187
390
  render() {
188
391
  const { collapsible, el, intlCollapse, intlExpand, loading, open, intlLoading } = this;
189
392
  const toggleLabel = open ? intlCollapse || TEXT.collapse : intlExpand || TEXT.expand;
190
- const headerContent = (index.h("header", { class: CSS.header }, this.renderIcon(), this.renderTitle()));
393
+ const headerContent = (index.h("header", { class: CSS$1.header }, this.renderIcon(), this.renderTitle()));
191
394
  const hasControl = !!dom.getSlotted(el, SLOTS.control);
192
395
  const hasMenuActions = !!dom.getSlotted(el, SLOTS.headerMenuActions);
193
- const collapseIcon = open ? ICONS.opened : ICONS.closed;
396
+ const collapseIcon = open ? ICONS$1.opened : ICONS$1.closed;
194
397
  const { guid } = this;
195
398
  const regionId = `${guid}-region`;
196
399
  const buttonId = `${guid}-button`;
197
- const headerNode = (index.h("div", { class: CSS.headerContainer }, this.dragHandle ? index.h("calcite-handle", null) : null, collapsible ? (index.h("button", { "aria-controls": regionId, "aria-expanded": collapsible ? dom.toAriaBoolean(open) : null, "aria-label": toggleLabel, class: CSS.toggle, id: buttonId, onClick: this.onHeaderClick, title: toggleLabel }, headerContent, !hasControl && !hasMenuActions ? (index.h("calcite-icon", { "aria-hidden": "true", class: CSS.toggleIcon, icon: collapseIcon, scale: "s" })) : null)) : (headerContent), loading ? (index.h("calcite-loader", { inline: true, "is-active": true, label: intlLoading })) : hasControl ? (index.h("div", { class: CSS.controlContainer }, index.h("slot", { name: SLOTS.control }))) : null, hasMenuActions ? (index.h("calcite-action-menu", { label: this.intlOptions || TEXT.options }, index.h("slot", { name: SLOTS.headerMenuActions }))) : null));
400
+ const headerNode = (index.h("div", { class: CSS$1.headerContainer }, this.dragHandle ? index.h("calcite-handle", null) : null, collapsible ? (index.h("button", { "aria-controls": regionId, "aria-expanded": collapsible ? dom.toAriaBoolean(open) : null, "aria-label": toggleLabel, class: CSS$1.toggle, id: buttonId, onClick: this.onHeaderClick, title: toggleLabel }, headerContent, !hasControl && !hasMenuActions ? (index.h("calcite-icon", { "aria-hidden": "true", class: CSS$1.toggleIcon, icon: collapseIcon, scale: "s" })) : null)) : (headerContent), loading ? (index.h("calcite-loader", { inline: true, "is-active": true, label: intlLoading })) : hasControl ? (index.h("div", { class: CSS$1.controlContainer }, index.h("slot", { name: SLOTS.control }))) : null, hasMenuActions ? (index.h("calcite-action-menu", { label: this.intlOptions || TEXT.options }, index.h("slot", { name: SLOTS.headerMenuActions }))) : null));
198
401
  return (index.h(index.Host, null, index.h("article", { "aria-busy": dom.toAriaBoolean(loading), class: {
199
- [CSS.container]: true
402
+ [CSS$1.container]: true
200
403
  } }, headerNode, index.h("section", { "aria-expanded": dom.toAriaBoolean(open), "aria-labelledby": buttonId, class: {
201
- [CSS.content]: true,
202
- [CSS.contentSpaced]: !this.disablePadding
404
+ [CSS$1.content]: true,
405
+ [CSS$1.contentSpaced]: !this.disablePadding
203
406
  }, hidden: !open, id: regionId }, this.renderScrim()))));
204
407
  }
205
408
  get el() { return index.getElement(this); }
206
409
  };
207
410
  Block.style = blockCss;
208
411
 
412
+ /*!
413
+ * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
414
+ * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
415
+ * v1.0.0-beta.97
416
+ */
417
+ const CSS = {
418
+ handle: "handle",
419
+ handleActivated: "handle--activated"
420
+ };
421
+ const ICONS = {
422
+ drag: "drag"
423
+ };
424
+
425
+ const handleCss = "@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity: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;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:flex}.handle{display:flex;cursor:move;align-items:center;justify-content:center;align-self:stretch;border-style:none;background-color:transparent;outline-color:transparent;color:var(--calcite-ui-border-input);padding-block:0.75rem;padding-inline:0.25rem;line-height:0}.handle:hover{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}.handle:focus{color:var(--calcite-ui-text-1);outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.handle--activated{background-color:var(--calcite-ui-foreground-3);color:var(--calcite-ui-text-1)}.handle calcite-icon{color:inherit}";
426
+
427
+ const Handle = class {
428
+ constructor(hostRef) {
429
+ index.registerInstance(this, hostRef);
430
+ this.calciteHandleNudge = index.createEvent(this, "calciteHandleNudge", 6);
431
+ // --------------------------------------------------------------------------
432
+ //
433
+ // Properties
434
+ //
435
+ // --------------------------------------------------------------------------
436
+ /**
437
+ * @internal
438
+ */
439
+ this.activated = false;
440
+ /**
441
+ * Value for the button title attribute
442
+ */
443
+ this.textTitle = "handle";
444
+ // --------------------------------------------------------------------------
445
+ //
446
+ // Private Methods
447
+ //
448
+ // --------------------------------------------------------------------------
449
+ this.handleKeyDown = (event) => {
450
+ switch (event.key) {
451
+ case " ":
452
+ this.activated = !this.activated;
453
+ event.preventDefault();
454
+ break;
455
+ case "ArrowUp":
456
+ case "ArrowDown":
457
+ if (!this.activated) {
458
+ return;
459
+ }
460
+ event.preventDefault();
461
+ const direction = event.key.toLowerCase().replace("arrow", "");
462
+ this.calciteHandleNudge.emit({ handle: this.el, direction });
463
+ break;
464
+ }
465
+ };
466
+ this.handleBlur = () => {
467
+ this.activated = false;
468
+ };
469
+ }
470
+ // --------------------------------------------------------------------------
471
+ //
472
+ // Methods
473
+ //
474
+ // --------------------------------------------------------------------------
475
+ /** Sets focus on the component. */
476
+ async setFocus() {
477
+ var _a;
478
+ (_a = this.handleButton) === null || _a === void 0 ? void 0 : _a.focus();
479
+ }
480
+ // --------------------------------------------------------------------------
481
+ //
482
+ // Render Methods
483
+ //
484
+ // --------------------------------------------------------------------------
485
+ render() {
486
+ return (
487
+ // Needs to be a span because of https://github.com/SortableJS/Sortable/issues/1486
488
+ index.h("span", { "aria-pressed": dom.toAriaBoolean(this.activated), class: { [CSS.handle]: true, [CSS.handleActivated]: this.activated }, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, ref: (el) => {
489
+ this.handleButton = el;
490
+ }, role: "button", tabindex: "0", title: this.textTitle }, index.h("calcite-icon", { icon: ICONS.drag, scale: "s" })));
491
+ }
492
+ get el() { return index.getElement(this); }
493
+ };
494
+ Handle.style = handleCss;
495
+
209
496
  const pickListCss = "@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity: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;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{position:relative;box-sizing:border-box;display:flex;flex-shrink:0;flex-grow:1;flex-direction:column;align-items:stretch;background-color:transparent;font-size:var(--calcite-font-size--1);line-height:1rem;color:var(--calcite-ui-text-2)}:host *{box-sizing:border-box}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([filter-enabled]) header{-webkit-margin-after:0.25rem;margin-block-end:0.25rem;display:flex;align-items:stretch;justify-content:flex-end;background-color:var(--calcite-ui-foreground-1);--tw-shadow:0 1px 0 var(--calcite-ui-border-3);--tw-shadow-colored:0 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([filter-enabled]) header.sticky-pos{position:sticky;inset-block-start:0px;z-index:1}calcite-filter{-webkit-margin-after:0px;margin-block-end:0px}:host([loading][disabled]){min-block-size:2rem}";
210
497
 
211
498
  const PickList = class {
@@ -336,5 +623,7 @@ const PickList = class {
336
623
  };
337
624
  PickList.style = pickListCss;
338
625
 
626
+ exports.calcite_action_bar = ActionBar;
339
627
  exports.calcite_block = Block;
628
+ exports.calcite_handle = Handle;
340
629
  exports.calcite_pick_list = PickList;
@@ -11,8 +11,8 @@ const index = require('./index-c6979cbb.js');
11
11
  const observers = require('./observers-5311faf8.js');
12
12
  const interactive = require('./interactive-0a68ab99.js');
13
13
  const dom = require('./dom-4a580af6.js');
14
+ const guid = require('./guid-84ac4d91.js');
14
15
  require('./resources-b56bce71.js');
15
- require('./guid-84ac4d91.js');
16
16
 
17
17
  /*!
18
18
  * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
@@ -174,4 +174,87 @@ const Action = class {
174
174
  };
175
175
  Action.style = actionCss;
176
176
 
177
+ const loaderCss = "@charset \"UTF-8\";@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity: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;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{position:relative;margin-inline:auto;display:none;align-items:center;justify-content:center;opacity:1;min-block-size:var(--calcite-loader-size);font-size:var(--calcite-loader-font-size);stroke:var(--calcite-ui-brand);stroke-width:3;fill:none;transform:scale(1, 1);animation:loader-color-shift calc(var(--calcite-internal-animation-timing-slow) * 2) alternate-reverse infinite linear;padding-block:var(--calcite-loader-padding, 4rem)}:host([scale=s]){--calcite-loader-font-size:var(--calcite-font-size--2);--calcite-loader-size:2rem;--calcite-loader-size-inline:0.75rem}:host([scale=m]){--calcite-loader-font-size:var(--calcite-font-size-0);--calcite-loader-size:4rem;--calcite-loader-size-inline:1rem}:host([scale=l]){--calcite-loader-font-size:var(--calcite-font-size-2);--calcite-loader-size:6rem;--calcite-loader-size-inline:1.5rem}:host([no-padding]){padding-block:0px}:host{display:none}:host([active]){display:flex}.loader__text{display:block;text-align:center;font-size:var(--calcite-font-size--2);line-height:1rem;color:var(--calcite-ui-text-1);-webkit-margin-before:calc(var(--calcite-loader-size) + 1.5rem);margin-block-start:calc(var(--calcite-loader-size) + 1.5rem)}.loader__percentage{position:absolute;display:block;text-align:center;color:var(--calcite-ui-text-1);font-size:var(--calcite-loader-font-size);inline-size:var(--calcite-loader-size);inset-inline-start:50%;-webkit-margin-start:calc(var(--calcite-loader-size) / 2 * -1);margin-inline-start:calc(var(--calcite-loader-size) / 2 * -1);line-height:0.25;transform:scale(1, 1)}.loader__svgs{position:absolute;overflow:visible;opacity:1;inline-size:var(--calcite-loader-size);block-size:var(--calcite-loader-size);inset-inline-start:50%;-webkit-margin-start:calc(var(--calcite-loader-size) / 2 * -1);margin-inline-start:calc(var(--calcite-loader-size) / 2 * -1);transform:scale(1, 1)}.loader__svg{position:absolute;inset-block-start:0px;transform-origin:center;overflow:visible;inset-inline-start:0;inline-size:var(--calcite-loader-size);block-size:var(--calcite-loader-size);animation-iteration-count:infinite;animation-timing-function:linear;animation-name:loader-clockwise}@supports (display: grid){.loader__svg--1{animation-name:loader-offset-1}.loader__svg--2{animation-name:loader-offset-2}.loader__svg--3{animation-name:loader-offset-3}}:host([type=determinate]){animation:none;stroke:var(--calcite-ui-border-3)}:host([type=determinate]) .loader__svg--3{animation:none;stroke:var(--calcite-ui-brand);stroke-dasharray:150.79632;transform:rotate(-90deg);transition:all var(--calcite-internal-animation-timing-fast) linear}:host([inline]){position:relative;margin:0px;animation:none;stroke:currentColor;stroke-width:2;padding-block:0px;block-size:var(--calcite-loader-size-inline);min-block-size:var(--calcite-loader-size-inline);inline-size:var(--calcite-loader-size-inline);-webkit-margin-end:calc(var(--calcite-loader-size-inline) * 0.5);margin-inline-end:calc(var(--calcite-loader-size-inline) * 0.5);vertical-align:calc(var(--calcite-loader-size-inline) * -1 * 0.2)}:host([active][inline]){display:inline-block}:host([inline]) .loader__svgs{inset-block-start:0px;margin:0px;inset-inline-start:0;inline-size:var(--calcite-loader-size-inline);block-size:var(--calcite-loader-size-inline)}:host([inline]) .loader__svg{inline-size:var(--calcite-loader-size-inline);block-size:var(--calcite-loader-size-inline)}:host([complete]){opacity:0;transform:scale(0.75, 0.75);transform-origin:center;transition:opacity var(--calcite-internal-animation-timing-medium) linear 1000ms, transform var(--calcite-internal-animation-timing-medium) linear 1000ms}:host([complete]) .loader__svgs{opacity:0;transform:scale(0.75, 0.75);transform-origin:center;transition:opacity calc(180ms * var(--calcite-internal-duration-factor)) linear 800ms, transform calc(180ms * var(--calcite-internal-duration-factor)) linear 800ms}:host([complete]) .loader__percentage{color:var(--calcite-ui-brand);transform:scale(1.05, 1.05);transform-origin:center;transition:color var(--calcite-internal-animation-timing-medium) linear, transform var(--calcite-internal-animation-timing-medium) linear}.loader__svg--1{stroke-dasharray:27.9252444444% 139.6262222222%;animation-duration:calc(var(--calcite-internal-animation-timing-slow) * 2.4)}@keyframes loader-offset-1{0%{stroke-dasharray:27.9252444444% 251.3272%;stroke-dashoffset:0}50%{stroke-dasharray:139.6262222222% 139.6262222222%;stroke-dashoffset:-83.7757333333%}100%{stroke-dasharray:27.9252444444% 251.3272%;stroke-dashoffset:-279.2524444444%}}.loader__svg--2{stroke-dasharray:55.8504888889% 139.6262222222%;animation-duration:calc(var(--calcite-internal-animation-timing-slow) * 3.2)}@keyframes loader-offset-2{0%{stroke-dasharray:55.8504888889% 223.4019555556%;stroke-dashoffset:0}50%{stroke-dasharray:139.6262222222% 139.6262222222%;stroke-dashoffset:-97.7383555556%}100%{stroke-dasharray:55.8504888889% 223.4019555556%;stroke-dashoffset:-279.2524444444%}}.loader__svg--3{stroke-dasharray:13.9626222222% 139.6262222222%;animation-duration:calc(var(--calcite-internal-animation-timing-slow) * 3.867)}@keyframes loader-offset-3{0%{stroke-dasharray:13.9626222222% 265.2898222222%;stroke-dashoffset:0}50%{stroke-dasharray:139.6262222222% 139.6262222222%;stroke-dashoffset:-76.7944222222%}100%{stroke-dasharray:13.9626222222% 265.2898222222%;stroke-dashoffset:-279.2524444444%}}@keyframes loader-color-shift{0%{stroke:var(--calcite-ui-brand)}33%{stroke:var(--calcite-ui-brand-press)}66%{stroke:var(--calcite-ui-brand-hover)}100%{stroke:var(--calcite-ui-brand)}}@keyframes loader-clockwise{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
178
+
179
+ const Loader = class {
180
+ constructor(hostRef) {
181
+ index.registerInstance(this, hostRef);
182
+ //--------------------------------------------------------------------------
183
+ //
184
+ // Properties
185
+ //
186
+ //--------------------------------------------------------------------------
187
+ /** When `true`, the component is active. */
188
+ this.active = false;
189
+ /** When `true`, displays smaller and appears to the left of the text. */
190
+ this.inline = false;
191
+ /** Specifies the size of the component. */
192
+ this.scale = "m";
193
+ /** The component's value. Valid only for `"determinate"` indicators. Percent complete of 100. */
194
+ this.value = 0;
195
+ /** Text that displays under the component's indicator. */
196
+ this.text = "";
197
+ /**
198
+ * Disables spacing around the component.
199
+ *
200
+ * @deprecated Use `--calcite-loader-padding` CSS variable instead.
201
+ */
202
+ this.noPadding = false;
203
+ }
204
+ //--------------------------------------------------------------------------
205
+ //
206
+ // Lifecycle
207
+ //
208
+ //--------------------------------------------------------------------------
209
+ render() {
210
+ const { el, inline, label, scale, text, type, value } = this;
211
+ const id = el.id || guid.guid();
212
+ const radiusRatio = 0.45;
213
+ const size = inline ? this.getInlineSize(scale) : this.getSize(scale);
214
+ const radius = size * radiusRatio;
215
+ const viewbox = `0 0 ${size} ${size}`;
216
+ const isDeterminate = type === "determinate";
217
+ const circumference = 2 * radius * Math.PI;
218
+ const progress = (value / 100) * circumference;
219
+ const remaining = circumference - progress;
220
+ const valueNow = Math.floor(value);
221
+ const hostAttributes = {
222
+ "aria-valuenow": valueNow,
223
+ "aria-valuemin": 0,
224
+ "aria-valuemax": 100,
225
+ complete: valueNow === 100
226
+ };
227
+ const svgAttributes = { r: radius, cx: size / 2, cy: size / 2 };
228
+ const determinateStyle = { "stroke-dasharray": `${progress} ${remaining}` };
229
+ return (index.h(index.Host, Object.assign({ "aria-label": label, id: id, role: "progressbar" }, (isDeterminate ? hostAttributes : {})), index.h("div", { class: "loader__svgs" }, index.h("svg", { class: "loader__svg loader__svg--1", viewBox: viewbox }, index.h("circle", Object.assign({}, svgAttributes))), index.h("svg", { class: "loader__svg loader__svg--2", viewBox: viewbox }, index.h("circle", Object.assign({}, svgAttributes))), index.h("svg", Object.assign({ class: "loader__svg loader__svg--3", viewBox: viewbox }, (isDeterminate ? { style: determinateStyle } : {})), index.h("circle", Object.assign({}, svgAttributes)))), text && index.h("div", { class: "loader__text" }, text), isDeterminate && index.h("div", { class: "loader__percentage" }, value)));
230
+ }
231
+ //--------------------------------------------------------------------------
232
+ //
233
+ // Private Methods
234
+ //
235
+ //--------------------------------------------------------------------------
236
+ /**
237
+ * Return the proper sizes based on the scale property
238
+ *
239
+ * @param scale
240
+ */
241
+ getSize(scale) {
242
+ return {
243
+ s: 32,
244
+ m: 56,
245
+ l: 80
246
+ }[scale];
247
+ }
248
+ getInlineSize(scale) {
249
+ return {
250
+ s: 12,
251
+ m: 16,
252
+ l: 20
253
+ }[scale];
254
+ }
255
+ get el() { return index.getElement(this); }
256
+ };
257
+ Loader.style = loaderCss;
258
+
177
259
  exports.calcite_action = Action;
260
+ exports.calcite_loader = Loader;