asterui 0.12.43 → 0.12.45

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,237 +1,400 @@
1
- import { jsxs as a, jsx as h } from "react/jsx-runtime";
2
- import { useState as P, useRef as Z, useCallback as m, useEffect as g } from "react";
3
- import { createPortal as I } from "react-dom";
4
- const j = (t) => t ? typeof t == "function" ? t() : t.current : null, R = (t, f, e, i) => {
5
- if (!t || f === "center")
1
+ import { jsx as l, jsxs as p } from "react/jsx-runtime";
2
+ import { forwardRef as St, useState as H, useRef as K, useCallback as y, useImperativeHandle as jt, useEffect as L } from "react";
3
+ import { createPortal as Dt } from "react-dom";
4
+ const et = (t) => t ? typeof t == "function" ? t() : t.current : null, qt = (t, c, i, o, k) => {
5
+ if (!t || c === "center")
6
6
  return {
7
- top: window.innerHeight / 2 - e.height / 2,
8
- left: window.innerWidth / 2 - e.width / 2
7
+ top: window.innerHeight / 2 - i.height / 2,
8
+ left: window.innerWidth / 2 - i.width / 2
9
9
  };
10
- const o = window.scrollY, r = window.scrollX;
10
+ const a = window.scrollY, d = window.scrollX, D = typeof k == "object" && k.pointAtCenter;
11
11
  return {
12
12
  top: {
13
- top: t.top + o - e.height - i,
14
- left: t.left + r + t.width / 2 - e.width / 2
13
+ top: t.top + a - i.height - o,
14
+ left: t.left + d + t.width / 2 - i.width / 2
15
15
  },
16
16
  topLeft: {
17
- top: t.top + o - e.height - i,
18
- left: t.left + r
17
+ top: t.top + a - i.height - o,
18
+ left: t.left + d
19
19
  },
20
20
  topRight: {
21
- top: t.top + o - e.height - i,
22
- left: t.right + r - e.width
21
+ top: t.top + a - i.height - o,
22
+ left: t.right + d - i.width
23
23
  },
24
24
  bottom: {
25
- top: t.bottom + o + i,
26
- left: t.left + r + t.width / 2 - e.width / 2
25
+ top: t.bottom + a + o,
26
+ left: t.left + d + t.width / 2 - i.width / 2
27
27
  },
28
28
  bottomLeft: {
29
- top: t.bottom + o + i,
30
- left: t.left + r
29
+ top: t.bottom + a + o,
30
+ left: t.left + d
31
31
  },
32
32
  bottomRight: {
33
- top: t.bottom + o + i,
34
- left: t.right + r - e.width
33
+ top: t.bottom + a + o,
34
+ left: t.right + d - i.width
35
35
  },
36
36
  left: {
37
- top: t.top + o + t.height / 2 - e.height / 2,
38
- left: t.left + r - e.width - i
37
+ top: t.top + a + t.height / 2 - i.height / 2,
38
+ left: t.left + d - i.width - o
39
39
  },
40
40
  leftTop: {
41
- top: t.top + o,
42
- left: t.left + r - e.width - i
41
+ top: t.top + a,
42
+ left: t.left + d - i.width - o
43
43
  },
44
44
  leftBottom: {
45
- top: t.bottom + o - e.height,
46
- left: t.left + r - e.width - i
45
+ top: t.bottom + a - i.height,
46
+ left: t.left + d - i.width - o
47
47
  },
48
48
  right: {
49
- top: t.top + o + t.height / 2 - e.height / 2,
50
- left: t.right + r + i
49
+ top: t.top + a + t.height / 2 - i.height / 2,
50
+ left: t.right + d + o
51
51
  },
52
52
  rightTop: {
53
- top: t.top + o,
54
- left: t.right + r + i
53
+ top: t.top + a,
54
+ left: t.right + d + o
55
55
  },
56
56
  rightBottom: {
57
- top: t.bottom + o - e.height,
58
- left: t.right + r + i
57
+ top: t.bottom + a - i.height,
58
+ left: t.right + d + o
59
59
  },
60
60
  center: {
61
- top: window.innerHeight / 2 - e.height / 2,
62
- left: window.innerWidth / 2 - e.width / 2
61
+ top: window.innerHeight / 2 - i.height / 2,
62
+ left: window.innerWidth / 2 - i.width / 2
63
63
  }
64
- }[f];
65
- }, nt = ({
66
- open: t = !1,
67
- onClose: f,
68
- onFinish: e,
69
- steps: i,
70
- current: o,
71
- onChange: r,
72
- mask: p = !0,
73
- type: D = "default",
74
- gap: c = 8,
75
- prevButtonText: F = "Previous",
76
- nextButtonText: H = "Next",
77
- finishButtonText: U = "Finish",
78
- skipButtonText: W = "Skip",
79
- showSkip: X = !0,
80
- showIndicators: Y = !0,
81
- closeOnMaskClick: A = !0,
82
- closeOnEscape: E = !0,
83
- scrollIntoView: S = !0,
84
- zIndex: v = 1e3
85
- }) => {
86
- const [q, T] = P(0), [w, z] = P(null), [B, G] = P({ top: 0, left: 0 }), N = Z(null), b = o !== void 0, s = b ? o : q, l = i[s], u = Array.isArray(c) ? c[0] : c, C = Array.isArray(c) ? c[1] : c, y = m(() => {
87
- if (!l) return;
88
- const d = j(l.target)?.getBoundingClientRect() ?? null;
89
- if (z(d), N.current) {
90
- const M = N.current.getBoundingClientRect(), Q = l.placement ?? "bottom", V = R(d, Q, M, C + u);
91
- G(V);
92
- }
93
- }, [l, C, u]), k = m(
94
- (n) => {
95
- n < 0 || n >= i.length || (i[s]?.onClose?.(), b || T(n), r?.(n), i[n]?.onOpen?.());
96
- },
97
- [i, s, b, r]
98
- ), x = m(() => {
99
- k(s - 1);
100
- }, [s, k]), L = m(() => {
101
- s === i.length - 1 ? (e?.(), f?.()) : k(s + 1);
102
- }, [s, i.length, k, e, f]), K = m(() => {
103
- f?.();
104
- }, [f]), O = m(() => {
105
- A && f?.();
106
- }, [A, f]);
107
- if (g(() => {
108
- t && !b && T(0);
109
- }, [t, b]), g(() => {
110
- t && (y(), S && l?.target && j(l.target)?.scrollIntoView({ behavior: "smooth", block: "center" }), s === 0 && l?.onOpen?.());
111
- }, [t, s, l, S, y]), g(() => {
112
- if (!t) return;
113
- const n = () => y();
114
- return window.addEventListener("resize", n), window.addEventListener("scroll", n, !0), requestAnimationFrame(y), () => {
115
- window.removeEventListener("resize", n), window.removeEventListener("scroll", n, !0);
116
- };
117
- }, [t, y]), g(() => {
118
- if (!t || !E) return;
119
- const n = (d) => {
120
- d.key === "Escape" ? f?.() : d.key === "ArrowRight" || d.key === "ArrowDown" ? L() : (d.key === "ArrowLeft" || d.key === "ArrowUp") && x();
121
- };
122
- return document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n);
123
- }, [t, E, f, L, x]), !t || !l) return null;
124
- const _ = s === 0, $ = s === i.length - 1, J = /* @__PURE__ */ a(
125
- "div",
126
- {
127
- className: "fixed inset-0",
128
- style: { zIndex: v },
129
- "data-testid": "tour",
130
- role: "dialog",
131
- "aria-modal": "true",
132
- children: [
133
- p && /* @__PURE__ */ a(
134
- "svg",
64
+ }[c];
65
+ }, Wt = (t) => ({
66
+ top: { position: "bottom-0 left-1/2", transform: "translate(-50%, 50%) rotate(45deg)" },
67
+ topLeft: { position: "bottom-0 left-4", transform: "translate(0, 50%) rotate(45deg)" },
68
+ topRight: { position: "bottom-0 right-4", transform: "translate(0, 50%) rotate(45deg)" },
69
+ bottom: { position: "top-0 left-1/2", transform: "translate(-50%, -50%) rotate(45deg)" },
70
+ bottomLeft: { position: "top-0 left-4", transform: "translate(0, -50%) rotate(45deg)" },
71
+ bottomRight: { position: "top-0 right-4", transform: "translate(0, -50%) rotate(45deg)" },
72
+ left: { position: "right-0 top-1/2", transform: "translate(50%, -50%) rotate(45deg)" },
73
+ leftTop: { position: "right-0 top-4", transform: "translate(50%, 0) rotate(45deg)" },
74
+ leftBottom: { position: "right-0 bottom-4", transform: "translate(50%, 0) rotate(45deg)" },
75
+ right: { position: "left-0 top-1/2", transform: "translate(-50%, -50%) rotate(45deg)" },
76
+ rightTop: { position: "left-0 top-4", transform: "translate(-50%, 0) rotate(45deg)" },
77
+ rightBottom: { position: "left-0 bottom-4", transform: "translate(-50%, 0) rotate(45deg)" },
78
+ center: { position: "hidden", transform: "" }
79
+ })[t], Ft = /* @__PURE__ */ l("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }), Ht = St(
80
+ ({
81
+ open: t = !1,
82
+ onClose: c,
83
+ onFinish: i,
84
+ steps: o,
85
+ current: k,
86
+ onChange: a,
87
+ arrow: d = !0,
88
+ closeIcon: D,
89
+ mask: M = !0,
90
+ disabledInteraction: O = !1,
91
+ type: nt = "default",
92
+ gap: V = { offset: 6, radius: 2 },
93
+ prevButtonText: rt = "Previous",
94
+ nextButtonText: it = "Next",
95
+ finishButtonText: lt = "Finish",
96
+ skipButtonText: st = "Skip",
97
+ showSkip: at = !0,
98
+ showIndicators: dt = !0,
99
+ closeOnMaskClick: I = !0,
100
+ closeOnEscape: U = !0,
101
+ scrollIntoViewOptions: ct = !0,
102
+ zIndex: A = 1001,
103
+ indicatorsRender: X,
104
+ actionsRender: Y,
105
+ getPopupContainer: z,
106
+ classNames: m = {},
107
+ styles: b = {},
108
+ className: ft,
109
+ style: ht,
110
+ "data-testid": ut,
111
+ ...mt
112
+ }, bt) => {
113
+ const [pt, G] = H(0), [u, wt] = H(null), [_, gt] = H({ top: 0, left: 0 }), w = K(null), vt = K(null), $ = K(null), B = ut ?? "tour", f = (n) => `${B}-${n}`, x = k !== void 0, s = x ? k : pt, e = o[s], q = V.offset ?? 6, h = V.radius ?? 2, J = Array.isArray(q) ? q[0] : q, W = e?.arrow ?? d, g = e?.mask ?? M, yt = e?.type ?? nt, E = e?.scrollIntoViewOptions ?? ct, Q = e?.closeIcon ?? D, kt = W !== !1 && e?.placement !== "center", $t = typeof g == "object" && g.color ? g.color : "rgba(0, 0, 0, 0.5)", xt = typeof g == "object" && g.style ? g.style : {}, N = y(() => {
114
+ if (!e) return;
115
+ const r = et(e.target)?.getBoundingClientRect() ?? null;
116
+ if (wt(r), w.current) {
117
+ const C = w.current.getBoundingClientRect(), S = e.placement ?? "bottom", j = qt(
118
+ r,
119
+ S,
120
+ C,
121
+ J + h,
122
+ W
123
+ );
124
+ gt(j);
125
+ }
126
+ }, [e, J, h, W]), v = y(
127
+ (n) => {
128
+ n < 0 || n >= o.length || (o[s]?.onClose?.(), x || G(n), a?.(n), $.current && ($.current.textContent = `Step ${n + 1} of ${o.length}: ${typeof o[n]?.title == "string" ? o[n]?.title : ""}`));
129
+ },
130
+ [o, s, x, a]
131
+ ), F = y(() => {
132
+ c?.();
133
+ }, [c]), P = y(() => {
134
+ e?.prevButtonProps?.onClick?.(), v(s - 1);
135
+ }, [s, v, e]), T = y(() => {
136
+ e?.nextButtonProps?.onClick?.(), s === o.length - 1 ? (i?.(), c?.()) : v(s + 1);
137
+ }, [s, o.length, v, i, c, e]), Nt = y(() => {
138
+ c?.();
139
+ }, [c]), Pt = y(() => {
140
+ I && c?.();
141
+ }, [I, c]);
142
+ if (jt(
143
+ bt,
144
+ () => ({
145
+ goTo: v,
146
+ next: T,
147
+ prev: P,
148
+ close: F
149
+ }),
150
+ [v, T, P, F]
151
+ ), L(() => {
152
+ t && !x && G(0);
153
+ }, [t, x]), L(() => {
154
+ if (t) {
155
+ if (N(), E && e?.target) {
156
+ const n = et(e.target);
157
+ if (n) {
158
+ const r = typeof E == "object" ? E : { behavior: "smooth", block: "center" };
159
+ n.scrollIntoView(r);
160
+ }
161
+ }
162
+ s === 0 && $.current && ($.current.textContent = `Tour started. Step 1 of ${o.length}: ${typeof e?.title == "string" ? e?.title : ""}`);
163
+ }
164
+ }, [t, s, e, E, N, o.length]), L(() => {
165
+ if (!t) return;
166
+ const n = () => N();
167
+ return window.addEventListener("resize", n), window.addEventListener("scroll", n, !0), requestAnimationFrame(N), () => {
168
+ window.removeEventListener("resize", n), window.removeEventListener("scroll", n, !0);
169
+ };
170
+ }, [t, N]), L(() => {
171
+ if (!t) return;
172
+ const n = (r) => {
173
+ if (r.key === "Escape" && U)
174
+ c?.();
175
+ else if (r.key === "ArrowRight" || r.key === "ArrowDown")
176
+ r.preventDefault(), T();
177
+ else if (r.key === "ArrowLeft" || r.key === "ArrowUp")
178
+ r.preventDefault(), P();
179
+ else if (r.key === "Tab" && w.current) {
180
+ const C = w.current.querySelectorAll(
181
+ 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
182
+ ), S = C[0], j = C[C.length - 1];
183
+ r.shiftKey && document.activeElement === S ? (r.preventDefault(), j?.focus()) : !r.shiftKey && document.activeElement === j && (r.preventDefault(), S?.focus());
184
+ }
185
+ };
186
+ return document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n);
187
+ }, [t, U, c, T, P]), L(() => {
188
+ t && w.current && requestAnimationFrame(() => {
189
+ w.current?.querySelector("button")?.focus();
190
+ });
191
+ }, [t, s]), !t || !e) return null;
192
+ const Tt = s === 0, Z = s === o.length - 1, R = e.placement ?? "bottom", tt = Wt(R), Ct = dt && o.length > 1 ? /* @__PURE__ */ l(
193
+ "div",
194
+ {
195
+ className: `flex gap-1 mb-4 ${m.indicator ?? ""}`,
196
+ style: b.indicator,
197
+ "data-testid": f("indicators"),
198
+ children: o.map((n, r) => /* @__PURE__ */ l(
199
+ "button",
135
200
  {
136
- className: "absolute inset-0 w-full h-full pointer-events-auto",
137
- onClick: O,
138
- style: { zIndex: v },
139
- children: [
140
- /* @__PURE__ */ h("defs", { children: /* @__PURE__ */ a("mask", { id: "tour-mask", children: [
141
- /* @__PURE__ */ h("rect", { x: "0", y: "0", width: "100%", height: "100%", fill: "white" }),
142
- w && /* @__PURE__ */ h(
201
+ className: `w-2 h-2 rounded-full transition-colors ${r === s ? "bg-primary" : "bg-base-300 hover:bg-base-content/30"}`,
202
+ onClick: () => v(r),
203
+ "aria-label": `Go to step ${r + 1}`,
204
+ "aria-current": r === s ? "step" : void 0,
205
+ "data-testid": f(`indicator-${r}`)
206
+ },
207
+ r
208
+ ))
209
+ }
210
+ ) : null, Lt = X ? X(s, o.length) : Ct, ot = /* @__PURE__ */ p(
211
+ "div",
212
+ {
213
+ className: `flex items-center justify-between gap-2 ${m.footer ?? ""}`,
214
+ style: b.footer,
215
+ "data-testid": f("footer"),
216
+ children: [
217
+ /* @__PURE__ */ l("div", { children: at && !Z && /* @__PURE__ */ l(
218
+ "button",
219
+ {
220
+ className: "btn btn-ghost btn-sm",
221
+ onClick: Nt,
222
+ "data-testid": f("skip"),
223
+ children: st
224
+ }
225
+ ) }),
226
+ /* @__PURE__ */ p("div", { className: "flex gap-2", children: [
227
+ !Tt && /* @__PURE__ */ l(
228
+ "button",
229
+ {
230
+ className: "btn btn-ghost btn-sm",
231
+ onClick: P,
232
+ "data-testid": f("prev"),
233
+ children: e.prevButtonProps?.children ?? rt
234
+ }
235
+ ),
236
+ /* @__PURE__ */ l(
237
+ "button",
238
+ {
239
+ className: `btn btn-sm ${yt === "primary" ? "btn-primary" : ""}`,
240
+ onClick: T,
241
+ "data-testid": f("next"),
242
+ children: e.nextButtonProps?.children ?? (Z ? lt : it)
243
+ }
244
+ )
245
+ ] })
246
+ ]
247
+ }
248
+ ), At = Y ? Y(ot, { current: s, total: o.length }) : ot, Bt = /* @__PURE__ */ p(
249
+ "div",
250
+ {
251
+ ref: vt,
252
+ className: `fixed inset-0 ${m.root ?? ""} ${ft ?? ""}`,
253
+ style: { zIndex: A, ...b.root, ...ht },
254
+ "data-testid": B,
255
+ "data-state": t ? "open" : "closed",
256
+ role: "dialog",
257
+ "aria-modal": "true",
258
+ "aria-label": `Tour step ${s + 1} of ${o.length}`,
259
+ ...mt,
260
+ children: [
261
+ /* @__PURE__ */ l(
262
+ "div",
263
+ {
264
+ ref: $,
265
+ className: "sr-only",
266
+ role: "status",
267
+ "aria-live": "polite",
268
+ "aria-atomic": "true"
269
+ }
270
+ ),
271
+ g && /* @__PURE__ */ p(
272
+ "svg",
273
+ {
274
+ className: `absolute inset-0 w-full h-full pointer-events-auto ${m.mask ?? ""}`,
275
+ style: { zIndex: A, ...xt, ...b.mask },
276
+ onClick: Pt,
277
+ "data-testid": f("mask"),
278
+ "aria-hidden": "true",
279
+ children: [
280
+ /* @__PURE__ */ l("defs", { children: /* @__PURE__ */ p("mask", { id: `tour-mask-${B}`, children: [
281
+ /* @__PURE__ */ l("rect", { x: "0", y: "0", width: "100%", height: "100%", fill: "white" }),
282
+ u && /* @__PURE__ */ l(
283
+ "rect",
284
+ {
285
+ x: u.left - h,
286
+ y: u.top - h,
287
+ width: u.width + h * 2,
288
+ height: u.height + h * 2,
289
+ rx: h,
290
+ fill: "black"
291
+ }
292
+ )
293
+ ] }) }),
294
+ /* @__PURE__ */ l(
143
295
  "rect",
144
296
  {
145
- x: w.left - u,
146
- y: w.top - u,
147
- width: w.width + u * 2,
148
- height: w.height + u * 2,
149
- rx: u,
150
- fill: "black"
297
+ x: "0",
298
+ y: "0",
299
+ width: "100%",
300
+ height: "100%",
301
+ fill: $t,
302
+ mask: `url(#tour-mask-${B})`
151
303
  }
152
304
  )
153
- ] }) }),
154
- /* @__PURE__ */ h(
155
- "rect",
156
- {
157
- x: "0",
158
- y: "0",
159
- width: "100%",
160
- height: "100%",
161
- fill: "rgba(0, 0, 0, 0.5)",
162
- mask: "url(#tour-mask)"
163
- }
164
- )
165
- ]
166
- }
167
- ),
168
- /* @__PURE__ */ a(
169
- "div",
170
- {
171
- ref: N,
172
- className: `absolute bg-base-100 rounded-lg shadow-xl border border-base-300 max-w-sm ${l.className ?? ""}`,
173
- style: {
174
- top: B.top,
175
- left: B.left,
176
- zIndex: v + 1
177
- },
178
- onClick: (n) => n.stopPropagation(),
179
- "data-testid": "tour-popover",
180
- children: [
181
- l.cover && /* @__PURE__ */ h("div", { className: "rounded-t-lg overflow-hidden", children: l.cover }),
182
- /* @__PURE__ */ a("div", { className: "p-4", children: [
183
- /* @__PURE__ */ h("h3", { className: "font-semibold text-lg mb-1", children: l.title }),
184
- l.description && /* @__PURE__ */ h("p", { className: "text-base-content/70 text-sm mb-4", children: l.description }),
185
- Y && i.length > 1 && /* @__PURE__ */ h("div", { className: "flex gap-1 mb-4", children: i.map((n, d) => /* @__PURE__ */ h(
305
+ ]
306
+ }
307
+ ),
308
+ O && u && /* @__PURE__ */ l(
309
+ "div",
310
+ {
311
+ className: "absolute pointer-events-auto",
312
+ style: {
313
+ left: u.left - h,
314
+ top: u.top - h,
315
+ width: u.width + h * 2,
316
+ height: u.height + h * 2,
317
+ zIndex: A + 1
318
+ },
319
+ "data-testid": f("blocker")
320
+ }
321
+ ),
322
+ /* @__PURE__ */ p(
323
+ "div",
324
+ {
325
+ ref: w,
326
+ className: `absolute bg-base-100 rounded-lg shadow-xl border border-base-300 max-w-sm ${m.popover ?? ""} ${e.className ?? ""}`,
327
+ style: {
328
+ top: _.top,
329
+ left: _.left,
330
+ zIndex: A + 2,
331
+ ...b.popover,
332
+ ...e.style
333
+ },
334
+ onClick: (n) => n.stopPropagation(),
335
+ "data-testid": f("popover"),
336
+ "data-placement": R,
337
+ children: [
338
+ kt && /* @__PURE__ */ l(
339
+ "div",
340
+ {
341
+ className: `absolute w-3 h-3 bg-base-100 border-base-300 ${tt.position}`,
342
+ style: {
343
+ transform: tt.transform,
344
+ borderWidth: "1px",
345
+ borderTopColor: "transparent",
346
+ borderLeftColor: "transparent"
347
+ },
348
+ "data-testid": f("arrow")
349
+ }
350
+ ),
351
+ Q !== !1 && /* @__PURE__ */ l(
186
352
  "button",
187
353
  {
188
- className: `w-2 h-2 rounded-full transition-colors ${d === s ? "bg-primary" : "bg-base-300 hover:bg-base-content/30"}`,
189
- onClick: () => k(d),
190
- "aria-label": `Go to step ${d + 1}`
191
- },
192
- d
193
- )) }),
194
- /* @__PURE__ */ a("div", { className: "flex items-center justify-between gap-2", children: [
195
- /* @__PURE__ */ h("div", { children: X && !$ && /* @__PURE__ */ h(
196
- "button",
197
- {
198
- className: "btn btn-ghost btn-sm",
199
- onClick: K,
200
- "data-testid": "tour-skip",
201
- children: W
202
- }
203
- ) }),
204
- /* @__PURE__ */ a("div", { className: "flex gap-2", children: [
205
- !_ && /* @__PURE__ */ h(
206
- "button",
207
- {
208
- className: "btn btn-ghost btn-sm",
209
- onClick: x,
210
- "data-testid": "tour-prev",
211
- children: F
212
- }
213
- ),
214
- /* @__PURE__ */ h(
215
- "button",
216
- {
217
- className: `btn btn-sm ${D === "primary" ? "btn-primary" : ""}`,
218
- onClick: L,
219
- "data-testid": "tour-next",
220
- children: $ ? U : H
221
- }
222
- )
223
- ] })
224
- ] })
225
- ] })
226
- ]
227
- }
228
- )
229
- ]
230
- }
231
- );
232
- return I(J, document.body);
233
- };
354
+ className: `absolute top-2 right-2 btn btn-ghost btn-xs btn-circle ${m.close ?? ""}`,
355
+ style: b.close,
356
+ onClick: F,
357
+ "aria-label": "Close tour",
358
+ "data-testid": f("close"),
359
+ children: Q ?? Ft
360
+ }
361
+ ),
362
+ e.cover && /* @__PURE__ */ l("div", { className: "rounded-t-lg overflow-hidden", "data-testid": f("cover"), children: e.cover }),
363
+ /* @__PURE__ */ p(
364
+ "div",
365
+ {
366
+ className: `p-4 ${m.content ?? ""}`,
367
+ style: b.content,
368
+ "data-testid": f("content"),
369
+ children: [
370
+ /* @__PURE__ */ p(
371
+ "div",
372
+ {
373
+ className: `${m.header ?? ""}`,
374
+ style: b.header,
375
+ "data-testid": f("header"),
376
+ children: [
377
+ /* @__PURE__ */ l("h3", { className: "font-semibold text-lg mb-1 pr-6", children: e.title }),
378
+ e.description && /* @__PURE__ */ l("p", { className: "text-base-content/70 text-sm mb-4", children: e.description })
379
+ ]
380
+ }
381
+ ),
382
+ Lt,
383
+ At
384
+ ]
385
+ }
386
+ )
387
+ ]
388
+ }
389
+ )
390
+ ]
391
+ }
392
+ ), Et = z ? z(document.body) : document.body;
393
+ return Dt(Bt, Et);
394
+ }
395
+ );
396
+ Ht.displayName = "Tour";
234
397
  export {
235
- nt as Tour
398
+ Ht as Tour
236
399
  };
237
400
  //# sourceMappingURL=Tour.js.map