@ac-design/design-system 2.0.0 → 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/dist/lib/charts/ChartFrame.vue.d.ts +2 -0
- package/dist/lib/charts/ChartFrame.vue_vue_type_script_setup_true_lang.js +42 -37
- 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 +4 -0
- package/dist/lib/charts/index.js +3 -1
- package/dist/lib/charts/shared.d.ts +0 -7
- package/dist/lib/charts/shared.js +1 -19
- package/dist/lib/charts/xy.d.ts +11 -7
- package/dist/lib/charts/xy.js +53 -72
- package/dist/lib/compat.css +1322 -278
- package/dist/lib/components/AcAlert.vue.d.ts +9 -0
- package/dist/lib/components/AcAlert.vue_vue_type_script_setup_true_lang.js +121 -21
- package/dist/lib/components/AcAppSwitcher.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/lib/components/AcAreaChart.vue.d.ts +3 -0
- package/dist/lib/components/AcAreaChart.vue_vue_type_script_setup_true_lang.js +132 -142
- package/dist/lib/components/AcAvatar.vue.d.ts +7 -4
- package/dist/lib/components/AcAvatar.vue_vue_type_script_setup_true_lang.js +59 -54
- package/dist/lib/components/AcBadge.vue.d.ts +7 -3
- package/dist/lib/components/AcBadge.vue_vue_type_script_setup_true_lang.js +35 -28
- package/dist/lib/components/AcBarChart.vue.d.ts +3 -0
- package/dist/lib/components/AcBarChart.vue_vue_type_script_setup_true_lang.js +142 -146
- package/dist/lib/components/AcBreadcrumb.vue.d.ts +4 -1
- package/dist/lib/components/AcBreadcrumb.vue_vue_type_script_setup_true_lang.js +18 -17
- package/dist/lib/components/AcBulkActionBar.vue.d.ts +2 -0
- package/dist/lib/components/AcBulkActionBar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/lib/components/AcButton.vue.d.ts +12 -6
- package/dist/lib/components/AcButton.vue_vue_type_script_setup_true_lang.js +85 -47
- package/dist/lib/components/AcCard.vue.d.ts +34 -3
- package/dist/lib/components/AcCard.vue_vue_type_script_setup_true_lang.js +169 -34
- package/dist/lib/components/AcCellValue.vue.d.ts +3 -3
- package/dist/lib/components/AcCellValue.vue_vue_type_script_setup_true_lang.js +171 -165
- package/dist/lib/components/AcCheckBox.vue.d.ts +1 -1
- package/dist/lib/components/AcCheckBox.vue_vue_type_script_setup_true_lang.js +58 -72
- 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 +100 -36
- package/dist/lib/components/AcCircularProgress.vue.d.ts +4 -4
- package/dist/lib/components/AcCircularProgress.vue_vue_type_script_setup_true_lang.js +12 -9
- package/dist/lib/components/AcColorInput.vue.d.ts +5 -2
- package/dist/lib/components/AcColorInput.vue_vue_type_script_setup_true_lang.js +127 -97
- 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.vue.d.ts +1 -1
- package/dist/lib/components/AcConfirmModal.vue_vue_type_script_setup_true_lang.js +7 -3
- package/dist/lib/components/AcCopyButton.vue.d.ts +2 -2
- package/dist/lib/components/AcCopyButton.vue_vue_type_script_setup_true_lang.js +4 -4
- 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 +3 -3
- package/dist/lib/components/AcDatePicker.vue_vue_type_script_setup_true_lang.js +606 -380
- package/dist/lib/components/AcDeleteModal.vue_vue_type_script_setup_true_lang.js +47 -41
- package/dist/lib/components/AcDonutChart.vue.d.ts +10 -0
- package/dist/lib/components/AcDonutChart.vue_vue_type_script_setup_true_lang.js +116 -89
- package/dist/lib/components/AcDropdown.vue.d.ts +5 -2
- package/dist/lib/components/AcDropdown.vue_vue_type_script_setup_true_lang.js +88 -75
- package/dist/lib/components/AcDropdownDivider.vue_vue_type_script_setup_true_lang.js +11 -10
- package/dist/lib/components/AcDropdownItem.vue.d.ts +1 -1
- package/dist/lib/components/AcDropdownItem.vue_vue_type_script_setup_true_lang.js +17 -17
- package/dist/lib/components/AcEmptyState.vue.d.ts +1 -1
- 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 +136 -114
- package/dist/lib/components/AcFooter.vue.d.ts +1 -1
- package/dist/lib/components/AcFooter.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/lib/components/AcFormFooter.vue.d.ts +1 -1
- package/dist/lib/components/AcFormSection.vue.d.ts +1 -1
- 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 +17 -2
- package/dist/lib/components/AcHeader.vue_vue_type_script_setup_true_lang.js +79 -25
- package/dist/lib/components/AcInfoTable.vue.d.ts +1 -1
- package/dist/lib/components/AcInput.vue.d.ts +1 -1
- package/dist/lib/components/AcInput.vue_vue_type_script_setup_true_lang.js +76 -79
- package/dist/lib/components/AcKeyValueInput.vue.d.ts +4 -4
- package/dist/lib/components/AcKeyValueInput.vue_vue_type_script_setup_true_lang.js +199 -183
- package/dist/lib/components/AcLineChart.vue.d.ts +6 -0
- package/dist/lib/components/AcLineChart.vue_vue_type_script_setup_true_lang.js +113 -125
- 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.vue.d.ts +3 -1
- package/dist/lib/components/AcLocaleSwitcher.vue_vue_type_script_setup_true_lang.js +44 -36
- 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 +85 -61
- package/dist/lib/components/AcNavbar.vue.d.ts +8 -5
- package/dist/lib/components/AcNavbar.vue_vue_type_script_setup_true_lang.js +25 -17
- package/dist/lib/components/AcNavbarItem.vue.d.ts +2 -2
- package/dist/lib/components/AcNavbarItem.vue_vue_type_script_setup_true_lang.js +3 -4
- package/dist/lib/components/AcNotificationMenu.vue.d.ts +3 -3
- package/dist/lib/components/AcNotificationMenu.vue_vue_type_script_setup_true_lang.js +133 -168
- package/dist/lib/components/AcNumberInput.vue.d.ts +2 -2
- package/dist/lib/components/AcNumberInput.vue_vue_type_script_setup_true_lang.js +137 -147
- package/dist/lib/components/AcPage.vue.d.ts +2 -2
- package/dist/lib/components/AcPage.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/lib/components/AcPagination.vue.d.ts +5 -5
- package/dist/lib/components/AcPagination.vue_vue_type_script_setup_true_lang.js +59 -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 +17 -2
- package/dist/lib/components/AcProgress.vue_vue_type_script_setup_true_lang.js +83 -29
- package/dist/lib/components/AcResourceCard.vue.d.ts +1 -1
- package/dist/lib/components/AcResourceCard.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/lib/components/AcSearchBar.vue.d.ts +1 -1
- package/dist/lib/components/AcSearchBar.vue_vue_type_script_setup_true_lang.js +8 -4
- package/dist/lib/components/AcSelect.vue.d.ts +3 -3
- package/dist/lib/components/AcSelect.vue_vue_type_script_setup_true_lang.js +232 -243
- 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 +5 -5
- package/dist/lib/components/AcSideTabs.vue.d.ts +1 -1
- package/dist/lib/components/AcSidebar.vue.d.ts +4 -1
- package/dist/lib/components/AcSidebar.vue_vue_type_script_setup_true_lang.js +104 -94
- package/dist/lib/components/AcSidebarItem.vue.d.ts +1 -1
- package/dist/lib/components/AcSidebarItem.vue_vue_type_script_setup_true_lang.js +42 -42
- 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/AcSteps.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/lib/components/AcSwitch.vue.d.ts +3 -0
- package/dist/lib/components/AcSwitch.vue_vue_type_script_setup_true_lang.js +46 -39
- package/dist/lib/components/AcSwitchCard.vue.d.ts +3 -3
- package/dist/lib/components/AcSwitchCard.vue_vue_type_script_setup_true_lang.js +9 -7
- package/dist/lib/components/AcTable.vue_vue_type_script_setup_true_lang.js +65 -65
- package/dist/lib/components/AcTabs.vue.d.ts +9 -2
- package/dist/lib/components/AcTabs.vue_vue_type_script_setup_true_lang.js +42 -27
- package/dist/lib/components/AcTag.vue.d.ts +1 -1
- package/dist/lib/components/AcTagInput.vue.d.ts +5 -5
- package/dist/lib/components/AcTagInput.vue_vue_type_script_setup_true_lang.js +140 -142
- package/dist/lib/components/AcTextarea.vue.d.ts +1 -1
- package/dist/lib/components/AcTextarea.vue_vue_type_script_setup_true_lang.js +69 -72
- package/dist/lib/components/AcThemeMode.vue.d.ts +3 -3
- package/dist/lib/components/AcThemeMode.vue_vue_type_script_setup_true_lang.js +54 -22
- package/dist/lib/components/AcTimePicker.vue.d.ts +1 -1
- package/dist/lib/components/AcTimePicker.vue_vue_type_script_setup_true_lang.js +177 -185
- package/dist/lib/components/AcToaster.vue.d.ts +6 -3
- package/dist/lib/components/AcToaster.vue_vue_type_script_setup_true_lang.js +103 -64
- package/dist/lib/components/AcTooltip.vue.d.ts +34 -14
- package/dist/lib/components/AcTooltip.vue_vue_type_script_setup_true_lang.js +184 -70
- package/dist/lib/components/AcUserMenu.vue.d.ts +23 -1
- package/dist/lib/components/AcUserMenu.vue_vue_type_script_setup_true_lang.js +181 -138
- package/dist/lib/components/index.d.ts +7 -0
- package/dist/lib/components/status.d.ts +3 -1
- package/dist/lib/components/status.js +20 -5
- package/dist/lib/composables/useToast.d.ts +17 -1
- package/dist/lib/composables/useToast.js +10 -2
- package/dist/lib/index.d.ts +7 -3
- package/dist/lib/index.js +80 -73
- package/dist/lib/theme.css +39 -54
- package/package.json +12 -3
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { computed as e, createCommentVNode as t, createElementBlock as n, createElementVNode as r, createVNode as i, defineComponent as a, mergeModels as o, mergeProps as s, normalizeClass as c, onBeforeUnmount as l, openBlock as u, ref as d, renderSlot as f, toDisplayString as p, unref as m, useAttrs as h, useId as g, useModel as _, watch as ee } from "vue";
|
|
2
|
+
import { Minus as te, Plus as ne } from "@lucide/vue";
|
|
3
3
|
//#region src/lib/components/AcNumberInput.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var
|
|
4
|
+
var re = ["for"], v = {
|
|
5
5
|
key: 0,
|
|
6
|
-
class: "
|
|
7
|
-
},
|
|
6
|
+
class: "text-muted"
|
|
7
|
+
}, ie = {
|
|
8
8
|
key: 1,
|
|
9
9
|
class: "text-danger",
|
|
10
10
|
"aria-hidden": "true"
|
|
11
|
-
},
|
|
11
|
+
}, y = ["id"], b = { class: "flex items-center gap-3" }, ae = [
|
|
12
12
|
"id",
|
|
13
13
|
"inputmode",
|
|
14
14
|
"value",
|
|
@@ -22,20 +22,10 @@ var b = ["for"], x = {
|
|
|
22
22
|
"aria-valuetext",
|
|
23
23
|
"aria-invalid",
|
|
24
24
|
"aria-describedby"
|
|
25
|
-
],
|
|
26
|
-
key: 1,
|
|
27
|
-
class: "mr-1 flex shrink-0 items-center gap-1"
|
|
28
|
-
}, ce = [
|
|
29
|
-
"disabled",
|
|
30
|
-
"aria-label",
|
|
31
|
-
"aria-controls",
|
|
32
|
-
"data-testid",
|
|
33
|
-
"onPointerdown",
|
|
34
|
-
"onClick"
|
|
35
|
-
], le = ["id"], D = /*@__PURE__*/ s({
|
|
25
|
+
], oe = { key: 0 }, se = ["id"], x = /*@__PURE__*/ a({
|
|
36
26
|
inheritAttrs: !1,
|
|
37
27
|
__name: "AcNumberInput",
|
|
38
|
-
props: /*@__PURE__*/
|
|
28
|
+
props: /*@__PURE__*/ o({
|
|
39
29
|
label: { default: "" },
|
|
40
30
|
name: { default: "" },
|
|
41
31
|
min: { default: void 0 },
|
|
@@ -45,7 +35,7 @@ var b = ["for"], x = {
|
|
|
45
35
|
unit: { default: "" },
|
|
46
36
|
stepButtons: {
|
|
47
37
|
type: Boolean,
|
|
48
|
-
default: !
|
|
38
|
+
default: !1
|
|
49
39
|
},
|
|
50
40
|
holdDelay: { default: 300 },
|
|
51
41
|
holdIntervalDelay: { default: 100 },
|
|
@@ -68,184 +58,184 @@ var b = ["for"], x = {
|
|
|
68
58
|
modelValue: { default: null },
|
|
69
59
|
modelModifiers: {}
|
|
70
60
|
}),
|
|
71
|
-
emits: /*@__PURE__*/
|
|
72
|
-
setup(
|
|
73
|
-
let
|
|
74
|
-
class:
|
|
75
|
-
style:
|
|
76
|
-
})),
|
|
77
|
-
let { class: e, style: t, ...n } =
|
|
61
|
+
emits: /*@__PURE__*/ o(["change"], ["update:modelValue"]),
|
|
62
|
+
setup(a, { expose: o, emit: x }) {
|
|
63
|
+
let S = a, C = _(a, "modelValue"), w = x, T = g(), E = h(), D = e(() => ({
|
|
64
|
+
class: E.class,
|
|
65
|
+
style: E.style
|
|
66
|
+
})), O = e(() => {
|
|
67
|
+
let { class: e, style: t, ...n } = E;
|
|
78
68
|
return n;
|
|
79
|
-
}),
|
|
80
|
-
let e =
|
|
81
|
-
if (!
|
|
82
|
-
let { min: t, max: n } =
|
|
69
|
+
}), k = d(null), A = d(G(C.value)), j = d(!1), M, N, P = e(() => S.precision ?? W(S.step)), F = e(() => S.min === void 0 || S.min < 0), I = e(() => S.disabled || S.readonly), L = e(() => S.min !== void 0 && C.value !== null && C.value <= S.min), R = e(() => S.max !== void 0 && C.value !== null && C.value >= S.max), z = e(() => {
|
|
70
|
+
let e = C.value;
|
|
71
|
+
if (!j.value || e === null) return "";
|
|
72
|
+
let { min: t, max: n } = S;
|
|
83
73
|
return (t === void 0 || e >= t) && (n === void 0 || e <= n) ? "" : t !== void 0 && n !== void 0 ? `Enter a value from ${t} to ${n}` : t === void 0 ? `Enter ${n} or less` : `Enter ${t} or more`;
|
|
84
|
-
}),
|
|
85
|
-
function
|
|
74
|
+
}), B = e(() => S.errorMsg || z.value), V = e(() => [S.hint && `${T}-hint`, B.value && `${T}-msg`].filter(Boolean).join(" ") || void 0), H = e(() => ["inline-flex shrink-0 cursor-pointer items-center justify-center rounded-10 border border-border bg-accent text-heading transition-colors duration-200 select-none hover:bg-accent-hover active:bg-accent-active disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-accent", S.size === "small" ? "h-9 px-3" : "h-10.5 px-5"]), U = e(() => C.value === null ? void 0 : [A.value, S.unit].filter(Boolean).join(" "));
|
|
75
|
+
function W(e) {
|
|
86
76
|
let t = String(e);
|
|
87
77
|
return t.includes("e-") ? Number(t.split("e-")[1]) : t.split(".")[1]?.length ?? 0;
|
|
88
78
|
}
|
|
89
|
-
function
|
|
79
|
+
function G(e) {
|
|
90
80
|
return e === null ? "" : String(e);
|
|
91
81
|
}
|
|
82
|
+
function K(e) {
|
|
83
|
+
return Number(e.toFixed(P.value));
|
|
84
|
+
}
|
|
92
85
|
function q(e) {
|
|
93
|
-
return
|
|
86
|
+
return S.min !== void 0 && e < S.min ? S.min : S.max !== void 0 && e > S.max ? S.max : e;
|
|
94
87
|
}
|
|
95
88
|
function J(e) {
|
|
96
|
-
return O.min !== void 0 && e < O.min ? O.min : O.max !== void 0 && e > O.max ? O.max : e;
|
|
97
|
-
}
|
|
98
|
-
function Y(e) {
|
|
99
89
|
if (e === "" || e === "-" || e === "." || e === "-.") return null;
|
|
100
90
|
let t = Number(e);
|
|
101
91
|
return Number.isNaN(t) ? null : t;
|
|
102
92
|
}
|
|
103
|
-
function
|
|
104
|
-
let t = e !==
|
|
105
|
-
|
|
93
|
+
function Y(e) {
|
|
94
|
+
let t = e !== C.value;
|
|
95
|
+
C.value = e, A.value = G(e), t && w("change", e);
|
|
106
96
|
}
|
|
107
|
-
function
|
|
108
|
-
|
|
97
|
+
function X(e, t = 1) {
|
|
98
|
+
I.value || Y(q(K((C.value ?? 0) + e * S.step * t)));
|
|
109
99
|
}
|
|
110
|
-
function
|
|
100
|
+
function ce(e) {
|
|
111
101
|
let t = e.target;
|
|
112
|
-
if (!RegExp(`^${
|
|
113
|
-
t.value =
|
|
102
|
+
if (!RegExp(`^${F.value ? "-?" : ""}\\d*${P.value > 0 ? "(\\.\\d*)?" : ""}$`).test(t.value)) {
|
|
103
|
+
t.value = A.value;
|
|
114
104
|
return;
|
|
115
105
|
}
|
|
116
|
-
|
|
117
|
-
let n =
|
|
118
|
-
(n !== null || t.value === "") && (
|
|
106
|
+
A.value = t.value;
|
|
107
|
+
let n = J(t.value);
|
|
108
|
+
(n !== null || t.value === "") && (C.value = n);
|
|
119
109
|
}
|
|
120
|
-
function
|
|
121
|
-
let e =
|
|
122
|
-
|
|
110
|
+
function Z() {
|
|
111
|
+
let e = J(A.value);
|
|
112
|
+
Y(e === null ? null : q(K(e)));
|
|
123
113
|
}
|
|
124
|
-
function
|
|
125
|
-
|
|
114
|
+
function le() {
|
|
115
|
+
j.value = !1, Z();
|
|
126
116
|
}
|
|
127
|
-
function
|
|
117
|
+
function ue(e) {
|
|
128
118
|
let t = {
|
|
129
|
-
ArrowUp: () =>
|
|
130
|
-
ArrowDown: () =>
|
|
131
|
-
PageUp: () =>
|
|
132
|
-
PageDown: () =>
|
|
119
|
+
ArrowUp: () => X(1),
|
|
120
|
+
ArrowDown: () => X(-1),
|
|
121
|
+
PageUp: () => X(1, 10),
|
|
122
|
+
PageDown: () => X(-1, 10)
|
|
133
123
|
};
|
|
134
|
-
if (
|
|
124
|
+
if (S.min !== void 0 && (t.Home = () => !I.value && Y(S.min)), S.max !== void 0 && (t.End = () => !I.value && Y(S.max)), e.key === "Enter") return Z();
|
|
135
125
|
let n = t[e.key];
|
|
136
126
|
n && (e.preventDefault(), n());
|
|
137
127
|
}
|
|
138
|
-
function
|
|
139
|
-
clearTimeout(
|
|
128
|
+
function Q() {
|
|
129
|
+
clearTimeout(M), clearInterval(N);
|
|
130
|
+
}
|
|
131
|
+
function de(e, t) {
|
|
132
|
+
e.button !== 0 || I.value || (Q(), X(t), M = setTimeout(() => {
|
|
133
|
+
N = setInterval(() => {
|
|
134
|
+
X(t), (t > 0 && R.value || t < 0 && L.value) && Q();
|
|
135
|
+
}, S.holdIntervalDelay);
|
|
136
|
+
}, S.holdDelay));
|
|
140
137
|
}
|
|
141
|
-
function
|
|
142
|
-
e.
|
|
143
|
-
z = setInterval(() => {
|
|
144
|
-
Z(t), (t > 0 && W.value || t < 0 && U.value) && $();
|
|
145
|
-
}, O.holdIntervalDelay);
|
|
146
|
-
}, O.holdDelay));
|
|
138
|
+
function fe(e, t) {
|
|
139
|
+
e.detail === 0 && X(t);
|
|
147
140
|
}
|
|
148
|
-
function
|
|
149
|
-
e
|
|
141
|
+
function $(e) {
|
|
142
|
+
let t = e < 0 ? "Decrease" : "Increase";
|
|
143
|
+
return {
|
|
144
|
+
"aria-label": t,
|
|
145
|
+
"aria-controls": T,
|
|
146
|
+
"data-testid": `ac-number-input-${t.toLowerCase()}`,
|
|
147
|
+
disabled: I.value || (e < 0 ? L.value : R.value),
|
|
148
|
+
onMousedown: (e) => e.preventDefault(),
|
|
149
|
+
onPointerdown: (t) => de(t, e),
|
|
150
|
+
onPointerup: Q,
|
|
151
|
+
onPointerleave: Q,
|
|
152
|
+
onPointercancel: Q,
|
|
153
|
+
onClick: (t) => fe(t, e)
|
|
154
|
+
};
|
|
150
155
|
}
|
|
151
|
-
return
|
|
152
|
-
|
|
153
|
-
}),
|
|
154
|
-
class: ["w-full",
|
|
156
|
+
return ee(C, (e) => {
|
|
157
|
+
J(A.value) !== e && (A.value = G(e));
|
|
158
|
+
}), l(Q), o({ focus: () => k.value?.focus() }), (e, o) => (u(), n("div", s(D.value, {
|
|
159
|
+
class: ["w-full", a.disabled && "opacity-50"],
|
|
155
160
|
"data-ac-ds": "",
|
|
156
161
|
"data-testid": "ac-number-input"
|
|
157
162
|
}), [
|
|
158
|
-
|
|
163
|
+
a.label ? (u(), n("label", {
|
|
159
164
|
key: 0,
|
|
160
|
-
for:
|
|
165
|
+
for: m(T),
|
|
161
166
|
class: "mb-2 flex items-center gap-1 text-base font-medium text-heading"
|
|
162
167
|
}, [
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
], 8,
|
|
167
|
-
|
|
168
|
+
r("span", null, p(a.label), 1),
|
|
169
|
+
a.readonly ? (u(), n("span", v, "(read only)")) : t("", !0),
|
|
170
|
+
a.required ? (u(), n("span", ie, "*")) : t("", !0)
|
|
171
|
+
], 8, re)) : t("", !0),
|
|
172
|
+
a.hint ? (u(), n("p", {
|
|
168
173
|
key: 1,
|
|
169
|
-
id: `${
|
|
174
|
+
id: `${m(T)}-hint`,
|
|
170
175
|
class: "mb-2 text-base text-muted"
|
|
171
|
-
},
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
176
|
+
}, p(a.hint), 9, y)) : t("", !0),
|
|
177
|
+
r("div", b, [
|
|
178
|
+
a.stepButtons ? (u(), n("button", s({
|
|
179
|
+
key: 0,
|
|
180
|
+
type: "button",
|
|
181
|
+
tabindex: "-1",
|
|
182
|
+
class: H.value
|
|
183
|
+
}, $(-1)), [i(m(te), {
|
|
184
|
+
class: c(a.size === "small" ? "size-4" : "size-6"),
|
|
185
|
+
"aria-hidden": "true"
|
|
186
|
+
}, null, 8, ["class"])], 16)) : t("", !0),
|
|
187
|
+
r("div", { class: c(["relative flex min-w-0 flex-1 items-center rounded-10 border transition-[border-color,box-shadow,background-color] duration-200", [
|
|
188
|
+
a.size === "small" ? "h-9" : "h-10.5",
|
|
189
|
+
a.readonly ? "bg-surface-muted" : "bg-background",
|
|
190
|
+
B.value ? "border-danger focus-within:shadow-[0_0_0_2px_color-mix(in_srgb,var(--color-danger)_20%,transparent)]" : ["border-border focus-within:focus-ring", !a.disabled && "hover:border-accent-active"]
|
|
191
|
+
]]) }, [r("input", s({
|
|
192
|
+
id: m(T),
|
|
179
193
|
ref_key: "input",
|
|
180
|
-
ref:
|
|
181
|
-
},
|
|
194
|
+
ref: k
|
|
195
|
+
}, O.value, {
|
|
182
196
|
type: "text",
|
|
183
197
|
role: "spinbutton",
|
|
184
198
|
autocomplete: "off",
|
|
185
|
-
inputmode:
|
|
186
|
-
value:
|
|
187
|
-
name:
|
|
188
|
-
disabled:
|
|
189
|
-
readonly:
|
|
190
|
-
required:
|
|
191
|
-
"aria-valuenow":
|
|
192
|
-
"aria-valuemin":
|
|
193
|
-
"aria-valuemax":
|
|
194
|
-
"aria-valuetext":
|
|
195
|
-
"aria-invalid": !!
|
|
196
|
-
"aria-describedby":
|
|
197
|
-
class:
|
|
198
|
-
onInput:
|
|
199
|
-
onKeydown:
|
|
200
|
-
onFocus:
|
|
201
|
-
onBlur:
|
|
202
|
-
}), null, 16,
|
|
203
|
-
s.unit || t.$slots.suffix ? (f(), i("span", {
|
|
199
|
+
inputmode: P.value > 0 || F.value ? "decimal" : "numeric",
|
|
200
|
+
value: A.value,
|
|
201
|
+
name: a.name,
|
|
202
|
+
disabled: a.disabled,
|
|
203
|
+
readonly: a.readonly,
|
|
204
|
+
required: a.required,
|
|
205
|
+
"aria-valuenow": C.value ?? void 0,
|
|
206
|
+
"aria-valuemin": a.min,
|
|
207
|
+
"aria-valuemax": a.max,
|
|
208
|
+
"aria-valuetext": U.value,
|
|
209
|
+
"aria-invalid": !!B.value || void 0,
|
|
210
|
+
"aria-describedby": V.value,
|
|
211
|
+
class: "block h-full w-full min-w-0 flex-1 rounded-10 bg-transparent px-2 text-center text-base font-normal text-heading tabular-nums outline-none placeholder:text-muted/80 disabled:cursor-not-allowed",
|
|
212
|
+
onInput: ce,
|
|
213
|
+
onKeydown: ue,
|
|
214
|
+
onFocus: o[0] ||= (e) => j.value = !0,
|
|
215
|
+
onBlur: le
|
|
216
|
+
}), null, 16, ae), a.unit || e.$slots.suffix ? (u(), n("span", {
|
|
204
217
|
key: 0,
|
|
205
|
-
class:
|
|
218
|
+
class: c(["flex h-full shrink-0 items-center gap-1.5 text-base whitespace-nowrap text-muted select-none [&_svg]:size-4", a.size === "small" ? "pr-3" : "pr-4"]),
|
|
206
219
|
"aria-hidden": "true"
|
|
207
|
-
}, [
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
icon: h(v),
|
|
211
|
-
name: "Decrease",
|
|
212
|
-
off: U.value
|
|
213
|
-
}, {
|
|
214
|
-
dir: 1,
|
|
215
|
-
icon: h(y),
|
|
216
|
-
name: "Increase",
|
|
217
|
-
off: W.value
|
|
218
|
-
}], (e) => (f(), i("button", {
|
|
219
|
-
key: e.dir,
|
|
220
|
+
}, [f(e.$slots, "suffix"), a.unit ? (u(), n("span", oe, p(a.unit), 1)) : t("", !0)], 2)) : t("", !0)], 2),
|
|
221
|
+
a.stepButtons ? (u(), n("button", s({
|
|
222
|
+
key: 1,
|
|
220
223
|
type: "button",
|
|
221
224
|
tabindex: "-1",
|
|
222
|
-
class:
|
|
223
|
-
|
|
224
|
-
"
|
|
225
|
-
"aria-controls": h(j),
|
|
226
|
-
"data-testid": `ac-number-input-${e.name.toLowerCase()}`,
|
|
227
|
-
onMousedown: c[1] ||= se(() => {}, ["prevent"]),
|
|
228
|
-
onPointerdown: (t) => _e(t, e.dir),
|
|
229
|
-
onPointerup: $,
|
|
230
|
-
onPointerleave: $,
|
|
231
|
-
onPointercancel: $,
|
|
232
|
-
onClick: (t) => ve(t, e.dir)
|
|
233
|
-
}, [(f(), n(re(e.icon), {
|
|
234
|
-
class: "size-4",
|
|
225
|
+
class: H.value
|
|
226
|
+
}, $(1)), [i(m(ne), {
|
|
227
|
+
class: c(a.size === "small" ? "size-4" : "size-6"),
|
|
235
228
|
"aria-hidden": "true"
|
|
236
|
-
}
|
|
237
|
-
]
|
|
238
|
-
|
|
229
|
+
}, null, 8, ["class"])], 16)) : t("", !0)
|
|
230
|
+
]),
|
|
231
|
+
B.value ? (u(), n("p", {
|
|
239
232
|
key: 2,
|
|
240
|
-
id: `${
|
|
241
|
-
class: "mt-1
|
|
233
|
+
id: `${m(T)}-msg`,
|
|
234
|
+
class: "mt-1 text-base text-danger-strong",
|
|
242
235
|
role: "alert"
|
|
243
|
-
},
|
|
244
|
-
class: "size-4 shrink-0",
|
|
245
|
-
"aria-hidden": "true"
|
|
246
|
-
}), ee(" " + m(G.value), 1)], 8, le)) : r("", !0)
|
|
236
|
+
}, p(B.value), 9, se)) : t("", !0)
|
|
247
237
|
], 16));
|
|
248
238
|
}
|
|
249
239
|
});
|
|
250
240
|
//#endregion
|
|
251
|
-
export {
|
|
241
|
+
export { x as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export interface Props {
|
|
2
|
-
/** Pads the page like cloud-ui's page container: 16px on the sides,
|
|
2
|
+
/** Pads the page like cloud-ui's page container: 16px on the sides, 32px top and bottom. Turn off when a parent already pads it. */
|
|
3
3
|
padded?: boolean;
|
|
4
4
|
/** Space between the page's direct children: `small` 12px, `normal` 20px, `large` 32px. */
|
|
5
5
|
gap?: "small" | "normal" | "large";
|
|
6
|
-
/** Caps the content width and centres it: `narrow` 768px, `normal` 1024px, `wide` 1200px (cloud-ui's page
|
|
6
|
+
/** Caps the content width and centres it: `narrow` 768px, `normal` 1024px, `wide` 1200px (cloud-ui's page column, the same as its `custom-container` and our `page-container` utility), `full` fills the area. Use `wide` for new cloud-ui-style pages. */
|
|
7
7
|
width?: "full" | "wide" | "normal" | "narrow";
|
|
8
8
|
}
|
|
9
9
|
type __VLS_Slots = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export interface Props {
|
|
2
|
-
/** Total number of items across all pages. Leave it out when the API returns only a next-page token: the summary becomes "Page 3" (or "Showing 41
|
|
2
|
+
/** Total number of items across all pages. Leave it out when the API returns only a next-page token: the summary becomes "Page 3" (or "Showing 41 to 60" with `items-on-page`) and Next follows `has-next`. */
|
|
3
3
|
total?: number;
|
|
4
4
|
/** Whether a page after the current one exists, e.g. the response had a next-page token. Overrides the count worked out from `total`. */
|
|
5
5
|
hasNext?: boolean;
|
|
@@ -7,21 +7,21 @@ export interface Props {
|
|
|
7
7
|
hasPrev?: boolean;
|
|
8
8
|
/** Pages the viewer can jump to, e.g. those whose tokens you've cached. Other page numbers are disabled, and a page-size change goes back to page 1. Leave it out when every page is reachable. */
|
|
9
9
|
knownPages?: number[];
|
|
10
|
-
/** Rows on the current page, for "Showing 41
|
|
10
|
+
/** Rows on the current page, for "Showing 41 to 60" when `total` is unknown. Cloud-ui's `pagination.count`. */
|
|
11
11
|
itemsOnPage?: number;
|
|
12
12
|
/** Choices in the page-size select. */
|
|
13
13
|
pageSizes?: number[];
|
|
14
|
-
/** Hides the "
|
|
14
|
+
/** Hides the "Items per page" select. */
|
|
15
15
|
hidePageSize?: boolean;
|
|
16
16
|
/** How many page numbers to show on each side of the current one before an ellipsis. */
|
|
17
17
|
siblings?: number;
|
|
18
18
|
/** Always use the compact "‹ 3 / 6 ›" control. It's used automatically below 640px. */
|
|
19
19
|
compact?: boolean;
|
|
20
|
-
/** Noun after the count: "Showing 1
|
|
20
|
+
/** Noun after the count: "Showing 1 to 10 of 57 databases". Defaults to "results". */
|
|
21
21
|
itemLabel?: string;
|
|
22
22
|
/** Disables every control, e.g. while a page loads. */
|
|
23
23
|
disabled?: boolean;
|
|
24
|
-
/** `small` makes the buttons 28px high (default `normal` is
|
|
24
|
+
/** `small` makes the buttons 28px high with 14px text (default `normal` is 34px with 16px text, as cloud-ui's table pager). Use it inside cards and dense tables. */
|
|
25
25
|
size?: "normal" | "small";
|
|
26
26
|
}
|
|
27
27
|
type __VLS_Props = Props;
|
|
@@ -15,12 +15,15 @@ var y = {
|
|
|
15
15
|
}, w = {
|
|
16
16
|
"aria-label": "Pagination",
|
|
17
17
|
class: "ml-auto"
|
|
18
|
-
}, T = { class: "flex items-center gap-
|
|
18
|
+
}, T = { class: "flex items-center gap-2" }, E = ["disabled"], D = { class: "px-2 whitespace-nowrap tabular-nums" }, O = { class: "font-medium text-heading" }, k = { class: "font-medium text-heading" }, A = {
|
|
19
|
+
key: 0,
|
|
20
|
+
class: "hidden sm:flex"
|
|
21
|
+
}, ee = { class: "flex items-center gap-1" }, j = [
|
|
19
22
|
"aria-label",
|
|
20
23
|
"aria-current",
|
|
21
24
|
"disabled",
|
|
22
25
|
"onClick"
|
|
23
|
-
],
|
|
26
|
+
], M = ["disabled"], N = /*@__PURE__*/ c({
|
|
24
27
|
__name: "AcPagination",
|
|
25
28
|
props: /*@__PURE__*/ l({
|
|
26
29
|
total: { default: void 0 },
|
|
@@ -67,23 +70,23 @@ var y = {
|
|
|
67
70
|
"prev"
|
|
68
71
|
], ["update:page", "update:pageSize"]),
|
|
69
72
|
setup(c, { emit: l }) {
|
|
70
|
-
let
|
|
71
|
-
let e = (
|
|
72
|
-
return
|
|
73
|
-
start: Math.min(e,
|
|
74
|
-
end: Math.min(
|
|
73
|
+
let N = c, P = h(c, "page"), F = h(c, "pageSize"), I = l, L = n(() => [N.size === "small" ? "h-7 min-w-7 px-1.5 text-base" : "h-8.5 min-w-8.5 px-2 text-lg", !N.compact && (N.size === "small" ? "sm:px-2.5" : "sm:px-3")]), R = n(() => N.size === "small" ? "h-7 min-w-7 px-2.5 text-base" : "h-8.5 min-w-8.5 px-3 text-lg"), z = n(() => typeof N.total == "number"), B = n(() => Math.max(0, N.total ?? 0)), V = n(() => Math.max(1, F.value)), H = n(() => !z.value || N.knownPages !== void 0), U = n(() => z.value ? Math.max(1, Math.ceil(B.value / V.value)) : Math.max(1, P.value, ...N.knownPages ?? [])), W = n(() => Math.min(Math.max(1, P.value), U.value)), G = n(() => N.hasPrev ?? W.value > 1), K = n(() => N.hasNext ?? W.value < U.value), q = n(() => {
|
|
74
|
+
let e = (W.value - 1) * V.value;
|
|
75
|
+
return z.value ? {
|
|
76
|
+
start: Math.min(e, B.value),
|
|
77
|
+
end: Math.min(W.value * V.value, B.value)
|
|
75
78
|
} : {
|
|
76
79
|
start: e,
|
|
77
|
-
end: e + Math.max(0,
|
|
80
|
+
end: e + Math.max(0, N.itemsOnPage ?? V.value)
|
|
78
81
|
};
|
|
79
|
-
}),
|
|
80
|
-
let e =
|
|
81
|
-
return
|
|
82
|
-
}),
|
|
82
|
+
}), J = n(() => {
|
|
83
|
+
let e = ` ${N.itemLabel || "results"}`;
|
|
84
|
+
return z.value ? B.value ? `Showing ${q.value.start + 1} to ${q.value.end} of ${B.value}${e}` : `0${e}` : N.itemsOnPage === void 0 ? `Page ${W.value}` : N.itemsOnPage ? `Showing ${q.value.start + 1} to ${q.value.end}${N.itemLabel ? e : ""}` : W.value === 1 ? `0${e}` : `Page ${W.value}`;
|
|
85
|
+
}), Y = n(() => (N.pageSizes.includes(F.value) ? N.pageSizes : [...N.pageSizes, F.value].sort((e, t) => e - t)).map((e) => ({
|
|
83
86
|
value: e,
|
|
84
87
|
label: String(e)
|
|
85
|
-
}))),
|
|
86
|
-
let e =
|
|
88
|
+
}))), X = n(() => {
|
|
89
|
+
let e = U.value, t = W.value, n = Math.max(0, N.siblings);
|
|
87
90
|
if (e <= 5 + 2 * n) return Array.from({ length: e }, (e, t) => t + 1);
|
|
88
91
|
let r = Math.max(t - n, 1), i = Math.min(t + n, e), a = r > 3, o = i < e - 2, s = (e, t) => Array.from({ length: t - e + 1 }, (t, n) => e + n);
|
|
89
92
|
return a ? o ? [
|
|
@@ -102,87 +105,87 @@ var y = {
|
|
|
102
105
|
e
|
|
103
106
|
];
|
|
104
107
|
});
|
|
105
|
-
function X(e) {
|
|
106
|
-
return e === U.value || !M.knownPages || M.knownPages.includes(e);
|
|
107
|
-
}
|
|
108
108
|
function Z(e) {
|
|
109
|
-
|
|
110
|
-
let t = R.value ? H.value : Infinity;
|
|
111
|
-
N.value = Math.min(Math.max(1, e), t);
|
|
109
|
+
return e === W.value || !N.knownPages || N.knownPages.includes(e);
|
|
112
110
|
}
|
|
113
111
|
function Q(e) {
|
|
114
|
-
|
|
112
|
+
if (N.disabled) return;
|
|
113
|
+
let t = z.value ? U.value : Infinity;
|
|
114
|
+
P.value = Math.min(Math.max(1, e), t);
|
|
115
115
|
}
|
|
116
116
|
function $(e) {
|
|
117
|
+
!N.disabled && (e > 0 ? K.value : G.value) && (Q(W.value + e), I(e > 0 ? "next" : "prev", P.value));
|
|
118
|
+
}
|
|
119
|
+
function te(e) {
|
|
117
120
|
let t = Number(e);
|
|
118
|
-
if (!t || t ===
|
|
119
|
-
let n =
|
|
120
|
-
|
|
121
|
+
if (!t || t === F.value) return;
|
|
122
|
+
let n = q.value.start;
|
|
123
|
+
F.value = t, P.value = H.value ? 1 : Math.floor(n / t) + 1;
|
|
121
124
|
}
|
|
122
|
-
return g(
|
|
123
|
-
|
|
124
|
-
}), g(
|
|
125
|
+
return g(U, (e) => {
|
|
126
|
+
z.value && P.value > e && (P.value = e);
|
|
127
|
+
}), g(q, (e) => I("range", { ...e }), { immediate: !0 }), (n, l) => (d(), i("div", y, [a("div", b, [c.hidePageSize ? r("", !0) : (d(), i("div", x, [l[2] ||= a("span", {
|
|
125
128
|
class: "whitespace-nowrap",
|
|
126
129
|
"aria-hidden": "true"
|
|
127
|
-
}, "
|
|
128
|
-
"model-value":
|
|
129
|
-
options:
|
|
130
|
+
}, "Items per page", -1), a("div", S, [s(e, {
|
|
131
|
+
"model-value": F.value,
|
|
132
|
+
options: Y.value,
|
|
130
133
|
size: "compact",
|
|
131
|
-
placeholder: "
|
|
134
|
+
placeholder: "Items per page",
|
|
132
135
|
disabled: c.disabled,
|
|
133
|
-
"onUpdate:modelValue":
|
|
136
|
+
"onUpdate:modelValue": te
|
|
134
137
|
}, null, 8, [
|
|
135
138
|
"model-value",
|
|
136
139
|
"options",
|
|
137
140
|
"disabled"
|
|
138
|
-
])])])), a("p", C, p(
|
|
141
|
+
])])])), a("p", C, p(J.value), 1)]), a("nav", w, [a("ul", T, [
|
|
139
142
|
a("li", null, [a("button", {
|
|
140
143
|
type: "button",
|
|
141
|
-
class: u(["inline-flex cursor-pointer items-center justify-center
|
|
144
|
+
class: u(["inline-flex cursor-pointer items-center justify-center rounded-4 border border-border bg-transparent font-medium text-heading transition-colors duration-200 hover:bg-accent-hover focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent", L.value]),
|
|
142
145
|
"aria-label": "Previous page",
|
|
143
|
-
disabled: c.disabled || !
|
|
146
|
+
disabled: c.disabled || !G.value,
|
|
144
147
|
"data-ac-ds": "",
|
|
145
148
|
"data-testid": "ac-pagination-prev",
|
|
146
|
-
onClick: l[0] ||= (e) =>
|
|
149
|
+
onClick: l[0] ||= (e) => $(-1)
|
|
147
150
|
}, [s(m(_), {
|
|
148
|
-
class: "size-4 shrink-0",
|
|
151
|
+
class: u(["size-4 shrink-0", !c.compact && "sm:hidden"]),
|
|
149
152
|
"aria-hidden": "true"
|
|
150
|
-
}), a("span", { class: u(c.compact ? "hidden" : "hidden sm:inline") }, "Previous", 2)], 10, E)]),
|
|
151
|
-
a("li", { class: u(c.compact ? "flex" : "flex sm:hidden") }, [a("span", D, [
|
|
153
|
+
}, null, 8, ["class"]), a("span", { class: u(c.compact ? "hidden" : "hidden sm:inline") }, "Previous", 2)], 10, E)]),
|
|
154
|
+
a("li", { class: u(c.compact ? "flex" : "flex sm:hidden") }, [a("span", D, [z.value ? (d(), i(t, { key: 0 }, [
|
|
152
155
|
l[3] ||= a("span", { class: "sr-only" }, "Page ", -1),
|
|
153
|
-
a("span", O, p(
|
|
154
|
-
o(" / " + p(
|
|
155
|
-
], 64)) : (d(), i(t, { key: 1 }, [l[4] ||= o("Page ", -1), a("span", k, p(
|
|
156
|
-
c.compact ? r("", !0) : (d(
|
|
156
|
+
a("span", O, p(W.value), 1),
|
|
157
|
+
o(" / " + p(U.value), 1)
|
|
158
|
+
], 64)) : (d(), i(t, { key: 1 }, [l[4] ||= o("Page ", -1), a("span", k, p(W.value), 1)], 64))])], 2),
|
|
159
|
+
c.compact ? r("", !0) : (d(), i("li", A, [a("ul", ee, [(d(!0), i(t, null, f(X.value, (e) => (d(), i("li", {
|
|
157
160
|
key: e,
|
|
158
|
-
class: "
|
|
161
|
+
class: "flex"
|
|
159
162
|
}, [typeof e == "string" ? (d(), i("span", {
|
|
160
163
|
key: 0,
|
|
161
|
-
class: u(["inline-flex
|
|
164
|
+
class: u(["inline-flex items-center justify-center px-2 text-muted", c.size === "small" ? "h-7" : "h-8.5"]),
|
|
162
165
|
"aria-hidden": "true"
|
|
163
166
|
}, "…", 2)) : (d(), i("button", {
|
|
164
167
|
key: 1,
|
|
165
168
|
type: "button",
|
|
166
|
-
class: u(["inline-flex cursor-pointer items-center justify-center rounded-
|
|
169
|
+
class: u(["inline-flex cursor-pointer items-center justify-center rounded-4 border font-medium tabular-nums transition-colors duration-200 focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-40", [R.value, e === W.value ? "border-primary bg-primary text-white" : "border-border bg-transparent text-heading hover:bg-accent-hover disabled:hover:bg-transparent"]]),
|
|
167
170
|
"aria-label": `Page ${e}`,
|
|
168
|
-
"aria-current": e ===
|
|
169
|
-
disabled: c.disabled || !
|
|
170
|
-
onClick: (t) =>
|
|
171
|
-
}, p(e), 11,
|
|
171
|
+
"aria-current": e === W.value ? "page" : void 0,
|
|
172
|
+
disabled: c.disabled || !Z(e),
|
|
173
|
+
onClick: (t) => Q(e)
|
|
174
|
+
}, p(e), 11, j))]))), 128))])])),
|
|
172
175
|
a("li", null, [a("button", {
|
|
173
176
|
type: "button",
|
|
174
|
-
class: u(["inline-flex cursor-pointer items-center justify-center
|
|
177
|
+
class: u(["inline-flex cursor-pointer items-center justify-center rounded-4 border border-border bg-transparent font-medium text-heading transition-colors duration-200 hover:bg-accent-hover focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent", L.value]),
|
|
175
178
|
"aria-label": "Next page",
|
|
176
|
-
disabled: c.disabled || !
|
|
179
|
+
disabled: c.disabled || !K.value,
|
|
177
180
|
"data-ac-ds": "",
|
|
178
181
|
"data-testid": "ac-pagination-next",
|
|
179
|
-
onClick: l[1] ||= (e) =>
|
|
182
|
+
onClick: l[1] ||= (e) => $(1)
|
|
180
183
|
}, [a("span", { class: u(c.compact ? "hidden" : "hidden sm:inline") }, "Next", 2), s(m(v), {
|
|
181
|
-
class: "size-4 shrink-0",
|
|
184
|
+
class: u(["size-4 shrink-0", !c.compact && "sm:hidden"]),
|
|
182
185
|
"aria-hidden": "true"
|
|
183
|
-
})], 10,
|
|
186
|
+
}, null, 8, ["class"])], 10, M)])
|
|
184
187
|
])])]));
|
|
185
188
|
}
|
|
186
189
|
});
|
|
187
190
|
//#endregion
|
|
188
|
-
export {
|
|
191
|
+
export { N as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export interface Props {
|
|
2
|
-
/** Text under the
|
|
2
|
+
/** Text under the loader, e.g. "Fetching resource layout". Also announced to screen readers. */
|
|
3
3
|
message?: string;
|
|
4
|
-
/** Shows the
|
|
4
|
+
/** Shows the loader: cloud-ui's ring and dots. Turn off to show the message alone. */
|
|
5
5
|
showSpinner?: boolean;
|
|
6
|
-
/** Covers the whole viewport on the page background with a
|
|
6
|
+
/** Covers the whole viewport on the page background with a 60px loader, for app start-up and sign-in checks. Inline, the ring is 40px. */
|
|
7
7
|
fullPage?: boolean;
|
|
8
8
|
/** CSS minimum height when not `fullPage`. The preloader also grows to fill its container. */
|
|
9
9
|
minHeight?: string;
|