@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
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import e from "../charts/ChartFrame.js";
|
|
2
|
+
import { bindAxisHover as t, useEChart as n } from "../charts/echarts.js";
|
|
3
|
+
import { readNumber as r } from "../charts/shared.js";
|
|
4
|
+
import { LARGE_DATA as i, useXYChart as a } from "../charts/xy.js";
|
|
5
|
+
import { cartesianOption as o, locateRow as s, prepareZoom as c } from "../charts/cartesian.js";
|
|
6
|
+
import { createBlock as l, createElementVNode as u, createSlots as d, defineComponent as f, guardReactiveProps as p, isRef as m, normalizeProps as h, openBlock as g, ref as _, renderSlot as v, unref as y, withCtx as b } from "vue";
|
|
7
|
+
import { ChartArea as x } from "@lucide/vue";
|
|
8
|
+
import { use as S } from "echarts/core";
|
|
9
|
+
import { LineChart as C } from "echarts/charts";
|
|
10
|
+
import { AxisPointerComponent as w, GridComponent as T } from "echarts/components";
|
|
11
|
+
//#region src/lib/components/AcAreaChart.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
+
var E = /*@__PURE__*/ f({
|
|
13
|
+
__name: "AcAreaChart",
|
|
14
|
+
props: {
|
|
15
|
+
stacked: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: !1
|
|
18
|
+
},
|
|
19
|
+
gradient: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: !0
|
|
22
|
+
},
|
|
23
|
+
curve: { default: "monotone" },
|
|
24
|
+
lineWidth: { default: 2 },
|
|
25
|
+
data: {},
|
|
26
|
+
index: {},
|
|
27
|
+
categories: {},
|
|
28
|
+
height: { default: 280 },
|
|
29
|
+
xFormatter: {
|
|
30
|
+
type: Function,
|
|
31
|
+
default: void 0
|
|
32
|
+
},
|
|
33
|
+
yFormatter: {
|
|
34
|
+
type: Function,
|
|
35
|
+
default: void 0
|
|
36
|
+
},
|
|
37
|
+
xLabel: { default: "" },
|
|
38
|
+
yLabel: { default: "" },
|
|
39
|
+
legend: { default: "top" },
|
|
40
|
+
tooltip: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: !0
|
|
43
|
+
},
|
|
44
|
+
gridLines: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: !0
|
|
47
|
+
},
|
|
48
|
+
yDomain: { default: void 0 },
|
|
49
|
+
loading: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: !1
|
|
52
|
+
},
|
|
53
|
+
emptyText: { default: "No data to show yet" },
|
|
54
|
+
title: { default: "" },
|
|
55
|
+
description: { default: "" },
|
|
56
|
+
zoom: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: !1
|
|
59
|
+
},
|
|
60
|
+
renderer: { default: "canvas" },
|
|
61
|
+
animation: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: !0
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
setup(f) {
|
|
67
|
+
S([
|
|
68
|
+
C,
|
|
69
|
+
T,
|
|
70
|
+
w
|
|
71
|
+
]);
|
|
72
|
+
let E = f, D = a(E, { stacked: () => E.stacked }), { hidden: O, width: k, legendItems: A, rowLabel: j, tooltipItems: M, tooltipTotal: N, table: P, ariaLabel: F } = D, I = _(), L = _(null);
|
|
73
|
+
function R(e, t) {
|
|
74
|
+
if (!E.gradient) return e.alpha(t, .2);
|
|
75
|
+
let [n, r] = E.stacked ? [.45, .12] : [.3, .05];
|
|
76
|
+
return {
|
|
77
|
+
type: "linear",
|
|
78
|
+
x: 0,
|
|
79
|
+
y: 0,
|
|
80
|
+
x2: 0,
|
|
81
|
+
y2: 1,
|
|
82
|
+
colorStops: [{
|
|
83
|
+
offset: 0,
|
|
84
|
+
color: e.alpha(t, n)
|
|
85
|
+
}, {
|
|
86
|
+
offset: 1,
|
|
87
|
+
color: e.alpha(t, r)
|
|
88
|
+
}]
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
function z(e) {
|
|
92
|
+
let t = E.data.length > i;
|
|
93
|
+
return D.visibleKeys.value.map((n) => {
|
|
94
|
+
let i = D.colorOf.value[n], a = e.color(i), o = E.data.map((e) => r(e, n));
|
|
95
|
+
return {
|
|
96
|
+
id: n,
|
|
97
|
+
type: "line",
|
|
98
|
+
name: E.categories[n]?.name ?? n,
|
|
99
|
+
data: D.byPosition.value ? o : o.map((e, t) => [D.xNumbers.value[t], e]),
|
|
100
|
+
stack: E.stacked ? "total" : void 0,
|
|
101
|
+
smooth: E.curve === "monotone" && .4,
|
|
102
|
+
smoothMonotone: E.curve === "monotone" ? "x" : void 0,
|
|
103
|
+
step: E.curve === "step" && "middle",
|
|
104
|
+
showSymbol: !1,
|
|
105
|
+
symbol: t ? "none" : "circle",
|
|
106
|
+
symbolSize: 6,
|
|
107
|
+
lineStyle: {
|
|
108
|
+
width: E.lineWidth,
|
|
109
|
+
color: a,
|
|
110
|
+
opacity: +(E.lineWidth > 0)
|
|
111
|
+
},
|
|
112
|
+
itemStyle: {
|
|
113
|
+
color: a,
|
|
114
|
+
borderColor: e.surface,
|
|
115
|
+
borderWidth: 2
|
|
116
|
+
},
|
|
117
|
+
areaStyle: {
|
|
118
|
+
color: R(e, i),
|
|
119
|
+
opacity: 1
|
|
120
|
+
},
|
|
121
|
+
emphasis: {
|
|
122
|
+
scale: 1.4,
|
|
123
|
+
lineStyle: { width: E.lineWidth },
|
|
124
|
+
areaStyle: { color: R(e, i) }
|
|
125
|
+
},
|
|
126
|
+
sampling: t ? "lttb" : void 0,
|
|
127
|
+
progressive: t ? 4e3 : 0,
|
|
128
|
+
connectNulls: !1
|
|
129
|
+
};
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
return n({
|
|
133
|
+
host: I,
|
|
134
|
+
renderer: () => E.renderer,
|
|
135
|
+
prepare: () => c(E),
|
|
136
|
+
option: (e) => ({
|
|
137
|
+
...o(e, E, D, {
|
|
138
|
+
boundaryGap: !1,
|
|
139
|
+
pointer: "line"
|
|
140
|
+
}),
|
|
141
|
+
series: z(e)
|
|
142
|
+
}),
|
|
143
|
+
setup: (e) => t(e, (t) => s(e, t, D), (e, t, n) => {
|
|
144
|
+
let r = E.data[e];
|
|
145
|
+
r && E.tooltip && (L.value = {
|
|
146
|
+
clientX: t,
|
|
147
|
+
clientY: n,
|
|
148
|
+
title: j(e),
|
|
149
|
+
items: M(r),
|
|
150
|
+
total: E.stacked && D.visibleKeys.value.length > 1 ? N(r) : void 0,
|
|
151
|
+
datum: r,
|
|
152
|
+
index: e
|
|
153
|
+
});
|
|
154
|
+
}, () => L.value = null)
|
|
155
|
+
}), (t, n) => (g(), l(e, {
|
|
156
|
+
hidden: y(O),
|
|
157
|
+
"onUpdate:hidden": n[0] ||= (e) => m(O) ? O.value = e : null,
|
|
158
|
+
width: y(k),
|
|
159
|
+
"onUpdate:width": n[1] ||= (e) => m(k) ? k.value = e : null,
|
|
160
|
+
testid: "ac-area-chart",
|
|
161
|
+
height: f.height,
|
|
162
|
+
loading: f.loading,
|
|
163
|
+
empty: !f.data.length,
|
|
164
|
+
"empty-text": f.emptyText,
|
|
165
|
+
"empty-icon": y(x),
|
|
166
|
+
legend: f.legend,
|
|
167
|
+
"legend-items": y(A),
|
|
168
|
+
summary: y(F),
|
|
169
|
+
title: f.title,
|
|
170
|
+
description: f.description,
|
|
171
|
+
table: y(P),
|
|
172
|
+
tip: L.value,
|
|
173
|
+
tooltip: f.tooltip
|
|
174
|
+
}, d({
|
|
175
|
+
default: b(() => [u("div", {
|
|
176
|
+
ref_key: "host",
|
|
177
|
+
ref: I,
|
|
178
|
+
class: "size-full"
|
|
179
|
+
}, null, 512)]),
|
|
180
|
+
_: 2
|
|
181
|
+
}, [t.$slots.tooltip ? {
|
|
182
|
+
name: "tooltip",
|
|
183
|
+
fn: b((e) => [v(t.$slots, "tooltip", h(p(e)))]),
|
|
184
|
+
key: "0"
|
|
185
|
+
} : void 0]), 1032, [
|
|
186
|
+
"hidden",
|
|
187
|
+
"width",
|
|
188
|
+
"height",
|
|
189
|
+
"loading",
|
|
190
|
+
"empty",
|
|
191
|
+
"empty-text",
|
|
192
|
+
"empty-icon",
|
|
193
|
+
"legend",
|
|
194
|
+
"legend-items",
|
|
195
|
+
"summary",
|
|
196
|
+
"title",
|
|
197
|
+
"description",
|
|
198
|
+
"table",
|
|
199
|
+
"tip",
|
|
200
|
+
"tooltip"
|
|
201
|
+
]));
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
//#endregion
|
|
205
|
+
export { E as default };
|
|
@@ -5,10 +5,12 @@ export interface Props {
|
|
|
5
5
|
imgUrl?: string;
|
|
6
6
|
/** Accessible name. Defaults to `name`; pass an empty string when the name is already written next to the avatar. */
|
|
7
7
|
alt?: string;
|
|
8
|
-
/** Diameter: `xs` 20px, `small` 24px, `normal` 32px, `large` 48px. */
|
|
9
|
-
size?: "xs" | "small" | "normal" | "large";
|
|
10
|
-
/** `circle` for people, `square` (
|
|
8
|
+
/** Diameter: `xs` 20px, `small` 24px, `normal` 32px, `medium` 40px, `large` 48px. */
|
|
9
|
+
size?: "xs" | "small" | "normal" | "medium" | "large";
|
|
10
|
+
/** `circle` for people, `square` (4px corners) for organisations, teams and products. Defaults to `square` for an organisation. */
|
|
11
11
|
shape?: "circle" | "square";
|
|
12
|
+
/** `organization` shows cloud-ui's org icon when there's no image: a white building on a primary gradient. */
|
|
13
|
+
kind?: "person" | "organization";
|
|
12
14
|
/** Adds a presence dot in the bottom-right corner. */
|
|
13
15
|
status?: "online" | "away" | "busy" | "offline";
|
|
14
16
|
/** Shows `+N` instead of a picture, as the last item of an avatar group. */
|
|
@@ -16,11 +18,12 @@ export interface Props {
|
|
|
16
18
|
}
|
|
17
19
|
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
18
20
|
name: string;
|
|
19
|
-
size: "xs" | "small" | "normal" | "large";
|
|
21
|
+
size: "xs" | "small" | "normal" | "medium" | "large";
|
|
20
22
|
status: "online" | "away" | "busy" | "offline";
|
|
21
23
|
alt: string;
|
|
22
24
|
imgUrl: string;
|
|
23
25
|
shape: "circle" | "square";
|
|
26
|
+
kind: "person" | "organization";
|
|
24
27
|
overflowCount: number;
|
|
25
28
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
29
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,57 +1,64 @@
|
|
|
1
|
-
import { computed as e,
|
|
1
|
+
import { computed as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, defineComponent as a, normalizeClass as o, openBlock as s, ref as c, toDisplayString as l, unref as u, watch as d } from "vue";
|
|
2
|
+
import { Building as f } from "@lucide/vue";
|
|
2
3
|
//#region src/lib/components/AcAvatar.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
-
var
|
|
4
|
+
var p = [
|
|
4
5
|
"role",
|
|
5
6
|
"aria-label",
|
|
6
7
|
"aria-hidden"
|
|
7
|
-
],
|
|
8
|
+
], m = ["src"], h = {
|
|
8
9
|
key: 1,
|
|
9
10
|
class: "tabular-nums",
|
|
10
11
|
"aria-hidden": "true"
|
|
11
|
-
},
|
|
12
|
-
key:
|
|
12
|
+
}, g = {
|
|
13
|
+
key: 3,
|
|
13
14
|
"aria-hidden": "true"
|
|
14
|
-
},
|
|
15
|
+
}, _ = /*@__PURE__*/ a({
|
|
15
16
|
__name: "AcAvatar",
|
|
16
17
|
props: {
|
|
17
18
|
name: { default: "" },
|
|
18
19
|
imgUrl: { default: "" },
|
|
19
20
|
alt: { default: void 0 },
|
|
20
21
|
size: { default: "normal" },
|
|
21
|
-
shape: { default:
|
|
22
|
+
shape: { default: void 0 },
|
|
23
|
+
kind: { default: "person" },
|
|
22
24
|
status: { default: void 0 },
|
|
23
25
|
overflowCount: { default: 0 }
|
|
24
26
|
},
|
|
25
|
-
setup(
|
|
26
|
-
let
|
|
27
|
+
setup(a) {
|
|
28
|
+
let _ = a, v = {
|
|
27
29
|
xs: {
|
|
28
30
|
box: "size-5 text-xm",
|
|
29
31
|
dot: "size-1.5",
|
|
30
|
-
|
|
32
|
+
icon: "size-2.5"
|
|
31
33
|
},
|
|
32
34
|
small: {
|
|
33
35
|
box: "size-6 text-sm",
|
|
34
36
|
dot: "size-2",
|
|
35
|
-
|
|
37
|
+
icon: "size-3"
|
|
36
38
|
},
|
|
37
39
|
normal: {
|
|
38
40
|
box: "size-8 text-xs",
|
|
39
41
|
dot: "size-2.5",
|
|
40
|
-
|
|
42
|
+
icon: "size-4"
|
|
43
|
+
},
|
|
44
|
+
medium: {
|
|
45
|
+
box: "size-10 text-base",
|
|
46
|
+
dot: "size-2.5",
|
|
47
|
+
icon: "size-5"
|
|
41
48
|
},
|
|
42
49
|
large: {
|
|
43
50
|
box: "size-12 text-xl",
|
|
44
51
|
dot: "size-3",
|
|
45
|
-
|
|
52
|
+
icon: "size-6"
|
|
46
53
|
}
|
|
47
|
-
},
|
|
48
|
-
"bg-primary
|
|
49
|
-
"bg-
|
|
50
|
-
"bg-
|
|
51
|
-
"bg-
|
|
52
|
-
"bg-
|
|
53
|
-
"bg-
|
|
54
|
-
],
|
|
54
|
+
}, y = [
|
|
55
|
+
"bg-primary/15 text-primary-strong",
|
|
56
|
+
"bg-info/15 text-info-strong",
|
|
57
|
+
"bg-pending/15 text-pending-strong",
|
|
58
|
+
"bg-warning/20 text-warning-strong",
|
|
59
|
+
"bg-danger/15 text-danger-strong",
|
|
60
|
+
"bg-success/15 text-success-strong"
|
|
61
|
+
], b = {
|
|
55
62
|
online: {
|
|
56
63
|
dot: "bg-success",
|
|
57
64
|
label: "Online"
|
|
@@ -65,52 +72,50 @@ var u = [
|
|
|
65
72
|
label: "Busy"
|
|
66
73
|
},
|
|
67
74
|
offline: {
|
|
68
|
-
dot: "bg-
|
|
75
|
+
dot: "bg-muted",
|
|
69
76
|
label: "Offline"
|
|
70
77
|
}
|
|
71
|
-
},
|
|
72
|
-
let e =
|
|
78
|
+
}, x = c(!1), S = e(() => !!_.imgUrl && !x.value && !_.overflowCount), C = e(() => _.kind === "organization" && !_.overflowCount), w = e(() => {
|
|
79
|
+
let e = _.name.split("@")[0].split(/[\s._-]+/).filter(Boolean);
|
|
73
80
|
return e.length ? (e.length > 1 ? e[0][0] + e[1][0] : e[0].slice(0, 1)).toUpperCase() : "";
|
|
74
|
-
}),
|
|
75
|
-
if (
|
|
81
|
+
}), T = e(() => {
|
|
82
|
+
if (C.value) return "bg-linear-to-br from-primary/80 to-primary text-white";
|
|
83
|
+
if (_.overflowCount || !_.name) return "bg-surface-sunken text-muted";
|
|
76
84
|
let e = 0;
|
|
77
|
-
for (let t of
|
|
78
|
-
return
|
|
79
|
-
}),
|
|
80
|
-
if (
|
|
81
|
-
let e =
|
|
82
|
-
return e ?
|
|
83
|
-
}),
|
|
84
|
-
return
|
|
85
|
-
class:
|
|
86
|
-
role:
|
|
87
|
-
"aria-label":
|
|
88
|
-
"aria-hidden": !
|
|
85
|
+
for (let t of _.name) e = e * 31 + t.charCodeAt(0) >>> 0;
|
|
86
|
+
return y[e % y.length];
|
|
87
|
+
}), E = e(() => {
|
|
88
|
+
if (_.overflowCount) return _.alt ?? `${_.overflowCount} more`;
|
|
89
|
+
let e = _.alt ?? _.name;
|
|
90
|
+
return e ? _.status ? `${e} (${b[_.status].label})` : e : "";
|
|
91
|
+
}), D = e(() => (_.shape ?? (_.kind === "organization" ? "square" : "circle")) === "square"), O = e(() => D.value ? "rounded-4" : "rounded-full");
|
|
92
|
+
return d(() => _.imgUrl, () => x.value = !1), (e, c) => (s(), r("span", {
|
|
93
|
+
class: o(["relative inline-flex shrink-0 bg-surface align-middle", [v[a.size].box, O.value]]),
|
|
94
|
+
role: E.value ? "img" : void 0,
|
|
95
|
+
"aria-label": E.value || void 0,
|
|
96
|
+
"aria-hidden": !E.value || void 0,
|
|
89
97
|
"data-ac-ds": "",
|
|
90
98
|
"data-testid": "ac-avatar"
|
|
91
|
-
}, [
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
"aria-hidden": "true"
|
|
111
|
-
}, null, 2)) : t("", !0)
|
|
112
|
-
], 10, u));
|
|
99
|
+
}, [i("span", { class: o(["inline-flex size-full items-center justify-center overflow-hidden font-semibold tracking-[-0.01em] select-none", [O.value, S.value ? "bg-surface-sunken" : T.value]]) }, [S.value ? (s(), r("img", {
|
|
100
|
+
key: 0,
|
|
101
|
+
src: a.imgUrl,
|
|
102
|
+
alt: "",
|
|
103
|
+
class: "size-full object-cover",
|
|
104
|
+
onError: c[0] ||= (e) => x.value = !0
|
|
105
|
+
}, null, 40, m)) : a.overflowCount ? (s(), r("span", h, "+" + l(a.overflowCount), 1)) : C.value ? (s(), t(u(f), {
|
|
106
|
+
key: 2,
|
|
107
|
+
class: o(v[a.size].icon),
|
|
108
|
+
"aria-hidden": "true"
|
|
109
|
+
}, null, 8, ["class"])) : (s(), r("span", g, l(w.value), 1))], 2), a.status && !a.overflowCount ? (s(), r("span", {
|
|
110
|
+
key: 0,
|
|
111
|
+
class: o(["absolute right-0 bottom-0 rounded-full ring-2 ring-surface", [
|
|
112
|
+
v[a.size].dot,
|
|
113
|
+
b[a.status].dot,
|
|
114
|
+
D.value && "translate-x-1/4 translate-y-1/4"
|
|
115
|
+
]]),
|
|
116
|
+
"aria-hidden": "true"
|
|
117
|
+
}, null, 2)) : n("", !0)], 10, p));
|
|
113
118
|
}
|
|
114
119
|
});
|
|
115
120
|
//#endregion
|
|
116
|
-
export {
|
|
121
|
+
export { _ as default };
|
|
@@ -1,15 +1,24 @@
|
|
|
1
|
+
import type { Component } from "vue";
|
|
1
2
|
import type { Tone, Variant } from "./types";
|
|
2
3
|
export interface Props {
|
|
3
|
-
/** Text of the badge. The default slot overrides it. */
|
|
4
|
+
/** Text of the badge. The default slot overrides it. Defaults to "Default", or the humanized `status`. */
|
|
4
5
|
label?: string;
|
|
5
|
-
/** Status or brand colour. Always pair a status colour with a word. */
|
|
6
|
-
color?: Tone | "default" | "secondary" | "dark";
|
|
7
|
-
/** `solid` fill, `light` tint (
|
|
6
|
+
/** Status or brand colour. Always pair a status colour with a word. Defaults to `default`, or the colour of `status`. */
|
|
7
|
+
color?: Tone | "pending" | "default" | "secondary" | "dark";
|
|
8
|
+
/** `solid` fill, `light` tint (10% fill in the colour's own text, amber text on warning) or `outlined`. Defaults to `solid`, or `light` with `status`. */
|
|
8
9
|
variant?: Variant;
|
|
9
|
-
/** Pill shape
|
|
10
|
+
/** Pill shape, the default. Set `false` for 6px corners. */
|
|
10
11
|
rounded?: boolean;
|
|
11
|
-
/** Shows
|
|
12
|
+
/** Shows a 6px status dot before the label. On by default with `status`. */
|
|
12
13
|
dot?: boolean;
|
|
14
|
+
/** Raw state from the API, e.g. `RUNNING`, `pending_provisioning` or `NotReady`. Sets the colour, a sentence-case label, the dot and the `light` variant; any of those props you pass wins. Stopped and paused states get a hollow grey dot; in-progress ones a spinner on a primary tint. cloud-ui's StatusBadge `state`. */
|
|
15
|
+
status?: string | null;
|
|
16
|
+
/** Enum prefix stripped from `status` before matching, e.g. `VPC_STATE` shows `VPC_STATE_AVAILABLE` as "Available". */
|
|
17
|
+
prefix?: string;
|
|
18
|
+
/** Shows a 12px spinner instead of the dot to show work in progress; with `status` the badge also turns primary. On by default for transient states such as Provisioning or Deleting. cloud-ui's `transient`. */
|
|
19
|
+
pulse?: boolean;
|
|
20
|
+
/** A Lucide icon shown at 12px before the label, in the text colour, e.g. `ShieldCheck` on "4 Active Policies". Takes the place of the dot; the in-progress spinner still wins. */
|
|
21
|
+
icon?: Component;
|
|
13
22
|
}
|
|
14
23
|
type __VLS_Slots = {
|
|
15
24
|
/** Badge content. Replaces `label`. */
|
|
@@ -18,9 +27,13 @@ type __VLS_Slots = {
|
|
|
18
27
|
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
19
28
|
variant: Variant;
|
|
20
29
|
label: string;
|
|
21
|
-
|
|
30
|
+
icon: Component;
|
|
31
|
+
color: Tone | "pending" | "default" | "secondary" | "dark";
|
|
32
|
+
status: string | null;
|
|
22
33
|
rounded: boolean;
|
|
23
34
|
dot: boolean;
|
|
35
|
+
prefix: string;
|
|
36
|
+
pulse: boolean;
|
|
24
37
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
38
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
26
39
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,88 +1,111 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { statusMeta as e } from "./status.js";
|
|
2
|
+
import { computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createTextVNode as a, defineComponent as o, normalizeClass as s, openBlock as c, renderSlot as l, resolveDynamicComponent as u, toDisplayString as d, unref as f } from "vue";
|
|
3
|
+
import { LoaderCircle as p } from "@lucide/vue";
|
|
2
4
|
//#region src/lib/components/AcBadge.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
-
var
|
|
5
|
+
var m = /*@__PURE__*/ o({
|
|
4
6
|
__name: "AcBadge",
|
|
5
7
|
props: {
|
|
6
|
-
label: { default:
|
|
7
|
-
color: { default:
|
|
8
|
-
variant: { default:
|
|
8
|
+
label: { default: void 0 },
|
|
9
|
+
color: { default: void 0 },
|
|
10
|
+
variant: { default: void 0 },
|
|
9
11
|
rounded: {
|
|
10
12
|
type: Boolean,
|
|
11
|
-
default: !
|
|
13
|
+
default: !0
|
|
12
14
|
},
|
|
13
15
|
dot: {
|
|
14
16
|
type: Boolean,
|
|
15
|
-
default:
|
|
16
|
-
}
|
|
17
|
+
default: void 0
|
|
18
|
+
},
|
|
19
|
+
status: { default: void 0 },
|
|
20
|
+
prefix: { default: "" },
|
|
21
|
+
pulse: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: void 0
|
|
24
|
+
},
|
|
25
|
+
icon: { default: void 0 }
|
|
17
26
|
},
|
|
18
|
-
setup(
|
|
19
|
-
let
|
|
27
|
+
setup(o) {
|
|
28
|
+
let m = o, h = {
|
|
20
29
|
primary: [
|
|
21
30
|
"bg-primary text-white",
|
|
22
|
-
"bg-primary
|
|
23
|
-
"ring-primary
|
|
24
|
-
"bg-primary
|
|
31
|
+
"bg-primary/10 text-primary-strong",
|
|
32
|
+
"ring-primary/40 text-primary-strong",
|
|
33
|
+
"bg-primary"
|
|
25
34
|
],
|
|
26
35
|
secondary: [
|
|
27
36
|
"bg-secondary text-white",
|
|
28
|
-
"bg-secondary-95 text-secondary-
|
|
37
|
+
"bg-secondary-95 text-secondary-20",
|
|
29
38
|
"ring-secondary-70 text-secondary",
|
|
30
39
|
"bg-secondary-40"
|
|
31
40
|
],
|
|
32
41
|
info: [
|
|
33
42
|
"bg-info text-white",
|
|
34
|
-
"bg-
|
|
35
|
-
"ring-
|
|
36
|
-
"bg-
|
|
43
|
+
"bg-info/10 text-info-strong",
|
|
44
|
+
"ring-info/40 text-info-strong",
|
|
45
|
+
"bg-info"
|
|
37
46
|
],
|
|
38
47
|
success: [
|
|
39
48
|
"bg-success text-white",
|
|
40
|
-
"bg-
|
|
41
|
-
"ring-
|
|
42
|
-
"bg-
|
|
49
|
+
"bg-success/10 text-success-strong",
|
|
50
|
+
"ring-success/40 text-success-strong",
|
|
51
|
+
"bg-success"
|
|
43
52
|
],
|
|
44
53
|
warning: [
|
|
45
54
|
"bg-warning text-on-warning",
|
|
46
|
-
"bg-
|
|
47
|
-
"ring-
|
|
48
|
-
"bg-
|
|
55
|
+
"bg-warning/10 text-warning-strong",
|
|
56
|
+
"ring-warning/45 text-warning-strong",
|
|
57
|
+
"bg-warning"
|
|
49
58
|
],
|
|
50
59
|
danger: [
|
|
51
60
|
"bg-danger text-white",
|
|
52
|
-
"bg-
|
|
53
|
-
"ring-
|
|
54
|
-
"bg-
|
|
61
|
+
"bg-danger/10 text-danger-strong",
|
|
62
|
+
"ring-danger/40 text-danger-strong",
|
|
63
|
+
"bg-danger"
|
|
64
|
+
],
|
|
65
|
+
pending: [
|
|
66
|
+
"bg-pending text-white",
|
|
67
|
+
"bg-pending/10 text-pending-strong",
|
|
68
|
+
"ring-pending/40 text-pending-strong",
|
|
69
|
+
"bg-pending"
|
|
55
70
|
],
|
|
56
71
|
dark: [
|
|
57
|
-
"bg-
|
|
58
|
-
"bg-
|
|
59
|
-
"ring-
|
|
60
|
-
"bg-
|
|
72
|
+
"bg-slate-20 text-surface",
|
|
73
|
+
"bg-slate-20/10 text-heading",
|
|
74
|
+
"ring-slate-20/40 text-heading",
|
|
75
|
+
"bg-slate-20"
|
|
61
76
|
],
|
|
62
77
|
default: [
|
|
63
78
|
"bg-surface-sunken text-heading",
|
|
64
|
-
"bg-surface-
|
|
65
|
-
"ring-border
|
|
66
|
-
"bg-
|
|
79
|
+
"bg-surface-sunken/40 text-muted",
|
|
80
|
+
"ring-border text-muted",
|
|
81
|
+
"bg-muted"
|
|
67
82
|
]
|
|
68
|
-
},
|
|
69
|
-
let [e, t, n] =
|
|
83
|
+
}, g = t(() => m.status === void 0 ? null : e(m.status, { prefix: m.prefix })), _ = t(() => m.pulse ?? g.value?.transient ?? !1), v = t(() => m.color ?? (g.value && _.value ? "primary" : g.value?.tone ?? "default")), y = t(() => m.variant ?? (g.value ? "light" : "solid")), b = t(() => m.label || g.value?.label || "Default"), x = t(() => m.dot ?? (!!g.value || _.value)), S = t(() => !!g.value?.hollow && !m.color), C = t(() => {
|
|
84
|
+
let [e, t, n] = h[v.value];
|
|
70
85
|
return {
|
|
71
86
|
solid: e,
|
|
72
|
-
light:
|
|
87
|
+
light: t,
|
|
73
88
|
outlined: `bg-surface ring-1 ring-inset ${n}`
|
|
74
|
-
}[
|
|
75
|
-
}),
|
|
76
|
-
return (e,
|
|
77
|
-
class:
|
|
89
|
+
}[y.value];
|
|
90
|
+
}), w = t(() => S.value ? "border border-muted bg-transparent" : y.value === "solid" && v.value !== "default" ? "bg-surface" : h[v.value][3]);
|
|
91
|
+
return (e, t) => (c(), i("span", {
|
|
92
|
+
class: s(["inline-flex h-5 items-center gap-1.5 px-2.5 text-xs leading-none font-medium whitespace-nowrap tabular-nums", [C.value, o.rounded ? "rounded-full" : "rounded-6"]]),
|
|
78
93
|
"data-ac-ds": "",
|
|
79
94
|
"data-testid": "ac-badge"
|
|
80
|
-
}, [
|
|
95
|
+
}, [_.value && x.value ? (c(), n(f(p), {
|
|
81
96
|
key: 0,
|
|
82
|
-
class:
|
|
97
|
+
class: "size-3 shrink-0 motion-safe:animate-spin",
|
|
98
|
+
"aria-hidden": "true"
|
|
99
|
+
})) : o.icon ? (c(), n(u(o.icon), {
|
|
100
|
+
key: 1,
|
|
101
|
+
class: "size-3 shrink-0",
|
|
102
|
+
"aria-hidden": "true"
|
|
103
|
+
})) : x.value ? (c(), i("span", {
|
|
104
|
+
key: 2,
|
|
105
|
+
class: s(["size-1.5 shrink-0 rounded-full", w.value]),
|
|
83
106
|
"aria-hidden": "true"
|
|
84
|
-
}, null, 2)) :
|
|
107
|
+
}, null, 2)) : r("", !0), l(e.$slots, "default", {}, () => [a(d(b.value), 1)])], 2));
|
|
85
108
|
}
|
|
86
109
|
});
|
|
87
110
|
//#endregion
|
|
88
|
-
export {
|
|
111
|
+
export { m as default };
|
|
@@ -2,7 +2,7 @@ import type { Component } from "vue";
|
|
|
2
2
|
export interface Props {
|
|
3
3
|
/** Colour of the strip. `danger` and `warning` are announced to screen readers as alerts. */
|
|
4
4
|
color?: "info" | "warning" | "danger" | "primary" | "neutral";
|
|
5
|
-
/** `subtle`
|
|
5
|
+
/** `subtle` 10% tint with a hairline and AA-contrast text, or `solid` full-colour fill for app-wide announcements. */
|
|
6
6
|
variant?: "subtle" | "solid";
|
|
7
7
|
/** Bold lead-in before the message, e.g. "Scheduled maintenance". */
|
|
8
8
|
title?: string;
|