@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
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import {LucideIcon} from 'lucide-react'
|
|
2
|
+
|
|
3
|
+
import {cn} from '../../lib/utils'
|
|
4
|
+
|
|
5
|
+
import {Button} from './button'
|
|
6
|
+
|
|
7
|
+
export function IconButton({
|
|
8
|
+
onClick,
|
|
9
|
+
filled = false,
|
|
10
|
+
size = 'default',
|
|
11
|
+
Icon,
|
|
12
|
+
buttonStyles,
|
|
13
|
+
iconStyles,
|
|
14
|
+
}: {
|
|
15
|
+
onClick?: () => void
|
|
16
|
+
filled?: boolean
|
|
17
|
+
size?: 'default' | 'sm' | 'lg'
|
|
18
|
+
Icon: LucideIcon
|
|
19
|
+
buttonStyles?: string
|
|
20
|
+
iconStyles?: string
|
|
21
|
+
}) {
|
|
22
|
+
const sizeMap = {
|
|
23
|
+
sm: 'size-3',
|
|
24
|
+
default: 'size-4',
|
|
25
|
+
lg: 'size-6',
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<Button
|
|
30
|
+
onClick={onClick}
|
|
31
|
+
variant="icon"
|
|
32
|
+
size={size}
|
|
33
|
+
className={cn('bg-primary', buttonStyles)}
|
|
34
|
+
stopPropagation
|
|
35
|
+
>
|
|
36
|
+
<Icon
|
|
37
|
+
fill={filled ? 'currentColor' : 'none'}
|
|
38
|
+
className={cn('text-primary-foreground', sizeMap[size], iconStyles)}
|
|
39
|
+
/>
|
|
40
|
+
</Button>
|
|
41
|
+
)
|
|
42
|
+
}
|
|
@@ -14,6 +14,10 @@ export const Touchable = ({
|
|
|
14
14
|
const ref = React.useRef<HTMLDivElement>(null)
|
|
15
15
|
const controls = useAnimationControls()
|
|
16
16
|
|
|
17
|
+
// Filter out props that shouldn't be passed to motion.div
|
|
18
|
+
// Any other custom props that get added to the component interface should be filtered here
|
|
19
|
+
const {ref: _, ...motionProps} = props
|
|
20
|
+
|
|
17
21
|
const handleClick = React.useCallback(
|
|
18
22
|
(event: React.MouseEvent<HTMLDivElement>) => {
|
|
19
23
|
if (stopPropagation) event.stopPropagation()
|
|
@@ -75,7 +79,7 @@ export const Touchable = ({
|
|
|
75
79
|
style={{
|
|
76
80
|
touchAction: stopPropagation ? 'manipulation' : undefined,
|
|
77
81
|
}}
|
|
78
|
-
{...
|
|
82
|
+
{...motionProps}
|
|
79
83
|
>
|
|
80
84
|
{children}
|
|
81
85
|
</motion.div>
|
|
@@ -250,15 +250,4 @@ export const MerchantCardPrimitive = Object.assign(MerchantCardRoot, {
|
|
|
250
250
|
Rating: MerchantCardRating,
|
|
251
251
|
})
|
|
252
252
|
|
|
253
|
-
export {
|
|
254
|
-
// Composed component
|
|
255
|
-
MerchantCard,
|
|
256
|
-
// Primitive components for custom composition
|
|
257
|
-
MerchantCardRoot,
|
|
258
|
-
MerchantCardImageContainer,
|
|
259
|
-
MerchantCardImage,
|
|
260
|
-
MerchantCardLogo,
|
|
261
|
-
MerchantCardInfo,
|
|
262
|
-
MerchantCardName,
|
|
263
|
-
MerchantCardRating,
|
|
264
|
-
}
|
|
253
|
+
export {MerchantCard}
|
|
@@ -9,9 +9,9 @@ import {useShopNavigation} from '../../hooks/navigation/useShopNavigation'
|
|
|
9
9
|
import {useSavedProductsActions} from '../../hooks/user/useSavedProductsActions'
|
|
10
10
|
import {formatMoney} from '../../lib/formatMoney'
|
|
11
11
|
import {cn} from '../../lib/utils'
|
|
12
|
-
import {
|
|
13
|
-
import {Button} from '../atoms/button'
|
|
12
|
+
import {FavoriteButton} from '../atoms/favorite-button'
|
|
14
13
|
import {Touchable} from '../atoms/touchable'
|
|
14
|
+
import {Badge} from '../ui/badge'
|
|
15
15
|
|
|
16
16
|
const productCardVariants = cva(
|
|
17
17
|
'relative w-full overflow-hidden rounded-xl border border-gray-200',
|
|
@@ -167,21 +167,7 @@ function ProductCardFavoriteButton({
|
|
|
167
167
|
}) {
|
|
168
168
|
return (
|
|
169
169
|
<div className={cn('absolute bottom-3 right-3 z-10', className)} {...props}>
|
|
170
|
-
<
|
|
171
|
-
onClick={onPress}
|
|
172
|
-
variant="secondary"
|
|
173
|
-
size="icon"
|
|
174
|
-
className={cn(
|
|
175
|
-
'h-8 w-8 rounded-full border-0 shadow-sm',
|
|
176
|
-
filled ? 'bg-primary' : 'bg-grayscale-l6/60 backdrop-blur-sm'
|
|
177
|
-
)}
|
|
178
|
-
stopPropagation
|
|
179
|
-
>
|
|
180
|
-
<Heart
|
|
181
|
-
fill={filled ? 'currentColor' : 'none'}
|
|
182
|
-
className="h-4 w-4 text-white"
|
|
183
|
-
/>
|
|
184
|
-
</Button>
|
|
170
|
+
<FavoriteButton onClick={onPress} filled={filled} />
|
|
185
171
|
</div>
|
|
186
172
|
)
|
|
187
173
|
}
|
|
@@ -416,18 +402,4 @@ function ProductCard({
|
|
|
416
402
|
)
|
|
417
403
|
}
|
|
418
404
|
|
|
419
|
-
export {
|
|
420
|
-
// Composed component
|
|
421
|
-
ProductCard,
|
|
422
|
-
// Primitive components for custom composition
|
|
423
|
-
ProductCardRoot,
|
|
424
|
-
ProductCardImageContainer,
|
|
425
|
-
ProductCardImage,
|
|
426
|
-
ProductCardBadge,
|
|
427
|
-
ProductCardFavoriteButton,
|
|
428
|
-
ProductCardInfo,
|
|
429
|
-
ProductCardTitle,
|
|
430
|
-
ProductCardPrice,
|
|
431
|
-
ProductCardCurrentPrice,
|
|
432
|
-
ProductCardOriginalPrice,
|
|
433
|
-
}
|
|
405
|
+
export {ProductCard}
|
|
@@ -2,16 +2,16 @@ import * as React from 'react'
|
|
|
2
2
|
|
|
3
3
|
import {type Product} from '@shopify/shop-minis-platform'
|
|
4
4
|
import {cva, type VariantProps} from 'class-variance-authority'
|
|
5
|
-
import {
|
|
5
|
+
import {Star} from 'lucide-react'
|
|
6
6
|
import {Slot as SlotPrimitive} from 'radix-ui'
|
|
7
7
|
|
|
8
8
|
import {useShopNavigation} from '../../hooks/navigation/useShopNavigation'
|
|
9
9
|
import {useSavedProductsActions} from '../../hooks/user/useSavedProductsActions'
|
|
10
10
|
import {formatMoney} from '../../lib/formatMoney'
|
|
11
11
|
import {cn} from '../../lib/utils'
|
|
12
|
-
import {
|
|
13
|
-
import {Card, CardContent, CardAction} from '../atoms/card'
|
|
12
|
+
import {FavoriteButton} from '../atoms/favorite-button'
|
|
14
13
|
import {Touchable} from '../atoms/touchable'
|
|
14
|
+
import {Card, CardContent, CardAction} from '../ui/card'
|
|
15
15
|
|
|
16
16
|
const productLinkVariants = cva('', {
|
|
17
17
|
variants: {
|
|
@@ -193,11 +193,11 @@ function ProductLinkRating({className, ...props}: React.ComponentProps<'div'>) {
|
|
|
193
193
|
|
|
194
194
|
function ProductLinkActions({
|
|
195
195
|
className,
|
|
196
|
-
|
|
196
|
+
onPress,
|
|
197
197
|
filled = false,
|
|
198
198
|
...props
|
|
199
199
|
}: React.ComponentProps<typeof CardAction> & {
|
|
200
|
-
|
|
200
|
+
onPress?: () => void
|
|
201
201
|
filled?: boolean
|
|
202
202
|
}) {
|
|
203
203
|
return (
|
|
@@ -207,20 +207,14 @@ function ProductLinkActions({
|
|
|
207
207
|
>
|
|
208
208
|
<Touchable
|
|
209
209
|
stopPropagation
|
|
210
|
-
onClick={
|
|
210
|
+
onClick={onPress}
|
|
211
211
|
whileTap={{opacity: 0.7, scale: 0.95}}
|
|
212
212
|
transition={{
|
|
213
213
|
opacity: {type: 'tween', duration: 0.08, ease: 'easeInOut'},
|
|
214
214
|
scale: {type: 'tween', duration: 0.08, ease: 'easeInOut'},
|
|
215
215
|
}}
|
|
216
216
|
>
|
|
217
|
-
<
|
|
218
|
-
variant="borderless"
|
|
219
|
-
size="icon"
|
|
220
|
-
className="h-auto w-auto p-0 hover:bg-transparent"
|
|
221
|
-
>
|
|
222
|
-
<Heart fill={filled ? 'currentColor' : 'none'} className="h-4 w-4" />
|
|
223
|
-
</Button>
|
|
217
|
+
<FavoriteButton filled={filled} onClick={onPress} />
|
|
224
218
|
</Touchable>
|
|
225
219
|
</CardAction>
|
|
226
220
|
)
|
|
@@ -368,24 +362,10 @@ function ProductLink({product}: ProductLinkProps) {
|
|
|
368
362
|
|
|
369
363
|
<ProductLinkActions
|
|
370
364
|
filled={isFavoritedLocal}
|
|
371
|
-
|
|
365
|
+
onPress={handleActionPress}
|
|
372
366
|
/>
|
|
373
367
|
</ProductLinkRoot>
|
|
374
368
|
)
|
|
375
369
|
}
|
|
376
370
|
|
|
377
|
-
export {
|
|
378
|
-
// Composed component
|
|
379
|
-
ProductLink,
|
|
380
|
-
// Primitive components for custom composition
|
|
381
|
-
ProductLinkRoot,
|
|
382
|
-
ProductLinkImage,
|
|
383
|
-
ProductLinkInfo,
|
|
384
|
-
ProductLinkTitle,
|
|
385
|
-
ProductLinkPrice,
|
|
386
|
-
ProductLinkCurrentPrice,
|
|
387
|
-
ProductLinkOriginalPrice,
|
|
388
|
-
ProductLinkDiscountPrice,
|
|
389
|
-
ProductLinkRating,
|
|
390
|
-
ProductLinkActions,
|
|
391
|
-
}
|
|
371
|
+
export {ProductLink}
|
package/src/components/index.ts
CHANGED
|
@@ -4,24 +4,27 @@ export * from './commerce/product-card'
|
|
|
4
4
|
export * from './commerce/product-link'
|
|
5
5
|
export * from './commerce/merchant-card'
|
|
6
6
|
|
|
7
|
-
export * from './atoms/accordion'
|
|
8
|
-
export * from './atoms/alert'
|
|
9
|
-
export * from './atoms/alert-dialog'
|
|
10
|
-
export * from './atoms/avatar'
|
|
11
|
-
export * from './atoms/badge'
|
|
12
7
|
export * from './atoms/button'
|
|
13
|
-
export * from './atoms/
|
|
14
|
-
export * from './atoms/
|
|
15
|
-
export * from './atoms/
|
|
16
|
-
|
|
17
|
-
export * from './
|
|
18
|
-
export * from './
|
|
19
|
-
export * from './
|
|
20
|
-
export * from './
|
|
21
|
-
export * from './
|
|
22
|
-
export * from './
|
|
23
|
-
export * from './
|
|
24
|
-
export * from './
|
|
25
|
-
export * from './
|
|
26
|
-
export * from './
|
|
27
|
-
export * from './
|
|
8
|
+
export * from './atoms/favorite-button'
|
|
9
|
+
export * from './atoms/icon-button'
|
|
10
|
+
export * from './atoms/touchable'
|
|
11
|
+
|
|
12
|
+
export * from './ui/accordion'
|
|
13
|
+
export * from './ui/alert'
|
|
14
|
+
export * from './ui/alert-dialog'
|
|
15
|
+
export * from './ui/avatar'
|
|
16
|
+
export * from './ui/card'
|
|
17
|
+
export * from './ui/carousel'
|
|
18
|
+
export * from './ui/checkbox'
|
|
19
|
+
export * from './ui/dialog'
|
|
20
|
+
export * from './ui/drawer'
|
|
21
|
+
export * from './ui/input'
|
|
22
|
+
export * from './ui/label'
|
|
23
|
+
export * from './ui/progress'
|
|
24
|
+
export * from './ui/radio-group'
|
|
25
|
+
export * from './ui/resizable'
|
|
26
|
+
export * from './ui/scroll-area'
|
|
27
|
+
export * from './ui/select'
|
|
28
|
+
export * from './ui/separator'
|
|
29
|
+
export * from './ui/sheet'
|
|
30
|
+
export * from './ui/sonner'
|
|
@@ -130,7 +130,7 @@ function AlertDialogCancel({
|
|
|
130
130
|
}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {
|
|
131
131
|
return (
|
|
132
132
|
<AlertDialogPrimitive.Cancel
|
|
133
|
-
className={cn(buttonVariants({variant: '
|
|
133
|
+
className={cn(buttonVariants({variant: 'outline'}), className)}
|
|
134
134
|
{...props}
|
|
135
135
|
/>
|
|
136
136
|
)
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
|
|
3
|
+
import {cva, type VariantProps} from 'class-variance-authority'
|
|
4
|
+
import {Slot as SlotPrimitive} from 'radix-ui'
|
|
5
|
+
|
|
6
|
+
import {cn} from '../../lib/utils'
|
|
7
|
+
|
|
8
|
+
const buttonVariants = cva(
|
|
9
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:bg-disabled disabled:text-disabled-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none aria-invalid:border-destructive",
|
|
10
|
+
{
|
|
11
|
+
variants: {
|
|
12
|
+
variant: {
|
|
13
|
+
default: 'bg-primary text-primary-foreground',
|
|
14
|
+
secondary: 'bg-secondary text-secondary-foreground',
|
|
15
|
+
tertiary: 'bg-tertiary text-tertiary-foreground',
|
|
16
|
+
destructive: 'bg-destructive text-white dark:bg-destructive/60',
|
|
17
|
+
outline: 'border bg-background dark:bg-input/30 dark:border-input',
|
|
18
|
+
ghost: '',
|
|
19
|
+
link: 'text-primary underline-offset-4',
|
|
20
|
+
icon: 'flex rounded-full items-center justify-center p-0 aspect-square',
|
|
21
|
+
},
|
|
22
|
+
size: {
|
|
23
|
+
default:
|
|
24
|
+
'min-h-[32px] rounded-lg px-3 py-2 text-sm leading-[18px] has-[>svg]:px-3',
|
|
25
|
+
sm: 'min-h-[20px] rounded-lg gap-1.5 px-3 py-1 text-xs leading-4 has-[>svg]:px-2.5',
|
|
26
|
+
lg: 'min-h-[44px] rounded-xl px-3 py-3 text-base leading-6 has-[>svg]:px-4',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
compoundVariants: [
|
|
30
|
+
{
|
|
31
|
+
variant: 'icon',
|
|
32
|
+
size: 'default',
|
|
33
|
+
className:
|
|
34
|
+
'size-8 min-h-0 p-0 rounded-full gap-0 px-0 py-0 has-[>svg]:px-0',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
variant: 'icon',
|
|
38
|
+
size: 'sm',
|
|
39
|
+
className:
|
|
40
|
+
'size-6 min-h-0 p-0 rounded-full gap-0 px-0 py-0 has-[>svg]:px-0',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
variant: 'icon',
|
|
44
|
+
size: 'lg',
|
|
45
|
+
className:
|
|
46
|
+
'size-10 min-h-0 p-0 rounded-full gap-0 px-0 py-0 has-[>svg]:px-0',
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
defaultVariants: {
|
|
50
|
+
variant: 'default',
|
|
51
|
+
size: 'default',
|
|
52
|
+
},
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
function BaseButton({
|
|
57
|
+
className,
|
|
58
|
+
variant,
|
|
59
|
+
size,
|
|
60
|
+
asChild = false,
|
|
61
|
+
...props
|
|
62
|
+
}: React.ComponentProps<'button'> &
|
|
63
|
+
VariantProps<typeof buttonVariants> & {
|
|
64
|
+
asChild?: boolean
|
|
65
|
+
}) {
|
|
66
|
+
const Comp = asChild ? SlotPrimitive.Slot : 'button'
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<Comp
|
|
70
|
+
data-slot="button"
|
|
71
|
+
className={cn(buttonVariants({variant, size, className}))}
|
|
72
|
+
{...props}
|
|
73
|
+
/>
|
|
74
|
+
)
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export {BaseButton, buttonVariants}
|
|
@@ -7,7 +7,7 @@ import {ArrowLeft, ArrowRight} from 'lucide-react'
|
|
|
7
7
|
|
|
8
8
|
import {cn} from '../../lib/utils'
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import {BaseButton} from './button'
|
|
11
11
|
|
|
12
12
|
type CarouselApi = UseEmblaCarouselType[1]
|
|
13
13
|
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>
|
|
@@ -173,14 +173,14 @@ function CarouselItem({className, ...props}: React.ComponentProps<'div'>) {
|
|
|
173
173
|
|
|
174
174
|
function CarouselPrevious({
|
|
175
175
|
className,
|
|
176
|
-
variant = '
|
|
177
|
-
size = '
|
|
176
|
+
variant = 'icon',
|
|
177
|
+
size = 'default',
|
|
178
178
|
...props
|
|
179
|
-
}: React.ComponentProps<typeof
|
|
179
|
+
}: React.ComponentProps<typeof BaseButton>) {
|
|
180
180
|
const {orientation, scrollPrev, canScrollPrev} = useCarousel()
|
|
181
181
|
|
|
182
182
|
return (
|
|
183
|
-
<
|
|
183
|
+
<BaseButton
|
|
184
184
|
data-slot="carousel-previous"
|
|
185
185
|
variant={variant}
|
|
186
186
|
size={size}
|
|
@@ -197,20 +197,20 @@ function CarouselPrevious({
|
|
|
197
197
|
>
|
|
198
198
|
<ArrowLeft />
|
|
199
199
|
<span className="sr-only">Previous slide</span>
|
|
200
|
-
</
|
|
200
|
+
</BaseButton>
|
|
201
201
|
)
|
|
202
202
|
}
|
|
203
203
|
|
|
204
204
|
function CarouselNext({
|
|
205
205
|
className,
|
|
206
|
-
variant = '
|
|
207
|
-
size = '
|
|
206
|
+
variant = 'icon',
|
|
207
|
+
size = 'default',
|
|
208
208
|
...props
|
|
209
|
-
}: React.ComponentProps<typeof
|
|
209
|
+
}: React.ComponentProps<typeof BaseButton>) {
|
|
210
210
|
const {orientation, scrollNext, canScrollNext} = useCarousel()
|
|
211
211
|
|
|
212
212
|
return (
|
|
213
|
-
<
|
|
213
|
+
<BaseButton
|
|
214
214
|
data-slot="carousel-next"
|
|
215
215
|
variant={variant}
|
|
216
216
|
size={size}
|
|
@@ -227,7 +227,7 @@ function CarouselNext({
|
|
|
227
227
|
>
|
|
228
228
|
<ArrowRight />
|
|
229
229
|
<span className="sr-only">Next slide</span>
|
|
230
|
-
</
|
|
230
|
+
</BaseButton>
|
|
231
231
|
)
|
|
232
232
|
}
|
|
233
233
|
|
|
@@ -48,7 +48,8 @@ function DrawerContent({
|
|
|
48
48
|
...props
|
|
49
49
|
}: React.ComponentProps<typeof DrawerPrimitive.Content>) {
|
|
50
50
|
return (
|
|
51
|
-
|
|
51
|
+
// vaul's Portal type incorrectly excludes children
|
|
52
|
+
<DrawerPortal {...({} as any)}>
|
|
52
53
|
<DrawerOverlay />
|
|
53
54
|
<DrawerPrimitive.Content
|
|
54
55
|
data-slot="drawer-content"
|
package/src/index.css
CHANGED
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
@import '
|
|
2
|
-
@
|
|
1
|
+
@import 'tailwindcss';
|
|
2
|
+
@import 'tw-animate-css';
|
|
3
|
+
|
|
4
|
+
@import './styles/theme.css';
|
|
5
|
+
@import './styles/globals.css';
|
|
6
|
+
|
|
7
|
+
/* When consumed as npm package, this path resolves from the consuming app's location */
|
|
8
|
+
@source '../node_modules/@shopify/shop-minis-react/src';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/* Global styles and browser behavior */
|
|
2
|
+
|
|
3
|
+
/* Essential base styles */
|
|
4
|
+
@layer base {
|
|
5
|
+
* {
|
|
6
|
+
@apply border-border outline-ring/50;
|
|
7
|
+
}
|
|
8
|
+
body {
|
|
9
|
+
@apply bg-background text-foreground;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* Touch and selection styles */
|
|
14
|
+
html,
|
|
15
|
+
body {
|
|
16
|
+
touch-action: manipulation;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* Disable text selection */
|
|
20
|
+
body {
|
|
21
|
+
-webkit-user-select: none;
|
|
22
|
+
-moz-user-select: none;
|
|
23
|
+
-ms-user-select: none;
|
|
24
|
+
user-select: none;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Re-enable text selection for input fields */
|
|
28
|
+
input,
|
|
29
|
+
textarea {
|
|
30
|
+
-webkit-user-select: text;
|
|
31
|
+
-moz-user-select: text;
|
|
32
|
+
-ms-user-select: text;
|
|
33
|
+
user-select: text;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* Disable image drag */
|
|
37
|
+
img,
|
|
38
|
+
.no-drag {
|
|
39
|
+
-webkit-user-drag: none;
|
|
40
|
+
user-drag: none;
|
|
41
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/* Design tokens and theme configuration */
|
|
2
|
+
|
|
3
|
+
@custom-variant dark (&:is(.dark *));
|
|
4
|
+
|
|
5
|
+
:root {
|
|
6
|
+
/* Palette Colors - Purple */
|
|
7
|
+
--purple-d80: #1b163b;
|
|
8
|
+
--purple-d60: #322c7d;
|
|
9
|
+
--purple-d50: #4524db;
|
|
10
|
+
--purple-p40: #5433eb;
|
|
11
|
+
--purple-l30: #6445ed;
|
|
12
|
+
--purple-l20: #9c83f8;
|
|
13
|
+
--purple-l10: #dbd1ff;
|
|
14
|
+
--purple-l5: #eeeaff;
|
|
15
|
+
--purple-l2: #f7f5ff;
|
|
16
|
+
|
|
17
|
+
/* Palette Colors - Grayscale */
|
|
18
|
+
--grayscale-d100: #000000;
|
|
19
|
+
--grayscale-d93: #121212;
|
|
20
|
+
--grayscale-d90: #1a1a1a;
|
|
21
|
+
--grayscale-d80: #2a2a2a;
|
|
22
|
+
--grayscale-d70: #404040;
|
|
23
|
+
--grayscale-d60: #656667;
|
|
24
|
+
--grayscale-d50: #6f7071;
|
|
25
|
+
--grayscale-l40: #a6a8a9;
|
|
26
|
+
--grayscale-l20: #c9cbcc;
|
|
27
|
+
--grayscale-l10: #e1e4e5;
|
|
28
|
+
--grayscale-l6: #eef0f1;
|
|
29
|
+
--grayscale-l5: #f2f4f5;
|
|
30
|
+
--grayscale-l0: #ffffff;
|
|
31
|
+
|
|
32
|
+
/* Palette Colors - Green */
|
|
33
|
+
--green-d90: #002e24;
|
|
34
|
+
--green-d80: #004839;
|
|
35
|
+
--green-d70: #008552;
|
|
36
|
+
--green-l30: #92d08d;
|
|
37
|
+
--green-l20: #baebcb;
|
|
38
|
+
--green-l10: #d2f2de;
|
|
39
|
+
--green-l5: #e4f6eb;
|
|
40
|
+
|
|
41
|
+
/* Palette Colors - Poppy */
|
|
42
|
+
--poppy-d80: #481609;
|
|
43
|
+
--poppy-d70: #832711;
|
|
44
|
+
--poppy-d50: #d92a0f;
|
|
45
|
+
--poppy-l40: #f05d38;
|
|
46
|
+
--poppy-l20: #ff967d;
|
|
47
|
+
--poppy-l10: #ffd2c2;
|
|
48
|
+
--poppy-l4: #ffece9;
|
|
49
|
+
|
|
50
|
+
/* Palette Colors - Ochre */
|
|
51
|
+
--ochre-d90: #443600;
|
|
52
|
+
--ochre-d70: #8c6e01;
|
|
53
|
+
--ochre-d60: #c29d05;
|
|
54
|
+
--ochre-l50: #e3be2b;
|
|
55
|
+
--ochre-l30: #f8db67;
|
|
56
|
+
--ochre-l20: #ffec9f;
|
|
57
|
+
--ochre-l10: #fff4cb;
|
|
58
|
+
--ochre-l6: #fff9e2;
|
|
59
|
+
|
|
60
|
+
/* Palette Colors - Brand */
|
|
61
|
+
--brand-aqua: #8dc0c6;
|
|
62
|
+
--brand-violet: #a327c2;
|
|
63
|
+
--brand-magenta: #d354ff;
|
|
64
|
+
--brand-olive: #8b8f01;
|
|
65
|
+
--brand-lime: #c7de00;
|
|
66
|
+
--brand-sage: #d8e59d;
|
|
67
|
+
--brand-sand: #f4f4ed;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@theme {
|
|
71
|
+
/* Core theme colors */
|
|
72
|
+
--color-background: var(--grayscale-l0);
|
|
73
|
+
--color-foreground: var(--grayscale-d100);
|
|
74
|
+
--color-card: var(--grayscale-l0);
|
|
75
|
+
--color-card-foreground: var(--grayscale-d100);
|
|
76
|
+
--color-popover: var(--grayscale-l0);
|
|
77
|
+
--color-popover-foreground: var(--grayscale-d100);
|
|
78
|
+
--color-primary: var(--purple-p40);
|
|
79
|
+
--color-primary-foreground: var(--grayscale-l0);
|
|
80
|
+
--color-secondary: var(--grayscale-d100);
|
|
81
|
+
--color-secondary-foreground: var(--grayscale-l0);
|
|
82
|
+
--color-tertiary: var(--grayscale-l5);
|
|
83
|
+
--color-tertiary-foreground: var(--grayscale-d100);
|
|
84
|
+
--color-muted: var(--grayscale-l5);
|
|
85
|
+
--color-muted-foreground: var(--grayscale-d50);
|
|
86
|
+
--color-accent: var(--grayscale-l5);
|
|
87
|
+
--color-accent-foreground: var(--grayscale-d70);
|
|
88
|
+
--color-destructive: var(--poppy-d50);
|
|
89
|
+
--color-border: rgba(0, 0, 0, 0.1);
|
|
90
|
+
--color-input: var(--grayscale-l20);
|
|
91
|
+
--color-ring: var(--purple-p40);
|
|
92
|
+
--color-disabled: var(--grayscale-l6);
|
|
93
|
+
--color-disabled-foreground: var(--grayscale-l40);
|
|
94
|
+
|
|
95
|
+
/* Button theme colors */
|
|
96
|
+
--color-button-overlay: var(--grayscale-d70);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/* Dark mode overrides - only the palette colors that change */
|
|
100
|
+
.dark {
|
|
101
|
+
/* TBD */
|
|
102
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.js","sources":["../../../src/components/atoms/accordion.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport {ChevronDownIcon} from 'lucide-react'\nimport {Accordion as AccordionPrimitive} from 'radix-ui'\n\nimport {cn} from '../../lib/utils'\n\nfunction Accordion({\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Root>) {\n return <AccordionPrimitive.Root data-slot=\"accordion\" {...props} />\n}\n\nfunction AccordionItem({\n className,\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Item>) {\n return (\n <AccordionPrimitive.Item\n data-slot=\"accordion-item\"\n className={cn('border-b last:border-b-0', className)}\n {...props}\n />\n )\n}\n\nfunction AccordionTrigger({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Trigger>) {\n return (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n data-slot=\"accordion-trigger\"\n className={cn(\n 'focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180',\n className\n )}\n {...props}\n >\n {children}\n <ChevronDownIcon className=\"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200\" />\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n )\n}\n\nfunction AccordionContent({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Content>) {\n return (\n <AccordionPrimitive.Content\n data-slot=\"accordion-content\"\n className=\"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm\"\n {...props}\n >\n <div className={cn('pt-0 pb-4', className)}>{children}</div>\n </AccordionPrimitive.Content>\n )\n}\n\nexport {Accordion, AccordionItem, AccordionTrigger, AccordionContent}\n"],"names":["Accordion","props","AccordionPrimitive.Root","AccordionItem","className","jsx","AccordionPrimitive.Item","cn","AccordionTrigger","children","AccordionPrimitive.Header","jsxs","AccordionPrimitive.Trigger","ChevronDownIcon","AccordionContent","AccordionPrimitive.Content"],"mappings":";;;;AAOA,SAASA,EAAU;AAAA,EACjB,GAAGC;AACL,GAAyD;AACvD,2BAAQC,GAAA,EAAwB,aAAU,aAAa,GAAGD,GAAO;AACnE;AAEA,SAASE,EAAc;AAAA,EACrB,WAAAC;AAAA,EACA,GAAGH;AACL,GAAyD;AAErD,SAAA,gBAAAI;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC,EAAG,4BAA4BH,CAAS;AAAA,MAClD,GAAGH;AAAA,IAAA;AAAA,EACN;AAEJ;AAEA,SAASO,EAAiB;AAAA,EACxB,WAAAJ;AAAA,EACA,UAAAK;AAAA,EACA,GAAGR;AACL,GAA4D;AAC1D,SACG,gBAAAI,EAAAK,GAAA,EAA0B,WAAU,QACnC,UAAA,gBAAAC;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWL;AAAA,QACT;AAAA,QACAH;AAAA,MACF;AAAA,MACC,GAAGH;AAAA,MAEH,UAAA;AAAA,QAAAQ;AAAA,QACD,gBAAAJ,EAACQ,GAAgB,EAAA,WAAU,8GAA8G,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,GAE7I;AAEJ;AAEA,SAASC,EAAiB;AAAA,EACxB,WAAAV;AAAA,EACA,UAAAK;AAAA,EACA,GAAGR;AACL,GAA4D;AAExD,SAAA,gBAAAI;AAAA,IAACU;AAAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAU;AAAA,MACT,GAAGd;AAAA,MAEJ,4BAAC,OAAI,EAAA,WAAWM,EAAG,aAAaH,CAAS,GAAI,UAAAK,EAAS,CAAA;AAAA,IAAA;AAAA,EACxD;AAEJ;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"alert-dialog.js","sources":["../../../src/components/atoms/alert-dialog.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport {AlertDialog as AlertDialogPrimitive} from 'radix-ui'\n\nimport {cn} from '../../lib/utils'\n\nimport {buttonVariants} from './button'\n\nfunction AlertDialog({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />\n}\n\nfunction AlertDialogTrigger({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {\n return (\n <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />\n )\n}\n\nfunction AlertDialogPortal({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n return (\n <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />\n )\n}\n\nfunction AlertDialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {\n return (\n <AlertDialogPrimitive.Overlay\n data-slot=\"alert-dialog-overlay\"\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogContent({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n data-slot=\"alert-dialog-content\"\n className={cn(\n 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg',\n className\n )}\n {...props}\n />\n </AlertDialogPortal>\n )\n}\n\nfunction AlertDialogHeader({className, ...props}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"alert-dialog-header\"\n className={cn('flex flex-col gap-2 text-center sm:text-left', className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogFooter({className, ...props}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"alert-dialog-footer\"\n className={cn(\n 'flex flex-col-reverse gap-2 sm:flex-row sm:justify-end',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n return (\n <AlertDialogPrimitive.Title\n data-slot=\"alert-dialog-title\"\n className={cn('text-lg font-semibold', className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogAction({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Action>) {\n return (\n <AlertDialogPrimitive.Action\n className={cn(buttonVariants(), className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogCancel({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {\n return (\n <AlertDialogPrimitive.Cancel\n className={cn(buttonVariants({variant: 'outlined'}), className)}\n {...props}\n />\n )\n}\n\nexport {\n AlertDialog,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n}\n"],"names":["AlertDialog","props","AlertDialogPrimitive.Root","AlertDialogTrigger","AlertDialogPrimitive.Trigger","AlertDialogPortal","AlertDialogPrimitive.Portal","AlertDialogOverlay","className","jsx","AlertDialogPrimitive.Overlay","cn","AlertDialogContent","AlertDialogPrimitive.Content","AlertDialogHeader","AlertDialogFooter","AlertDialogTitle","AlertDialogPrimitive.Title","AlertDialogDescription","AlertDialogPrimitive.Description","AlertDialogAction","AlertDialogPrimitive.Action","buttonVariants","AlertDialogCancel","AlertDialogPrimitive.Cancel"],"mappings":";;;;AAQA,SAASA,EAAY;AAAA,EACnB,GAAGC;AACL,GAA2D;AACzD,2BAAQC,GAAA,EAA0B,aAAU,gBAAgB,GAAGD,GAAO;AACxE;AAEA,SAASE,EAAmB;AAAA,EAC1B,GAAGF;AACL,GAA8D;AAC5D,2BACGG,GAAA,EAA6B,aAAU,wBAAwB,GAAGH,GAAO;AAE9E;AAEA,SAASI,EAAkB;AAAA,EACzB,GAAGJ;AACL,GAA6D;AAC3D,2BACGK,GAAA,EAA4B,aAAU,uBAAuB,GAAGL,GAAO;AAE5E;AAEA,SAASM,EAAmB;AAAA,EAC1B,WAAAC;AAAA,EACA,GAAGP;AACL,GAA8D;AAE1D,SAAA,gBAAAQ;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAH;AAAA,MACF;AAAA,MACC,GAAGP;AAAA,IAAA;AAAA,EACN;AAEJ;AAEA,SAASW,EAAmB;AAAA,EAC1B,WAAAJ;AAAA,EACA,GAAGP;AACL,GAA8D;AAC5D,2BACGI,GACC,EAAA,UAAA;AAAA,IAAA,gBAAAI,EAACF,GAAmB,EAAA;AAAA,IACpB,gBAAAE;AAAA,MAACI;AAAAA,MAAA;AAAA,QACC,aAAU;AAAA,QACV,WAAWF;AAAA,UACT;AAAA,UACAH;AAAA,QACF;AAAA,QACC,GAAGP;AAAA,MAAA;AAAA,IAAA;AAAA,EACN,GACF;AAEJ;AAEA,SAASa,EAAkB,EAAC,WAAAN,GAAW,GAAGP,KAAqC;AAE3E,SAAA,gBAAAQ;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWE,EAAG,gDAAgDH,CAAS;AAAA,MACtE,GAAGP;AAAA,IAAA;AAAA,EACN;AAEJ;AAEA,SAASc,EAAkB,EAAC,WAAAP,GAAW,GAAGP,KAAqC;AAE3E,SAAA,gBAAAQ;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWE;AAAA,QACT;AAAA,QACAH;AAAA,MACF;AAAA,MACC,GAAGP;AAAA,IAAA;AAAA,EACN;AAEJ;AAEA,SAASe,EAAiB;AAAA,EACxB,WAAAR;AAAA,EACA,GAAGP;AACL,GAA4D;AAExD,SAAA,gBAAAQ;AAAA,IAACQ;AAAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWN,EAAG,yBAAyBH,CAAS;AAAA,MAC/C,GAAGP;AAAA,IAAA;AAAA,EACN;AAEJ;AAEA,SAASiB,EAAuB;AAAA,EAC9B,WAAAV;AAAA,EACA,GAAGP;AACL,GAAkE;AAE9D,SAAA,gBAAAQ;AAAA,IAACU;AAAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWR,EAAG,iCAAiCH,CAAS;AAAA,MACvD,GAAGP;AAAA,IAAA;AAAA,EACN;AAEJ;AAEA,SAASmB,EAAkB;AAAA,EACzB,WAAAZ;AAAA,EACA,GAAGP;AACL,GAA6D;AAEzD,SAAA,gBAAAQ;AAAA,IAACY;AAAAA,IAAA;AAAA,MACC,WAAWV,EAAGW,EAAe,GAAGd,CAAS;AAAA,MACxC,GAAGP;AAAA,IAAA;AAAA,EACN;AAEJ;AAEA,SAASsB,EAAkB;AAAA,EACzB,WAAAf;AAAA,EACA,GAAGP;AACL,GAA6D;AAEzD,SAAA,gBAAAQ;AAAA,IAACe;AAAAA,IAAA;AAAA,MACC,WAAWb,EAAGW,EAAe,EAAC,SAAS,WAAU,CAAC,GAAGd,CAAS;AAAA,MAC7D,GAAGP;AAAA,IAAA;AAAA,EACN;AAEJ;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"alert.js","sources":["../../../src/components/atoms/alert.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport {cva, type VariantProps} from 'class-variance-authority'\n\nimport {cn} from '../../lib/utils'\n\nconst alertVariants = cva(\n 'relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current',\n {\n variants: {\n variant: {\n default: 'bg-card text-card-foreground',\n destructive:\n 'text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n)\n\nfunction Alert({\n className,\n variant,\n ...props\n}: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>) {\n return (\n <div\n data-slot=\"alert\"\n role=\"alert\"\n className={cn(alertVariants({variant}), className)}\n {...props}\n />\n )\n}\n\nfunction AlertTitle({className, ...props}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"alert-title\"\n className={cn(\n 'col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDescription({className, ...props}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"alert-description\"\n className={cn(\n 'text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed',\n className\n )}\n {...props}\n />\n )\n}\n\nexport {Alert, AlertTitle, AlertDescription}\n"],"names":["alertVariants","cva","Alert","className","variant","props","jsx","cn","AlertTitle","AlertDescription"],"mappings":";;;AAMA,MAAMA,IAAgBC;AAAA,EACpB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,aACE;AAAA,MAAA;AAAA,IAEN;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,IAAA;AAAA,EACX;AAEJ;AAEA,SAASC,EAAM;AAAA,EACb,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,GAAGC;AACL,GAAqE;AAEjE,SAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,MAAK;AAAA,MACL,WAAWC,EAAGP,EAAc,EAAC,SAAAI,EAAQ,CAAA,GAAGD,CAAS;AAAA,MAChD,GAAGE;AAAA,IAAA;AAAA,EACN;AAEJ;AAEA,SAASG,EAAW,EAAC,WAAAL,GAAW,GAAGE,KAAqC;AAEpE,SAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAJ;AAAA,MACF;AAAA,MACC,GAAGE;AAAA,IAAA;AAAA,EACN;AAEJ;AAEA,SAASI,EAAiB,EAAC,WAAAN,GAAW,GAAGE,KAAqC;AAE1E,SAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAJ;AAAA,MACF;AAAA,MACC,GAAGE;AAAA,IAAA;AAAA,EACN;AAEJ;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.js","sources":["../../../src/components/atoms/avatar.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport {Avatar as AvatarPrimitive} from 'radix-ui'\n\nimport {cn} from '../../lib/utils'\n\nfunction Avatar({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Root>) {\n return (\n <AvatarPrimitive.Root\n data-slot=\"avatar\"\n className={cn(\n 'relative flex size-8 shrink-0 overflow-hidden rounded-full',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AvatarImage({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Image>) {\n return (\n <AvatarPrimitive.Image\n data-slot=\"avatar-image\"\n className={cn('aspect-square size-full', className)}\n {...props}\n />\n )\n}\n\nfunction AvatarFallback({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {\n return (\n <AvatarPrimitive.Fallback\n data-slot=\"avatar-fallback\"\n className={cn(\n 'bg-muted flex size-full items-center justify-center rounded-full',\n className\n )}\n {...props}\n />\n )\n}\n\nexport {Avatar, AvatarImage, AvatarFallback}\n"],"names":["Avatar","className","props","jsx","AvatarPrimitive.Root","cn","AvatarImage","AvatarPrimitive.Image","AvatarFallback","AvatarPrimitive.Fallback"],"mappings":";;;AAMA,SAASA,EAAO;AAAA,EACd,WAAAC;AAAA,EACA,GAAGC;AACL,GAAsD;AAElD,SAAA,gBAAAC;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAJ;AAAA,MACF;AAAA,MACC,GAAGC;AAAA,IAAA;AAAA,EACN;AAEJ;AAEA,SAASI,EAAY;AAAA,EACnB,WAAAL;AAAA,EACA,GAAGC;AACL,GAAuD;AAEnD,SAAA,gBAAAC;AAAA,IAACI;AAAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWF,EAAG,2BAA2BJ,CAAS;AAAA,MACjD,GAAGC;AAAA,IAAA;AAAA,EACN;AAEJ;AAEA,SAASM,EAAe;AAAA,EACtB,WAAAP;AAAA,EACA,GAAGC;AACL,GAA0D;AAEtD,SAAA,gBAAAC;AAAA,IAACM;AAAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWJ;AAAA,QACT;AAAA,QACAJ;AAAA,MACF;AAAA,MACC,GAAGC;AAAA,IAAA;AAAA,EACN;AAEJ;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"badge.js","sources":["../../../src/components/atoms/badge.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport {cva, type VariantProps} from 'class-variance-authority'\nimport {Slot as SlotPrimitive} from 'radix-ui'\n\nimport {cn} from '../../lib/utils'\n\nconst badgeVariants = cva(\n 'inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden',\n {\n variants: {\n variant: {\n default:\n 'border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90',\n secondary:\n 'border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90',\n destructive:\n 'border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',\n outline:\n 'text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n)\n\nfunction Badge({\n className,\n variant,\n asChild = false,\n ...props\n}: React.ComponentProps<'span'> &\n VariantProps<typeof badgeVariants> & {asChild?: boolean}) {\n const Comp = asChild ? SlotPrimitive.Slot : 'span'\n\n return (\n <Comp\n data-slot=\"badge\"\n className={cn(badgeVariants({variant}), className)}\n {...props}\n />\n )\n}\n\nexport {Badge, badgeVariants}\n"],"names":["badgeVariants","cva","Badge","className","variant","asChild","props","jsx","SlotPrimitive.Slot","cn"],"mappings":";;;;AAOA,MAAMA,IAAgBC;AAAA,EACpB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SACE;AAAA,QACF,WACE;AAAA,QACF,aACE;AAAA,QACF,SACE;AAAA,MAAA;AAAA,IAEN;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,IAAA;AAAA,EACX;AAEJ;AAEA,SAASC,EAAM;AAAA,EACb,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,GAAGC;AACL,GAC4D;AAIxD,SAAA,gBAAAC;AAAA,IAHWF,IAAUG,IAAqB;AAAA,IAGzC;AAAA,MACC,aAAU;AAAA,MACV,WAAWC,EAAGT,EAAc,EAAC,SAAAI,EAAQ,CAAA,GAAGD,CAAS;AAAA,MAChD,GAAGG;AAAA,IAAA;AAAA,EACN;AAEJ;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"card.js","sources":["../../../src/components/atoms/card.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport {cn} from '../../lib/utils'\n\nfunction Card({className, ...props}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card\"\n className={cn(\n 'bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardHeader({className, ...props}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\n '@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardTitle({className, ...props}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-title\"\n className={cn('leading-none font-semibold', className)}\n {...props}\n />\n )\n}\n\nfunction CardDescription({className, ...props}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-description\"\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n )\n}\n\nfunction CardAction({className, ...props}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-action\"\n className={cn(\n 'col-start-2 row-span-2 row-start-1 self-start justify-self-end',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardContent({className, ...props}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-content\"\n className={cn('px-6', className)}\n {...props}\n />\n )\n}\n\nfunction CardFooter({className, ...props}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn('flex items-center px-6 [.border-t]:pt-6', className)}\n {...props}\n />\n )\n}\n\nexport {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardAction,\n CardDescription,\n CardContent,\n}\n"],"names":["Card","className","props","jsx","cn","CardHeader","CardTitle","CardDescription","CardAction","CardContent","CardFooter"],"mappings":";;AAIA,SAASA,EAAK,EAAC,WAAAC,GAAW,GAAGC,KAAqC;AAE9D,SAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAH;AAAA,MACF;AAAA,MACC,GAAGC;AAAA,IAAA;AAAA,EACN;AAEJ;AAEA,SAASG,EAAW,EAAC,WAAAJ,GAAW,GAAGC,KAAqC;AAEpE,SAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAH;AAAA,MACF;AAAA,MACC,GAAGC;AAAA,IAAA;AAAA,EACN;AAEJ;AAEA,SAASI,EAAU,EAAC,WAAAL,GAAW,GAAGC,KAAqC;AAEnE,SAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC,EAAG,8BAA8BH,CAAS;AAAA,MACpD,GAAGC;AAAA,IAAA;AAAA,EACN;AAEJ;AAEA,SAASK,EAAgB,EAAC,WAAAN,GAAW,GAAGC,KAAqC;AAEzE,SAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC,EAAG,iCAAiCH,CAAS;AAAA,MACvD,GAAGC;AAAA,IAAA;AAAA,EACN;AAEJ;AAEA,SAASM,EAAW,EAAC,WAAAP,GAAW,GAAGC,KAAqC;AAEpE,SAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAH;AAAA,MACF;AAAA,MACC,GAAGC;AAAA,IAAA;AAAA,EACN;AAEJ;AAEA,SAASO,EAAY,EAAC,WAAAR,GAAW,GAAGC,KAAqC;AAErE,SAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC,EAAG,QAAQH,CAAS;AAAA,MAC9B,GAAGC;AAAA,IAAA;AAAA,EACN;AAEJ;AAEA,SAASQ,EAAW,EAAC,WAAAT,GAAW,GAAGC,KAAqC;AAEpE,SAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC,EAAG,2CAA2CH,CAAS;AAAA,MACjE,GAAGC;AAAA,IAAA;AAAA,EACN;AAEJ;"}
|