@ac-design/design-system 2.0.0 → 2.1.1

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 (167) hide show
  1. package/dist/lib/charts/ChartFrame.vue.d.ts +2 -0
  2. package/dist/lib/charts/ChartFrame.vue_vue_type_script_setup_true_lang.js +42 -37
  3. package/dist/lib/charts/cartesian.d.ts +324 -0
  4. package/dist/lib/charts/cartesian.js +137 -0
  5. package/dist/lib/charts/echarts.d.ts +86 -0
  6. package/dist/lib/charts/echarts.js +173 -0
  7. package/dist/lib/charts/graph.d.ts +77 -0
  8. package/dist/lib/charts/graph.js +155 -0
  9. package/dist/lib/charts/index.d.ts +4 -0
  10. package/dist/lib/charts/index.js +3 -1
  11. package/dist/lib/charts/shared.d.ts +0 -7
  12. package/dist/lib/charts/shared.js +1 -19
  13. package/dist/lib/charts/xy.d.ts +11 -7
  14. package/dist/lib/charts/xy.js +53 -72
  15. package/dist/lib/compat.css +1322 -278
  16. package/dist/lib/components/AcAlert.vue.d.ts +9 -0
  17. package/dist/lib/components/AcAlert.vue_vue_type_script_setup_true_lang.js +121 -21
  18. package/dist/lib/components/AcAppSwitcher.vue_vue_type_script_setup_true_lang.js +1 -1
  19. package/dist/lib/components/AcAreaChart.vue.d.ts +3 -0
  20. package/dist/lib/components/AcAreaChart.vue_vue_type_script_setup_true_lang.js +132 -142
  21. package/dist/lib/components/AcAvatar.vue.d.ts +7 -4
  22. package/dist/lib/components/AcAvatar.vue_vue_type_script_setup_true_lang.js +59 -54
  23. package/dist/lib/components/AcBadge.vue.d.ts +7 -3
  24. package/dist/lib/components/AcBadge.vue_vue_type_script_setup_true_lang.js +35 -28
  25. package/dist/lib/components/AcBarChart.vue.d.ts +3 -0
  26. package/dist/lib/components/AcBarChart.vue_vue_type_script_setup_true_lang.js +142 -146
  27. package/dist/lib/components/AcBreadcrumb.vue.d.ts +4 -1
  28. package/dist/lib/components/AcBreadcrumb.vue_vue_type_script_setup_true_lang.js +18 -17
  29. package/dist/lib/components/AcBulkActionBar.vue.d.ts +2 -0
  30. package/dist/lib/components/AcBulkActionBar.vue_vue_type_script_setup_true_lang.js +1 -1
  31. package/dist/lib/components/AcButton.vue.d.ts +12 -6
  32. package/dist/lib/components/AcButton.vue_vue_type_script_setup_true_lang.js +85 -47
  33. package/dist/lib/components/AcCard.vue.d.ts +34 -3
  34. package/dist/lib/components/AcCard.vue_vue_type_script_setup_true_lang.js +169 -34
  35. package/dist/lib/components/AcCellValue.vue.d.ts +3 -3
  36. package/dist/lib/components/AcCellValue.vue_vue_type_script_setup_true_lang.js +171 -165
  37. package/dist/lib/components/AcCheckBox.vue.d.ts +1 -1
  38. package/dist/lib/components/AcCheckBox.vue_vue_type_script_setup_true_lang.js +58 -72
  39. package/dist/lib/components/AcCheckList.js +5 -0
  40. package/dist/lib/components/AcCheckList.vue.d.ts +45 -0
  41. package/dist/lib/components/AcCheckList.vue_vue_type_script_setup_true_lang.js +64 -0
  42. package/dist/lib/components/AcCheckRadio.vue.d.ts +30 -5
  43. package/dist/lib/components/AcCheckRadio.vue_vue_type_script_setup_true_lang.js +100 -36
  44. package/dist/lib/components/AcCircularProgress.vue.d.ts +4 -4
  45. package/dist/lib/components/AcCircularProgress.vue_vue_type_script_setup_true_lang.js +12 -9
  46. package/dist/lib/components/AcColorInput.vue.d.ts +5 -2
  47. package/dist/lib/components/AcColorInput.vue_vue_type_script_setup_true_lang.js +127 -97
  48. package/dist/lib/components/AcCommandBlock.js +5 -0
  49. package/dist/lib/components/AcCommandBlock.vue.d.ts +34 -0
  50. package/dist/lib/components/AcCommandBlock.vue_vue_type_script_setup_true_lang.js +88 -0
  51. package/dist/lib/components/AcConfirmModal.vue.d.ts +1 -1
  52. package/dist/lib/components/AcConfirmModal.vue_vue_type_script_setup_true_lang.js +7 -3
  53. package/dist/lib/components/AcCopyButton.vue.d.ts +2 -2
  54. package/dist/lib/components/AcCopyButton.vue_vue_type_script_setup_true_lang.js +4 -4
  55. package/dist/lib/components/AcCostSummary.js +5 -0
  56. package/dist/lib/components/AcCostSummary.vue.d.ts +102 -0
  57. package/dist/lib/components/AcCostSummary.vue_vue_type_script_setup_true_lang.js +179 -0
  58. package/dist/lib/components/AcDatePicker.vue.d.ts +3 -3
  59. package/dist/lib/components/AcDatePicker.vue_vue_type_script_setup_true_lang.js +606 -380
  60. package/dist/lib/components/AcDeleteModal.vue_vue_type_script_setup_true_lang.js +47 -41
  61. package/dist/lib/components/AcDonutChart.vue.d.ts +10 -0
  62. package/dist/lib/components/AcDonutChart.vue_vue_type_script_setup_true_lang.js +116 -89
  63. package/dist/lib/components/AcDropdown.vue.d.ts +5 -2
  64. package/dist/lib/components/AcDropdown.vue_vue_type_script_setup_true_lang.js +88 -75
  65. package/dist/lib/components/AcDropdownDivider.vue_vue_type_script_setup_true_lang.js +11 -10
  66. package/dist/lib/components/AcDropdownItem.vue.d.ts +1 -1
  67. package/dist/lib/components/AcDropdownItem.vue_vue_type_script_setup_true_lang.js +17 -17
  68. package/dist/lib/components/AcEmptyState.vue.d.ts +1 -1
  69. package/dist/lib/components/AcErrorState.js +5 -0
  70. package/dist/lib/components/AcErrorState.vue.d.ts +46 -0
  71. package/dist/lib/components/AcErrorState.vue_vue_type_script_setup_true_lang.js +66 -0
  72. package/dist/lib/components/AcFeatureCard.vue.d.ts +6 -0
  73. package/dist/lib/components/AcFeatureCard.vue_vue_type_script_setup_true_lang.js +136 -114
  74. package/dist/lib/components/AcFooter.vue.d.ts +1 -1
  75. package/dist/lib/components/AcFooter.vue_vue_type_script_setup_true_lang.js +1 -1
  76. package/dist/lib/components/AcFormFooter.vue.d.ts +1 -1
  77. package/dist/lib/components/AcFormSection.vue.d.ts +1 -1
  78. package/dist/lib/components/AcGraphChart.js +5 -0
  79. package/dist/lib/components/AcGraphChart.vue.d.ts +124 -0
  80. package/dist/lib/components/AcGraphChart.vue_vue_type_script_setup_true_lang.js +578 -0
  81. package/dist/lib/components/AcHeader.vue.d.ts +20 -2
  82. package/dist/lib/components/AcHeader.vue_vue_type_script_setup_true_lang.js +84 -26
  83. package/dist/lib/components/AcInfoTable.vue.d.ts +1 -1
  84. package/dist/lib/components/AcInput.vue.d.ts +1 -1
  85. package/dist/lib/components/AcInput.vue_vue_type_script_setup_true_lang.js +76 -79
  86. package/dist/lib/components/AcKeyValueInput.vue.d.ts +4 -4
  87. package/dist/lib/components/AcKeyValueInput.vue_vue_type_script_setup_true_lang.js +199 -183
  88. package/dist/lib/components/AcLineChart.vue.d.ts +6 -0
  89. package/dist/lib/components/AcLineChart.vue_vue_type_script_setup_true_lang.js +113 -125
  90. package/dist/lib/components/AcLoader.js +5 -0
  91. package/dist/lib/components/AcLoader.vue.d.ts +15 -0
  92. package/dist/lib/components/AcLoader.vue_vue_type_script_setup_true_lang.js +66 -0
  93. package/dist/lib/components/AcLocaleSwitcher.vue.d.ts +3 -1
  94. package/dist/lib/components/AcLocaleSwitcher.vue_vue_type_script_setup_true_lang.js +44 -36
  95. package/dist/lib/components/AcMapChart.js +5 -0
  96. package/dist/lib/components/AcMapChart.vue.d.ts +136 -0
  97. package/dist/lib/components/AcMapChart.vue_vue_type_script_setup_true_lang.js +518 -0
  98. package/dist/lib/components/AcModal.vue.d.ts +6 -3
  99. package/dist/lib/components/AcModal.vue_vue_type_script_setup_true_lang.js +85 -61
  100. package/dist/lib/components/AcNavbar.vue.d.ts +8 -5
  101. package/dist/lib/components/AcNavbar.vue_vue_type_script_setup_true_lang.js +25 -17
  102. package/dist/lib/components/AcNavbarItem.vue.d.ts +2 -2
  103. package/dist/lib/components/AcNavbarItem.vue_vue_type_script_setup_true_lang.js +3 -4
  104. package/dist/lib/components/AcNotificationMenu.vue.d.ts +3 -3
  105. package/dist/lib/components/AcNotificationMenu.vue_vue_type_script_setup_true_lang.js +133 -168
  106. package/dist/lib/components/AcNumberInput.vue.d.ts +2 -2
  107. package/dist/lib/components/AcNumberInput.vue_vue_type_script_setup_true_lang.js +137 -147
  108. package/dist/lib/components/AcPage.vue.d.ts +2 -2
  109. package/dist/lib/components/AcPage.vue_vue_type_script_setup_true_lang.js +1 -1
  110. package/dist/lib/components/AcPagination.vue.d.ts +5 -5
  111. package/dist/lib/components/AcPagination.vue_vue_type_script_setup_true_lang.js +59 -56
  112. package/dist/lib/components/AcPreloader.vue.d.ts +3 -3
  113. package/dist/lib/components/AcPreloader.vue_vue_type_script_setup_true_lang.js +15 -16
  114. package/dist/lib/components/AcProductHero.js +5 -0
  115. package/dist/lib/components/AcProductHero.vue.d.ts +56 -0
  116. package/dist/lib/components/AcProductHero.vue_vue_type_script_setup_true_lang.js +95 -0
  117. package/dist/lib/components/AcProgress.vue.d.ts +17 -2
  118. package/dist/lib/components/AcProgress.vue_vue_type_script_setup_true_lang.js +83 -29
  119. package/dist/lib/components/AcResourceCard.vue.d.ts +1 -1
  120. package/dist/lib/components/AcResourceCard.vue_vue_type_script_setup_true_lang.js +4 -4
  121. package/dist/lib/components/AcSearchBar.vue.d.ts +1 -1
  122. package/dist/lib/components/AcSearchBar.vue_vue_type_script_setup_true_lang.js +8 -4
  123. package/dist/lib/components/AcSelect.vue.d.ts +3 -3
  124. package/dist/lib/components/AcSelect.vue_vue_type_script_setup_true_lang.js +232 -243
  125. package/dist/lib/components/AcSettingsRow.js +5 -0
  126. package/dist/lib/components/AcSettingsRow.vue.d.ts +29 -0
  127. package/dist/lib/components/AcSettingsRow.vue_vue_type_script_setup_true_lang.js +37 -0
  128. package/dist/lib/components/AcSidePanel.vue_vue_type_script_setup_true_lang.js +5 -5
  129. package/dist/lib/components/AcSideTabs.vue.d.ts +1 -1
  130. package/dist/lib/components/AcSidebar.vue.d.ts +4 -1
  131. package/dist/lib/components/AcSidebar.vue_vue_type_script_setup_true_lang.js +104 -94
  132. package/dist/lib/components/AcSidebarItem.vue.d.ts +1 -1
  133. package/dist/lib/components/AcSidebarItem.vue_vue_type_script_setup_true_lang.js +42 -42
  134. package/dist/lib/components/AcSidebarSection.vue.d.ts +2 -2
  135. package/dist/lib/components/AcSidebarSection.vue_vue_type_script_setup_true_lang.js +23 -18
  136. package/dist/lib/components/AcSteps.vue_vue_type_script_setup_true_lang.js +1 -1
  137. package/dist/lib/components/AcSwitch.vue.d.ts +3 -0
  138. package/dist/lib/components/AcSwitch.vue_vue_type_script_setup_true_lang.js +46 -39
  139. package/dist/lib/components/AcSwitchCard.vue.d.ts +3 -3
  140. package/dist/lib/components/AcSwitchCard.vue_vue_type_script_setup_true_lang.js +9 -7
  141. package/dist/lib/components/AcTable.vue_vue_type_script_setup_true_lang.js +65 -65
  142. package/dist/lib/components/AcTabs.vue.d.ts +9 -2
  143. package/dist/lib/components/AcTabs.vue_vue_type_script_setup_true_lang.js +42 -27
  144. package/dist/lib/components/AcTag.vue.d.ts +1 -1
  145. package/dist/lib/components/AcTagInput.vue.d.ts +5 -5
  146. package/dist/lib/components/AcTagInput.vue_vue_type_script_setup_true_lang.js +140 -142
  147. package/dist/lib/components/AcTextarea.vue.d.ts +1 -1
  148. package/dist/lib/components/AcTextarea.vue_vue_type_script_setup_true_lang.js +69 -72
  149. package/dist/lib/components/AcThemeMode.vue.d.ts +3 -3
  150. package/dist/lib/components/AcThemeMode.vue_vue_type_script_setup_true_lang.js +54 -22
  151. package/dist/lib/components/AcTimePicker.vue.d.ts +1 -1
  152. package/dist/lib/components/AcTimePicker.vue_vue_type_script_setup_true_lang.js +177 -185
  153. package/dist/lib/components/AcToaster.vue.d.ts +6 -3
  154. package/dist/lib/components/AcToaster.vue_vue_type_script_setup_true_lang.js +103 -64
  155. package/dist/lib/components/AcTooltip.vue.d.ts +34 -14
  156. package/dist/lib/components/AcTooltip.vue_vue_type_script_setup_true_lang.js +184 -70
  157. package/dist/lib/components/AcUserMenu.vue.d.ts +23 -1
  158. package/dist/lib/components/AcUserMenu.vue_vue_type_script_setup_true_lang.js +181 -138
  159. package/dist/lib/components/index.d.ts +7 -0
  160. package/dist/lib/components/status.d.ts +3 -1
  161. package/dist/lib/components/status.js +20 -5
  162. package/dist/lib/composables/useToast.d.ts +17 -1
  163. package/dist/lib/composables/useToast.js +10 -2
  164. package/dist/lib/index.d.ts +7 -3
  165. package/dist/lib/index.js +80 -73
  166. package/dist/lib/theme.css +39 -54
  167. package/package.json +12 -3
@@ -0,0 +1,518 @@
1
+ import e from "./AcButton.js";
2
+ import { statusMeta as t } from "./status.js";
3
+ import n from "../charts/ChartFrame.js";
4
+ import { bindItemHover as r, loadOnce as i, useEChart as a } from "../charts/echarts.js";
5
+ import { chartColor as o, formatCompact as s } from "../charts/shared.js";
6
+ import { computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createSlots as p, createTextVNode as ee, createVNode as m, defineComponent as h, getCurrentInstance as te, normalizeStyle as g, openBlock as _, ref as v, renderSlot as ne, shallowRef as re, toDisplayString as y, unref as b, useId as ie, watch as x, withCtx as S } from "vue";
7
+ import { MapPinOff as ae, Minus as oe, Plus as se, RotateCcw as ce } from "@lucide/vue";
8
+ import { registerMap as C, use as le } from "echarts/core";
9
+ import { EffectScatterChart as ue, ScatterChart as de } from "echarts/charts";
10
+ import { GeoComponent as fe } from "echarts/components";
11
+ import { LabelLayout as pe } from "echarts/features";
12
+ //#region src/lib/components/AcMapChart.vue?vue&type=script&setup=true&lang.ts
13
+ var me = { class: "absolute top-2 right-2 flex flex-col gap-1" }, he = { class: "font-medium text-heading" }, ge = {
14
+ key: 0,
15
+ class: "mt-0.5 text-muted"
16
+ }, _e = {
17
+ key: 2,
18
+ class: "mt-1.5 flex justify-between gap-4 border-t border-border pt-1.5"
19
+ }, ve = { class: "text-muted" }, ye = { class: "font-medium text-heading tabular-nums" }, w = 2, be = 1.9, T = .75, E = 8, D = 8, xe = .7, O = /*@__PURE__*/ h({
20
+ __name: "AcMapChart",
21
+ props: {
22
+ points: {},
23
+ height: { default: 360 },
24
+ pointSize: {
25
+ type: [Number, Function],
26
+ default: 10
27
+ },
28
+ statusLabels: { default: void 0 },
29
+ statusColors: { default: void 0 },
30
+ legend: { default: "bottom" },
31
+ legendValues: {
32
+ type: Boolean,
33
+ default: !0
34
+ },
35
+ pulse: {
36
+ type: [Boolean, Array],
37
+ default: !1
38
+ },
39
+ labels: {
40
+ type: Boolean,
41
+ default: !1
42
+ },
43
+ zoom: {
44
+ type: Boolean,
45
+ default: !1
46
+ },
47
+ zoomExtent: { default: () => [1, 8] },
48
+ fitToPoints: {
49
+ type: Boolean,
50
+ default: !1
51
+ },
52
+ geoJson: { default: void 0 },
53
+ valueLabel: { default: "Value" },
54
+ valueFormatter: {
55
+ type: Function,
56
+ default: void 0
57
+ },
58
+ pointsLabel: { default: "locations" },
59
+ tooltip: {
60
+ type: Boolean,
61
+ default: !0
62
+ },
63
+ loading: {
64
+ type: Boolean,
65
+ default: !1
66
+ },
67
+ emptyText: { default: "No locations to show yet" },
68
+ title: { default: "" },
69
+ description: { default: "" },
70
+ renderer: { default: "canvas" },
71
+ animation: {
72
+ type: Boolean,
73
+ default: !0
74
+ }
75
+ },
76
+ emits: ["point-click"],
77
+ setup(h, { emit: O }) {
78
+ le([
79
+ fe,
80
+ de,
81
+ ue,
82
+ pe
83
+ ]);
84
+ let k = h, Se = O, A = [
85
+ "success",
86
+ "info",
87
+ "pending",
88
+ "warning",
89
+ "danger",
90
+ "neutral"
91
+ ], Ce = {
92
+ success: o("success", 0),
93
+ info: o("info", 0),
94
+ pending: o("pending", 0),
95
+ warning: o("warning", 0),
96
+ danger: o("danger", 0),
97
+ neutral: o("chart-7", 0)
98
+ }, we = {
99
+ success: "Healthy",
100
+ info: "Info",
101
+ pending: "Pending",
102
+ warning: "Degraded",
103
+ danger: "Down",
104
+ neutral: "Unknown"
105
+ }, Te = ie(), Ee = !!te()?.vnode.props?.onPointClick, j = v(), M = v([]), N = v(0), P = v(null), F = v(), I = re(), De = 0, L = null;
106
+ function R(e) {
107
+ return e.status?.trim() || "neutral";
108
+ }
109
+ function z(e) {
110
+ if (A.includes(e)) return e;
111
+ let n = t(e).tone;
112
+ return n === "default" ? "neutral" : n;
113
+ }
114
+ function B(e) {
115
+ return k.statusLabels?.[e] ?? we[e] ?? t(e).label;
116
+ }
117
+ function V(e) {
118
+ let t = k.statusColors?.[e];
119
+ return t ? o(t, 0) : Ce[z(e)];
120
+ }
121
+ function H(e) {
122
+ return e.color ? o(e.color, 0) : V(R(e));
123
+ }
124
+ function Oe(e) {
125
+ return typeof k.pointSize == "function" ? k.pointSize(e) : k.pointSize;
126
+ }
127
+ function U(e) {
128
+ return k.valueFormatter ? k.valueFormatter(e) : s(e);
129
+ }
130
+ function ke(e) {
131
+ if (!k.pulse) return !1;
132
+ let t = R(e);
133
+ return k.pulse === !0 ? z(t) === "success" : k.pulse.includes(t) || k.pulse.includes(z(t));
134
+ }
135
+ function Ae(e) {
136
+ return /^.[a-z]/.test(e) ? e.charAt(0).toLowerCase() + e.slice(1) : e;
137
+ }
138
+ function je(e) {
139
+ return `${`${Math.abs(e.latitude).toFixed(2)}° ${e.latitude >= 0 ? "N" : "S"}`}, ${`${Math.abs(e.longitude).toFixed(2)}° ${e.longitude >= 0 ? "E" : "W"}`}`;
140
+ }
141
+ function W(e) {
142
+ return Math.min(k.zoomExtent[1], Math.max(k.zoomExtent[0], e));
143
+ }
144
+ function G(e) {
145
+ let t = [
146
+ Infinity,
147
+ Infinity,
148
+ -Infinity,
149
+ -Infinity
150
+ ];
151
+ function n(e) {
152
+ if (Array.isArray(e)) {
153
+ if (typeof e[0] == "number" && typeof e[1] == "number") {
154
+ t[0] = Math.min(t[0], e[0]), t[1] = Math.min(t[1], e[1]), t[2] = Math.max(t[2], e[0]), t[3] = Math.max(t[3], e[1]);
155
+ return;
156
+ }
157
+ e.forEach(n);
158
+ }
159
+ }
160
+ for (let t of e.features) n(t.geometry?.coordinates);
161
+ return t;
162
+ }
163
+ function K(e, t, n) {
164
+ let r = (e) => n ? e[0] >= t : e[0] <= t, i = [];
165
+ return e.forEach((n, a) => {
166
+ let o = e[(a + e.length - 1) % e.length];
167
+ r(o) !== r(n) && i.push([t, o[1] + (n[1] - o[1]) * (t - o[0]) / (n[0] - o[0])]), r(n) && i.push(n);
168
+ }), i;
169
+ }
170
+ function Me(e) {
171
+ if (!e.some((e) => e.some((t, n) => n > 0 && Math.abs(t[0] - e[n - 1][0]) > 180))) return [e];
172
+ let t = e.map((e) => {
173
+ let t = e[0][0];
174
+ return e.map((e) => {
175
+ let n = e[0];
176
+ for (; n - t > 180;) n -= 360;
177
+ for (; n - t < -180;) n += 360;
178
+ return t = n, [n, e[1]];
179
+ });
180
+ });
181
+ return [
182
+ -360,
183
+ 0,
184
+ 360
185
+ ].flatMap((e) => {
186
+ let n = t.map((t) => K(K(t.map((t) => [t[0] + e, t[1]]), -180, !0), 180, !1)).filter((e) => e.length >= 3);
187
+ return n.length ? [n] : [];
188
+ });
189
+ }
190
+ async function Ne() {
191
+ let [{ feature: e }, t] = await Promise.all([import("topojson-client"), import("world-atlas/countries-110m.json")]), n = t.default, r = {
192
+ type: "FeatureCollection",
193
+ features: e(n, n.objects.countries).features.filter((e) => e.properties?.name !== "Antarctica").map((e) => {
194
+ let t = e.geometry;
195
+ if (!t || t.type !== "Polygon" && t.type !== "MultiPolygon") return e;
196
+ let n = t.type === "Polygon" ? [t.coordinates] : t.coordinates;
197
+ return {
198
+ ...e,
199
+ geometry: {
200
+ type: "MultiPolygon",
201
+ coordinates: n.flatMap(Me)
202
+ }
203
+ };
204
+ })
205
+ };
206
+ return C("ac-world", r), r;
207
+ }
208
+ async function q() {
209
+ let e = k.geoJson;
210
+ if (e) {
211
+ let t = `ac-map-${Te}-${++De}`;
212
+ C(t, e), I.value = G(e), F.value = t;
213
+ return;
214
+ }
215
+ let t = await i("world-map", Ne);
216
+ k.geoJson || (I.value = G(t), F.value = "ac-world");
217
+ }
218
+ let J = c(() => {
219
+ let e = /* @__PURE__ */ new Map();
220
+ for (let t of k.points) e.set(R(t), (e.get(R(t)) ?? 0) + 1);
221
+ let t = [...e.keys()];
222
+ return t.sort((e, t) => A.indexOf(z(e)) - A.indexOf(z(t))), t.map((t) => ({
223
+ key: t,
224
+ label: B(t),
225
+ color: V(t),
226
+ count: e.get(t)
227
+ }));
228
+ }), Pe = c(() => J.value.map((e) => ({
229
+ key: e.key,
230
+ name: e.label,
231
+ color: e.color,
232
+ value: k.legendValues ? String(e.count) : void 0
233
+ }))), Y = c(() => k.fitToPoints || !N.value ? k.height : Math.min(k.height, Math.round(N.value / be))), X = c(() => k.points.some((e) => e.status)), Z = c(() => k.points.some((e) => e.description)), Q = c(() => k.points.some((e) => typeof e.value == "number")), Fe = c(() => ({
234
+ columns: [
235
+ "Name",
236
+ ...X.value ? ["Status"] : [],
237
+ ...Z.value ? ["Details"] : [],
238
+ ...Q.value ? [k.valueLabel] : [],
239
+ "Coordinates"
240
+ ],
241
+ rows: k.points.map((e) => [
242
+ e.label,
243
+ ...X.value ? [B(R(e))] : [],
244
+ ...Z.value ? [e.description ?? ""] : [],
245
+ ...Q.value ? [typeof e.value == "number" ? U(e.value) : "–"] : [],
246
+ je(e)
247
+ ])
248
+ })), Ie = c(() => {
249
+ let e = J.value.map((e) => `${e.count} ${Ae(e.label)}`).join(", "), t = `World map, ${k.points.length} ${k.pointsLabel}${X.value ? `: ${e}` : ""}.`;
250
+ return [k.title, k.description || t].filter(Boolean).join(". ");
251
+ }), Le = c(() => {
252
+ let e = I.value;
253
+ if (!e) return {
254
+ zoom: W(1),
255
+ center: void 0
256
+ };
257
+ let t = {
258
+ zoom: W(1),
259
+ center: [(e[0] + e[2]) / 2, (e[1] + e[3]) / 2]
260
+ };
261
+ if (!k.fitToPoints || !k.points.length || !N.value) return t;
262
+ let n = k.points.map((e) => e.longitude), r = k.points.map((e) => e.latitude), [i, a, o, s] = [
263
+ Math.min(...n),
264
+ Math.max(...n),
265
+ Math.min(...r),
266
+ Math.max(...r)
267
+ ], c = N.value - 16, l = Y.value - 16, u = e[2] - e[0], d = e[3] - e[1], f = Math.min(c, u / d * l * T) / u, p = f / T;
268
+ return {
269
+ zoom: W(Math.min(c / (Math.max(a - i, D) * f), l / (Math.max(s - o, D) * p)) * xe),
270
+ center: [(i + a) / 2, (o + s) / 2]
271
+ };
272
+ });
273
+ function Re(e, t) {
274
+ let n = H(t);
275
+ return {
276
+ name: t.label,
277
+ value: [t.longitude, t.latitude],
278
+ point: k.points.indexOf(t),
279
+ symbolSize: Oe(t),
280
+ itemStyle: { color: e.color(n) },
281
+ emphasis: { itemStyle: {
282
+ shadowBlur: 10,
283
+ shadowColor: e.alpha(n, .6)
284
+ } }
285
+ };
286
+ }
287
+ function ze(e) {
288
+ if (!F.value) return {};
289
+ let t = L ?? Le.value, n = k.animation && !e.reducedMotion, r = k.points.filter((e) => !M.value.includes(R(e))), i = e.reducedMotion ? [] : r.filter(ke), a = r.filter((e) => !i.includes(e)), o = {
290
+ coordinateSystem: "geo",
291
+ symbol: "circle",
292
+ cursor: Ee ? "pointer" : "default",
293
+ itemStyle: {
294
+ borderColor: e.surface,
295
+ borderWidth: 1.5
296
+ },
297
+ emphasis: { scale: 1.4 },
298
+ label: {
299
+ show: k.labels,
300
+ position: "bottom",
301
+ distance: 4,
302
+ formatter: "{b}",
303
+ color: e.muted,
304
+ fontSize: 11,
305
+ fontFamily: e.font,
306
+ textBorderColor: e.surface,
307
+ textBorderWidth: 2
308
+ },
309
+ labelLayout: { hideOverlap: !0 }
310
+ };
311
+ return {
312
+ animation: n,
313
+ geo: {
314
+ map: F.value,
315
+ roam: k.zoom,
316
+ silent: !0,
317
+ zoom: t.zoom,
318
+ center: t.center,
319
+ scaleLimit: {
320
+ min: k.zoomExtent[0],
321
+ max: k.zoomExtent[1]
322
+ },
323
+ aspectScale: T,
324
+ left: E,
325
+ right: E,
326
+ top: E,
327
+ bottom: E,
328
+ preserveAspect: "contain",
329
+ label: { show: !1 },
330
+ itemStyle: {
331
+ areaColor: e.sunken,
332
+ borderColor: e.borderDark,
333
+ borderWidth: .5
334
+ },
335
+ emphasis: { disabled: !0 },
336
+ select: { disabled: !0 }
337
+ },
338
+ series: [{
339
+ ...o,
340
+ id: "still",
341
+ type: "scatter",
342
+ data: a.map((t) => Re(e, t))
343
+ }, {
344
+ ...o,
345
+ id: "pulsing",
346
+ type: "effectScatter",
347
+ data: i.map((t) => Re(e, t)),
348
+ showEffectOn: "render",
349
+ rippleEffect: {
350
+ brushType: "stroke",
351
+ scale: 3,
352
+ period: 2.5
353
+ }
354
+ }]
355
+ };
356
+ }
357
+ function Be(e, t, n) {
358
+ let r = e ? k.points[e.point] : void 0;
359
+ if (!r || !k.tooltip) return;
360
+ let i = R(r), a = typeof r.value == "number" ? r.value : null;
361
+ P.value = {
362
+ clientX: t,
363
+ clientY: n,
364
+ title: r.label,
365
+ items: [{
366
+ key: i,
367
+ name: B(i),
368
+ color: H(r),
369
+ value: a,
370
+ formatted: a === null ? "" : U(a)
371
+ }],
372
+ datum: r,
373
+ index: e.point
374
+ };
375
+ }
376
+ let { chart: Ve } = a({
377
+ host: j,
378
+ renderer: () => k.renderer,
379
+ prepare: q,
380
+ option: ze,
381
+ setup: (e) => {
382
+ r(e, (e) => Be(e.data, e.clientX, e.clientY), () => P.value = null), e.on("click", (e) => {
383
+ let t = k.points[e.data?.point ?? -1];
384
+ t && Se("point-click", t);
385
+ }), e.on("georoam", () => {
386
+ let t = e.getOption().geo?.[0];
387
+ t?.zoom !== void 0 && t.center && (L = {
388
+ zoom: t.zoom,
389
+ center: [...t.center]
390
+ });
391
+ });
392
+ }
393
+ });
394
+ function $(e) {
395
+ let t = Ve.value;
396
+ t && t.dispatchAction({
397
+ type: "geoRoam",
398
+ geoIndex: 0,
399
+ zoom: e,
400
+ originX: t.getWidth() / 2,
401
+ originY: t.getHeight() / 2
402
+ });
403
+ }
404
+ function He() {
405
+ $(w);
406
+ }
407
+ function Ue() {
408
+ $(1 / w);
409
+ }
410
+ function We() {
411
+ L = null;
412
+ let e = Le.value;
413
+ Ve.value?.setOption({ geo: [{
414
+ zoom: e.zoom,
415
+ center: e.center
416
+ }] });
417
+ }
418
+ return x(() => k.geoJson, () => void q()), x([() => k.zoom, () => k.fitToPoints], () => L = null), (t, r) => (_(), l(n, {
419
+ hidden: M.value,
420
+ "onUpdate:hidden": r[0] ||= (e) => M.value = e,
421
+ width: N.value,
422
+ "onUpdate:width": r[1] ||= (e) => N.value = e,
423
+ testid: "ac-map-chart",
424
+ height: Y.value,
425
+ loading: h.loading,
426
+ empty: !h.points.length,
427
+ "empty-text": h.emptyText,
428
+ "empty-icon": b(ae),
429
+ legend: h.legend,
430
+ "legend-items": Pe.value,
431
+ summary: Ie.value,
432
+ title: h.title,
433
+ description: h.description,
434
+ table: Fe.value,
435
+ tip: P.value,
436
+ tooltip: h.tooltip
437
+ }, p({
438
+ tooltip: S(({ datum: e, items: n }) => [ne(t.$slots, "tooltip", {
439
+ point: e,
440
+ statusLabel: n[0]?.name ?? "",
441
+ color: n[0]?.color ?? "",
442
+ formattedValue: n[0]?.formatted ?? ""
443
+ }, () => [
444
+ f("p", he, y(e.label), 1),
445
+ e.description ? (_(), d("p", ge, y(e.description), 1)) : u("", !0),
446
+ e.status && n[0] ? (_(), d("p", {
447
+ key: 1,
448
+ class: "mt-2 inline-flex h-5 items-center gap-1.5 rounded-full px-2 font-medium text-heading",
449
+ style: g({ backgroundColor: `color-mix(in srgb, ${n[0].color} 14%, transparent)` })
450
+ }, [f("span", {
451
+ class: "size-1.5 shrink-0 rounded-full",
452
+ style: g({ backgroundColor: n[0].color }),
453
+ "aria-hidden": "true"
454
+ }, null, 4), ee(" " + y(n[0].name), 1)], 4)) : u("", !0),
455
+ n[0]?.formatted ? (_(), d("p", _e, [f("span", ve, y(h.valueLabel), 1), f("span", ye, y(n[0].formatted), 1)])) : u("", !0)
456
+ ])]),
457
+ default: S(() => [f("div", {
458
+ ref_key: "host",
459
+ ref: j,
460
+ class: "size-full"
461
+ }, null, 512)]),
462
+ _: 2
463
+ }, [h.zoom ? {
464
+ name: "controls",
465
+ fn: S(() => [f("div", me, [
466
+ m(e, {
467
+ color: "white",
468
+ size: "xs",
469
+ "icon-only": "",
470
+ title: "Zoom in",
471
+ onClick: He
472
+ }, {
473
+ icon: S(() => [m(b(se), { "aria-hidden": "true" })]),
474
+ _: 1
475
+ }),
476
+ m(e, {
477
+ color: "white",
478
+ size: "xs",
479
+ "icon-only": "",
480
+ title: "Zoom out",
481
+ onClick: Ue
482
+ }, {
483
+ icon: S(() => [m(b(oe), { "aria-hidden": "true" })]),
484
+ _: 1
485
+ }),
486
+ m(e, {
487
+ color: "white",
488
+ size: "xs",
489
+ "icon-only": "",
490
+ title: "Reset view",
491
+ onClick: We
492
+ }, {
493
+ icon: S(() => [m(b(ce), { "aria-hidden": "true" })]),
494
+ _: 1
495
+ })
496
+ ])]),
497
+ key: "0"
498
+ } : void 0]), 1032, [
499
+ "hidden",
500
+ "width",
501
+ "height",
502
+ "loading",
503
+ "empty",
504
+ "empty-text",
505
+ "empty-icon",
506
+ "legend",
507
+ "legend-items",
508
+ "summary",
509
+ "title",
510
+ "description",
511
+ "table",
512
+ "tip",
513
+ "tooltip"
514
+ ]));
515
+ }
516
+ });
517
+ //#endregion
518
+ export { O as default };
@@ -3,8 +3,10 @@ export interface Props {
3
3
  title?: string;
4
4
  /** Optional line under the title. */
5
5
  description?: string;
6
- /** Width: `small` 440px, `normal` 520px, `medium` 800px, `large` 1000px, `full` viewport minus 64px. */
7
- size?: "small" | "normal" | "medium" | "large" | "full";
6
+ /** Width: `xsmall` 384px, `small` 448px, `normal` 576px, `medium` 800px, `large` 1000px, `xlarge` 1152px, `full` viewport minus 64px. */
7
+ size?: "xsmall" | "small" | "normal" | "medium" | "large" | "xlarge" | "full";
8
+ /** `framed` has a header and footer bar and a close button; `plain` is one padded card (title, body, buttons) on a lighter backdrop, as cloud-ui's confirm dialogs. */
9
+ variant?: "framed" | "plain";
8
10
  /** Shows the close button and allows Escape to close. Turn off while a required action runs. */
9
11
  closable?: boolean;
10
12
  /** Closes when the backdrop is clicked. */
@@ -37,9 +39,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
37
39
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
38
40
  onClose?: (() => any) | undefined;
39
41
  }>, {
42
+ variant: "framed" | "plain";
40
43
  title: string;
41
44
  description: string;
42
- size: "small" | "normal" | "medium" | "large" | "full";
45
+ size: "xsmall" | "small" | "normal" | "medium" | "large" | "xlarge" | "full";
43
46
  closable: boolean;
44
47
  closeOnOutsideClick: boolean;
45
48
  hideFooter: boolean;