@ac-design/design-system 1.0.2 → 2.0.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/README.md +27 -18
- package/dist/lib/charts/ChartFrame.js +5 -0
- package/dist/lib/charts/ChartFrame.vue.d.ts +69 -0
- package/dist/lib/charts/ChartFrame.vue_vue_type_script_setup_true_lang.js +168 -0
- package/dist/lib/charts/index.d.ts +7 -0
- package/dist/lib/charts/index.js +5 -0
- package/dist/lib/charts/shared.d.ts +60 -0
- package/dist/lib/charts/shared.js +114 -0
- package/dist/lib/charts/xy.d.ts +65 -0
- package/dist/lib/charts/xy.js +92 -0
- package/dist/lib/compat.css +1707 -1042
- package/dist/lib/components/AcAccordion.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/lib/components/AcAccordionItem.vue.d.ts +1 -1
- package/dist/lib/components/AcAccordionItem.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/lib/components/AcAlert.vue.d.ts +1 -1
- package/dist/lib/components/AcAlert.vue_vue_type_script_setup_true_lang.js +19 -25
- package/dist/lib/components/AcAppSwitcher.vue_vue_type_script_setup_true_lang.js +19 -19
- package/dist/lib/components/AcAreaChart.js +5 -0
- package/dist/lib/components/AcAreaChart.vue.d.ts +44 -0
- package/dist/lib/components/AcAreaChart.vue_vue_type_script_setup_true_lang.js +215 -0
- package/dist/lib/components/AcAvatar.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/lib/components/AcBadge.vue.d.ts +16 -7
- package/dist/lib/components/AcBadge.vue_vue_type_script_setup_true_lang.js +59 -43
- package/dist/lib/components/AcBanner.vue.d.ts +1 -1
- package/dist/lib/components/AcBanner.vue_vue_type_script_setup_true_lang.js +30 -30
- package/dist/lib/components/AcBarChart.js +5 -0
- package/dist/lib/components/AcBarChart.vue.d.ts +43 -0
- package/dist/lib/components/AcBarChart.vue_vue_type_script_setup_true_lang.js +217 -0
- package/dist/lib/components/AcBreadcrumb.vue_vue_type_script_setup_true_lang.js +27 -26
- package/dist/lib/components/AcBulkActionBar.js +5 -0
- package/dist/lib/components/AcBulkActionBar.vue.d.ts +43 -0
- package/dist/lib/components/AcBulkActionBar.vue_vue_type_script_setup_true_lang.js +84 -0
- package/dist/lib/components/AcButton.vue.d.ts +3 -3
- package/dist/lib/components/AcButton.vue_vue_type_script_setup_true_lang.js +42 -34
- package/dist/lib/components/AcButtons.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/lib/components/AcCard.vue.d.ts +10 -2
- package/dist/lib/components/AcCard.vue_vue_type_script_setup_true_lang.js +37 -11
- package/dist/lib/components/AcCellValue.vue.d.ts +4 -1
- package/dist/lib/components/AcCellValue.vue_vue_type_script_setup_true_lang.js +214 -179
- package/dist/lib/components/AcCheckBox.vue.d.ts +17 -3
- package/dist/lib/components/AcCheckBox.vue_vue_type_script_setup_true_lang.js +126 -29
- package/dist/lib/components/AcCheckRadio.vue.d.ts +1 -1
- package/dist/lib/components/AcCheckRadio.vue_vue_type_script_setup_true_lang.js +33 -21
- package/dist/lib/components/AcCircularProgress.js +5 -0
- package/dist/lib/components/AcCircularProgress.vue.d.ts +44 -0
- package/dist/lib/components/AcCircularProgress.vue_vue_type_script_setup_true_lang.js +111 -0
- package/dist/lib/components/AcClusterSwitcher.vue_vue_type_script_setup_true_lang.js +142 -167
- package/dist/lib/components/AcCodeEditor.vue_vue_type_script_setup_true_lang.js +9 -9
- package/dist/lib/components/AcColorInput.js +5 -0
- package/dist/lib/components/AcColorInput.vue.d.ts +54 -0
- package/dist/lib/components/AcColorInput.vue_vue_type_script_setup_true_lang.js +187 -0
- package/dist/lib/components/AcConfirmModal.js +5 -0
- package/dist/lib/components/AcConfirmModal.vue.d.ts +56 -0
- package/dist/lib/components/AcConfirmModal.vue_vue_type_script_setup_true_lang.js +92 -0
- package/dist/lib/components/AcContentHeader.vue.d.ts +1 -1
- package/dist/lib/components/AcContentHeader.vue_vue_type_script_setup_true_lang.js +5 -4
- package/dist/lib/components/AcContentLayout.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/lib/components/AcCopyButton.js +5 -0
- package/dist/lib/components/AcCopyButton.vue.d.ts +43 -0
- package/dist/lib/components/AcCopyButton.vue_vue_type_script_setup_true_lang.js +92 -0
- package/dist/lib/components/AcDatePicker.vue.d.ts +5 -5
- package/dist/lib/components/AcDatePicker.vue_vue_type_script_setup_true_lang.js +204 -213
- package/dist/lib/components/AcDeleteModal.vue.d.ts +4 -4
- package/dist/lib/components/AcDeleteModal.vue_vue_type_script_setup_true_lang.js +37 -46
- package/dist/lib/components/AcDonutChart.js +5 -0
- package/dist/lib/components/AcDonutChart.vue.d.ts +73 -0
- package/dist/lib/components/AcDonutChart.vue_vue_type_script_setup_true_lang.js +210 -0
- package/dist/lib/components/AcDropdown.vue.d.ts +1 -1
- package/dist/lib/components/AcDropdown.vue_vue_type_script_setup_true_lang.js +9 -9
- package/dist/lib/components/AcDropdownDivider.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/lib/components/AcDropdownItem.vue.d.ts +1 -1
- package/dist/lib/components/AcDropdownItem.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/lib/components/AcEmptyState.vue.d.ts +4 -1
- package/dist/lib/components/AcEmptyState.vue_vue_type_script_setup_true_lang.js +50 -39
- package/dist/lib/components/AcFeatureCard.vue_vue_type_script_setup_true_lang.js +14 -13
- package/dist/lib/components/AcFileEditor.vue_vue_type_script_setup_true_lang.js +16 -16
- package/dist/lib/components/AcFileUpload.vue.d.ts +2 -2
- package/dist/lib/components/AcFileUpload.vue_vue_type_script_setup_true_lang.js +55 -53
- package/dist/lib/components/AcFontScale.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/lib/components/AcFooter.js +5 -0
- package/dist/lib/components/AcFooter.vue.d.ts +37 -0
- package/dist/lib/components/AcFooter.vue_vue_type_script_setup_true_lang.js +107 -0
- package/dist/lib/components/AcForm.vue.d.ts +3 -0
- package/dist/lib/components/AcForm.vue_vue_type_script_setup_true_lang.js +4 -2
- package/dist/lib/components/AcFormArray.vue.d.ts +2 -2
- package/dist/lib/components/AcFormArray.vue_vue_type_script_setup_true_lang.js +149 -147
- package/dist/lib/components/AcFormFooter.vue.d.ts +2 -2
- package/dist/lib/components/AcFormFooter.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/lib/components/AcFormSection.vue.d.ts +7 -0
- package/dist/lib/components/AcFormSection.vue_vue_type_script_setup_true_lang.js +31 -21
- package/dist/lib/components/AcHeader.vue.d.ts +3 -3
- package/dist/lib/components/AcHeader.vue_vue_type_script_setup_true_lang.js +22 -22
- package/dist/lib/components/AcInfoTable.vue_vue_type_script_setup_true_lang.js +17 -13
- package/dist/lib/components/AcInput.vue.d.ts +3 -3
- package/dist/lib/components/AcInput.vue_vue_type_script_setup_true_lang.js +98 -87
- package/dist/lib/components/AcKbd.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/lib/components/AcKeyValueInput.js +5 -0
- package/dist/lib/components/AcKeyValueInput.vue.d.ts +114 -0
- package/dist/lib/components/AcKeyValueInput.vue_vue_type_script_setup_true_lang.js +320 -0
- package/dist/lib/components/AcLineChart.js +5 -0
- package/dist/lib/components/AcLineChart.vue.d.ts +38 -0
- package/dist/lib/components/AcLineChart.vue_vue_type_script_setup_true_lang.js +187 -0
- package/dist/lib/components/AcLocaleSwitcher.js +5 -0
- package/dist/lib/components/AcLocaleSwitcher.vue.d.ts +46 -0
- package/dist/lib/components/AcLocaleSwitcher.vue_vue_type_script_setup_true_lang.js +103 -0
- package/dist/lib/components/AcModal.vue_vue_type_script_setup_true_lang.js +23 -23
- package/dist/lib/components/AcNavbar.vue_vue_type_script_setup_true_lang.js +6 -6
- package/dist/lib/components/AcNavbarItem.vue.d.ts +1 -1
- package/dist/lib/components/AcNavbarItem.vue_vue_type_script_setup_true_lang.js +22 -22
- package/dist/lib/components/AcNotificationMenu.vue_vue_type_script_setup_true_lang.js +26 -26
- package/dist/lib/components/AcNumberInput.js +5 -0
- package/dist/lib/components/AcNumberInput.vue.d.ts +79 -0
- package/dist/lib/components/AcNumberInput.vue_vue_type_script_setup_true_lang.js +251 -0
- package/dist/lib/components/AcPage.vue.d.ts +2 -2
- package/dist/lib/components/AcPage.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/lib/components/AcPagination.vue.d.ts +20 -3
- package/dist/lib/components/AcPagination.vue_vue_type_script_setup_true_lang.js +81 -53
- package/dist/lib/components/AcPreloader.vue.d.ts +1 -1
- package/dist/lib/components/AcPreloader.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/lib/components/AcProgress.vue.d.ts +2 -2
- package/dist/lib/components/AcProgress.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/lib/components/AcResourceCard.vue.d.ts +2 -2
- package/dist/lib/components/AcResourceCard.vue_vue_type_script_setup_true_lang.js +13 -13
- package/dist/lib/components/AcSearchBar.vue.d.ts +1 -1
- package/dist/lib/components/AcSearchBar.vue_vue_type_script_setup_true_lang.js +9 -8
- package/dist/lib/components/AcSectionContent.vue.d.ts +2 -2
- package/dist/lib/components/AcSectionContent.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/lib/components/AcSegmentedControl.vue.d.ts +1 -1
- package/dist/lib/components/AcSegmentedControl.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/lib/components/AcSelect.vue.d.ts +4 -4
- package/dist/lib/components/AcSelect.vue_vue_type_script_setup_true_lang.js +230 -227
- package/dist/lib/components/AcSidePanel.vue_vue_type_script_setup_true_lang.js +31 -31
- package/dist/lib/components/AcSideTabs.vue.d.ts +1 -1
- package/dist/lib/components/AcSideTabs.vue_vue_type_script_setup_true_lang.js +37 -37
- package/dist/lib/components/AcSidebar.vue.d.ts +3 -3
- package/dist/lib/components/AcSidebar.vue_vue_type_script_setup_true_lang.js +75 -75
- package/dist/lib/components/AcSidebarItem.vue_vue_type_script_setup_true_lang.js +33 -32
- package/dist/lib/components/AcSidebarSection.vue_vue_type_script_setup_true_lang.js +6 -6
- package/dist/lib/components/AcSkeleton.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/lib/components/AcSlider.vue.d.ts +1 -1
- package/dist/lib/components/AcSlider.vue_vue_type_script_setup_true_lang.js +174 -172
- package/dist/lib/components/AcStatCard.vue.d.ts +3 -3
- package/dist/lib/components/AcStatCard.vue_vue_type_script_setup_true_lang.js +90 -85
- package/dist/lib/components/AcStatusBar.vue.d.ts +1 -1
- package/dist/lib/components/AcStatusBar.vue_vue_type_script_setup_true_lang.js +6 -6
- package/dist/lib/components/AcSteps.vue_vue_type_script_setup_true_lang.js +28 -28
- package/dist/lib/components/AcSwitch.vue_vue_type_script_setup_true_lang.js +39 -34
- package/dist/lib/components/AcSwitchCard.js +5 -0
- package/dist/lib/components/AcSwitchCard.vue.d.ts +59 -0
- package/dist/lib/components/AcSwitchCard.vue_vue_type_script_setup_true_lang.js +119 -0
- package/dist/lib/components/AcTable.vue_vue_type_script_setup_true_lang.js +87 -87
- package/dist/lib/components/AcTabs.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/lib/components/AcTag.vue.d.ts +1 -1
- package/dist/lib/components/AcTag.vue_vue_type_script_setup_true_lang.js +22 -22
- package/dist/lib/components/AcTagInput.js +5 -0
- package/dist/lib/components/AcTagInput.vue.d.ts +74 -0
- package/dist/lib/components/AcTagInput.vue_vue_type_script_setup_true_lang.js +291 -0
- package/dist/lib/components/AcTextarea.vue.d.ts +3 -3
- package/dist/lib/components/AcTextarea.vue_vue_type_script_setup_true_lang.js +89 -64
- package/dist/lib/components/AcThemeMode.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/lib/components/AcTimePicker.js +5 -0
- package/dist/lib/components/AcTimePicker.vue.d.ts +65 -0
- package/dist/lib/components/AcTimePicker.vue_vue_type_script_setup_true_lang.js +463 -0
- package/dist/lib/components/AcToaster.vue_vue_type_script_setup_true_lang.js +65 -71
- package/dist/lib/components/AcTooltip.vue.d.ts +1 -1
- package/dist/lib/components/AcTooltip.vue_vue_type_script_setup_true_lang.js +77 -67
- package/dist/lib/components/AcUsageCard.vue_vue_type_script_setup_true_lang.js +27 -27
- package/dist/lib/components/AcUserMenu.vue_vue_type_script_setup_true_lang.js +111 -103
- package/dist/lib/components/index.d.ts +14 -2
- package/dist/lib/components/status.d.ts +26 -0
- package/dist/lib/components/status.js +110 -0
- package/dist/lib/composables/copyText.d.ts +2 -1
- package/dist/lib/composables/copyText.js +2 -2
- package/dist/lib/composables/useApiPagination.d.ts +55 -0
- package/dist/lib/composables/useApiPagination.js +58 -0
- package/dist/lib/composables/useBulkSelection.d.ts +44 -0
- package/dist/lib/composables/useBulkSelection.js +41 -0
- package/dist/lib/composables/useFormValidation.d.ts +65 -0
- package/dist/lib/composables/useFormValidation.js +148 -0
- package/dist/lib/composables/useTablePagination.d.ts +49 -0
- package/dist/lib/composables/useTablePagination.js +41 -0
- package/dist/lib/editor/theme.js +65 -62
- package/dist/lib/index.d.ts +14 -0
- package/dist/lib/index.js +95 -78
- package/dist/lib/theme.css +391 -272
- package/package.json +11 -4
|
@@ -1,33 +1,40 @@
|
|
|
1
|
-
import e from "./
|
|
2
|
-
import t from "./
|
|
3
|
-
import n from "./
|
|
4
|
-
import r from "./
|
|
5
|
-
import i from "./
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
1
|
+
import { statusMeta as e } from "./status.js";
|
|
2
|
+
import t from "./AcBadge.js";
|
|
3
|
+
import n from "./AcModal.js";
|
|
4
|
+
import r from "./AcSkeleton.js";
|
|
5
|
+
import i from "./AcTag.js";
|
|
6
|
+
import a from "./AcTooltip.js";
|
|
7
|
+
import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as ee, defineAsyncComponent as te, defineComponent as p, getCurrentInstance as ne, h as re, mergeProps as m, nextTick as ie, normalizeClass as h, normalizeStyle as ae, onBeforeUnmount as oe, onMounted as se, openBlock as g, ref as _, renderList as ce, resolveDynamicComponent as v, toDisplayString as y, unref as b, watch as x, withCtx as S, withModifiers as C } from "vue";
|
|
8
|
+
import { Braces as le, Check as ue, Minus as de } from "@lucide/vue";
|
|
8
9
|
//#region src/lib/components/AcCellValue.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
-
var
|
|
10
|
+
var fe = ["src"], pe = {
|
|
10
11
|
key: 1,
|
|
11
12
|
class: "text-muted"
|
|
12
|
-
},
|
|
13
|
+
}, me = {
|
|
14
|
+
class: "relative flex size-1.5 shrink-0",
|
|
15
|
+
"aria-hidden": "true"
|
|
16
|
+
}, he = ["tabindex"], ge = {
|
|
17
|
+
class: "relative flex size-1.5 shrink-0",
|
|
18
|
+
"aria-hidden": "true"
|
|
19
|
+
}, _e = {
|
|
13
20
|
key: 4,
|
|
14
21
|
class: "inline-flex items-center gap-1"
|
|
15
|
-
},
|
|
16
|
-
function
|
|
17
|
-
|
|
22
|
+
}, ve = ["datetime"], ye = ["datetime", "tabindex"], be = ["aria-expanded", "aria-label"], xe = ["tabindex"], Se = ["aria-label"], w = _(Date.now()), T = 0, E;
|
|
23
|
+
function Ce() {
|
|
24
|
+
T++ === 0 && (E = setInterval(() => w.value = Date.now(), 3e4));
|
|
18
25
|
}
|
|
19
|
-
function
|
|
20
|
-
--
|
|
26
|
+
function we() {
|
|
27
|
+
--T === 0 && clearInterval(E);
|
|
21
28
|
}
|
|
22
|
-
var
|
|
23
|
-
function
|
|
29
|
+
var D = /* @__PURE__ */ new WeakMap(), O;
|
|
30
|
+
function Te(e, t) {
|
|
24
31
|
if (typeof ResizeObserver > "u") return t();
|
|
25
|
-
|
|
32
|
+
O ??= new ResizeObserver((e) => e.forEach((e) => D.get(e.target)?.())), D.set(e, t), O.observe(e);
|
|
26
33
|
}
|
|
27
|
-
function
|
|
28
|
-
|
|
34
|
+
function k(e) {
|
|
35
|
+
D.delete(e), O?.unobserve(e);
|
|
29
36
|
}
|
|
30
|
-
var
|
|
37
|
+
var A = /*@__PURE__*/ p({
|
|
31
38
|
__name: "AcCellValue",
|
|
32
39
|
props: {
|
|
33
40
|
value: { default: void 0 },
|
|
@@ -63,17 +70,21 @@ var M = /*@__PURE__*/ p({
|
|
|
63
70
|
loading: {
|
|
64
71
|
type: Boolean,
|
|
65
72
|
default: !1
|
|
73
|
+
},
|
|
74
|
+
plain: {
|
|
75
|
+
type: Boolean,
|
|
76
|
+
default: !1
|
|
66
77
|
}
|
|
67
78
|
},
|
|
68
79
|
setup(p) {
|
|
69
|
-
let
|
|
80
|
+
let T = p, E = /* @__PURE__ */ new Set([
|
|
70
81
|
"",
|
|
71
82
|
"<none>",
|
|
72
83
|
"<unknown>",
|
|
73
84
|
"<nil>",
|
|
74
85
|
"null",
|
|
75
86
|
"undefined"
|
|
76
|
-
]),
|
|
87
|
+
]), D = {
|
|
77
88
|
primary: "primary",
|
|
78
89
|
secondary: "secondary",
|
|
79
90
|
info: "info",
|
|
@@ -81,6 +92,7 @@ var M = /*@__PURE__*/ p({
|
|
|
81
92
|
success: "success",
|
|
82
93
|
warning: "warning",
|
|
83
94
|
danger: "danger",
|
|
95
|
+
pending: "pending",
|
|
84
96
|
dark: "dark",
|
|
85
97
|
black: "dark",
|
|
86
98
|
light: "default",
|
|
@@ -88,89 +100,92 @@ var M = /*@__PURE__*/ p({
|
|
|
88
100
|
gray: "default",
|
|
89
101
|
default: "default",
|
|
90
102
|
neutral: "default"
|
|
91
|
-
},
|
|
92
|
-
["
|
|
93
|
-
["
|
|
94
|
-
["
|
|
95
|
-
|
|
103
|
+
}, O = {
|
|
104
|
+
primary: ["bg-primary", "text-primary-strong"],
|
|
105
|
+
secondary: ["bg-secondary", "text-secondary"],
|
|
106
|
+
info: ["bg-info", "text-info-strong"],
|
|
107
|
+
success: ["bg-success", "text-success-strong"],
|
|
108
|
+
warning: ["bg-warning", "text-warning-strong"],
|
|
109
|
+
danger: ["bg-danger", "text-danger-strong"],
|
|
110
|
+
pending: ["bg-pending", "text-pending-strong"],
|
|
111
|
+
dark: ["bg-heading", "text-heading"],
|
|
112
|
+
default: ["bg-muted", "text-muted"]
|
|
113
|
+
}, A = /^-?[\d.]+\s?[a-zA-Z%]{0,3}$/, Ee = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}/, De = new Intl.NumberFormat(void 0, { maximumFractionDigits: 2 }), Oe = new Intl.NumberFormat(void 0, { maximumFractionDigits: 0 }), ke = new Intl.DateTimeFormat(void 0, {
|
|
96
114
|
dateStyle: "medium",
|
|
97
115
|
timeStyle: "long"
|
|
98
|
-
}),
|
|
116
|
+
}), Ae = te({
|
|
99
117
|
loader: () => import("../editor/index.js").then((e) => e.AcCodeEditor),
|
|
100
|
-
loadingComponent: () =>
|
|
118
|
+
loadingComponent: () => re(r, {
|
|
101
119
|
shape: "editor",
|
|
102
120
|
height: "240px"
|
|
103
121
|
}),
|
|
104
122
|
delay: 150
|
|
105
|
-
}),
|
|
106
|
-
let e =
|
|
107
|
-
return e &&
|
|
108
|
-
}),
|
|
109
|
-
href:
|
|
123
|
+
}), je = ne()?.appContext.components.RouterLink, j = _(null), Me = _(!1), M = _(!1), N = _(!1), P = _(!1), F = s(() => T.cell ? T.cell.data : T.value), I = s(() => T.title || T.column?.name || ""), L = s(() => T.tooltip || T.cell?.tooltip || ""), Ne = s(() => T.icon || T.cell?.icon || ""), Pe = s(() => T.bold || !!T.cell?.isBold || T.column?.format === "name"), R = s(() => T.align ?? T.column?.textAlign), z = s(() => {
|
|
124
|
+
let e = T.href || T.cell?.link || "";
|
|
125
|
+
return e && T.resolveLink ? T.resolveLink(e) : e;
|
|
126
|
+
}), Fe = s(() => /^https?:\/\//.test(z.value)), B = s(() => je && z.value.startsWith("/") ? je : "a"), V = s(() => z.value ? Fe.value ? {
|
|
127
|
+
href: z.value,
|
|
110
128
|
target: "_blank",
|
|
111
129
|
rel: "noopener noreferrer"
|
|
112
|
-
} :
|
|
113
|
-
let
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
let
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
let
|
|
124
|
-
|
|
125
|
-
}), J = o(() => q.value === "date" ? Le(B.value) : null), Y = o(() => {
|
|
126
|
-
let e = B.value;
|
|
127
|
-
switch (q.value) {
|
|
130
|
+
} : B.value === "a" ? { href: z.value } : { to: z.value } : null), H = s(() => {
|
|
131
|
+
let t = (T.color || T.cell?.color || "").trim().split(/\s+/)[0].replace(/^is-/, "");
|
|
132
|
+
return t ? D[t] ?? "default" : W.value === "status" ? e(String(F.value)).tone : null;
|
|
133
|
+
}), U = s(() => W.value === "status" && e(String(F.value)).transient), W = s(() => {
|
|
134
|
+
let e = F.value;
|
|
135
|
+
if (Ue(e)) return "empty";
|
|
136
|
+
if (T.color || T.cell?.color) return "status";
|
|
137
|
+
if (T.type !== "auto") return T.type;
|
|
138
|
+
let t = typeof e == "object" ? void 0 : T.column?.type;
|
|
139
|
+
return t && t !== "auto" && t !== "object" ? t : typeof e == "boolean" ? "boolean" : typeof e == "number" ? "number" : Array.isArray(e) ? "array" : typeof e == "object" ? We(e) ? "labels" : "object" : typeof e == "string" && Ee.test(e) && !Number.isNaN(Date.parse(e)) ? "date" : "string";
|
|
140
|
+
}), G = s(() => W.value === "date" ? Ge(F.value) : null), K = s(() => {
|
|
141
|
+
let e = F.value;
|
|
142
|
+
switch (W.value) {
|
|
128
143
|
case "number":
|
|
129
144
|
case "integer": {
|
|
130
145
|
let t = typeof e == "number" ? e : Number(e);
|
|
131
|
-
return Number.isNaN(t) ? `${String(e)}${
|
|
146
|
+
return Number.isNaN(t) ? `${String(e)}${T.unit}` : `${(W.value === "integer" ? Oe : De).format(t)}${T.unit}`;
|
|
132
147
|
}
|
|
133
|
-
case "boolean": return
|
|
134
|
-
case "date": return
|
|
135
|
-
case "object": return
|
|
148
|
+
case "boolean": return Z(e) ? "true" : "false";
|
|
149
|
+
case "date": return G.value ? T.relative ? Q(G.value, w.value) : ke.format(G.value) : String(e);
|
|
150
|
+
case "object": return qe(e);
|
|
136
151
|
default: return typeof e == "object" ? JSON.stringify(e) : String(e);
|
|
137
152
|
}
|
|
138
|
-
}),
|
|
139
|
-
let e =
|
|
140
|
-
return
|
|
153
|
+
}), q = s(() => G.value ? L.value || (T.relative ? ke.format(G.value) : Q(G.value, w.value)) : L.value), Ie = s(() => L.value || (Me.value ? K.value : "")), J = s(() => {
|
|
154
|
+
let e = F.value;
|
|
155
|
+
return W.value === "labels" ? Object.entries(e).map(([e, t]) => ({
|
|
141
156
|
key: e,
|
|
142
157
|
value: String(t ?? ""),
|
|
143
158
|
text: `${e}=${t ?? ""}`
|
|
144
|
-
})) :
|
|
145
|
-
let t =
|
|
159
|
+
})) : W.value === "array" ? e.map((e) => {
|
|
160
|
+
let t = Je(e);
|
|
146
161
|
return {
|
|
147
162
|
key: "",
|
|
148
163
|
value: t,
|
|
149
164
|
text: t
|
|
150
165
|
};
|
|
151
166
|
}) : [];
|
|
152
|
-
}),
|
|
153
|
-
function
|
|
154
|
-
return e == null ? !0 : typeof e == "string" ?
|
|
167
|
+
}), Le = s(() => M.value ? J.value : J.value.slice(0, T.maxItems)), Y = s(() => J.value.length - Math.min(J.value.length, T.maxItems)), Re = s(() => W.value === "object" || W.value === "array" && F.value.some((e) => typeof e == "object" && !!e)), ze = s(() => N.value ? JSON.stringify(F.value, null, 2) : ""), Be = s(() => W.value === "number" || W.value === "integer" || W.value === "string" && A.test(K.value)), X = s(() => O[H.value ?? "default"]), Ve = s(() => T.plain ? "rounded-4" : T.column?.shape === "Rectangle" ? "rounded-6" : "rounded-full"), He = s(() => W.value === "labels" ? "labels" : "items");
|
|
168
|
+
function Ue(e) {
|
|
169
|
+
return e == null ? !0 : typeof e == "string" ? E.has(e.trim()) : Array.isArray(e) ? e.length === 0 : typeof e == "object" && Object.keys(e).length === 0;
|
|
155
170
|
}
|
|
156
|
-
function
|
|
171
|
+
function We(e) {
|
|
157
172
|
return Object.values(e).every((e) => e === null || [
|
|
158
173
|
"string",
|
|
159
174
|
"number",
|
|
160
175
|
"boolean"
|
|
161
176
|
].includes(typeof e));
|
|
162
177
|
}
|
|
163
|
-
function
|
|
178
|
+
function Z(e) {
|
|
164
179
|
return e === !0 || String(e).toLowerCase() === "true";
|
|
165
180
|
}
|
|
166
|
-
function
|
|
181
|
+
function Ge(e) {
|
|
167
182
|
if (e instanceof Date) return Number.isNaN(e.getTime()) ? null : e;
|
|
168
183
|
if (typeof e == "number") return new Date(e < 0xe8d4a51000 ? e * 1e3 : e);
|
|
169
|
-
if (typeof e == "string" && /^\d+$/.test(e)) return
|
|
184
|
+
if (typeof e == "string" && /^\d+$/.test(e)) return Ge(Number(e));
|
|
170
185
|
let t = typeof e == "string" ? Date.parse(e) : NaN;
|
|
171
186
|
return Number.isNaN(t) ? null : new Date(t);
|
|
172
187
|
}
|
|
173
|
-
function
|
|
188
|
+
function Q(e, t) {
|
|
174
189
|
let n = Math.round((t - e.getTime()) / 1e3), r = Math.abs(n);
|
|
175
190
|
if (r < 45) return "just now";
|
|
176
191
|
let i = [
|
|
@@ -184,203 +199,223 @@ var M = /*@__PURE__*/ p({
|
|
|
184
199
|
let o = Math.floor(r / a[0]);
|
|
185
200
|
return n >= 0 ? `${o}${a[1]} ago` : `in ${o}${a[1]}`;
|
|
186
201
|
}
|
|
187
|
-
function
|
|
202
|
+
function Ke(e) {
|
|
188
203
|
return Array.isArray(e) ? `[${e.length}]` : typeof e == "object" && e ? "{…}" : typeof e == "string" ? e : String(e);
|
|
189
204
|
}
|
|
190
|
-
function
|
|
191
|
-
return Object.entries(e).map(([e, t]) => `${e}: ${
|
|
205
|
+
function qe(e) {
|
|
206
|
+
return Object.entries(e).map(([e, t]) => `${e}: ${Ke(t)}`).join(", ");
|
|
192
207
|
}
|
|
193
|
-
function
|
|
208
|
+
function Je(e) {
|
|
194
209
|
if (typeof e != "object" || !e) return String(e);
|
|
195
210
|
let t = e, n = t.name ?? t.Name ?? Object.values(t)[0];
|
|
196
211
|
return n === void 0 || typeof n == "object" ? "{…}" : String(n);
|
|
197
212
|
}
|
|
198
|
-
function
|
|
199
|
-
|
|
213
|
+
function Ye(e) {
|
|
214
|
+
j.value = e && "$el" in e ? e.$el : e;
|
|
200
215
|
}
|
|
201
|
-
function
|
|
202
|
-
let e =
|
|
203
|
-
|
|
216
|
+
function $() {
|
|
217
|
+
let e = j.value;
|
|
218
|
+
Me.value = !!e && e.scrollWidth > e.clientWidth + 1;
|
|
204
219
|
}
|
|
205
|
-
function
|
|
206
|
-
|
|
220
|
+
function Xe() {
|
|
221
|
+
N.value = !0, P.value = !0;
|
|
207
222
|
}
|
|
208
|
-
return
|
|
209
|
-
t &&
|
|
210
|
-
}),
|
|
211
|
-
e && !t ?
|
|
212
|
-
}),
|
|
213
|
-
|
|
214
|
-
}),
|
|
215
|
-
|
|
216
|
-
}), (
|
|
223
|
+
return x(j, (e, t) => {
|
|
224
|
+
t && k(t), e && Te(e, $);
|
|
225
|
+
}), x(K, () => ie($)), x(() => W.value === "date", (e, t) => {
|
|
226
|
+
e && !t ? Ce() : !e && t && we();
|
|
227
|
+
}), se(() => {
|
|
228
|
+
W.value === "date" && Ce();
|
|
229
|
+
}), oe(() => {
|
|
230
|
+
W.value === "date" && we(), j.value && k(j.value);
|
|
231
|
+
}), (e, s) => (g(), u("span", {
|
|
217
232
|
class: h(["max-w-full min-w-0 items-center gap-1.5 align-middle", [
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
233
|
+
R.value ? "flex w-full" : "inline-flex",
|
|
234
|
+
R.value === "center" && "justify-center",
|
|
235
|
+
R.value === "right" && "justify-end",
|
|
236
|
+
Pe.value && "font-semibold text-heading"
|
|
222
237
|
]]),
|
|
223
238
|
"data-ac-ds": "",
|
|
224
239
|
"data-testid": "ac-cell-value"
|
|
225
|
-
}, [p.loading ? (
|
|
240
|
+
}, [p.loading ? (g(), c(r, {
|
|
226
241
|
key: 0,
|
|
227
242
|
width: "96px"
|
|
228
|
-
})) : (
|
|
229
|
-
|
|
243
|
+
})) : (g(), u(o, { key: 1 }, [
|
|
244
|
+
Ne.value ? (g(), u("img", {
|
|
230
245
|
key: 0,
|
|
231
|
-
src:
|
|
246
|
+
src: Ne.value,
|
|
232
247
|
alt: "",
|
|
233
248
|
class: "size-4 shrink-0 object-contain"
|
|
234
|
-
}, null, 8,
|
|
235
|
-
|
|
236
|
-
class: "inline-flex
|
|
237
|
-
onClick:
|
|
249
|
+
}, null, 8, fe)) : l("", !0),
|
|
250
|
+
W.value === "empty" ? (g(), u("span", pe, y(p.emptyText), 1)) : W.value === "status" && V.value ? (g(), c(v(B.value), m({ key: 2 }, V.value, {
|
|
251
|
+
class: ["inline-flex focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", [Ve.value, p.plain && "underline-offset-2 hover:underline"]],
|
|
252
|
+
onClick: s[0] ||= C(() => {}, ["stop"])
|
|
238
253
|
}), {
|
|
239
|
-
default:
|
|
240
|
-
|
|
241
|
-
|
|
254
|
+
default: S(() => [p.plain ? (g(), u("span", {
|
|
255
|
+
key: 0,
|
|
256
|
+
class: h(["inline-flex items-center gap-1.5 text-xs font-medium whitespace-nowrap", X.value[1]])
|
|
257
|
+
}, [d("span", me, [U.value ? (g(), u("span", {
|
|
258
|
+
key: 0,
|
|
259
|
+
class: h(["absolute inset-0 rounded-full opacity-60 motion-safe:animate-ping", X.value[0]])
|
|
260
|
+
}, null, 2)) : l("", !0), d("span", { class: h(["relative size-1.5 rounded-full", X.value[0]]) }, null, 2)]), f(y(K.value), 1)], 2)) : (g(), c(t, {
|
|
261
|
+
key: 1,
|
|
262
|
+
label: K.value,
|
|
263
|
+
color: H.value ?? "default",
|
|
242
264
|
variant: "light",
|
|
243
265
|
rounded: p.column?.shape !== "Rectangle",
|
|
244
|
-
dot: ""
|
|
266
|
+
dot: "",
|
|
267
|
+
pulse: U.value
|
|
245
268
|
}, null, 8, [
|
|
246
269
|
"label",
|
|
247
270
|
"color",
|
|
248
|
-
"rounded"
|
|
249
|
-
|
|
271
|
+
"rounded",
|
|
272
|
+
"pulse"
|
|
273
|
+
]))]),
|
|
250
274
|
_: 1
|
|
251
|
-
}, 16)) :
|
|
275
|
+
}, 16, ["class"])) : W.value === "status" ? (g(), c(a, {
|
|
252
276
|
key: 3,
|
|
253
|
-
content:
|
|
277
|
+
content: L.value
|
|
254
278
|
}, {
|
|
255
|
-
default:
|
|
256
|
-
tabindex:
|
|
257
|
-
class: "inline-flex
|
|
258
|
-
}, [
|
|
259
|
-
|
|
260
|
-
|
|
279
|
+
default: S(() => [d("span", {
|
|
280
|
+
tabindex: L.value ? 0 : void 0,
|
|
281
|
+
class: h(["inline-flex focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", Ve.value])
|
|
282
|
+
}, [p.plain ? (g(), u("span", {
|
|
283
|
+
key: 0,
|
|
284
|
+
class: h(["inline-flex items-center gap-1.5 text-xs font-medium whitespace-nowrap", X.value[1]])
|
|
285
|
+
}, [d("span", ge, [U.value ? (g(), u("span", {
|
|
286
|
+
key: 0,
|
|
287
|
+
class: h(["absolute inset-0 rounded-full opacity-60 motion-safe:animate-ping", X.value[0]])
|
|
288
|
+
}, null, 2)) : l("", !0), d("span", { class: h(["relative size-1.5 rounded-full", X.value[0]]) }, null, 2)]), f(y(K.value), 1)], 2)) : (g(), c(t, {
|
|
289
|
+
key: 1,
|
|
290
|
+
label: K.value,
|
|
291
|
+
color: H.value ?? "default",
|
|
261
292
|
variant: "light",
|
|
262
293
|
rounded: p.column?.shape !== "Rectangle",
|
|
263
|
-
dot: ""
|
|
294
|
+
dot: "",
|
|
295
|
+
pulse: U.value
|
|
264
296
|
}, null, 8, [
|
|
265
297
|
"label",
|
|
266
298
|
"color",
|
|
267
|
-
"rounded"
|
|
268
|
-
|
|
299
|
+
"rounded",
|
|
300
|
+
"pulse"
|
|
301
|
+
]))], 10, he)]),
|
|
269
302
|
_: 1
|
|
270
|
-
}, 8, ["content"])) :
|
|
303
|
+
}, 8, ["content"])) : W.value === "boolean" ? (g(), u("span", _e, [Z(F.value) ? (g(), c(b(ue), {
|
|
271
304
|
key: 0,
|
|
272
|
-
class: "size-3.5 text-success",
|
|
305
|
+
class: "size-3.5 text-success-strong",
|
|
273
306
|
"aria-hidden": "true"
|
|
274
|
-
})) : (
|
|
307
|
+
})) : (g(), c(b(de), {
|
|
275
308
|
key: 1,
|
|
276
309
|
class: "size-3.5 text-muted",
|
|
277
310
|
"aria-hidden": "true"
|
|
278
|
-
})),
|
|
311
|
+
})), d("span", { class: h(!Z(F.value) && "text-muted") }, y(K.value), 3)])) : W.value === "date" ? (g(), c(a, {
|
|
279
312
|
key: 5,
|
|
280
|
-
content:
|
|
313
|
+
content: q.value
|
|
281
314
|
}, {
|
|
282
|
-
default:
|
|
283
|
-
class: "font-medium whitespace-nowrap text-primary-
|
|
284
|
-
onClick:
|
|
315
|
+
default: S(() => [V.value ? (g(), c(v(B.value), m({ key: 0 }, V.value, {
|
|
316
|
+
class: "font-medium whitespace-nowrap text-primary-strong tabular-nums underline-offset-2 hover:underline focus-visible:rounded-4 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
317
|
+
onClick: s[1] ||= C(() => {}, ["stop"])
|
|
285
318
|
}), {
|
|
286
|
-
default:
|
|
319
|
+
default: S(() => [d("time", { datetime: G.value?.toISOString() }, y(K.value), 9, ve)]),
|
|
287
320
|
_: 1
|
|
288
|
-
}, 16)) : (
|
|
321
|
+
}, 16)) : (g(), u("time", {
|
|
289
322
|
key: 1,
|
|
290
|
-
datetime:
|
|
291
|
-
tabindex:
|
|
292
|
-
class: h(["whitespace-nowrap tabular-nums focus-visible:rounded-
|
|
293
|
-
},
|
|
323
|
+
datetime: G.value?.toISOString(),
|
|
324
|
+
tabindex: q.value ? 0 : void 0,
|
|
325
|
+
class: h(["whitespace-nowrap tabular-nums focus-visible:rounded-4 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", q.value && "cursor-default decoration-border-dark decoration-dotted underline-offset-4 hover:underline"])
|
|
326
|
+
}, y(K.value), 11, ye))]),
|
|
294
327
|
_: 1
|
|
295
|
-
}, 8, ["content"])) :
|
|
328
|
+
}, 8, ["content"])) : W.value === "labels" || W.value === "array" ? (g(), u("span", {
|
|
296
329
|
key: 6,
|
|
297
|
-
class: "flex w-max min-w-0
|
|
298
|
-
style:
|
|
299
|
-
}, [(
|
|
330
|
+
class: h(["flex w-max min-w-0 items-center gap-1", M.value ? "flex-wrap" : "flex-nowrap"]),
|
|
331
|
+
style: ae({ maxWidth: p.maxWidth })
|
|
332
|
+
}, [(g(!0), u(o, null, ce(Le.value, (e, t) => (g(), c(a, {
|
|
300
333
|
key: `${e.text}-${t}`,
|
|
301
|
-
content: e.text.length > 28 && !
|
|
302
|
-
class: h(!
|
|
334
|
+
content: e.text.length > 28 && !M.value ? e.text : "",
|
|
335
|
+
class: h(!M.value && "max-w-48 min-w-0")
|
|
303
336
|
}, {
|
|
304
|
-
default:
|
|
337
|
+
default: S(() => [e.key ? (g(), c(i, {
|
|
305
338
|
key: 0,
|
|
306
339
|
"key-label": e.key,
|
|
307
|
-
"value-label": e.value
|
|
308
|
-
|
|
340
|
+
"value-label": e.value,
|
|
341
|
+
rounded: ""
|
|
342
|
+
}, null, 8, ["key-label", "value-label"])) : (g(), c(i, {
|
|
309
343
|
key: 1,
|
|
310
|
-
label: e.value
|
|
344
|
+
label: e.value,
|
|
345
|
+
rounded: ""
|
|
311
346
|
}, null, 8, ["label"]))]),
|
|
312
347
|
_: 2
|
|
313
|
-
}, 1032, ["content", "class"]))), 128)),
|
|
348
|
+
}, 1032, ["content", "class"]))), 128)), Y.value > 0 ? (g(), u("button", {
|
|
314
349
|
key: 0,
|
|
315
350
|
type: "button",
|
|
316
|
-
class: "inline-flex h-6 shrink-0 cursor-pointer items-center rounded-
|
|
317
|
-
"aria-expanded":
|
|
318
|
-
"aria-label":
|
|
319
|
-
onClick:
|
|
320
|
-
},
|
|
351
|
+
class: "inline-flex h-6 shrink-0 cursor-pointer items-center rounded-full border border-dashed border-primary/40 px-2 text-xs font-medium whitespace-nowrap text-primary-strong transition-colors duration-200 hover:bg-primary/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
352
|
+
"aria-expanded": M.value,
|
|
353
|
+
"aria-label": M.value ? `Show fewer ${He.value}` : `Show ${Y.value} more ${He.value}`,
|
|
354
|
+
onClick: s[2] ||= C((e) => M.value = !M.value, ["stop"])
|
|
355
|
+
}, y(M.value ? "Show less" : `+${Y.value} more`), 9, be)) : l("", !0)], 6)) : (g(), c(a, {
|
|
321
356
|
key: 7,
|
|
322
|
-
content:
|
|
357
|
+
content: Ie.value,
|
|
323
358
|
class: "min-w-0"
|
|
324
359
|
}, {
|
|
325
|
-
default:
|
|
360
|
+
default: S(() => [V.value ? (g(), c(v(B.value), m({
|
|
326
361
|
key: 0,
|
|
327
|
-
ref:
|
|
328
|
-
},
|
|
329
|
-
class: ["block truncate font-medium text-primary-
|
|
362
|
+
ref: Ye
|
|
363
|
+
}, V.value, {
|
|
364
|
+
class: ["block truncate font-medium text-primary-strong underline-offset-2 hover:underline focus-visible:rounded-4 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", [(p.mono || W.value === "object") && "font-mono text-xs", Be.value && "tabular-nums"]],
|
|
330
365
|
style: { maxWidth: p.maxWidth },
|
|
331
|
-
onClick:
|
|
366
|
+
onClick: s[3] ||= C(() => {}, ["stop"])
|
|
332
367
|
}), {
|
|
333
|
-
default:
|
|
368
|
+
default: S(() => [f(y(K.value), 1)]),
|
|
334
369
|
_: 1
|
|
335
|
-
}, 16, ["class", "style"])) : (
|
|
370
|
+
}, 16, ["class", "style"])) : (g(), u("span", {
|
|
336
371
|
key: 1,
|
|
337
|
-
ref:
|
|
338
|
-
tabindex:
|
|
339
|
-
class: h(["block truncate focus-visible:rounded-
|
|
340
|
-
(p.mono ||
|
|
341
|
-
|
|
342
|
-
|
|
372
|
+
ref: Ye,
|
|
373
|
+
tabindex: Ie.value ? 0 : void 0,
|
|
374
|
+
class: h(["block truncate focus-visible:rounded-4 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", [
|
|
375
|
+
(p.mono || W.value === "object") && "font-mono text-xs",
|
|
376
|
+
Be.value && "tabular-nums",
|
|
377
|
+
W.value === "object" && "text-muted"
|
|
343
378
|
]]),
|
|
344
|
-
style:
|
|
345
|
-
},
|
|
379
|
+
style: ae({ maxWidth: p.maxWidth })
|
|
380
|
+
}, y(K.value), 15, xe))]),
|
|
346
381
|
_: 1
|
|
347
382
|
}, 8, ["content"])),
|
|
348
|
-
|
|
383
|
+
Re.value ? (g(), c(a, {
|
|
349
384
|
key: 8,
|
|
350
385
|
content: "View as JSON"
|
|
351
386
|
}, {
|
|
352
|
-
default:
|
|
387
|
+
default: S(() => [d("button", {
|
|
353
388
|
type: "button",
|
|
354
|
-
class: "inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-
|
|
355
|
-
"aria-label":
|
|
389
|
+
class: "inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-8 text-muted transition-colors duration-200 hover:bg-surface-sunken hover:text-heading focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
390
|
+
"aria-label": I.value ? `View ${I.value} as JSON` : "View as JSON",
|
|
356
391
|
"aria-haspopup": "dialog",
|
|
357
|
-
onClick:
|
|
358
|
-
}, [
|
|
392
|
+
onClick: C(Xe, ["stop"])
|
|
393
|
+
}, [ee(b(le), {
|
|
359
394
|
class: "size-3.5",
|
|
360
395
|
"aria-hidden": "true"
|
|
361
|
-
})], 8,
|
|
396
|
+
})], 8, Se)]),
|
|
362
397
|
_: 1
|
|
363
|
-
})) :
|
|
364
|
-
|
|
398
|
+
})) : l("", !0),
|
|
399
|
+
N.value ? (g(), c(n, {
|
|
365
400
|
key: 9,
|
|
366
|
-
open:
|
|
367
|
-
"onUpdate:open":
|
|
368
|
-
title:
|
|
401
|
+
open: P.value,
|
|
402
|
+
"onUpdate:open": s[4] ||= (e) => P.value = e,
|
|
403
|
+
title: I.value || "Value",
|
|
369
404
|
size: "medium"
|
|
370
405
|
}, {
|
|
371
|
-
default:
|
|
372
|
-
"model-value":
|
|
406
|
+
default: S(() => [ee(b(Ae), {
|
|
407
|
+
"model-value": ze.value,
|
|
373
408
|
language: "json",
|
|
374
409
|
readonly: "",
|
|
375
410
|
copyable: "",
|
|
376
411
|
height: "auto",
|
|
377
412
|
"max-height": "60vh",
|
|
378
|
-
label: `${
|
|
413
|
+
label: `${I.value || "Value"} as JSON`
|
|
379
414
|
}, null, 8, ["model-value", "label"])]),
|
|
380
415
|
_: 1
|
|
381
|
-
}, 8, ["open", "title"])) :
|
|
416
|
+
}, 8, ["open", "title"])) : l("", !0)
|
|
382
417
|
], 64))], 2));
|
|
383
418
|
}
|
|
384
419
|
});
|
|
385
420
|
//#endregion
|
|
386
|
-
export {
|
|
421
|
+
export { A as default };
|
|
@@ -1,24 +1,38 @@
|
|
|
1
1
|
import type { Option } from "./types";
|
|
2
2
|
export interface Props<V> {
|
|
3
|
-
/** The checkboxes to render: `{ value, label, disabled? }`. */
|
|
4
|
-
options
|
|
3
|
+
/** The checkboxes to render: `{ value, label, description?, disabled? }`. A `description` shows in small muted text under the label. Leave it out for one checkbox bound with `v-model:checked`. */
|
|
4
|
+
options?: Option<V>[];
|
|
5
5
|
/** Native `name` shared by every checkbox. */
|
|
6
6
|
name?: string;
|
|
7
7
|
/** Error text under the group. */
|
|
8
8
|
errorMsg?: string;
|
|
9
|
+
/** Single checkbox: text beside the box. Leave it out for a bare box, and pass `aria-label` instead. */
|
|
10
|
+
label?: string;
|
|
11
|
+
/** Single checkbox: small muted text under the label. */
|
|
12
|
+
description?: string;
|
|
13
|
+
/** Single checkbox: can't be changed. */
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/** Single checkbox: shows a dash for "some, but not all" (a select-all box). Ignored while checked. */
|
|
16
|
+
indeterminate?: boolean;
|
|
17
|
+
/** `small` is a 16px box for table cells and card headers; `normal` is 20px. */
|
|
18
|
+
size?: "small" | "normal";
|
|
9
19
|
}
|
|
10
20
|
declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
11
21
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<(Props<T> & {
|
|
22
|
+
/** The checked options' values. Bind with `v-model`. */
|
|
12
23
|
modelValue?: T[];
|
|
24
|
+
/** Single checkbox state, used when `options` is left out. Bind with `v-model:checked`. Old cloud-ui SelectionCheckbox `v-model`. */
|
|
25
|
+
checked?: boolean;
|
|
13
26
|
}) & {
|
|
14
27
|
"onUpdate:modelValue"?: ((value: T[]) => any) | undefined;
|
|
28
|
+
"onUpdate:checked"?: ((value: boolean) => any) | undefined;
|
|
15
29
|
}> & (typeof globalThis extends {
|
|
16
30
|
__VLS_PROPS_FALLBACK: infer P;
|
|
17
31
|
} ? P : {});
|
|
18
32
|
expose: (exposed: {}) => void;
|
|
19
33
|
attrs: any;
|
|
20
34
|
slots: {};
|
|
21
|
-
emit: (event: "update:modelValue", value: T[]) => void;
|
|
35
|
+
emit: ((event: "update:modelValue", value: T[]) => void) & ((event: "update:checked", value: boolean) => void);
|
|
22
36
|
}>) => import("vue").VNode & {
|
|
23
37
|
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
24
38
|
};
|