@ac-design/design-system 1.0.3 → 2.0.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.
Files changed (186) hide show
  1. package/README.md +27 -18
  2. package/dist/lib/charts/ChartFrame.js +5 -0
  3. package/dist/lib/charts/ChartFrame.vue.d.ts +69 -0
  4. package/dist/lib/charts/ChartFrame.vue_vue_type_script_setup_true_lang.js +168 -0
  5. package/dist/lib/charts/index.d.ts +7 -0
  6. package/dist/lib/charts/index.js +5 -0
  7. package/dist/lib/charts/shared.d.ts +60 -0
  8. package/dist/lib/charts/shared.js +114 -0
  9. package/dist/lib/charts/xy.d.ts +65 -0
  10. package/dist/lib/charts/xy.js +92 -0
  11. package/dist/lib/compat.css +1707 -1042
  12. package/dist/lib/components/AcAccordion.vue_vue_type_script_setup_true_lang.js +2 -2
  13. package/dist/lib/components/AcAccordionItem.vue.d.ts +1 -1
  14. package/dist/lib/components/AcAccordionItem.vue_vue_type_script_setup_true_lang.js +5 -5
  15. package/dist/lib/components/AcAlert.vue.d.ts +1 -1
  16. package/dist/lib/components/AcAlert.vue_vue_type_script_setup_true_lang.js +19 -25
  17. package/dist/lib/components/AcAppSwitcher.vue_vue_type_script_setup_true_lang.js +19 -19
  18. package/dist/lib/components/AcAreaChart.js +5 -0
  19. package/dist/lib/components/AcAreaChart.vue.d.ts +44 -0
  20. package/dist/lib/components/AcAreaChart.vue_vue_type_script_setup_true_lang.js +215 -0
  21. package/dist/lib/components/AcAvatar.vue_vue_type_script_setup_true_lang.js +8 -8
  22. package/dist/lib/components/AcBadge.vue.d.ts +16 -7
  23. package/dist/lib/components/AcBadge.vue_vue_type_script_setup_true_lang.js +59 -43
  24. package/dist/lib/components/AcBanner.vue.d.ts +1 -1
  25. package/dist/lib/components/AcBanner.vue_vue_type_script_setup_true_lang.js +30 -30
  26. package/dist/lib/components/AcBarChart.js +5 -0
  27. package/dist/lib/components/AcBarChart.vue.d.ts +43 -0
  28. package/dist/lib/components/AcBarChart.vue_vue_type_script_setup_true_lang.js +217 -0
  29. package/dist/lib/components/AcBreadcrumb.vue_vue_type_script_setup_true_lang.js +27 -26
  30. package/dist/lib/components/AcBulkActionBar.js +5 -0
  31. package/dist/lib/components/AcBulkActionBar.vue.d.ts +43 -0
  32. package/dist/lib/components/AcBulkActionBar.vue_vue_type_script_setup_true_lang.js +84 -0
  33. package/dist/lib/components/AcButton.vue.d.ts +3 -3
  34. package/dist/lib/components/AcButton.vue_vue_type_script_setup_true_lang.js +42 -34
  35. package/dist/lib/components/AcButtons.vue_vue_type_script_setup_true_lang.js +1 -1
  36. package/dist/lib/components/AcCard.vue.d.ts +10 -2
  37. package/dist/lib/components/AcCard.vue_vue_type_script_setup_true_lang.js +37 -11
  38. package/dist/lib/components/AcCellValue.vue.d.ts +4 -1
  39. package/dist/lib/components/AcCellValue.vue_vue_type_script_setup_true_lang.js +214 -179
  40. package/dist/lib/components/AcCheckBox.vue.d.ts +17 -3
  41. package/dist/lib/components/AcCheckBox.vue_vue_type_script_setup_true_lang.js +126 -29
  42. package/dist/lib/components/AcCheckRadio.vue.d.ts +1 -1
  43. package/dist/lib/components/AcCheckRadio.vue_vue_type_script_setup_true_lang.js +33 -21
  44. package/dist/lib/components/AcCircularProgress.js +5 -0
  45. package/dist/lib/components/AcCircularProgress.vue.d.ts +44 -0
  46. package/dist/lib/components/AcCircularProgress.vue_vue_type_script_setup_true_lang.js +111 -0
  47. package/dist/lib/components/AcClusterSwitcher.vue_vue_type_script_setup_true_lang.js +142 -167
  48. package/dist/lib/components/AcCodeEditor.vue_vue_type_script_setup_true_lang.js +9 -9
  49. package/dist/lib/components/AcColorInput.js +5 -0
  50. package/dist/lib/components/AcColorInput.vue.d.ts +54 -0
  51. package/dist/lib/components/AcColorInput.vue_vue_type_script_setup_true_lang.js +187 -0
  52. package/dist/lib/components/AcConfirmModal.js +5 -0
  53. package/dist/lib/components/AcConfirmModal.vue.d.ts +56 -0
  54. package/dist/lib/components/AcConfirmModal.vue_vue_type_script_setup_true_lang.js +92 -0
  55. package/dist/lib/components/AcContentHeader.vue.d.ts +1 -1
  56. package/dist/lib/components/AcContentHeader.vue_vue_type_script_setup_true_lang.js +5 -4
  57. package/dist/lib/components/AcContentLayout.vue_vue_type_script_setup_true_lang.js +2 -2
  58. package/dist/lib/components/AcCopyButton.js +5 -0
  59. package/dist/lib/components/AcCopyButton.vue.d.ts +43 -0
  60. package/dist/lib/components/AcCopyButton.vue_vue_type_script_setup_true_lang.js +92 -0
  61. package/dist/lib/components/AcDatePicker.vue.d.ts +5 -5
  62. package/dist/lib/components/AcDatePicker.vue_vue_type_script_setup_true_lang.js +204 -213
  63. package/dist/lib/components/AcDeleteModal.vue.d.ts +4 -4
  64. package/dist/lib/components/AcDeleteModal.vue_vue_type_script_setup_true_lang.js +37 -46
  65. package/dist/lib/components/AcDonutChart.js +5 -0
  66. package/dist/lib/components/AcDonutChart.vue.d.ts +73 -0
  67. package/dist/lib/components/AcDonutChart.vue_vue_type_script_setup_true_lang.js +210 -0
  68. package/dist/lib/components/AcDropdown.vue.d.ts +1 -1
  69. package/dist/lib/components/AcDropdown.vue_vue_type_script_setup_true_lang.js +9 -9
  70. package/dist/lib/components/AcDropdownDivider.vue_vue_type_script_setup_true_lang.js +2 -2
  71. package/dist/lib/components/AcDropdownItem.vue.d.ts +1 -1
  72. package/dist/lib/components/AcDropdownItem.vue_vue_type_script_setup_true_lang.js +3 -3
  73. package/dist/lib/components/AcEmptyState.vue.d.ts +4 -1
  74. package/dist/lib/components/AcEmptyState.vue_vue_type_script_setup_true_lang.js +50 -39
  75. package/dist/lib/components/AcFeatureCard.vue_vue_type_script_setup_true_lang.js +14 -13
  76. package/dist/lib/components/AcFileEditor.vue_vue_type_script_setup_true_lang.js +16 -16
  77. package/dist/lib/components/AcFileUpload.vue.d.ts +2 -2
  78. package/dist/lib/components/AcFileUpload.vue_vue_type_script_setup_true_lang.js +55 -53
  79. package/dist/lib/components/AcFontScale.vue_vue_type_script_setup_true_lang.js +2 -2
  80. package/dist/lib/components/AcFooter.js +5 -0
  81. package/dist/lib/components/AcFooter.vue.d.ts +37 -0
  82. package/dist/lib/components/AcFooter.vue_vue_type_script_setup_true_lang.js +107 -0
  83. package/dist/lib/components/AcForm.vue.d.ts +3 -0
  84. package/dist/lib/components/AcForm.vue_vue_type_script_setup_true_lang.js +4 -2
  85. package/dist/lib/components/AcFormArray.vue.d.ts +2 -2
  86. package/dist/lib/components/AcFormArray.vue_vue_type_script_setup_true_lang.js +149 -147
  87. package/dist/lib/components/AcFormFooter.vue.d.ts +2 -2
  88. package/dist/lib/components/AcFormFooter.vue_vue_type_script_setup_true_lang.js +2 -2
  89. package/dist/lib/components/AcFormSection.vue.d.ts +7 -0
  90. package/dist/lib/components/AcFormSection.vue_vue_type_script_setup_true_lang.js +31 -21
  91. package/dist/lib/components/AcHeader.vue.d.ts +3 -3
  92. package/dist/lib/components/AcHeader.vue_vue_type_script_setup_true_lang.js +22 -22
  93. package/dist/lib/components/AcInfoTable.vue_vue_type_script_setup_true_lang.js +17 -13
  94. package/dist/lib/components/AcInput.vue.d.ts +3 -3
  95. package/dist/lib/components/AcInput.vue_vue_type_script_setup_true_lang.js +98 -87
  96. package/dist/lib/components/AcKbd.vue_vue_type_script_setup_true_lang.js +1 -1
  97. package/dist/lib/components/AcKeyValueInput.js +5 -0
  98. package/dist/lib/components/AcKeyValueInput.vue.d.ts +114 -0
  99. package/dist/lib/components/AcKeyValueInput.vue_vue_type_script_setup_true_lang.js +320 -0
  100. package/dist/lib/components/AcLineChart.js +5 -0
  101. package/dist/lib/components/AcLineChart.vue.d.ts +38 -0
  102. package/dist/lib/components/AcLineChart.vue_vue_type_script_setup_true_lang.js +187 -0
  103. package/dist/lib/components/AcLocaleSwitcher.js +5 -0
  104. package/dist/lib/components/AcLocaleSwitcher.vue.d.ts +46 -0
  105. package/dist/lib/components/AcLocaleSwitcher.vue_vue_type_script_setup_true_lang.js +103 -0
  106. package/dist/lib/components/AcModal.vue_vue_type_script_setup_true_lang.js +23 -23
  107. package/dist/lib/components/AcNavbar.vue_vue_type_script_setup_true_lang.js +6 -6
  108. package/dist/lib/components/AcNavbarItem.vue.d.ts +1 -1
  109. package/dist/lib/components/AcNavbarItem.vue_vue_type_script_setup_true_lang.js +22 -22
  110. package/dist/lib/components/AcNotificationMenu.vue_vue_type_script_setup_true_lang.js +26 -26
  111. package/dist/lib/components/AcNumberInput.js +5 -0
  112. package/dist/lib/components/AcNumberInput.vue.d.ts +79 -0
  113. package/dist/lib/components/AcNumberInput.vue_vue_type_script_setup_true_lang.js +251 -0
  114. package/dist/lib/components/AcPage.vue.d.ts +2 -2
  115. package/dist/lib/components/AcPage.vue_vue_type_script_setup_true_lang.js +2 -2
  116. package/dist/lib/components/AcPagination.vue.d.ts +20 -3
  117. package/dist/lib/components/AcPagination.vue_vue_type_script_setup_true_lang.js +81 -53
  118. package/dist/lib/components/AcPreloader.vue.d.ts +1 -1
  119. package/dist/lib/components/AcPreloader.vue_vue_type_script_setup_true_lang.js +3 -3
  120. package/dist/lib/components/AcProgress.vue.d.ts +2 -2
  121. package/dist/lib/components/AcProgress.vue_vue_type_script_setup_true_lang.js +4 -4
  122. package/dist/lib/components/AcResourceCard.vue.d.ts +2 -2
  123. package/dist/lib/components/AcResourceCard.vue_vue_type_script_setup_true_lang.js +13 -13
  124. package/dist/lib/components/AcSearchBar.vue.d.ts +1 -1
  125. package/dist/lib/components/AcSearchBar.vue_vue_type_script_setup_true_lang.js +9 -8
  126. package/dist/lib/components/AcSectionContent.vue.d.ts +2 -2
  127. package/dist/lib/components/AcSectionContent.vue_vue_type_script_setup_true_lang.js +8 -8
  128. package/dist/lib/components/AcSegmentedControl.vue.d.ts +1 -1
  129. package/dist/lib/components/AcSegmentedControl.vue_vue_type_script_setup_true_lang.js +4 -4
  130. package/dist/lib/components/AcSelect.vue.d.ts +4 -4
  131. package/dist/lib/components/AcSelect.vue_vue_type_script_setup_true_lang.js +230 -227
  132. package/dist/lib/components/AcSidePanel.vue_vue_type_script_setup_true_lang.js +31 -31
  133. package/dist/lib/components/AcSideTabs.vue.d.ts +1 -1
  134. package/dist/lib/components/AcSideTabs.vue_vue_type_script_setup_true_lang.js +37 -37
  135. package/dist/lib/components/AcSidebar.vue.d.ts +3 -3
  136. package/dist/lib/components/AcSidebar.vue_vue_type_script_setup_true_lang.js +75 -75
  137. package/dist/lib/components/AcSidebarItem.vue_vue_type_script_setup_true_lang.js +33 -32
  138. package/dist/lib/components/AcSidebarSection.vue_vue_type_script_setup_true_lang.js +6 -6
  139. package/dist/lib/components/AcSkeleton.vue_vue_type_script_setup_true_lang.js +8 -8
  140. package/dist/lib/components/AcSlider.vue.d.ts +1 -1
  141. package/dist/lib/components/AcSlider.vue_vue_type_script_setup_true_lang.js +174 -172
  142. package/dist/lib/components/AcStatCard.vue.d.ts +3 -3
  143. package/dist/lib/components/AcStatCard.vue_vue_type_script_setup_true_lang.js +90 -85
  144. package/dist/lib/components/AcStatusBar.vue.d.ts +1 -1
  145. package/dist/lib/components/AcStatusBar.vue_vue_type_script_setup_true_lang.js +6 -6
  146. package/dist/lib/components/AcSteps.vue_vue_type_script_setup_true_lang.js +28 -28
  147. package/dist/lib/components/AcSwitch.vue_vue_type_script_setup_true_lang.js +39 -34
  148. package/dist/lib/components/AcSwitchCard.js +5 -0
  149. package/dist/lib/components/AcSwitchCard.vue.d.ts +59 -0
  150. package/dist/lib/components/AcSwitchCard.vue_vue_type_script_setup_true_lang.js +119 -0
  151. package/dist/lib/components/AcTable.vue_vue_type_script_setup_true_lang.js +87 -87
  152. package/dist/lib/components/AcTabs.vue_vue_type_script_setup_true_lang.js +4 -4
  153. package/dist/lib/components/AcTag.vue.d.ts +1 -1
  154. package/dist/lib/components/AcTag.vue_vue_type_script_setup_true_lang.js +22 -22
  155. package/dist/lib/components/AcTagInput.js +5 -0
  156. package/dist/lib/components/AcTagInput.vue.d.ts +74 -0
  157. package/dist/lib/components/AcTagInput.vue_vue_type_script_setup_true_lang.js +291 -0
  158. package/dist/lib/components/AcTextarea.vue.d.ts +3 -3
  159. package/dist/lib/components/AcTextarea.vue_vue_type_script_setup_true_lang.js +89 -64
  160. package/dist/lib/components/AcThemeMode.vue_vue_type_script_setup_true_lang.js +3 -3
  161. package/dist/lib/components/AcTimePicker.js +5 -0
  162. package/dist/lib/components/AcTimePicker.vue.d.ts +65 -0
  163. package/dist/lib/components/AcTimePicker.vue_vue_type_script_setup_true_lang.js +463 -0
  164. package/dist/lib/components/AcToaster.vue_vue_type_script_setup_true_lang.js +65 -71
  165. package/dist/lib/components/AcTooltip.vue.d.ts +1 -1
  166. package/dist/lib/components/AcTooltip.vue_vue_type_script_setup_true_lang.js +77 -67
  167. package/dist/lib/components/AcUsageCard.vue_vue_type_script_setup_true_lang.js +27 -27
  168. package/dist/lib/components/AcUserMenu.vue_vue_type_script_setup_true_lang.js +111 -103
  169. package/dist/lib/components/index.d.ts +14 -2
  170. package/dist/lib/components/status.d.ts +26 -0
  171. package/dist/lib/components/status.js +110 -0
  172. package/dist/lib/composables/copyText.d.ts +2 -1
  173. package/dist/lib/composables/copyText.js +2 -2
  174. package/dist/lib/composables/useApiPagination.d.ts +55 -0
  175. package/dist/lib/composables/useApiPagination.js +58 -0
  176. package/dist/lib/composables/useBulkSelection.d.ts +44 -0
  177. package/dist/lib/composables/useBulkSelection.js +41 -0
  178. package/dist/lib/composables/useFormValidation.d.ts +65 -0
  179. package/dist/lib/composables/useFormValidation.js +148 -0
  180. package/dist/lib/composables/useTablePagination.d.ts +49 -0
  181. package/dist/lib/composables/useTablePagination.js +41 -0
  182. package/dist/lib/editor/theme.js +65 -62
  183. package/dist/lib/index.d.ts +14 -0
  184. package/dist/lib/index.js +95 -78
  185. package/dist/lib/theme.css +391 -272
  186. package/package.json +11 -4
@@ -1,5 +1,5 @@
1
1
  export interface Props {
2
- /** The hint text. Keep it to a few words; use the `content` slot for richer text. */
2
+ /** The hint text, in a dark bubble up to 280px wide. Keep it to a few words; use the `content` slot for richer text. */
3
3
  content?: string;
4
4
  /** Preferred side of the trigger. It flips to the opposite side when there isn't room. */
5
5
  placement?: "top" | "bottom" | "left" | "right";
@@ -1,6 +1,6 @@
1
- import { Teleport as e, Transition as t, computed as n, createBlock as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, nextTick as l, normalizeStyle as u, onBeforeUnmount as d, onMounted as f, onUpdated as p, openBlock as m, ref as h, renderSlot as g, toDisplayString as _, useId as v, useSlots as y, vShow as b, watch as x, withCtx as S, withDirectives as C } from "vue";
1
+ import { Teleport as e, Transition as t, computed as n, createBlock as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, nextTick as l, normalizeClass as u, normalizeStyle as d, onBeforeUnmount as f, onMounted as p, onUpdated as m, openBlock as h, ref as g, renderSlot as _, toDisplayString as v, useId as y, useSlots as b, vShow as x, watch as S, withCtx as C, withDirectives as w } from "vue";
2
2
  //#region src/lib/components/AcTooltip.vue?vue&type=script&setup=true&lang.ts
3
- var w = ["data-side"], T = 6, E = 8, D = /*@__PURE__*/ c({
3
+ var T = ["data-side"], E = 8, D = 8, O = /*@__PURE__*/ c({
4
4
  __name: "AcTooltip",
5
5
  props: {
6
6
  content: { default: "" },
@@ -12,106 +12,116 @@ var w = ["data-side"], T = 6, E = 8, D = /*@__PURE__*/ c({
12
12
  }
13
13
  },
14
14
  setup(c) {
15
- let D = c, O = y(), k = {
15
+ let O = c, k = b(), A = {
16
16
  top: "bottom",
17
17
  bottom: "top",
18
18
  left: "right",
19
19
  right: "left"
20
- }, A = `${v()}-tip`, j = h(null), M = h(null), N = h(!1), P = h(D.placement), F = h({
20
+ }, j = {
21
+ top: "translate-y-1",
22
+ bottom: "-translate-y-1",
23
+ left: "translate-x-1",
24
+ right: "-translate-x-1"
25
+ }, M = {
26
+ top: "origin-bottom",
27
+ bottom: "origin-top",
28
+ left: "origin-right",
29
+ right: "origin-left"
30
+ }, N = `${y()}-tip`, P = g(null), F = g(null), I = g(!1), L = g(O.placement), R = g({
21
31
  top: 0,
22
32
  left: 0
23
- }), I, L, R = null, z = n(() => !D.disabled && !!(D.content || O.content));
24
- function B() {
25
- let e = j.value;
33
+ }), z, B, V = null, H = n(() => !O.disabled && !!(O.content || k.content));
34
+ function U() {
35
+ let e = P.value;
26
36
  return e?.querySelector("button, a[href], input, select, textarea, [tabindex]") ?? e?.firstElementChild ?? null;
27
37
  }
28
- function V() {
29
- let e = B();
30
- if (R && R !== e && H(R), R = e, !e) return;
31
- let t = (e.getAttribute("aria-describedby") ?? "").split(" ").filter((e) => e && e !== A);
32
- z.value && t.push(A), t.length ? e.setAttribute("aria-describedby", t.join(" ")) : e.removeAttribute("aria-describedby");
38
+ function W() {
39
+ let e = U();
40
+ if (V && V !== e && G(V), V = e, !e) return;
41
+ let t = (e.getAttribute("aria-describedby") ?? "").split(" ").filter((e) => e && e !== N);
42
+ H.value && t.push(N), t.length ? e.setAttribute("aria-describedby", t.join(" ")) : e.removeAttribute("aria-describedby");
33
43
  }
34
- function H(e) {
35
- let t = (e.getAttribute("aria-describedby") ?? "").split(" ").filter((e) => e && e !== A);
44
+ function G(e) {
45
+ let t = (e.getAttribute("aria-describedby") ?? "").split(" ").filter((e) => e && e !== N);
36
46
  t.length ? e.setAttribute("aria-describedby", t.join(" ")) : e.removeAttribute("aria-describedby");
37
47
  }
38
- function U(e) {
39
- clearTimeout(L), z.value && !N.value && (clearTimeout(I), I = setTimeout(async () => {
40
- N.value = !0, await l(), K();
48
+ function K(e) {
49
+ clearTimeout(B), H.value && !I.value && (clearTimeout(z), z = setTimeout(async () => {
50
+ I.value = !0, await l(), Y();
41
51
  }, e));
42
52
  }
43
- function W(e = 0) {
44
- clearTimeout(I), clearTimeout(L), e ? L = setTimeout(() => N.value = !1, e) : N.value = !1;
53
+ function q(e = 0) {
54
+ clearTimeout(z), clearTimeout(B), e ? B = setTimeout(() => I.value = !1, e) : I.value = !1;
45
55
  }
46
- function G(e, t, n, r) {
47
- return e === "top" ? t.top - T - r >= E : e === "bottom" ? t.bottom + T + r <= window.innerHeight - E : e === "left" ? t.left - T - n >= E : t.right + T + n <= window.innerWidth - E;
56
+ function J(e, t, n, r) {
57
+ return e === "top" ? t.top - E - r >= D : e === "bottom" ? t.bottom + E + r <= window.innerHeight - D : e === "left" ? t.left - E - n >= D : t.right + E + n <= window.innerWidth - D;
48
58
  }
49
- function K() {
50
- let e = B() ?? j.value;
51
- if (!e || !M.value) return;
52
- let t = e.getBoundingClientRect(), { offsetWidth: n, offsetHeight: r } = M.value, i = D.placement, a = G(i, t, n, r) || !G(k[i], t, n, r) ? i : k[i], o = (e, t) => Math.max(E, Math.min(e, t - E));
53
- P.value = a, F.value = a === "top" || a === "bottom" ? {
54
- top: a === "top" ? t.top - T - r : t.bottom + T,
59
+ function Y() {
60
+ let e = U() ?? P.value;
61
+ if (!e || !F.value) return;
62
+ let t = e.getBoundingClientRect(), { offsetWidth: n, offsetHeight: r } = F.value, i = O.placement, a = J(i, t, n, r) || !J(A[i], t, n, r) ? i : A[i], o = (e, t) => Math.max(D, Math.min(e, t - D));
63
+ L.value = a, R.value = a === "top" || a === "bottom" ? {
64
+ top: a === "top" ? t.top - E - r : t.bottom + E,
55
65
  left: o(t.left + t.width / 2 - n / 2, window.innerWidth - n)
56
66
  } : {
57
67
  top: o(t.top + t.height / 2 - r / 2, window.innerHeight - r),
58
- left: a === "left" ? t.left - T - n : t.right + T
68
+ left: a === "left" ? t.left - E - n : t.right + E
59
69
  };
60
70
  }
61
- function q(e) {
62
- e.pointerType !== "touch" && U(D.delay);
71
+ function X(e) {
72
+ e.pointerType !== "touch" && K(O.delay);
63
73
  }
64
- function J(e) {
65
- e.target.matches(":focus-visible") && U(0);
74
+ function Z(e) {
75
+ e.target.matches(":focus-visible") && K(0);
66
76
  }
67
- function Y() {
68
- W();
77
+ function Q() {
78
+ q();
69
79
  }
70
- function X(e) {
71
- e.key === "Escape" && N.value && W();
80
+ function $(e) {
81
+ e.key === "Escape" && I.value && q();
72
82
  }
73
- return x(N, (e) => {
74
- e ? (document.addEventListener("keydown", X), window.addEventListener("scroll", Y, !0)) : (document.removeEventListener("keydown", X), window.removeEventListener("scroll", Y, !0));
75
- }), x(z, (e) => {
76
- V(), e || W();
77
- }), f(V), p(V), d(() => {
78
- W(), document.removeEventListener("keydown", X), window.removeEventListener("scroll", Y, !0), R && H(R);
79
- }), (n, l) => (m(), i("span", {
83
+ return S(I, (e) => {
84
+ e ? (document.addEventListener("keydown", $), window.addEventListener("scroll", Q, !0)) : (document.removeEventListener("keydown", $), window.removeEventListener("scroll", Q, !0));
85
+ }), S(H, (e) => {
86
+ W(), e || q();
87
+ }), p(W), m(W), f(() => {
88
+ q(), document.removeEventListener("keydown", $), window.removeEventListener("scroll", Q, !0), V && G(V);
89
+ }), (n, l) => (h(), i("span", {
80
90
  ref_key: "root",
81
- ref: j,
91
+ ref: P,
82
92
  class: "inline-flex max-w-full",
83
93
  "data-ac-ds": "",
84
94
  "data-testid": "ac-tooltip",
85
- onPointerenter: q,
86
- onPointerleave: l[2] ||= (e) => W(100),
87
- onPointerdown: l[3] ||= (e) => W(),
88
- onFocusin: J,
89
- onFocusout: l[4] ||= (e) => W()
90
- }, [g(n.$slots, "default"), (m(), r(e, { to: "body" }, [s(t, {
91
- "enter-active-class": "transition-opacity duration-100 ease-out",
92
- "enter-from-class": "opacity-0",
93
- "leave-active-class": "transition-opacity duration-75 ease-in",
94
- "leave-to-class": "opacity-0"
95
+ onPointerenter: X,
96
+ onPointerleave: l[2] ||= (e) => q(100),
97
+ onPointerdown: l[3] ||= (e) => q(),
98
+ onFocusin: Z,
99
+ onFocusout: l[4] ||= (e) => q()
100
+ }, [_(n.$slots, "default"), (h(), r(e, { to: "body" }, [s(t, {
101
+ "enter-active-class": "transition-[opacity,scale,translate] duration-150 ease-out motion-reduce:transition-none",
102
+ "enter-from-class": `opacity-0 scale-95 ${j[L.value ?? "top"]}`,
103
+ "leave-active-class": "transition-[opacity,scale] duration-100 ease-in motion-reduce:transition-none",
104
+ "leave-to-class": "opacity-0 scale-95"
95
105
  }, {
96
- default: S(() => [C(a("div", {
97
- id: A,
106
+ default: C(() => [w(a("div", {
107
+ id: N,
98
108
  ref_key: "tip",
99
- ref: M,
109
+ ref: F,
100
110
  role: "tooltip",
101
- class: "fixed z-[100] w-max max-w-64 rounded-6 bg-slate-10 px-2 py-1 text-xs font-medium text-slate-95 shadow-md dark:bg-slate-80 dark:text-slate-10 dark:ring-1 dark:ring-slate-70",
102
- "data-side": P.value,
103
- style: u({
104
- top: `${F.value.top}px`,
105
- left: `${F.value.left}px`
111
+ class: u(["fixed z-[100] w-max max-w-[280px] rounded-10 border border-white/10 bg-tooltip px-2.5 py-1.5 text-xs leading-relaxed break-words whitespace-normal text-on-tooltip shadow-lg shadow-black/25", M[L.value ?? "top"]]),
112
+ "data-side": L.value,
113
+ style: d({
114
+ top: `${R.value.top}px`,
115
+ left: `${R.value.left}px`
106
116
  }),
107
117
  "data-ac-ds": "",
108
118
  "data-testid": "ac-tooltip-panel",
109
- onPointerenter: l[0] ||= (e) => U(0),
110
- onPointerleave: l[1] ||= (e) => W(100)
111
- }, [g(n.$slots, "content", {}, () => [o(_(c.content), 1)])], 44, w), [[b, N.value]])]),
119
+ onPointerenter: l[0] ||= (e) => K(0),
120
+ onPointerleave: l[1] ||= (e) => q(100)
121
+ }, [_(n.$slots, "content", {}, () => [o(v(c.content), 1)])], 46, T), [[x, I.value]])]),
112
122
  _: 3
113
- })]))], 544));
123
+ }, 8, ["enter-from-class"])]))], 544));
114
124
  }
115
125
  });
116
126
  //#endregion
117
- export { D as default };
127
+ export { O as default };
@@ -1,20 +1,20 @@
1
1
  import e from "./AcBadge.js";
2
2
  import { Fragment as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, defineComponent as c, getCurrentInstance as l, mergeProps as u, normalizeClass as d, normalizeStyle as f, openBlock as p, renderList as m, renderSlot as h, resolveDynamicComponent as g, toDisplayString as _, unref as v, useId as ee, useSlots as te, withCtx as ne } from "vue";
3
3
  //#region src/lib/components/AcUsageCard.vue?vue&type=script&setup=true&lang.ts
4
- var re = ["aria-labelledby", "aria-busy"], ie = { class: "flex min-w-0 flex-col gap-4 p-4" }, ae = { class: "flex min-w-0 items-start gap-3" }, oe = {
4
+ var re = ["aria-labelledby", "aria-busy"], ie = { class: "flex min-w-0 flex-col gap-5 p-5" }, ae = { class: "flex min-w-0 items-start gap-3" }, oe = {
5
5
  key: 0,
6
- class: "inline-flex size-8 shrink-0 items-center justify-center rounded-8 bg-primary-95 text-primary-30 [&_svg]:size-4",
6
+ class: "inline-flex size-8 shrink-0 items-center justify-center rounded-10 border border-primary/25 bg-primary/10 text-primary-strong [&_svg]:size-4",
7
7
  "aria-hidden": "true"
8
8
  }, se = { class: "min-w-0 flex-1" }, ce = ["id"], y = ["title"], b = {
9
9
  key: 1,
10
10
  class: "relative z-10 flex shrink-0 flex-wrap items-center justify-end gap-2"
11
11
  }, x = {
12
12
  key: 0,
13
- class: "text-xs text-muted"
13
+ class: "text-xs font-medium text-muted"
14
14
  }, S = {
15
15
  key: 0,
16
16
  class: "flex min-w-0 flex-col gap-2"
17
- }, C = { class: "flex min-w-0 flex-wrap items-baseline justify-between gap-x-3 gap-y-1" }, w = { class: "flex min-w-0 flex-wrap items-baseline gap-x-1.5" }, le = { class: "text-3xl font-semibold text-heading" }, ue = {
17
+ }, C = { class: "flex min-w-0 flex-wrap items-baseline justify-between gap-x-3 gap-y-1" }, w = { class: "flex min-w-0 flex-wrap items-baseline gap-x-1.5" }, le = { class: "text-3xl font-bold tracking-tight text-heading tabular-nums" }, ue = {
18
18
  key: 0,
19
19
  class: "text-base text-muted"
20
20
  }, T = {
@@ -30,19 +30,19 @@ var re = ["aria-labelledby", "aria-busy"], ie = { class: "flex min-w-0 flex-col
30
30
  class: "text-base text-body"
31
31
  }, O = {
32
32
  key: 0,
33
- class: "ac-scrollbar border-t border-border-light"
33
+ class: "ac-scrollbar border-t border-border"
34
34
  }, k = { class: "w-full text-left text-base" }, A = {
35
35
  key: 0,
36
- class: "text-xs text-muted"
36
+ class: "bg-surface-sunken/50 text-xs text-muted"
37
37
  }, j = {
38
38
  scope: "row",
39
- class: "px-4 py-2.5 font-normal text-body"
39
+ class: "px-5 py-2.5 text-left font-normal text-body"
40
40
  }, M = { class: "flex min-w-0 items-center gap-2" }, N = { class: "truncate" }, P = {
41
41
  key: 0,
42
- class: "ac-skeleton-bone ml-auto block h-3 w-14 rounded-4"
42
+ class: "ac-skeleton-bone ml-auto block h-3 w-14 rounded-full"
43
43
  }, F = {
44
44
  key: 1,
45
- class: "relative z-10 mt-auto flex min-w-0 flex-wrap items-center justify-between gap-x-3 gap-y-1.5 border-t border-border-light px-4 py-3 text-xs text-muted"
45
+ class: "relative z-10 mt-auto flex min-w-0 flex-wrap items-center justify-between gap-x-3 gap-y-1.5 border-t border-border px-5 py-3 text-base text-muted"
46
46
  }, I = /*@__PURE__*/ c({
47
47
  __name: "AcUsageCard",
48
48
  props: {
@@ -78,26 +78,26 @@ var re = ["aria-labelledby", "aria-busy"], ie = { class: "flex min-w-0 flex-col
78
78
  let L = c, R = I, z = te(), de = {
79
79
  ok: {
80
80
  fill: "bg-primary",
81
- track: "bg-primary-93",
81
+ track: "bg-surface-sunken",
82
82
  text: "text-muted",
83
83
  badge: ""
84
84
  },
85
85
  warning: {
86
86
  fill: "bg-warning",
87
- track: "bg-yellow-93",
88
- text: "text-yellow-20",
87
+ track: "bg-warning/15",
88
+ text: "text-warning-strong",
89
89
  badge: "Near limit"
90
90
  },
91
91
  danger: {
92
92
  fill: "bg-danger",
93
- track: "bg-red-93",
94
- text: "text-red-30",
93
+ track: "bg-danger/15",
94
+ text: "text-danger-strong",
95
95
  badge: "At limit"
96
96
  },
97
97
  over: {
98
98
  fill: "bg-danger",
99
- track: "bg-red-93",
100
- text: "text-red-30",
99
+ track: "bg-danger/15",
100
+ text: "text-danger-strong",
101
101
  badge: "Over limit"
102
102
  }
103
103
  }, B = new Intl.NumberFormat(void 0, { maximumFractionDigits: 2 }), V = l(), H = V?.appContext.components.RouterLink, U = ee(), W = n(() => typeof L.used == "number" && Number.isFinite(L.used)), G = n(() => W.value && typeof L.limit == "number" && L.limit > 0), K = n(() => G.value ? L.used / L.limit * 100 : 0), q = n(() => G.value ? L.used > L.limit ? "over" : K.value >= L.dangerAt ? "danger" : K.value >= L.warningAt ? "warning" : "ok" : "ok"), J = n(() => de[q.value]), fe = n(() => L.showThresholds ? [L.warningAt, L.dangerAt].filter((e) => e > 0 && e < 100) : []), Y = n(() => {
@@ -133,7 +133,7 @@ var re = ["aria-labelledby", "aria-busy"], ie = { class: "flex min-w-0 flex-col
133
133
  R("click", e);
134
134
  }
135
135
  return (n, l) => (p(), a("section", {
136
- class: d(["relative flex min-w-0 flex-col rounded-10 border border-border bg-surface shadow-xs transition-[border-color,box-shadow] duration-150 has-[[data-ac-card-link]:focus-visible]:ring-[3px] has-[[data-ac-card-link]:focus-visible]:ring-ring", (X.value || $()) && "hover:border-border-dark hover:shadow-sm"]),
136
+ class: d(["relative flex min-w-0 flex-col rounded-14 border border-border bg-surface transition-[background-color,border-color,box-shadow,translate] duration-200 has-[[data-ac-card-link]:focus-visible]:ring-2 has-[[data-ac-card-link]:focus-visible]:ring-ring has-[[data-ac-card-link]:focus-visible]:ring-offset-2 has-[[data-ac-card-link]:focus-visible]:ring-offset-surface motion-reduce:transition-none", (X.value || $()) && "hover:-translate-y-0.5 hover:border-primary/30 hover:bg-accent-hover/60 hover:shadow-card motion-reduce:hover:translate-y-0"]),
137
137
  "aria-labelledby": `${v(U)}-title`,
138
138
  "aria-busy": c.loading || void 0,
139
139
  "data-ac-ds": "",
@@ -144,20 +144,20 @@ var re = ["aria-labelledby", "aria-busy"], ie = { class: "flex min-w-0 flex-col
144
144
  z.icon || c.icon ? (p(), a("span", oe, [h(n.$slots, "icon", {}, () => [(p(), r(g(c.icon)))])])) : i("", !0),
145
145
  o("div", se, [o("h3", {
146
146
  id: `${v(U)}-title`,
147
- class: "truncate text-lg leading-6 font-semibold tracking-[-0.01em] text-heading"
147
+ class: "truncate font-heading text-lg leading-6 font-semibold tracking-tight text-heading"
148
148
  }, [X.value || $() ? (p(), r(g(X.value ? X.value.is : "button"), u({ key: 0 }, X.value ? {
149
149
  ...X.value,
150
150
  is: void 0
151
151
  } : { type: "button" }, {
152
152
  "data-ac-card-link": "",
153
- class: "cursor-pointer text-left outline-none after:absolute after:inset-0 after:rounded-10",
153
+ class: "cursor-pointer text-left outline-none after:absolute after:inset-0 after:rounded-14",
154
154
  onClick: me
155
155
  }), {
156
156
  default: ne(() => [s(_(c.title), 1)]),
157
157
  _: 1
158
158
  }, 16)) : (p(), a(t, { key: 1 }, [s(_(c.title), 1)], 64))], 8, ce), c.description ? (p(), a("p", {
159
159
  key: 0,
160
- class: "truncate text-xs text-muted",
160
+ class: "mt-0.5 truncate text-xs text-muted",
161
161
  title: c.description
162
162
  }, _(c.description), 9, y)) : i("", !0)]),
163
163
  c.period || J.value.badge || z.actions ? (p(), a("div", b, [
@@ -173,14 +173,14 @@ var re = ["aria-labelledby", "aria-busy"], ie = { class: "flex min-w-0 flex-col
173
173
  h(n.$slots, "actions")
174
174
  ])) : i("", !0)
175
175
  ]),
176
- W.value || c.loading && c.breakdown.length === 0 ? (p(), a("div", S, [c.loading ? (p(), a(t, { key: 0 }, [l[0] ||= o("span", { class: "ac-skeleton-bone block h-6 w-2/5 rounded-4" }, null, -1), l[1] ||= o("span", { class: "ac-skeleton-bone block h-2 w-full rounded-full" }, null, -1)], 64)) : (p(), a(t, { key: 1 }, [
176
+ W.value || c.loading && c.breakdown.length === 0 ? (p(), a("div", S, [c.loading ? (p(), a(t, { key: 0 }, [l[0] ||= o("span", { class: "ac-skeleton-bone block h-7 w-2/5 rounded-6" }, null, -1), l[1] ||= o("span", { class: "ac-skeleton-bone block h-2 w-full rounded-full" }, null, -1)], 64)) : (p(), a(t, { key: 1 }, [
177
177
  o("div", C, [o("p", w, [o("span", le, _(Z(c.used)), 1), G.value ? (p(), a("span", ue, "of " + _(Q(c.limit)), 1)) : (p(), a("span", T, [
178
178
  s(_(c.unit), 1),
179
179
  c.unit ? (p(), a(t, { key: 0 }, [s(" · ")], 64)) : i("", !0),
180
180
  l[2] ||= s("No limit", -1)
181
181
  ]))]), G.value ? (p(), a("span", {
182
182
  key: 0,
183
- class: d(["text-base font-medium tabular-nums", q.value === "ok" ? "text-heading" : J.value.text])
183
+ class: d(["text-base font-semibold tabular-nums", q.value === "ok" ? "text-heading" : J.value.text])
184
184
  }, _(Math.round(K.value)) + "% ", 3)) : i("", !0)]),
185
185
  G.value ? (p(), a("div", {
186
186
  key: 0,
@@ -192,7 +192,7 @@ var re = ["aria-labelledby", "aria-busy"], ie = { class: "flex min-w-0 flex-col
192
192
  "aria-valuetext": pe.value,
193
193
  class: d(["relative h-2 w-full overflow-hidden rounded-full", J.value.track])
194
194
  }, [o("div", {
195
- class: d(["h-full rounded-full transition-[width,background-color] duration-300 ease-out motion-reduce:transition-none", J.value.fill]),
195
+ class: d(["h-full rounded-full transition-[width,background-color] duration-700 ease-out motion-reduce:transition-none", J.value.fill]),
196
196
  style: f({ width: `${Math.min(100, K.value)}%` })
197
197
  }, null, 6), (p(!0), a(t, null, m(fe.value, (e) => (p(), a("span", {
198
198
  key: e,
@@ -202,7 +202,7 @@ var re = ["aria-labelledby", "aria-busy"], ie = { class: "flex min-w-0 flex-col
202
202
  }, null, 4))), 128))], 10, E)) : i("", !0),
203
203
  Y.value ? (p(), a("p", {
204
204
  key: 1,
205
- class: d(["text-xs", J.value.text])
205
+ class: d(["text-xs font-medium", J.value.text])
206
206
  }, _(Y.value), 3)) : i("", !0)
207
207
  ], 64))])) : i("", !0),
208
208
  z.default ? (p(), a("div", D, [h(n.$slots, "default")])) : i("", !0)
@@ -210,17 +210,17 @@ var re = ["aria-labelledby", "aria-busy"], ie = { class: "flex min-w-0 flex-col
210
210
  c.breakdown.length ? (p(), a("div", O, [o("table", k, [c.breakdownHeaders.length ? (p(), a("thead", A, [o("tr", null, [(p(!0), a(t, null, m(c.breakdownHeaders, (e, t) => (p(), a("th", {
211
211
  key: t,
212
212
  scope: "col",
213
- class: d(["h-9 px-4 font-medium whitespace-nowrap", t > 0 ? "text-right" : "text-left"])
213
+ class: d(["h-10 px-5 font-semibold whitespace-nowrap", t > 0 ? "text-right" : "text-left"])
214
214
  }, _(e), 3))), 128))])])) : i("", !0), o("tbody", null, [(p(!0), a(t, null, m(c.breakdown, (e, n) => (p(), a("tr", {
215
215
  key: `${e.label}${n}`,
216
- class: d(["border-t border-border-light", !c.breakdownHeaders.length && n === 0 && "border-t-0"])
216
+ class: d(["border-t border-border", !c.breakdownHeaders.length && n === 0 && "border-t-0"])
217
217
  }, [o("th", j, [o("span", M, [e.icon ? (p(), r(g(e.icon), {
218
218
  key: 0,
219
219
  class: "size-4 shrink-0 text-muted",
220
220
  "aria-hidden": "true"
221
221
  })) : i("", !0), o("span", N, _(e.label), 1)])]), (p(!0), a(t, null, m(e.values, (e, n) => (p(), a("td", {
222
222
  key: n,
223
- class: "px-4 py-2.5 text-right font-medium whitespace-nowrap text-heading tabular-nums"
223
+ class: "px-5 py-2.5 text-right font-medium whitespace-nowrap text-heading tabular-nums"
224
224
  }, [c.loading ? (p(), a("span", P)) : (p(), a(t, { key: 1 }, [s(_(Z(e)), 1)], 64))]))), 128))], 2))), 128))])])])) : i("", !0),
225
225
  z.footer ? (p(), a("div", F, [h(n.$slots, "footer")])) : i("", !0)
226
226
  ], 10, re));