@fire-spark/react-ui 0.0.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.
- package/dist/cart.d.ts +286 -0
- package/dist/cart.js +293 -0
- package/dist/category-nav.d.ts +37 -0
- package/dist/category-nav.js +39 -0
- package/dist/category.d.ts +95 -0
- package/dist/category.js +97 -0
- package/dist/checkout.d.ts +316 -0
- package/dist/checkout.js +333 -0
- package/dist/cn-Ccejyh36.js +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +8 -0
- package/dist/menu.d.ts +47 -0
- package/dist/menu.js +49 -0
- package/dist/product-card.d.ts +100 -0
- package/dist/product-card.js +108 -0
- package/dist/product-detail.d.ts +241 -0
- package/dist/product-detail.js +291 -0
- package/dist/use-active-category.d.ts +15 -0
- package/dist/use-active-category.js +89 -0
- package/package.json +121 -0
package/dist/cart.d.ts
ADDED
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, HTMLAttributes, ImgHTMLAttributes } from "react";
|
|
2
|
+
//#region src/cart.d.ts
|
|
3
|
+
declare function Cart({ ref, className, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
4
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
5
|
+
}): import("react").JSX.Element;
|
|
6
|
+
declare namespace Cart {
|
|
7
|
+
var displayName: string;
|
|
8
|
+
}
|
|
9
|
+
declare function CartHeader({ ref, className, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
10
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
|
+
declare namespace CartHeader {
|
|
13
|
+
var displayName: string;
|
|
14
|
+
}
|
|
15
|
+
declare function CartTitle({ ref, className, ...props }: HTMLAttributes<HTMLHeadingElement> & {
|
|
16
|
+
ref?: React.RefObject<HTMLHeadingElement | null>;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
18
|
+
declare namespace CartTitle {
|
|
19
|
+
var displayName: string;
|
|
20
|
+
}
|
|
21
|
+
declare function CartDescription({ ref, className, ...props }: HTMLAttributes<HTMLParagraphElement> & {
|
|
22
|
+
ref?: React.RefObject<HTMLParagraphElement | null>;
|
|
23
|
+
}): import("react").JSX.Element;
|
|
24
|
+
declare namespace CartDescription {
|
|
25
|
+
var displayName: string;
|
|
26
|
+
}
|
|
27
|
+
declare function CartStore({ ref, className, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
28
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
29
|
+
}): import("react").JSX.Element;
|
|
30
|
+
declare namespace CartStore {
|
|
31
|
+
var displayName: string;
|
|
32
|
+
}
|
|
33
|
+
declare function CartStoreMedia({ ref, className, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
34
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
35
|
+
}): import("react").JSX.Element;
|
|
36
|
+
declare namespace CartStoreMedia {
|
|
37
|
+
var displayName: string;
|
|
38
|
+
}
|
|
39
|
+
declare function CartStoreImage({ ref, className, alt, ...props }: ImgHTMLAttributes<HTMLImageElement> & {
|
|
40
|
+
ref?: React.RefObject<HTMLImageElement | null>;
|
|
41
|
+
}): import("react").JSX.Element;
|
|
42
|
+
declare namespace CartStoreImage {
|
|
43
|
+
var displayName: string;
|
|
44
|
+
}
|
|
45
|
+
declare function CartStoreContent({ ref, className, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
46
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
47
|
+
}): import("react").JSX.Element;
|
|
48
|
+
declare namespace CartStoreContent {
|
|
49
|
+
var displayName: string;
|
|
50
|
+
}
|
|
51
|
+
declare function CartStoreTitle({ ref, className, ...props }: HTMLAttributes<HTMLParagraphElement> & {
|
|
52
|
+
ref?: React.RefObject<HTMLParagraphElement | null>;
|
|
53
|
+
}): import("react").JSX.Element;
|
|
54
|
+
declare namespace CartStoreTitle {
|
|
55
|
+
var displayName: string;
|
|
56
|
+
}
|
|
57
|
+
declare function CartStoreDescription({ ref, className, ...props }: HTMLAttributes<HTMLParagraphElement> & {
|
|
58
|
+
ref?: React.RefObject<HTMLParagraphElement | null>;
|
|
59
|
+
}): import("react").JSX.Element;
|
|
60
|
+
declare namespace CartStoreDescription {
|
|
61
|
+
var displayName: string;
|
|
62
|
+
}
|
|
63
|
+
declare function CartBody({ ref, className, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
64
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
65
|
+
}): import("react").JSX.Element;
|
|
66
|
+
declare namespace CartBody {
|
|
67
|
+
var displayName: string;
|
|
68
|
+
}
|
|
69
|
+
declare function CartList({ ref, className, ...props }: HTMLAttributes<HTMLUListElement> & {
|
|
70
|
+
ref?: React.RefObject<HTMLUListElement | null>;
|
|
71
|
+
}): import("react").JSX.Element;
|
|
72
|
+
declare namespace CartList {
|
|
73
|
+
var displayName: string;
|
|
74
|
+
}
|
|
75
|
+
declare function CartItem({ ref, className, ...props }: HTMLAttributes<HTMLLIElement> & {
|
|
76
|
+
ref?: React.RefObject<HTMLLIElement | null>;
|
|
77
|
+
}): import("react").JSX.Element;
|
|
78
|
+
declare namespace CartItem {
|
|
79
|
+
var displayName: string;
|
|
80
|
+
}
|
|
81
|
+
declare function CartItemMedia({ ref, className, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
82
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
83
|
+
}): import("react").JSX.Element;
|
|
84
|
+
declare namespace CartItemMedia {
|
|
85
|
+
var displayName: string;
|
|
86
|
+
}
|
|
87
|
+
declare function CartItemImageSlot({ ref, className, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
88
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
89
|
+
}): import("react").JSX.Element;
|
|
90
|
+
declare namespace CartItemImageSlot {
|
|
91
|
+
var displayName: string;
|
|
92
|
+
}
|
|
93
|
+
declare function CartItemImage({ ref, className, alt, ...props }: ImgHTMLAttributes<HTMLImageElement> & {
|
|
94
|
+
ref?: React.RefObject<HTMLImageElement | null>;
|
|
95
|
+
}): import("react").JSX.Element;
|
|
96
|
+
declare namespace CartItemImage {
|
|
97
|
+
var displayName: string;
|
|
98
|
+
}
|
|
99
|
+
declare function CartItemContent({ ref, className, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
100
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
101
|
+
}): import("react").JSX.Element;
|
|
102
|
+
declare namespace CartItemContent {
|
|
103
|
+
var displayName: string;
|
|
104
|
+
}
|
|
105
|
+
declare function CartItemHeader({ ref, className, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
106
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
107
|
+
}): import("react").JSX.Element;
|
|
108
|
+
declare namespace CartItemHeader {
|
|
109
|
+
var displayName: string;
|
|
110
|
+
}
|
|
111
|
+
declare function CartItemTitle({ ref, className, ...props }: HTMLAttributes<HTMLHeadingElement> & {
|
|
112
|
+
ref?: React.RefObject<HTMLHeadingElement | null>;
|
|
113
|
+
}): import("react").JSX.Element;
|
|
114
|
+
declare namespace CartItemTitle {
|
|
115
|
+
var displayName: string;
|
|
116
|
+
}
|
|
117
|
+
declare function CartItemDescription({ ref, className, ...props }: HTMLAttributes<HTMLParagraphElement> & {
|
|
118
|
+
ref?: React.RefObject<HTMLParagraphElement | null>;
|
|
119
|
+
}): import("react").JSX.Element;
|
|
120
|
+
declare namespace CartItemDescription {
|
|
121
|
+
var displayName: string;
|
|
122
|
+
}
|
|
123
|
+
declare function CartItemMeta({ ref, className, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
124
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
125
|
+
}): import("react").JSX.Element;
|
|
126
|
+
declare namespace CartItemMeta {
|
|
127
|
+
var displayName: string;
|
|
128
|
+
}
|
|
129
|
+
declare function CartItemPrice({ ref, className, ...props }: HTMLAttributes<HTMLSpanElement> & {
|
|
130
|
+
ref?: React.RefObject<HTMLSpanElement | null>;
|
|
131
|
+
}): import("react").JSX.Element;
|
|
132
|
+
declare namespace CartItemPrice {
|
|
133
|
+
var displayName: string;
|
|
134
|
+
}
|
|
135
|
+
declare function CartItemAnchorPrice({ ref, className, ...props }: HTMLAttributes<HTMLSpanElement> & {
|
|
136
|
+
ref?: React.RefObject<HTMLSpanElement | null>;
|
|
137
|
+
}): import("react").JSX.Element;
|
|
138
|
+
declare namespace CartItemAnchorPrice {
|
|
139
|
+
var displayName: string;
|
|
140
|
+
}
|
|
141
|
+
declare function CartItemActions({ ref, className, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
142
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
143
|
+
}): import("react").JSX.Element;
|
|
144
|
+
declare namespace CartItemActions {
|
|
145
|
+
var displayName: string;
|
|
146
|
+
}
|
|
147
|
+
declare function CartItemAction({ ref, className, type, ...props }: ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
148
|
+
ref?: React.RefObject<HTMLButtonElement | null>;
|
|
149
|
+
}): import("react").JSX.Element;
|
|
150
|
+
declare namespace CartItemAction {
|
|
151
|
+
var displayName: string;
|
|
152
|
+
}
|
|
153
|
+
declare function CartItemAside({ ref, className, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
154
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
155
|
+
}): import("react").JSX.Element;
|
|
156
|
+
declare namespace CartItemAside {
|
|
157
|
+
var displayName: string;
|
|
158
|
+
}
|
|
159
|
+
declare function CartQuantity({ ref, className, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
160
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
161
|
+
}): import("react").JSX.Element;
|
|
162
|
+
declare namespace CartQuantity {
|
|
163
|
+
var displayName: string;
|
|
164
|
+
}
|
|
165
|
+
declare function CartQuantityButton({ ref, className, type, ...props }: ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
166
|
+
ref?: React.RefObject<HTMLButtonElement | null>;
|
|
167
|
+
}): import("react").JSX.Element;
|
|
168
|
+
declare namespace CartQuantityButton {
|
|
169
|
+
var displayName: string;
|
|
170
|
+
}
|
|
171
|
+
declare function CartQuantityValue({ ref, className, ...props }: HTMLAttributes<HTMLSpanElement> & {
|
|
172
|
+
ref?: React.RefObject<HTMLSpanElement | null>;
|
|
173
|
+
}): import("react").JSX.Element;
|
|
174
|
+
declare namespace CartQuantityValue {
|
|
175
|
+
var displayName: string;
|
|
176
|
+
}
|
|
177
|
+
declare function CartSection({ ref, className, ...props }: HTMLAttributes<HTMLElement> & {
|
|
178
|
+
ref?: React.RefObject<HTMLElement | null>;
|
|
179
|
+
}): import("react").JSX.Element;
|
|
180
|
+
declare namespace CartSection {
|
|
181
|
+
var displayName: string;
|
|
182
|
+
}
|
|
183
|
+
declare function CartSectionHeader({ ref, className, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
184
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
185
|
+
}): import("react").JSX.Element;
|
|
186
|
+
declare namespace CartSectionHeader {
|
|
187
|
+
var displayName: string;
|
|
188
|
+
}
|
|
189
|
+
declare function CartSectionTitle({ ref, className, ...props }: HTMLAttributes<HTMLHeadingElement> & {
|
|
190
|
+
ref?: React.RefObject<HTMLHeadingElement | null>;
|
|
191
|
+
}): import("react").JSX.Element;
|
|
192
|
+
declare namespace CartSectionTitle {
|
|
193
|
+
var displayName: string;
|
|
194
|
+
}
|
|
195
|
+
declare function CartOption({ ref, className, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
196
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
197
|
+
}): import("react").JSX.Element;
|
|
198
|
+
declare namespace CartOption {
|
|
199
|
+
var displayName: string;
|
|
200
|
+
}
|
|
201
|
+
declare function CartOptionLabel({ ref, className, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
202
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
203
|
+
}): import("react").JSX.Element;
|
|
204
|
+
declare namespace CartOptionLabel {
|
|
205
|
+
var displayName: string;
|
|
206
|
+
}
|
|
207
|
+
declare function CartOptionControl({ ref, className, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
208
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
209
|
+
}): import("react").JSX.Element;
|
|
210
|
+
declare namespace CartOptionControl {
|
|
211
|
+
var displayName: string;
|
|
212
|
+
}
|
|
213
|
+
declare function CartBanner({ ref, className, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
214
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
215
|
+
}): import("react").JSX.Element;
|
|
216
|
+
declare namespace CartBanner {
|
|
217
|
+
var displayName: string;
|
|
218
|
+
}
|
|
219
|
+
declare function CartScroller({ ref, className, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
220
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
221
|
+
}): import("react").JSX.Element;
|
|
222
|
+
declare namespace CartScroller {
|
|
223
|
+
var displayName: string;
|
|
224
|
+
}
|
|
225
|
+
declare function CartSummary({ ref, className, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
226
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
227
|
+
}): import("react").JSX.Element;
|
|
228
|
+
declare namespace CartSummary {
|
|
229
|
+
var displayName: string;
|
|
230
|
+
}
|
|
231
|
+
declare function CartSummaryRow({ ref, className, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
232
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
233
|
+
}): import("react").JSX.Element;
|
|
234
|
+
declare namespace CartSummaryRow {
|
|
235
|
+
var displayName: string;
|
|
236
|
+
}
|
|
237
|
+
declare function CartSummaryLabel({ ref, className, ...props }: HTMLAttributes<HTMLSpanElement> & {
|
|
238
|
+
ref?: React.RefObject<HTMLSpanElement | null>;
|
|
239
|
+
}): import("react").JSX.Element;
|
|
240
|
+
declare namespace CartSummaryLabel {
|
|
241
|
+
var displayName: string;
|
|
242
|
+
}
|
|
243
|
+
declare function CartSummaryValue({ ref, className, ...props }: HTMLAttributes<HTMLSpanElement> & {
|
|
244
|
+
ref?: React.RefObject<HTMLSpanElement | null>;
|
|
245
|
+
}): import("react").JSX.Element;
|
|
246
|
+
declare namespace CartSummaryValue {
|
|
247
|
+
var displayName: string;
|
|
248
|
+
}
|
|
249
|
+
declare function CartFooter({ ref, className, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
250
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
251
|
+
}): import("react").JSX.Element;
|
|
252
|
+
declare namespace CartFooter {
|
|
253
|
+
var displayName: string;
|
|
254
|
+
}
|
|
255
|
+
declare function CartSubmit({ ref, className, type, ...props }: ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
256
|
+
ref?: React.RefObject<HTMLButtonElement | null>;
|
|
257
|
+
}): import("react").JSX.Element;
|
|
258
|
+
declare namespace CartSubmit {
|
|
259
|
+
var displayName: string;
|
|
260
|
+
}
|
|
261
|
+
declare function CartAction({ ref, className, type, ...props }: ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
262
|
+
ref?: React.RefObject<HTMLButtonElement | null>;
|
|
263
|
+
}): import("react").JSX.Element;
|
|
264
|
+
declare namespace CartAction {
|
|
265
|
+
var displayName: string;
|
|
266
|
+
}
|
|
267
|
+
declare function CartEmpty({ ref, className, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
268
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
269
|
+
}): import("react").JSX.Element;
|
|
270
|
+
declare namespace CartEmpty {
|
|
271
|
+
var displayName: string;
|
|
272
|
+
}
|
|
273
|
+
declare function CartEmptyTitle({ ref, className, ...props }: HTMLAttributes<HTMLHeadingElement> & {
|
|
274
|
+
ref?: React.RefObject<HTMLHeadingElement | null>;
|
|
275
|
+
}): import("react").JSX.Element;
|
|
276
|
+
declare namespace CartEmptyTitle {
|
|
277
|
+
var displayName: string;
|
|
278
|
+
}
|
|
279
|
+
declare function CartEmptyDescription({ ref, className, ...props }: HTMLAttributes<HTMLParagraphElement> & {
|
|
280
|
+
ref?: React.RefObject<HTMLParagraphElement | null>;
|
|
281
|
+
}): import("react").JSX.Element;
|
|
282
|
+
declare namespace CartEmptyDescription {
|
|
283
|
+
var displayName: string;
|
|
284
|
+
}
|
|
285
|
+
//#endregion
|
|
286
|
+
export { Cart, CartAction, CartBanner, CartBody, CartDescription, CartEmpty, CartEmptyDescription, CartEmptyTitle, CartFooter, CartHeader, CartItem, CartItemAction, CartItemActions, CartItemAnchorPrice, CartItemAside, CartItemContent, CartItemDescription, CartItemHeader, CartItemImage, CartItemImageSlot, CartItemMedia, CartItemMeta, CartItemPrice, CartItemTitle, CartList, CartOption, CartOptionControl, CartOptionLabel, CartQuantity, CartQuantityButton, CartQuantityValue, CartScroller, CartSection, CartSectionHeader, CartSectionTitle, CartStore, CartStoreContent, CartStoreDescription, CartStoreImage, CartStoreMedia, CartStoreTitle, CartSubmit, CartSummary, CartSummaryLabel, CartSummaryRow, CartSummaryValue, CartTitle };
|
package/dist/cart.js
ADDED
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
import { t as cn } from "./cn-Ccejyh36.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/cart.tsx
|
|
4
|
+
const Cart = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
5
|
+
ref,
|
|
6
|
+
className: cn("@container/cart bg-background text-foreground flex h-full min-h-0 flex-col", className),
|
|
7
|
+
...props
|
|
8
|
+
});
|
|
9
|
+
Cart.displayName = "Cart";
|
|
10
|
+
const CartHeader = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
11
|
+
ref,
|
|
12
|
+
className: cn("flex shrink-0 flex-col gap-3 px-4 pt-4 pb-2", className),
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
CartHeader.displayName = "CartHeader";
|
|
16
|
+
const CartTitle = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("h2", {
|
|
17
|
+
ref,
|
|
18
|
+
className: cn("text-lg font-bold tracking-tight", className),
|
|
19
|
+
...props
|
|
20
|
+
});
|
|
21
|
+
CartTitle.displayName = "CartTitle";
|
|
22
|
+
const CartDescription = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("p", {
|
|
23
|
+
ref,
|
|
24
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
25
|
+
...props
|
|
26
|
+
});
|
|
27
|
+
CartDescription.displayName = "CartDescription";
|
|
28
|
+
const CartStore = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
29
|
+
ref,
|
|
30
|
+
className: cn("flex items-center gap-3", className),
|
|
31
|
+
...props
|
|
32
|
+
});
|
|
33
|
+
CartStore.displayName = "CartStore";
|
|
34
|
+
const CartStoreMedia = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
35
|
+
ref,
|
|
36
|
+
className: cn("bg-muted relative size-12 shrink-0 overflow-hidden rounded-full", className),
|
|
37
|
+
...props
|
|
38
|
+
});
|
|
39
|
+
CartStoreMedia.displayName = "CartStoreMedia";
|
|
40
|
+
const CartStoreImage = ({ ref, className, alt = "", ...props }) => /* @__PURE__ */ jsx("img", {
|
|
41
|
+
ref,
|
|
42
|
+
alt,
|
|
43
|
+
className: cn("size-full object-cover", className),
|
|
44
|
+
...props
|
|
45
|
+
});
|
|
46
|
+
CartStoreImage.displayName = "CartStoreImage";
|
|
47
|
+
const CartStoreContent = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
48
|
+
ref,
|
|
49
|
+
className: cn("min-w-0 flex-1", className),
|
|
50
|
+
...props
|
|
51
|
+
});
|
|
52
|
+
CartStoreContent.displayName = "CartStoreContent";
|
|
53
|
+
const CartStoreTitle = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("p", {
|
|
54
|
+
ref,
|
|
55
|
+
className: cn("truncate text-base font-semibold", className),
|
|
56
|
+
...props
|
|
57
|
+
});
|
|
58
|
+
CartStoreTitle.displayName = "CartStoreTitle";
|
|
59
|
+
const CartStoreDescription = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("p", {
|
|
60
|
+
ref,
|
|
61
|
+
className: cn("text-muted-foreground truncate text-sm", className),
|
|
62
|
+
...props
|
|
63
|
+
});
|
|
64
|
+
CartStoreDescription.displayName = "CartStoreDescription";
|
|
65
|
+
const CartBody = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
66
|
+
ref,
|
|
67
|
+
className: cn("min-h-0 flex-1 overflow-y-auto", className),
|
|
68
|
+
...props
|
|
69
|
+
});
|
|
70
|
+
CartBody.displayName = "CartBody";
|
|
71
|
+
const CartList = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("ul", {
|
|
72
|
+
ref,
|
|
73
|
+
className: cn("flex flex-col gap-4 px-4 py-2", className),
|
|
74
|
+
...props
|
|
75
|
+
});
|
|
76
|
+
CartList.displayName = "CartList";
|
|
77
|
+
const CartItem = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("li", {
|
|
78
|
+
ref,
|
|
79
|
+
className: cn("flex items-start gap-3", className),
|
|
80
|
+
...props
|
|
81
|
+
});
|
|
82
|
+
CartItem.displayName = "CartItem";
|
|
83
|
+
const CartItemMedia = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
84
|
+
ref,
|
|
85
|
+
className: cn("bg-muted relative size-16 shrink-0 overflow-hidden rounded-lg", className),
|
|
86
|
+
...props
|
|
87
|
+
});
|
|
88
|
+
CartItemMedia.displayName = "CartItemMedia";
|
|
89
|
+
const CartItemImageSlot = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
90
|
+
ref,
|
|
91
|
+
className: cn("absolute inset-0", className),
|
|
92
|
+
...props
|
|
93
|
+
});
|
|
94
|
+
CartItemImageSlot.displayName = "CartItemImageSlot";
|
|
95
|
+
const CartItemImage = ({ ref, className, alt = "", ...props }) => /* @__PURE__ */ jsx(CartItemImageSlot, { children: /* @__PURE__ */ jsx("img", {
|
|
96
|
+
ref,
|
|
97
|
+
alt,
|
|
98
|
+
className: cn("size-full object-cover", className),
|
|
99
|
+
...props
|
|
100
|
+
}) });
|
|
101
|
+
CartItemImage.displayName = "CartItemImage";
|
|
102
|
+
const CartItemContent = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
103
|
+
ref,
|
|
104
|
+
className: cn("flex min-w-0 flex-1 flex-col gap-1", className),
|
|
105
|
+
...props
|
|
106
|
+
});
|
|
107
|
+
CartItemContent.displayName = "CartItemContent";
|
|
108
|
+
const CartItemHeader = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
109
|
+
ref,
|
|
110
|
+
className: cn("flex items-start justify-between gap-2", className),
|
|
111
|
+
...props
|
|
112
|
+
});
|
|
113
|
+
CartItemHeader.displayName = "CartItemHeader";
|
|
114
|
+
const CartItemTitle = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("h3", {
|
|
115
|
+
ref,
|
|
116
|
+
className: cn("min-w-0 text-sm leading-snug font-semibold", className),
|
|
117
|
+
...props
|
|
118
|
+
});
|
|
119
|
+
CartItemTitle.displayName = "CartItemTitle";
|
|
120
|
+
const CartItemDescription = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("p", {
|
|
121
|
+
ref,
|
|
122
|
+
className: cn("text-muted-foreground text-xs leading-snug whitespace-pre-line", className),
|
|
123
|
+
...props
|
|
124
|
+
});
|
|
125
|
+
CartItemDescription.displayName = "CartItemDescription";
|
|
126
|
+
const CartItemMeta = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
127
|
+
ref,
|
|
128
|
+
className: cn("flex flex-wrap items-center gap-2", className),
|
|
129
|
+
...props
|
|
130
|
+
});
|
|
131
|
+
CartItemMeta.displayName = "CartItemMeta";
|
|
132
|
+
const CartItemPrice = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("span", {
|
|
133
|
+
ref,
|
|
134
|
+
className: cn("text-sm font-semibold tabular-nums", className),
|
|
135
|
+
...props
|
|
136
|
+
});
|
|
137
|
+
CartItemPrice.displayName = "CartItemPrice";
|
|
138
|
+
const CartItemAnchorPrice = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("span", {
|
|
139
|
+
ref,
|
|
140
|
+
className: cn("text-muted-foreground text-sm tabular-nums line-through", className),
|
|
141
|
+
...props
|
|
142
|
+
});
|
|
143
|
+
CartItemAnchorPrice.displayName = "CartItemAnchorPrice";
|
|
144
|
+
const CartItemActions = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
145
|
+
ref,
|
|
146
|
+
className: cn("flex flex-wrap items-center gap-3 pt-0.5", className),
|
|
147
|
+
...props
|
|
148
|
+
});
|
|
149
|
+
CartItemActions.displayName = "CartItemActions";
|
|
150
|
+
const CartItemAction = ({ ref, className, type = "button", ...props }) => /* @__PURE__ */ jsx("button", {
|
|
151
|
+
ref,
|
|
152
|
+
type,
|
|
153
|
+
className: cn("text-muted-foreground hover:text-foreground text-xs font-medium underline-offset-2 hover:underline", className),
|
|
154
|
+
...props
|
|
155
|
+
});
|
|
156
|
+
CartItemAction.displayName = "CartItemAction";
|
|
157
|
+
const CartItemAside = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
158
|
+
ref,
|
|
159
|
+
className: cn("flex shrink-0 flex-col items-end gap-2", className),
|
|
160
|
+
...props
|
|
161
|
+
});
|
|
162
|
+
CartItemAside.displayName = "CartItemAside";
|
|
163
|
+
const CartQuantity = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
164
|
+
ref,
|
|
165
|
+
className: cn("bg-muted inline-flex items-center gap-1 rounded-full px-1 py-0.5", className),
|
|
166
|
+
...props
|
|
167
|
+
});
|
|
168
|
+
CartQuantity.displayName = "CartQuantity";
|
|
169
|
+
const CartQuantityButton = ({ ref, className, type = "button", ...props }) => /* @__PURE__ */ jsx("button", {
|
|
170
|
+
ref,
|
|
171
|
+
type,
|
|
172
|
+
className: cn("hover:bg-background flex size-7 items-center justify-center rounded-full text-sm font-medium transition-colors disabled:pointer-events-none disabled:opacity-50", className),
|
|
173
|
+
...props
|
|
174
|
+
});
|
|
175
|
+
CartQuantityButton.displayName = "CartQuantityButton";
|
|
176
|
+
const CartQuantityValue = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("span", {
|
|
177
|
+
ref,
|
|
178
|
+
className: cn("min-w-5 text-center text-sm font-semibold tabular-nums", className),
|
|
179
|
+
...props
|
|
180
|
+
});
|
|
181
|
+
CartQuantityValue.displayName = "CartQuantityValue";
|
|
182
|
+
const CartSection = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("section", {
|
|
183
|
+
ref,
|
|
184
|
+
className: cn("flex flex-col gap-3 px-4 py-4", className),
|
|
185
|
+
...props
|
|
186
|
+
});
|
|
187
|
+
CartSection.displayName = "CartSection";
|
|
188
|
+
const CartSectionHeader = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
189
|
+
ref,
|
|
190
|
+
className: cn("flex items-center justify-between gap-2", className),
|
|
191
|
+
...props
|
|
192
|
+
});
|
|
193
|
+
CartSectionHeader.displayName = "CartSectionHeader";
|
|
194
|
+
const CartSectionTitle = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("h3", {
|
|
195
|
+
ref,
|
|
196
|
+
className: cn("text-sm font-semibold tracking-tight", className),
|
|
197
|
+
...props
|
|
198
|
+
});
|
|
199
|
+
CartSectionTitle.displayName = "CartSectionTitle";
|
|
200
|
+
const CartOption = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
201
|
+
ref,
|
|
202
|
+
className: cn("flex items-center justify-between gap-3 border-y py-3", className),
|
|
203
|
+
...props
|
|
204
|
+
});
|
|
205
|
+
CartOption.displayName = "CartOption";
|
|
206
|
+
const CartOptionLabel = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
207
|
+
ref,
|
|
208
|
+
className: cn("flex min-w-0 items-center gap-2 text-sm", className),
|
|
209
|
+
...props
|
|
210
|
+
});
|
|
211
|
+
CartOptionLabel.displayName = "CartOptionLabel";
|
|
212
|
+
const CartOptionControl = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
213
|
+
ref,
|
|
214
|
+
className: cn("flex shrink-0 items-center", className),
|
|
215
|
+
...props
|
|
216
|
+
});
|
|
217
|
+
CartOptionControl.displayName = "CartOptionControl";
|
|
218
|
+
const CartBanner = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
219
|
+
ref,
|
|
220
|
+
className: cn("flex items-center gap-2 rounded-lg px-3 py-2.5 text-sm font-medium", className),
|
|
221
|
+
...props
|
|
222
|
+
});
|
|
223
|
+
CartBanner.displayName = "CartBanner";
|
|
224
|
+
const CartScroller = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
225
|
+
ref,
|
|
226
|
+
className: cn("flex gap-3 overflow-x-auto pb-1 [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", className),
|
|
227
|
+
...props
|
|
228
|
+
});
|
|
229
|
+
CartScroller.displayName = "CartScroller";
|
|
230
|
+
const CartSummary = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
231
|
+
ref,
|
|
232
|
+
className: cn("flex flex-col gap-2 px-4 py-3", className),
|
|
233
|
+
...props
|
|
234
|
+
});
|
|
235
|
+
CartSummary.displayName = "CartSummary";
|
|
236
|
+
const CartSummaryRow = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
237
|
+
ref,
|
|
238
|
+
className: cn("flex items-center justify-between gap-3 text-sm", className),
|
|
239
|
+
...props
|
|
240
|
+
});
|
|
241
|
+
CartSummaryRow.displayName = "CartSummaryRow";
|
|
242
|
+
const CartSummaryLabel = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("span", {
|
|
243
|
+
ref,
|
|
244
|
+
className: cn(className),
|
|
245
|
+
...props
|
|
246
|
+
});
|
|
247
|
+
CartSummaryLabel.displayName = "CartSummaryLabel";
|
|
248
|
+
const CartSummaryValue = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("span", {
|
|
249
|
+
ref,
|
|
250
|
+
className: cn("tabular-nums", className),
|
|
251
|
+
...props
|
|
252
|
+
});
|
|
253
|
+
CartSummaryValue.displayName = "CartSummaryValue";
|
|
254
|
+
const CartFooter = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
255
|
+
ref,
|
|
256
|
+
className: cn("bg-background shrink-0 border-t px-4 py-4", className),
|
|
257
|
+
...props
|
|
258
|
+
});
|
|
259
|
+
CartFooter.displayName = "CartFooter";
|
|
260
|
+
const CartSubmit = ({ ref, className, type = "button", ...props }) => /* @__PURE__ */ jsx("button", {
|
|
261
|
+
ref,
|
|
262
|
+
type,
|
|
263
|
+
className: cn("bg-foreground text-background hover:bg-foreground/90 flex w-full items-center justify-between gap-2 rounded-full px-4 py-3 text-sm font-semibold transition-colors disabled:pointer-events-none disabled:opacity-50", className),
|
|
264
|
+
...props
|
|
265
|
+
});
|
|
266
|
+
CartSubmit.displayName = "CartSubmit";
|
|
267
|
+
const CartAction = ({ ref, className, type = "button", ...props }) => /* @__PURE__ */ jsx("button", {
|
|
268
|
+
ref,
|
|
269
|
+
type,
|
|
270
|
+
className: cn("bg-muted text-foreground hover:bg-muted/80 inline-flex items-center justify-center rounded-full px-4 py-2 text-sm font-medium transition-colors disabled:pointer-events-none disabled:opacity-50", className),
|
|
271
|
+
...props
|
|
272
|
+
});
|
|
273
|
+
CartAction.displayName = "CartAction";
|
|
274
|
+
const CartEmpty = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
275
|
+
ref,
|
|
276
|
+
className: cn("flex flex-1 flex-col items-center justify-center gap-2 px-6 py-12 text-center", className),
|
|
277
|
+
...props
|
|
278
|
+
});
|
|
279
|
+
CartEmpty.displayName = "CartEmpty";
|
|
280
|
+
const CartEmptyTitle = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("h3", {
|
|
281
|
+
ref,
|
|
282
|
+
className: cn("text-base font-semibold tracking-tight", className),
|
|
283
|
+
...props
|
|
284
|
+
});
|
|
285
|
+
CartEmptyTitle.displayName = "CartEmptyTitle";
|
|
286
|
+
const CartEmptyDescription = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("p", {
|
|
287
|
+
ref,
|
|
288
|
+
className: cn("text-muted-foreground max-w-xs text-sm", className),
|
|
289
|
+
...props
|
|
290
|
+
});
|
|
291
|
+
CartEmptyDescription.displayName = "CartEmptyDescription";
|
|
292
|
+
//#endregion
|
|
293
|
+
export { Cart, CartAction, CartBanner, CartBody, CartDescription, CartEmpty, CartEmptyDescription, CartEmptyTitle, CartFooter, CartHeader, CartItem, CartItemAction, CartItemActions, CartItemAnchorPrice, CartItemAside, CartItemContent, CartItemDescription, CartItemHeader, CartItemImage, CartItemImageSlot, CartItemMedia, CartItemMeta, CartItemPrice, CartItemTitle, CartList, CartOption, CartOptionControl, CartOptionLabel, CartQuantity, CartQuantityButton, CartQuantityValue, CartScroller, CartSection, CartSectionHeader, CartSectionTitle, CartStore, CartStoreContent, CartStoreDescription, CartStoreImage, CartStoreMedia, CartStoreTitle, CartSubmit, CartSummary, CartSummaryLabel, CartSummaryRow, CartSummaryValue, CartTitle };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, HTMLAttributes } from "react";
|
|
2
|
+
//#region src/category-nav.d.ts
|
|
3
|
+
type CategoryNavOrientation = "vertical" | "horizontal";
|
|
4
|
+
declare function CategoryNav({ ref, className, orientation, ...props }: HTMLAttributes<HTMLElement> & {
|
|
5
|
+
ref?: React.RefObject<HTMLElement | null>;
|
|
6
|
+
orientation?: CategoryNavOrientation;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
8
|
+
declare namespace CategoryNav {
|
|
9
|
+
var displayName: string;
|
|
10
|
+
}
|
|
11
|
+
declare function CategoryNavList({ ref, className, ...props }: HTMLAttributes<HTMLUListElement> & {
|
|
12
|
+
ref?: React.RefObject<HTMLUListElement | null>;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
14
|
+
declare namespace CategoryNavList {
|
|
15
|
+
var displayName: string;
|
|
16
|
+
}
|
|
17
|
+
declare function CategoryNavItem({ ref, className, ...props }: HTMLAttributes<HTMLLIElement> & {
|
|
18
|
+
ref?: React.RefObject<HTMLLIElement | null>;
|
|
19
|
+
}): import("react").JSX.Element;
|
|
20
|
+
declare namespace CategoryNavItem {
|
|
21
|
+
var displayName: string;
|
|
22
|
+
}
|
|
23
|
+
declare function CategoryNavLink({ ref, className, active, type, ...props }: ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
24
|
+
ref?: React.RefObject<HTMLButtonElement | null>;
|
|
25
|
+
active?: boolean;
|
|
26
|
+
}): import("react").JSX.Element;
|
|
27
|
+
declare namespace CategoryNavLink {
|
|
28
|
+
var displayName: string;
|
|
29
|
+
}
|
|
30
|
+
declare function CategoryNavExtra({ ref, className, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
31
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
32
|
+
}): import("react").JSX.Element;
|
|
33
|
+
declare namespace CategoryNavExtra {
|
|
34
|
+
var displayName: string;
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
export { CategoryNav, CategoryNavExtra, CategoryNavItem, CategoryNavLink, CategoryNavList, type CategoryNavOrientation };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { t as cn } from "./cn-Ccejyh36.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/category-nav.tsx
|
|
4
|
+
const CategoryNav = ({ ref, className, orientation = "vertical", ...props }) => /* @__PURE__ */ jsx("nav", {
|
|
5
|
+
ref,
|
|
6
|
+
"data-orientation": orientation,
|
|
7
|
+
className: cn("group/category-nav flex", orientation === "horizontal" ? "flex-row items-stretch gap-1 border-b" : "flex-col", className),
|
|
8
|
+
...props
|
|
9
|
+
});
|
|
10
|
+
CategoryNav.displayName = "CategoryNav";
|
|
11
|
+
const CategoryNavList = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("ul", {
|
|
12
|
+
ref,
|
|
13
|
+
className: cn("flex min-w-0", "group-data-[orientation=vertical]/category-nav:flex-col", "group-data-[orientation=horizontal]/category-nav:flex-1 group-data-[orientation=horizontal]/category-nav:flex-row group-data-[orientation=horizontal]/category-nav:items-baseline group-data-[orientation=horizontal]/category-nav:overflow-x-auto group-data-[orientation=horizontal]/category-nav:[-ms-overflow-style:none] group-data-[orientation=horizontal]/category-nav:[scrollbar-width:none] group-data-[orientation=horizontal]/category-nav:[&::-webkit-scrollbar]:hidden", className),
|
|
14
|
+
...props
|
|
15
|
+
});
|
|
16
|
+
CategoryNavList.displayName = "CategoryNavList";
|
|
17
|
+
const CategoryNavItem = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("li", {
|
|
18
|
+
ref,
|
|
19
|
+
className: cn("list-none group-data-[orientation=horizontal]/category-nav:flex group-data-[orientation=horizontal]/category-nav:shrink-0 group-data-[orientation=horizontal]/category-nav:items-baseline", className),
|
|
20
|
+
...props
|
|
21
|
+
});
|
|
22
|
+
CategoryNavItem.displayName = "CategoryNavItem";
|
|
23
|
+
const CategoryNavLink = ({ ref, className, active = false, type = "button", ...props }) => /* @__PURE__ */ jsx("button", {
|
|
24
|
+
ref,
|
|
25
|
+
type,
|
|
26
|
+
"data-active": active ? "true" : "false",
|
|
27
|
+
"aria-current": active ? "true" : void 0,
|
|
28
|
+
className: cn("text-muted-foreground hover:text-foreground flex w-full gap-2 px-3 py-2 text-left text-sm transition-colors", "group-data-[orientation=vertical]/category-nav:items-center", "group-data-[orientation=horizontal]/category-nav:items-baseline", "group-data-[orientation=vertical]/category-nav:border-l-2 group-data-[orientation=vertical]/category-nav:border-transparent group-data-[orientation=vertical]/category-nav:data-[active=true]:border-foreground group-data-[orientation=vertical]/category-nav:data-[active=true]:bg-muted group-data-[orientation=vertical]/category-nav:data-[active=true]:font-medium group-data-[orientation=vertical]/category-nav:data-[active=true]:text-foreground", "group-data-[orientation=horizontal]/category-nav:-mb-px group-data-[orientation=horizontal]/category-nav:border-b-2 group-data-[orientation=horizontal]/category-nav:border-transparent group-data-[orientation=horizontal]/category-nav:whitespace-nowrap group-data-[orientation=horizontal]/category-nav:data-[active=true]:border-foreground group-data-[orientation=horizontal]/category-nav:data-[active=true]:font-medium group-data-[orientation=horizontal]/category-nav:data-[active=true]:text-foreground", className),
|
|
29
|
+
...props
|
|
30
|
+
});
|
|
31
|
+
CategoryNavLink.displayName = "CategoryNavLink";
|
|
32
|
+
const CategoryNavExtra = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
33
|
+
ref,
|
|
34
|
+
className: cn("flex shrink-0 items-center", className),
|
|
35
|
+
...props
|
|
36
|
+
});
|
|
37
|
+
CategoryNavExtra.displayName = "CategoryNavExtra";
|
|
38
|
+
//#endregion
|
|
39
|
+
export { CategoryNav, CategoryNavExtra, CategoryNavItem, CategoryNavLink, CategoryNavList };
|