@ac-design/design-system 2.0.0 → 2.1.0
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 +17 -2
- package/dist/lib/components/AcHeader.vue_vue_type_script_setup_true_lang.js +79 -25
- 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,38 +1,39 @@
|
|
|
1
1
|
import e from "./AcButton.js";
|
|
2
2
|
import t from "./AcInput.js";
|
|
3
3
|
import n from "./AcSelect.js";
|
|
4
|
-
import { Fragment as r,
|
|
5
|
-
import {
|
|
4
|
+
import { Fragment as r, TransitionGroup as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createVNode as u, defineComponent as d, mergeModels as f, nextTick as p, normalizeClass as m, openBlock as h, ref as g, renderList as ee, renderSlot as _, toDisplayString as v, unref as y, useId as b, useModel as te, watch as ne, withCtx as x, withKeys as S } from "vue";
|
|
5
|
+
import { Plus as C, Trash as w } from "@lucide/vue";
|
|
6
6
|
//#region src/lib/components/AcKeyValueInput.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
7
|
+
var T = [
|
|
8
8
|
"aria-labelledby",
|
|
9
9
|
"aria-label",
|
|
10
10
|
"aria-describedby"
|
|
11
|
-
],
|
|
11
|
+
], re = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "font-normal text-muted"
|
|
14
|
-
},
|
|
14
|
+
}, ie = {
|
|
15
15
|
key: 1,
|
|
16
16
|
class: "text-danger",
|
|
17
17
|
"aria-hidden": "true"
|
|
18
|
-
},
|
|
19
|
-
|
|
18
|
+
}, ae = {
|
|
19
|
+
key: 2,
|
|
20
|
+
class: "mb-1.5 hidden grid-cols-[minmax(0,1fr)_auto] gap-x-4 sm:grid",
|
|
20
21
|
"aria-hidden": "true"
|
|
21
|
-
},
|
|
22
|
+
}, oe = { key: 0 }, se = [
|
|
22
23
|
"data-row",
|
|
23
24
|
"onFocusin",
|
|
24
25
|
"onFocusout"
|
|
25
|
-
],
|
|
26
|
+
], ce = [
|
|
26
27
|
"aria-label",
|
|
27
28
|
"title",
|
|
28
29
|
"onClick"
|
|
29
30
|
], E = {
|
|
30
|
-
key:
|
|
31
|
+
key: 4,
|
|
31
32
|
class: "text-base text-muted"
|
|
32
|
-
},
|
|
33
|
+
}, D = {
|
|
33
34
|
class: "sr-only",
|
|
34
35
|
"aria-live": "polite"
|
|
35
|
-
},
|
|
36
|
+
}, O = /*@__PURE__*/ d({
|
|
36
37
|
__name: "AcKeyValueInput",
|
|
37
38
|
props: /*@__PURE__*/ f({
|
|
38
39
|
label: { default: "" },
|
|
@@ -82,239 +83,254 @@ var ae = [
|
|
|
82
83
|
modelModifiers: {}
|
|
83
84
|
}),
|
|
84
85
|
emits: /*@__PURE__*/ f(["add", "remove"], ["update:modelValue"]),
|
|
85
|
-
setup(d, { expose: f, emit:
|
|
86
|
-
let
|
|
86
|
+
setup(d, { expose: f, emit: O }) {
|
|
87
|
+
let k = d, A = te(d, "modelValue"), j = O, M = b(), N = `${M}-label`, P = `${M}-hint`, F = `${M}-msg`, I = g(null), L = 0, R = g([]), z = g(null), B = g(""), V = a(() => A.value ?? []), H = a(() => !!k.options?.length), U = a(() => !k.disabled && !k.readonly), W = a(() => k.max !== void 0 && V.value.length >= k.max), le = a(() => k.addLabel || "Add new"), ue = a(() => [k.hint && P, k.errorMsg && F].filter(Boolean).join(" ") || void 0), G = a(() => H.value ? "sm:grid-cols-[minmax(0,1fr)_minmax(0,1fr)_256px]" : "sm:grid-cols-2"), de = a(() => k.size === "small" ? "size-[34px]" : "size-[38px]"), K = a(() => {
|
|
87
88
|
let e = /* @__PURE__ */ new Set();
|
|
88
|
-
return
|
|
89
|
+
return V.value.map((t, n) => {
|
|
89
90
|
let r = {}, i = t.key.trim();
|
|
90
91
|
if (i) {
|
|
91
|
-
let a =
|
|
92
|
-
!
|
|
93
|
-
} else t.value &&
|
|
94
|
-
return (i || t.value) && (r.value =
|
|
92
|
+
let a = H.value ? `${i}\u0000${t.option ?? ""}` : i;
|
|
93
|
+
!k.allowDuplicateKeys && e.has(a) && (r.key = H.value && t.option ? `“${i}” with ${q(t.option)} is already used.` : `“${i}” is already used. Keys must be unique.`), e.add(a), r.key ||= k.validateKey?.(t.key, n, V.value) || void 0;
|
|
94
|
+
} else t.value && z.value !== R.value[n] && (r.key = `Enter a key, or remove this ${k.itemName}.`);
|
|
95
|
+
return (i || t.value) && (r.value = k.validateValue?.(t.value, t.key, n, V.value) || void 0), r;
|
|
95
96
|
});
|
|
96
|
-
}),
|
|
97
|
+
}), fe = a(() => K.value.some((e) => e.key || e.value));
|
|
97
98
|
function q(e) {
|
|
98
|
-
return
|
|
99
|
+
return k.options?.find((t) => t.value === e)?.label ?? e;
|
|
99
100
|
}
|
|
100
101
|
function J(e) {
|
|
101
|
-
let t =
|
|
102
|
-
return t ? `${
|
|
102
|
+
let t = V.value[e]?.key.trim();
|
|
103
|
+
return t ? `${k.itemName} ${t}` : `${k.itemName} ${e + 1}`;
|
|
103
104
|
}
|
|
104
105
|
function Y(e) {
|
|
105
106
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
106
107
|
}
|
|
107
108
|
function X(e) {
|
|
108
|
-
|
|
109
|
+
B.value = "", p(() => B.value = e);
|
|
109
110
|
}
|
|
110
111
|
function Z(e, t) {
|
|
111
112
|
p(() => {
|
|
112
|
-
(
|
|
113
|
+
([...I.value?.querySelectorAll(`[data-row="${e}"]`) ?? []].at(-1)?.querySelector(t === "remove" ? "[data-action='remove']" : `[data-cell="${t}"]`) ?? I.value?.querySelector("[data-action='add']"))?.focus();
|
|
113
114
|
});
|
|
114
115
|
}
|
|
115
116
|
function Q(e, t) {
|
|
116
|
-
|
|
117
|
+
A.value = V.value.map((n, r) => r === e ? {
|
|
117
118
|
...n,
|
|
118
119
|
...t
|
|
119
120
|
} : n);
|
|
120
121
|
}
|
|
121
122
|
function $() {
|
|
122
|
-
if (!
|
|
123
|
+
if (!U.value || W.value) return;
|
|
123
124
|
let e = {
|
|
124
125
|
key: "",
|
|
125
126
|
value: ""
|
|
126
127
|
};
|
|
127
|
-
|
|
128
|
-
let t =
|
|
129
|
-
|
|
128
|
+
H.value && (e.option = k.defaultOption ?? k.options[0].value), R.value = [...R.value, L++], A.value = [...V.value, e];
|
|
129
|
+
let t = V.value.length;
|
|
130
|
+
j("add", t), X(`${Y(k.itemName)} ${t + 1} added.`), Z(t, "key");
|
|
130
131
|
}
|
|
131
|
-
function
|
|
132
|
-
if (!
|
|
133
|
-
let t =
|
|
132
|
+
function pe(e) {
|
|
133
|
+
if (!U.value) return;
|
|
134
|
+
let t = V.value[e];
|
|
134
135
|
if (!t) return;
|
|
135
136
|
let n = J(e);
|
|
136
|
-
|
|
137
|
-
let r =
|
|
138
|
-
r ? Z(Math.min(e, r - 1), "remove") : p(() =>
|
|
137
|
+
R.value = R.value.filter((t, n) => n !== e), A.value = V.value.filter((t, n) => n !== e), j("remove", t, e), X(`${Y(n)} removed.`);
|
|
138
|
+
let r = V.value.length;
|
|
139
|
+
r ? Z(Math.min(e, r - 1), "remove") : p(() => I.value?.querySelector("[data-action='add']")?.focus());
|
|
139
140
|
}
|
|
140
|
-
function
|
|
141
|
+
function me(e, t) {
|
|
141
142
|
e.isComposing || (e.preventDefault(), Z(t, "value"));
|
|
142
143
|
}
|
|
143
|
-
function
|
|
144
|
-
e.isComposing || (e.preventDefault(), t <
|
|
144
|
+
function he(e, t) {
|
|
145
|
+
e.isComposing || (e.preventDefault(), t < V.value.length - 1 ? Z(t + 1, "key") : W.value || $());
|
|
145
146
|
}
|
|
146
|
-
function
|
|
147
|
+
function ge(e, t) {
|
|
147
148
|
let n = e.currentTarget, r = e.relatedTarget;
|
|
148
|
-
r && (n.contains(r) || r instanceof Element && r.closest("[data-testid='ac-select-panel']")) ||
|
|
149
|
+
r && (n.contains(r) || r instanceof Element && r.closest("[data-testid='ac-select-panel']")) || z.value === t && (z.value = null);
|
|
149
150
|
}
|
|
150
|
-
return
|
|
151
|
-
|
|
151
|
+
return ne(() => V.value.length, (e) => {
|
|
152
|
+
R.value.length !== e && (R.value = Array.from({ length: e }, () => L++));
|
|
152
153
|
}, { immediate: !0 }), f({
|
|
153
154
|
add: $,
|
|
154
155
|
focus: () => Z(0, "key"),
|
|
155
|
-
hasErrors: () =>
|
|
156
|
-
}), (
|
|
156
|
+
hasErrors: () => fe.value
|
|
157
|
+
}), (a, f) => (h(), c("div", {
|
|
157
158
|
ref_key: "root",
|
|
158
|
-
ref:
|
|
159
|
+
ref: I,
|
|
159
160
|
role: "group",
|
|
160
|
-
"aria-labelledby": d.label ?
|
|
161
|
+
"aria-labelledby": d.label ? N : void 0,
|
|
161
162
|
"aria-label": d.label ? void 0 : `${Y(d.itemName)}s`,
|
|
162
|
-
"aria-describedby":
|
|
163
|
+
"aria-describedby": ue.value,
|
|
163
164
|
class: m(d.disabled && "opacity-50"),
|
|
164
165
|
"data-ac-ds": "",
|
|
165
166
|
"data-testid": "ac-key-value-input"
|
|
166
167
|
}, [
|
|
167
|
-
d.label ? (h(),
|
|
168
|
+
d.label ? (h(), c("div", {
|
|
168
169
|
key: 0,
|
|
169
|
-
id:
|
|
170
|
+
id: N,
|
|
170
171
|
class: "mb-2 flex items-center gap-1 text-base font-medium text-heading"
|
|
171
172
|
}, [
|
|
172
|
-
|
|
173
|
-
d.readonly ? (h(),
|
|
174
|
-
d.required ? (h(),
|
|
175
|
-
])) :
|
|
176
|
-
d.hint ? (h(),
|
|
173
|
+
l("span", null, v(d.label), 1),
|
|
174
|
+
d.readonly ? (h(), c("span", re, "(read only)")) : s("", !0),
|
|
175
|
+
d.required ? (h(), c("span", ie, "*")) : s("", !0)
|
|
176
|
+
])) : s("", !0),
|
|
177
|
+
d.hint ? (h(), c("p", {
|
|
177
178
|
key: 1,
|
|
178
|
-
id:
|
|
179
|
+
id: P,
|
|
179
180
|
class: "mb-2 text-base text-muted"
|
|
180
|
-
}, v(d.hint), 1)) :
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
], 2),
|
|
181
|
+
}, v(d.hint), 1)) : s("", !0),
|
|
182
|
+
V.value.length ? (h(), c("div", ae, [l("div", { class: m(["grid gap-x-4 text-base font-medium text-muted", G.value]) }, [
|
|
183
|
+
l("span", null, v(d.keyLabel), 1),
|
|
184
|
+
l("span", null, v(d.valueLabel), 1),
|
|
185
|
+
H.value ? (h(), c("span", oe, v(d.optionLabel), 1)) : s("", !0)
|
|
186
|
+
], 2), U.value ? (h(), c("span", {
|
|
186
187
|
key: 0,
|
|
187
|
-
class: m(d.size === "small" ? "w-
|
|
188
|
-
}, null, 2)) :
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
188
|
+
class: m(d.size === "small" ? "w-[34px]" : "w-[38px]")
|
|
189
|
+
}, null, 2)) : s("", !0)])) : s("", !0),
|
|
190
|
+
V.value.length || U.value ? (h(), o(i, {
|
|
191
|
+
key: 3,
|
|
192
|
+
tag: "div",
|
|
193
|
+
class: "relative space-y-4",
|
|
194
|
+
"enter-active-class": "transition-all duration-300 ease-out motion-reduce:transition-none",
|
|
195
|
+
"enter-from-class": "-translate-y-2.5 opacity-0",
|
|
196
|
+
"leave-active-class": "absolute w-full transition-all duration-300 ease-out motion-reduce:transition-none",
|
|
197
|
+
"leave-to-class": "translate-x-5 opacity-0",
|
|
198
|
+
"move-class": "transition-transform duration-300 ease-out motion-reduce:transition-none"
|
|
199
|
+
}, {
|
|
200
|
+
default: x(() => [(h(!0), c(r, null, ee(V.value, (e, r) => (h(), c("div", {
|
|
201
|
+
key: R.value[r] ?? r,
|
|
202
|
+
"data-row": r,
|
|
203
|
+
class: "grid grid-cols-[minmax(0,1fr)_auto] items-start gap-x-4 max-sm:rounded-10 max-sm:border max-sm:border-border max-sm:bg-surface max-sm:p-3",
|
|
204
|
+
onFocusin: (e) => z.value = R.value[r] ?? null,
|
|
205
|
+
onFocusout: (e) => ge(e, R.value[r] ?? -1)
|
|
206
|
+
}, [l("div", { class: m(["grid items-start gap-x-4 gap-y-3 [&_div:has(>input)]:rounded-8 [&_input]:rounded-8 [&_input]:font-medium", G.value]) }, [
|
|
207
|
+
u(t, {
|
|
208
|
+
"data-cell": "key",
|
|
209
|
+
"model-value": e.key,
|
|
210
|
+
label: `${d.keyLabel} ${r + 1}`,
|
|
211
|
+
placeholder: d.keyPlaceholder,
|
|
212
|
+
size: d.size,
|
|
213
|
+
disabled: d.disabled,
|
|
214
|
+
readonly: d.readonly,
|
|
215
|
+
"error-msg": K.value[r]?.key,
|
|
216
|
+
autocomplete: "off",
|
|
217
|
+
spellcheck: "false",
|
|
218
|
+
class: m(["sm:[&>label:first-child]:sr-only", d.mono && "[&_input]:font-mono"]),
|
|
219
|
+
"onUpdate:modelValue": (e) => Q(r, { key: String(e) }),
|
|
220
|
+
onKeydown: S((e) => me(e, r), ["enter"])
|
|
221
|
+
}, null, 8, [
|
|
222
|
+
"model-value",
|
|
223
|
+
"label",
|
|
224
|
+
"placeholder",
|
|
225
|
+
"size",
|
|
226
|
+
"disabled",
|
|
227
|
+
"readonly",
|
|
228
|
+
"error-msg",
|
|
229
|
+
"class",
|
|
230
|
+
"onUpdate:modelValue",
|
|
231
|
+
"onKeydown"
|
|
232
|
+
]),
|
|
233
|
+
u(t, {
|
|
234
|
+
"data-cell": "value",
|
|
235
|
+
"model-value": e.value,
|
|
236
|
+
label: `${d.valueLabel} ${r + 1}`,
|
|
237
|
+
placeholder: d.valuePlaceholder,
|
|
238
|
+
size: d.size,
|
|
239
|
+
disabled: d.disabled,
|
|
240
|
+
readonly: d.readonly,
|
|
241
|
+
"error-msg": K.value[r]?.value,
|
|
242
|
+
autocomplete: "off",
|
|
243
|
+
spellcheck: "false",
|
|
244
|
+
class: "sm:[&>label:first-child]:sr-only",
|
|
245
|
+
"onUpdate:modelValue": (e) => Q(r, { value: String(e) }),
|
|
246
|
+
onKeydown: S((e) => he(e, r), ["enter"])
|
|
247
|
+
}, null, 8, [
|
|
248
|
+
"model-value",
|
|
249
|
+
"label",
|
|
250
|
+
"placeholder",
|
|
251
|
+
"size",
|
|
252
|
+
"disabled",
|
|
253
|
+
"readonly",
|
|
254
|
+
"error-msg",
|
|
255
|
+
"onUpdate:modelValue",
|
|
256
|
+
"onKeydown"
|
|
257
|
+
]),
|
|
258
|
+
H.value && d.readonly ? (h(), o(t, {
|
|
259
|
+
key: 0,
|
|
260
|
+
"data-cell": "option",
|
|
261
|
+
"model-value": e.option ? q(e.option) : "",
|
|
262
|
+
label: `${d.optionLabel} ${r + 1}`,
|
|
263
|
+
size: d.size,
|
|
264
|
+
readonly: "",
|
|
265
|
+
class: "sm:[&>label:first-child]:sr-only"
|
|
266
|
+
}, null, 8, [
|
|
267
|
+
"model-value",
|
|
268
|
+
"label",
|
|
269
|
+
"size"
|
|
270
|
+
])) : H.value ? (h(), o(n, {
|
|
271
|
+
key: 1,
|
|
272
|
+
"data-cell": "option",
|
|
273
|
+
"model-value": e.option ?? null,
|
|
274
|
+
options: d.options,
|
|
275
|
+
label: `${d.optionLabel} ${r + 1}`,
|
|
276
|
+
size: d.size,
|
|
277
|
+
disabled: d.disabled,
|
|
278
|
+
class: "sm:[&>div:first-child]:sr-only",
|
|
279
|
+
"onUpdate:modelValue": (e) => Q(r, { option: e ?? void 0 })
|
|
280
|
+
}, null, 8, [
|
|
281
|
+
"model-value",
|
|
282
|
+
"options",
|
|
283
|
+
"label",
|
|
284
|
+
"size",
|
|
285
|
+
"disabled",
|
|
286
|
+
"onUpdate:modelValue"
|
|
287
|
+
])) : s("", !0)
|
|
288
|
+
], 2), U.value ? (h(), c("button", {
|
|
247
289
|
key: 0,
|
|
248
|
-
|
|
249
|
-
"
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
},
|
|
255
|
-
"
|
|
256
|
-
"
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
size: d.size,
|
|
265
|
-
disabled: d.disabled,
|
|
266
|
-
class: "sm:[&>div:first-child]:sr-only",
|
|
267
|
-
"onUpdate:modelValue": (e) => Q(r, { option: e ?? void 0 })
|
|
268
|
-
}, null, 8, [
|
|
269
|
-
"model-value",
|
|
270
|
-
"options",
|
|
271
|
-
"label",
|
|
272
|
-
"size",
|
|
273
|
-
"disabled",
|
|
274
|
-
"onUpdate:modelValue"
|
|
275
|
-
])) : o("", !0)
|
|
276
|
-
], 2), H.value ? (h(), s("button", {
|
|
277
|
-
key: 0,
|
|
278
|
-
type: "button",
|
|
279
|
-
"data-action": "remove",
|
|
280
|
-
class: m(["inline-flex shrink-0 cursor-pointer items-center justify-center rounded-10 text-muted transition-colors duration-200 hover:bg-danger/10 hover:text-danger-strong focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none max-sm:mt-7", me.value]),
|
|
281
|
-
"aria-label": `Remove ${J(r)}`,
|
|
282
|
-
title: `Remove ${d.itemName}`,
|
|
283
|
-
onClick: (e) => he(r)
|
|
284
|
-
}, [u(y(ie), {
|
|
285
|
-
class: "size-4",
|
|
286
|
-
"aria-hidden": "true"
|
|
287
|
-
})], 10, T)) : o("", !0)], 40, w))), 128))])], 64)) : H.value ? o("", !0) : (h(), s("p", E, "No " + v(d.itemName) + "s.", 1)),
|
|
288
|
-
_(i.$slots, "footer"),
|
|
289
|
-
H.value ? (h(), s("div", {
|
|
290
|
-
key: 4,
|
|
291
|
-
class: m(["flex items-center gap-3", B.value.length || i.$slots.footer ? "mt-3" : ""])
|
|
290
|
+
type: "button",
|
|
291
|
+
"data-action": "remove",
|
|
292
|
+
class: m(["inline-flex shrink-0 cursor-pointer items-center justify-center rounded-8 bg-danger/5 text-danger/60 transition-all duration-200 hover:bg-danger/10 hover:text-danger focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none max-sm:mt-7", de.value]),
|
|
293
|
+
"aria-label": `Remove ${J(r)}`,
|
|
294
|
+
title: `Remove ${d.itemName}`,
|
|
295
|
+
onClick: (e) => pe(r)
|
|
296
|
+
}, [u(y(w), {
|
|
297
|
+
class: "size-[18px]",
|
|
298
|
+
"aria-hidden": "true"
|
|
299
|
+
})], 10, ce)) : s("", !0)], 40, se))), 128))]),
|
|
300
|
+
_: 1
|
|
301
|
+
})) : (h(), c("p", E, "No " + v(d.itemName) + "s.", 1)),
|
|
302
|
+
_(a.$slots, "footer"),
|
|
303
|
+
U.value ? (h(), c("div", {
|
|
304
|
+
key: 5,
|
|
305
|
+
class: m(["flex items-center gap-3", V.value.length || a.$slots.footer ? "mt-2" : ""])
|
|
292
306
|
}, [u(e, {
|
|
293
307
|
"data-action": "add",
|
|
294
|
-
title:
|
|
308
|
+
title: le.value,
|
|
309
|
+
"aria-label": d.addLabel ? void 0 : `Add new ${d.itemName}`,
|
|
295
310
|
size: "small",
|
|
296
311
|
variant: "light",
|
|
297
|
-
disabled:
|
|
312
|
+
disabled: W.value,
|
|
298
313
|
onClick: $
|
|
299
314
|
}, {
|
|
300
|
-
icon:
|
|
315
|
+
icon: x(() => [u(y(C), { "aria-hidden": "true" })]),
|
|
301
316
|
_: 1
|
|
302
|
-
}, 8, [
|
|
317
|
+
}, 8, [
|
|
318
|
+
"title",
|
|
319
|
+
"aria-label",
|
|
320
|
+
"disabled"
|
|
321
|
+
]), d.max === void 0 ? s("", !0) : (h(), c("span", {
|
|
303
322
|
key: 0,
|
|
304
|
-
class: m(["text-xs text-muted tabular-nums",
|
|
305
|
-
}, v(
|
|
306
|
-
d.errorMsg ? (h(),
|
|
307
|
-
key:
|
|
308
|
-
id:
|
|
309
|
-
class: "mt-1
|
|
323
|
+
class: m(["text-xs text-muted tabular-nums", W.value && "font-medium text-heading"])
|
|
324
|
+
}, v(V.value.length) + " of " + v(d.max), 3))], 2)) : s("", !0),
|
|
325
|
+
d.errorMsg ? (h(), c("p", {
|
|
326
|
+
key: 6,
|
|
327
|
+
id: F,
|
|
328
|
+
class: "mt-1 text-base text-danger-strong",
|
|
310
329
|
role: "alert"
|
|
311
|
-
},
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
}), l(" " + v(d.errorMsg), 1)])) : o("", !0),
|
|
315
|
-
c("p", de, v(z.value), 1)
|
|
316
|
-
], 10, ae));
|
|
330
|
+
}, v(d.errorMsg), 1)) : s("", !0),
|
|
331
|
+
l("p", D, v(B.value), 1)
|
|
332
|
+
], 10, T));
|
|
317
333
|
}
|
|
318
334
|
});
|
|
319
335
|
//#endregion
|
|
320
|
-
export {
|
|
336
|
+
export { O as default };
|
|
@@ -6,6 +6,8 @@ export interface Props extends XYChartProps {
|
|
|
6
6
|
curve?: ChartCurve;
|
|
7
7
|
/** Line thickness in px. */
|
|
8
8
|
lineWidth?: number;
|
|
9
|
+
/** Draws a dot on every point. `auto` shows them up to 60 rows, where they still read as points. */
|
|
10
|
+
points?: boolean | "auto";
|
|
9
11
|
}
|
|
10
12
|
type __VLS_Slots = {
|
|
11
13
|
/** Replaces the tooltip body for the hovered row. */
|
|
@@ -16,11 +18,15 @@ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, i
|
|
|
16
18
|
title: string;
|
|
17
19
|
description: string;
|
|
18
20
|
height: number;
|
|
21
|
+
points: boolean | "auto";
|
|
19
22
|
loading: boolean;
|
|
23
|
+
animation: boolean;
|
|
20
24
|
tooltip: boolean;
|
|
21
25
|
emptyText: string;
|
|
22
26
|
lineWidth: number;
|
|
27
|
+
renderer: "canvas" | "svg";
|
|
23
28
|
gridLines: boolean;
|
|
29
|
+
zoom: boolean;
|
|
24
30
|
xFormatter: (value: Date | number | string) => string;
|
|
25
31
|
yFormatter: (value: number) => string;
|
|
26
32
|
xLabel: string;
|