@ac-design/design-system 2.0.0 → 2.1.1

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.
Files changed (167) hide show
  1. package/dist/lib/charts/ChartFrame.vue.d.ts +2 -0
  2. package/dist/lib/charts/ChartFrame.vue_vue_type_script_setup_true_lang.js +42 -37
  3. package/dist/lib/charts/cartesian.d.ts +324 -0
  4. package/dist/lib/charts/cartesian.js +137 -0
  5. package/dist/lib/charts/echarts.d.ts +86 -0
  6. package/dist/lib/charts/echarts.js +173 -0
  7. package/dist/lib/charts/graph.d.ts +77 -0
  8. package/dist/lib/charts/graph.js +155 -0
  9. package/dist/lib/charts/index.d.ts +4 -0
  10. package/dist/lib/charts/index.js +3 -1
  11. package/dist/lib/charts/shared.d.ts +0 -7
  12. package/dist/lib/charts/shared.js +1 -19
  13. package/dist/lib/charts/xy.d.ts +11 -7
  14. package/dist/lib/charts/xy.js +53 -72
  15. package/dist/lib/compat.css +1322 -278
  16. package/dist/lib/components/AcAlert.vue.d.ts +9 -0
  17. package/dist/lib/components/AcAlert.vue_vue_type_script_setup_true_lang.js +121 -21
  18. package/dist/lib/components/AcAppSwitcher.vue_vue_type_script_setup_true_lang.js +1 -1
  19. package/dist/lib/components/AcAreaChart.vue.d.ts +3 -0
  20. package/dist/lib/components/AcAreaChart.vue_vue_type_script_setup_true_lang.js +132 -142
  21. package/dist/lib/components/AcAvatar.vue.d.ts +7 -4
  22. package/dist/lib/components/AcAvatar.vue_vue_type_script_setup_true_lang.js +59 -54
  23. package/dist/lib/components/AcBadge.vue.d.ts +7 -3
  24. package/dist/lib/components/AcBadge.vue_vue_type_script_setup_true_lang.js +35 -28
  25. package/dist/lib/components/AcBarChart.vue.d.ts +3 -0
  26. package/dist/lib/components/AcBarChart.vue_vue_type_script_setup_true_lang.js +142 -146
  27. package/dist/lib/components/AcBreadcrumb.vue.d.ts +4 -1
  28. package/dist/lib/components/AcBreadcrumb.vue_vue_type_script_setup_true_lang.js +18 -17
  29. package/dist/lib/components/AcBulkActionBar.vue.d.ts +2 -0
  30. package/dist/lib/components/AcBulkActionBar.vue_vue_type_script_setup_true_lang.js +1 -1
  31. package/dist/lib/components/AcButton.vue.d.ts +12 -6
  32. package/dist/lib/components/AcButton.vue_vue_type_script_setup_true_lang.js +85 -47
  33. package/dist/lib/components/AcCard.vue.d.ts +34 -3
  34. package/dist/lib/components/AcCard.vue_vue_type_script_setup_true_lang.js +169 -34
  35. package/dist/lib/components/AcCellValue.vue.d.ts +3 -3
  36. package/dist/lib/components/AcCellValue.vue_vue_type_script_setup_true_lang.js +171 -165
  37. package/dist/lib/components/AcCheckBox.vue.d.ts +1 -1
  38. package/dist/lib/components/AcCheckBox.vue_vue_type_script_setup_true_lang.js +58 -72
  39. package/dist/lib/components/AcCheckList.js +5 -0
  40. package/dist/lib/components/AcCheckList.vue.d.ts +45 -0
  41. package/dist/lib/components/AcCheckList.vue_vue_type_script_setup_true_lang.js +64 -0
  42. package/dist/lib/components/AcCheckRadio.vue.d.ts +30 -5
  43. package/dist/lib/components/AcCheckRadio.vue_vue_type_script_setup_true_lang.js +100 -36
  44. package/dist/lib/components/AcCircularProgress.vue.d.ts +4 -4
  45. package/dist/lib/components/AcCircularProgress.vue_vue_type_script_setup_true_lang.js +12 -9
  46. package/dist/lib/components/AcColorInput.vue.d.ts +5 -2
  47. package/dist/lib/components/AcColorInput.vue_vue_type_script_setup_true_lang.js +127 -97
  48. package/dist/lib/components/AcCommandBlock.js +5 -0
  49. package/dist/lib/components/AcCommandBlock.vue.d.ts +34 -0
  50. package/dist/lib/components/AcCommandBlock.vue_vue_type_script_setup_true_lang.js +88 -0
  51. package/dist/lib/components/AcConfirmModal.vue.d.ts +1 -1
  52. package/dist/lib/components/AcConfirmModal.vue_vue_type_script_setup_true_lang.js +7 -3
  53. package/dist/lib/components/AcCopyButton.vue.d.ts +2 -2
  54. package/dist/lib/components/AcCopyButton.vue_vue_type_script_setup_true_lang.js +4 -4
  55. package/dist/lib/components/AcCostSummary.js +5 -0
  56. package/dist/lib/components/AcCostSummary.vue.d.ts +102 -0
  57. package/dist/lib/components/AcCostSummary.vue_vue_type_script_setup_true_lang.js +179 -0
  58. package/dist/lib/components/AcDatePicker.vue.d.ts +3 -3
  59. package/dist/lib/components/AcDatePicker.vue_vue_type_script_setup_true_lang.js +606 -380
  60. package/dist/lib/components/AcDeleteModal.vue_vue_type_script_setup_true_lang.js +47 -41
  61. package/dist/lib/components/AcDonutChart.vue.d.ts +10 -0
  62. package/dist/lib/components/AcDonutChart.vue_vue_type_script_setup_true_lang.js +116 -89
  63. package/dist/lib/components/AcDropdown.vue.d.ts +5 -2
  64. package/dist/lib/components/AcDropdown.vue_vue_type_script_setup_true_lang.js +88 -75
  65. package/dist/lib/components/AcDropdownDivider.vue_vue_type_script_setup_true_lang.js +11 -10
  66. package/dist/lib/components/AcDropdownItem.vue.d.ts +1 -1
  67. package/dist/lib/components/AcDropdownItem.vue_vue_type_script_setup_true_lang.js +17 -17
  68. package/dist/lib/components/AcEmptyState.vue.d.ts +1 -1
  69. package/dist/lib/components/AcErrorState.js +5 -0
  70. package/dist/lib/components/AcErrorState.vue.d.ts +46 -0
  71. package/dist/lib/components/AcErrorState.vue_vue_type_script_setup_true_lang.js +66 -0
  72. package/dist/lib/components/AcFeatureCard.vue.d.ts +6 -0
  73. package/dist/lib/components/AcFeatureCard.vue_vue_type_script_setup_true_lang.js +136 -114
  74. package/dist/lib/components/AcFooter.vue.d.ts +1 -1
  75. package/dist/lib/components/AcFooter.vue_vue_type_script_setup_true_lang.js +1 -1
  76. package/dist/lib/components/AcFormFooter.vue.d.ts +1 -1
  77. package/dist/lib/components/AcFormSection.vue.d.ts +1 -1
  78. package/dist/lib/components/AcGraphChart.js +5 -0
  79. package/dist/lib/components/AcGraphChart.vue.d.ts +124 -0
  80. package/dist/lib/components/AcGraphChart.vue_vue_type_script_setup_true_lang.js +578 -0
  81. package/dist/lib/components/AcHeader.vue.d.ts +20 -2
  82. package/dist/lib/components/AcHeader.vue_vue_type_script_setup_true_lang.js +84 -26
  83. package/dist/lib/components/AcInfoTable.vue.d.ts +1 -1
  84. package/dist/lib/components/AcInput.vue.d.ts +1 -1
  85. package/dist/lib/components/AcInput.vue_vue_type_script_setup_true_lang.js +76 -79
  86. package/dist/lib/components/AcKeyValueInput.vue.d.ts +4 -4
  87. package/dist/lib/components/AcKeyValueInput.vue_vue_type_script_setup_true_lang.js +199 -183
  88. package/dist/lib/components/AcLineChart.vue.d.ts +6 -0
  89. package/dist/lib/components/AcLineChart.vue_vue_type_script_setup_true_lang.js +113 -125
  90. package/dist/lib/components/AcLoader.js +5 -0
  91. package/dist/lib/components/AcLoader.vue.d.ts +15 -0
  92. package/dist/lib/components/AcLoader.vue_vue_type_script_setup_true_lang.js +66 -0
  93. package/dist/lib/components/AcLocaleSwitcher.vue.d.ts +3 -1
  94. package/dist/lib/components/AcLocaleSwitcher.vue_vue_type_script_setup_true_lang.js +44 -36
  95. package/dist/lib/components/AcMapChart.js +5 -0
  96. package/dist/lib/components/AcMapChart.vue.d.ts +136 -0
  97. package/dist/lib/components/AcMapChart.vue_vue_type_script_setup_true_lang.js +518 -0
  98. package/dist/lib/components/AcModal.vue.d.ts +6 -3
  99. package/dist/lib/components/AcModal.vue_vue_type_script_setup_true_lang.js +85 -61
  100. package/dist/lib/components/AcNavbar.vue.d.ts +8 -5
  101. package/dist/lib/components/AcNavbar.vue_vue_type_script_setup_true_lang.js +25 -17
  102. package/dist/lib/components/AcNavbarItem.vue.d.ts +2 -2
  103. package/dist/lib/components/AcNavbarItem.vue_vue_type_script_setup_true_lang.js +3 -4
  104. package/dist/lib/components/AcNotificationMenu.vue.d.ts +3 -3
  105. package/dist/lib/components/AcNotificationMenu.vue_vue_type_script_setup_true_lang.js +133 -168
  106. package/dist/lib/components/AcNumberInput.vue.d.ts +2 -2
  107. package/dist/lib/components/AcNumberInput.vue_vue_type_script_setup_true_lang.js +137 -147
  108. package/dist/lib/components/AcPage.vue.d.ts +2 -2
  109. package/dist/lib/components/AcPage.vue_vue_type_script_setup_true_lang.js +1 -1
  110. package/dist/lib/components/AcPagination.vue.d.ts +5 -5
  111. package/dist/lib/components/AcPagination.vue_vue_type_script_setup_true_lang.js +59 -56
  112. package/dist/lib/components/AcPreloader.vue.d.ts +3 -3
  113. package/dist/lib/components/AcPreloader.vue_vue_type_script_setup_true_lang.js +15 -16
  114. package/dist/lib/components/AcProductHero.js +5 -0
  115. package/dist/lib/components/AcProductHero.vue.d.ts +56 -0
  116. package/dist/lib/components/AcProductHero.vue_vue_type_script_setup_true_lang.js +95 -0
  117. package/dist/lib/components/AcProgress.vue.d.ts +17 -2
  118. package/dist/lib/components/AcProgress.vue_vue_type_script_setup_true_lang.js +83 -29
  119. package/dist/lib/components/AcResourceCard.vue.d.ts +1 -1
  120. package/dist/lib/components/AcResourceCard.vue_vue_type_script_setup_true_lang.js +4 -4
  121. package/dist/lib/components/AcSearchBar.vue.d.ts +1 -1
  122. package/dist/lib/components/AcSearchBar.vue_vue_type_script_setup_true_lang.js +8 -4
  123. package/dist/lib/components/AcSelect.vue.d.ts +3 -3
  124. package/dist/lib/components/AcSelect.vue_vue_type_script_setup_true_lang.js +232 -243
  125. package/dist/lib/components/AcSettingsRow.js +5 -0
  126. package/dist/lib/components/AcSettingsRow.vue.d.ts +29 -0
  127. package/dist/lib/components/AcSettingsRow.vue_vue_type_script_setup_true_lang.js +37 -0
  128. package/dist/lib/components/AcSidePanel.vue_vue_type_script_setup_true_lang.js +5 -5
  129. package/dist/lib/components/AcSideTabs.vue.d.ts +1 -1
  130. package/dist/lib/components/AcSidebar.vue.d.ts +4 -1
  131. package/dist/lib/components/AcSidebar.vue_vue_type_script_setup_true_lang.js +104 -94
  132. package/dist/lib/components/AcSidebarItem.vue.d.ts +1 -1
  133. package/dist/lib/components/AcSidebarItem.vue_vue_type_script_setup_true_lang.js +42 -42
  134. package/dist/lib/components/AcSidebarSection.vue.d.ts +2 -2
  135. package/dist/lib/components/AcSidebarSection.vue_vue_type_script_setup_true_lang.js +23 -18
  136. package/dist/lib/components/AcSteps.vue_vue_type_script_setup_true_lang.js +1 -1
  137. package/dist/lib/components/AcSwitch.vue.d.ts +3 -0
  138. package/dist/lib/components/AcSwitch.vue_vue_type_script_setup_true_lang.js +46 -39
  139. package/dist/lib/components/AcSwitchCard.vue.d.ts +3 -3
  140. package/dist/lib/components/AcSwitchCard.vue_vue_type_script_setup_true_lang.js +9 -7
  141. package/dist/lib/components/AcTable.vue_vue_type_script_setup_true_lang.js +65 -65
  142. package/dist/lib/components/AcTabs.vue.d.ts +9 -2
  143. package/dist/lib/components/AcTabs.vue_vue_type_script_setup_true_lang.js +42 -27
  144. package/dist/lib/components/AcTag.vue.d.ts +1 -1
  145. package/dist/lib/components/AcTagInput.vue.d.ts +5 -5
  146. package/dist/lib/components/AcTagInput.vue_vue_type_script_setup_true_lang.js +140 -142
  147. package/dist/lib/components/AcTextarea.vue.d.ts +1 -1
  148. package/dist/lib/components/AcTextarea.vue_vue_type_script_setup_true_lang.js +69 -72
  149. package/dist/lib/components/AcThemeMode.vue.d.ts +3 -3
  150. package/dist/lib/components/AcThemeMode.vue_vue_type_script_setup_true_lang.js +54 -22
  151. package/dist/lib/components/AcTimePicker.vue.d.ts +1 -1
  152. package/dist/lib/components/AcTimePicker.vue_vue_type_script_setup_true_lang.js +177 -185
  153. package/dist/lib/components/AcToaster.vue.d.ts +6 -3
  154. package/dist/lib/components/AcToaster.vue_vue_type_script_setup_true_lang.js +103 -64
  155. package/dist/lib/components/AcTooltip.vue.d.ts +34 -14
  156. package/dist/lib/components/AcTooltip.vue_vue_type_script_setup_true_lang.js +184 -70
  157. package/dist/lib/components/AcUserMenu.vue.d.ts +23 -1
  158. package/dist/lib/components/AcUserMenu.vue_vue_type_script_setup_true_lang.js +181 -138
  159. package/dist/lib/components/index.d.ts +7 -0
  160. package/dist/lib/components/status.d.ts +3 -1
  161. package/dist/lib/components/status.js +20 -5
  162. package/dist/lib/composables/useToast.d.ts +17 -1
  163. package/dist/lib/composables/useToast.js +10 -2
  164. package/dist/lib/index.d.ts +7 -3
  165. package/dist/lib/index.js +80 -73
  166. package/dist/lib/theme.css +39 -54
  167. package/package.json +12 -3
@@ -1,14 +1,14 @@
1
- import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as ee, createVNode as o, defineComponent as s, mergeModels as c, mergeProps as l, normalizeClass as u, onBeforeUnmount as d, openBlock as f, ref as p, renderList as te, renderSlot as ne, resolveDynamicComponent as re, toDisplayString as m, unref as h, useAttrs as g, useId as ie, useModel as ae, watch as oe, withModifiers as se } from "vue";
2
- import { CircleAlert as _, Minus as v, Plus as y } from "@lucide/vue";
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 b = ["for"], x = {
4
+ var re = ["for"], v = {
5
5
  key: 0,
6
- class: "font-normal text-muted"
7
- }, S = {
6
+ class: "text-muted"
7
+ }, ie = {
8
8
  key: 1,
9
9
  class: "text-danger",
10
10
  "aria-hidden": "true"
11
- }, C = ["id"], w = [
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
- ], T = { key: 0 }, E = {
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__*/ c({
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: !0
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__*/ c(["change"], ["update:modelValue"]),
72
- setup(s, { expose: c, emit: D }) {
73
- let O = s, k = ae(s, "modelValue"), A = D, j = ie(), M = g(), N = t(() => ({
74
- class: M.class,
75
- style: M.style
76
- })), P = t(() => {
77
- let { class: e, style: t, ...n } = M;
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
- }), F = p(null), I = p(K(k.value)), L = p(!1), R, z, B = t(() => O.precision ?? pe(O.step)), V = t(() => O.min === void 0 || O.min < 0), H = t(() => O.disabled || O.readonly), U = t(() => O.min !== void 0 && k.value !== null && k.value <= O.min), W = t(() => O.max !== void 0 && k.value !== null && k.value >= O.max), ue = t(() => {
80
- let e = k.value;
81
- if (!L.value || e === null) return "";
82
- let { min: t, max: n } = O;
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
- }), G = t(() => O.errorMsg || ue.value), de = t(() => [O.hint && `${j}-hint`, G.value && `${j}-msg`].filter(Boolean).join(" ") || void 0), fe = t(() => k.value === null ? void 0 : [I.value, O.unit].filter(Boolean).join(" "));
85
- function pe(e) {
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 K(e) {
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 Number(e.toFixed(B.value));
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 X(e) {
104
- let t = e !== k.value;
105
- k.value = e, I.value = K(e), t && A("change", e);
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 Z(e, t = 1) {
108
- H.value || X(J(q((k.value ?? 0) + e * O.step * t)));
97
+ function X(e, t = 1) {
98
+ I.value || Y(q(K((C.value ?? 0) + e * S.step * t)));
109
99
  }
110
- function me(e) {
100
+ function ce(e) {
111
101
  let t = e.target;
112
- if (!RegExp(`^${V.value ? "-?" : ""}\\d*${B.value > 0 ? "(\\.\\d*)?" : ""}$`).test(t.value)) {
113
- t.value = I.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
- I.value = t.value;
117
- let n = Y(t.value);
118
- (n !== null || t.value === "") && (k.value = n);
106
+ A.value = t.value;
107
+ let n = J(t.value);
108
+ (n !== null || t.value === "") && (C.value = n);
119
109
  }
120
- function Q() {
121
- let e = Y(I.value);
122
- X(e === null ? null : J(q(e)));
110
+ function Z() {
111
+ let e = J(A.value);
112
+ Y(e === null ? null : q(K(e)));
123
113
  }
124
- function he() {
125
- L.value = !1, Q();
114
+ function le() {
115
+ j.value = !1, Z();
126
116
  }
127
- function ge(e) {
117
+ function ue(e) {
128
118
  let t = {
129
- ArrowUp: () => Z(1),
130
- ArrowDown: () => Z(-1),
131
- PageUp: () => Z(1, 10),
132
- PageDown: () => Z(-1, 10)
119
+ ArrowUp: () => X(1),
120
+ ArrowDown: () => X(-1),
121
+ PageUp: () => X(1, 10),
122
+ PageDown: () => X(-1, 10)
133
123
  };
134
- if (O.min !== void 0 && (t.Home = () => !H.value && X(O.min)), O.max !== void 0 && (t.End = () => !H.value && X(O.max)), e.key === "Enter") return Q();
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(R), clearInterval(z);
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 _e(e, t) {
142
- e.button !== 0 || H.value || ($(), Z(t), R = setTimeout(() => {
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 ve(e, t) {
149
- e.detail === 0 && Z(t);
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 oe(k, (e) => {
152
- Y(I.value) !== e && (I.value = K(e));
153
- }), d($), c({ focus: () => F.value?.focus() }), (t, c) => (f(), i("div", l(N.value, {
154
- class: ["w-full", s.disabled && "opacity-50"],
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
- s.label ? (f(), i("label", {
163
+ a.label ? (u(), n("label", {
159
164
  key: 0,
160
- for: h(j),
165
+ for: m(T),
161
166
  class: "mb-2 flex items-center gap-1 text-base font-medium text-heading"
162
167
  }, [
163
- a("span", null, m(s.label), 1),
164
- s.readonly ? (f(), i("span", x, "(read only)")) : r("", !0),
165
- s.required ? (f(), i("span", S, "*")) : r("", !0)
166
- ], 8, b)) : r("", !0),
167
- s.hint ? (f(), i("p", {
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: `${h(j)}-hint`,
174
+ id: `${m(T)}-hint`,
170
175
  class: "mb-2 text-base text-muted"
171
- }, m(s.hint), 9, C)) : r("", !0),
172
- a("div", { class: u(["relative flex min-w-0 items-center rounded-10 border transition-[border-color,box-shadow,background-color] duration-200", [
173
- s.size === "small" ? "h-9" : "h-10",
174
- s.readonly ? "bg-surface-muted" : "bg-background",
175
- G.value ? "border-danger/60 focus-within:border-danger focus-within:shadow-[0_0_0_2px_color-mix(in_srgb,var(--color-danger)_20%,transparent)]" : ["border-border focus-within:focus-ring", !s.disabled && "hover:border-accent-active"]
176
- ]]) }, [
177
- a("input", l({
178
- id: h(j),
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: F
181
- }, P.value, {
194
+ ref: k
195
+ }, O.value, {
182
196
  type: "text",
183
197
  role: "spinbutton",
184
198
  autocomplete: "off",
185
- inputmode: B.value > 0 || V.value ? "decimal" : "numeric",
186
- value: I.value,
187
- name: s.name,
188
- disabled: s.disabled,
189
- readonly: s.readonly,
190
- required: s.required,
191
- "aria-valuenow": k.value ?? void 0,
192
- "aria-valuemin": s.min,
193
- "aria-valuemax": s.max,
194
- "aria-valuetext": fe.value,
195
- "aria-invalid": !!G.value || void 0,
196
- "aria-describedby": de.value,
197
- class: ["block h-full w-full min-w-0 flex-1 rounded-10 bg-transparent text-base font-normal text-heading tabular-nums outline-none placeholder:text-muted/80 disabled:cursor-not-allowed", [s.size === "small" ? "pl-3" : "pl-4", s.unit || t.$slots.suffix || s.stepButtons ? "pr-2" : s.size === "small" ? "pr-3" : "pr-4"]],
198
- onInput: me,
199
- onKeydown: ge,
200
- onFocus: c[0] ||= (e) => L.value = !0,
201
- onBlur: he
202
- }), null, 16, w),
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: u(["flex h-full shrink-0 items-center gap-1.5 text-base whitespace-nowrap text-muted select-none [&_svg]:size-4", s.stepButtons ? "pr-2" : "pr-3.5"]),
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
- }, [ne(t.$slots, "suffix"), s.unit ? (f(), i("span", T, m(s.unit), 1)) : r("", !0)], 2)) : r("", !0),
208
- s.stepButtons ? (f(), i("span", E, [(f(!0), i(e, null, te([{
209
- dir: -1,
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: u(["inline-flex shrink-0 cursor-pointer items-center justify-center rounded-8 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" ? "size-7" : "size-8"]),
223
- disabled: H.value || e.off,
224
- "aria-label": e.name,
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
- }))], 42, ce))), 128))])) : r("", !0)
237
- ], 2),
238
- G.value ? (f(), i("p", {
229
+ }, null, 8, ["class"])], 16)) : t("", !0)
230
+ ]),
231
+ B.value ? (u(), n("p", {
239
232
  key: 2,
240
- id: `${h(j)}-msg`,
241
- class: "mt-1.5 flex items-center gap-1.5 text-base text-danger-strong",
233
+ id: `${m(T)}-msg`,
234
+ class: "mt-1 text-base text-danger-strong",
242
235
  role: "alert"
243
- }, [o(h(_), {
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 { D as default };
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, 28px top and bottom (32px from 768px). Turn off when a parent already pads it. */
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 width), `full` fills the area. */
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 = {
@@ -25,7 +25,7 @@ var a = /*@__PURE__*/ t({
25
25
  class: n(["flex w-full min-w-0 flex-col", [
26
26
  a[t.gap],
27
27
  o[t.width],
28
- t.padded && "px-4 py-7 md:py-8"
28
+ t.padded && "px-4 py-8"
29
29
  ]]),
30
30
  "data-ac-ds": "",
31
31
  "data-testid": "ac-page"
@@ -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–60" with `items-on-page`) and Next follows `has-next`. */
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–60" when `total` is unknown. Cloud-ui's `pagination.count`. */
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 "Rows per page" select. */
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–10 of 57 databases". */
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 32px). Use it inside cards and dense tables. */
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-1.5" }, E = ["disabled"], D = { class: "px-2 whitespace-nowrap tabular-nums" }, O = { class: "font-medium text-heading" }, k = { class: "font-medium text-heading" }, A = [
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
- ], j = ["disabled"], M = /*@__PURE__*/ c({
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 M = c, N = h(c, "page"), P = h(c, "pageSize"), F = l, I = n(() => [M.size === "small" ? "h-7 min-w-7 px-1.5 text-xs" : "h-8 min-w-8 px-2 text-base", !M.compact && (M.size === "small" ? "sm:px-2" : "sm:px-2.5")]), L = n(() => M.size === "small" ? "h-7 min-w-7 text-xs" : "h-8 min-w-8 text-base"), R = n(() => typeof M.total == "number"), z = n(() => Math.max(0, M.total ?? 0)), B = n(() => Math.max(1, P.value)), V = n(() => !R.value || M.knownPages !== void 0), H = n(() => R.value ? Math.max(1, Math.ceil(z.value / B.value)) : Math.max(1, N.value, ...M.knownPages ?? [])), U = n(() => Math.min(Math.max(1, N.value), H.value)), W = n(() => M.hasPrev ?? U.value > 1), G = n(() => M.hasNext ?? U.value < H.value), K = n(() => {
71
- let e = (U.value - 1) * B.value;
72
- return R.value ? {
73
- start: Math.min(e, z.value),
74
- end: Math.min(U.value * B.value, z.value)
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, M.itemsOnPage ?? B.value)
80
+ end: e + Math.max(0, N.itemsOnPage ?? V.value)
78
81
  };
79
- }), q = n(() => {
80
- let e = M.itemLabel ? ` ${M.itemLabel}` : "";
81
- return R.value ? z.value ? `Showing ${K.value.start + 1}–${K.value.end} of ${z.value}${e}` : `0${e || " items"}` : M.itemsOnPage === void 0 ? `Page ${U.value}` : M.itemsOnPage ? `Showing ${K.value.start + 1}–${K.value.end}${e}` : U.value === 1 ? `0${e || " items"}` : `Page ${U.value}`;
82
- }), J = n(() => (M.pageSizes.includes(P.value) ? M.pageSizes : [...M.pageSizes, P.value].sort((e, t) => e - t)).map((e) => ({
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
- }))), Y = n(() => {
86
- let e = H.value, t = U.value, n = Math.max(0, M.siblings);
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
- if (M.disabled) return;
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
- !M.disabled && (e > 0 ? G.value : W.value) && (Z(U.value + e), F(e > 0 ? "next" : "prev", N.value));
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 === P.value) return;
119
- let n = K.value.start;
120
- P.value = t, N.value = V.value ? 1 : Math.floor(n / t) + 1;
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(H, (e) => {
123
- R.value && N.value > e && (N.value = e);
124
- }), g(K, (e) => F("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
+ 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
- }, "Rows per page", -1), a("div", S, [s(e, {
128
- "model-value": P.value,
129
- options: J.value,
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: "Rows per page",
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(q.value), 1)]), a("nav", w, [a("ul", T, [
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 gap-1 rounded-10 border border-border bg-background 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-background", I.value]),
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 || !W.value,
146
+ disabled: c.disabled || !G.value,
144
147
  "data-ac-ds": "",
145
148
  "data-testid": "ac-pagination-prev",
146
- onClick: l[0] ||= (e) => Q(-1)
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, [R.value ? (d(), i(t, { key: 0 }, [
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(U.value), 1),
154
- o(" / " + p(H.value), 1)
155
- ], 64)) : (d(), i(t, { key: 1 }, [l[4] ||= o("Page ", -1), a("span", k, p(U.value), 1)], 64))])], 2),
156
- c.compact ? r("", !0) : (d(!0), i(t, { key: 0 }, f(Y.value, (e) => (d(), i("li", {
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: "hidden sm:flex"
161
+ class: "flex"
159
162
  }, [typeof e == "string" ? (d(), i("span", {
160
163
  key: 0,
161
- class: u(["inline-flex w-5 items-center justify-center text-muted", c.size === "small" ? "h-7" : "h-8"]),
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-10 border px-2 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", [L.value, e === U.value ? "border-primary bg-primary text-white" : "border-border bg-background text-heading hover:bg-accent-hover disabled:hover:bg-background"]]),
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 === U.value ? "page" : void 0,
169
- disabled: c.disabled || !X(e),
170
- onClick: (t) => Z(e)
171
- }, p(e), 11, A))]))), 128)),
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 gap-1 rounded-10 border border-border bg-background 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-background", I.value]),
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 || !G.value,
179
+ disabled: c.disabled || !K.value,
177
180
  "data-ac-ds": "",
178
181
  "data-testid": "ac-pagination-next",
179
- onClick: l[1] ||= (e) => Q(1)
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, j)])
186
+ }, null, 8, ["class"])], 10, M)])
184
187
  ])])]));
185
188
  }
186
189
  });
187
190
  //#endregion
188
- export { M as default };
191
+ export { N as default };
@@ -1,9 +1,9 @@
1
1
  export interface Props {
2
- /** Text under the spinner, e.g. "Fetching resource layout". Also announced to screen readers. */
2
+ /** Text under the loader, e.g. "Fetching resource layout". Also announced to screen readers. */
3
3
  message?: string;
4
- /** Shows the spinner. Turn off to show the message alone. */
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 32px spinner, for app start-up and sign-in checks. */
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;