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