@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,31 +1,31 @@
|
|
|
1
|
-
import { Fragment as e, computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, createVNode as o, defineComponent as s, mergeModels as c, nextTick as
|
|
1
|
+
import { Fragment as e, computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, createVNode as o, defineComponent as s, mergeModels as c, nextTick as l, normalizeClass as u, openBlock as d, ref as f, renderList as ee, toDisplayString as p, unref as m, useId as h, useModel as g, withModifiers as _ } from "vue";
|
|
2
2
|
import { CircleAlert as v, FileText as y, Upload as b, X as x } from "@lucide/vue";
|
|
3
3
|
//#region src/lib/components/AcFileUpload.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var
|
|
4
|
+
var te = ["id"], ne = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "text-danger",
|
|
7
7
|
"aria-hidden": "true"
|
|
8
|
-
},
|
|
8
|
+
}, re = ["id"], S = [
|
|
9
9
|
"id",
|
|
10
10
|
"name",
|
|
11
11
|
"accept",
|
|
12
12
|
"multiple",
|
|
13
13
|
"disabled"
|
|
14
|
-
],
|
|
14
|
+
], ie = [
|
|
15
15
|
"disabled",
|
|
16
16
|
"aria-describedby",
|
|
17
17
|
"aria-label"
|
|
18
|
-
],
|
|
18
|
+
], ae = ["title"], C = ["aria-label"], oe = { class: "pointer-events-none text-base text-heading" }, w = { class: "font-medium" }, T = {
|
|
19
19
|
key: 0,
|
|
20
20
|
class: "text-muted"
|
|
21
|
-
},
|
|
21
|
+
}, E = [
|
|
22
22
|
"disabled",
|
|
23
23
|
"aria-describedby",
|
|
24
24
|
"aria-label"
|
|
25
|
-
],
|
|
25
|
+
], D = {
|
|
26
26
|
key: 0,
|
|
27
27
|
class: "pointer-events-none -mt-1 text-xs text-muted"
|
|
28
|
-
},
|
|
28
|
+
}, O = ["id"], se = ["aria-label"], ce = ["title"], le = { class: "shrink-0 text-xs text-muted tabular-nums" }, ue = [
|
|
29
29
|
"aria-label",
|
|
30
30
|
"disabled",
|
|
31
31
|
"onClick"
|
|
@@ -68,10 +68,10 @@ var S = ["id"], te = {
|
|
|
68
68
|
"reject"
|
|
69
69
|
], ["update:modelValue"]),
|
|
70
70
|
setup(s, { expose: c, emit: k }) {
|
|
71
|
-
let A = s, j = g(s, "modelValue"), M = k, N = h(), P =
|
|
71
|
+
let A = s, j = g(s, "modelValue"), M = k, N = h(), P = f(null), F = f(null), I = f(null), L = f(0), R = f([]), z = f(""), B = t(() => L.value > 0), V = t(() => A.accept.split(",").map((e) => e.trim().toLowerCase()).filter(Boolean)), fe = t(() => {
|
|
72
72
|
let e = [];
|
|
73
73
|
return V.value.length && e.push(V.value.join(", ")), A.maxSize && e.push(`up to ${q(A.maxSize)}`), e.join(" · ");
|
|
74
|
-
}), H = t(() => A.description || fe.value), U = t(() => R.value.map((e) => e.message).join(" ")), W = t(() => A.errorMsg || U.value), G = t(() =>
|
|
74
|
+
}), H = t(() => A.description || fe.value), U = t(() => R.value.map((e) => e.message).join(" ")), W = t(() => A.errorMsg || U.value), G = t(() => [A.hint && `${N}-hint`, W.value && `${N}-msg`].filter(Boolean).join(" ") || void 0), K = t(() => j.value.length ? j.value.length === 1 ? j.value[0].name : `${j.value.length} files` : "");
|
|
75
75
|
function q(e) {
|
|
76
76
|
if (e < 1024) return `${e} B`;
|
|
77
77
|
let t = [
|
|
@@ -131,7 +131,7 @@ var S = ["id"], te = {
|
|
|
131
131
|
async function ge(e) {
|
|
132
132
|
let t = j.value[e];
|
|
133
133
|
if (!t || A.disabled) return;
|
|
134
|
-
j.value = j.value.filter((t, n) => n !== e), R.value = [], M("remove", t), z.value = `${t.name} removed.`, await
|
|
134
|
+
j.value = j.value.filter((t, n) => n !== e), R.value = [], M("remove", t), z.value = `${t.name} removed.`, await l();
|
|
135
135
|
let n = I.value?.querySelectorAll("button");
|
|
136
136
|
(n?.[Math.min(e, n.length - 1)] ?? F.value)?.focus();
|
|
137
137
|
}
|
|
@@ -139,16 +139,21 @@ var S = ["id"], te = {
|
|
|
139
139
|
let e = [...j.value];
|
|
140
140
|
j.value = [], R.value = [], e.forEach((e) => M("remove", e)), z.value = "File removed.", F.value?.focus();
|
|
141
141
|
}
|
|
142
|
-
return c({ open: Y }), (t, c) => (
|
|
143
|
-
class:
|
|
142
|
+
return c({ open: Y }), (t, c) => (d(), r("div", {
|
|
143
|
+
class: u(["w-full", s.disabled && "opacity-50"]),
|
|
144
144
|
"data-ac-ds": "",
|
|
145
145
|
"data-testid": "ac-file-upload"
|
|
146
146
|
}, [
|
|
147
|
-
s.label ? (
|
|
147
|
+
s.label ? (d(), r("p", {
|
|
148
148
|
key: 0,
|
|
149
149
|
id: `${m(N)}-label`,
|
|
150
|
-
class: "mb-1
|
|
151
|
-
}, [
|
|
150
|
+
class: "mb-2 flex items-center gap-1 text-base font-medium text-heading"
|
|
151
|
+
}, [i("span", null, p(s.label), 1), s.required ? (d(), r("span", ne, "*")) : n("", !0)], 8, te)) : n("", !0),
|
|
152
|
+
s.hint ? (d(), r("p", {
|
|
153
|
+
key: 1,
|
|
154
|
+
id: `${m(N)}-hint`,
|
|
155
|
+
class: "mb-2 text-base text-muted"
|
|
156
|
+
}, p(s.hint), 9, re)) : n("", !0),
|
|
152
157
|
i("input", {
|
|
153
158
|
id: `${m(N)}-input`,
|
|
154
159
|
ref_key: "input",
|
|
@@ -162,10 +167,10 @@ var S = ["id"], te = {
|
|
|
162
167
|
multiple: s.multiple,
|
|
163
168
|
disabled: s.disabled,
|
|
164
169
|
onChange: he
|
|
165
|
-
}, null, 40,
|
|
166
|
-
s.small ? (
|
|
167
|
-
key:
|
|
168
|
-
class:
|
|
170
|
+
}, null, 40, S),
|
|
171
|
+
s.small ? (d(), r("div", {
|
|
172
|
+
key: 2,
|
|
173
|
+
class: u(["flex h-10 w-full items-center rounded-10 border transition-[border-color,box-shadow,background-color] duration-200", [s.disabled ? "cursor-not-allowed bg-surface-muted" : "bg-background", W.value ? "border-danger/60" : B.value ? "focus-ring" : ["border-border focus-within:focus-ring", !s.disabled && "hover:border-accent-active"]]]),
|
|
169
174
|
onDragenter: X,
|
|
170
175
|
onDragover: Z,
|
|
171
176
|
onDragleave: Q,
|
|
@@ -175,32 +180,32 @@ var S = ["id"], te = {
|
|
|
175
180
|
ref_key: "browseButton",
|
|
176
181
|
ref: F,
|
|
177
182
|
type: "button",
|
|
178
|
-
class: "ml-1 inline-flex h-
|
|
183
|
+
class: "ml-1 inline-flex h-8 shrink-0 cursor-pointer items-center gap-1.5 rounded-8 border border-border bg-surface px-3 text-base font-medium text-heading transition-colors duration-200 hover:bg-surface-sunken/70 focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none disabled:cursor-not-allowed disabled:hover:bg-surface",
|
|
179
184
|
disabled: s.disabled,
|
|
180
185
|
"aria-describedby": G.value,
|
|
181
186
|
"aria-label": s.label ? `${s.multiple ? "Choose files" : "Choose file"} for ${s.label}` : void 0,
|
|
182
187
|
onClick: Y
|
|
183
188
|
}, [o(m(b), {
|
|
184
|
-
class: "size-
|
|
189
|
+
class: "size-4 text-muted",
|
|
185
190
|
"aria-hidden": "true"
|
|
186
|
-
}), a(" " + p(s.multiple ? "Choose files" : "Choose file"), 1)], 8,
|
|
191
|
+
}), a(" " + p(s.multiple ? "Choose files" : "Choose file"), 1)], 8, ie),
|
|
187
192
|
i("span", {
|
|
188
|
-
class:
|
|
193
|
+
class: u(["min-w-0 flex-1 truncate px-3 text-base", K.value ? "text-heading" : "text-muted/80"]),
|
|
189
194
|
title: j.value.map((e) => e.name).join(", ")
|
|
190
|
-
}, p(K.value || (s.multiple ? "No files chosen" : "No file chosen")), 11,
|
|
191
|
-
j.value.length && !s.disabled ? (
|
|
195
|
+
}, p(K.value || (s.multiple ? "No files chosen" : "No file chosen")), 11, ae),
|
|
196
|
+
j.value.length && !s.disabled ? (d(), r("button", {
|
|
192
197
|
key: 0,
|
|
193
198
|
type: "button",
|
|
194
|
-
class: "mr-1.5 inline-flex size-
|
|
199
|
+
class: "mr-1.5 inline-flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-8 text-muted transition-colors hover:bg-surface-sunken hover:text-heading focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",
|
|
195
200
|
"aria-label": j.value.length === 1 ? `Remove ${j.value[0].name}` : "Remove all files",
|
|
196
201
|
onClick: _e
|
|
197
202
|
}, [o(m(x), {
|
|
198
|
-
class: "size-
|
|
203
|
+
class: "size-4",
|
|
199
204
|
"aria-hidden": "true"
|
|
200
|
-
})], 8,
|
|
201
|
-
], 34)) : (
|
|
202
|
-
key:
|
|
203
|
-
class:
|
|
205
|
+
})], 8, C)) : n("", !0)
|
|
206
|
+
], 34)) : (d(), r("div", {
|
|
207
|
+
key: 3,
|
|
208
|
+
class: u(["flex flex-col items-center justify-center gap-3 rounded-10 border-2 border-dashed px-6 py-7 text-center transition-colors duration-200", [s.disabled ? "cursor-not-allowed border-border bg-surface-muted" : "cursor-pointer", !s.disabled && (B.value ? "border-primary bg-primary/5" : W.value ? "border-danger/50 bg-danger/5" : "border-border bg-surface hover:border-primary/50 hover:bg-primary/3")]]),
|
|
204
209
|
onClick: _(Y, ["self"]),
|
|
205
210
|
onDragenter: X,
|
|
206
211
|
onDragover: Z,
|
|
@@ -208,43 +213,40 @@ var S = ["id"], te = {
|
|
|
208
213
|
onDrop: $
|
|
209
214
|
}, [
|
|
210
215
|
i("span", {
|
|
211
|
-
class:
|
|
216
|
+
class: u(["pointer-events-none inline-flex size-10 items-center justify-center rounded-10 transition-colors duration-200", B.value ? "bg-primary/10 text-primary-strong" : "bg-surface-sunken text-muted"]),
|
|
212
217
|
"aria-hidden": "true"
|
|
213
|
-
}, [o(m(b), { class: "size-
|
|
214
|
-
i("p",
|
|
218
|
+
}, [o(m(b), { class: "size-5" })], 2),
|
|
219
|
+
i("p", oe, [i("span", w, p(B.value ? "Drop to upload" : s.multiple ? "Drag and drop files here" : "Drag and drop a file here"), 1), B.value ? n("", !0) : (d(), r("span", T, " or"))]),
|
|
215
220
|
i("button", {
|
|
216
221
|
ref_key: "browseButton",
|
|
217
222
|
ref: F,
|
|
218
223
|
type: "button",
|
|
219
|
-
class: "inline-flex h-8 cursor-pointer items-center gap-2 rounded-
|
|
224
|
+
class: "inline-flex h-8 cursor-pointer items-center gap-2 rounded-10 border border-border bg-surface px-3 text-base font-medium text-heading transition-[color,background-color,border-color,box-shadow,transform] duration-200 hover:bg-surface-sunken/70 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface focus-visible:outline-none active:translate-y-px disabled:cursor-not-allowed disabled:hover:bg-surface",
|
|
220
225
|
disabled: s.disabled,
|
|
221
226
|
"aria-describedby": G.value,
|
|
222
227
|
"aria-label": s.label ? `Browse files for ${s.label}` : void 0,
|
|
223
228
|
onClick: Y
|
|
224
|
-
}, " Browse files ", 8,
|
|
225
|
-
H.value ? (
|
|
229
|
+
}, " Browse files ", 8, E),
|
|
230
|
+
H.value ? (d(), r("p", D, p(H.value), 1)) : n("", !0)
|
|
226
231
|
], 34)),
|
|
227
|
-
W.value ? (
|
|
228
|
-
key:
|
|
232
|
+
W.value ? (d(), r("p", {
|
|
233
|
+
key: 4,
|
|
229
234
|
id: `${m(N)}-msg`,
|
|
230
|
-
class: "mt-1.5 flex items-start gap-1 text-
|
|
235
|
+
class: "mt-1.5 flex items-start gap-1.5 text-base text-danger-strong",
|
|
236
|
+
role: "alert"
|
|
231
237
|
}, [o(m(v), {
|
|
232
|
-
class: "mt-
|
|
238
|
+
class: "mt-0.5 size-4 shrink-0",
|
|
233
239
|
"aria-hidden": "true"
|
|
234
|
-
}), a(" " + p(W.value), 1)], 8,
|
|
235
|
-
|
|
236
|
-
id: `${m(N)}-msg`,
|
|
237
|
-
class: "mt-1.5 text-xs text-muted"
|
|
238
|
-
}, p(s.hint), 9, O)) : n("", !0),
|
|
239
|
-
!s.small && j.value.length ? (u(), r("ul", {
|
|
240
|
+
}), a(" " + p(W.value), 1)], 8, O)) : n("", !0),
|
|
241
|
+
!s.small && j.value.length ? (d(), r("ul", {
|
|
240
242
|
key: 5,
|
|
241
243
|
ref_key: "list",
|
|
242
244
|
ref: I,
|
|
243
|
-
class: "mt-3 divide-y divide-border
|
|
245
|
+
class: "mt-3 divide-y divide-border overflow-hidden rounded-10 border border-border bg-surface",
|
|
244
246
|
"aria-label": s.label ? `${s.label} files` : "Chosen files"
|
|
245
|
-
}, [(
|
|
247
|
+
}, [(d(!0), r(e, null, ee(j.value, (e, t) => (d(), r("li", {
|
|
246
248
|
key: `${e.name}-${e.size}-${e.lastModified}`,
|
|
247
|
-
class: "flex items-center gap-3 py-2 pr-2 pl-
|
|
249
|
+
class: "flex items-center gap-3 py-2 pr-2 pl-4"
|
|
248
250
|
}, [
|
|
249
251
|
o(m(y), {
|
|
250
252
|
class: "size-4 shrink-0 text-muted",
|
|
@@ -257,12 +259,12 @@ var S = ["id"], te = {
|
|
|
257
259
|
i("span", le, p(q(e.size)), 1),
|
|
258
260
|
i("button", {
|
|
259
261
|
type: "button",
|
|
260
|
-
class: "inline-flex size-
|
|
262
|
+
class: "inline-flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-8 text-muted transition-colors hover:bg-surface-sunken hover:text-heading focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:outline-none disabled:cursor-not-allowed",
|
|
261
263
|
"aria-label": `Remove ${e.name}`,
|
|
262
264
|
disabled: s.disabled,
|
|
263
265
|
onClick: (e) => ge(t)
|
|
264
266
|
}, [o(m(x), {
|
|
265
|
-
class: "size-
|
|
267
|
+
class: "size-4",
|
|
266
268
|
"aria-hidden": "true"
|
|
267
269
|
})], 8, ue)
|
|
268
270
|
]))), 128))], 8, se)) : n("", !0),
|
|
@@ -4,7 +4,7 @@ import { Fragment as n, createElementBlock as r, createElementVNode as i, define
|
|
|
4
4
|
var d = {
|
|
5
5
|
role: "radiogroup",
|
|
6
6
|
"aria-label": "Text size",
|
|
7
|
-
class: "inline-flex items-center gap-
|
|
7
|
+
class: "inline-flex items-center gap-1 rounded-10 bg-surface-sunken p-1",
|
|
8
8
|
"data-ac-ds": "",
|
|
9
9
|
"data-testid": "ac-font-scale"
|
|
10
10
|
}, f = [
|
|
@@ -52,7 +52,7 @@ var d = {
|
|
|
52
52
|
"aria-checked": u(y) === e.value,
|
|
53
53
|
"aria-label": a.display === "icons" ? `${e.label} text` : void 0,
|
|
54
54
|
title: a.display === "icons" ? `${e.label} text` : void 0,
|
|
55
|
-
class: o(["inline-flex h-
|
|
55
|
+
class: o(["inline-flex h-7 cursor-pointer items-center justify-center gap-1.5 rounded-8 text-base font-medium transition-[background-color,color,box-shadow] duration-200 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset focus-visible:outline-none", [a.display === "icons" ? "w-7" : "px-3", u(y) === e.value ? "bg-surface text-heading shadow-sm" : "text-muted hover:text-heading"]]),
|
|
56
56
|
onClick: (t) => x(e.value)
|
|
57
57
|
}, [a.display === "icons" ? (s(), r("span", {
|
|
58
58
|
key: 0,
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export interface FooterLink {
|
|
2
|
+
/** Link text, e.g. "Docs". */
|
|
3
|
+
label: string;
|
|
4
|
+
/** URL of the page. */
|
|
5
|
+
href?: string;
|
|
6
|
+
/** Route for `RouterLink` (needs vue-router in the app). Takes precedence over `href`. */
|
|
7
|
+
to?: string | Record<string, unknown>;
|
|
8
|
+
/** Opens in a new tab, with `rel="noopener noreferrer"`. */
|
|
9
|
+
external?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface Props {
|
|
12
|
+
/** Links in the footer row. Defaults to AppsCode's support, docs, blog, pricing and legal pages. */
|
|
13
|
+
links?: FooterLink[];
|
|
14
|
+
/** Line under the links, e.g. "© 2026 AppsCode Inc.". Empty by default, like cloud-ui's footer. */
|
|
15
|
+
copyright?: string;
|
|
16
|
+
/** App version shown after the copyright in mono text, e.g. "v2026.10.1". */
|
|
17
|
+
version?: string;
|
|
18
|
+
}
|
|
19
|
+
type __VLS_Slots = {
|
|
20
|
+
/** Content before the links, e.g. a logo. When the footer is 896px or wider it sits at the left; narrower, everything stacks and centres. */
|
|
21
|
+
start?: () => unknown;
|
|
22
|
+
/** Content after the links, e.g. a theme or language switcher. When the footer is 896px or wider it sits at the right. */
|
|
23
|
+
end?: () => unknown;
|
|
24
|
+
};
|
|
25
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
26
|
+
version: string;
|
|
27
|
+
links: FooterLink[];
|
|
28
|
+
copyright: string;
|
|
29
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
31
|
+
declare const _default: typeof __VLS_export;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { Fragment as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, defineComponent as o, getCurrentInstance as s, normalizeClass as c, openBlock as l, renderList as u, renderSlot as d, resolveDynamicComponent as f, toDisplayString as p, unref as m, useSlots as h, withCtx as g } from "vue";
|
|
2
|
+
//#region src/lib/components/AcFooter.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var _ = {
|
|
4
|
+
class: "@container w-full border-t border-border/80 bg-background/90 py-5 backdrop-blur-sm",
|
|
5
|
+
"data-ac-ds": "",
|
|
6
|
+
"data-testid": "ac-footer"
|
|
7
|
+
}, v = { class: "mx-auto flex max-w-page flex-col items-center gap-3 px-4" }, y = { class: "flex w-full flex-col items-center gap-3 @4xl:flex-row @4xl:justify-between" }, b = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "flex shrink-0 items-center gap-2"
|
|
10
|
+
}, x = {
|
|
11
|
+
"aria-label": "Footer",
|
|
12
|
+
class: "min-w-0 @4xl:flex-1"
|
|
13
|
+
}, S = { class: "m-0 flex list-none flex-wrap items-center justify-center gap-1.5 p-0" }, C = [
|
|
14
|
+
"href",
|
|
15
|
+
"target",
|
|
16
|
+
"rel"
|
|
17
|
+
], w = {
|
|
18
|
+
key: 0,
|
|
19
|
+
class: "sr-only"
|
|
20
|
+
}, T = {
|
|
21
|
+
key: 1,
|
|
22
|
+
class: "flex shrink-0 items-center gap-2"
|
|
23
|
+
}, E = {
|
|
24
|
+
key: 0,
|
|
25
|
+
class: "m-0 flex flex-wrap items-center justify-center gap-x-2 text-xs text-muted"
|
|
26
|
+
}, D = { key: 0 }, O = {
|
|
27
|
+
key: 1,
|
|
28
|
+
"aria-hidden": "true"
|
|
29
|
+
}, k = {
|
|
30
|
+
key: 2,
|
|
31
|
+
class: "font-mono"
|
|
32
|
+
}, A = "inline-flex rounded-8 px-2.5 py-1.5 text-xs text-muted no-underline transition-colors duration-200 hover:bg-surface-sunken/60 hover:text-heading focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none motion-reduce:transition-none", j = /*@__PURE__*/ o({
|
|
33
|
+
__name: "AcFooter",
|
|
34
|
+
props: {
|
|
35
|
+
links: { default: () => [
|
|
36
|
+
{
|
|
37
|
+
label: "Support",
|
|
38
|
+
href: "https://appscode.com/support/",
|
|
39
|
+
external: !0
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
label: "Docs",
|
|
43
|
+
href: "https://appscode.com/docs/",
|
|
44
|
+
external: !0
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
label: "Learn",
|
|
48
|
+
href: "https://appscode.com/learn/",
|
|
49
|
+
external: !0
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
label: "Blog",
|
|
53
|
+
href: "https://appscode.com/blog/",
|
|
54
|
+
external: !0
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
label: "Pricing",
|
|
58
|
+
href: "https://appscode.com/pricing/",
|
|
59
|
+
external: !0
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
label: "Contact",
|
|
63
|
+
href: "https://appscode.com/contact/",
|
|
64
|
+
external: !0
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
label: "Privacy",
|
|
68
|
+
href: "https://appscode.com/legal/privacy-policy/",
|
|
69
|
+
external: !0
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
label: "Terms",
|
|
73
|
+
href: "https://appscode.com/legal/tos/",
|
|
74
|
+
external: !0
|
|
75
|
+
}
|
|
76
|
+
] },
|
|
77
|
+
copyright: { default: "" },
|
|
78
|
+
version: { default: "" }
|
|
79
|
+
},
|
|
80
|
+
setup(o) {
|
|
81
|
+
let j = h(), M = s()?.appContext.components.RouterLink;
|
|
82
|
+
return (s, h) => (l(), r("footer", _, [i("div", v, [i("div", y, [
|
|
83
|
+
j.start ? (l(), r("div", b, [d(s.$slots, "start")])) : n("", !0),
|
|
84
|
+
i("nav", x, [i("ul", S, [(l(!0), r(e, null, u(o.links, (e) => (l(), r("li", { key: e.label }, [e.to && m(M) ? (l(), t(f(m(M)), {
|
|
85
|
+
key: 0,
|
|
86
|
+
to: e.to,
|
|
87
|
+
class: c(A)
|
|
88
|
+
}, {
|
|
89
|
+
default: g(() => [a(p(e.label), 1)]),
|
|
90
|
+
_: 2
|
|
91
|
+
}, 1032, ["to"])) : (l(), r("a", {
|
|
92
|
+
key: 1,
|
|
93
|
+
href: e.href ?? (typeof e.to == "string" ? e.to : void 0),
|
|
94
|
+
target: e.external ? "_blank" : void 0,
|
|
95
|
+
rel: e.external ? "noopener noreferrer" : void 0,
|
|
96
|
+
class: c(A)
|
|
97
|
+
}, [a(p(e.label), 1), e.external ? (l(), r("span", w, " (opens in a new tab)")) : n("", !0)], 8, C))]))), 128))])]),
|
|
98
|
+
j.end ? (l(), r("div", T, [d(s.$slots, "end")])) : n("", !0)
|
|
99
|
+
]), o.copyright || o.version ? (l(), r("p", E, [
|
|
100
|
+
o.copyright ? (l(), r("span", D, p(o.copyright), 1)) : n("", !0),
|
|
101
|
+
o.copyright && o.version ? (l(), r("span", O, "·")) : n("", !0),
|
|
102
|
+
o.version ? (l(), r("span", k, p(o.version), 1)) : n("", !0)
|
|
103
|
+
])) : n("", !0)])]));
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
//#endregion
|
|
107
|
+
export { j as default };
|
|
@@ -5,6 +5,8 @@ export interface Props {
|
|
|
5
5
|
layout?: "stacked" | "aside";
|
|
6
6
|
/** Lets the browser block submit on empty `required` fields. Off by default so `@submit` always fires and your own validation shows its messages. */
|
|
7
7
|
nativeValidation?: boolean;
|
|
8
|
+
/** Default look of every AcFormSection inside: `card` gives each section its own bordered card, 12px apart; `plain` separates sections with a divider, for a form already inside a card, modal or side panel. */
|
|
9
|
+
variant?: "card" | "plain";
|
|
8
10
|
}
|
|
9
11
|
type __VLS_Slots = {
|
|
10
12
|
/** AcFormSection groups, or fields directly. */
|
|
@@ -17,6 +19,7 @@ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, i
|
|
|
17
19
|
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
18
20
|
onSubmit?: ((event: SubmitEvent) => any) | undefined;
|
|
19
21
|
}>, {
|
|
22
|
+
variant: "card" | "plain";
|
|
20
23
|
width: "narrow" | "normal" | "wide" | "full";
|
|
21
24
|
layout: "stacked" | "aside";
|
|
22
25
|
nativeValidation: boolean;
|
|
@@ -8,7 +8,8 @@ var l = ["novalidate"], u = /*@__PURE__*/ r({
|
|
|
8
8
|
nativeValidation: {
|
|
9
9
|
type: Boolean,
|
|
10
10
|
default: !1
|
|
11
|
-
}
|
|
11
|
+
},
|
|
12
|
+
variant: { default: "card" }
|
|
12
13
|
},
|
|
13
14
|
emits: ["submit"],
|
|
14
15
|
setup(r, { emit: u }) {
|
|
@@ -20,6 +21,7 @@ var l = ["novalidate"], u = /*@__PURE__*/ r({
|
|
|
20
21
|
}, m = e(() => p[d.width ?? (d.layout === "aside" ? "wide" : "normal")]);
|
|
21
22
|
o("ac-form", {
|
|
22
23
|
layout: e(() => d.layout),
|
|
24
|
+
variant: e(() => d.variant),
|
|
23
25
|
widthClass: m
|
|
24
26
|
});
|
|
25
27
|
function h(e) {
|
|
@@ -31,7 +33,7 @@ var l = ["novalidate"], u = /*@__PURE__*/ r({
|
|
|
31
33
|
"data-ac-ds": "",
|
|
32
34
|
"data-testid": "ac-form",
|
|
33
35
|
onSubmit: c(h, ["prevent"])
|
|
34
|
-
}, [n("div", { class: i(["flex w-full flex-col", m.value]) }, [s(e.$slots, "default")], 2), s(e.$slots, "footer")], 40, l));
|
|
36
|
+
}, [n("div", { class: i(["flex w-full flex-col", [m.value, r.variant === "card" && "gap-3"]]) }, [s(e.$slots, "default")], 2), s(e.$slots, "footer")], 40, l));
|
|
35
37
|
}
|
|
36
38
|
});
|
|
37
39
|
//#endregion
|
|
@@ -13,7 +13,7 @@ export interface FormArrayColumn<I = Record<string, unknown>> {
|
|
|
13
13
|
width?: string;
|
|
14
14
|
}
|
|
15
15
|
export interface Props<I> {
|
|
16
|
-
/** Name of the field, e.g. “Quotas” or “Environment
|
|
16
|
+
/** Name of the field, e.g. “Quotas” or “Environment variables”. */
|
|
17
17
|
label: string;
|
|
18
18
|
/** Columns of the item table: `{ key, label, type?, format?, width? }`. */
|
|
19
19
|
columns: FormArrayColumn<I>[];
|
|
@@ -49,7 +49,7 @@ export interface Props<I> {
|
|
|
49
49
|
defaultCollapsed?: boolean;
|
|
50
50
|
/** Error for the whole field, e.g. “Add at least one quota”. A list shows one per line. */
|
|
51
51
|
errorMsg?: string | string[];
|
|
52
|
-
/**
|
|
52
|
+
/** Help text between the label and the items. */
|
|
53
53
|
hint?: string;
|
|
54
54
|
/** Text of the Add button. Defaults to “Add <itemName>”. */
|
|
55
55
|
addLabel?: string;
|