asheeui 0.6.15 → 0.7.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.
- package/dist/AsheeUIProvider.js +22 -24
- package/dist/components/accordion/Accordion.js +79 -173
- package/dist/components/accordion/accordion-config.js +12 -13
- package/dist/components/accordion/accordion-styles.js +21 -24
- package/dist/components/autocomplete/Autocomplete.js +78 -136
- package/dist/components/autocomplete/autocomplete-config.js +7 -12
- package/dist/components/button/Button.d.ts +29 -1
- package/dist/components/button/Button.d.ts.map +1 -1
- package/dist/components/button/Button.js +47 -108
- package/dist/components/button/button-config.js +16 -17
- package/dist/components/button/button-styles.js +10 -11
- package/dist/components/card/Card.d.ts +36 -16
- package/dist/components/card/Card.d.ts.map +1 -1
- package/dist/components/card/Card.js +115 -205
- package/dist/components/card/card-config.js +24 -21
- package/dist/components/card/card-styles.js +19 -22
- package/dist/components/carousel/Carousel.js +123 -248
- package/dist/components/carousel/carousel-config.js +24 -25
- package/dist/components/carousel/carousel-styles.js +14 -16
- package/dist/components/chip/Chip.js +84 -191
- package/dist/components/chip/chip-config.js +13 -14
- package/dist/components/chip/chip-styles.js +22 -26
- package/dist/components/date-picker/Calendar.d.ts +3 -3
- package/dist/components/date-picker/Calendar.d.ts.map +1 -1
- package/dist/components/date-picker/Calendar.js +141 -222
- package/dist/components/date-picker/DatePicker.d.ts +5 -5
- package/dist/components/date-picker/DatePicker.d.ts.map +1 -1
- package/dist/components/date-picker/DatePicker.js +122 -220
- package/dist/components/date-picker/TimeSpinner.js +58 -82
- package/dist/components/date-picker/date-picker-config.d.ts +4 -4
- package/dist/components/date-picker/date-picker-config.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker-config.js +10 -11
- package/dist/components/date-picker/date-picker-styles.js +44 -45
- package/dist/components/date-picker/date-picker.helpers.d.ts +4 -4
- package/dist/components/date-picker/date-picker.helpers.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker.helpers.js +74 -102
- package/dist/components/drawer/Drawer.d.ts +26 -8
- package/dist/components/drawer/Drawer.d.ts.map +1 -1
- package/dist/components/drawer/Drawer.js +54 -131
- package/dist/components/drawer/drawer-config.js +14 -15
- package/dist/components/drawer/drawer-styles.js +38 -42
- package/dist/components/field/FieldShell.js +49 -56
- package/dist/components/field/field-config.js +17 -18
- package/dist/components/field/field-styles.js +8 -8
- package/dist/components/image/Image.d.ts +7 -7
- package/dist/components/image/Image.d.ts.map +1 -1
- package/dist/components/image/Image.js +65 -132
- package/dist/components/image/image-config.js +17 -18
- package/dist/components/image/image-styles.js +14 -15
- package/dist/components/input/Input.js +65 -150
- package/dist/components/input/PasswordInput.js +30 -49
- package/dist/components/input/input-config.js +7 -7
- package/dist/components/input/input-styles.js +9 -10
- package/dist/components/keyboard/KeyboardContext.js +10 -11
- package/dist/components/keyboard/KeyboardProvider.js +100 -181
- package/dist/components/keyboard/OnScreenKeyboard.d.ts.map +1 -1
- package/dist/components/keyboard/OnScreenKeyboard.js +159 -166
- package/dist/components/keyboard/keyboard-config.js +59 -57
- package/dist/components/keyboard/keyboard-styles.js +10 -11
- package/dist/components/keyboard/use-keyboard-field.js +29 -21
- package/dist/components/link/Link.js +47 -137
- package/dist/components/link/link-config.js +14 -15
- package/dist/components/link/link-styles.js +25 -29
- package/dist/components/marquee/Marquee.js +55 -144
- package/dist/components/marquee/marquee-config.js +18 -19
- package/dist/components/marquee/marquee-styles.js +13 -15
- package/dist/components/modal/Modal.d.ts +26 -10
- package/dist/components/modal/Modal.d.ts.map +1 -1
- package/dist/components/modal/Modal.js +56 -136
- package/dist/components/modal/modal-config.js +15 -16
- package/dist/components/modal/modal-styles.js +13 -14
- package/dist/components/multi-select/MultiSelect.d.ts +18 -2
- package/dist/components/multi-select/MultiSelect.d.ts.map +1 -1
- package/dist/components/multi-select/MultiSelect.js +149 -283
- package/dist/components/multi-select/multi-select-config.d.ts +23 -18
- package/dist/components/multi-select/multi-select-config.d.ts.map +1 -1
- package/dist/components/multi-select/multi-select-config.js +18 -21
- package/dist/components/multi-select/multi-select-styles.js +17 -20
- package/dist/components/radio/Radio.js +43 -80
- package/dist/components/radio/RadioGroup.js +57 -155
- package/dist/components/radio/radio-config.js +15 -16
- package/dist/components/radio/radio-context.js +6 -6
- package/dist/components/radio/radio-styles.js +55 -60
- package/dist/components/resizable-screen/ResizableScreen.js +87 -177
- package/dist/components/resizable-screen/resizable-screen-config.js +16 -17
- package/dist/components/select/Select.d.ts +3 -2
- package/dist/components/select/Select.d.ts.map +1 -1
- package/dist/components/select/Select.js +97 -195
- package/dist/components/select/select-config.js +8 -9
- package/dist/components/select/select-styles.js +5 -5
- package/dist/components/select-menu/SelectMenu.d.ts.map +1 -1
- package/dist/components/select-menu/SelectMenu.js +102 -196
- package/dist/components/select-menu/select-menu-config.js +12 -12
- package/dist/components/select-menu/use-select-floating.d.ts +11 -1
- package/dist/components/select-menu/use-select-floating.d.ts.map +1 -1
- package/dist/components/select-menu/use-select-floating.js +41 -48
- package/dist/components/sidebar/Sidebar.d.ts +43 -22
- package/dist/components/sidebar/Sidebar.d.ts.map +1 -1
- package/dist/components/sidebar/Sidebar.js +146 -331
- package/dist/components/sidebar/sidebar-config.d.ts +98 -31
- package/dist/components/sidebar/sidebar-config.d.ts.map +1 -1
- package/dist/components/sidebar/sidebar-config.js +47 -33
- package/dist/components/sidebar/sidebar-styles.js +27 -32
- package/dist/components/spinner/spinner-config.js +12 -13
- package/dist/components/spinner/spinner-styles.js +13 -14
- package/dist/components/spinner/spinner.js +39 -82
- package/dist/components/switch/Switch.js +62 -154
- package/dist/components/switch/switch-config.js +11 -12
- package/dist/components/switch/switch-styles.js +14 -16
- package/dist/components/table/Table.js +64 -186
- package/dist/components/table/table-config.js +17 -18
- package/dist/components/table/table-styles.js +48 -52
- package/dist/components/tabs/Tabs.d.ts +16 -8
- package/dist/components/tabs/Tabs.d.ts.map +1 -1
- package/dist/components/tabs/Tabs.js +93 -208
- package/dist/components/tabs/tabs-config.d.ts +42 -20
- package/dist/components/tabs/tabs-config.d.ts.map +1 -1
- package/dist/components/tabs/tabs-config.js +26 -18
- package/dist/components/tabs/tabs-styles.js +15 -17
- package/dist/components/textarea/Textarea.js +52 -138
- package/dist/components/textarea/textarea-config.js +10 -11
- package/dist/components/textarea/textarea-styles.js +9 -10
- package/dist/components/toast/ToastContext.js +22 -26
- package/dist/components/toast/ToastItem.js +82 -144
- package/dist/components/toast/ToastProvider.d.ts.map +1 -1
- package/dist/components/toast/ToastProvider.js +128 -190
- package/dist/components/toast/toast-config.js +23 -24
- package/dist/components/toast/toast-styles.js +50 -55
- package/dist/components/toast/use-pausable-timeout.js +17 -13
- package/dist/components/tooltip/Tooltip.d.ts +5 -0
- package/dist/components/tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/tooltip/Tooltip.js +68 -158
- package/dist/components/tooltip/tooltip-config.d.ts +25 -0
- package/dist/components/tooltip/tooltip-config.d.ts.map +1 -1
- package/dist/components/tooltip/tooltip-config.js +26 -22
- package/dist/components/tooltip/tooltip-styles.js +15 -17
- package/dist/config/default-config.js +11 -34
- package/dist/config/resolve-color.js +23 -23
- package/dist/config/resolve-config.d.ts.map +1 -1
- package/dist/config/resolve-config.js +14 -12
- package/dist/icons/ArrowLeftIcon.js +16 -19
- package/dist/icons/CalendarIcon.js +43 -24
- package/dist/icons/CheckIcon.js +16 -19
- package/dist/icons/ChevronDownIcon.js +15 -21
- package/dist/icons/ChevronLeftIcon.js +16 -19
- package/dist/icons/ChevronRightIcon.js +16 -19
- package/dist/icons/ChevronUpIcon.js +16 -19
- package/dist/icons/ClearIcon.js +26 -22
- package/dist/icons/ClockIcon.js +20 -22
- package/dist/icons/CloseIcon.js +26 -22
- package/dist/icons/ErrorIcon.js +16 -19
- package/dist/icons/ExternalLinkIcon.js +25 -23
- package/dist/icons/EyeIcon.js +20 -22
- package/dist/icons/EyeOffIcon.js +21 -22
- package/dist/icons/InfoIcon.js +16 -19
- package/dist/icons/SearchIcon.js +25 -22
- package/dist/icons/WarningIcon.js +16 -19
- package/dist/index.js +65 -163
- package/dist/libs/context.js +10 -13
- package/dist/libs/index.js +1 -0
- package/dist/libs/registry.js +10 -12
- package/dist/libs/use-floating-z-index.d.ts +32 -0
- package/dist/libs/use-floating-z-index.d.ts.map +1 -0
- package/dist/libs/use-floating-z-index.js +16 -0
- package/dist/libs/use-isomorphic-layout-effect.js +5 -5
- package/dist/scripts/AsheeThemeScript.js +35 -44
- package/dist/shared/radius.d.ts.map +1 -1
- package/dist/shared/radius.js +12 -13
- package/dist/shared/variant.js +46 -134
- package/dist/theme/color.js +28 -28
- package/dist/theme/controller.d.ts.map +1 -1
- package/dist/theme/controller.js +65 -178
- package/dist/theme/useTheme.js +13 -44
- package/dist/utils/cn.js +7 -7
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/merge-object.js +13 -14
- package/dist/utils/resolve-token.js +11 -14
- package/dist/utils/stacking.d.ts +76 -0
- package/dist/utils/stacking.d.ts.map +1 -0
- package/dist/utils/stacking.js +34 -0
- package/package.json +12 -11
|
@@ -1,206 +1,116 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import { useAsheeConfig as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
imageProps: l,
|
|
118
|
-
loading: Z
|
|
119
|
-
}
|
|
120
|
-
);
|
|
121
|
-
}, tt = () => {
|
|
122
|
-
if (!(t != null && t.src) || b !== "background") return null;
|
|
123
|
-
const n = t.component || "img";
|
|
124
|
-
let a = { ...o ?? {} };
|
|
125
|
-
if (t != null && t.component) {
|
|
126
|
-
const l = (o == null ? void 0 : o.loading) === "lazy", f = (o == null ? void 0 : o.priority) === !0;
|
|
127
|
-
(l || f) && console.warn(
|
|
128
|
-
`[Card] ${l ? '`loading="lazy"`' : "`priority={true}`"} with custom image component may cause rendering issues. Consider using \`loading="eager"\` and removing \`priority\` for card images.`
|
|
129
|
-
), a = {
|
|
130
|
-
...a,
|
|
131
|
-
loading: "eager",
|
|
132
|
-
...a.priority !== void 0 && { priority: !1 }
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
return /* @__PURE__ */ d("div", { className: "absolute inset-0 z-0 pointer-events-none", children: /* @__PURE__ */ d(
|
|
136
|
-
n,
|
|
137
|
-
{
|
|
138
|
-
src: t.src,
|
|
139
|
-
alt: t == null ? void 0 : t.alt,
|
|
140
|
-
className: "h-full w-full object-cover",
|
|
141
|
-
...a
|
|
142
|
-
}
|
|
143
|
-
) });
|
|
144
|
-
}, _ = E ?? F;
|
|
145
|
-
return /* @__PURE__ */ C(
|
|
146
|
-
"div",
|
|
147
|
-
{
|
|
148
|
-
ref: T,
|
|
149
|
-
id: q,
|
|
150
|
-
tabIndex: c && !s ? 0 : -1,
|
|
151
|
-
role: c ? i ? "link" : "button" : void 0,
|
|
152
|
-
"aria-disabled": s,
|
|
153
|
-
onClick: w,
|
|
154
|
-
onKeyDown: g,
|
|
155
|
-
className: p(
|
|
156
|
-
"relative flex flex-col transition-colors duration-200 text-left",
|
|
157
|
-
P,
|
|
158
|
-
Y,
|
|
159
|
-
c && !s && "cursor-pointer hover:shadow-lg hover:border-primary/40 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 select-none",
|
|
160
|
-
c && !s && Q && "motion-safe:transition-transform motion-safe:duration-100 motion-safe:active:scale-[0.99]",
|
|
161
|
-
s && "opacity-50 pointer-events-none select-none",
|
|
162
|
-
V
|
|
163
|
-
),
|
|
164
|
-
style: H,
|
|
165
|
-
...O,
|
|
166
|
-
children: [
|
|
167
|
-
R("top"),
|
|
168
|
-
tt(),
|
|
169
|
-
/* @__PURE__ */ C(
|
|
170
|
-
"div",
|
|
171
|
-
{
|
|
172
|
-
className: p(
|
|
173
|
-
"flex flex-col flex-1 z-10 w-full min-w-0",
|
|
174
|
-
W,
|
|
175
|
-
S
|
|
176
|
-
),
|
|
177
|
-
children: [
|
|
178
|
-
(I || h || x) && /* @__PURE__ */ C("div", { className: p("flex flex-col z-10", X), children: [
|
|
179
|
-
I,
|
|
180
|
-
h && /* @__PURE__ */ d("h3", { className: "font-semibold leading-tight tracking-tight text-foreground text-lg md:text-xl", children: h }),
|
|
181
|
-
x && /* @__PURE__ */ d("p", { className: "text-sm text-muted-foreground leading-relaxed", children: x })
|
|
182
|
-
] }),
|
|
183
|
-
_ && /* @__PURE__ */ d("div", { className: "flex-1 z-10 text-sm leading-relaxed", children: _ }),
|
|
184
|
-
N && /* @__PURE__ */ d(
|
|
185
|
-
"div",
|
|
186
|
-
{
|
|
187
|
-
className: p(
|
|
188
|
-
"flex items-center justify-between z-10 mt-auto pt-2",
|
|
189
|
-
S
|
|
190
|
-
),
|
|
191
|
-
children: N
|
|
192
|
-
}
|
|
193
|
-
)
|
|
194
|
-
]
|
|
195
|
-
}
|
|
196
|
-
),
|
|
197
|
-
R("bottom")
|
|
198
|
-
]
|
|
199
|
-
}
|
|
200
|
-
);
|
|
201
|
-
}
|
|
202
|
-
);
|
|
203
|
-
ft.displayName = "Card";
|
|
204
|
-
export {
|
|
205
|
-
ft as Card
|
|
206
|
-
};
|
|
2
|
+
"use client";
|
|
3
|
+
import { cn as e } from "../../utils/cn.js";
|
|
4
|
+
import { useAsheeConfig as t } from "../../libs/context.js";
|
|
5
|
+
import { RADIUS_CLASS as n } from "../../shared/radius.js";
|
|
6
|
+
import { resolveAnimate as r, resolveCascade as i, resolveClassKey as a, resolveRadiusKey as o } from "../../utils/resolve-token.js";
|
|
7
|
+
import { Image as s } from "../image/Image.js";
|
|
8
|
+
import { FALLBACK_CARD_CONFIG as c } from "./card-config.js";
|
|
9
|
+
import { CARD_GAP_CLASS as l, CARD_HEADER_GAP_CLASS as u, CARD_PADDING_CLASS as d, CARD_VARIANT_CLASS as f } from "./card-styles.js";
|
|
10
|
+
import { forwardRef as p, useId as m } from "react";
|
|
11
|
+
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
12
|
+
//#region src/components/card/Card.tsx
|
|
13
|
+
var _ = p(({ variant: p, size: _, radius: ee, animate: v, isClickable: y, isDisabled: b = !1, link: x, title: S, description: C, header: w, body: T, footer: E, image: D, className: te, children: ne, onClick: O, id: k, style: A, onKeyDown: j, ...M }, N) => {
|
|
14
|
+
let P = t(), F = P.components?.card, I = m(), L = k ?? I, R = i(_, F?.size, void 0, c.size), z = i(p, F?.variant, P.defaultVariant, c.variant), B = o(ee, F?.radius, P.defaultRadius, c.radius), V = i(D?.position, F?.image.position, void 0, c.image.position), H = !!x, U = x?.component ?? (H ? "a" : "div"), W = y ?? !!(H || O), G = r(v, F?.animate, c.animate), K = a(R, d, c.size), q = a(R, l, c.size), J = a(R, u, c.size), Y = a(B, n, c.radius), X = i(D?.loading, F?.image.loading, void 0, c.image.loading), re = f[z] ?? f.bordered, { onClick: ie, ...ae } = x?.props ?? {}, Z = (e) => {
|
|
15
|
+
if (b) {
|
|
16
|
+
e.preventDefault();
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
O?.(e), ie?.(e);
|
|
20
|
+
}, oe = (e) => {
|
|
21
|
+
j?.(e), !H && W && !b && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), Z(e));
|
|
22
|
+
}, Q = (e) => {
|
|
23
|
+
if (!D?.src || V !== e) return null;
|
|
24
|
+
let t = {
|
|
25
|
+
top: "w-full shrink-0 rounded-b-none",
|
|
26
|
+
bottom: "w-full shrink-0 order-last rounded-t-none",
|
|
27
|
+
background: ""
|
|
28
|
+
}[e], n = { ...D?.props ?? {} };
|
|
29
|
+
if (D?.component) {
|
|
30
|
+
let e = D?.props?.loading === "lazy", t = D?.props?.priority === !0;
|
|
31
|
+
(e || t) && console.warn(`[Card] ${e ? "`loading=\"lazy\"`" : "`priority={true}`"} with custom image component may cause rendering issues. Consider using \`loading="eager"\` and removing \`priority\` for card images.`), n = {
|
|
32
|
+
...n,
|
|
33
|
+
loading: "eager",
|
|
34
|
+
...n.priority !== void 0 && { priority: !1 }
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
return /* @__PURE__ */ h(s, {
|
|
38
|
+
src: D.src,
|
|
39
|
+
alt: D.alt,
|
|
40
|
+
ratio: D?.ratio ?? "video",
|
|
41
|
+
fit: D.fit ?? "cover",
|
|
42
|
+
className: t,
|
|
43
|
+
component: D.component,
|
|
44
|
+
props: n,
|
|
45
|
+
loading: X
|
|
46
|
+
});
|
|
47
|
+
}, se = () => {
|
|
48
|
+
if (!D?.src || V !== "background") return null;
|
|
49
|
+
let e = D.component || "img", t = { ...D?.props ?? {} };
|
|
50
|
+
if (D?.component) {
|
|
51
|
+
let e = D?.props?.loading === "lazy", n = D?.props?.priority === !0;
|
|
52
|
+
(e || n) && console.warn(`[Card] ${e ? "`loading=\"lazy\"`" : "`priority={true}`"} with custom image component may cause rendering issues. Consider using \`loading="eager"\` and removing \`priority\` for card images.`), t = {
|
|
53
|
+
...t,
|
|
54
|
+
loading: "eager",
|
|
55
|
+
...t.priority !== void 0 && { priority: !1 }
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
return /* @__PURE__ */ h("div", {
|
|
59
|
+
className: "absolute inset-0 z-0 pointer-events-none",
|
|
60
|
+
children: /* @__PURE__ */ h(e, {
|
|
61
|
+
src: D.src,
|
|
62
|
+
alt: D?.alt,
|
|
63
|
+
className: "h-full w-full object-cover",
|
|
64
|
+
...t
|
|
65
|
+
})
|
|
66
|
+
});
|
|
67
|
+
}, $ = T ?? ne;
|
|
68
|
+
return /* @__PURE__ */ g(U, {
|
|
69
|
+
ref: N,
|
|
70
|
+
id: L,
|
|
71
|
+
tabIndex: W && !b ? 0 : -1,
|
|
72
|
+
role: W ? H ? "link" : "button" : void 0,
|
|
73
|
+
"aria-disabled": b,
|
|
74
|
+
onClick: Z,
|
|
75
|
+
onKeyDown: oe,
|
|
76
|
+
className: e("relative flex flex-col transition-colors duration-200 text-left", re, Y, W && !b && "cursor-pointer hover:shadow-lg hover:border-primary/40 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 select-none", W && !b && G && "motion-safe:transition-transform motion-safe:duration-100 motion-safe:active:scale-[0.99]", b && "opacity-50 pointer-events-none select-none", te),
|
|
77
|
+
style: A,
|
|
78
|
+
...M,
|
|
79
|
+
...ae,
|
|
80
|
+
children: [
|
|
81
|
+
Q("top"),
|
|
82
|
+
se(),
|
|
83
|
+
/* @__PURE__ */ g("div", {
|
|
84
|
+
className: e("flex flex-col flex-1 z-10 w-full min-w-0", K, q),
|
|
85
|
+
children: [
|
|
86
|
+
(w || S || C) && /* @__PURE__ */ g("div", {
|
|
87
|
+
className: e("flex flex-col z-10", J),
|
|
88
|
+
children: [
|
|
89
|
+
w,
|
|
90
|
+
S && /* @__PURE__ */ h("h3", {
|
|
91
|
+
className: "font-semibold leading-tight tracking-tight text-foreground text-lg md:text-xl",
|
|
92
|
+
children: S
|
|
93
|
+
}),
|
|
94
|
+
C && /* @__PURE__ */ h("p", {
|
|
95
|
+
className: "text-sm text-muted-foreground leading-relaxed",
|
|
96
|
+
children: C
|
|
97
|
+
})
|
|
98
|
+
]
|
|
99
|
+
}),
|
|
100
|
+
$ && /* @__PURE__ */ h("div", {
|
|
101
|
+
className: "flex-1 z-10 text-sm leading-relaxed",
|
|
102
|
+
children: $
|
|
103
|
+
}),
|
|
104
|
+
E && /* @__PURE__ */ h("div", {
|
|
105
|
+
className: e("flex items-center justify-between z-10 mt-auto pt-2", q),
|
|
106
|
+
children: E
|
|
107
|
+
})
|
|
108
|
+
]
|
|
109
|
+
}),
|
|
110
|
+
Q("bottom")
|
|
111
|
+
]
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
_.displayName = "Card";
|
|
115
|
+
//#endregion
|
|
116
|
+
export { _ as Card };
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { registerComponentDefaults as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import { registerComponentDefaults as e } from "../../libs/registry.js";
|
|
3
|
+
//#region src/components/card/card-config.ts
|
|
4
|
+
var t = {
|
|
5
|
+
size: "md",
|
|
6
|
+
image: {
|
|
7
|
+
position: "top",
|
|
8
|
+
ratio: "video",
|
|
9
|
+
fit: "cover"
|
|
10
|
+
},
|
|
11
|
+
animate: !0
|
|
7
12
|
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
};
|
|
21
|
-
export {
|
|
22
|
-
t as FALLBACK_CARD_CONFIG,
|
|
23
|
-
e as defaultCardConfig
|
|
13
|
+
e("card", t);
|
|
14
|
+
var n = {
|
|
15
|
+
size: "md",
|
|
16
|
+
variant: "bordered",
|
|
17
|
+
radius: "md",
|
|
18
|
+
image: {
|
|
19
|
+
position: "top",
|
|
20
|
+
ratio: "video",
|
|
21
|
+
fit: "cover",
|
|
22
|
+
loading: "lazy"
|
|
23
|
+
},
|
|
24
|
+
animate: !0
|
|
24
25
|
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { n as FALLBACK_CARD_CONFIG, t as defaultCardConfig };
|
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
//#region src/components/card/card-styles.ts
|
|
3
|
+
var e = {
|
|
4
|
+
sm: "p-4",
|
|
5
|
+
md: "p-6",
|
|
6
|
+
lg: "p-8"
|
|
7
|
+
}, t = {
|
|
8
|
+
sm: "gap-3",
|
|
9
|
+
md: "gap-4",
|
|
10
|
+
lg: "gap-5"
|
|
11
|
+
}, n = {
|
|
12
|
+
sm: "gap-1",
|
|
13
|
+
md: "gap-1.5",
|
|
14
|
+
lg: "gap-2"
|
|
6
15
|
}, r = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
sm: "gap-1",
|
|
12
|
-
md: "gap-1.5",
|
|
13
|
-
lg: "gap-2"
|
|
14
|
-
}, d = {
|
|
15
|
-
elevated: "bg-secondary text-foreground shadow-md border border-border/40",
|
|
16
|
-
bordered: "bg-background text-foreground border border-border shadow-xs",
|
|
17
|
-
flat: "bg-secondary/50 text-foreground border-none",
|
|
18
|
-
ghost: "bg-transparent text-foreground border-none shadow-none"
|
|
19
|
-
};
|
|
20
|
-
export {
|
|
21
|
-
r as CARD_GAP_CLASS,
|
|
22
|
-
e as CARD_HEADER_GAP_CLASS,
|
|
23
|
-
o as CARD_PADDING_CLASS,
|
|
24
|
-
d as CARD_VARIANT_CLASS
|
|
16
|
+
elevated: "bg-secondary text-foreground shadow-md border border-border/40",
|
|
17
|
+
bordered: "bg-background text-foreground border border-border shadow-xs",
|
|
18
|
+
flat: "bg-secondary/50 text-foreground border-none",
|
|
19
|
+
ghost: "bg-transparent text-foreground border-none shadow-none"
|
|
25
20
|
};
|
|
21
|
+
//#endregion
|
|
22
|
+
export { t as CARD_GAP_CLASS, n as CARD_HEADER_GAP_CLASS, e as CARD_PADDING_CLASS, r as CARD_VARIANT_CLASS };
|