asheeui 0.6.14 → 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.
Files changed (184) hide show
  1. package/README.md +1 -14
  2. package/dist/AsheeUIProvider.js +22 -24
  3. package/dist/components/accordion/Accordion.js +79 -173
  4. package/dist/components/accordion/accordion-config.js +12 -13
  5. package/dist/components/accordion/accordion-styles.js +21 -24
  6. package/dist/components/autocomplete/Autocomplete.js +78 -136
  7. package/dist/components/autocomplete/autocomplete-config.js +7 -12
  8. package/dist/components/button/Button.d.ts +29 -1
  9. package/dist/components/button/Button.d.ts.map +1 -1
  10. package/dist/components/button/Button.js +47 -108
  11. package/dist/components/button/button-config.js +16 -17
  12. package/dist/components/button/button-styles.js +10 -11
  13. package/dist/components/card/Card.d.ts +36 -16
  14. package/dist/components/card/Card.d.ts.map +1 -1
  15. package/dist/components/card/Card.js +115 -205
  16. package/dist/components/card/card-config.js +24 -21
  17. package/dist/components/card/card-styles.js +19 -22
  18. package/dist/components/carousel/Carousel.js +123 -248
  19. package/dist/components/carousel/carousel-config.js +24 -25
  20. package/dist/components/carousel/carousel-styles.js +14 -16
  21. package/dist/components/chip/Chip.js +84 -191
  22. package/dist/components/chip/chip-config.js +13 -14
  23. package/dist/components/chip/chip-styles.js +22 -26
  24. package/dist/components/date-picker/Calendar.d.ts +3 -3
  25. package/dist/components/date-picker/Calendar.d.ts.map +1 -1
  26. package/dist/components/date-picker/Calendar.js +141 -222
  27. package/dist/components/date-picker/DatePicker.d.ts +5 -5
  28. package/dist/components/date-picker/DatePicker.d.ts.map +1 -1
  29. package/dist/components/date-picker/DatePicker.js +122 -220
  30. package/dist/components/date-picker/TimeSpinner.js +58 -82
  31. package/dist/components/date-picker/date-picker-config.d.ts +4 -4
  32. package/dist/components/date-picker/date-picker-config.d.ts.map +1 -1
  33. package/dist/components/date-picker/date-picker-config.js +10 -11
  34. package/dist/components/date-picker/date-picker-styles.js +44 -45
  35. package/dist/components/date-picker/date-picker.helpers.d.ts +4 -4
  36. package/dist/components/date-picker/date-picker.helpers.d.ts.map +1 -1
  37. package/dist/components/date-picker/date-picker.helpers.js +74 -102
  38. package/dist/components/drawer/Drawer.d.ts +26 -8
  39. package/dist/components/drawer/Drawer.d.ts.map +1 -1
  40. package/dist/components/drawer/Drawer.js +54 -131
  41. package/dist/components/drawer/drawer-config.js +14 -15
  42. package/dist/components/drawer/drawer-styles.js +38 -42
  43. package/dist/components/field/FieldShell.js +49 -56
  44. package/dist/components/field/field-config.js +17 -18
  45. package/dist/components/field/field-styles.js +8 -8
  46. package/dist/components/image/Image.d.ts +7 -7
  47. package/dist/components/image/Image.d.ts.map +1 -1
  48. package/dist/components/image/Image.js +65 -132
  49. package/dist/components/image/image-config.js +17 -18
  50. package/dist/components/image/image-styles.js +14 -15
  51. package/dist/components/input/Input.js +65 -150
  52. package/dist/components/input/PasswordInput.js +30 -49
  53. package/dist/components/input/input-config.js +7 -7
  54. package/dist/components/input/input-styles.js +9 -10
  55. package/dist/components/keyboard/KeyboardContext.js +10 -11
  56. package/dist/components/keyboard/KeyboardProvider.js +100 -181
  57. package/dist/components/keyboard/OnScreenKeyboard.d.ts.map +1 -1
  58. package/dist/components/keyboard/OnScreenKeyboard.js +159 -166
  59. package/dist/components/keyboard/keyboard-config.js +59 -57
  60. package/dist/components/keyboard/keyboard-styles.js +10 -11
  61. package/dist/components/keyboard/use-keyboard-field.js +29 -21
  62. package/dist/components/link/Link.js +47 -137
  63. package/dist/components/link/link-config.js +14 -15
  64. package/dist/components/link/link-styles.js +25 -29
  65. package/dist/components/marquee/Marquee.js +55 -144
  66. package/dist/components/marquee/marquee-config.js +18 -19
  67. package/dist/components/marquee/marquee-styles.js +13 -15
  68. package/dist/components/modal/Modal.d.ts +26 -10
  69. package/dist/components/modal/Modal.d.ts.map +1 -1
  70. package/dist/components/modal/Modal.js +56 -136
  71. package/dist/components/modal/modal-config.js +15 -16
  72. package/dist/components/modal/modal-styles.js +13 -14
  73. package/dist/components/multi-select/MultiSelect.d.ts +18 -2
  74. package/dist/components/multi-select/MultiSelect.d.ts.map +1 -1
  75. package/dist/components/multi-select/MultiSelect.js +149 -283
  76. package/dist/components/multi-select/multi-select-config.d.ts +23 -18
  77. package/dist/components/multi-select/multi-select-config.d.ts.map +1 -1
  78. package/dist/components/multi-select/multi-select-config.js +18 -21
  79. package/dist/components/multi-select/multi-select-styles.js +17 -20
  80. package/dist/components/radio/Radio.js +43 -80
  81. package/dist/components/radio/RadioGroup.js +57 -155
  82. package/dist/components/radio/radio-config.js +15 -16
  83. package/dist/components/radio/radio-context.js +6 -6
  84. package/dist/components/radio/radio-styles.js +55 -60
  85. package/dist/components/resizable-screen/ResizableScreen.js +87 -177
  86. package/dist/components/resizable-screen/resizable-screen-config.js +16 -17
  87. package/dist/components/select/Select.d.ts +3 -2
  88. package/dist/components/select/Select.d.ts.map +1 -1
  89. package/dist/components/select/Select.js +97 -195
  90. package/dist/components/select/select-config.js +8 -9
  91. package/dist/components/select/select-styles.js +5 -5
  92. package/dist/components/select-menu/SelectMenu.d.ts.map +1 -1
  93. package/dist/components/select-menu/SelectMenu.js +102 -196
  94. package/dist/components/select-menu/select-menu-config.js +12 -12
  95. package/dist/components/select-menu/use-select-floating.d.ts +11 -1
  96. package/dist/components/select-menu/use-select-floating.d.ts.map +1 -1
  97. package/dist/components/select-menu/use-select-floating.js +41 -48
  98. package/dist/components/sidebar/Sidebar.d.ts +43 -22
  99. package/dist/components/sidebar/Sidebar.d.ts.map +1 -1
  100. package/dist/components/sidebar/Sidebar.js +146 -331
  101. package/dist/components/sidebar/sidebar-config.d.ts +98 -31
  102. package/dist/components/sidebar/sidebar-config.d.ts.map +1 -1
  103. package/dist/components/sidebar/sidebar-config.js +47 -33
  104. package/dist/components/sidebar/sidebar-styles.js +27 -32
  105. package/dist/components/spinner/spinner-config.js +12 -13
  106. package/dist/components/spinner/spinner-styles.js +13 -14
  107. package/dist/components/spinner/spinner.js +39 -82
  108. package/dist/components/switch/Switch.js +62 -154
  109. package/dist/components/switch/switch-config.js +11 -12
  110. package/dist/components/switch/switch-styles.js +14 -16
  111. package/dist/components/table/Table.js +64 -186
  112. package/dist/components/table/table-config.js +17 -18
  113. package/dist/components/table/table-styles.js +48 -52
  114. package/dist/components/tabs/Tabs.d.ts +16 -8
  115. package/dist/components/tabs/Tabs.d.ts.map +1 -1
  116. package/dist/components/tabs/Tabs.js +93 -208
  117. package/dist/components/tabs/tabs-config.d.ts +42 -20
  118. package/dist/components/tabs/tabs-config.d.ts.map +1 -1
  119. package/dist/components/tabs/tabs-config.js +26 -18
  120. package/dist/components/tabs/tabs-styles.js +15 -17
  121. package/dist/components/textarea/Textarea.js +52 -138
  122. package/dist/components/textarea/textarea-config.js +10 -11
  123. package/dist/components/textarea/textarea-styles.js +9 -10
  124. package/dist/components/toast/ToastContext.js +22 -26
  125. package/dist/components/toast/ToastItem.js +82 -144
  126. package/dist/components/toast/ToastProvider.d.ts.map +1 -1
  127. package/dist/components/toast/ToastProvider.js +128 -190
  128. package/dist/components/toast/toast-config.js +23 -24
  129. package/dist/components/toast/toast-styles.js +50 -55
  130. package/dist/components/toast/use-pausable-timeout.js +17 -13
  131. package/dist/components/tooltip/Tooltip.d.ts +5 -0
  132. package/dist/components/tooltip/Tooltip.d.ts.map +1 -1
  133. package/dist/components/tooltip/Tooltip.js +68 -158
  134. package/dist/components/tooltip/tooltip-config.d.ts +25 -0
  135. package/dist/components/tooltip/tooltip-config.d.ts.map +1 -1
  136. package/dist/components/tooltip/tooltip-config.js +26 -22
  137. package/dist/components/tooltip/tooltip-styles.js +15 -17
  138. package/dist/config/default-config.js +11 -34
  139. package/dist/config/resolve-color.js +23 -23
  140. package/dist/config/resolve-config.d.ts.map +1 -1
  141. package/dist/config/resolve-config.js +14 -12
  142. package/dist/icons/ArrowLeftIcon.js +16 -19
  143. package/dist/icons/CalendarIcon.js +43 -24
  144. package/dist/icons/CheckIcon.js +16 -19
  145. package/dist/icons/ChevronDownIcon.js +15 -21
  146. package/dist/icons/ChevronLeftIcon.js +16 -19
  147. package/dist/icons/ChevronRightIcon.js +16 -19
  148. package/dist/icons/ChevronUpIcon.js +16 -19
  149. package/dist/icons/ClearIcon.js +26 -22
  150. package/dist/icons/ClockIcon.js +20 -22
  151. package/dist/icons/CloseIcon.js +26 -22
  152. package/dist/icons/ErrorIcon.js +16 -19
  153. package/dist/icons/ExternalLinkIcon.js +25 -23
  154. package/dist/icons/EyeIcon.js +20 -22
  155. package/dist/icons/EyeOffIcon.js +21 -22
  156. package/dist/icons/InfoIcon.js +16 -19
  157. package/dist/icons/SearchIcon.js +25 -22
  158. package/dist/icons/WarningIcon.js +16 -19
  159. package/dist/index.js +65 -163
  160. package/dist/libs/context.js +10 -13
  161. package/dist/libs/index.js +1 -0
  162. package/dist/libs/registry.js +10 -12
  163. package/dist/libs/use-floating-z-index.d.ts +32 -0
  164. package/dist/libs/use-floating-z-index.d.ts.map +1 -0
  165. package/dist/libs/use-floating-z-index.js +16 -0
  166. package/dist/libs/use-isomorphic-layout-effect.js +5 -5
  167. package/dist/scripts/AsheeThemeScript.js +35 -44
  168. package/dist/shared/radius.d.ts.map +1 -1
  169. package/dist/shared/radius.js +12 -13
  170. package/dist/shared/variant.js +46 -134
  171. package/dist/theme/color.js +28 -28
  172. package/dist/theme/controller.d.ts.map +1 -1
  173. package/dist/theme/controller.js +65 -178
  174. package/dist/theme/useTheme.js +13 -44
  175. package/dist/utils/cn.js +7 -7
  176. package/dist/utils/index.d.ts +1 -0
  177. package/dist/utils/index.d.ts.map +1 -1
  178. package/dist/utils/index.js +1 -0
  179. package/dist/utils/merge-object.js +13 -14
  180. package/dist/utils/resolve-token.js +11 -14
  181. package/dist/utils/stacking.d.ts +76 -0
  182. package/dist/utils/stacking.d.ts.map +1 -0
  183. package/dist/utils/stacking.js +34 -0
  184. package/package.json +12 -11
@@ -1,206 +1,116 @@
1
1
  "use client";
2
- import { jsxs as C, jsx as d } from "react/jsx-runtime";
3
- import { forwardRef as ot, useId as nt } from "react";
4
- import { useAsheeConfig as et } from "../../libs/context.js";
5
- import { resolveCascade as v, resolveRadiusKey as st, resolveAnimate as lt, resolveClassKey as y } from "../../utils/resolve-token.js";
6
- import { Image as dt } from "../image/Image.js";
7
- import { FALLBACK_CARD_CONFIG as e } from "./card-config.js";
8
- import { CARD_PADDING_CLASS as at, CARD_GAP_CLASS as ct, CARD_HEADER_GAP_CLASS as it, CARD_VARIANT_CLASS as k } from "./card-styles.js";
9
- import { RADIUS_CLASS as ut } from "../../shared/radius.js";
10
- import { cn as p } from "../../utils/cn.js";
11
- const ft = ot(
12
- ({
13
- variant: G,
14
- size: j,
15
- radius: K,
16
- animate: B,
17
- isClickable: D,
18
- isDisabled: s = !1,
19
- href: i,
20
- title: h,
21
- description: x,
22
- header: I,
23
- body: E,
24
- footer: N,
25
- image: t,
26
- imageProps: o,
27
- className: V,
28
- children: F,
29
- onClick: u,
30
- id: $,
31
- style: H,
32
- onKeyDown: A,
33
- ...O
34
- }, T) => {
35
- var L;
36
- const z = et(), r = (L = z.components) == null ? void 0 : L.card, U = nt(), q = $ ?? U, m = v(
37
- j,
38
- r == null ? void 0 : r.size,
39
- void 0,
40
- e.size
41
- ), J = v(
42
- G,
43
- r == null ? void 0 : r.variant,
44
- z.defaultVariant,
45
- e.variant
46
- ), M = st(
47
- K,
48
- r == null ? void 0 : r.radius,
49
- z.defaultRadius,
50
- e.radius
51
- ), b = v(
52
- t == null ? void 0 : t.position,
53
- r == null ? void 0 : r.image.position,
54
- void 0,
55
- e.image.position
56
- ), c = D ?? !!(i || u), Q = lt(
57
- B,
58
- r == null ? void 0 : r.animate,
59
- e.animate
60
- ), W = y(
61
- m,
62
- at,
63
- e.size
64
- ), S = y(
65
- m,
66
- ct,
67
- e.size
68
- ), X = y(
69
- m,
70
- it,
71
- e.size
72
- ), Y = y(
73
- M,
74
- ut,
75
- e.radius
76
- ), Z = v(
77
- t == null ? void 0 : t.loading,
78
- r == null ? void 0 : r.image.loading,
79
- void 0,
80
- e.image.loading
81
- ), P = k[J] ?? k.bordered, w = (n) => {
82
- if (s) {
83
- n.preventDefault();
84
- return;
85
- }
86
- u == null || u(n), i && !n.defaultPrevented && (window.location.href = i);
87
- }, g = (n) => {
88
- A == null || A(n), c && !s && (n.key === "Enter" || n.key === " ") && (n.preventDefault(), w(n));
89
- }, R = (n) => {
90
- if (!(t != null && t.src) || b !== n) return null;
91
- const a = {
92
- top: "w-full shrink-0 rounded-b-none",
93
- bottom: "w-full shrink-0 order-last rounded-t-none",
94
- background: ""
95
- }[n];
96
- let l = { ...o ?? {} };
97
- if (t != null && t.component) {
98
- const f = (o == null ? void 0 : o.loading) === "lazy", rt = (o == null ? void 0 : o.priority) === !0;
99
- (f || rt) && console.warn(
100
- `[Card] ${f ? '`loading="lazy"`' : "`priority={true}`"} with custom image component may cause rendering issues. Consider using \`loading="eager"\` and removing \`priority\` for card images.`
101
- ), l = {
102
- ...l,
103
- loading: "eager",
104
- // Remove priority if present to avoid conflicts
105
- ...l.priority !== void 0 && { priority: !1 }
106
- };
107
- }
108
- return /* @__PURE__ */ d(
109
- dt,
110
- {
111
- src: t.src,
112
- alt: t.alt,
113
- ratio: (t == null ? void 0 : t.ratio) ?? "video",
114
- fit: t.fit ?? "cover",
115
- className: a,
116
- imageComponent: t.component,
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 i } from "../../libs/registry.js";
3
- const e = {
4
- size: "md",
5
- image: { position: "top", ratio: "video", fit: "cover" },
6
- animate: !0
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
- i("card", e);
9
- const t = {
10
- size: "md",
11
- variant: "bordered",
12
- radius: "md",
13
- image: {
14
- position: "top",
15
- ratio: "video",
16
- fit: "cover",
17
- loading: "lazy"
18
- },
19
- animate: !0
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
- const o = {
3
- sm: "p-4",
4
- md: "p-6",
5
- lg: "p-8"
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
- sm: "gap-3",
8
- md: "gap-4",
9
- lg: "gap-5"
10
- }, e = {
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 };