@shopify/shop-minis-react 0.0.22 → 0.0.23

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 (21) hide show
  1. package/dist/_virtual/index4.js +2 -2
  2. package/dist/_virtual/index5.js +2 -3
  3. package/dist/_virtual/index5.js.map +1 -1
  4. package/dist/_virtual/index6.js +2 -2
  5. package/dist/_virtual/index7.js +3 -2
  6. package/dist/_virtual/index7.js.map +1 -1
  7. package/dist/components/commerce/quantity-selector.js +80 -0
  8. package/dist/components/commerce/quantity-selector.js.map +1 -0
  9. package/dist/index.js +213 -211
  10. package/dist/index.js.map +1 -1
  11. package/dist/shop-minis-react/node_modules/.pnpm/@radix-ui_react-use-is-hydrated@0.1.0_@types_react@19.1.6_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +1 -1
  12. package/dist/shop-minis-react/node_modules/.pnpm/@videojs_xhr@2.7.0/node_modules/@videojs/xhr/lib/index.js +1 -1
  13. package/dist/shop-minis-react/node_modules/.pnpm/lucide-react@0.513.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/minus.js +13 -0
  14. package/dist/shop-minis-react/node_modules/.pnpm/lucide-react@0.513.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/minus.js.map +1 -0
  15. package/dist/shop-minis-react/node_modules/.pnpm/lucide-react@0.513.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/plus.js +16 -0
  16. package/dist/shop-minis-react/node_modules/.pnpm/lucide-react@0.513.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/plus.js.map +1 -0
  17. package/dist/shop-minis-react/node_modules/.pnpm/mpd-parser@1.3.1/node_modules/mpd-parser/dist/mpd-parser.es.js +1 -1
  18. package/dist/shop-minis-react/node_modules/.pnpm/querystringify@2.2.0/node_modules/querystringify/index.js +1 -1
  19. package/package.json +1 -1
  20. package/src/components/commerce/quantity-selector.tsx +92 -0
  21. package/src/components/index.ts +1 -0
@@ -1,5 +1,5 @@
1
- var e = { exports: {} };
1
+ var r = {};
2
2
  export {
3
- e as __module
3
+ r as __exports
4
4
  };
5
5
  //# sourceMappingURL=index4.js.map
@@ -1,6 +1,5 @@
1
- import { __require as r } from "../shop-minis-react/node_modules/.pnpm/@xmldom_xmldom@0.8.10/node_modules/@xmldom/xmldom/lib/index.js";
2
- var i = r();
1
+ var e = { exports: {} };
3
2
  export {
4
- i as l
3
+ e as __module
5
4
  };
6
5
  //# sourceMappingURL=index5.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index5.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
1
+ {"version":3,"file":"index5.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,6 +1,6 @@
1
- import { __require as r } from "../shop-minis-react/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.1.0/node_modules/use-sync-external-store/shim/index.js";
1
+ import { __require as r } from "../shop-minis-react/node_modules/.pnpm/@xmldom_xmldom@0.8.10/node_modules/@xmldom/xmldom/lib/index.js";
2
2
  var i = r();
3
3
  export {
4
- i as s
4
+ i as l
5
5
  };
6
6
  //# sourceMappingURL=index6.js.map
@@ -1,5 +1,6 @@
1
- var r = {};
1
+ import { __require as r } from "../shop-minis-react/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.1.0/node_modules/use-sync-external-store/shim/index.js";
2
+ var i = r();
2
3
  export {
3
- r as __exports
4
+ i as s
4
5
  };
5
6
  //# sourceMappingURL=index7.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index7.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"index7.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -0,0 +1,80 @@
1
+ import { jsx as t, Fragment as y, jsxs as g } from "react/jsx-runtime";
2
+ import { useState as h, useEffect as u, useCallback as m } from "react";
3
+ import { cn as n } from "../../lib/utils.js";
4
+ import { IconButton as p } from "../atoms/icon-button.js";
5
+ import k from "../../shop-minis-react/node_modules/.pnpm/lucide-react@0.513.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/minus.js";
6
+ import w from "../../shop-minis-react/node_modules/.pnpm/lucide-react@0.513.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/plus.js";
7
+ const C = ({
8
+ quantity: r,
9
+ onQuantityChange: d,
10
+ maxQuantity: s,
11
+ minQuantity: o = 1,
12
+ disabled: f = !1
13
+ }) => {
14
+ const [e, c] = h(r);
15
+ u(() => {
16
+ c(r);
17
+ }, [r]), u(() => {
18
+ d(e);
19
+ }, [e, d]);
20
+ const i = f || e >= s, l = f || e <= o, x = m(() => {
21
+ if (i) return;
22
+ const a = e + 1 > s ? e : e + 1;
23
+ c(a);
24
+ }, [i, e, s]), b = m(() => {
25
+ if (l) return;
26
+ const a = e - 1 < o ? e : e - 1;
27
+ c(a);
28
+ }, [l, e, o]);
29
+ return /* @__PURE__ */ t(y, { children: /* @__PURE__ */ t(
30
+ "div",
31
+ {
32
+ "data-testid": "QuantitySelector",
33
+ className: n("inline-flex w-auto bg-tertiary rounded-[8px]"),
34
+ children: /* @__PURE__ */ g(
35
+ "div",
36
+ {
37
+ className: n(
38
+ "flex h-space-32 items-center self-center overflow-hidden rounded-radius-8 bg-bg-fill-secondary",
39
+ "p-space-8"
40
+ ),
41
+ children: [
42
+ /* @__PURE__ */ t(
43
+ p,
44
+ {
45
+ Icon: k,
46
+ onClick: b,
47
+ buttonStyles: "transition bg-transparent",
48
+ filled: !1,
49
+ size: "sm",
50
+ iconStyles: n(
51
+ l ? "text-background" : "text-foreground",
52
+ "stroke-3"
53
+ )
54
+ }
55
+ ),
56
+ /* @__PURE__ */ t("div", { className: n("grow", "w-[20px]"), children: /* @__PURE__ */ t("span", { className: "flex items-center justify-center w-full h-full font-medium text-[10px]", children: e }) }),
57
+ /* @__PURE__ */ t(
58
+ p,
59
+ {
60
+ Icon: w,
61
+ onClick: x,
62
+ buttonStyles: "transition bg-transparent",
63
+ filled: !1,
64
+ size: "sm",
65
+ iconStyles: n(
66
+ i ? "text-background" : "text-secondary",
67
+ "stroke-3"
68
+ )
69
+ }
70
+ )
71
+ ]
72
+ }
73
+ )
74
+ }
75
+ ) });
76
+ };
77
+ export {
78
+ C as QuantitySelector
79
+ };
80
+ //# sourceMappingURL=quantity-selector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quantity-selector.js","sources":["../../../src/components/commerce/quantity-selector.tsx"],"sourcesContent":["import {useCallback, useEffect, useState} from 'react'\n\nimport {Minus, Plus} from 'lucide-react'\n\nimport {cn} from '../../lib/utils'\nimport {IconButton} from '../atoms/icon-button'\n\ninterface QuantitySelectorProps {\n quantity: number\n onQuantityChange: (quantity: number) => void\n maxQuantity: number\n minQuantity?: number\n disabled?: boolean\n}\n\nexport const QuantitySelector = ({\n quantity: _quantity,\n onQuantityChange,\n maxQuantity,\n minQuantity = 1,\n disabled = false,\n}: QuantitySelectorProps) => {\n const [quantity, setQuantity] = useState(_quantity)\n\n useEffect(() => {\n setQuantity(_quantity)\n }, [_quantity])\n\n useEffect(() => {\n onQuantityChange(quantity)\n }, [quantity, onQuantityChange])\n\n const incrementDisabled = disabled || quantity >= maxQuantity\n const decrementDisabled = disabled || quantity <= minQuantity\n\n const incrementQuantity = useCallback(() => {\n if (incrementDisabled) return\n const newQuantity = quantity + 1 > maxQuantity ? quantity : quantity + 1\n setQuantity(newQuantity)\n }, [incrementDisabled, quantity, maxQuantity])\n\n const decrementQuantity = useCallback(() => {\n if (decrementDisabled) return\n const newQuantity = quantity - 1 < minQuantity ? quantity : quantity - 1\n setQuantity(newQuantity)\n }, [decrementDisabled, quantity, minQuantity])\n\n return (\n <>\n <div\n data-testid=\"QuantitySelector\"\n className={cn('inline-flex w-auto bg-tertiary rounded-[8px]')}\n >\n <div\n className={cn(\n 'flex h-space-32 items-center self-center overflow-hidden rounded-radius-8 bg-bg-fill-secondary',\n `p-space-8`\n )}\n >\n <IconButton\n Icon={Minus}\n onClick={decrementQuantity}\n buttonStyles=\"transition bg-transparent\"\n filled={false}\n size=\"sm\"\n iconStyles={cn(\n decrementDisabled ? 'text-background' : 'text-foreground',\n 'stroke-3'\n )}\n />\n\n <div className={cn('grow', `w-[20px]`)}>\n <span className=\"flex items-center justify-center w-full h-full font-medium text-[10px]\">\n {quantity}\n </span>\n </div>\n <IconButton\n Icon={Plus}\n onClick={incrementQuantity}\n buttonStyles=\"transition bg-transparent\"\n filled={false}\n size=\"sm\"\n iconStyles={cn(\n incrementDisabled ? 'text-background' : 'text-secondary',\n 'stroke-3'\n )}\n />\n </div>\n </div>\n </>\n )\n}\n"],"names":["QuantitySelector","_quantity","onQuantityChange","maxQuantity","minQuantity","disabled","quantity","setQuantity","useState","useEffect","incrementDisabled","decrementDisabled","incrementQuantity","useCallback","newQuantity","decrementQuantity","jsx","Fragment","cn","jsxs","IconButton","Minus","Plus"],"mappings":";;;;;;AAeO,MAAMA,IAAmB,CAAC;AAAA,EAC/B,UAAUC;AAAA,EACV,kBAAAC;AAAA,EACA,aAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,UAAAC,IAAW;AACb,MAA6B;AAC3B,QAAM,CAACC,GAAUC,CAAW,IAAIC,EAASP,CAAS;AAElD,EAAAQ,EAAU,MAAM;AACd,IAAAF,EAAYN,CAAS;AAAA,EAAA,GACpB,CAACA,CAAS,CAAC,GAEdQ,EAAU,MAAM;AACd,IAAAP,EAAiBI,CAAQ;AAAA,EAAA,GACxB,CAACA,GAAUJ,CAAgB,CAAC;AAEzB,QAAAQ,IAAoBL,KAAYC,KAAYH,GAC5CQ,IAAoBN,KAAYC,KAAYF,GAE5CQ,IAAoBC,EAAY,MAAM;AAC1C,QAAIH,EAAmB;AACvB,UAAMI,IAAcR,IAAW,IAAIH,IAAcG,IAAWA,IAAW;AACvE,IAAAC,EAAYO,CAAW;AAAA,EACtB,GAAA,CAACJ,GAAmBJ,GAAUH,CAAW,CAAC,GAEvCY,IAAoBF,EAAY,MAAM;AAC1C,QAAIF,EAAmB;AACvB,UAAMG,IAAcR,IAAW,IAAIF,IAAcE,IAAWA,IAAW;AACvE,IAAAC,EAAYO,CAAW;AAAA,EACtB,GAAA,CAACH,GAAmBL,GAAUF,CAAW,CAAC;AAE7C,SAEI,gBAAAY,EAAAC,GAAA,EAAA,UAAA,gBAAAD;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAY;AAAA,MACZ,WAAWE,EAAG,8CAA8C;AAAA,MAE5D,UAAA,gBAAAC;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAWD;AAAA,YACT;AAAA,YACA;AAAA,UACF;AAAA,UAEA,UAAA;AAAA,YAAA,gBAAAF;AAAA,cAACI;AAAA,cAAA;AAAA,gBACC,MAAMC;AAAA,gBACN,SAASN;AAAA,gBACT,cAAa;AAAA,gBACb,QAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,YAAYG;AAAA,kBACVP,IAAoB,oBAAoB;AAAA,kBACxC;AAAA,gBAAA;AAAA,cACF;AAAA,YACF;AAAA,YAEC,gBAAAK,EAAA,OAAA,EAAI,WAAWE,EAAG,QAAQ,UAAU,GACnC,UAAA,gBAAAF,EAAC,QAAK,EAAA,WAAU,0EACb,UAAAV,EACH,CAAA,GACF;AAAA,YACA,gBAAAU;AAAA,cAACI;AAAA,cAAA;AAAA,gBACC,MAAME;AAAA,gBACN,SAASV;AAAA,gBACT,cAAa;AAAA,gBACb,QAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,YAAYM;AAAA,kBACVR,IAAoB,oBAAoB;AAAA,kBACxC;AAAA,gBAAA;AAAA,cACF;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EAAA,GAEJ;AAEJ;"}
package/dist/index.js CHANGED
@@ -5,226 +5,228 @@ import { ProductLink as s } from "./components/commerce/product-link.js";
5
5
  import { MerchantCard as u, MerchantCardPrimitive as x } from "./components/commerce/merchant-card.js";
6
6
  import { ProductCardSkeleton as c } from "./components/commerce/product-card-skeleton.js";
7
7
  import { MerchantCardSkeleton as g } from "./components/commerce/merchant-card-skeleton.js";
8
- import { TransitionContainer as D } from "./components/navigation/transition-container.js";
9
- import { TransitionLink as C } from "./components/navigation/transition-link.js";
10
- import { Button as T } from "./components/atoms/button.js";
11
- import { FavoriteButton as I } from "./components/atoms/favorite-button.js";
12
- import { IconButton as v } from "./components/atoms/icon-button.js";
13
- import { ThumbhashImage as b } from "./components/atoms/thumbhash-image.js";
14
- import { Touchable as k } from "./components/atoms/touchable.js";
15
- import { AlertDialogAtom as E } from "./components/atoms/alert-dialog.js";
16
- import { List as N } from "./components/atoms/list.js";
17
- import { VideoPlayer as y } from "./components/atoms/video-player.js";
18
- import { Accordion as H, AccordionContent as O, AccordionItem as V, AccordionTrigger as U } from "./components/ui/accordion.js";
19
- import { Alert as _, AlertDescription as Y, AlertTitle as W } from "./components/ui/alert.js";
20
- import { AlertDialog as q, AlertDialogAction as J, AlertDialogCancel as K, AlertDialogContent as Q, AlertDialogDescription as X, AlertDialogFooter as Z, AlertDialogHeader as $, AlertDialogOverlay as rr, AlertDialogPortal as er, AlertDialogTitle as or, AlertDialogTrigger as tr } from "./components/ui/alert-dialog.js";
21
- import { Avatar as ir, AvatarFallback as lr, AvatarImage as pr } from "./components/ui/avatar.js";
22
- import { Badge as sr, badgeVariants as nr } from "./components/ui/badge.js";
23
- import { Card as xr, CardAction as fr, CardContent as cr, CardDescription as dr, CardFooter as gr, CardHeader as Sr, CardTitle as Dr } from "./components/ui/card.js";
24
- import { Carousel as Cr, CarouselContent as Pr, CarouselItem as Tr, CarouselNext as hr, CarouselPrevious as Ir } from "./components/ui/carousel.js";
25
- import { Checkbox as vr } from "./components/ui/checkbox.js";
26
- import { Dialog as br, DialogClose as Fr, DialogContent as kr, DialogDescription as Br, DialogFooter as Er, DialogHeader as Mr, DialogOverlay as Nr, DialogPortal as Lr, DialogTitle as yr, DialogTrigger as Gr } from "./components/ui/dialog.js";
27
- import { Drawer as Or, DrawerClose as Vr, DrawerContent as Ur, DrawerDescription as zr, DrawerFooter as _r, DrawerHeader as Yr, DrawerOverlay as Wr, DrawerPortal as jr, DrawerTitle as qr, DrawerTrigger as Jr } from "./components/ui/drawer.js";
28
- import { Input as Qr } from "./components/ui/input.js";
29
- import { Label as Zr } from "./components/ui/label.js";
30
- import { Progress as re } from "./components/ui/progress.js";
31
- import { RadioGroup as oe, RadioGroupItem as te } from "./components/ui/radio-group.js";
32
- import { ResizableHandle as ie, ResizablePanel as le, ResizablePanelGroup as pe } from "./components/ui/resizable.js";
33
- import { ScrollArea as se, ScrollBar as ne } from "./components/ui/scroll-area.js";
34
- import { Select as xe, SelectContent as fe, SelectGroup as ce, SelectItem as de, SelectLabel as ge, SelectScrollDownButton as Se, SelectScrollUpButton as De, SelectSeparator as Ae, SelectTrigger as Ce, SelectValue as Pe } from "./components/ui/select.js";
35
- import { Separator as he } from "./components/ui/separator.js";
36
- import { Sheet as we, SheetClose as ve, SheetContent as Re, SheetDescription as be, SheetFooter as Fe, SheetHeader as ke, SheetTitle as Be, SheetTrigger as Ee } from "./components/ui/sheet.js";
37
- import { Toaster as Ne } from "./components/ui/sonner.js";
38
- import { Skeleton as ye } from "./components/ui/skeleton.js";
39
- import { useRecentProducts as He } from "./hooks/user/useRecentProducts.js";
40
- import { useRecentShops as Ve } from "./hooks/user/useRecentShops.js";
41
- import { useSavedProducts as ze } from "./hooks/user/useSavedProducts.js";
42
- import { useSavedProductsActions as Ye } from "./hooks/user/useSavedProductsActions.js";
43
- import { useFollowedShops as je } from "./hooks/user/useFollowedShops.js";
44
- import { useFollowedShopsActions as Je } from "./hooks/user/useFollowedShopsActions.js";
45
- import { useCurrentUser as Qe } from "./hooks/user/useCurrentUser.js";
46
- import { useOrders as Ze } from "./hooks/user/useOrders.js";
47
- import { useBuyerAttributes as ro } from "./hooks/user/useBuyerAttributes.js";
48
- import { useProductListActions as oo } from "./hooks/product/useProductListActions.js";
49
- import { useProductLists as ao } from "./hooks/product/useProductLists.js";
50
- import { useProductList as lo } from "./hooks/product/useProductList.js";
51
- import { useProduct as mo } from "./hooks/product/useProduct.js";
52
- import { useProducts as no } from "./hooks/product/useProducts.js";
53
- import { useProductVariants as xo } from "./hooks/product/useProductVariants.js";
54
- import { useProductMedia as co } from "./hooks/product/useProductMedia.js";
55
- import { useProductSearch as So } from "./hooks/product/useProductSearch.js";
56
- import { useRecommendedProducts as Ao } from "./hooks/product/useRecommendedProducts.js";
57
- import { usePopularProducts as Po } from "./hooks/product/usePopularProducts.js";
58
- import { useCuratedProducts as ho } from "./hooks/product/useCuratedProducts.js";
59
- import { useAsyncStorage as wo } from "./hooks/storage/useAsyncStorage.js";
60
- import { useSecureStorage as Ro } from "./hooks/storage/useSecureStorage.js";
61
- import { useImageUpload as Fo } from "./hooks/storage/useImageUpload.js";
62
- import { useShopNavigation as Bo } from "./hooks/navigation/useShopNavigation.js";
63
- import { useCloseMini as Mo } from "./hooks/navigation/useCloseMini.js";
64
- import { useDeeplink as Lo } from "./hooks/navigation/useDeeplink.js";
65
- import { useNavigateWithTransition as Go } from "./hooks/navigation/useNavigateWithTransition.js";
66
- import { useShop as Oo } from "./hooks/shop/useShop.js";
67
- import { useShopCartActions as Uo } from "./hooks/shop/useShopCartActions.js";
68
- import { useRecommendedShops as _o } from "./hooks/shop/useRecommendedShops.js";
69
- import { useErrorToast as Wo } from "./hooks/util/useErrorToast.js";
70
- import { useErrorScreen as qo } from "./hooks/util/useErrorScreen.js";
71
- import { useShare as Ko } from "./hooks/util/useShare.js";
72
- import { useImagePicker as Xo } from "./hooks/util/useImagePicker.js";
73
- import { MiniEntityNotFoundError as $o, MiniError as rt, MiniNetworkError as et, formatError as ot } from "./utils/errors.js";
74
- import { extractBrandTheme as at, formatReviewCount as it, getFeaturedImages as lt, normalizeRating as pt } from "./utils/merchant-card.js";
75
- import { parseUrl as st } from "./utils/parseUrl.js";
76
- import { Consent as ut, ConsentStatus as xt } from "./shop-minis-platform/src/types/permissions.js";
8
+ import { QuantitySelector as D } from "./components/commerce/quantity-selector.js";
9
+ import { TransitionContainer as C } from "./components/navigation/transition-container.js";
10
+ import { TransitionLink as T } from "./components/navigation/transition-link.js";
11
+ import { Button as I } from "./components/atoms/button.js";
12
+ import { FavoriteButton as v } from "./components/atoms/favorite-button.js";
13
+ import { IconButton as b } from "./components/atoms/icon-button.js";
14
+ import { ThumbhashImage as k } from "./components/atoms/thumbhash-image.js";
15
+ import { Touchable as E } from "./components/atoms/touchable.js";
16
+ import { AlertDialogAtom as N } from "./components/atoms/alert-dialog.js";
17
+ import { List as L } from "./components/atoms/list.js";
18
+ import { VideoPlayer as H } from "./components/atoms/video-player.js";
19
+ import { Accordion as V, AccordionContent as U, AccordionItem as z, AccordionTrigger as _ } from "./components/ui/accordion.js";
20
+ import { Alert as Q, AlertDescription as W, AlertTitle as j } from "./components/ui/alert.js";
21
+ import { AlertDialog as J, AlertDialogAction as K, AlertDialogCancel as X, AlertDialogContent as Z, AlertDialogDescription as $, AlertDialogFooter as rr, AlertDialogHeader as er, AlertDialogOverlay as or, AlertDialogPortal as tr, AlertDialogTitle as ar, AlertDialogTrigger as ir } from "./components/ui/alert-dialog.js";
22
+ import { Avatar as pr, AvatarFallback as mr, AvatarImage as sr } from "./components/ui/avatar.js";
23
+ import { Badge as ur, badgeVariants as xr } from "./components/ui/badge.js";
24
+ import { Card as cr, CardAction as dr, CardContent as gr, CardDescription as Sr, CardFooter as Dr, CardHeader as Ar, CardTitle as Cr } from "./components/ui/card.js";
25
+ import { Carousel as Tr, CarouselContent as hr, CarouselItem as Ir, CarouselNext as wr, CarouselPrevious as vr } from "./components/ui/carousel.js";
26
+ import { Checkbox as br } from "./components/ui/checkbox.js";
27
+ import { Dialog as kr, DialogClose as Br, DialogContent as Er, DialogDescription as Mr, DialogFooter as Nr, DialogHeader as yr, DialogOverlay as Lr, DialogPortal as Gr, DialogTitle as Hr, DialogTrigger as Or } from "./components/ui/dialog.js";
28
+ import { Drawer as Ur, DrawerClose as zr, DrawerContent as _r, DrawerDescription as Yr, DrawerFooter as Qr, DrawerHeader as Wr, DrawerOverlay as jr, DrawerPortal as qr, DrawerTitle as Jr, DrawerTrigger as Kr } from "./components/ui/drawer.js";
29
+ import { Input as Zr } from "./components/ui/input.js";
30
+ import { Label as re } from "./components/ui/label.js";
31
+ import { Progress as oe } from "./components/ui/progress.js";
32
+ import { RadioGroup as ae, RadioGroupItem as ie } from "./components/ui/radio-group.js";
33
+ import { ResizableHandle as pe, ResizablePanel as me, ResizablePanelGroup as se } from "./components/ui/resizable.js";
34
+ import { ScrollArea as ue, ScrollBar as xe } from "./components/ui/scroll-area.js";
35
+ import { Select as ce, SelectContent as de, SelectGroup as ge, SelectItem as Se, SelectLabel as De, SelectScrollDownButton as Ae, SelectScrollUpButton as Ce, SelectSeparator as Pe, SelectTrigger as Te, SelectValue as he } from "./components/ui/select.js";
36
+ import { Separator as we } from "./components/ui/separator.js";
37
+ import { Sheet as Re, SheetClose as be, SheetContent as Fe, SheetDescription as ke, SheetFooter as Be, SheetHeader as Ee, SheetTitle as Me, SheetTrigger as Ne } from "./components/ui/sheet.js";
38
+ import { Toaster as Le } from "./components/ui/sonner.js";
39
+ import { Skeleton as He } from "./components/ui/skeleton.js";
40
+ import { useRecentProducts as Ve } from "./hooks/user/useRecentProducts.js";
41
+ import { useRecentShops as ze } from "./hooks/user/useRecentShops.js";
42
+ import { useSavedProducts as Ye } from "./hooks/user/useSavedProducts.js";
43
+ import { useSavedProductsActions as We } from "./hooks/user/useSavedProductsActions.js";
44
+ import { useFollowedShops as qe } from "./hooks/user/useFollowedShops.js";
45
+ import { useFollowedShopsActions as Ke } from "./hooks/user/useFollowedShopsActions.js";
46
+ import { useCurrentUser as Ze } from "./hooks/user/useCurrentUser.js";
47
+ import { useOrders as ro } from "./hooks/user/useOrders.js";
48
+ import { useBuyerAttributes as oo } from "./hooks/user/useBuyerAttributes.js";
49
+ import { useProductListActions as ao } from "./hooks/product/useProductListActions.js";
50
+ import { useProductLists as lo } from "./hooks/product/useProductLists.js";
51
+ import { useProductList as mo } from "./hooks/product/useProductList.js";
52
+ import { useProduct as no } from "./hooks/product/useProduct.js";
53
+ import { useProducts as xo } from "./hooks/product/useProducts.js";
54
+ import { useProductVariants as co } from "./hooks/product/useProductVariants.js";
55
+ import { useProductMedia as So } from "./hooks/product/useProductMedia.js";
56
+ import { useProductSearch as Ao } from "./hooks/product/useProductSearch.js";
57
+ import { useRecommendedProducts as Po } from "./hooks/product/useRecommendedProducts.js";
58
+ import { usePopularProducts as ho } from "./hooks/product/usePopularProducts.js";
59
+ import { useCuratedProducts as wo } from "./hooks/product/useCuratedProducts.js";
60
+ import { useAsyncStorage as Ro } from "./hooks/storage/useAsyncStorage.js";
61
+ import { useSecureStorage as Fo } from "./hooks/storage/useSecureStorage.js";
62
+ import { useImageUpload as Bo } from "./hooks/storage/useImageUpload.js";
63
+ import { useShopNavigation as Mo } from "./hooks/navigation/useShopNavigation.js";
64
+ import { useCloseMini as yo } from "./hooks/navigation/useCloseMini.js";
65
+ import { useDeeplink as Go } from "./hooks/navigation/useDeeplink.js";
66
+ import { useNavigateWithTransition as Oo } from "./hooks/navigation/useNavigateWithTransition.js";
67
+ import { useShop as Uo } from "./hooks/shop/useShop.js";
68
+ import { useShopCartActions as _o } from "./hooks/shop/useShopCartActions.js";
69
+ import { useRecommendedShops as Qo } from "./hooks/shop/useRecommendedShops.js";
70
+ import { useErrorToast as jo } from "./hooks/util/useErrorToast.js";
71
+ import { useErrorScreen as Jo } from "./hooks/util/useErrorScreen.js";
72
+ import { useShare as Xo } from "./hooks/util/useShare.js";
73
+ import { useImagePicker as $o } from "./hooks/util/useImagePicker.js";
74
+ import { MiniEntityNotFoundError as et, MiniError as ot, MiniNetworkError as tt, formatError as at } from "./utils/errors.js";
75
+ import { extractBrandTheme as lt, formatReviewCount as pt, getFeaturedImages as mt, normalizeRating as st } from "./utils/merchant-card.js";
76
+ import { parseUrl as ut } from "./utils/parseUrl.js";
77
+ import { Consent as ft, ConsentStatus as ct } from "./shop-minis-platform/src/types/permissions.js";
77
78
  export {
78
- H as Accordion,
79
- O as AccordionContent,
80
- V as AccordionItem,
81
- U as AccordionTrigger,
82
- _ as Alert,
83
- Y as AlertDescription,
84
- q as AlertDialog,
85
- J as AlertDialogAction,
86
- E as AlertDialogAtom,
87
- K as AlertDialogCancel,
88
- Q as AlertDialogContent,
89
- X as AlertDialogDescription,
90
- Z as AlertDialogFooter,
91
- $ as AlertDialogHeader,
92
- rr as AlertDialogOverlay,
93
- er as AlertDialogPortal,
94
- or as AlertDialogTitle,
95
- tr as AlertDialogTrigger,
96
- W as AlertTitle,
97
- ir as Avatar,
98
- lr as AvatarFallback,
99
- pr as AvatarImage,
100
- sr as Badge,
101
- T as Button,
102
- xr as Card,
103
- fr as CardAction,
104
- cr as CardContent,
105
- dr as CardDescription,
106
- gr as CardFooter,
107
- Sr as CardHeader,
108
- Dr as CardTitle,
109
- Cr as Carousel,
110
- Pr as CarouselContent,
111
- Tr as CarouselItem,
112
- hr as CarouselNext,
113
- Ir as CarouselPrevious,
114
- vr as Checkbox,
115
- ut as Consent,
116
- xt as ConsentStatus,
79
+ V as Accordion,
80
+ U as AccordionContent,
81
+ z as AccordionItem,
82
+ _ as AccordionTrigger,
83
+ Q as Alert,
84
+ W as AlertDescription,
85
+ J as AlertDialog,
86
+ K as AlertDialogAction,
87
+ N as AlertDialogAtom,
88
+ X as AlertDialogCancel,
89
+ Z as AlertDialogContent,
90
+ $ as AlertDialogDescription,
91
+ rr as AlertDialogFooter,
92
+ er as AlertDialogHeader,
93
+ or as AlertDialogOverlay,
94
+ tr as AlertDialogPortal,
95
+ ar as AlertDialogTitle,
96
+ ir as AlertDialogTrigger,
97
+ j as AlertTitle,
98
+ pr as Avatar,
99
+ mr as AvatarFallback,
100
+ sr as AvatarImage,
101
+ ur as Badge,
102
+ I as Button,
103
+ cr as Card,
104
+ dr as CardAction,
105
+ gr as CardContent,
106
+ Sr as CardDescription,
107
+ Dr as CardFooter,
108
+ Ar as CardHeader,
109
+ Cr as CardTitle,
110
+ Tr as Carousel,
111
+ hr as CarouselContent,
112
+ Ir as CarouselItem,
113
+ wr as CarouselNext,
114
+ vr as CarouselPrevious,
115
+ br as Checkbox,
116
+ ft as Consent,
117
+ ct as ConsentStatus,
117
118
  o as DATA_NAVIGATION_TYPE_ATTRIBUTE,
118
- br as Dialog,
119
- Fr as DialogClose,
120
- kr as DialogContent,
121
- Br as DialogDescription,
122
- Er as DialogFooter,
123
- Mr as DialogHeader,
124
- Nr as DialogOverlay,
125
- Lr as DialogPortal,
126
- yr as DialogTitle,
127
- Gr as DialogTrigger,
128
- Or as Drawer,
129
- Vr as DrawerClose,
130
- Ur as DrawerContent,
131
- zr as DrawerDescription,
132
- _r as DrawerFooter,
133
- Yr as DrawerHeader,
134
- Wr as DrawerOverlay,
135
- jr as DrawerPortal,
136
- qr as DrawerTitle,
137
- Jr as DrawerTrigger,
138
- I as FavoriteButton,
139
- v as IconButton,
140
- Qr as Input,
141
- Zr as Label,
142
- N as List,
119
+ kr as Dialog,
120
+ Br as DialogClose,
121
+ Er as DialogContent,
122
+ Mr as DialogDescription,
123
+ Nr as DialogFooter,
124
+ yr as DialogHeader,
125
+ Lr as DialogOverlay,
126
+ Gr as DialogPortal,
127
+ Hr as DialogTitle,
128
+ Or as DialogTrigger,
129
+ Ur as Drawer,
130
+ zr as DrawerClose,
131
+ _r as DrawerContent,
132
+ Yr as DrawerDescription,
133
+ Qr as DrawerFooter,
134
+ Wr as DrawerHeader,
135
+ jr as DrawerOverlay,
136
+ qr as DrawerPortal,
137
+ Jr as DrawerTitle,
138
+ Kr as DrawerTrigger,
139
+ v as FavoriteButton,
140
+ b as IconButton,
141
+ Zr as Input,
142
+ re as Label,
143
+ L as List,
143
144
  u as MerchantCard,
144
145
  x as MerchantCardPrimitive,
145
146
  g as MerchantCardSkeleton,
146
- $o as MiniEntityNotFoundError,
147
- rt as MiniError,
148
- et as MiniNetworkError,
147
+ et as MiniEntityNotFoundError,
148
+ ot as MiniError,
149
+ tt as MiniNetworkError,
149
150
  i as MinisContainer,
150
151
  t as NAVIGATION_TYPES,
151
152
  p as ProductCard,
152
153
  c as ProductCardSkeleton,
153
154
  s as ProductLink,
154
- re as Progress,
155
- oe as RadioGroup,
156
- te as RadioGroupItem,
157
- ie as ResizableHandle,
158
- le as ResizablePanel,
159
- pe as ResizablePanelGroup,
160
- se as ScrollArea,
161
- ne as ScrollBar,
162
- xe as Select,
163
- fe as SelectContent,
164
- ce as SelectGroup,
165
- de as SelectItem,
166
- ge as SelectLabel,
167
- Se as SelectScrollDownButton,
168
- De as SelectScrollUpButton,
169
- Ae as SelectSeparator,
170
- Ce as SelectTrigger,
171
- Pe as SelectValue,
172
- he as Separator,
173
- we as Sheet,
174
- ve as SheetClose,
175
- Re as SheetContent,
176
- be as SheetDescription,
177
- Fe as SheetFooter,
178
- ke as SheetHeader,
179
- Be as SheetTitle,
180
- Ee as SheetTrigger,
181
- ye as Skeleton,
182
- b as ThumbhashImage,
183
- Ne as Toaster,
184
- k as Touchable,
185
- D as TransitionContainer,
186
- C as TransitionLink,
187
- y as VideoPlayer,
188
- nr as badgeVariants,
189
- at as extractBrandTheme,
190
- ot as formatError,
191
- it as formatReviewCount,
192
- lt as getFeaturedImages,
193
- pt as normalizeRating,
194
- st as parseUrl,
195
- wo as useAsyncStorage,
196
- ro as useBuyerAttributes,
197
- Mo as useCloseMini,
198
- ho as useCuratedProducts,
199
- Qe as useCurrentUser,
200
- Lo as useDeeplink,
201
- qo as useErrorScreen,
202
- Wo as useErrorToast,
203
- je as useFollowedShops,
204
- Je as useFollowedShopsActions,
205
- Xo as useImagePicker,
206
- Fo as useImageUpload,
207
- Go as useNavigateWithTransition,
208
- Ze as useOrders,
209
- Po as usePopularProducts,
210
- mo as useProduct,
211
- lo as useProductList,
212
- oo as useProductListActions,
213
- ao as useProductLists,
214
- co as useProductMedia,
215
- So as useProductSearch,
216
- xo as useProductVariants,
217
- no as useProducts,
218
- He as useRecentProducts,
219
- Ve as useRecentShops,
220
- Ao as useRecommendedProducts,
221
- _o as useRecommendedShops,
222
- ze as useSavedProducts,
223
- Ye as useSavedProductsActions,
224
- Ro as useSecureStorage,
225
- Ko as useShare,
226
- Oo as useShop,
227
- Uo as useShopCartActions,
228
- Bo as useShopNavigation
155
+ oe as Progress,
156
+ D as QuantitySelector,
157
+ ae as RadioGroup,
158
+ ie as RadioGroupItem,
159
+ pe as ResizableHandle,
160
+ me as ResizablePanel,
161
+ se as ResizablePanelGroup,
162
+ ue as ScrollArea,
163
+ xe as ScrollBar,
164
+ ce as Select,
165
+ de as SelectContent,
166
+ ge as SelectGroup,
167
+ Se as SelectItem,
168
+ De as SelectLabel,
169
+ Ae as SelectScrollDownButton,
170
+ Ce as SelectScrollUpButton,
171
+ Pe as SelectSeparator,
172
+ Te as SelectTrigger,
173
+ he as SelectValue,
174
+ we as Separator,
175
+ Re as Sheet,
176
+ be as SheetClose,
177
+ Fe as SheetContent,
178
+ ke as SheetDescription,
179
+ Be as SheetFooter,
180
+ Ee as SheetHeader,
181
+ Me as SheetTitle,
182
+ Ne as SheetTrigger,
183
+ He as Skeleton,
184
+ k as ThumbhashImage,
185
+ Le as Toaster,
186
+ E as Touchable,
187
+ C as TransitionContainer,
188
+ T as TransitionLink,
189
+ H as VideoPlayer,
190
+ xr as badgeVariants,
191
+ lt as extractBrandTheme,
192
+ at as formatError,
193
+ pt as formatReviewCount,
194
+ mt as getFeaturedImages,
195
+ st as normalizeRating,
196
+ ut as parseUrl,
197
+ Ro as useAsyncStorage,
198
+ oo as useBuyerAttributes,
199
+ yo as useCloseMini,
200
+ wo as useCuratedProducts,
201
+ Ze as useCurrentUser,
202
+ Go as useDeeplink,
203
+ Jo as useErrorScreen,
204
+ jo as useErrorToast,
205
+ qe as useFollowedShops,
206
+ Ke as useFollowedShopsActions,
207
+ $o as useImagePicker,
208
+ Bo as useImageUpload,
209
+ Oo as useNavigateWithTransition,
210
+ ro as useOrders,
211
+ ho as usePopularProducts,
212
+ no as useProduct,
213
+ mo as useProductList,
214
+ ao as useProductListActions,
215
+ lo as useProductLists,
216
+ So as useProductMedia,
217
+ Ao as useProductSearch,
218
+ co as useProductVariants,
219
+ xo as useProducts,
220
+ Ve as useRecentProducts,
221
+ ze as useRecentShops,
222
+ Po as useRecommendedProducts,
223
+ Qo as useRecommendedShops,
224
+ Ye as useSavedProducts,
225
+ We as useSavedProductsActions,
226
+ Fo as useSecureStorage,
227
+ Xo as useShare,
228
+ Uo as useShop,
229
+ _o as useShopCartActions,
230
+ Mo as useShopNavigation
229
231
  };
230
232
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- import { s as r } from "../../../../../../../../_virtual/index6.js";
1
+ import { s as r } from "../../../../../../../../_virtual/index7.js";
2
2
  function s() {
3
3
  return r.useSyncExternalStore(
4
4
  e,
@@ -1,4 +1,4 @@
1
- import { __module as q } from "../../../../../../../../_virtual/index4.js";
1
+ import { __module as q } from "../../../../../../../../_virtual/index5.js";
2
2
  import { __require as F } from "../../../../../global@4.4.0/node_modules/global/window.js";
3
3
  import { __require as N } from "../../../../../@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/extends.js";
4
4
  import { __require as J } from "../../../../../is-function@1.0.2/node_modules/is-function/index.js";
@@ -0,0 +1,13 @@
1
+ import o from "../createLucideIcon.js";
2
+ /**
3
+ * @license lucide-react v0.513.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */
8
+ const e = [["path", { d: "M5 12h14", key: "1ays0h" }]], c = o("minus", e);
9
+ export {
10
+ e as __iconNode,
11
+ c as default
12
+ };
13
+ //# sourceMappingURL=minus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"minus.js","sources":["../../../../../../../../../../node_modules/.pnpm/lucide-react@0.513.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/minus.js"],"sourcesContent":["/**\n * @license lucide-react v0.513.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [[\"path\", { d: \"M5 12h14\", key: \"1ays0h\" }]];\nconst Minus = createLucideIcon(\"minus\", __iconNode);\n\nexport { __iconNode, Minus as default };\n//# sourceMappingURL=minus.js.map\n"],"names":["__iconNode","Minus","createLucideIcon"],"mappings":";AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASK,MAACA,IAAa,CAAC,CAAC,QAAQ,EAAE,GAAG,YAAY,KAAK,UAAU,CAAC,GACxDC,IAAQC,EAAiB,SAASF,CAAU;","x_google_ignoreList":[0]}
@@ -0,0 +1,16 @@
1
+ import e from "../createLucideIcon.js";
2
+ /**
3
+ * @license lucide-react v0.513.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */
8
+ const o = [
9
+ ["path", { d: "M5 12h14", key: "1ays0h" }],
10
+ ["path", { d: "M12 5v14", key: "s699le" }]
11
+ ], s = e("plus", o);
12
+ export {
13
+ o as __iconNode,
14
+ s as default
15
+ };
16
+ //# sourceMappingURL=plus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plus.js","sources":["../../../../../../../../../../node_modules/.pnpm/lucide-react@0.513.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/plus.js"],"sourcesContent":["/**\n * @license lucide-react v0.513.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M5 12h14\", key: \"1ays0h\" }],\n [\"path\", { d: \"M12 5v14\", key: \"s699le\" }]\n];\nconst Plus = createLucideIcon(\"plus\", __iconNode);\n\nexport { __iconNode, Plus as default };\n//# sourceMappingURL=plus.js.map\n"],"names":["__iconNode","Plus","createLucideIcon"],"mappings":";AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASK,MAACA,IAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,GAAG,YAAY,KAAK,SAAQ,CAAE;AAAA,EACzC,CAAC,QAAQ,EAAE,GAAG,YAAY,KAAK,SAAU,CAAA;AAC3C,GACMC,IAAOC,EAAiB,QAAQF,CAAU;","x_google_ignoreList":[0]}
@@ -2,7 +2,7 @@ import L from "../../../../@videojs_vhs-utils@4.1.1/node_modules/@videojs/vhs-ut
2
2
  import T from "../../../../../../../_virtual/window.js";
3
3
  import { forEachMediaGroup as Z } from "../../../../@videojs_vhs-utils@4.1.1/node_modules/@videojs/vhs-utils/es/media-groups.js";
4
4
  import J from "../../../../@videojs_vhs-utils@4.1.1/node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js";
5
- import { l as Q } from "../../../../../../../_virtual/index5.js";
5
+ import { l as Q } from "../../../../../../../_virtual/index6.js";
6
6
  /*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */
7
7
  const w = (e) => !!e && typeof e == "object", E = (...e) => e.reduce((n, t) => (typeof t != "object" || Object.keys(t).forEach((r) => {
8
8
  Array.isArray(n[r]) && Array.isArray(t[r]) ? n[r] = n[r].concat(t[r]) : w(n[r]) && w(t[r]) ? n[r] = E(n[r], t[r]) : n[r] = t[r];
@@ -1,4 +1,4 @@
1
- import { __exports as i } from "../../../../../../_virtual/index7.js";
1
+ import { __exports as i } from "../../../../../../_virtual/index4.js";
2
2
  var c;
3
3
  function d() {
4
4
  if (c) return i;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shopify/shop-minis-react",
3
3
  "license": "SEE LICENSE IN LICENSE.txt",
4
- "version": "0.0.22",
4
+ "version": "0.0.23",
5
5
  "sideEffects": false,
6
6
  "type": "module",
7
7
  "engines": {
@@ -0,0 +1,92 @@
1
+ import {useCallback, useEffect, useState} from 'react'
2
+
3
+ import {Minus, Plus} from 'lucide-react'
4
+
5
+ import {cn} from '../../lib/utils'
6
+ import {IconButton} from '../atoms/icon-button'
7
+
8
+ interface QuantitySelectorProps {
9
+ quantity: number
10
+ onQuantityChange: (quantity: number) => void
11
+ maxQuantity: number
12
+ minQuantity?: number
13
+ disabled?: boolean
14
+ }
15
+
16
+ export const QuantitySelector = ({
17
+ quantity: _quantity,
18
+ onQuantityChange,
19
+ maxQuantity,
20
+ minQuantity = 1,
21
+ disabled = false,
22
+ }: QuantitySelectorProps) => {
23
+ const [quantity, setQuantity] = useState(_quantity)
24
+
25
+ useEffect(() => {
26
+ setQuantity(_quantity)
27
+ }, [_quantity])
28
+
29
+ useEffect(() => {
30
+ onQuantityChange(quantity)
31
+ }, [quantity, onQuantityChange])
32
+
33
+ const incrementDisabled = disabled || quantity >= maxQuantity
34
+ const decrementDisabled = disabled || quantity <= minQuantity
35
+
36
+ const incrementQuantity = useCallback(() => {
37
+ if (incrementDisabled) return
38
+ const newQuantity = quantity + 1 > maxQuantity ? quantity : quantity + 1
39
+ setQuantity(newQuantity)
40
+ }, [incrementDisabled, quantity, maxQuantity])
41
+
42
+ const decrementQuantity = useCallback(() => {
43
+ if (decrementDisabled) return
44
+ const newQuantity = quantity - 1 < minQuantity ? quantity : quantity - 1
45
+ setQuantity(newQuantity)
46
+ }, [decrementDisabled, quantity, minQuantity])
47
+
48
+ return (
49
+ <>
50
+ <div
51
+ data-testid="QuantitySelector"
52
+ className={cn('inline-flex w-auto bg-tertiary rounded-[8px]')}
53
+ >
54
+ <div
55
+ className={cn(
56
+ 'flex h-space-32 items-center self-center overflow-hidden rounded-radius-8 bg-bg-fill-secondary',
57
+ `p-space-8`
58
+ )}
59
+ >
60
+ <IconButton
61
+ Icon={Minus}
62
+ onClick={decrementQuantity}
63
+ buttonStyles="transition bg-transparent"
64
+ filled={false}
65
+ size="sm"
66
+ iconStyles={cn(
67
+ decrementDisabled ? 'text-background' : 'text-foreground',
68
+ 'stroke-3'
69
+ )}
70
+ />
71
+
72
+ <div className={cn('grow', `w-[20px]`)}>
73
+ <span className="flex items-center justify-center w-full h-full font-medium text-[10px]">
74
+ {quantity}
75
+ </span>
76
+ </div>
77
+ <IconButton
78
+ Icon={Plus}
79
+ onClick={incrementQuantity}
80
+ buttonStyles="transition bg-transparent"
81
+ filled={false}
82
+ size="sm"
83
+ iconStyles={cn(
84
+ incrementDisabled ? 'text-background' : 'text-secondary',
85
+ 'stroke-3'
86
+ )}
87
+ />
88
+ </div>
89
+ </div>
90
+ </>
91
+ )
92
+ }
@@ -5,6 +5,7 @@ export * from './commerce/product-link'
5
5
  export * from './commerce/merchant-card'
6
6
  export * from './commerce/product-card-skeleton'
7
7
  export * from './commerce/merchant-card-skeleton'
8
+ export * from './commerce/quantity-selector'
8
9
 
9
10
  export * from './navigation/transition-container'
10
11
  export * from './navigation/transition-link'