@fire-spark/react-ui 0.0.1 → 0.0.3
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/product-detail.d.ts +26 -1
- package/dist/product-detail.js +32 -1
- package/package.json +11 -20
package/dist/product-detail.d.ts
CHANGED
|
@@ -201,6 +201,31 @@ declare function ProductDetailOptionControl({ ref, className, ...props }: HTMLAt
|
|
|
201
201
|
declare namespace ProductDetailOptionControl {
|
|
202
202
|
var displayName: string;
|
|
203
203
|
}
|
|
204
|
+
declare function ProductDetailVariantGroup({ ref, className, ...props }: HTMLAttributes<HTMLElement> & {
|
|
205
|
+
ref?: React.RefObject<HTMLElement | null>;
|
|
206
|
+
}): import("react").JSX.Element;
|
|
207
|
+
declare namespace ProductDetailVariantGroup {
|
|
208
|
+
var displayName: string;
|
|
209
|
+
}
|
|
210
|
+
declare function ProductDetailVariantOptions({ ref, className, role, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
211
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
212
|
+
}): import("react").JSX.Element;
|
|
213
|
+
declare namespace ProductDetailVariantOptions {
|
|
214
|
+
var displayName: string;
|
|
215
|
+
}
|
|
216
|
+
declare function ProductDetailVariantOption({ ref, className, selected, type, ...props }: ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
217
|
+
ref?: React.RefObject<HTMLButtonElement | null>;
|
|
218
|
+
selected?: boolean;
|
|
219
|
+
}): import("react").JSX.Element;
|
|
220
|
+
declare namespace ProductDetailVariantOption {
|
|
221
|
+
var displayName: string;
|
|
222
|
+
}
|
|
223
|
+
declare function ProductDetailVariantOptionImage({ ref, className, alt, ...props }: ImgHTMLAttributes<HTMLImageElement> & {
|
|
224
|
+
ref?: React.RefObject<HTMLImageElement | null>;
|
|
225
|
+
}): import("react").JSX.Element;
|
|
226
|
+
declare namespace ProductDetailVariantOptionImage {
|
|
227
|
+
var displayName: string;
|
|
228
|
+
}
|
|
204
229
|
declare function ProductDetailBack({ ref, className, type, ...props }: ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
205
230
|
ref?: React.RefObject<HTMLButtonElement | null>;
|
|
206
231
|
}): import("react").JSX.Element;
|
|
@@ -238,4 +263,4 @@ declare namespace ProductDetailSubmit {
|
|
|
238
263
|
var displayName: string;
|
|
239
264
|
}
|
|
240
265
|
//#endregion
|
|
241
|
-
export { ProductDetail, type ProductDetailActions, ProductDetailAnchorPrice, ProductDetailBack, ProductDetailBadge, ProductDetailBody, type ProductDetailContextMeta, type ProductDetailContextValue, ProductDetailDescription, ProductDetailDiscount, ProductDetailFooter, ProductDetailGroup, ProductDetailGroupDescription, ProductDetailGroupHeader, ProductDetailGroupHint, ProductDetailGroupRequired, ProductDetailGroupTitle, ProductDetailGroups, ProductDetailHeader, ProductDetailImage, ProductDetailImageSlot, ProductDetailLayout, ProductDetailMedia, ProductDetailMeta, ProductDetailOption, ProductDetailOptionControl, ProductDetailOptionLabel, ProductDetailOptionName, ProductDetailOptionPrice, ProductDetailOptions, ProductDetailPanel, ProductDetailPrice, ProductDetailProvider, type ProductDetailProviderProps, type ProductDetailQuantities, ProductDetailRelated, ProductDetailRelatedGrid, ProductDetailRelatedTitle, type ProductDetailState, ProductDetailSubmit, ProductDetailTitle, useProductDetail };
|
|
266
|
+
export { ProductDetail, type ProductDetailActions, ProductDetailAnchorPrice, ProductDetailBack, ProductDetailBadge, ProductDetailBody, type ProductDetailContextMeta, type ProductDetailContextValue, ProductDetailDescription, ProductDetailDiscount, ProductDetailFooter, ProductDetailGroup, ProductDetailGroupDescription, ProductDetailGroupHeader, ProductDetailGroupHint, ProductDetailGroupRequired, ProductDetailGroupTitle, ProductDetailGroups, ProductDetailHeader, ProductDetailImage, ProductDetailImageSlot, ProductDetailLayout, ProductDetailMedia, ProductDetailMeta, ProductDetailOption, ProductDetailOptionControl, ProductDetailOptionLabel, ProductDetailOptionName, ProductDetailOptionPrice, ProductDetailOptions, ProductDetailPanel, ProductDetailPrice, ProductDetailProvider, type ProductDetailProviderProps, type ProductDetailQuantities, ProductDetailRelated, ProductDetailRelatedGrid, ProductDetailRelatedTitle, type ProductDetailState, ProductDetailSubmit, ProductDetailTitle, ProductDetailVariantGroup, ProductDetailVariantOption, ProductDetailVariantOptionImage, ProductDetailVariantOptions, useProductDetail };
|
package/dist/product-detail.js
CHANGED
|
@@ -249,6 +249,37 @@ const ProductDetailOptionControl = ({ ref, className, ...props }) => /* @__PURE_
|
|
|
249
249
|
...props
|
|
250
250
|
});
|
|
251
251
|
ProductDetailOptionControl.displayName = "ProductDetailOptionControl";
|
|
252
|
+
/** Variant question (e.g. size); render before modifier groups. */
|
|
253
|
+
const ProductDetailVariantGroup = ({ ref, className, ...props }) => /* @__PURE__ */ jsx("section", {
|
|
254
|
+
ref,
|
|
255
|
+
className: cn("flex flex-col gap-3", className),
|
|
256
|
+
...props
|
|
257
|
+
});
|
|
258
|
+
ProductDetailVariantGroup.displayName = "ProductDetailVariantGroup";
|
|
259
|
+
const ProductDetailVariantOptions = ({ ref, className, role = "radiogroup", ...props }) => /* @__PURE__ */ jsx("div", {
|
|
260
|
+
ref,
|
|
261
|
+
role,
|
|
262
|
+
className: cn("grid grid-cols-2 gap-2 @min-[28rem]/product-detail:grid-cols-3", className),
|
|
263
|
+
...props
|
|
264
|
+
});
|
|
265
|
+
ProductDetailVariantOptions.displayName = "ProductDetailVariantOptions";
|
|
266
|
+
const ProductDetailVariantOption = ({ ref, className, selected = false, type = "button", ...props }) => /* @__PURE__ */ jsx("button", {
|
|
267
|
+
ref,
|
|
268
|
+
type,
|
|
269
|
+
role: "radio",
|
|
270
|
+
"aria-checked": selected,
|
|
271
|
+
"data-selected": selected ? "true" : "false",
|
|
272
|
+
className: cn("hover:border-foreground/40 data-[selected=true]:border-foreground data-[selected=true]:bg-muted flex min-w-0 flex-col items-center gap-2 rounded-xl border px-3 py-3 text-center text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
273
|
+
...props
|
|
274
|
+
});
|
|
275
|
+
ProductDetailVariantOption.displayName = "ProductDetailVariantOption";
|
|
276
|
+
const ProductDetailVariantOptionImage = ({ ref, className, alt = "", ...props }) => /* @__PURE__ */ jsx("img", {
|
|
277
|
+
ref,
|
|
278
|
+
alt,
|
|
279
|
+
className: cn("aspect-square w-14 rounded-lg object-cover", className),
|
|
280
|
+
...props
|
|
281
|
+
});
|
|
282
|
+
ProductDetailVariantOptionImage.displayName = "ProductDetailVariantOptionImage";
|
|
252
283
|
const ProductDetailBack = ({ ref, className, type = "button", ...props }) => /* @__PURE__ */ jsx("button", {
|
|
253
284
|
ref,
|
|
254
285
|
type,
|
|
@@ -288,4 +319,4 @@ const ProductDetailSubmit = ({ ref, className, type = "button", ...props }) => /
|
|
|
288
319
|
});
|
|
289
320
|
ProductDetailSubmit.displayName = "ProductDetailSubmit";
|
|
290
321
|
//#endregion
|
|
291
|
-
export { ProductDetail, ProductDetailAnchorPrice, ProductDetailBack, ProductDetailBadge, ProductDetailBody, ProductDetailDescription, ProductDetailDiscount, ProductDetailFooter, ProductDetailGroup, ProductDetailGroupDescription, ProductDetailGroupHeader, ProductDetailGroupHint, ProductDetailGroupRequired, ProductDetailGroupTitle, ProductDetailGroups, ProductDetailHeader, ProductDetailImage, ProductDetailImageSlot, ProductDetailLayout, ProductDetailMedia, ProductDetailMeta, ProductDetailOption, ProductDetailOptionControl, ProductDetailOptionLabel, ProductDetailOptionName, ProductDetailOptionPrice, ProductDetailOptions, ProductDetailPanel, ProductDetailPrice, ProductDetailProvider, ProductDetailRelated, ProductDetailRelatedGrid, ProductDetailRelatedTitle, ProductDetailSubmit, ProductDetailTitle, useProductDetail };
|
|
322
|
+
export { ProductDetail, ProductDetailAnchorPrice, ProductDetailBack, ProductDetailBadge, ProductDetailBody, ProductDetailDescription, ProductDetailDiscount, ProductDetailFooter, ProductDetailGroup, ProductDetailGroupDescription, ProductDetailGroupHeader, ProductDetailGroupHint, ProductDetailGroupRequired, ProductDetailGroupTitle, ProductDetailGroups, ProductDetailHeader, ProductDetailImage, ProductDetailImageSlot, ProductDetailLayout, ProductDetailMedia, ProductDetailMeta, ProductDetailOption, ProductDetailOptionControl, ProductDetailOptionLabel, ProductDetailOptionName, ProductDetailOptionPrice, ProductDetailOptions, ProductDetailPanel, ProductDetailPrice, ProductDetailProvider, ProductDetailRelated, ProductDetailRelatedGrid, ProductDetailRelatedTitle, ProductDetailSubmit, ProductDetailTitle, ProductDetailVariantGroup, ProductDetailVariantOption, ProductDetailVariantOptionImage, ProductDetailVariantOptions, useProductDetail };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fire-spark/react-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Fire Spark React UI components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -8,59 +8,50 @@
|
|
|
8
8
|
"dist"
|
|
9
9
|
],
|
|
10
10
|
"main": "./dist/index.js",
|
|
11
|
-
"types": "./
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
|
14
|
-
"types": "./
|
|
15
|
-
"development": "./src/index.ts",
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
16
15
|
"import": "./dist/index.js",
|
|
17
16
|
"default": "./dist/index.js"
|
|
18
17
|
},
|
|
19
18
|
"./category": {
|
|
20
|
-
"types": "./
|
|
21
|
-
"development": "./src/category.tsx",
|
|
19
|
+
"types": "./dist/category.d.ts",
|
|
22
20
|
"import": "./dist/category.js",
|
|
23
21
|
"default": "./dist/category.js"
|
|
24
22
|
},
|
|
25
23
|
"./menu": {
|
|
26
|
-
"types": "./
|
|
27
|
-
"development": "./src/menu.tsx",
|
|
24
|
+
"types": "./dist/menu.d.ts",
|
|
28
25
|
"import": "./dist/menu.js",
|
|
29
26
|
"default": "./dist/menu.js"
|
|
30
27
|
},
|
|
31
28
|
"./category-nav": {
|
|
32
|
-
"types": "./
|
|
33
|
-
"development": "./src/category-nav.tsx",
|
|
29
|
+
"types": "./dist/category-nav.d.ts",
|
|
34
30
|
"import": "./dist/category-nav.js",
|
|
35
31
|
"default": "./dist/category-nav.js"
|
|
36
32
|
},
|
|
37
33
|
"./use-active-category": {
|
|
38
|
-
"types": "./
|
|
39
|
-
"development": "./src/use-active-category.ts",
|
|
34
|
+
"types": "./dist/use-active-category.d.ts",
|
|
40
35
|
"import": "./dist/use-active-category.js",
|
|
41
36
|
"default": "./dist/use-active-category.js"
|
|
42
37
|
},
|
|
43
38
|
"./product-card": {
|
|
44
|
-
"types": "./
|
|
45
|
-
"development": "./src/product-card.tsx",
|
|
39
|
+
"types": "./dist/product-card.d.ts",
|
|
46
40
|
"import": "./dist/product-card.js",
|
|
47
41
|
"default": "./dist/product-card.js"
|
|
48
42
|
},
|
|
49
43
|
"./product-detail": {
|
|
50
|
-
"types": "./
|
|
51
|
-
"development": "./src/product-detail.tsx",
|
|
44
|
+
"types": "./dist/product-detail.d.ts",
|
|
52
45
|
"import": "./dist/product-detail.js",
|
|
53
46
|
"default": "./dist/product-detail.js"
|
|
54
47
|
},
|
|
55
48
|
"./cart": {
|
|
56
|
-
"types": "./
|
|
57
|
-
"development": "./src/cart.tsx",
|
|
49
|
+
"types": "./dist/cart.d.ts",
|
|
58
50
|
"import": "./dist/cart.js",
|
|
59
51
|
"default": "./dist/cart.js"
|
|
60
52
|
},
|
|
61
53
|
"./checkout": {
|
|
62
|
-
"types": "./
|
|
63
|
-
"development": "./src/checkout.tsx",
|
|
54
|
+
"types": "./dist/checkout.d.ts",
|
|
64
55
|
"import": "./dist/checkout.js",
|
|
65
56
|
"default": "./dist/checkout.js"
|
|
66
57
|
}
|