@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
@@ -1,12 +1,15 @@
1
1
  import e from "../charts/ChartFrame.js";
2
- import { chartDuration as t } from "../charts/shared.js";
3
- import { useXYChart as n } from "../charts/xy.js";
4
- import { computed as r, createBlock as i, createSlots as a, createVNode as o, defineComponent as s, guardReactiveProps as c, isRef as l, normalizeProps as u, openBlock as d, ref as f, renderSlot as p, unref as m, withCtx as h } from "vue";
5
- import { ChartColumn as g } from "@lucide/vue";
6
- import { VisAxis as _, VisGroupedBar as v, VisStackedBar as y, VisXYContainer as b } from "@unovis/vue";
7
- import { GroupedBar as x, StackedBar as S } from "@unovis/ts";
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 { computed as l, createBlock as u, createElementVNode as d, createSlots as f, defineComponent as p, guardReactiveProps as m, isRef as h, normalizeProps as g, openBlock as _, ref as v, renderSlot as y, unref as b, withCtx as x } from "vue";
7
+ import { ChartColumn as S } from "@lucide/vue";
8
+ import { use as C } from "echarts/core";
9
+ import { BarChart as w } from "echarts/charts";
10
+ import { AxisPointerComponent as T, GridComponent as E } from "echarts/components";
8
11
  //#region src/lib/components/AcBarChart.vue?vue&type=script&setup=true&lang.ts
9
- var C = /*@__PURE__*/ s({
12
+ var D = /*@__PURE__*/ p({
10
13
  __name: "AcBarChart",
11
14
  props: {
12
15
  stacked: {
@@ -46,153 +49,146 @@ var C = /*@__PURE__*/ s({
46
49
  },
47
50
  emptyText: { default: "No data to show yet" },
48
51
  title: { default: "" },
49
- description: { default: "" }
52
+ description: { default: "" },
53
+ zoom: {
54
+ type: Boolean,
55
+ default: !1
56
+ },
57
+ renderer: { default: "canvas" },
58
+ animation: {
59
+ type: Boolean,
60
+ default: !0
61
+ }
50
62
  },
51
- setup(s) {
52
- let C = s, w = t(), { hidden: T, width: E, visibleKeys: D, colors: O, legendItems: k, x: A, yAccessors: j, xTickValues: M, yTicks: N, xTickFormat: P, formatY: F, rowLabel: I, yDomain: L, tooltipItems: R, tooltipTotal: z, table: B, ariaLabel: V } = n(C, {
53
- stacked: () => C.stacked,
63
+ setup(p) {
64
+ C([
65
+ w,
66
+ E,
67
+ T
68
+ ]);
69
+ let D = p, O = l(() => D.orientation === "horizontal"), k = a(D, {
70
+ stacked: () => D.stacked,
54
71
  positions: !0,
55
- horizontal: () => C.orientation === "horizontal"
56
- }), H = f(null), U = r(() => C.orientation === "horizontal"), W = r(() => U.value ? "y" : "x"), G = r(() => U.value ? "x" : "y"), K = r(() => U.value ? Math.max(2, Math.floor((E.value || 640) / 90)) : N.value), q = Symbol("row"), J = r(() => C.data.map((e, t) => ({
57
- ...e,
58
- [q]: t
59
- })));
60
- function Y(e, t) {
61
- let n = e[q], r = n === void 0 ? void 0 : C.data[n];
62
- r && n !== void 0 && (H.value = {
63
- clientX: t.clientX,
64
- clientY: t.clientY,
65
- title: I(n),
66
- items: R(r),
67
- total: C.stacked && D.value.length > 1 ? z(r) : void 0,
68
- datum: r,
69
- index: n
72
+ horizontal: () => O.value
73
+ }), { hidden: A, width: j, legendItems: M, rowLabel: N, tooltipItems: P, tooltipTotal: F, table: I, ariaLabel: L } = k, R = v(), z = v(null);
74
+ function B(e) {
75
+ let t = D.radius;
76
+ return O.value ? e < 0 ? [
77
+ t,
78
+ 0,
79
+ 0,
80
+ t
81
+ ] : [
82
+ 0,
83
+ t,
84
+ t,
85
+ 0
86
+ ] : e < 0 ? [
87
+ 0,
88
+ 0,
89
+ t,
90
+ t
91
+ ] : [
92
+ t,
93
+ t,
94
+ 0,
95
+ 0
96
+ ];
97
+ }
98
+ function V(e) {
99
+ return D.data.map((t) => {
100
+ let n, i;
101
+ for (let a of e) {
102
+ let e = r(t, a) ?? 0;
103
+ e > 0 ? n = a : e < 0 && (i = a);
104
+ }
105
+ return {
106
+ top: n,
107
+ bottom: i
108
+ };
70
109
  });
71
110
  }
72
- function X() {
73
- H.value = null;
111
+ function H(e) {
112
+ let t = D.data.length > i, n = k.visibleKeys.value, a = D.stacked && !t ? V(n) : [];
113
+ return n.map((n) => {
114
+ let o = e.color(k.colorOf.value[n]), s = D.data.map((e) => r(e, n)), c = t ? s : s.map((e, t) => e === null || e === 0 ? e : {
115
+ value: e,
116
+ itemStyle: { borderRadius: !D.stacked || a[t]?.top === n || a[t]?.bottom === n ? B(e) : 0 }
117
+ });
118
+ return {
119
+ id: n,
120
+ type: "bar",
121
+ name: D.categories[n]?.name ?? n,
122
+ data: c,
123
+ stack: D.stacked ? "total" : void 0,
124
+ barMaxWidth: D.barMaxWidth,
125
+ barCategoryGap: "30%",
126
+ barGap: D.stacked ? void 0 : "15%",
127
+ itemStyle: {
128
+ color: o,
129
+ borderColor: e.surface,
130
+ borderWidth: D.stacked && !t ? 1 : 0
131
+ },
132
+ emphasis: { focus: "none" },
133
+ large: t,
134
+ largeThreshold: i,
135
+ progressive: t ? 4e3 : 0
136
+ };
137
+ });
74
138
  }
75
- let Z = r(() => ({ [C.stacked ? S.selectors.barGroup : x.selectors.barGroup]: {
76
- mousemove: Y,
77
- mouseleave: X
78
- } }));
79
- return (t, n) => (d(), i(e, {
80
- hidden: m(T),
81
- "onUpdate:hidden": n[0] ||= (e) => l(T) ? T.value = e : null,
82
- width: m(E),
83
- "onUpdate:width": n[1] ||= (e) => l(E) ? E.value = e : null,
139
+ return n({
140
+ host: R,
141
+ renderer: () => D.renderer,
142
+ prepare: () => c(D),
143
+ option: (e) => ({
144
+ ...o(e, D, k, {
145
+ boundaryGap: !0,
146
+ horizontal: O.value,
147
+ pointer: "shadow"
148
+ }),
149
+ series: H(e)
150
+ }),
151
+ setup: (e) => t(e, (t) => s(e, t, k, O.value), (e, t, n) => {
152
+ let r = D.data[e];
153
+ r && D.tooltip && (z.value = {
154
+ clientX: t,
155
+ clientY: n,
156
+ title: N(e),
157
+ items: P(r),
158
+ total: D.stacked && k.visibleKeys.value.length > 1 ? F(r) : void 0,
159
+ datum: r,
160
+ index: e
161
+ });
162
+ }, () => z.value = null)
163
+ }), (t, n) => (_(), u(e, {
164
+ hidden: b(A),
165
+ "onUpdate:hidden": n[0] ||= (e) => h(A) ? A.value = e : null,
166
+ width: b(j),
167
+ "onUpdate:width": n[1] ||= (e) => h(j) ? j.value = e : null,
84
168
  testid: "ac-bar-chart",
85
- height: s.height,
86
- loading: s.loading,
87
- empty: !s.data.length,
88
- "empty-text": s.emptyText,
89
- "empty-icon": m(g),
90
- legend: s.legend,
91
- "legend-items": m(k),
92
- summary: m(V),
93
- title: s.title,
94
- description: s.description,
95
- table: m(B),
96
- tip: H.value,
97
- tooltip: s.tooltip
98
- }, a({
99
- default: h(() => [o(m(b), {
100
- data: J.value,
101
- height: s.height,
102
- duration: m(w),
103
- "y-domain": U.value ? void 0 : m(L),
104
- "x-domain": U.value ? m(L) : void 0,
105
- "y-direction": U.value ? "south" : void 0,
106
- padding: {
107
- top: 8,
108
- right: 8
109
- }
110
- }, {
111
- default: h(() => [
112
- s.stacked ? (d(), i(m(y), {
113
- key: 0,
114
- x: m(A),
115
- y: m(j),
116
- color: m(O),
117
- orientation: s.orientation,
118
- "rounded-corners": s.radius,
119
- "bar-max-width": s.barMaxWidth,
120
- "bar-padding": .3,
121
- events: s.tooltip ? Z.value : void 0
122
- }, null, 8, [
123
- "x",
124
- "y",
125
- "color",
126
- "orientation",
127
- "rounded-corners",
128
- "bar-max-width",
129
- "events"
130
- ])) : (d(), i(m(v), {
131
- key: 1,
132
- x: m(A),
133
- y: m(j),
134
- color: m(O),
135
- orientation: s.orientation,
136
- "rounded-corners": s.radius,
137
- "group-max-width": s.barMaxWidth * Math.max(1, m(D).length),
138
- "group-padding": .3,
139
- "bar-padding": .1,
140
- events: s.tooltip ? Z.value : void 0
141
- }, null, 8, [
142
- "x",
143
- "y",
144
- "color",
145
- "orientation",
146
- "rounded-corners",
147
- "group-max-width",
148
- "events"
149
- ])),
150
- o(m(_), {
151
- type: W.value,
152
- label: s.xLabel || void 0,
153
- "tick-format": m(P),
154
- "tick-values": m(M),
155
- "min-max-ticks-only-when-width-is-less": 160,
156
- "grid-line": !1,
157
- "tick-line": !1,
158
- "domain-line": !U.value,
159
- "tick-text-hide-overlapping": !0
160
- }, null, 8, [
161
- "type",
162
- "label",
163
- "tick-format",
164
- "tick-values",
165
- "domain-line"
166
- ]),
167
- o(m(_), {
168
- type: G.value,
169
- label: s.yLabel || void 0,
170
- "tick-format": m(F),
171
- "num-ticks": K.value,
172
- "grid-line": s.gridLines,
173
- "tick-line": !1,
174
- "domain-line": !1
175
- }, null, 8, [
176
- "type",
177
- "label",
178
- "tick-format",
179
- "num-ticks",
180
- "grid-line"
181
- ])
182
- ]),
183
- _: 1
184
- }, 8, [
185
- "data",
186
- "height",
187
- "duration",
188
- "y-domain",
189
- "x-domain",
190
- "y-direction"
191
- ])]),
169
+ height: p.height,
170
+ loading: p.loading,
171
+ empty: !p.data.length,
172
+ "empty-text": p.emptyText,
173
+ "empty-icon": b(S),
174
+ legend: p.legend,
175
+ "legend-items": b(M),
176
+ summary: b(L),
177
+ title: p.title,
178
+ description: p.description,
179
+ table: b(I),
180
+ tip: z.value,
181
+ tooltip: p.tooltip
182
+ }, f({
183
+ default: x(() => [d("div", {
184
+ ref_key: "host",
185
+ ref: R,
186
+ class: "size-full"
187
+ }, null, 512)]),
192
188
  _: 2
193
189
  }, [t.$slots.tooltip ? {
194
190
  name: "tooltip",
195
- fn: h((e) => [p(t.$slots, "tooltip", u(c(e)))]),
191
+ fn: x((e) => [y(t.$slots, "tooltip", g(m(e)))]),
196
192
  key: "0"
197
193
  } : void 0]), 1032, [
198
194
  "hidden",
@@ -214,4 +210,4 @@ var C = /*@__PURE__*/ s({
214
210
  }
215
211
  });
216
212
  //#endregion
217
- export { C as default };
213
+ export { D as default };
@@ -14,12 +14,15 @@ export interface Props {
14
14
  items: BreadcrumbItem[];
15
15
  /** Replaces the first item's label with a house icon (the label stays as its accessible name). */
16
16
  homeIcon?: boolean;
17
- /** With more items than this, the middle ones collapse behind "…" until clicked. */
17
+ /** With more items than this, the middle ones collapse behind "…" until clicked. `0` (the default) never collapses, as in cloud-ui. */
18
18
  maxItems?: number;
19
+ /** The mark between crumbs: `chevron` or `slash`. */
20
+ separator?: "chevron" | "slash";
19
21
  }
20
22
  declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
21
23
  homeIcon: boolean;
22
24
  maxItems: number;
25
+ separator: "chevron" | "slash";
23
26
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
27
  declare const _default: typeof __VLS_export;
25
28
  export default _default;
@@ -1,5 +1,5 @@
1
- import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createVNode as o, defineComponent as s, getCurrentInstance as c, mergeProps as l, normalizeClass as u, openBlock as d, ref as f, renderList as p, resolveDynamicComponent as m, toDisplayString as h, unref as g, withCtx as _ } from "vue";
2
- import { ChevronRight as v, House as y } from "@lucide/vue";
1
+ import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, defineComponent as o, getCurrentInstance as s, mergeProps as c, normalizeClass as l, openBlock as u, ref as d, renderList as f, resolveDynamicComponent as p, toDisplayString as m, unref as h, withCtx as g } from "vue";
2
+ import { ChevronRight as _, House as v, Slash as y } from "@lucide/vue";
3
3
  //#region src/lib/components/AcBreadcrumb.vue?vue&type=script&setup=true&lang.ts
4
4
  var b = {
5
5
  "aria-label": "Breadcrumb",
@@ -19,7 +19,7 @@ var b = {
19
19
  key: 0,
20
20
  class: "flex size-5 shrink-0 items-center justify-center rounded-8 bg-primary/10 text-primary",
21
21
  "aria-hidden": "true"
22
- }, O = { class: "max-w-48 truncate" }, k = /*@__PURE__*/ s({
22
+ }, O = { class: "max-w-48 truncate" }, k = /*@__PURE__*/ o({
23
23
  __name: "AcBreadcrumb",
24
24
  props: {
25
25
  items: {},
@@ -27,15 +27,16 @@ var b = {
27
27
  type: Boolean,
28
28
  default: !1
29
29
  },
30
- maxItems: { default: 4 }
30
+ maxItems: { default: 0 },
31
+ separator: { default: "chevron" }
31
32
  },
32
- setup(s) {
33
- let k = s, A = c()?.appContext.components.RouterLink, j = f(!1), M = t(() => {
33
+ setup(o) {
34
+ let k = o, A = s()?.appContext.components.RouterLink, j = d(!1), M = t(() => {
34
35
  let e = k.items.map((e, t) => ({
35
36
  item: e,
36
37
  index: t
37
38
  }));
38
- return j.value || e.length <= k.maxItems ? e : [
39
+ return j.value || k.maxItems < 3 || e.length <= k.maxItems ? e : [
39
40
  e[0],
40
41
  null,
41
42
  ...e.slice(e.length - (k.maxItems - 2))
@@ -52,15 +53,15 @@ var b = {
52
53
  href: t
53
54
  } : null;
54
55
  }
55
- return (t, c) => (d(), i("nav", b, [a("ol", x, [(d(!0), i(e, null, p(M.value, (t, f) => (d(), i(e, { key: t ? t.index : "ellipsis" }, [f > 0 ? (d(), i("li", S, [o(g(v), { class: "size-3.5 shrink-0" })])) : r("", !0), t ? (d(), i("li", w, [t.index === s.items.length - 1 || !N(t.item) ? (d(), i("span", {
56
+ return (t, s) => (u(), i("nav", b, [a("ol", x, [(u(!0), i(e, null, f(M.value, (t, d) => (u(), i(e, { key: t ? t.index : "ellipsis" }, [d > 0 ? (u(), i("li", S, [(u(), n(p(o.separator === "slash" ? h(y) : h(_)), { class: "size-3.5 shrink-0 rtl:rotate-180" }))])) : r("", !0), t ? (u(), i("li", w, [t.index === o.items.length - 1 || !N(t.item) ? (u(), i("span", {
56
57
  key: 0,
57
- class: u(["flex min-w-0 items-center gap-1.5 px-1.5 py-0.5", t.index === s.items.length - 1 && "font-medium text-heading"]),
58
- "aria-current": t.index === s.items.length - 1 ? "page" : void 0
59
- }, [t.item.icon ? (d(), n(m(t.item.icon), {
58
+ class: l(["flex min-w-0 items-center gap-1.5 px-1.5 py-0.5", t.index === o.items.length - 1 && "font-medium text-heading"]),
59
+ "aria-current": t.index === o.items.length - 1 ? "page" : void 0
60
+ }, [t.item.icon ? (u(), n(p(t.item.icon), {
60
61
  key: 0,
61
62
  class: "size-4 shrink-0 text-primary",
62
63
  "aria-hidden": "true"
63
- })) : r("", !0), a("span", E, h(t.item.label), 1)], 10, T)) : (d(), n(m(N(t.item).is), l({
64
+ })) : r("", !0), a("span", E, m(t.item.label), 1)], 10, T)) : (u(), n(p(N(t.item).is), c({
64
65
  key: 1,
65
66
  ref_for: !0
66
67
  }, {
@@ -69,19 +70,19 @@ var b = {
69
70
  }, {
70
71
  class: "flex min-w-0 items-center gap-1.5 rounded-8 px-1.5 py-0.5 text-muted no-underline transition-colors duration-200 hover:bg-surface-sunken hover:text-heading focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",
71
72
  title: t.item.label,
72
- "aria-label": s.homeIcon && t.index === 0 ? t.item.label : void 0
73
+ "aria-label": o.homeIcon && t.index === 0 ? t.item.label : void 0
73
74
  }), {
74
- default: _(() => [s.homeIcon && t.index === 0 ? (d(), n(g(y), {
75
+ default: g(() => [o.homeIcon && t.index === 0 ? (u(), n(h(v), {
75
76
  key: 0,
76
77
  class: "size-4 shrink-0",
77
78
  "aria-hidden": "true"
78
- })) : (d(), i(e, { key: 1 }, [t.item.icon ? (d(), i("span", D, [(d(), n(m(t.item.icon), { class: "size-3.5" }))])) : r("", !0), a("span", O, h(t.item.label), 1)], 64))]),
79
+ })) : (u(), i(e, { key: 1 }, [t.item.icon ? (u(), i("span", D, [(u(), n(p(t.item.icon), { class: "size-3.5" }))])) : r("", !0), a("span", O, m(t.item.label), 1)], 64))]),
79
80
  _: 2
80
- }, 1040, ["title", "aria-label"]))])) : (d(), i("li", C, [a("button", {
81
+ }, 1040, ["title", "aria-label"]))])) : (u(), i("li", C, [a("button", {
81
82
  type: "button",
82
83
  class: "cursor-pointer rounded-8 px-1.5 py-0.5 transition-colors duration-200 hover:bg-surface-sunken hover:text-heading focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",
83
84
  "aria-label": "Show full path",
84
- onClick: c[0] ||= (e) => j.value = !0
85
+ onClick: s[0] ||= (e) => j.value = !0
85
86
  }, " … ")]))], 64))), 128))])]));
86
87
  }
87
88
  });
@@ -19,6 +19,8 @@ export interface Props {
19
19
  type __VLS_Slots = {
20
20
  /** Extra batch buttons, placed before the main action, e.g. a "Download" button. Use `size="small"` buttons. */
21
21
  actions?: () => unknown;
22
+ /** Same as `actions`, for cloud-ui's `BulkActionBar` markup. */
23
+ default?: () => unknown;
22
24
  };
23
25
  declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
24
26
  clear: () => any;
@@ -51,7 +51,7 @@ var S = { class: "min-h-0 overflow-hidden" }, C = { class: "text-base text-headi
51
51
  "aria-label": "Bulk actions",
52
52
  class: "flex flex-wrap items-center justify-between gap-x-3 gap-y-2 rounded-14 border border-primary/30 bg-primary/5 px-4 py-2.5"
53
53
  }, [c("p", C, [c("span", w, v(f.count), 1), u(" " + v(N.value) + " selected ", 1)]), c("div", T, [
54
- g(i.$slots, "actions"),
54
+ g(i.$slots, "actions", {}, () => [g(i.$slots, "default")]),
55
55
  d(e, {
56
56
  color: "ghost",
57
57
  size: "small",
@@ -4,10 +4,12 @@ export interface Props {
4
4
  title?: string;
5
5
  /** Colour of the button. `white` and `ghost` are neutral styles for secondary actions. */
6
6
  color?: Tone | "white" | "ghost";
7
- /** `solid` fill, `light` tinted fill (12% of the colour) or `outlined` border with a white fill. */
8
- variant?: Variant;
9
- /** Height and padding: `small` 32px, `normal` 40px, `medium` 44px. */
10
- size?: "small" | "normal" | "medium";
7
+ /** `solid` fill, `light` tinted fill (12% of the colour), `outlined` border on the page background, or `link`: coloured text with no box that underlines on hover, e.g. "Go to Health". */
8
+ variant?: Variant | "link";
9
+ /** Height and padding: `xs` 28px, `small` 36px, `normal` 42px (the field height, so a button lines up with an input), `medium` 42px with 16px text and 44px from 768px (cloud-ui's default `lg`). */
10
+ size?: "xs" | "small" | "normal" | "medium";
11
+ /** A round, square button for a single icon: 28px at `xs`, 32px at `small`, 36px at `normal`, 44px at `medium`. Put the icon in the `icon` or default slot; `title` becomes the accessible name, or add an `aria-label`. */
12
+ iconOnly?: boolean;
11
13
  /** Shows a spinner before the label and blocks clicks. */
12
14
  loading?: boolean;
13
15
  /** Disables the button (50% opacity, no click events). */
@@ -16,6 +18,8 @@ export interface Props {
16
18
  type?: "button" | "submit" | "reset";
17
19
  /** Renders an <a> styled as the button instead of a <button>. */
18
20
  href?: string;
21
+ /** Fully rounded pill corners at every size and variant, e.g. an empty state's "Get started". */
22
+ rounded?: boolean;
19
23
  }
20
24
  type __VLS_Slots = {
21
25
  /** Button content, after the icon and `title`. */
@@ -30,14 +34,16 @@ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, i
30
34
  }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
31
35
  onClick?: ((e: MouseEvent) => any) | undefined;
32
36
  }>, {
33
- variant: Variant;
37
+ variant: Variant | "link";
34
38
  type: "button" | "submit" | "reset";
35
39
  title: string;
36
40
  disabled: boolean;
37
41
  color: Tone | "white" | "ghost";
38
42
  href: string;
39
- size: "small" | "normal" | "medium";
43
+ size: "xs" | "small" | "normal" | "medium";
44
+ iconOnly: boolean;
40
45
  loading: boolean;
46
+ rounded: boolean;
41
47
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
42
48
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
43
49
  declare const _default: typeof __VLS_export;