@shopify/shop-minis-react 0.0.16 → 0.0.18
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/README.md +14 -10
- package/dist/_virtual/index2.js +3 -2
- package/dist/_virtual/index2.js.map +1 -1
- package/dist/_virtual/index3.js +2 -3
- package/dist/_virtual/index3.js.map +1 -1
- package/dist/components/atoms/button.js +28 -73
- package/dist/components/atoms/button.js.map +1 -1
- package/dist/components/atoms/favorite-button.js +21 -0
- package/dist/components/atoms/favorite-button.js.map +1 -0
- package/dist/components/atoms/icon-button.js +38 -0
- package/dist/components/atoms/icon-button.js.map +1 -0
- package/dist/components/atoms/touchable.js +14 -14
- package/dist/components/atoms/touchable.js.map +1 -1
- package/dist/components/commerce/merchant-card.js +1 -8
- package/dist/components/commerce/merchant-card.js.map +1 -1
- package/dist/components/commerce/product-card.js +79 -109
- package/dist/components/commerce/product-card.js.map +1 -1
- package/dist/components/commerce/product-link.js +36 -55
- package/dist/components/commerce/product-link.js.map +1 -1
- package/dist/components/ui/accordion.js.map +1 -0
- package/dist/components/{atoms → ui}/alert-dialog.js +1 -1
- package/dist/components/ui/alert-dialog.js.map +1 -0
- package/dist/components/ui/alert.js.map +1 -0
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/button.js +68 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/{atoms → ui}/carousel.js +23 -23
- package/dist/components/ui/carousel.js.map +1 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/{atoms → ui}/drawer.js +25 -22
- package/dist/components/ui/drawer.js.map +1 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/label.js.map +1 -0
- package/dist/components/ui/progress.js.map +1 -0
- package/dist/components/ui/radio-group.js.map +1 -0
- package/dist/components/ui/resizable.js.map +1 -0
- package/dist/components/ui/scroll-area.js.map +1 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/sheet.js.map +1 -0
- package/dist/components/ui/sonner.js.map +1 -0
- package/dist/index.js +193 -218
- package/dist/index.js.map +1 -1
- 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
- package/dist/shop-minis-react/node_modules/.pnpm/querystringify@2.2.0/node_modules/querystringify/index.js +1 -1
- package/package.json +6 -9
- package/src/components/atoms/button.tsx +10 -66
- package/src/components/atoms/favorite-button.tsx +22 -0
- package/src/components/atoms/icon-button.tsx +42 -0
- package/src/components/atoms/touchable.tsx +5 -1
- package/src/components/commerce/merchant-card.tsx +1 -12
- package/src/components/commerce/product-card.tsx +4 -32
- package/src/components/commerce/product-link.tsx +9 -29
- package/src/components/index.ts +23 -20
- package/src/components/{atoms → ui}/alert-dialog.tsx +1 -1
- package/src/components/ui/button.tsx +77 -0
- package/src/components/{atoms → ui}/carousel.tsx +11 -11
- package/src/components/{atoms → ui}/drawer.tsx +2 -1
- package/src/index.css +8 -2
- package/src/styles/globals.css +41 -0
- package/src/styles/theme.css +102 -0
- package/dist/components/atoms/accordion.js.map +0 -1
- package/dist/components/atoms/alert-dialog.js.map +0 -1
- package/dist/components/atoms/alert.js.map +0 -1
- package/dist/components/atoms/avatar.js.map +0 -1
- package/dist/components/atoms/badge.js.map +0 -1
- package/dist/components/atoms/card.js.map +0 -1
- package/dist/components/atoms/carousel.js.map +0 -1
- package/dist/components/atoms/checkbox.js.map +0 -1
- package/dist/components/atoms/dialog.js.map +0 -1
- package/dist/components/atoms/drawer.js.map +0 -1
- package/dist/components/atoms/input.js.map +0 -1
- package/dist/components/atoms/label.js.map +0 -1
- package/dist/components/atoms/progress.js.map +0 -1
- package/dist/components/atoms/radio-group.js.map +0 -1
- package/dist/components/atoms/resizable.js.map +0 -1
- package/dist/components/atoms/scroll-area.js.map +0 -1
- package/dist/components/atoms/select.js.map +0 -1
- package/dist/components/atoms/separator.js.map +0 -1
- package/dist/components/atoms/sheet.js.map +0 -1
- package/dist/components/atoms/sonner.js.map +0 -1
- package/src/base.css +0 -273
- package/tailwind.config.js +0 -3
- /package/dist/components/{atoms → ui}/accordion.js +0 -0
- /package/dist/components/{atoms → ui}/alert.js +0 -0
- /package/dist/components/{atoms → ui}/avatar.js +0 -0
- /package/dist/components/{atoms → ui}/badge.js +0 -0
- /package/dist/components/{atoms → ui}/card.js +0 -0
- /package/dist/components/{atoms → ui}/checkbox.js +0 -0
- /package/dist/components/{atoms → ui}/dialog.js +0 -0
- /package/dist/components/{atoms → ui}/input.js +0 -0
- /package/dist/components/{atoms → ui}/label.js +0 -0
- /package/dist/components/{atoms → ui}/progress.js +0 -0
- /package/dist/components/{atoms → ui}/radio-group.js +0 -0
- /package/dist/components/{atoms → ui}/resizable.js +0 -0
- /package/dist/components/{atoms → ui}/scroll-area.js +0 -0
- /package/dist/components/{atoms → ui}/select.js +0 -0
- /package/dist/components/{atoms → ui}/separator.js +0 -0
- /package/dist/components/{atoms → ui}/sheet.js +0 -0
- /package/dist/components/{atoms → ui}/sonner.js +0 -0
- /package/src/components/{atoms → ui}/accordion.tsx +0 -0
- /package/src/components/{atoms → ui}/alert.tsx +0 -0
- /package/src/components/{atoms → ui}/avatar.tsx +0 -0
- /package/src/components/{atoms → ui}/badge.tsx +0 -0
- /package/src/components/{atoms → ui}/card.tsx +0 -0
- /package/src/components/{atoms → ui}/checkbox.tsx +0 -0
- /package/src/components/{atoms → ui}/dialog.tsx +0 -0
- /package/src/components/{atoms → ui}/input.tsx +0 -0
- /package/src/components/{atoms → ui}/label.tsx +0 -0
- /package/src/components/{atoms → ui}/progress.tsx +0 -0
- /package/src/components/{atoms → ui}/radio-group.tsx +0 -0
- /package/src/components/{atoms → ui}/resizable.tsx +0 -0
- /package/src/components/{atoms → ui}/scroll-area.tsx +0 -0
- /package/src/components/{atoms → ui}/select.tsx +0 -0
- /package/src/components/{atoms → ui}/separator.tsx +0 -0
- /package/src/components/{atoms → ui}/sheet.tsx +0 -0
- /package/src/components/{atoms → ui}/sonner.tsx +0 -0
package/dist/index.js
CHANGED
|
@@ -1,224 +1,199 @@
|
|
|
1
1
|
import { MinisContainer as o } from "./components/MinisContainer.js";
|
|
2
|
-
import { ProductCard as a
|
|
3
|
-
import { ProductLink as
|
|
4
|
-
import { MerchantCard as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
2
|
+
import { ProductCard as a } from "./components/commerce/product-card.js";
|
|
3
|
+
import { ProductLink as i } from "./components/commerce/product-link.js";
|
|
4
|
+
import { MerchantCard as s, MerchantCardPrimitive as m } from "./components/commerce/merchant-card.js";
|
|
5
|
+
import { Button as n } from "./components/atoms/button.js";
|
|
6
|
+
import { FavoriteButton as x } from "./components/atoms/favorite-button.js";
|
|
7
|
+
import { IconButton as d } from "./components/atoms/icon-button.js";
|
|
8
|
+
import { Touchable as S } from "./components/atoms/touchable.js";
|
|
9
|
+
import { Accordion as C, AccordionContent as A, AccordionItem as P, AccordionTrigger as h } from "./components/ui/accordion.js";
|
|
10
|
+
import { Alert as w, AlertDescription as v, AlertTitle as F } from "./components/ui/alert.js";
|
|
11
|
+
import { AlertDialog as I, AlertDialogAction as R, AlertDialogCancel as M, AlertDialogContent as B, AlertDialogDescription as E, AlertDialogFooter as k, AlertDialogHeader as y, AlertDialogOverlay as H, AlertDialogPortal as L, AlertDialogTitle as G, AlertDialogTrigger as N } from "./components/ui/alert-dialog.js";
|
|
12
|
+
import { Avatar as U, AvatarFallback as z, AvatarImage as V } from "./components/ui/avatar.js";
|
|
13
|
+
import { Card as q, CardAction as J, CardContent as K, CardDescription as Q, CardFooter as W, CardHeader as X, CardTitle as Y } from "./components/ui/card.js";
|
|
14
|
+
import { Carousel as _, CarouselContent as $, CarouselItem as rr, CarouselNext as er, CarouselPrevious as or } from "./components/ui/carousel.js";
|
|
15
|
+
import { Checkbox as ar } from "./components/ui/checkbox.js";
|
|
16
|
+
import { Dialog as ir, DialogClose as pr, DialogContent as sr, DialogDescription as mr, DialogFooter as ur, DialogHeader as nr, DialogOverlay as cr, DialogPortal as xr, DialogTitle as fr, DialogTrigger as dr } from "./components/ui/dialog.js";
|
|
17
|
+
import { Drawer as Sr, DrawerClose as Dr, DrawerContent as Cr, DrawerDescription as Ar, DrawerFooter as Pr, DrawerHeader as hr, DrawerOverlay as Tr, DrawerPortal as wr, DrawerTitle as vr, DrawerTrigger as Fr } from "./components/ui/drawer.js";
|
|
18
|
+
import { Input as Ir } from "./components/ui/input.js";
|
|
19
|
+
import { Label as Mr } from "./components/ui/label.js";
|
|
20
|
+
import { Progress as Er } from "./components/ui/progress.js";
|
|
21
|
+
import { RadioGroup as yr, RadioGroupItem as Hr } from "./components/ui/radio-group.js";
|
|
22
|
+
import { ResizableHandle as Gr, ResizablePanel as Nr, ResizablePanelGroup as Or } from "./components/ui/resizable.js";
|
|
23
|
+
import { ScrollArea as zr, ScrollBar as Vr } from "./components/ui/scroll-area.js";
|
|
24
|
+
import { Select as qr, SelectContent as Jr, SelectGroup as Kr, SelectItem as Qr, SelectLabel as Wr, SelectScrollDownButton as Xr, SelectScrollUpButton as Yr, SelectSeparator as Zr, SelectTrigger as _r, SelectValue as $r } from "./components/ui/select.js";
|
|
25
|
+
import { Separator as ee } from "./components/ui/separator.js";
|
|
26
|
+
import { Sheet as te, SheetClose as ae, SheetContent as le, SheetDescription as ie, SheetFooter as pe, SheetHeader as se, SheetTitle as me, SheetTrigger as ue } from "./components/ui/sheet.js";
|
|
27
|
+
import { Toaster as ce } from "./components/ui/sonner.js";
|
|
28
|
+
import { useRecentProducts as fe } from "./hooks/user/useRecentProducts.js";
|
|
29
|
+
import { useRecentShops as ge } from "./hooks/user/useRecentShops.js";
|
|
30
|
+
import { useSavedProducts as De } from "./hooks/user/useSavedProducts.js";
|
|
31
|
+
import { useSavedProductsActions as Ae } from "./hooks/user/useSavedProductsActions.js";
|
|
32
|
+
import { useFollowedShops as he } from "./hooks/user/useFollowedShops.js";
|
|
33
|
+
import { useFollowedShopsActions as we } from "./hooks/user/useFollowedShopsActions.js";
|
|
34
|
+
import { useCurrentUser as Fe } from "./hooks/user/useCurrentUser.js";
|
|
35
|
+
import { useOrders as Ie } from "./hooks/user/useOrders.js";
|
|
36
|
+
import { useBuyerAttributes as Me } from "./hooks/user/useBuyerAttributes.js";
|
|
37
|
+
import { useProductListActions as Ee } from "./hooks/product/useProductListActions.js";
|
|
38
|
+
import { useProductLists as ye } from "./hooks/product/useProductLists.js";
|
|
39
|
+
import { useProductList as Le } from "./hooks/product/useProductList.js";
|
|
40
|
+
import { useProduct as Ne } from "./hooks/product/useProduct.js";
|
|
41
|
+
import { useProducts as Ue } from "./hooks/product/useProducts.js";
|
|
42
|
+
import { useProductVariants as Ve } from "./hooks/product/useProductVariants.js";
|
|
43
|
+
import { useProductMedia as qe } from "./hooks/product/useProductMedia.js";
|
|
44
|
+
import { useProductSearch as Ke } from "./hooks/product/useProductSearch.js";
|
|
45
|
+
import { useRecommendedProducts as We } from "./hooks/product/useRecommendedProducts.js";
|
|
46
|
+
import { usePopularProducts as Ye } from "./hooks/product/usePopularProducts.js";
|
|
47
|
+
import { useCuratedProducts as _e } from "./hooks/product/useCuratedProducts.js";
|
|
48
|
+
import { useAsyncStorage as ro } from "./hooks/storage/useAsyncStorage.js";
|
|
49
|
+
import { useSecureStorage as oo } from "./hooks/storage/useSecureStorage.js";
|
|
50
|
+
import { useImageUpload as ao } from "./hooks/storage/useImageUpload.js";
|
|
51
|
+
import { useShopNavigation as io } from "./hooks/navigation/useShopNavigation.js";
|
|
52
|
+
import { useCloseMini as so } from "./hooks/navigation/useCloseMini.js";
|
|
53
|
+
import { useDeeplink as uo } from "./hooks/navigation/useDeeplink.js";
|
|
54
|
+
import { useShop as co } from "./hooks/shop/useShop.js";
|
|
55
|
+
import { useShopCartActions as fo } from "./hooks/shop/useShopCartActions.js";
|
|
56
|
+
import { useRecommendedShops as So } from "./hooks/shop/useRecommendedShops.js";
|
|
57
|
+
import { useErrorToast as Co } from "./hooks/util/useErrorToast.js";
|
|
58
|
+
import { useErrorScreen as Po } from "./hooks/util/useErrorScreen.js";
|
|
59
|
+
import { useShare as To } from "./hooks/util/useShare.js";
|
|
60
|
+
import { useImagePicker as vo } from "./hooks/util/useImagePicker.js";
|
|
61
|
+
import { MiniEntityNotFoundError as bo, MiniError as Io, MiniNetworkError as Ro, formatError as Mo } from "./utils/errors.js";
|
|
62
|
+
import { parseUrl as Eo } from "./utils/parseUrl.js";
|
|
63
|
+
import { Consent as yo, ConsentStatus as Ho } from "./shop-minis-platform/src/types/permissions.js";
|
|
62
64
|
export {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
E as MerchantCardPrimitive,
|
|
130
|
-
y as MerchantCardRating,
|
|
131
|
-
H as MerchantCardRoot,
|
|
132
|
-
_o as MiniEntityNotFoundError,
|
|
133
|
-
$o as MiniError,
|
|
134
|
-
rt as MiniNetworkError,
|
|
65
|
+
C as Accordion,
|
|
66
|
+
A as AccordionContent,
|
|
67
|
+
P as AccordionItem,
|
|
68
|
+
h as AccordionTrigger,
|
|
69
|
+
w as Alert,
|
|
70
|
+
v as AlertDescription,
|
|
71
|
+
I as AlertDialog,
|
|
72
|
+
R as AlertDialogAction,
|
|
73
|
+
M as AlertDialogCancel,
|
|
74
|
+
B as AlertDialogContent,
|
|
75
|
+
E as AlertDialogDescription,
|
|
76
|
+
k as AlertDialogFooter,
|
|
77
|
+
y as AlertDialogHeader,
|
|
78
|
+
H as AlertDialogOverlay,
|
|
79
|
+
L as AlertDialogPortal,
|
|
80
|
+
G as AlertDialogTitle,
|
|
81
|
+
N as AlertDialogTrigger,
|
|
82
|
+
F as AlertTitle,
|
|
83
|
+
U as Avatar,
|
|
84
|
+
z as AvatarFallback,
|
|
85
|
+
V as AvatarImage,
|
|
86
|
+
n as Button,
|
|
87
|
+
q as Card,
|
|
88
|
+
J as CardAction,
|
|
89
|
+
K as CardContent,
|
|
90
|
+
Q as CardDescription,
|
|
91
|
+
W as CardFooter,
|
|
92
|
+
X as CardHeader,
|
|
93
|
+
Y as CardTitle,
|
|
94
|
+
_ as Carousel,
|
|
95
|
+
$ as CarouselContent,
|
|
96
|
+
rr as CarouselItem,
|
|
97
|
+
er as CarouselNext,
|
|
98
|
+
or as CarouselPrevious,
|
|
99
|
+
ar as Checkbox,
|
|
100
|
+
yo as Consent,
|
|
101
|
+
Ho as ConsentStatus,
|
|
102
|
+
ir as Dialog,
|
|
103
|
+
pr as DialogClose,
|
|
104
|
+
sr as DialogContent,
|
|
105
|
+
mr as DialogDescription,
|
|
106
|
+
ur as DialogFooter,
|
|
107
|
+
nr as DialogHeader,
|
|
108
|
+
cr as DialogOverlay,
|
|
109
|
+
xr as DialogPortal,
|
|
110
|
+
fr as DialogTitle,
|
|
111
|
+
dr as DialogTrigger,
|
|
112
|
+
Sr as Drawer,
|
|
113
|
+
Dr as DrawerClose,
|
|
114
|
+
Cr as DrawerContent,
|
|
115
|
+
Ar as DrawerDescription,
|
|
116
|
+
Pr as DrawerFooter,
|
|
117
|
+
hr as DrawerHeader,
|
|
118
|
+
Tr as DrawerOverlay,
|
|
119
|
+
wr as DrawerPortal,
|
|
120
|
+
vr as DrawerTitle,
|
|
121
|
+
Fr as DrawerTrigger,
|
|
122
|
+
x as FavoriteButton,
|
|
123
|
+
d as IconButton,
|
|
124
|
+
Ir as Input,
|
|
125
|
+
Mr as Label,
|
|
126
|
+
s as MerchantCard,
|
|
127
|
+
m as MerchantCardPrimitive,
|
|
128
|
+
bo as MiniEntityNotFoundError,
|
|
129
|
+
Io as MiniError,
|
|
130
|
+
Ro as MiniNetworkError,
|
|
135
131
|
o as MinisContainer,
|
|
136
132
|
a as ProductCard,
|
|
137
|
-
i as
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
$e as useOrders,
|
|
203
|
-
ho as usePopularProducts,
|
|
204
|
-
uo as useProduct,
|
|
205
|
-
co as useProductList,
|
|
206
|
-
to as useProductListActions,
|
|
207
|
-
io as useProductLists,
|
|
208
|
-
Co as useProductMedia,
|
|
209
|
-
Po as useProductSearch,
|
|
210
|
-
fo as useProductVariants,
|
|
211
|
-
po as useProducts,
|
|
212
|
-
Ge as useRecentProducts,
|
|
213
|
-
Ve as useRecentShops,
|
|
214
|
-
So as useRecommendedProducts,
|
|
215
|
-
zo as useRecommendedShops,
|
|
216
|
-
je as useSavedProducts,
|
|
217
|
-
Je as useSavedProductsActions,
|
|
218
|
-
wo as useSecureStorage,
|
|
219
|
-
Wo as useShare,
|
|
220
|
-
No as useShop,
|
|
221
|
-
Uo as useShopCartActions,
|
|
222
|
-
Fo as useShopNavigation
|
|
133
|
+
i as ProductLink,
|
|
134
|
+
Er as Progress,
|
|
135
|
+
yr as RadioGroup,
|
|
136
|
+
Hr as RadioGroupItem,
|
|
137
|
+
Gr as ResizableHandle,
|
|
138
|
+
Nr as ResizablePanel,
|
|
139
|
+
Or as ResizablePanelGroup,
|
|
140
|
+
zr as ScrollArea,
|
|
141
|
+
Vr as ScrollBar,
|
|
142
|
+
qr as Select,
|
|
143
|
+
Jr as SelectContent,
|
|
144
|
+
Kr as SelectGroup,
|
|
145
|
+
Qr as SelectItem,
|
|
146
|
+
Wr as SelectLabel,
|
|
147
|
+
Xr as SelectScrollDownButton,
|
|
148
|
+
Yr as SelectScrollUpButton,
|
|
149
|
+
Zr as SelectSeparator,
|
|
150
|
+
_r as SelectTrigger,
|
|
151
|
+
$r as SelectValue,
|
|
152
|
+
ee as Separator,
|
|
153
|
+
te as Sheet,
|
|
154
|
+
ae as SheetClose,
|
|
155
|
+
le as SheetContent,
|
|
156
|
+
ie as SheetDescription,
|
|
157
|
+
pe as SheetFooter,
|
|
158
|
+
se as SheetHeader,
|
|
159
|
+
me as SheetTitle,
|
|
160
|
+
ue as SheetTrigger,
|
|
161
|
+
ce as Toaster,
|
|
162
|
+
S as Touchable,
|
|
163
|
+
Mo as formatError,
|
|
164
|
+
Eo as parseUrl,
|
|
165
|
+
ro as useAsyncStorage,
|
|
166
|
+
Me as useBuyerAttributes,
|
|
167
|
+
so as useCloseMini,
|
|
168
|
+
_e as useCuratedProducts,
|
|
169
|
+
Fe as useCurrentUser,
|
|
170
|
+
uo as useDeeplink,
|
|
171
|
+
Po as useErrorScreen,
|
|
172
|
+
Co as useErrorToast,
|
|
173
|
+
he as useFollowedShops,
|
|
174
|
+
we as useFollowedShopsActions,
|
|
175
|
+
vo as useImagePicker,
|
|
176
|
+
ao as useImageUpload,
|
|
177
|
+
Ie as useOrders,
|
|
178
|
+
Ye as usePopularProducts,
|
|
179
|
+
Ne as useProduct,
|
|
180
|
+
Le as useProductList,
|
|
181
|
+
Ee as useProductListActions,
|
|
182
|
+
ye as useProductLists,
|
|
183
|
+
qe as useProductMedia,
|
|
184
|
+
Ke as useProductSearch,
|
|
185
|
+
Ve as useProductVariants,
|
|
186
|
+
Ue as useProducts,
|
|
187
|
+
fe as useRecentProducts,
|
|
188
|
+
ge as useRecentShops,
|
|
189
|
+
We as useRecommendedProducts,
|
|
190
|
+
So as useRecommendedShops,
|
|
191
|
+
De as useSavedProducts,
|
|
192
|
+
Ae as useSavedProductsActions,
|
|
193
|
+
oo as useSecureStorage,
|
|
194
|
+
To as useShare,
|
|
195
|
+
co as useShop,
|
|
196
|
+
fo as useShopCartActions,
|
|
197
|
+
io as useShopNavigation
|
|
223
198
|
};
|
|
224
199
|
//# 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
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.
|
|
4
|
+
"version": "0.0.18",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
"files": [
|
|
19
19
|
"src/**/*.{ts,tsx,css}",
|
|
20
20
|
"dist/**/*",
|
|
21
|
-
"tailwind.config.js",
|
|
22
21
|
"README.md",
|
|
23
22
|
"LICENSE.txt"
|
|
24
23
|
],
|
|
@@ -28,10 +27,8 @@
|
|
|
28
27
|
"import": "./src/index.ts",
|
|
29
28
|
"types": "./src/index.ts"
|
|
30
29
|
},
|
|
31
|
-
"./mocks": "./src/mocks.ts",
|
|
32
30
|
"./styles": "./src/index.css",
|
|
33
|
-
"./
|
|
34
|
-
"./tailwind.config": "./tailwind.config.js",
|
|
31
|
+
"./mocks": "./src/mocks.ts",
|
|
35
32
|
"./src/*": "./src/*"
|
|
36
33
|
},
|
|
37
34
|
"peerDependencies": {
|
|
@@ -41,13 +38,14 @@
|
|
|
41
38
|
"typescript": ">=5.0.0"
|
|
42
39
|
},
|
|
43
40
|
"dependencies": {
|
|
41
|
+
"@shopify/shop-minis-platform": "0.0.3",
|
|
44
42
|
"@tailwindcss/vite": "4.1.8",
|
|
45
43
|
"@types/url-parse": "1.4.9",
|
|
46
44
|
"@vitejs/plugin-react": "4.5.1",
|
|
47
|
-
"@shopify/shop-minis-platform": "0.0.3",
|
|
48
45
|
"class-variance-authority": "0.7.1",
|
|
49
46
|
"clsx": "2.1.1",
|
|
50
47
|
"embla-carousel-react": "8.6.0",
|
|
48
|
+
"lodash": "4.17.21",
|
|
51
49
|
"lucide-react": "0.513.0",
|
|
52
50
|
"motion": "12.17.3",
|
|
53
51
|
"next-themes": "0.4.6",
|
|
@@ -58,13 +56,12 @@
|
|
|
58
56
|
"tailwindcss": "4.1.8",
|
|
59
57
|
"tw-animate-css": "1.3.4",
|
|
60
58
|
"url-parse": "1.5.10",
|
|
61
|
-
"vaul": "1.1.2"
|
|
62
|
-
"lodash": "4.17.21"
|
|
59
|
+
"vaul": "1.1.2"
|
|
63
60
|
},
|
|
64
61
|
"devDependencies": {
|
|
65
62
|
"@shopify/generate-docs": "^0.16.6",
|
|
66
63
|
"@types/node": "^20.12.1",
|
|
67
|
-
"@types/react": "^19.1.
|
|
64
|
+
"@types/react": "^19.1.6",
|
|
68
65
|
"@types/react-dom": "^19.1.2",
|
|
69
66
|
"react": "^19.1.0",
|
|
70
67
|
"react-dom": "^19.1.0",
|
|
@@ -1,71 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react'
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {Slot as SlotPrimitive} from 'radix-ui'
|
|
3
|
+
import {VariantProps} from 'class-variance-authority'
|
|
5
4
|
|
|
6
5
|
import {cn} from '../../lib/utils'
|
|
6
|
+
import {BaseButton, buttonVariants} from '../ui/button'
|
|
7
7
|
|
|
8
8
|
import {Touchable} from './touchable'
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
"flex w-full items-center justify-center gap-3 whitespace-nowrap rounded-xl text-base font-semibold disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-5 shrink-0 [&_svg]:shrink-0",
|
|
12
|
-
{
|
|
13
|
-
variants: {
|
|
14
|
-
variant: {
|
|
15
|
-
primary:
|
|
16
|
-
'bg-primary text-primary-foreground shadow-xs hover:bg-primary/90',
|
|
17
|
-
secondary: 'bg-slate-900 text-white shadow-xs hover:bg-slate-800',
|
|
18
|
-
tertiary:
|
|
19
|
-
'bg-slate-100 text-slate-900 shadow-xs hover:bg-slate-200 dark:bg-slate-800 dark:text-slate-100 dark:hover:bg-slate-700',
|
|
20
|
-
blurred:
|
|
21
|
-
'bg-black/20 text-white shadow-xs hover:bg-black/30 backdrop-blur-md border border-white/20',
|
|
22
|
-
text: 'bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground',
|
|
23
|
-
borderless: 'bg-transparent text-primary hover:text-primary/80',
|
|
24
|
-
borderlessUnbranded:
|
|
25
|
-
'bg-transparent text-foreground hover:text-foreground/80',
|
|
26
|
-
outlined:
|
|
27
|
-
'border border-border bg-background text-foreground shadow-xs hover:bg-accent hover:text-accent-foreground',
|
|
28
|
-
dangerous:
|
|
29
|
-
'bg-destructive text-white shadow-xs hover:bg-destructive/90',
|
|
30
|
-
'outlined-dangerous':
|
|
31
|
-
'border border-destructive bg-transparent text-destructive shadow-xs hover:bg-destructive/10',
|
|
32
|
-
},
|
|
33
|
-
size: {
|
|
34
|
-
default: 'h-9 px-4 py-2 has-[>svg]:px-3',
|
|
35
|
-
sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',
|
|
36
|
-
lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',
|
|
37
|
-
icon: 'size-9',
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
defaultVariants: {
|
|
41
|
-
variant: 'primary',
|
|
42
|
-
size: 'default',
|
|
43
|
-
},
|
|
44
|
-
}
|
|
45
|
-
)
|
|
46
|
-
|
|
47
|
-
function BaseButton({
|
|
48
|
-
className,
|
|
49
|
-
variant,
|
|
50
|
-
size,
|
|
51
|
-
asChild = false,
|
|
52
|
-
...props
|
|
53
|
-
}: React.ComponentProps<'button'> &
|
|
54
|
-
VariantProps<typeof buttonVariants> & {
|
|
55
|
-
asChild?: boolean
|
|
56
|
-
}) {
|
|
57
|
-
const Comp = asChild ? SlotPrimitive.Slot : 'button'
|
|
58
|
-
|
|
59
|
-
return (
|
|
60
|
-
<Comp
|
|
61
|
-
data-slot="button"
|
|
62
|
-
className={cn(buttonVariants({variant, size, className}))}
|
|
63
|
-
{...props}
|
|
64
|
-
/>
|
|
65
|
-
)
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function Button({
|
|
10
|
+
export function Button({
|
|
69
11
|
className,
|
|
70
12
|
variant,
|
|
71
13
|
size,
|
|
@@ -81,14 +23,18 @@ function Button({
|
|
|
81
23
|
[onClick]
|
|
82
24
|
)
|
|
83
25
|
|
|
26
|
+
const wrapperClassName = cn(
|
|
27
|
+
variant === 'icon' ? 'flex w-auto' : 'flex w-full'
|
|
28
|
+
)
|
|
29
|
+
|
|
84
30
|
return (
|
|
85
31
|
<Touchable
|
|
86
32
|
onClick={handleClick}
|
|
87
33
|
stopPropagation={stopPropagation}
|
|
88
|
-
className={
|
|
34
|
+
className={wrapperClassName}
|
|
89
35
|
>
|
|
90
36
|
<BaseButton
|
|
91
|
-
className={className}
|
|
37
|
+
className={cn(className, wrapperClassName)}
|
|
92
38
|
variant={variant}
|
|
93
39
|
size={size}
|
|
94
40
|
{...props}
|
|
@@ -96,5 +42,3 @@ function Button({
|
|
|
96
42
|
</Touchable>
|
|
97
43
|
)
|
|
98
44
|
}
|
|
99
|
-
|
|
100
|
-
export {Button, buttonVariants}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {Heart} from 'lucide-react'
|
|
2
|
+
|
|
3
|
+
import {IconButton} from './icon-button'
|
|
4
|
+
|
|
5
|
+
export function FavoriteButton({
|
|
6
|
+
onClick,
|
|
7
|
+
filled = false,
|
|
8
|
+
}: {
|
|
9
|
+
onClick?: () => void
|
|
10
|
+
filled?: boolean
|
|
11
|
+
}) {
|
|
12
|
+
return (
|
|
13
|
+
<IconButton
|
|
14
|
+
Icon={Heart}
|
|
15
|
+
filled={filled}
|
|
16
|
+
onClick={onClick}
|
|
17
|
+
buttonStyles={
|
|
18
|
+
filled ? 'bg-primary' : 'bg-button-overlay/30 backdrop-blur-sm'
|
|
19
|
+
}
|
|
20
|
+
/>
|
|
21
|
+
)
|
|
22
|
+
}
|