@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
@@ -17,6 +17,12 @@ export interface Props {
17
17
  actionIcon?: Component;
18
18
  /** Shows a spinner in the action button and blocks clicks while the action runs. */
19
19
  actionLoading?: boolean;
20
+ /** `normal` has 14px text. `small` has 12px text and less padding, for a note inside a card or form, like cloud-ui's network change banner. */
21
+ size?: "normal" | "small";
22
+ /** Replaces the status icon with a spinning one, for a change that is still being applied. */
23
+ loading?: boolean;
24
+ /** `tinted` is the plain status banner. `callout` is cloud-ui's notice card (its dummy-data warning): a 3px bar on the left, the icon in a 40px tile, a 16px heading title and muted text, with actions under the message. */
25
+ variant?: "tinted" | "callout";
20
26
  }
21
27
  type __VLS_Slots = {
22
28
  /** The message. Links inside are underlined in the alert's colour. */
@@ -33,9 +39,12 @@ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, i
33
39
  onClose?: (() => any) | undefined;
34
40
  onAction?: ((event: MouseEvent) => any) | undefined;
35
41
  }>, {
42
+ variant: "tinted" | "callout";
36
43
  title: string;
37
44
  icon: Component;
38
45
  color: Tone | "neutral";
46
+ size: "normal" | "small";
47
+ loading: boolean;
39
48
  dismissible: boolean;
40
49
  hideIcon: boolean;
41
50
  actionLabel: string;
@@ -1,11 +1,14 @@
1
1
  import e from "./AcButton.js";
2
2
  import { computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createSlots as o, createVNode as s, defineComponent as c, normalizeClass as l, openBlock as u, renderSlot as d, resolveDynamicComponent as f, toDisplayString as p, unref as m, withCtx as h } from "vue";
3
- import { CircleAlert as g, CircleCheck as _, Info as v, TriangleAlert as y, X as b } from "@lucide/vue";
3
+ import { CircleAlert as g, CircleCheck as _, Info as v, LoaderCircle as y, TriangleAlert as b, X as x } from "@lucide/vue";
4
4
  //#region src/lib/components/AcAlert.vue?vue&type=script&setup=true&lang.ts
5
- var x = ["role"], S = { class: "flex min-w-0 flex-1 flex-wrap items-center gap-x-4 gap-y-2" }, C = { class: "min-w-0 flex-[1_1_256px]" }, w = {
5
+ var S = ["role"], C = {
6
+ key: 1,
7
+ class: "flex flex-wrap items-center gap-2 pt-0.5"
8
+ }, w = ["role"], T = { class: "flex min-w-0 flex-1 flex-wrap items-center gap-x-4 gap-y-2" }, E = { class: "min-w-0 flex-[1_1_256px]" }, D = {
6
9
  key: 0,
7
10
  class: "-my-1 flex shrink-0 flex-wrap items-center gap-2"
8
- }, T = /*@__PURE__*/ c({
11
+ }, O = /*@__PURE__*/ c({
9
12
  __name: "AcAlert",
10
13
  props: {
11
14
  color: { default: "info" },
@@ -24,11 +27,17 @@ var x = ["role"], S = { class: "flex min-w-0 flex-1 flex-wrap items-center gap-x
24
27
  actionLoading: {
25
28
  type: Boolean,
26
29
  default: !1
27
- }
30
+ },
31
+ size: { default: "normal" },
32
+ loading: {
33
+ type: Boolean,
34
+ default: !1
35
+ },
36
+ variant: { default: "tinted" }
28
37
  },
29
38
  emits: ["close", "action"],
30
- setup(c, { emit: T }) {
31
- let E = c, D = T, O = {
39
+ setup(c, { emit: O }) {
40
+ let k = c, A = O, j = {
32
41
  primary: {
33
42
  box: "border-primary/25 bg-primary/10 text-primary-strong",
34
43
  title: "text-primary-strong",
@@ -51,7 +60,7 @@ var x = ["role"], S = { class: "flex min-w-0 flex-1 flex-wrap items-center gap-x
51
60
  box: "border-warning/30 bg-warning/10 text-warning-strong",
52
61
  title: "text-warning-strong",
53
62
  icon: "text-warning-strong",
54
- glyph: y
63
+ glyph: b
55
64
  },
56
65
  danger: {
57
66
  box: "border-danger/25 bg-danger/10 text-danger-strong",
@@ -65,30 +74,121 @@ var x = ["role"], S = { class: "flex min-w-0 flex-1 flex-wrap items-center gap-x
65
74
  icon: "text-muted",
66
75
  glyph: v
67
76
  }
68
- }, k = t(() => O[E.color]), A = t(() => E.icon ?? k.value.glyph), j = t(() => E.color === "neutral" ? "white" : E.color);
69
- return (t, g) => (u(), i("div", {
70
- class: l(["flex items-start gap-3 rounded-10 border px-4 py-3 text-base [&_a]:font-medium [&_a]:underline [&_a]:decoration-current/40 [&_a]:underline-offset-2 [&_a:hover]:decoration-current", k.value.box]),
77
+ }, M = {
78
+ primary: {
79
+ box: "border-primary/25 bg-primary/5",
80
+ bar: "bg-primary/80",
81
+ tile: "bg-primary/10 text-primary-strong ring-primary/25"
82
+ },
83
+ info: {
84
+ box: "border-info/25 bg-info/8",
85
+ bar: "bg-info/80",
86
+ tile: "bg-info/10 text-info ring-info/25"
87
+ },
88
+ success: {
89
+ box: "border-success/25 bg-success/5",
90
+ bar: "bg-success/80",
91
+ tile: "bg-success/10 text-success-strong ring-success/25"
92
+ },
93
+ warning: {
94
+ box: "border-warning/30 bg-warning/5",
95
+ bar: "bg-warning/90",
96
+ tile: "bg-warning/15 text-warning-strong ring-warning/30"
97
+ },
98
+ danger: {
99
+ box: "border-danger/25 bg-danger/5",
100
+ bar: "bg-danger/80",
101
+ tile: "bg-danger/10 text-danger-strong ring-danger/25"
102
+ },
103
+ neutral: {
104
+ box: "border-border bg-surface",
105
+ bar: "bg-border-dark",
106
+ tile: "bg-surface-sunken text-muted ring-border"
107
+ }
108
+ }, N = t(() => j[k.color]), P = t(() => k.variant === "callout" ? M[k.color] : null), F = t(() => k.loading ? y : k.icon ?? N.value.glyph), I = t(() => k.size === "small"), L = t(() => k.color === "neutral" ? "white" : k.color);
109
+ return (t, g) => P.value ? (u(), i("div", {
110
+ key: 0,
111
+ class: l(["relative flex items-start overflow-hidden border shadow-sm transition-all [&_a]:font-medium [&_a]:text-heading [&_a]:underline [&_a]:decoration-current/40 [&_a]:underline-offset-2 [&_a:hover]:decoration-current", [P.value.box, I.value ? "gap-2.5 rounded-8 py-2.5 pr-2.5 pl-3" : "gap-3.5 rounded-10 py-3.5 pr-3.5 pl-4"]]),
112
+ role: c.color === "danger" || c.color === "warning" ? "alert" : "status",
113
+ "data-ac-ds": "",
114
+ "data-testid": "ac-alert"
115
+ }, [
116
+ a("span", {
117
+ class: l(["absolute inset-y-0 left-0 w-0.75", P.value.bar]),
118
+ "aria-hidden": "true"
119
+ }, null, 2),
120
+ c.hideIcon ? r("", !0) : (u(), i("span", {
121
+ key: 0,
122
+ class: l(["relative flex shrink-0 items-center justify-center ring-1", [
123
+ P.value.tile,
124
+ I.value ? "size-8 rounded-8 [&_svg]:size-4" : "size-10 rounded-10 [&_svg]:size-5",
125
+ c.loading && "[&_svg]:animate-spin"
126
+ ]]),
127
+ "aria-hidden": "true"
128
+ }, [d(t.$slots, "icon", {}, () => [(u(), n(f(F.value)))])], 2)),
129
+ a("div", { class: l(["min-w-0 flex-1", I.value ? "space-y-1" : "space-y-1.5"]) }, [
130
+ c.title ? (u(), i("p", {
131
+ key: 0,
132
+ class: l(["font-semibold tracking-tight text-heading", I.value ? "text-base" : "text-lg"])
133
+ }, p(c.title), 3)) : r("", !0),
134
+ a("div", { class: l(["leading-relaxed text-muted", I.value ? "text-[13px]" : "text-base"]) }, [d(t.$slots, "default")], 2),
135
+ t.$slots.actions || c.actionLabel ? (u(), i("div", C, [d(t.$slots, "actions", {}, () => [s(e, {
136
+ title: c.actionLabel,
137
+ color: L.value,
138
+ variant: "outlined",
139
+ size: "small",
140
+ loading: c.actionLoading,
141
+ "data-ac-ds": "",
142
+ "data-testid": "ac-alert-action",
143
+ onClick: g[0] ||= (e) => A("action", e)
144
+ }, o({ _: 2 }, [c.actionIcon ? {
145
+ name: "icon",
146
+ fn: h(() => [(u(), n(f(c.actionIcon)))]),
147
+ key: "0"
148
+ } : void 0]), 1032, [
149
+ "title",
150
+ "color",
151
+ "loading"
152
+ ])])])) : r("", !0)
153
+ ], 2),
154
+ c.dismissible ? (u(), i("button", {
155
+ key: 1,
156
+ type: "button",
157
+ class: "ml-1 inline-flex shrink-0 cursor-pointer rounded-8 p-1 text-muted transition-colors duration-200 hover:bg-heading/5 hover:text-heading focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",
158
+ "aria-label": "Dismiss",
159
+ onClick: g[1] ||= (e) => A("close")
160
+ }, [s(m(x), {
161
+ class: "size-3.5",
162
+ "aria-hidden": "true"
163
+ })])) : r("", !0)
164
+ ], 10, S)) : (u(), i("div", {
165
+ key: 1,
166
+ class: l(["flex items-start rounded-10 border [&_a]:font-medium [&_a]:underline [&_a]:decoration-current/40 [&_a]:underline-offset-2 [&_a:hover]:decoration-current", [N.value.box, I.value ? "gap-2 px-3 py-2 text-xs leading-relaxed" : "gap-3 px-4 py-3 text-base"]]),
71
167
  role: c.color === "danger" || c.color === "warning" ? "alert" : "status",
72
168
  "data-ac-ds": "",
73
169
  "data-testid": "ac-alert"
74
170
  }, [
75
171
  c.hideIcon ? r("", !0) : (u(), i("span", {
76
172
  key: 0,
77
- class: l(["mt-0.5 inline-flex shrink-0 [&_svg]:size-4", k.value.icon]),
173
+ class: l(["mt-0.5 inline-flex shrink-0", [
174
+ N.value.icon,
175
+ I.value ? "[&_svg]:size-3.5" : "[&_svg]:size-4",
176
+ c.loading && "[&_svg]:animate-spin"
177
+ ]]),
78
178
  "aria-hidden": "true"
79
- }, [d(t.$slots, "icon", {}, () => [(u(), n(f(A.value)))])], 2)),
80
- a("div", S, [a("div", C, [c.title ? (u(), i("p", {
179
+ }, [d(t.$slots, "icon", {}, () => [(u(), n(f(F.value)))])], 2)),
180
+ a("div", T, [a("div", E, [c.title ? (u(), i("p", {
81
181
  key: 0,
82
- class: l(["font-semibold", k.value.title])
83
- }, p(c.title), 3)) : r("", !0), a("div", { class: l(c.title && "mt-0.5") }, [d(t.$slots, "default")], 2)]), t.$slots.actions || c.actionLabel ? (u(), i("div", w, [d(t.$slots, "actions", {}, () => [s(e, {
182
+ class: l(["font-semibold", N.value.title])
183
+ }, p(c.title), 3)) : r("", !0), a("div", { class: l(c.title && "mt-0.5") }, [d(t.$slots, "default")], 2)]), t.$slots.actions || c.actionLabel ? (u(), i("div", D, [d(t.$slots, "actions", {}, () => [s(e, {
84
184
  title: c.actionLabel,
85
- color: j.value,
185
+ color: L.value,
86
186
  variant: "outlined",
87
187
  size: "small",
88
188
  loading: c.actionLoading,
89
189
  "data-ac-ds": "",
90
190
  "data-testid": "ac-alert-action",
91
- onClick: g[0] ||= (e) => D("action", e)
191
+ onClick: g[2] ||= (e) => A("action", e)
92
192
  }, o({ _: 2 }, [c.actionIcon ? {
93
193
  name: "icon",
94
194
  fn: h(() => [(u(), n(f(c.actionIcon)))]),
@@ -103,13 +203,13 @@ var x = ["role"], S = { class: "flex min-w-0 flex-1 flex-wrap items-center gap-x
103
203
  type: "button",
104
204
  class: "-my-1 -mr-1.5 inline-flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-8 opacity-70 transition-[background-color,opacity] duration-200 hover:bg-current/10 hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",
105
205
  "aria-label": "Dismiss",
106
- onClick: g[1] ||= (e) => D("close")
107
- }, [s(m(b), {
206
+ onClick: g[3] ||= (e) => A("close")
207
+ }, [s(m(x), {
108
208
  class: "size-4",
109
209
  "aria-hidden": "true"
110
210
  })])) : r("", !0)
111
- ], 10, x));
211
+ ], 10, w));
112
212
  }
113
213
  });
114
214
  //#endregion
115
- export { T as default };
215
+ export { O as default };
@@ -264,7 +264,7 @@ var ge = {
264
264
  "data-app-tile": "",
265
265
  "aria-current": K(t) ? "page" : void 0,
266
266
  title: t.subtitle || void 0,
267
- class: "group relative flex h-full flex-col items-center gap-2 rounded-8 px-1.5 pt-3 pb-2.5 text-center no-underline outline-none transition-colors duration-200 hover:bg-accent-hover focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset aria-[current=page]:bg-accent",
267
+ class: "group relative flex h-full flex-col items-center gap-2 rounded-8 px-1.5 pt-3 pb-2.5 text-center no-underline outline-none transition-colors duration-200 hover:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset aria-[current=page]:bg-accent",
268
268
  "data-ac-ds": "",
269
269
  "data-testid": "ac-app-switcher-app",
270
270
  onClick: (e) => Ee(t)
@@ -21,11 +21,14 @@ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, i
21
21
  description: string;
22
22
  height: number;
23
23
  loading: boolean;
24
+ animation: boolean;
24
25
  tooltip: boolean;
25
26
  emptyText: string;
26
27
  lineWidth: number;
27
28
  stacked: boolean;
29
+ renderer: "canvas" | "svg";
28
30
  gridLines: boolean;
31
+ zoom: boolean;
29
32
  xFormatter: (value: Date | number | string) => string;
30
33
  yFormatter: (value: number) => string;
31
34
  xLabel: string;
@@ -1,12 +1,15 @@
1
1
  import e from "../charts/ChartFrame.js";
2
- import { CURVES as t, chartDuration as n } from "../charts/shared.js";
3
- import { useXYChart as r } from "../charts/xy.js";
4
- import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createSlots as ee, createVNode as l, defineComponent as u, guardReactiveProps as d, isRef as f, normalizeProps as p, openBlock as m, ref as h, renderList as g, renderSlot as _, unref as v, useId as y, withCtx as b } from "vue";
2
+ import { bindAxisHover as t, useEChart as n } from "../charts/echarts.js";
3
+ import { readNumber as r } from "../charts/shared.js";
4
+ import { LARGE_DATA as i, useXYChart as a } from "../charts/xy.js";
5
+ import { cartesianOption as o, locateRow as s, prepareZoom as c } from "../charts/cartesian.js";
6
+ import { createBlock as l, createElementVNode as u, createSlots as d, defineComponent as f, guardReactiveProps as p, isRef as m, normalizeProps as h, openBlock as g, ref as _, renderSlot as v, unref as y, withCtx as b } from "vue";
5
7
  import { ChartArea as x } from "@lucide/vue";
6
- import { VisArea as te, VisAxis as S, VisCrosshair as C, VisXYContainer as w } from "@unovis/vue";
7
- import { Scale as T } from "@unovis/ts";
8
+ import { use as S } from "echarts/core";
9
+ import { LineChart as C } from "echarts/charts";
10
+ import { AxisPointerComponent as w, GridComponent as T } from "echarts/components";
8
11
  //#region src/lib/components/AcAreaChart.vue?vue&type=script&setup=true&lang.ts
9
- var E = /*@__PURE__*/ u({
12
+ var E = /*@__PURE__*/ f({
10
13
  __name: "AcAreaChart",
11
14
  props: {
12
15
  stacked: {
@@ -49,148 +52,135 @@ var E = /*@__PURE__*/ u({
49
52
  },
50
53
  emptyText: { default: "No data to show yet" },
51
54
  title: { default: "" },
52
- description: { default: "" }
55
+ description: { default: "" },
56
+ zoom: {
57
+ type: Boolean,
58
+ default: !1
59
+ },
60
+ renderer: { default: "canvas" },
61
+ animation: {
62
+ type: Boolean,
63
+ default: !0
64
+ }
53
65
  },
54
- setup(u) {
55
- let E = u, D = n(), O = y(), { hidden: k, width: A, visibleKeys: j, colorOf: M, colors: N, legendItems: P, xKind: F, byPosition: I, x: L, yAccessors: R, xTickValues: ne, maxXTicks: z, yTicks: B, xTickFormat: V, formatY: H, rowLabel: U, yDomain: W, tooltipItems: G, tooltipTotal: K, table: q, ariaLabel: J } = r(E, { stacked: () => E.stacked }), Y = h(null), X = a(() => F.value === "time" && !I.value ? T.scaleTime() : void 0), Z = (e) => `${O}-area-${e}`.replace(/[^\w-]/g, ""), Q = a(() => E.gradient ? E.stacked ? [.45, .12] : [.32, .02] : [.2, .2]), re = a(() => Object.entries(M.value).map(([e, t]) => `<linearGradient id="${Z(e)}" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" style="stop-color: ${t}; stop-opacity: ${Q.value[0]}" /><stop offset="100%" style="stop-color: ${t}; stop-opacity: ${Q.value[1]}" /></linearGradient>`).join("")), $ = a(() => j.value.map((e) => `url(#${Z(e)})`)), ie = a(() => E.stacked ? [{
56
- key: "stack",
57
- y: R.value,
58
- fill: $.value,
59
- line: N.value
60
- }] : j.value.map((e, t) => ({
61
- key: e,
62
- y: [R.value[t]],
63
- fill: [$.value[t]],
64
- line: [N.value[t]]
65
- })));
66
- function ae(e, t, n, r) {
67
- if (!t || n === void 0 || !r || r.type === "wheel") {
68
- Y.value = null;
69
- return;
70
- }
71
- Y.value = {
72
- clientX: r.clientX,
73
- clientY: r.clientY,
74
- title: U(n),
75
- items: G(t),
76
- total: E.stacked && j.value.length > 1 ? K(t) : void 0,
77
- datum: t,
78
- index: n
66
+ setup(f) {
67
+ S([
68
+ C,
69
+ T,
70
+ w
71
+ ]);
72
+ let E = f, D = a(E, { stacked: () => E.stacked }), { hidden: O, width: k, legendItems: A, rowLabel: j, tooltipItems: M, tooltipTotal: N, table: P, ariaLabel: F } = D, I = _(), L = _(null);
73
+ function R(e, t) {
74
+ if (!E.gradient) return e.alpha(t, .2);
75
+ let [n, r] = E.stacked ? [.45, .12] : [.3, .05];
76
+ return {
77
+ type: "linear",
78
+ x: 0,
79
+ y: 0,
80
+ x2: 0,
81
+ y2: 1,
82
+ colorStops: [{
83
+ offset: 0,
84
+ color: e.alpha(t, n)
85
+ }, {
86
+ offset: 1,
87
+ color: e.alpha(t, r)
88
+ }]
79
89
  };
80
90
  }
81
- return (n, r) => (m(), o(e, {
82
- hidden: v(k),
83
- "onUpdate:hidden": r[0] ||= (e) => f(k) ? k.value = e : null,
84
- width: v(A),
85
- "onUpdate:width": r[1] ||= (e) => f(A) ? A.value = e : null,
91
+ function z(e) {
92
+ let t = E.data.length > i;
93
+ return D.visibleKeys.value.map((n) => {
94
+ let i = D.colorOf.value[n], a = e.color(i), o = E.data.map((e) => r(e, n));
95
+ return {
96
+ id: n,
97
+ type: "line",
98
+ name: E.categories[n]?.name ?? n,
99
+ data: D.byPosition.value ? o : o.map((e, t) => [D.xNumbers.value[t], e]),
100
+ stack: E.stacked ? "total" : void 0,
101
+ smooth: E.curve === "monotone" && .4,
102
+ smoothMonotone: E.curve === "monotone" ? "x" : void 0,
103
+ step: E.curve === "step" && "middle",
104
+ showSymbol: !1,
105
+ symbol: t ? "none" : "circle",
106
+ symbolSize: 6,
107
+ lineStyle: {
108
+ width: E.lineWidth,
109
+ color: a,
110
+ opacity: +(E.lineWidth > 0)
111
+ },
112
+ itemStyle: {
113
+ color: a,
114
+ borderColor: e.surface,
115
+ borderWidth: 2
116
+ },
117
+ areaStyle: {
118
+ color: R(e, i),
119
+ opacity: 1
120
+ },
121
+ emphasis: {
122
+ scale: 1.4,
123
+ lineStyle: { width: E.lineWidth },
124
+ areaStyle: { color: R(e, i) }
125
+ },
126
+ sampling: t ? "lttb" : void 0,
127
+ progressive: t ? 4e3 : 0,
128
+ connectNulls: !1
129
+ };
130
+ });
131
+ }
132
+ return n({
133
+ host: I,
134
+ renderer: () => E.renderer,
135
+ prepare: () => c(E),
136
+ option: (e) => ({
137
+ ...o(e, E, D, {
138
+ boundaryGap: !1,
139
+ pointer: "line"
140
+ }),
141
+ series: z(e)
142
+ }),
143
+ setup: (e) => t(e, (t) => s(e, t, D), (e, t, n) => {
144
+ let r = E.data[e];
145
+ r && E.tooltip && (L.value = {
146
+ clientX: t,
147
+ clientY: n,
148
+ title: j(e),
149
+ items: M(r),
150
+ total: E.stacked && D.visibleKeys.value.length > 1 ? N(r) : void 0,
151
+ datum: r,
152
+ index: e
153
+ });
154
+ }, () => L.value = null)
155
+ }), (t, n) => (g(), l(e, {
156
+ hidden: y(O),
157
+ "onUpdate:hidden": n[0] ||= (e) => m(O) ? O.value = e : null,
158
+ width: y(k),
159
+ "onUpdate:width": n[1] ||= (e) => m(k) ? k.value = e : null,
86
160
  testid: "ac-area-chart",
87
- height: u.height,
88
- loading: u.loading,
89
- empty: !u.data.length,
90
- "empty-text": u.emptyText,
91
- "empty-icon": v(x),
92
- legend: u.legend,
93
- "legend-items": v(P),
94
- summary: v(J),
95
- title: u.title,
96
- description: u.description,
97
- table: v(q),
98
- tip: Y.value,
99
- tooltip: u.tooltip
100
- }, ee({
101
- default: b(() => [l(v(w), {
102
- data: u.data,
103
- height: u.height,
104
- duration: v(D),
105
- "x-scale": X.value,
106
- "y-domain": v(W),
107
- "svg-defs": re.value,
108
- padding: {
109
- top: 8,
110
- right: 8
111
- }
112
- }, {
113
- default: b(() => [
114
- (m(!0), c(i, null, g(ie.value, (e) => (m(), o(v(te), {
115
- key: e.key,
116
- x: v(L),
117
- y: e.y,
118
- color: e.fill,
119
- "curve-type": v(t)[u.curve],
120
- line: u.lineWidth > 0,
121
- "line-color": e.line,
122
- "line-width": u.lineWidth
123
- }, null, 8, [
124
- "x",
125
- "y",
126
- "color",
127
- "curve-type",
128
- "line",
129
- "line-color",
130
- "line-width"
131
- ]))), 128)),
132
- l(v(S), {
133
- type: "x",
134
- label: u.xLabel || void 0,
135
- "tick-format": v(V),
136
- "tick-values": v(ne),
137
- "num-ticks": v(z),
138
- "min-max-ticks-only-when-width-is-less": 160,
139
- "grid-line": !1,
140
- "tick-line": !1,
141
- "tick-text-hide-overlapping": !0
142
- }, null, 8, [
143
- "label",
144
- "tick-format",
145
- "tick-values",
146
- "num-ticks"
147
- ]),
148
- l(v(S), {
149
- type: "y",
150
- label: u.yLabel || void 0,
151
- "tick-format": v(H),
152
- "num-ticks": v(B),
153
- "grid-line": u.gridLines,
154
- "tick-line": !1,
155
- "domain-line": !1
156
- }, null, 8, [
157
- "label",
158
- "tick-format",
159
- "num-ticks",
160
- "grid-line"
161
- ]),
162
- u.tooltip ? (m(), o(v(C), {
163
- key: 0,
164
- x: v(L),
165
- y: u.stacked ? void 0 : v(R),
166
- yStacked: u.stacked ? v(R) : void 0,
167
- color: v(N),
168
- circleRadius: 4,
169
- strokeColor: "var(--color-surface)",
170
- strokeWidth: 2,
171
- hideWhenFarFromPointer: !1,
172
- duration: 0,
173
- onCrosshairMove: ae
174
- }, null, 8, [
175
- "x",
176
- "y",
177
- "yStacked",
178
- "color"
179
- ])) : s("", !0)
180
- ]),
181
- _: 1
182
- }, 8, [
183
- "data",
184
- "height",
185
- "duration",
186
- "x-scale",
187
- "y-domain",
188
- "svg-defs"
189
- ])]),
161
+ height: f.height,
162
+ loading: f.loading,
163
+ empty: !f.data.length,
164
+ "empty-text": f.emptyText,
165
+ "empty-icon": y(x),
166
+ legend: f.legend,
167
+ "legend-items": y(A),
168
+ summary: y(F),
169
+ title: f.title,
170
+ description: f.description,
171
+ table: y(P),
172
+ tip: L.value,
173
+ tooltip: f.tooltip
174
+ }, d({
175
+ default: b(() => [u("div", {
176
+ ref_key: "host",
177
+ ref: I,
178
+ class: "size-full"
179
+ }, null, 512)]),
190
180
  _: 2
191
- }, [n.$slots.tooltip ? {
181
+ }, [t.$slots.tooltip ? {
192
182
  name: "tooltip",
193
- fn: b((e) => [_(n.$slots, "tooltip", p(d(e)))]),
183
+ fn: b((e) => [v(t.$slots, "tooltip", h(p(e)))]),
194
184
  key: "0"
195
185
  } : void 0]), 1032, [
196
186
  "hidden",
@@ -5,10 +5,12 @@ export interface Props {
5
5
  imgUrl?: string;
6
6
  /** Accessible name. Defaults to `name`; pass an empty string when the name is already written next to the avatar. */
7
7
  alt?: string;
8
- /** Diameter: `xs` 20px, `small` 24px, `normal` 32px, `large` 48px. */
9
- size?: "xs" | "small" | "normal" | "large";
10
- /** `circle` for people, `square` (rounded corners) for organisations, teams and products. */
8
+ /** Diameter: `xs` 20px, `small` 24px, `normal` 32px, `medium` 40px, `large` 48px. */
9
+ size?: "xs" | "small" | "normal" | "medium" | "large";
10
+ /** `circle` for people, `square` (4px corners) for organisations, teams and products. Defaults to `square` for an organisation. */
11
11
  shape?: "circle" | "square";
12
+ /** `organization` shows cloud-ui's org icon when there's no image: a white building on a primary gradient. */
13
+ kind?: "person" | "organization";
12
14
  /** Adds a presence dot in the bottom-right corner. */
13
15
  status?: "online" | "away" | "busy" | "offline";
14
16
  /** Shows `+N` instead of a picture, as the last item of an avatar group. */
@@ -16,11 +18,12 @@ export interface Props {
16
18
  }
17
19
  declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
18
20
  name: string;
19
- size: "xs" | "small" | "normal" | "large";
21
+ size: "xs" | "small" | "normal" | "medium" | "large";
20
22
  status: "online" | "away" | "busy" | "offline";
21
23
  alt: string;
22
24
  imgUrl: string;
23
25
  shape: "circle" | "square";
26
+ kind: "person" | "organization";
24
27
  overflowCount: number;
25
28
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
26
29
  declare const _default: typeof __VLS_export;