@sigx/lynx-daisyui 0.1.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 (61) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +47 -0
  3. package/dist/buttons/Button.d.ts +7 -0
  4. package/dist/data/Avatar.d.ts +4 -0
  5. package/dist/feedback/Alert.d.ts +6 -0
  6. package/dist/feedback/Badge.d.ts +7 -0
  7. package/dist/feedback/Loading.d.ts +6 -0
  8. package/dist/feedback/Modal.d.ts +48 -0
  9. package/dist/feedback/Progress.d.ts +4 -0
  10. package/dist/feedback/Skeleton.d.ts +3 -0
  11. package/dist/feedback/Steps.d.ts +37 -0
  12. package/dist/forms/Checkbox.d.ts +5 -0
  13. package/dist/forms/FormField.d.ts +5 -0
  14. package/dist/forms/Input.d.ts +6 -0
  15. package/dist/forms/Radio.d.ts +48 -0
  16. package/dist/forms/Select.d.ts +10 -0
  17. package/dist/forms/Textarea.d.ts +6 -0
  18. package/dist/forms/Toggle.d.ts +5 -0
  19. package/dist/index.d.ts +52 -0
  20. package/dist/index.js +552 -0
  21. package/dist/index.js.map +1 -0
  22. package/dist/layout/Card.d.ts +51 -0
  23. package/dist/layout/Center.d.ts +5 -0
  24. package/dist/layout/Col.d.ts +6 -0
  25. package/dist/layout/Divider.d.ts +3 -0
  26. package/dist/layout/Row.d.ts +6 -0
  27. package/dist/layout/ScrollView.d.ts +5 -0
  28. package/dist/layout/Spacer.d.ts +3 -0
  29. package/dist/navigation/Tabs.d.ts +39 -0
  30. package/dist/preset/index.d.ts +2 -0
  31. package/dist/preset/index.js +26 -0
  32. package/dist/preset/index.js.map +1 -0
  33. package/dist/shared/styles.d.ts +19 -0
  34. package/dist/styles/base.css +6 -0
  35. package/dist/styles/components/alert.css +17 -0
  36. package/dist/styles/components/avatar.css +16 -0
  37. package/dist/styles/components/badge.css +44 -0
  38. package/dist/styles/components/button.css +79 -0
  39. package/dist/styles/components/card.css +39 -0
  40. package/dist/styles/components/checkbox.css +44 -0
  41. package/dist/styles/components/divider.css +14 -0
  42. package/dist/styles/components/form-field.css +25 -0
  43. package/dist/styles/components/input.css +31 -0
  44. package/dist/styles/components/loading.css +33 -0
  45. package/dist/styles/components/modal.css +41 -0
  46. package/dist/styles/components/progress.css +24 -0
  47. package/dist/styles/components/radio.css +50 -0
  48. package/dist/styles/components/select.css +56 -0
  49. package/dist/styles/components/skeleton.css +6 -0
  50. package/dist/styles/components/steps.css +40 -0
  51. package/dist/styles/components/tabs.css +23 -0
  52. package/dist/styles/components/textarea.css +31 -0
  53. package/dist/styles/components/toggle.css +46 -0
  54. package/dist/styles/components/typography.css +32 -0
  55. package/dist/styles/index.css +31 -0
  56. package/dist/styles/themes/dark.css +95 -0
  57. package/dist/styles/themes/light.css +95 -0
  58. package/dist/styles/themes/shapes.css +20 -0
  59. package/dist/typography/Heading.d.ts +6 -0
  60. package/dist/typography/Text.d.ts +8 -0
  61. package/package.json +65 -0
package/dist/index.js ADDED
@@ -0,0 +1,552 @@
1
+ import { component as e, compound as t, signal as n } from "@sigx/lynx";
2
+ import { jsx as r, jsxs as i } from "@sigx/lynx/jsx-runtime";
3
+ //#region src/feedback/Loading.tsx
4
+ var a = e(({ props: e }) => {
5
+ let t = () => {
6
+ let t = ["loading"];
7
+ return t.push(`loading-${e.type ?? "spinner"}`), e.size && t.push(`loading-${e.size}`), e.color && t.push(`text-${e.color}`), e.class && t.push(e.class), t.join(" ");
8
+ };
9
+ return () => /* @__PURE__ */ r("view", { class: t() });
10
+ }), o = {
11
+ primary: "btn-primary",
12
+ secondary: "btn-secondary",
13
+ accent: "btn-accent",
14
+ info: "btn-info",
15
+ success: "btn-success",
16
+ warning: "btn-warning",
17
+ error: "btn-error",
18
+ ghost: "btn-ghost",
19
+ link: "btn-link",
20
+ neutral: "btn-neutral"
21
+ }, s = {
22
+ xs: "btn-xs",
23
+ sm: "btn-sm",
24
+ md: "",
25
+ lg: "btn-lg",
26
+ xl: "btn-xl"
27
+ }, c = e(({ props: e, slots: t, emit: n }) => {
28
+ let i = () => {
29
+ let t = ["btn"];
30
+ if (e.variant && t.push(o[e.variant]), e.size) {
31
+ let n = s[e.size];
32
+ n && t.push(n);
33
+ }
34
+ return e.outline && t.push("btn-outline"), e.soft && t.push("btn-soft"), e.wide && t.push("btn-wide"), e.loading && t.push("btn-loading"), e.block && t.push("btn-block"), e.circle && t.push("btn-circle"), e.square && t.push("btn-square"), e.active && t.push("btn-active"), e.disabled && t.push("btn-disabled"), e.class && t.push(e.class), t.join(" ");
35
+ };
36
+ return () => /* @__PURE__ */ r("view", {
37
+ class: i(),
38
+ bindtap: () => {
39
+ !e.disabled && !e.loading && n("press");
40
+ },
41
+ children: e.loading ? /* @__PURE__ */ r(a, {
42
+ type: "spinner",
43
+ size: "sm"
44
+ }) : t.default?.()
45
+ });
46
+ }), l = t(e(({ props: e, slots: t }) => {
47
+ let n = () => {
48
+ let t = ["card"];
49
+ return e.bordered && t.push("card-bordered"), e.compact && t.push("card-compact"), e.shadow === !0 ? t.push("shadow-md") : e.shadow === "sm" ? t.push("shadow-sm") : e.shadow === "md" ? t.push("shadow-md") : e.shadow === "lg" ? t.push("shadow-lg") : e.shadow === void 0 && t.push("shadow-md"), e.class && t.push(e.class), t.join(" ");
50
+ };
51
+ return () => /* @__PURE__ */ r("view", {
52
+ class: n(),
53
+ children: t.default?.()
54
+ });
55
+ }), {
56
+ Body: e(({ props: e, slots: t }) => () => /* @__PURE__ */ r("view", {
57
+ class: `card-body${e.class ? " " + e.class : ""}`,
58
+ children: t.default?.()
59
+ })),
60
+ Title: e(({ props: e, slots: t }) => () => /* @__PURE__ */ r("text", {
61
+ class: `card-title${e.class ? " " + e.class : ""}`,
62
+ children: t.default?.()
63
+ })),
64
+ Actions: e(({ props: e, slots: t }) => () => /* @__PURE__ */ r("view", {
65
+ class: `card-actions${e.class ? " " + e.class : ""}`,
66
+ children: t.default?.()
67
+ }))
68
+ });
69
+ //#endregion
70
+ //#region src/shared/styles.ts
71
+ function u(e, t) {
72
+ if (e === void 0) return {};
73
+ if (typeof e == "number") return {
74
+ [`${t}Top`]: e,
75
+ [`${t}Right`]: e,
76
+ [`${t}Bottom`]: e,
77
+ [`${t}Left`]: e
78
+ };
79
+ let n = {};
80
+ return e.top === void 0 ? e.y !== void 0 && (n[`${t}Top`] = e.y) : n[`${t}Top`] = e.top, e.bottom === void 0 ? e.y !== void 0 && (n[`${t}Bottom`] = e.y) : n[`${t}Bottom`] = e.bottom, e.right === void 0 ? e.x !== void 0 && (n[`${t}Right`] = e.x) : n[`${t}Right`] = e.right, e.left === void 0 ? e.x !== void 0 && (n[`${t}Left`] = e.x) : n[`${t}Left`] = e.left, n;
81
+ }
82
+ function d(e) {
83
+ let t = {};
84
+ return e.width !== void 0 && (t.width = e.width), e.height !== void 0 && (t.height = e.height), e.flex !== void 0 && (t.flex = e.flex), e.background !== void 0 && (t.backgroundColor = e.background), e.borderRadius !== void 0 && (t.borderRadius = e.borderRadius), Object.assign(t, u(e.padding, "padding")), Object.assign(t, u(e.margin, "margin")), t;
85
+ }
86
+ //#endregion
87
+ //#region src/layout/Row.tsx
88
+ var f = e(({ props: e, slots: t }) => {
89
+ let n = () => {
90
+ let t = {
91
+ display: "flex",
92
+ flexDirection: "row"
93
+ };
94
+ e.gap !== void 0 && (t.gap = e.gap), e.align && (t.alignItems = e.align), e.justify && (t.justifyContent = e.justify), e.wrap && (t.flexWrap = "wrap");
95
+ let n = d({
96
+ width: e.width,
97
+ height: e.height,
98
+ flex: e.flex,
99
+ background: e.background,
100
+ borderRadius: e.borderRadius,
101
+ padding: e.padding,
102
+ margin: e.margin
103
+ });
104
+ for (let e in n) t[e] = n[e];
105
+ return t;
106
+ };
107
+ return () => /* @__PURE__ */ r("view", {
108
+ class: e.class,
109
+ style: n(),
110
+ children: t.default?.()
111
+ });
112
+ }), p = e(({ props: e, slots: t }) => {
113
+ let n = () => {
114
+ let t = {
115
+ display: "flex",
116
+ flexDirection: "column"
117
+ };
118
+ e.gap !== void 0 && (t.gap = e.gap), e.align && (t.alignItems = e.align), e.justify && (t.justifyContent = e.justify), e.wrap && (t.flexWrap = "wrap");
119
+ let n = d({
120
+ width: e.width,
121
+ height: e.height,
122
+ flex: e.flex,
123
+ background: e.background,
124
+ borderRadius: e.borderRadius,
125
+ padding: e.padding,
126
+ margin: e.margin
127
+ });
128
+ for (let e in n) t[e] = n[e];
129
+ return t;
130
+ };
131
+ return () => /* @__PURE__ */ r("view", {
132
+ class: e.class,
133
+ style: n(),
134
+ children: t.default?.()
135
+ });
136
+ }), m = e(({ props: e, slots: t }) => {
137
+ let n = () => {
138
+ let t = {
139
+ display: "flex",
140
+ justifyContent: "center",
141
+ alignItems: "center"
142
+ }, n = d({
143
+ width: e.width,
144
+ height: e.height,
145
+ flex: e.flex,
146
+ background: e.background,
147
+ borderRadius: e.borderRadius
148
+ });
149
+ for (let e in n) t[e] = n[e];
150
+ return t;
151
+ };
152
+ return () => /* @__PURE__ */ r("view", {
153
+ class: e.class,
154
+ style: n(),
155
+ children: t.default?.()
156
+ });
157
+ }), h = e(({ props: e }) => {
158
+ let t = () => e.size === void 0 ? { flex: 1 } : {
159
+ width: e.size,
160
+ height: e.size
161
+ };
162
+ return () => /* @__PURE__ */ r("view", {
163
+ class: e.class,
164
+ style: t()
165
+ });
166
+ }), g = e(({ props: e, slots: t }) => {
167
+ let n = () => {
168
+ let t = {};
169
+ return e.height !== void 0 && (t.height = e.height), e.width !== void 0 && (t.width = e.width), e.flex !== void 0 && (t.flex = e.flex), t;
170
+ };
171
+ return () => {
172
+ let i = e.direction ?? "vertical";
173
+ return /* @__PURE__ */ r("scroll-view", {
174
+ class: e.class,
175
+ style: n(),
176
+ "scroll-orientation": i,
177
+ "scroll-y": i === "vertical" ? !0 : void 0,
178
+ "scroll-x": i === "horizontal" ? !0 : void 0,
179
+ "show-scrollbar": e.showScrollbar,
180
+ bounces: e.bounces,
181
+ children: t.default?.()
182
+ });
183
+ };
184
+ }), _ = e(({ props: e }) => {
185
+ let t = () => {
186
+ let t = [e.vertical ? "divider-vertical" : "divider"];
187
+ return e.class && t.push(e.class), t.join(" ");
188
+ }, n = () => {
189
+ let t = {};
190
+ return e.color && (t.backgroundColor = e.color), e.margin !== void 0 && (e.vertical ? (t.marginLeft = e.margin, t.marginRight = e.margin) : (t.marginTop = e.margin, t.marginBottom = e.margin)), t;
191
+ };
192
+ return () => /* @__PURE__ */ r("view", {
193
+ class: t(),
194
+ style: n()
195
+ });
196
+ }), v = {
197
+ xs: "input-xs",
198
+ sm: "input-sm",
199
+ md: "",
200
+ lg: "input-lg"
201
+ }, y = e(({ props: e }) => {
202
+ let t = () => {
203
+ let t = ["input"];
204
+ if (e.variant === "bordered" && t.push("input-bordered"), e.variant === "ghost" && t.push("input-ghost"), e.color && t.push(`input-${e.color}`), e.size) {
205
+ let n = v[e.size];
206
+ n && t.push(n);
207
+ }
208
+ return e.class && t.push(e.class), t.join(" ");
209
+ };
210
+ return () => /* @__PURE__ */ r("input", {
211
+ class: t(),
212
+ placeholder: e.placeholder,
213
+ type: e.type ?? "text",
214
+ disabled: e.disabled,
215
+ model: e.model
216
+ });
217
+ }), b = {
218
+ xs: 10,
219
+ sm: 16,
220
+ md: 20,
221
+ lg: 24
222
+ }, x = e(({ props: e, emit: t }) => {
223
+ let n = () => {
224
+ let t = ["toggle"], n = e.size ?? "md";
225
+ return t.push(`toggle-${n}`), e.color && t.push(`toggle-${e.color}`), e.checked && t.push("toggle-checked"), e.disabled && t.push("toggle-disabled"), e.class && t.push(e.class), t.join(" ");
226
+ };
227
+ return () => {
228
+ let i = !!e.checked, a = e.size ?? "md", o = i ? b[a] : 0;
229
+ return /* @__PURE__ */ r("view", {
230
+ class: n(),
231
+ bindtap: () => {
232
+ e.disabled || t("change", !i);
233
+ },
234
+ children: /* @__PURE__ */ r("view", {
235
+ class: "toggle-thumb",
236
+ style: { transform: `translateX(${o}px)` }
237
+ })
238
+ });
239
+ };
240
+ }), S = {
241
+ xs: 10,
242
+ sm: 12,
243
+ md: 14,
244
+ lg: 19
245
+ }, C = e(({ props: e, emit: t }) => {
246
+ let n = () => {
247
+ let t = ["checkbox"], n = e.size ?? "md";
248
+ return n !== "md" && t.push(`checkbox-${n}`), e.color && t.push(`checkbox-${e.color}`), e.checked && t.push("checkbox-checked"), e.disabled && t.push("checkbox-disabled"), e.class && t.push(e.class), t.join(" ");
249
+ };
250
+ return () => {
251
+ let i = !!e.checked, a = e.size ?? "md";
252
+ return /* @__PURE__ */ r("view", {
253
+ class: n(),
254
+ bindtap: () => {
255
+ e.disabled || t("change", !i);
256
+ },
257
+ children: i ? /* @__PURE__ */ r("text", {
258
+ class: "checkbox-mark",
259
+ style: { fontSize: S[a] },
260
+ children: "✓"
261
+ }) : null
262
+ });
263
+ };
264
+ }), w = e(({ props: e, emit: t }) => {
265
+ let a = n({ open: !1 }), o = () => {
266
+ let t = ["select"];
267
+ return e.variant === "bordered" && t.push("select-bordered"), e.variant === "ghost" && t.push("select-ghost"), e.color && t.push(`select-${e.color}`), e.size && t.push(`select-${e.size}`), e.class && t.push(e.class), t.join(" ");
268
+ }, s = () => {
269
+ let t = (e.options ?? []).find((t) => t.value === e.value);
270
+ return t ? t.label : e.placeholder ?? "Select...";
271
+ };
272
+ return () => /* @__PURE__ */ i("view", {
273
+ style: {
274
+ position: "relative",
275
+ opacity: e.disabled ? .5 : 1
276
+ },
277
+ children: [/* @__PURE__ */ i("view", {
278
+ class: o(),
279
+ bindtap: () => {
280
+ e.disabled || (a.open = !a.open);
281
+ },
282
+ children: [/* @__PURE__ */ r("text", { children: s() }), /* @__PURE__ */ r("view", {
283
+ style: { marginLeft: "auto" },
284
+ children: /* @__PURE__ */ r("text", { children: a.open ? "▲" : "▼" })
285
+ })]
286
+ }), a.open && !e.disabled && /* @__PURE__ */ r("view", {
287
+ class: "select-dropdown",
288
+ style: {
289
+ position: "absolute",
290
+ top: "100%",
291
+ left: 0,
292
+ right: 0,
293
+ zIndex: 10
294
+ },
295
+ children: (e.options ?? []).map((n) => /* @__PURE__ */ r("view", {
296
+ class: `select-option${n.value === e.value ? " select-option-active" : ""}`,
297
+ bindtap: () => {
298
+ t("change", n.value), a.open = !1;
299
+ },
300
+ children: /* @__PURE__ */ r("text", { children: n.label })
301
+ }))
302
+ })]
303
+ });
304
+ }), T = e(({ props: e, emit: t }) => {
305
+ let n = () => {
306
+ let t = ["radio"];
307
+ return e.color && t.push(`radio-${e.color}`), e.size && t.push(`radio-${e.size}`), e.checked && t.push("radio-checked"), e.class && t.push(e.class), t.join(" ");
308
+ };
309
+ return () => /* @__PURE__ */ i("view", {
310
+ style: {
311
+ flexDirection: "row",
312
+ alignItems: "center",
313
+ gap: 8,
314
+ opacity: e.disabled ? .5 : 1
315
+ },
316
+ bindtap: () => {
317
+ !e.disabled && e.value != null && t("select", e.value);
318
+ },
319
+ children: [/* @__PURE__ */ r("view", {
320
+ class: n(),
321
+ children: e.checked && /* @__PURE__ */ r("view", { class: "radio-mark" })
322
+ }), e.label && /* @__PURE__ */ r("text", { children: e.label })]
323
+ });
324
+ }), E = t(e(({ props: e, slots: t }) => () => /* @__PURE__ */ r("view", {
325
+ class: e.class ?? "",
326
+ style: { gap: 8 },
327
+ children: t.default?.()
328
+ })), { Item: T }), D = {
329
+ xs: "textarea-xs",
330
+ sm: "textarea-sm",
331
+ md: "",
332
+ lg: "textarea-lg"
333
+ }, O = e(({ props: e }) => {
334
+ let t = () => {
335
+ let t = ["textarea"];
336
+ if (e.variant === "bordered" && t.push("textarea-bordered"), e.variant === "ghost" && t.push("textarea-ghost"), e.color && t.push(`textarea-${e.color}`), e.size) {
337
+ let n = D[e.size];
338
+ n && t.push(n);
339
+ }
340
+ return e.class && t.push(e.class), t.join(" ");
341
+ }, n = () => (e.rows ?? 3) * 20 + 16;
342
+ return () => /* @__PURE__ */ r("textarea", {
343
+ class: t(),
344
+ placeholder: e.placeholder,
345
+ disabled: e.disabled,
346
+ model: e.model,
347
+ style: { height: n() }
348
+ });
349
+ }), k = e(({ props: e, slots: t }) => () => /* @__PURE__ */ i("view", {
350
+ class: ["form-control", e.class].filter(Boolean).join(" "),
351
+ style: { gap: 4 },
352
+ children: [
353
+ e.label && /* @__PURE__ */ r("view", {
354
+ class: "label",
355
+ children: /* @__PURE__ */ r("text", {
356
+ class: "label-text",
357
+ children: e.required ? `${e.label} *` : e.label
358
+ })
359
+ }),
360
+ t.default?.(),
361
+ e.error && /* @__PURE__ */ r("view", {
362
+ class: "label",
363
+ children: /* @__PURE__ */ r("text", {
364
+ class: "label-text-error",
365
+ children: e.error
366
+ })
367
+ })
368
+ ]
369
+ })), A = e(({ props: e, slots: t }) => {
370
+ let n = () => {
371
+ let t = ["badge"];
372
+ return e.variant && t.push(`badge-${e.variant}`), e.size && t.push(`badge-${e.size}`), e.outline && t.push("badge-outline"), e.class && t.push(e.class), t.join(" ");
373
+ };
374
+ return () => /* @__PURE__ */ r("view", {
375
+ class: n(),
376
+ children: t.default?.()
377
+ });
378
+ }), j = e(({ props: e, slots: t }) => {
379
+ let n = () => {
380
+ let t = ["alert"];
381
+ return e.variant && t.push(`alert-${e.variant}`), e.class && t.push(e.class), t.join(" ");
382
+ };
383
+ return () => /* @__PURE__ */ r("view", {
384
+ class: n(),
385
+ children: t.default?.()
386
+ });
387
+ }), M = e(({ props: e }) => {
388
+ let t = () => {
389
+ let t = ["progress"];
390
+ return e.color && t.push(`progress-${e.color}`), e.class && t.push(e.class), t.join(" ");
391
+ };
392
+ return () => {
393
+ let n = e.max ?? 100, i = Math.min(Math.max((e.value ?? 0) / n, 0), 1) * 100;
394
+ return /* @__PURE__ */ r("view", {
395
+ class: t(),
396
+ children: /* @__PURE__ */ r("view", {
397
+ class: "progress-bar",
398
+ style: { width: `${i}%` }
399
+ })
400
+ });
401
+ };
402
+ }), N = t(e(({ props: e, slots: t }) => () => e.open ? /* @__PURE__ */ r("view", {
403
+ class: "modal-overlay",
404
+ bindtap: () => {
405
+ e.onClose?.();
406
+ },
407
+ children: /* @__PURE__ */ r("view", {
408
+ class: `modal-box${e.class ? " " + e.class : ""}`,
409
+ bindtap: (e) => {
410
+ e?.stopPropagation?.();
411
+ },
412
+ children: t.default?.()
413
+ })
414
+ }) : /* @__PURE__ */ r("view", { style: { display: "none" } })), {
415
+ Header: e(({ props: e, slots: t }) => () => /* @__PURE__ */ r("view", {
416
+ class: `modal-header${e.class ? " " + e.class : ""}`,
417
+ children: t.default?.()
418
+ })),
419
+ Body: e(({ props: e, slots: t }) => () => /* @__PURE__ */ r("view", {
420
+ class: `modal-body${e.class ? " " + e.class : ""}`,
421
+ children: t.default?.()
422
+ })),
423
+ Actions: e(({ props: e, slots: t }) => () => /* @__PURE__ */ r("view", {
424
+ class: `modal-action${e.class ? " " + e.class : ""}`,
425
+ children: t.default?.()
426
+ }))
427
+ }), P = e(({ props: e }) => () => {
428
+ let t = {};
429
+ if (e.width != null && (t.width = e.width), e.height != null && (t.height = e.height), e.circle) {
430
+ let n = e.width ?? e.height ?? 48;
431
+ t.width = n, t.height = n, t.borderRadius = typeof n == "number" ? n / 2 : "50%";
432
+ }
433
+ return /* @__PURE__ */ r("view", {
434
+ class: `skeleton${e.class ? " " + e.class : ""}`,
435
+ style: t
436
+ });
437
+ }), F = t(e(({ props: e, slots: t }) => () => /* @__PURE__ */ r("view", {
438
+ class: `steps${e.vertical ?? !1 ? " steps-vertical" : " steps-horizontal"}${e.class ? " " + e.class : ""}`,
439
+ children: t.default?.()
440
+ })), { Step: e(({ props: e, slots: t }) => () => {
441
+ let n = e.color, a = n ? ` step-${n}` : "";
442
+ return /* @__PURE__ */ i("view", {
443
+ class: `step${a}${e.class ? " " + e.class : ""}`,
444
+ children: [/* @__PURE__ */ r("view", {
445
+ class: `step-indicator${a}`,
446
+ children: e.content ? /* @__PURE__ */ r("text", {
447
+ style: { fontSize: 14 },
448
+ children: e.content
449
+ }) : null
450
+ }), t.default?.()]
451
+ });
452
+ }) }), I = t(e(({ props: e, slots: t }) => () => /* @__PURE__ */ r("view", {
453
+ class: `tabs${e.class ? " " + e.class : ""}`,
454
+ children: t.default?.()
455
+ })), { Tab: e(({ props: e, slots: t }) => () => /* @__PURE__ */ i("view", {
456
+ class: `tab${e.active ?? !1 ? " tab-active" : ""}${e.class ? " " + e.class : ""}`,
457
+ bindtap: () => {
458
+ e.onPress?.();
459
+ },
460
+ children: [t.default?.(), e.label ? /* @__PURE__ */ r("text", { children: e.label }) : null]
461
+ })) }), L = {
462
+ xs: 24,
463
+ sm: 32,
464
+ md: 48,
465
+ lg: 64,
466
+ xl: 96
467
+ }, R = {
468
+ xs: 10,
469
+ sm: 12,
470
+ md: 18,
471
+ lg: 24,
472
+ xl: 36
473
+ }, z = e(({ props: e }) => () => {
474
+ let t = e.size || "md", n = L[t], i = ["avatar"];
475
+ e.online && i.push("online"), e.offline && i.push("offline"), e.placeholder && !e.src && i.push("placeholder"), e.class && i.push(e.class);
476
+ let a = e.rounded, o = a === "full" || a === !0 ? n / 2 : 8, s = {
477
+ width: n,
478
+ height: n,
479
+ borderRadius: o,
480
+ overflow: "hidden",
481
+ alignItems: "center",
482
+ justifyContent: "center",
483
+ display: "flex"
484
+ };
485
+ return e.src ? /* @__PURE__ */ r("view", {
486
+ class: i.join(" "),
487
+ children: /* @__PURE__ */ r("view", {
488
+ style: s,
489
+ children: /* @__PURE__ */ r("image", {
490
+ src: e.src,
491
+ style: {
492
+ width: n,
493
+ height: n,
494
+ borderRadius: o
495
+ }
496
+ })
497
+ })
498
+ }) : /* @__PURE__ */ r("view", {
499
+ class: i.join(" "),
500
+ children: /* @__PURE__ */ r("view", {
501
+ class: "avatar-placeholder",
502
+ style: s,
503
+ children: /* @__PURE__ */ r("text", {
504
+ style: { fontSize: R[t] },
505
+ children: e.placeholder || "?"
506
+ })
507
+ })
508
+ });
509
+ }), B = {
510
+ xs: "text-xs",
511
+ sm: "text-sm",
512
+ base: "text-base",
513
+ lg: "text-lg",
514
+ xl: "text-xl",
515
+ "2xl": "text-2xl",
516
+ "3xl": "text-3xl"
517
+ }, V = {
518
+ light: "font-light",
519
+ normal: "font-normal",
520
+ medium: "font-medium",
521
+ semibold: "font-semibold",
522
+ bold: "font-bold"
523
+ }, H = e(({ props: e, slots: t }) => {
524
+ let n = () => {
525
+ let t = [];
526
+ return e.size && t.push(B[e.size]), e.weight && t.push(V[e.weight]), e.color && t.push(`text-${e.color}`), e.class && t.push(e.class), t.join(" ");
527
+ };
528
+ return () => /* @__PURE__ */ r("text", {
529
+ class: n(),
530
+ children: t.default?.()
531
+ });
532
+ }), U = {
533
+ 1: "text-3xl font-bold",
534
+ 2: "text-2xl font-bold",
535
+ 3: "text-xl font-semibold",
536
+ 4: "text-lg font-semibold",
537
+ 5: "text-base font-semibold",
538
+ 6: "text-sm font-semibold"
539
+ }, W = e(({ props: e, slots: t }) => {
540
+ let n = () => {
541
+ let t = [U[e.level ?? 2], "text-base-content"];
542
+ return e.class && t.push(e.class), t.join(" ");
543
+ };
544
+ return () => /* @__PURE__ */ r("text", {
545
+ class: n(),
546
+ children: t.default?.()
547
+ });
548
+ });
549
+ //#endregion
550
+ export { j as Alert, z as Avatar, A as Badge, c as Button, l as Card, m as Center, C as Checkbox, p as Col, _ as Divider, k as FormField, W as Heading, y as Input, a as Loading, N as Modal, M as Progress, E as Radio, f as Row, g as ScrollView, w as Select, P as Skeleton, h as Spacer, F as Steps, I as Tabs, H as Text, O as Textarea, x as Toggle };
551
+
552
+ //# sourceMappingURL=index.js.map