@alfadocs/ui-kit 1.98.0 → 1.99.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.
@@ -1,14 +1,14 @@
1
1
  import { jsxs as d, jsx as t } from "react/jsx-runtime";
2
- import { forwardRef as j, useState as E, useRef as o, useEffect as F, useMemo as O } from "react";
3
- import { c as M } from "./index-D2ZczOXr.js";
4
- import { useTranslation as H } from "react-i18next";
2
+ import { forwardRef as E, useState as F, useRef as o, useEffect as M, useMemo as O } from "react";
3
+ import { c as H } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as V } from "react-i18next";
5
5
  import { P as l } from "./popover-CN5IsOeS.js";
6
- import { L as V } from "./link-DtCfnLnF.js";
7
- import { S as q } from "./scroll-area-CY5SLYNw.js";
8
- import { c as B } from "./compose-refs-C0k0tdqF.js";
9
- import { u as G } from "./registry-DvAUVLHh.js";
10
- import { I as J } from "./info-CGn22peZ.js";
11
- const Q = {
6
+ import { L as q } from "./link-DtCfnLnF.js";
7
+ import { S as B } from "./scroll-area-CY5SLYNw.js";
8
+ import { c as G } from "./compose-refs-C0k0tdqF.js";
9
+ import { u as J } from "./registry-DvAUVLHh.js";
10
+ import { I as Q } from "./info-CGn22peZ.js";
11
+ const U = {
12
12
  id: "info-tip",
13
13
  capabilities: ["open", "close"],
14
14
  state: {
@@ -51,7 +51,7 @@ const Q = {
51
51
  description: "Sourced from the id prop on InfoTip."
52
52
  }
53
53
  }
54
- }, U = M(
54
+ }, W = H(
55
55
  [
56
56
  "ds:relative ds:inline-flex ds:shrink-0 ds:items-center ds:justify-center",
57
57
  "ds:rounded-[var(--radius-full)]",
@@ -90,26 +90,27 @@ const Q = {
90
90
  size: "md"
91
91
  }
92
92
  }
93
- ), W = j(
93
+ ), X = E(
94
94
  ({
95
95
  content: n,
96
96
  heading: r,
97
97
  size: u = "md",
98
- side: D = "top",
99
- align: z = "center",
100
- "aria-label": C,
98
+ cardSize: D,
99
+ side: z = "top",
100
+ align: C = "center",
101
+ "aria-label": L,
101
102
  id: g,
102
- className: L,
103
+ className: S,
103
104
  formula: b,
104
105
  learnMoreHref: y,
105
- learnMoreLabel: S,
106
- onLearnMore: A
106
+ learnMoreLabel: A,
107
+ onLearnMore: K
107
108
  }, x) => {
108
- const { t: m } = H("ui"), [f, p] = E(!1), i = o(f);
109
- F(() => {
109
+ const { t: m } = V("ui"), [f, p] = F(!1), i = o(f);
110
+ M(() => {
110
111
  i.current = f;
111
112
  }, [f]);
112
- const K = O(
113
+ const P = O(
113
114
  () => ({
114
115
  getIsOpen: () => i.current,
115
116
  open: () => p(!0),
@@ -117,20 +118,20 @@ const Q = {
117
118
  }),
118
119
  []
119
120
  );
120
- G(Q, K, g);
121
+ J(U, P, g);
121
122
  const v = o(null), T = () => {
122
123
  v.current = i.current;
123
- }, w = y != null, k = o(null), P = O(
124
- () => B(x, k),
124
+ }, w = y != null, k = o(null), j = O(
125
+ () => G(x, k),
125
126
  [x]
126
- ), I = o(null), R = o(null), N = o(null), h = C ?? m("infoTip.triggerLabel", "More information");
127
+ ), I = o(null), R = o(null), N = o(null), h = L ?? m("infoTip.triggerLabel", "More information");
127
128
  return /* @__PURE__ */ d(l, { openOn: "hover-or-click", open: f, onOpenChange: p, children: [
128
129
  /* @__PURE__ */ t(
129
130
  l.Trigger,
130
131
  {
131
- ref: P,
132
+ ref: j,
132
133
  "aria-label": h,
133
- className: U({ size: u, className: L }),
134
+ className: W({ size: u, className: S }),
134
135
  "data-component": "info-tip",
135
136
  "data-component-id": g,
136
137
  onPointerDown: T,
@@ -144,7 +145,7 @@ const Q = {
144
145
  v.current = null, s === !1 && i.current && e.preventDefault();
145
146
  },
146
147
  children: /* @__PURE__ */ t(
147
- J,
148
+ Q,
148
149
  {
149
150
  "aria-hidden": "true",
150
151
  className: u === "sm" ? "ds:size-5" : "ds:size-6"
@@ -156,9 +157,9 @@ const Q = {
156
157
  l.Content,
157
158
  {
158
159
  ref: R,
159
- side: D,
160
- align: z,
161
- size: u === "sm" ? "sm" : "md",
160
+ side: z,
161
+ align: C,
162
+ size: D ?? (u === "sm" ? "sm" : "md"),
162
163
  className: "ds:flex ds:flex-col ds:max-h-[var(--radix-popover-content-available-height)]",
163
164
  "aria-label": r == null ? h : void 0,
164
165
  onOpenAutoFocus: (e) => e.preventDefault(),
@@ -171,7 +172,7 @@ const Q = {
171
172
  children: [
172
173
  r != null && /* @__PURE__ */ t(l.Heading, { children: r }),
173
174
  /* @__PURE__ */ t(l.Description, { className: "ds:flex ds:min-h-0 ds:flex-col", children: /* @__PURE__ */ d(
174
- q,
175
+ B,
175
176
  {
176
177
  ref: N,
177
178
  type: "native",
@@ -203,14 +204,14 @@ const Q = {
203
204
  "data-slot": "footer",
204
205
  className: "ds:mt-[var(--spacing-sm)] ds:flex ds:justify-end",
205
206
  children: /* @__PURE__ */ t(
206
- V,
207
+ q,
207
208
  {
208
209
  ref: I,
209
210
  href: y,
210
- onClick: A,
211
+ onClick: K,
211
212
  weight: "strong",
212
213
  className: "type-body-sm",
213
- children: S ?? m("infoTip.learnMore", "Learn more")
214
+ children: A ?? m("infoTip.learnMore", "Learn more")
214
215
  }
215
216
  )
216
217
  }
@@ -221,9 +222,9 @@ const Q = {
221
222
  ] });
222
223
  }
223
224
  );
224
- W.displayName = "InfoTip";
225
+ X.displayName = "InfoTip";
225
226
  export {
226
- W as I,
227
- Q as i
227
+ X as I,
228
+ U as i
228
229
  };
229
- //# sourceMappingURL=info-tip-CG-DEfkd.js.map
230
+ //# sourceMappingURL=info-tip-1Xsq9GLi.js.map