@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,160 +1,199 @@
1
1
  import e from "./AcButton.js";
2
2
  import { useToast as t } from "../composables/useToast.js";
3
3
  import { Fragment as n, Teleport as r, TransitionGroup as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createVNode as u, defineComponent as d, nextTick as f, normalizeClass as p, onBeforeUnmount as m, openBlock as h, ref as g, renderList as _, resolveDynamicComponent as v, toDisplayString as y, unref as b, watch as x, withCtx as S } from "vue";
4
- import { CircleAlert as C, CircleCheck as w, Info as T, TriangleAlert as E, X as D } from "@lucide/vue";
4
+ import { CircleCheck as C, CircleX as w, Info as T, TriangleAlert as E, X as D } from "@lucide/vue";
5
5
  //#region src/lib/components/AcToaster.vue?vue&type=script&setup=true&lang.ts
6
6
  var O = ["aria-label"], k = {
7
7
  class: "sr-only",
8
8
  role: "status",
9
9
  "aria-live": "polite",
10
10
  "aria-atomic": "true"
11
- }, A = {
11
+ }, ee = {
12
12
  class: "sr-only",
13
13
  role: "alert",
14
14
  "aria-live": "assertive",
15
15
  "aria-atomic": "true"
16
- }, j = ["data-tone"], M = { class: "flex min-w-0 flex-1 flex-col gap-0.5" }, N = { class: "text-base font-medium break-words text-heading" }, P = {
16
+ }, te = ["data-tone"], ne = { class: "flex min-w-0 flex-1 flex-col gap-0.5" }, re = { class: "text-base leading-[1.35] font-semibold break-words text-heading" }, ie = {
17
17
  key: 0,
18
- class: "text-base break-words text-muted"
19
- }, F = ["aria-label", "onClick"], I = 3, L = /*@__PURE__*/ d({
18
+ class: "text-[13px] leading-[1.45] break-words text-muted"
19
+ }, ae = ["aria-label", "onClick"], A = ["data-toast-bar"], j = 3, M = "transition-[opacity,translate] duration-300 ease-[cubic-bezier(0.21,1.02,0.73,1)] motion-reduce:duration-150", N = /*@__PURE__*/ d({
20
20
  __name: "AcToaster",
21
21
  props: {
22
- position: { default: "bottom-right" },
22
+ position: { default: "top-right" },
23
23
  max: { default: 5 },
24
+ progress: {
25
+ type: Boolean,
26
+ default: !1
27
+ },
24
28
  label: { default: "Notifications" }
25
29
  },
26
30
  setup(d) {
27
- let L = d, R = {
31
+ let N = d, P = {
28
32
  neutral: {
29
33
  iconClass: "",
30
- box: "border-border bg-surface"
34
+ box: "border-border bg-surface",
35
+ bar: "bg-muted"
31
36
  },
32
37
  success: {
33
- icon: w,
38
+ icon: C,
34
39
  iconClass: "text-success",
35
- box: "border-border bg-surface"
40
+ box: "border-border bg-surface",
41
+ bar: "bg-success"
36
42
  },
37
43
  error: {
38
- icon: C,
44
+ icon: w,
39
45
  iconClass: "text-danger",
40
- box: "border-danger/25 bg-[color-mix(in_srgb,var(--color-danger)_8%,var(--color-surface))]"
46
+ box: "border-danger/25 bg-[color-mix(in_srgb,var(--color-danger)_8%,var(--color-surface))]",
47
+ bar: "bg-danger"
41
48
  },
42
49
  warning: {
43
50
  icon: E,
44
51
  iconClass: "text-warning",
45
- box: "border-border bg-surface"
52
+ box: "border-border bg-surface",
53
+ bar: "bg-warning"
46
54
  },
47
55
  info: {
48
56
  icon: T,
49
57
  iconClass: "text-info",
50
- box: "border-border bg-surface"
58
+ box: "border-border bg-surface",
59
+ bar: "bg-info"
51
60
  }
52
- }, z = {
53
- "bottom-right": "bottom-3 sm:bottom-6 sm:right-6",
54
- "bottom-center": "bottom-3 sm:bottom-6 sm:left-1/2 sm:-translate-x-1/2",
55
- "top-right": "top-3 sm:top-6 sm:right-6",
56
- "top-center": "top-3 sm:top-6 sm:left-1/2 sm:-translate-x-1/2"
57
- }, { toasts: B, dismiss: V } = t(), H = g(""), U = g(""), W = /* @__PURE__ */ new Map(), G = !1, K = /* @__PURE__ */ new Set(), q = a(() => L.position.startsWith("top")), J = a(() => {
58
- let e = B.value.slice(-L.max);
59
- return q.value ? [...e].reverse() : e;
60
- });
61
+ }, F = {
62
+ "top-right": "top-20 sm:right-5",
63
+ "top-center": "top-20 sm:left-1/2 sm:-translate-x-1/2",
64
+ "bottom-right": "bottom-5 sm:right-5",
65
+ "bottom-center": "bottom-5 sm:left-1/2 sm:-translate-x-1/2"
66
+ }, { toasts: I, dismiss: L } = t(), R = g(null), z = g(""), B = g(""), V = /* @__PURE__ */ new Map(), H = !1, U = /* @__PURE__ */ new Set(), W = a(() => N.position.startsWith("top")), G = a(() => I.value.slice(-N.max)), K = a(() => N.position.endsWith("right") ? "opacity-0 motion-safe:translate-x-[120%]" : W.value ? "opacity-0 motion-safe:-translate-y-2" : "opacity-0 motion-safe:translate-y-2");
67
+ function q(e) {
68
+ return e.duration > 0 && (e.progress ?? N.progress);
69
+ }
70
+ function J(e) {
71
+ let t = V.get(e);
72
+ t && !H && (t.started = Date.now(), t.handle = setTimeout(() => L(e), t.remaining), oe(e));
73
+ }
61
74
  function Y(e) {
62
- let t = W.get(e);
63
- t && !G && (t.started = Date.now(), t.handle = setTimeout(() => V(e), t.remaining));
75
+ let t = V.get(e);
76
+ t?.handle && (clearTimeout(t.handle), t.handle = void 0, t.remaining -= Date.now() - t.started, t.bar?.pause());
77
+ }
78
+ async function oe(e) {
79
+ await f();
80
+ let t = V.get(e);
81
+ if (t?.handle) {
82
+ if (t.bar) return t.bar.play();
83
+ t.bar = (R.value?.querySelector(`[data-toast-bar="${CSS.escape(e)}"]`))?.animate([{ transform: "scaleX(1)" }, { transform: "scaleX(0)" }], {
84
+ duration: t.duration,
85
+ fill: "forwards"
86
+ });
87
+ }
64
88
  }
65
- function X(e) {
66
- let t = W.get(e);
67
- t?.handle && (clearTimeout(t.handle), t.handle = void 0, t.remaining -= Date.now() - t.started);
89
+ function X(e, t = !1) {
90
+ Y(e), t && V.get(e)?.bar?.cancel(), V.delete(e);
68
91
  }
69
92
  function Z() {
70
- G = !0, W.forEach((e, t) => X(t));
93
+ H = !0, V.forEach((e, t) => Y(t));
71
94
  }
72
95
  function Q() {
73
- G = !1, W.forEach((e, t) => Y(t));
96
+ H = !1, V.forEach((e, t) => J(t));
74
97
  }
75
98
  function $(e) {
76
99
  e.currentTarget.contains(e.relatedTarget) || Q();
77
100
  }
78
- function ee(e) {
101
+ function se(e) {
79
102
  let t = new Set(e.map((e) => e.id));
80
- for (let [e] of W) t.has(e) || (X(e), W.delete(e));
81
- for (let t of e) W.get(t.id)?.version !== t.version && (X(t.id), W.delete(t.id), t.duration > 0 && (W.set(t.id, {
103
+ for (let [e] of V) t.has(e) || X(e);
104
+ for (let t of e) V.get(t.id)?.version !== t.version && (X(t.id, !0), t.duration > 0 && (V.set(t.id, {
82
105
  version: t.version,
106
+ duration: t.duration,
83
107
  remaining: t.duration,
84
108
  started: 0
85
- }), Y(t.id)));
109
+ }), J(t.id)));
86
110
  }
87
- async function te(e) {
88
- let t = e.filter((e) => !K.has(`${e.id}:${e.version}`));
89
- if (K = new Set(e.map((e) => `${e.id}:${e.version}`)), !t.length) return;
111
+ async function ce(e) {
112
+ let t = e.filter((e) => !U.has(`${e.id}:${e.version}`));
113
+ if (U = new Set(e.map((e) => `${e.id}:${e.version}`)), !t.length) return;
90
114
  let n = (e) => /[.!?…]$/.test(e.trim()) ? e.trim() : `${e.trim()}.`, r = (e) => e.flatMap((e) => [e.title, e.description ?? ""].filter(Boolean).map(n)).join(" "), i = t.filter((e) => e.tone === "error"), a = t.filter((e) => e.tone !== "error");
91
- H.value = "", U.value = "", await f(), a.length && (H.value = r(a)), i.length && (U.value = r(i));
115
+ z.value = "", B.value = "", await f(), a.length && (z.value = r(a)), i.length && (B.value = r(i));
92
116
  }
93
- function ne(e) {
94
- e.action?.onClick(), V(e.id);
117
+ function le(e) {
118
+ e.action?.onClick(), L(e.id);
95
119
  }
96
- return x(J, (e) => {
97
- ee(e), te(e);
98
- }, { immediate: !0 }), m(() => W.forEach((e) => clearTimeout(e.handle))), (t, a) => (h(), o(r, { to: "body" }, [l("section", {
120
+ return x(G, (e) => {
121
+ se(e), ce(e);
122
+ }, { immediate: !0 }), m(() => V.forEach((e) => {
123
+ clearTimeout(e.handle), e.bar?.cancel();
124
+ })), (t, a) => (h(), o(r, { to: "body" }, [l("section", {
125
+ ref_key: "root",
126
+ ref: R,
99
127
  "aria-label": d.label,
100
128
  "data-ac-ds": "",
101
129
  "data-testid": "ac-toaster"
102
130
  }, [
103
- l("div", k, y(H.value), 1),
104
- l("div", A, y(U.value), 1),
131
+ l("div", k, y(z.value), 1),
132
+ l("div", ee, y(B.value), 1),
105
133
  u(i, {
106
134
  tag: "ol",
107
- class: p(["pointer-events-none fixed inset-x-3 z-[100] flex flex-col gap-3 sm:inset-x-auto sm:w-89", z[d.position]]),
108
- "enter-active-class": "transition duration-200 ease-out",
109
- "enter-from-class": `opacity-0 ${q.value ? "motion-safe:-translate-y-2" : "motion-safe:translate-y-2"}`,
110
- "leave-active-class": "transition duration-150 ease-in",
111
- "leave-to-class": "opacity-0 motion-safe:scale-95",
135
+ class: p(["pointer-events-none fixed inset-x-5 z-[100] flex flex-col gap-3 sm:inset-x-auto sm:w-[384px]", F[d.position]]),
136
+ "enter-active-class": M,
137
+ "enter-from-class": K.value,
138
+ "leave-active-class": M,
139
+ "leave-to-class": K.value,
112
140
  "move-class": "motion-safe:transition-transform motion-safe:duration-200",
113
141
  onPointerenter: Z,
114
142
  onPointerleave: Q,
115
143
  onFocusin: Z,
116
144
  onFocusout: $
117
145
  }, {
118
- default: S(() => [(h(!0), c(n, null, _(J.value, (t, n) => (h(), c("li", {
146
+ default: S(() => [(h(!0), c(n, null, _(G.value, (t, n) => (h(), c("li", {
119
147
  key: t.id,
120
- class: p(["pointer-events-auto relative flex items-start gap-3 overflow-hidden rounded-10 border py-3.5 pl-4 shadow-lg", [
121
- R[t.tone].box,
148
+ class: p(["pointer-events-auto relative flex items-start gap-3 overflow-hidden rounded-10 border py-3.5 pl-4 shadow-md", [
149
+ P[t.tone].box,
122
150
  t.dismissible ? "pr-10" : "pr-4",
123
- (q.value ? n : J.value.length - 1 - n) >= I && "max-sm:hidden"
151
+ G.value.length - 1 - n >= j && "max-sm:hidden"
124
152
  ]]),
125
153
  "data-ac-ds": "",
126
154
  "data-testid": "ac-toast",
127
155
  "data-tone": t.tone
128
156
  }, [
129
- R[t.tone].icon ? (h(), o(v(R[t.tone].icon), {
157
+ P[t.tone].icon ? (h(), o(v(P[t.tone].icon), {
130
158
  key: 0,
131
- class: p(["mt-px size-5 shrink-0", R[t.tone].iconClass]),
159
+ class: p(["mt-px size-5 shrink-0", P[t.tone].iconClass]),
160
+ "stroke-width": 2.25,
132
161
  "aria-hidden": "true"
133
162
  }, null, 8, ["class"])) : s("", !0),
134
- l("div", M, [l("p", N, y(t.title), 1), t.description ? (h(), c("p", P, y(t.description), 1)) : s("", !0)]),
163
+ l("div", ne, [l("p", re, y(t.title), 1), t.description ? (h(), c("p", ie, y(t.description), 1)) : s("", !0)]),
135
164
  t.action ? (h(), o(e, {
136
165
  key: 1,
137
166
  title: t.action.label,
138
167
  size: "small",
139
168
  color: "white",
140
169
  class: "-my-1 shrink-0",
141
- onClick: (e) => ne(t)
170
+ onClick: (e) => le(t)
142
171
  }, null, 8, ["title", "onClick"])) : s("", !0),
143
172
  t.dismissible ? (h(), c("button", {
144
173
  key: 2,
145
174
  type: "button",
146
- class: "absolute top-2 right-2 inline-flex size-6 cursor-pointer items-center justify-center rounded-8 text-muted transition-colors hover:bg-surface-sunken hover:text-heading focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",
175
+ class: "absolute top-2 right-2 inline-flex size-6 cursor-pointer items-center justify-center rounded-6 text-muted transition-colors hover:bg-surface-sunken hover:text-heading focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",
147
176
  "aria-label": `Dismiss: ${t.title}`,
148
- onClick: (e) => b(V)(t.id)
177
+ onClick: (e) => b(L)(t.id)
149
178
  }, [u(b(D), {
150
179
  class: "size-3.5",
151
180
  "aria-hidden": "true"
152
- })], 8, F)) : s("", !0)
153
- ], 10, j))), 128))]),
181
+ })], 8, ae)) : s("", !0),
182
+ q(t) ? (h(), c("span", {
183
+ key: 3,
184
+ "data-toast-bar": t.id,
185
+ class: p(["absolute bottom-0 left-0 h-0.5 w-full origin-left opacity-70 motion-reduce:hidden", P[t.tone].bar]),
186
+ "aria-hidden": "true"
187
+ }, null, 10, A)) : s("", !0)
188
+ ], 10, te))), 128))]),
154
189
  _: 1
155
- }, 8, ["class", "enter-from-class"])
190
+ }, 8, [
191
+ "class",
192
+ "enter-from-class",
193
+ "leave-to-class"
194
+ ])
156
195
  ], 8, O)]));
157
196
  }
158
197
  });
159
198
  //#endregion
160
- export { L as default };
199
+ export { N as default };
@@ -1,28 +1,48 @@
1
+ type Side = "top" | "bottom" | "left" | "right";
1
2
  export interface Props {
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
+ /** The hint text, in a dark bubble up to `max-width` wide. Keep it to a few words; use the `content` slot for richer text. */
3
4
  content?: string;
5
+ /** Bold first line above `content`, for a hint that needs a heading: "Read-only replica". */
6
+ title?: string;
4
7
  /** Preferred side of the trigger. It flips to the opposite side when there isn't room. */
5
- placement?: "top" | "bottom" | "left" | "right";
6
- /** Milliseconds to wait on hover before showing. Keyboard focus shows it immediately. */
8
+ placement?: Side;
9
+ /** Lines the bubble up with the trigger's start, centre or end. The arrow keeps pointing at the trigger's centre. */
10
+ align?: "start" | "center" | "end";
11
+ /** Adds a status icon before the text: `info`, `success`, `warning` or `danger`. */
12
+ tone?: "neutral" | "info" | "success" | "warning" | "danger";
13
+ /** Keyboard keys shown as small chips after the text, e.g. `["⌘", "K"]`. */
14
+ shortcut?: string[];
15
+ /** Milliseconds to wait on hover before showing. Keyboard focus, and a pointer moving over from another open tooltip, show it at once. */
7
16
  delay?: number;
8
17
  /** Turns the tooltip off, e.g. while a menu from the same button is open. */
9
18
  disabled?: boolean;
19
+ /** Lets the pointer move onto the bubble without closing it, e.g. to select and copy an ID. */
20
+ interactive?: boolean;
21
+ /** Shows the tooltip only when the trigger's text is cut off, for truncated names in tables. */
22
+ overflowOnly?: boolean;
23
+ /** Widest the bubble grows before wrapping, as a CSS length. */
24
+ maxWidth?: string;
10
25
  }
11
- type __VLS_Slots = {
26
+ declare const _default: typeof __VLS_export;
27
+ export default _default;
28
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
29
+ title: string;
30
+ disabled: boolean;
31
+ tone: "neutral" | "info" | "success" | "warning" | "danger";
32
+ align: "start" | "center" | "end";
33
+ content: string;
34
+ placement: Side;
35
+ shortcut: string[];
36
+ delay: number;
37
+ interactive: boolean;
38
+ overflowOnly: boolean;
39
+ maxWidth: string;
40
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
12
41
  /** The trigger: a button, icon button, link or any focusable element. It gets `aria-describedby`. */
13
42
  default?: () => unknown;
14
43
  /** Tooltip content instead of the `content` prop. Text only; no links or buttons, since it can't be reached by Tab. */
15
44
  content?: () => unknown;
16
- };
17
- declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
18
- disabled: boolean;
19
- content: string;
20
- placement: "top" | "bottom" | "left" | "right";
21
- delay: number;
22
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
24
- declare const _default: typeof __VLS_export;
25
- export default _default;
45
+ }>;
26
46
  type __VLS_WithSlots<T, S> = T & {
27
47
  new (): {
28
48
  $slots: S;
@@ -1,124 +1,238 @@
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";
1
+ import { Fragment as e, Teleport as t, Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as ee, createVNode as te, defineComponent as c, nextTick as l, normalizeClass as u, normalizeStyle as d, onBeforeUnmount as f, onMounted as p, onUpdated as ne, openBlock as m, ref as h, renderList as re, renderSlot as g, resolveDynamicComponent as _, toDisplayString as v, useId as y, useSlots as ie, vShow as b, watch as x, withCtx as S, withDirectives as C } from "vue";
2
+ import { CircleAlert as w, CircleCheck as ae, Info as oe, TriangleAlert as se } from "@lucide/vue";
2
3
  //#region src/lib/components/AcTooltip.vue?vue&type=script&setup=true&lang.ts
3
- var T = ["data-side"], E = 8, D = 8, O = /*@__PURE__*/ c({
4
+ var ce = ["data-side"], le = { class: "flex items-start gap-2" }, ue = { class: "min-w-0 flex-1" }, T = {
5
+ key: 0,
6
+ class: "font-semibold text-on-tooltip"
7
+ }, de = {
8
+ key: 1,
9
+ class: "ml-1 flex shrink-0 items-center gap-0.5 self-center"
10
+ }, E = null, D = 0, fe = 400, O = /*@__PURE__*/ c({
4
11
  __name: "AcTooltip",
5
12
  props: {
6
13
  content: { default: "" },
14
+ title: { default: "" },
7
15
  placement: { default: "top" },
8
- delay: { default: 300 },
16
+ align: { default: "center" },
17
+ tone: { default: "neutral" },
18
+ shortcut: { default: () => [] },
19
+ delay: { default: 100 },
9
20
  disabled: {
10
21
  type: Boolean,
11
22
  default: !1
12
- }
23
+ },
24
+ interactive: {
25
+ type: Boolean,
26
+ default: !1
27
+ },
28
+ overflowOnly: {
29
+ type: Boolean,
30
+ default: !1
31
+ },
32
+ maxWidth: { default: "280px" }
13
33
  },
14
34
  setup(c) {
15
- let O = c, k = b(), A = {
35
+ let O = c, pe = ie(), k = {
16
36
  top: "bottom",
17
37
  bottom: "top",
18
38
  left: "right",
19
39
  right: "left"
20
- }, j = {
40
+ }, me = {
21
41
  top: "translate-y-1",
22
42
  bottom: "-translate-y-1",
23
43
  left: "translate-x-1",
24
44
  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({
45
+ }, A = {
46
+ top: "border-r border-b",
47
+ bottom: "border-t border-l",
48
+ left: "border-t border-r",
49
+ right: "border-b border-l"
50
+ }, j = {
51
+ info: {
52
+ icon: oe,
53
+ class: "text-info"
54
+ },
55
+ success: {
56
+ icon: ae,
57
+ class: "text-success"
58
+ },
59
+ warning: {
60
+ icon: se,
61
+ class: "text-warning"
62
+ },
63
+ danger: {
64
+ icon: w,
65
+ class: "text-danger"
66
+ }
67
+ }, M = `${y()}-tip`, N = h(null), P = h(null), F = h(!1), I = h(O.placement), L = h({
31
68
  top: 0,
32
- left: 0
33
- }), z, B, V = null, H = n(() => !O.disabled && !!(O.content || k.content));
69
+ left: 0,
70
+ arrow: 0
71
+ }), R, z, B = null, V = r(() => !O.disabled && !!(O.content || O.title || pe.content)), H = r(() => O.tone === "neutral" ? null : j[O.tone]), he = r(() => {
72
+ let { top: e, left: t, arrow: n } = L.value, r = {
73
+ top: `${n}px 100%`,
74
+ bottom: `${n}px 0`,
75
+ left: `100% ${n}px`,
76
+ right: `0 ${n}px`
77
+ }[I.value];
78
+ return {
79
+ top: `${e}px`,
80
+ left: `${t}px`,
81
+ maxWidth: O.maxWidth,
82
+ transformOrigin: r
83
+ };
84
+ }), ge = r(() => {
85
+ let e = `${L.value.arrow - 5}px`, t = "-6px";
86
+ return {
87
+ top: {
88
+ left: e,
89
+ bottom: t
90
+ },
91
+ bottom: {
92
+ left: e,
93
+ top: t
94
+ },
95
+ left: {
96
+ top: e,
97
+ right: t
98
+ },
99
+ right: {
100
+ top: e,
101
+ left: t
102
+ }
103
+ }[I.value];
104
+ });
34
105
  function U() {
35
- let e = P.value;
106
+ let e = N.value;
36
107
  return e?.querySelector("button, a[href], input, select, textarea, [tabindex]") ?? e?.firstElementChild ?? null;
37
108
  }
38
109
  function W() {
39
110
  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");
111
+ if (B && B !== e && G(B), B = e, !e) return;
112
+ let t = (e.getAttribute("aria-describedby") ?? "").split(" ").filter((e) => e && e !== M);
113
+ V.value && t.push(M), t.length ? e.setAttribute("aria-describedby", t.join(" ")) : e.removeAttribute("aria-describedby");
43
114
  }
44
115
  function G(e) {
45
- let t = (e.getAttribute("aria-describedby") ?? "").split(" ").filter((e) => e && e !== N);
116
+ let t = (e.getAttribute("aria-describedby") ?? "").split(" ").filter((e) => e && e !== M);
46
117
  t.length ? e.setAttribute("aria-describedby", t.join(" ")) : e.removeAttribute("aria-describedby");
47
118
  }
119
+ function _e() {
120
+ let e = N.value;
121
+ return e ? [e, ...e.querySelectorAll("*")].some((e) => e.scrollWidth > e.clientWidth + 1) : !1;
122
+ }
123
+ async function ve() {
124
+ (!O.overflowOnly || _e()) && (E && E !== q && E(), E = q, F.value = !0, await l(), ye());
125
+ }
48
126
  function K(e) {
49
- clearTimeout(B), H.value && !I.value && (clearTimeout(z), z = setTimeout(async () => {
50
- I.value = !0, await l(), Y();
51
- }, e));
52
- }
53
- function q(e = 0) {
54
- clearTimeout(z), clearTimeout(B), e ? B = setTimeout(() => I.value = !1, e) : I.value = !1;
55
- }
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;
58
- }
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,
65
- left: o(t.left + t.width / 2 - n / 2, window.innerWidth - n)
66
- } : {
67
- top: o(t.top + t.height / 2 - r / 2, window.innerHeight - r),
68
- left: a === "left" ? t.left - E - n : t.right + E
69
- };
127
+ if (clearTimeout(z), !V.value || F.value) return;
128
+ clearTimeout(R);
129
+ let t = E !== null || Date.now() - D < fe;
130
+ R = setTimeout(ve, t ? 0 : e);
131
+ }
132
+ function q() {
133
+ clearTimeout(R), clearTimeout(z), F.value && (F.value = !1, D = Date.now(), E === q && (E = null));
134
+ }
135
+ function J(e = 0) {
136
+ clearTimeout(R), clearTimeout(z), e ? z = setTimeout(q, e) : q();
137
+ }
138
+ function Y(e, t, n, r) {
139
+ return e === "top" ? t.top - 8 - r >= 8 : e === "bottom" ? t.bottom + 8 + r <= window.innerHeight - 8 : e === "left" ? t.left - 8 - n >= 8 : t.right + 8 + n <= window.innerWidth - 8;
140
+ }
141
+ function X(e, t, n) {
142
+ return O.align === "start" ? e : O.align === "end" ? e + t - n : e + (t - n) / 2;
70
143
  }
71
- function X(e) {
144
+ function Z(e, t, n) {
145
+ return Math.min(Math.max(e, t), Math.max(t, n));
146
+ }
147
+ function ye() {
148
+ let e = U() ?? N.value;
149
+ if (!e || !P.value) return;
150
+ let t = e.getBoundingClientRect(), { offsetWidth: n, offsetHeight: r } = P.value, i = O.placement, a = Y(i, t, n, r) || !Y(k[i], t, n, r) ? i : k[i];
151
+ if (I.value = a, a === "top" || a === "bottom") {
152
+ let e = Z(X(t.left, t.width, n), 8, window.innerWidth - 8 - n), i = Z(t.left + t.width / 2 - e, 12, n - 12);
153
+ L.value = {
154
+ top: Math.round(a === "top" ? t.top - 8 - r : t.bottom + 8),
155
+ left: Math.round(e),
156
+ arrow: i
157
+ };
158
+ } else {
159
+ let e = Z(X(t.top, t.height, r), 8, window.innerHeight - 8 - r), i = Z(t.top + t.height / 2 - e, 12, r - 12);
160
+ L.value = {
161
+ top: Math.round(e),
162
+ left: Math.round(a === "left" ? t.left - 8 - n : t.right + 8),
163
+ arrow: i
164
+ };
165
+ }
166
+ }
167
+ function be(e) {
72
168
  e.pointerType !== "touch" && K(O.delay);
73
169
  }
74
- function Z(e) {
170
+ function xe(e) {
75
171
  e.target.matches(":focus-visible") && K(0);
76
172
  }
173
+ function Se() {
174
+ O.interactive && clearTimeout(z);
175
+ }
176
+ function Ce() {
177
+ O.interactive && J(120);
178
+ }
77
179
  function Q() {
78
- q();
180
+ J();
79
181
  }
80
182
  function $(e) {
81
- e.key === "Escape" && I.value && q();
183
+ e.key === "Escape" && F.value && J();
82
184
  }
83
- return S(I, (e) => {
185
+ return x(F, (e) => {
84
186
  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", {
187
+ }), x(V, (e) => {
188
+ W(), e || J();
189
+ }), p(W), ne(W), f(() => {
190
+ J(), E === q && (E = null), document.removeEventListener("keydown", $), window.removeEventListener("scroll", Q, !0), B && G(B);
191
+ }), (r, l) => (m(), o("span", {
90
192
  ref_key: "root",
91
- ref: P,
193
+ ref: N,
92
194
  class: "inline-flex max-w-full",
93
195
  "data-ac-ds": "",
94
196
  "data-testid": "ac-tooltip",
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, {
197
+ onPointerenter: be,
198
+ onPointerleave: l[0] ||= (e) => J(120),
199
+ onPointerdown: l[1] ||= (e) => J(),
200
+ onFocusin: xe,
201
+ onFocusout: l[2] ||= (e) => J()
202
+ }, [g(r.$slots, "default"), (m(), i(t, { to: "body" }, [te(n, {
101
203
  "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"]}`,
204
+ "enter-from-class": `opacity-0 scale-95 ${me[I.value]}`,
103
205
  "leave-active-class": "transition-[opacity,scale] duration-100 ease-in motion-reduce:transition-none",
104
206
  "leave-to-class": "opacity-0 scale-95"
105
207
  }, {
106
- default: C(() => [w(a("div", {
107
- id: N,
208
+ default: S(() => [C(s("div", {
209
+ id: M,
108
210
  ref_key: "tip",
109
- ref: F,
211
+ ref: P,
110
212
  role: "tooltip",
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`
116
- }),
213
+ class: u(["fixed z-[100] w-max rounded-10 border border-white/10 bg-tooltip text-xs leading-relaxed break-words whitespace-normal text-on-tooltip shadow-lg shadow-black/25", [c.title ? "px-3 py-2" : "px-2.5 py-1.5", c.interactive ? "pointer-events-auto" : "pointer-events-none"]]),
214
+ "data-side": I.value,
215
+ style: d(he.value),
117
216
  "data-ac-ds": "",
118
217
  "data-testid": "ac-tooltip-panel",
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]])]),
218
+ onPointerenter: Se,
219
+ onPointerleave: Ce
220
+ }, [s("div", le, [
221
+ H.value ? (m(), i(_(H.value.icon), {
222
+ key: 0,
223
+ class: u(["mt-0.5 size-3.5 shrink-0", H.value.class]),
224
+ "aria-hidden": "true"
225
+ }, null, 8, ["class"])) : a("", !0),
226
+ s("div", ue, [c.title ? (m(), o("p", T, v(c.title), 1)) : a("", !0), s("div", { class: u(c.title && "mt-0.5 text-on-tooltip/75") }, [g(r.$slots, "content", {}, () => [ee(v(c.content), 1)])], 2)]),
227
+ c.shortcut.length ? (m(), o("span", de, [(m(!0), o(e, null, re(c.shortcut, (e) => (m(), o("kbd", {
228
+ key: e,
229
+ class: "min-w-4 rounded-4 border border-white/15 bg-white/10 px-1 text-center font-mono text-xm leading-4 text-on-tooltip/75"
230
+ }, v(e), 1))), 128))])) : a("", !0)
231
+ ]), s("span", {
232
+ "aria-hidden": "true",
233
+ class: u(["absolute size-2.5 rotate-45 border-white/10 bg-tooltip", A[I.value]]),
234
+ style: d(ge.value)
235
+ }, null, 6)], 46, ce), [[b, F.value]])]),
122
236
  _: 3
123
237
  }, 8, ["enter-from-class"])]))], 544));
124
238
  }