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