@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.
- package/dist/lib/charts/ChartFrame.vue.d.ts +2 -0
- package/dist/lib/charts/ChartFrame.vue_vue_type_script_setup_true_lang.js +42 -37
- package/dist/lib/charts/cartesian.d.ts +324 -0
- package/dist/lib/charts/cartesian.js +137 -0
- package/dist/lib/charts/echarts.d.ts +86 -0
- package/dist/lib/charts/echarts.js +173 -0
- package/dist/lib/charts/graph.d.ts +77 -0
- package/dist/lib/charts/graph.js +155 -0
- package/dist/lib/charts/index.d.ts +4 -0
- package/dist/lib/charts/index.js +3 -1
- package/dist/lib/charts/shared.d.ts +0 -7
- package/dist/lib/charts/shared.js +1 -19
- package/dist/lib/charts/xy.d.ts +11 -7
- package/dist/lib/charts/xy.js +53 -72
- package/dist/lib/compat.css +1322 -278
- package/dist/lib/components/AcAlert.vue.d.ts +9 -0
- package/dist/lib/components/AcAlert.vue_vue_type_script_setup_true_lang.js +121 -21
- package/dist/lib/components/AcAppSwitcher.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/lib/components/AcAreaChart.vue.d.ts +3 -0
- package/dist/lib/components/AcAreaChart.vue_vue_type_script_setup_true_lang.js +132 -142
- package/dist/lib/components/AcAvatar.vue.d.ts +7 -4
- package/dist/lib/components/AcAvatar.vue_vue_type_script_setup_true_lang.js +59 -54
- package/dist/lib/components/AcBadge.vue.d.ts +7 -3
- package/dist/lib/components/AcBadge.vue_vue_type_script_setup_true_lang.js +35 -28
- package/dist/lib/components/AcBarChart.vue.d.ts +3 -0
- package/dist/lib/components/AcBarChart.vue_vue_type_script_setup_true_lang.js +142 -146
- package/dist/lib/components/AcBreadcrumb.vue.d.ts +4 -1
- package/dist/lib/components/AcBreadcrumb.vue_vue_type_script_setup_true_lang.js +18 -17
- package/dist/lib/components/AcBulkActionBar.vue.d.ts +2 -0
- package/dist/lib/components/AcBulkActionBar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/lib/components/AcButton.vue.d.ts +12 -6
- package/dist/lib/components/AcButton.vue_vue_type_script_setup_true_lang.js +85 -47
- package/dist/lib/components/AcCard.vue.d.ts +34 -3
- package/dist/lib/components/AcCard.vue_vue_type_script_setup_true_lang.js +169 -34
- package/dist/lib/components/AcCellValue.vue.d.ts +3 -3
- package/dist/lib/components/AcCellValue.vue_vue_type_script_setup_true_lang.js +171 -165
- package/dist/lib/components/AcCheckBox.vue.d.ts +1 -1
- package/dist/lib/components/AcCheckBox.vue_vue_type_script_setup_true_lang.js +58 -72
- package/dist/lib/components/AcCheckList.js +5 -0
- package/dist/lib/components/AcCheckList.vue.d.ts +45 -0
- package/dist/lib/components/AcCheckList.vue_vue_type_script_setup_true_lang.js +64 -0
- package/dist/lib/components/AcCheckRadio.vue.d.ts +30 -5
- package/dist/lib/components/AcCheckRadio.vue_vue_type_script_setup_true_lang.js +100 -36
- package/dist/lib/components/AcCircularProgress.vue.d.ts +4 -4
- package/dist/lib/components/AcCircularProgress.vue_vue_type_script_setup_true_lang.js +12 -9
- package/dist/lib/components/AcColorInput.vue.d.ts +5 -2
- package/dist/lib/components/AcColorInput.vue_vue_type_script_setup_true_lang.js +127 -97
- package/dist/lib/components/AcCommandBlock.js +5 -0
- package/dist/lib/components/AcCommandBlock.vue.d.ts +34 -0
- package/dist/lib/components/AcCommandBlock.vue_vue_type_script_setup_true_lang.js +88 -0
- package/dist/lib/components/AcConfirmModal.vue.d.ts +1 -1
- package/dist/lib/components/AcConfirmModal.vue_vue_type_script_setup_true_lang.js +7 -3
- package/dist/lib/components/AcCopyButton.vue.d.ts +2 -2
- package/dist/lib/components/AcCopyButton.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/lib/components/AcCostSummary.js +5 -0
- package/dist/lib/components/AcCostSummary.vue.d.ts +102 -0
- package/dist/lib/components/AcCostSummary.vue_vue_type_script_setup_true_lang.js +179 -0
- package/dist/lib/components/AcDatePicker.vue.d.ts +3 -3
- package/dist/lib/components/AcDatePicker.vue_vue_type_script_setup_true_lang.js +606 -380
- package/dist/lib/components/AcDeleteModal.vue_vue_type_script_setup_true_lang.js +47 -41
- package/dist/lib/components/AcDonutChart.vue.d.ts +10 -0
- package/dist/lib/components/AcDonutChart.vue_vue_type_script_setup_true_lang.js +116 -89
- package/dist/lib/components/AcDropdown.vue.d.ts +5 -2
- package/dist/lib/components/AcDropdown.vue_vue_type_script_setup_true_lang.js +88 -75
- package/dist/lib/components/AcDropdownDivider.vue_vue_type_script_setup_true_lang.js +11 -10
- package/dist/lib/components/AcDropdownItem.vue.d.ts +1 -1
- package/dist/lib/components/AcDropdownItem.vue_vue_type_script_setup_true_lang.js +17 -17
- package/dist/lib/components/AcEmptyState.vue.d.ts +1 -1
- package/dist/lib/components/AcErrorState.js +5 -0
- package/dist/lib/components/AcErrorState.vue.d.ts +46 -0
- package/dist/lib/components/AcErrorState.vue_vue_type_script_setup_true_lang.js +66 -0
- package/dist/lib/components/AcFeatureCard.vue.d.ts +6 -0
- package/dist/lib/components/AcFeatureCard.vue_vue_type_script_setup_true_lang.js +136 -114
- package/dist/lib/components/AcFooter.vue.d.ts +1 -1
- package/dist/lib/components/AcFooter.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/lib/components/AcFormFooter.vue.d.ts +1 -1
- package/dist/lib/components/AcFormSection.vue.d.ts +1 -1
- package/dist/lib/components/AcGraphChart.js +5 -0
- package/dist/lib/components/AcGraphChart.vue.d.ts +124 -0
- package/dist/lib/components/AcGraphChart.vue_vue_type_script_setup_true_lang.js +578 -0
- package/dist/lib/components/AcHeader.vue.d.ts +20 -2
- package/dist/lib/components/AcHeader.vue_vue_type_script_setup_true_lang.js +84 -26
- package/dist/lib/components/AcInfoTable.vue.d.ts +1 -1
- package/dist/lib/components/AcInput.vue.d.ts +1 -1
- package/dist/lib/components/AcInput.vue_vue_type_script_setup_true_lang.js +76 -79
- package/dist/lib/components/AcKeyValueInput.vue.d.ts +4 -4
- package/dist/lib/components/AcKeyValueInput.vue_vue_type_script_setup_true_lang.js +199 -183
- package/dist/lib/components/AcLineChart.vue.d.ts +6 -0
- package/dist/lib/components/AcLineChart.vue_vue_type_script_setup_true_lang.js +113 -125
- package/dist/lib/components/AcLoader.js +5 -0
- package/dist/lib/components/AcLoader.vue.d.ts +15 -0
- package/dist/lib/components/AcLoader.vue_vue_type_script_setup_true_lang.js +66 -0
- package/dist/lib/components/AcLocaleSwitcher.vue.d.ts +3 -1
- package/dist/lib/components/AcLocaleSwitcher.vue_vue_type_script_setup_true_lang.js +44 -36
- package/dist/lib/components/AcMapChart.js +5 -0
- package/dist/lib/components/AcMapChart.vue.d.ts +136 -0
- package/dist/lib/components/AcMapChart.vue_vue_type_script_setup_true_lang.js +518 -0
- package/dist/lib/components/AcModal.vue.d.ts +6 -3
- package/dist/lib/components/AcModal.vue_vue_type_script_setup_true_lang.js +85 -61
- package/dist/lib/components/AcNavbar.vue.d.ts +8 -5
- package/dist/lib/components/AcNavbar.vue_vue_type_script_setup_true_lang.js +25 -17
- package/dist/lib/components/AcNavbarItem.vue.d.ts +2 -2
- package/dist/lib/components/AcNavbarItem.vue_vue_type_script_setup_true_lang.js +3 -4
- package/dist/lib/components/AcNotificationMenu.vue.d.ts +3 -3
- package/dist/lib/components/AcNotificationMenu.vue_vue_type_script_setup_true_lang.js +133 -168
- package/dist/lib/components/AcNumberInput.vue.d.ts +2 -2
- package/dist/lib/components/AcNumberInput.vue_vue_type_script_setup_true_lang.js +137 -147
- package/dist/lib/components/AcPage.vue.d.ts +2 -2
- package/dist/lib/components/AcPage.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/lib/components/AcPagination.vue.d.ts +5 -5
- package/dist/lib/components/AcPagination.vue_vue_type_script_setup_true_lang.js +59 -56
- package/dist/lib/components/AcPreloader.vue.d.ts +3 -3
- package/dist/lib/components/AcPreloader.vue_vue_type_script_setup_true_lang.js +15 -16
- package/dist/lib/components/AcProductHero.js +5 -0
- package/dist/lib/components/AcProductHero.vue.d.ts +56 -0
- package/dist/lib/components/AcProductHero.vue_vue_type_script_setup_true_lang.js +95 -0
- package/dist/lib/components/AcProgress.vue.d.ts +17 -2
- package/dist/lib/components/AcProgress.vue_vue_type_script_setup_true_lang.js +83 -29
- package/dist/lib/components/AcResourceCard.vue.d.ts +1 -1
- package/dist/lib/components/AcResourceCard.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/lib/components/AcSearchBar.vue.d.ts +1 -1
- package/dist/lib/components/AcSearchBar.vue_vue_type_script_setup_true_lang.js +8 -4
- package/dist/lib/components/AcSelect.vue.d.ts +3 -3
- package/dist/lib/components/AcSelect.vue_vue_type_script_setup_true_lang.js +232 -243
- package/dist/lib/components/AcSettingsRow.js +5 -0
- package/dist/lib/components/AcSettingsRow.vue.d.ts +29 -0
- package/dist/lib/components/AcSettingsRow.vue_vue_type_script_setup_true_lang.js +37 -0
- package/dist/lib/components/AcSidePanel.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/lib/components/AcSideTabs.vue.d.ts +1 -1
- package/dist/lib/components/AcSidebar.vue.d.ts +4 -1
- package/dist/lib/components/AcSidebar.vue_vue_type_script_setup_true_lang.js +104 -94
- package/dist/lib/components/AcSidebarItem.vue.d.ts +1 -1
- package/dist/lib/components/AcSidebarItem.vue_vue_type_script_setup_true_lang.js +42 -42
- package/dist/lib/components/AcSidebarSection.vue.d.ts +2 -2
- package/dist/lib/components/AcSidebarSection.vue_vue_type_script_setup_true_lang.js +23 -18
- package/dist/lib/components/AcSteps.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/lib/components/AcSwitch.vue.d.ts +3 -0
- package/dist/lib/components/AcSwitch.vue_vue_type_script_setup_true_lang.js +46 -39
- package/dist/lib/components/AcSwitchCard.vue.d.ts +3 -3
- package/dist/lib/components/AcSwitchCard.vue_vue_type_script_setup_true_lang.js +9 -7
- package/dist/lib/components/AcTable.vue_vue_type_script_setup_true_lang.js +65 -65
- package/dist/lib/components/AcTabs.vue.d.ts +9 -2
- package/dist/lib/components/AcTabs.vue_vue_type_script_setup_true_lang.js +42 -27
- package/dist/lib/components/AcTag.vue.d.ts +1 -1
- package/dist/lib/components/AcTagInput.vue.d.ts +5 -5
- package/dist/lib/components/AcTagInput.vue_vue_type_script_setup_true_lang.js +140 -142
- package/dist/lib/components/AcTextarea.vue.d.ts +1 -1
- package/dist/lib/components/AcTextarea.vue_vue_type_script_setup_true_lang.js +69 -72
- package/dist/lib/components/AcThemeMode.vue.d.ts +3 -3
- package/dist/lib/components/AcThemeMode.vue_vue_type_script_setup_true_lang.js +54 -22
- package/dist/lib/components/AcTimePicker.vue.d.ts +1 -1
- package/dist/lib/components/AcTimePicker.vue_vue_type_script_setup_true_lang.js +177 -185
- package/dist/lib/components/AcToaster.vue.d.ts +6 -3
- package/dist/lib/components/AcToaster.vue_vue_type_script_setup_true_lang.js +103 -64
- package/dist/lib/components/AcTooltip.vue.d.ts +34 -14
- package/dist/lib/components/AcTooltip.vue_vue_type_script_setup_true_lang.js +184 -70
- package/dist/lib/components/AcUserMenu.vue.d.ts +23 -1
- package/dist/lib/components/AcUserMenu.vue_vue_type_script_setup_true_lang.js +181 -138
- package/dist/lib/components/index.d.ts +7 -0
- package/dist/lib/components/status.d.ts +3 -1
- package/dist/lib/components/status.js +20 -5
- package/dist/lib/composables/useToast.d.ts +17 -1
- package/dist/lib/composables/useToast.js +10 -2
- package/dist/lib/index.d.ts +7 -3
- package/dist/lib/index.js +80 -73
- package/dist/lib/theme.css +39 -54
- package/package.json +12 -3
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import e from "../charts/ChartFrame.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
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
|
|
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(
|
|
52
|
-
|
|
53
|
-
|
|
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: () =>
|
|
56
|
-
}),
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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
|
|
73
|
-
|
|
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
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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:
|
|
86
|
-
loading:
|
|
87
|
-
empty: !
|
|
88
|
-
"empty-text":
|
|
89
|
-
"empty-icon":
|
|
90
|
-
legend:
|
|
91
|
-
"legend-items":
|
|
92
|
-
summary:
|
|
93
|
-
title:
|
|
94
|
-
description:
|
|
95
|
-
table:
|
|
96
|
-
tip:
|
|
97
|
-
tooltip:
|
|
98
|
-
},
|
|
99
|
-
default:
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
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:
|
|
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 {
|
|
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,
|
|
2
|
-
import { ChevronRight as
|
|
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__*/
|
|
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:
|
|
30
|
+
maxItems: { default: 0 },
|
|
31
|
+
separator: { default: "chevron" }
|
|
31
32
|
},
|
|
32
|
-
setup(
|
|
33
|
-
let k =
|
|
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,
|
|
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:
|
|
58
|
-
"aria-current": t.index ===
|
|
59
|
-
}, [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,
|
|
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":
|
|
73
|
+
"aria-label": o.homeIcon && t.index === 0 ? t.item.label : void 0
|
|
73
74
|
}), {
|
|
74
|
-
default:
|
|
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
|
-
})) : (
|
|
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"]))])) : (
|
|
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:
|
|
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)
|
|
8
|
-
variant?: Variant;
|
|
9
|
-
/** Height and padding: `small`
|
|
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;
|