@danielcruzcode/ui-core 0.1.0
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 +171 -0
- package/dist/commerce/ProductCard/ProductCard.css.d.ts +23 -0
- package/dist/commerce/ProductCard/ProductCard.css.d.ts.map +1 -0
- package/dist/commerce/ProductCard/ProductCard.d.ts +30 -0
- package/dist/commerce/ProductCard/ProductCard.d.ts.map +1 -0
- package/dist/commerce/ProductCard/index.d.ts +3 -0
- package/dist/commerce/ProductCard/index.d.ts.map +1 -0
- package/dist/commerce/ProductShelf/ProductShelf.css.d.ts +3 -0
- package/dist/commerce/ProductShelf/ProductShelf.css.d.ts.map +1 -0
- package/dist/commerce/ProductShelf/ProductShelf.d.ts +22 -0
- package/dist/commerce/ProductShelf/ProductShelf.d.ts.map +1 -0
- package/dist/commerce/ProductShelf/index.d.ts +3 -0
- package/dist/commerce/ProductShelf/index.d.ts.map +1 -0
- package/dist/components/Card/Card.css.d.ts +30 -0
- package/dist/components/Card/Card.css.d.ts.map +1 -0
- package/dist/components/Card/Card.d.ts +13 -0
- package/dist/components/Card/Card.d.ts.map +1 -0
- package/dist/components/Card/index.d.ts +3 -0
- package/dist/components/Card/index.d.ts.map +1 -0
- package/dist/components/Carousel/Carousel.css.d.ts +8 -0
- package/dist/components/Carousel/Carousel.css.d.ts.map +1 -0
- package/dist/components/Carousel/Carousel.d.ts +23 -0
- package/dist/components/Carousel/Carousel.d.ts.map +1 -0
- package/dist/components/Carousel/Carousel.js +35 -0
- package/dist/components/Carousel/Carousel.js.map +1 -0
- package/dist/components/Carousel/index.d.ts +3 -0
- package/dist/components/Carousel/index.d.ts.map +1 -0
- package/dist/components/Carousel/index.js +2 -0
- package/dist/components/Carousel/index.js.map +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.cjs10.js +1 -0
- package/dist/index.cjs11.js +1 -0
- package/dist/index.cjs12.js +1 -0
- package/dist/index.cjs13.js +1 -0
- package/dist/index.cjs14.js +1 -0
- package/dist/index.cjs15.js +1 -0
- package/dist/index.cjs16.js +1 -0
- package/dist/index.cjs17.js +1 -0
- package/dist/index.cjs18.js +1 -0
- package/dist/index.cjs19.js +1 -0
- package/dist/index.cjs2.js +1 -0
- package/dist/index.cjs20.js +1 -0
- package/dist/index.cjs21.js +1 -0
- package/dist/index.cjs22.js +1 -0
- package/dist/index.cjs23.js +1 -0
- package/dist/index.cjs24.js +1 -0
- package/dist/index.cjs25.js +1 -0
- package/dist/index.cjs27.js +1 -0
- package/dist/index.cjs28.js +1 -0
- package/dist/index.cjs29.js +1 -0
- package/dist/index.cjs3.js +1 -0
- package/dist/index.cjs30.js +1 -0
- package/dist/index.cjs31.js +1 -0
- package/dist/index.cjs34.js +1 -0
- package/dist/index.cjs4.js +1 -0
- package/dist/index.cjs42.js +1 -0
- package/dist/index.cjs43.js +1 -0
- package/dist/index.cjs44.js +1 -0
- package/dist/index.cjs49.js +1 -0
- package/dist/index.cjs5.js +1 -0
- package/dist/index.cjs50.js +1 -0
- package/dist/index.cjs51.js +1 -0
- package/dist/index.cjs52.js +1 -0
- package/dist/index.cjs6.js +1 -0
- package/dist/index.cjs7.js +1 -0
- package/dist/index.cjs8.js +1 -0
- package/dist/index.cjs9.js +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.js +26 -0
- package/dist/index.esm10.js +54 -0
- package/dist/index.esm11.js +52 -0
- package/dist/index.esm12.js +25 -0
- package/dist/index.esm13.js +28 -0
- package/dist/index.esm14.js +8 -0
- package/dist/index.esm15.js +7 -0
- package/dist/index.esm16.js +8 -0
- package/dist/index.esm17.js +12 -0
- package/dist/index.esm18.js +11 -0
- package/dist/index.esm19.js +15 -0
- package/dist/index.esm2.js +8 -0
- package/dist/index.esm20.js +12 -0
- package/dist/index.esm21.js +136 -0
- package/dist/index.esm22.js +226 -0
- package/dist/index.esm23.js +130 -0
- package/dist/index.esm24.js +247 -0
- package/dist/index.esm25.js +11 -0
- package/dist/index.esm27.js +7 -0
- package/dist/index.esm28.js +26 -0
- package/dist/index.esm29.js +7 -0
- package/dist/index.esm3.js +49 -0
- package/dist/index.esm30.js +5 -0
- package/dist/index.esm31.js +1 -0
- package/dist/index.esm34.js +88 -0
- package/dist/index.esm4.js +35 -0
- package/dist/index.esm42.js +2028 -0
- package/dist/index.esm43.js +60 -0
- package/dist/index.esm44.js +191 -0
- package/dist/index.esm49.js +12 -0
- package/dist/index.esm5.js +100 -0
- package/dist/index.esm50.js +182 -0
- package/dist/index.esm51.js +6 -0
- package/dist/index.esm52.js +134 -0
- package/dist/index.esm6.js +61 -0
- package/dist/index.esm7.js +8 -0
- package/dist/index.esm8.js +58 -0
- package/dist/index.esm9.js +169 -0
- package/dist/layout/Container/Container.css.d.ts +20 -0
- package/dist/layout/Container/Container.css.d.ts.map +1 -0
- package/dist/layout/Container/Container.d.ts +8 -0
- package/dist/layout/Container/Container.d.ts.map +1 -0
- package/dist/layout/Container/index.d.ts +3 -0
- package/dist/layout/Container/index.d.ts.map +1 -0
- package/dist/layout/Stack/Stack.css.d.ts +2 -0
- package/dist/layout/Stack/Stack.css.d.ts.map +1 -0
- package/dist/layout/Stack/Stack.d.ts +10 -0
- package/dist/layout/Stack/Stack.d.ts.map +1 -0
- package/dist/layout/Stack/index.d.ts +3 -0
- package/dist/layout/Stack/index.d.ts.map +1 -0
- package/dist/primitives/Badge/Badge.css.d.ts +37 -0
- package/dist/primitives/Badge/Badge.css.d.ts.map +1 -0
- package/dist/primitives/Badge/Badge.d.ts +8 -0
- package/dist/primitives/Badge/Badge.d.ts.map +1 -0
- package/dist/primitives/Badge/index.d.ts +3 -0
- package/dist/primitives/Badge/index.d.ts.map +1 -0
- package/dist/primitives/Button/Button.css.d.ts +60 -0
- package/dist/primitives/Button/Button.css.d.ts.map +1 -0
- package/dist/primitives/Button/Button.d.ts +16 -0
- package/dist/primitives/Button/Button.d.ts.map +1 -0
- package/dist/primitives/Button/index.d.ts +3 -0
- package/dist/primitives/Button/index.d.ts.map +1 -0
- package/dist/primitives/Checkbox/Checkbox.css.d.ts +9 -0
- package/dist/primitives/Checkbox/Checkbox.css.d.ts.map +1 -0
- package/dist/primitives/Checkbox/Checkbox.d.ts +11 -0
- package/dist/primitives/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/primitives/Checkbox/index.d.ts +3 -0
- package/dist/primitives/Checkbox/index.d.ts.map +1 -0
- package/dist/primitives/Input/Input.css.d.ts +11 -0
- package/dist/primitives/Input/Input.css.d.ts.map +1 -0
- package/dist/primitives/Input/Input.d.ts +18 -0
- package/dist/primitives/Input/Input.d.ts.map +1 -0
- package/dist/primitives/Input/index.d.ts +3 -0
- package/dist/primitives/Input/index.d.ts.map +1 -0
- package/dist/primitives/Select/Select.css.d.ts +8 -0
- package/dist/primitives/Select/Select.css.d.ts.map +1 -0
- package/dist/primitives/Select/Select.d.ts +18 -0
- package/dist/primitives/Select/Select.d.ts.map +1 -0
- package/dist/primitives/Select/index.d.ts +3 -0
- package/dist/primitives/Select/index.d.ts.map +1 -0
- package/dist/primitives/Tag/Tag.css.d.ts +16 -0
- package/dist/primitives/Tag/Tag.css.d.ts.map +1 -0
- package/dist/primitives/Tag/Tag.d.ts +7 -0
- package/dist/primitives/Tag/Tag.d.ts.map +1 -0
- package/dist/primitives/Tag/index.d.ts +3 -0
- package/dist/primitives/Tag/index.d.ts.map +1 -0
- package/dist/styles.css +1 -0
- package/dist/styles.d.ts +1 -0
- package/dist/styles.d.ts.map +1 -0
- package/package.json +61 -0
package/README.md
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# @jumbo/ui-core
|
|
2
|
+
|
|
3
|
+
Librería de componentes React del Design System de Jumbo Colombia. Los componentes son agnósticos de plataforma: reciben datos y acciones exclusivamente vía props y callbacks.
|
|
4
|
+
|
|
5
|
+
## Instalación
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @jumbo/ui-core @jumbo/design-tokens
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Importar estilos
|
|
12
|
+
|
|
13
|
+
Importa los estilos CSS en el entry point de tu aplicación (obligatorio):
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import '@jumbo/design-tokens/styles'
|
|
17
|
+
import '@jumbo/ui-core/styles'
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Uso básico
|
|
21
|
+
|
|
22
|
+
### Aplicar un tema
|
|
23
|
+
|
|
24
|
+
```tsx
|
|
25
|
+
import { lightTheme } from '@jumbo/design-tokens'
|
|
26
|
+
|
|
27
|
+
function App() {
|
|
28
|
+
return (
|
|
29
|
+
<div className={lightTheme}>
|
|
30
|
+
{/* tu aplicación */}
|
|
31
|
+
</div>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Primitivos
|
|
37
|
+
|
|
38
|
+
```tsx
|
|
39
|
+
import { Button, Badge, Tag, Input, Select, Checkbox } from '@jumbo/ui-core'
|
|
40
|
+
|
|
41
|
+
// Button
|
|
42
|
+
<Button variant="primary" size="md" onClick={() => console.log('click')}>
|
|
43
|
+
Agregar al carrito
|
|
44
|
+
</Button>
|
|
45
|
+
|
|
46
|
+
// Badge
|
|
47
|
+
<Badge variant="brand" size="sm">Nuevo</Badge>
|
|
48
|
+
|
|
49
|
+
// Tag con opción de eliminar
|
|
50
|
+
<Tag label="Lácteos" onRemove={() => removeFilter('lácteos')} />
|
|
51
|
+
|
|
52
|
+
// Input
|
|
53
|
+
<Input
|
|
54
|
+
label="Correo electrónico"
|
|
55
|
+
type="email"
|
|
56
|
+
placeholder="ejemplo@correo.com"
|
|
57
|
+
onChange={(value) => setEmail(value)}
|
|
58
|
+
error={emailError}
|
|
59
|
+
/>
|
|
60
|
+
|
|
61
|
+
// Select
|
|
62
|
+
<Select
|
|
63
|
+
label="Categoría"
|
|
64
|
+
options={[
|
|
65
|
+
{ value: 'frutas', label: 'Frutas y verduras' },
|
|
66
|
+
{ value: 'lacteos', label: 'Lácteos' },
|
|
67
|
+
]}
|
|
68
|
+
value={category}
|
|
69
|
+
onChange={(value) => setCategory(value)}
|
|
70
|
+
/>
|
|
71
|
+
|
|
72
|
+
// Checkbox
|
|
73
|
+
<Checkbox
|
|
74
|
+
label="Acepto los términos y condiciones"
|
|
75
|
+
checked={accepted}
|
|
76
|
+
onChange={(checked) => setAccepted(checked)}
|
|
77
|
+
/>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Composición
|
|
81
|
+
|
|
82
|
+
```tsx
|
|
83
|
+
import { Card, Carousel } from '@jumbo/ui-core'
|
|
84
|
+
|
|
85
|
+
// Card genérica
|
|
86
|
+
<Card
|
|
87
|
+
media={<img src="/producto.jpg" alt="Producto" />}
|
|
88
|
+
body={<p>Descripción del producto</p>}
|
|
89
|
+
footer={<Button>Comprar</Button>}
|
|
90
|
+
hoverable
|
|
91
|
+
onClick={() => navigate('/producto')}
|
|
92
|
+
/>
|
|
93
|
+
|
|
94
|
+
// Carousel
|
|
95
|
+
<Carousel
|
|
96
|
+
showArrows
|
|
97
|
+
showDots
|
|
98
|
+
autoplay
|
|
99
|
+
autoplayMs={5000}
|
|
100
|
+
slidesPerView={{ mobile: 1, tablet: 2, desktop: 4 }}
|
|
101
|
+
gap={4}
|
|
102
|
+
>
|
|
103
|
+
{items.map(item => <ItemCard key={item.id} {...item} />)}
|
|
104
|
+
</Carousel>
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Commerce
|
|
108
|
+
|
|
109
|
+
```tsx
|
|
110
|
+
import { ProductCard, ProductShelf } from '@jumbo/ui-core'
|
|
111
|
+
|
|
112
|
+
// Formateador de moneda (inyectado por el consumidor)
|
|
113
|
+
const formatCOP = (value: number) =>
|
|
114
|
+
new Intl.NumberFormat('es-CO', { style: 'currency', currency: 'COP', maximumFractionDigits: 0 }).format(value)
|
|
115
|
+
|
|
116
|
+
// ProductCard individual
|
|
117
|
+
<ProductCard
|
|
118
|
+
id="123"
|
|
119
|
+
title="Leche Entera Alquería x 1L"
|
|
120
|
+
images={[{ src: '/leche.jpg', alt: 'Leche Alquería' }]}
|
|
121
|
+
price={3200}
|
|
122
|
+
originalPrice={3800}
|
|
123
|
+
discountPercent={16}
|
|
124
|
+
rating={4.5}
|
|
125
|
+
reviewCount={128}
|
|
126
|
+
installments={{ count: 3, value: 1067 }}
|
|
127
|
+
onAddToCart={(id) => addToCart(id)}
|
|
128
|
+
onWishlist={(id) => toggleWishlist(id)}
|
|
129
|
+
onClick={(id) => navigate(`/producto/${id}`)}
|
|
130
|
+
formatPrice={formatCOP}
|
|
131
|
+
/>
|
|
132
|
+
|
|
133
|
+
// ProductShelf (carrusel de productos)
|
|
134
|
+
<ProductShelf
|
|
135
|
+
title="OFERTAS DEL DÍA"
|
|
136
|
+
products={products}
|
|
137
|
+
slidesPerView={{ mobile: 2, tablet: 3, desktop: 5 }}
|
|
138
|
+
onAddToCart={addToCart}
|
|
139
|
+
onProductClick={(id) => navigate(`/producto/${id}`)}
|
|
140
|
+
formatPrice={formatCOP}
|
|
141
|
+
/>
|
|
142
|
+
|
|
143
|
+
// ProductShelf en estado de carga
|
|
144
|
+
<ProductShelf
|
|
145
|
+
products={[]}
|
|
146
|
+
loading
|
|
147
|
+
skeletonCount={5}
|
|
148
|
+
/>
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Layout
|
|
152
|
+
|
|
153
|
+
```tsx
|
|
154
|
+
import { Stack, Container } from '@jumbo/ui-core'
|
|
155
|
+
|
|
156
|
+
<Container maxWidth="xl">
|
|
157
|
+
<Stack gap={4} align="center">
|
|
158
|
+
<h1>Título</h1>
|
|
159
|
+
<p>Contenido</p>
|
|
160
|
+
</Stack>
|
|
161
|
+
</Container>
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Componentes disponibles
|
|
165
|
+
|
|
166
|
+
| Capa | Componentes |
|
|
167
|
+
|------|-------------|
|
|
168
|
+
| Primitivos | `Button`, `Badge`, `Tag`, `Input`, `Select`, `Checkbox` |
|
|
169
|
+
| Composición | `Card`, `Carousel` |
|
|
170
|
+
| Commerce | `ProductCard`, `ProductShelf` |
|
|
171
|
+
| Layout | `Stack`, `Container` |
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const root: string;
|
|
2
|
+
export declare const imageWrapper: string;
|
|
3
|
+
export declare const image: string;
|
|
4
|
+
export declare const badgeOverlay: string;
|
|
5
|
+
export declare const wishlistBtn: string;
|
|
6
|
+
export declare const body: string;
|
|
7
|
+
export declare const title: string;
|
|
8
|
+
export declare const subtitle: string;
|
|
9
|
+
export declare const starsWrapper: string;
|
|
10
|
+
export declare const reviewCount: string;
|
|
11
|
+
export declare const priceWrapper: string;
|
|
12
|
+
export declare const price: string;
|
|
13
|
+
export declare const originalPrice: string;
|
|
14
|
+
export declare const installments: string;
|
|
15
|
+
export declare const footer: string;
|
|
16
|
+
export declare const quickViewBtn: string;
|
|
17
|
+
export declare const unavailableOverlay: string;
|
|
18
|
+
export declare const unavailableText: string;
|
|
19
|
+
export declare const skeleton: string;
|
|
20
|
+
export declare const skeletonImage: string;
|
|
21
|
+
export declare const skeletonLine: string;
|
|
22
|
+
export declare const skeletonBtn: string;
|
|
23
|
+
//# sourceMappingURL=ProductCard.css.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductCard.css.d.ts","sourceRoot":"","sources":["../../../src/commerce/ProductCard/ProductCard.css.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,IAAI,QAIf,CAAC;AAEH,eAAO,MAAM,YAAY,QAMvB,CAAC;AAEH,eAAO,MAAM,KAAK,QAYhB,CAAC;AAEH,eAAO,MAAM,YAAY,QAOvB,CAAC;AAEH,eAAO,MAAM,WAAW,QAuBtB,CAAC;AAEH,eAAO,MAAM,IAAI,QAMf,CAAC;AAEH,eAAO,MAAM,KAAK,QAahB,CAAC;AAEH,eAAO,MAAM,QAAQ,QAKnB,CAAC;AAEH,eAAO,MAAM,YAAY,QAIvB,CAAC;AAEH,eAAO,MAAM,WAAW,QAItB,CAAC;AAEH,eAAO,MAAM,YAAY,QAMvB,CAAC;AAEH,eAAO,MAAM,KAAK,QAKhB,CAAC;AAEH,eAAO,MAAM,aAAa,QAKxB,CAAC;AAEH,eAAO,MAAM,YAAY,QAIvB,CAAC;AAEH,eAAO,MAAM,MAAM,QAKjB,CAAC;AAEH,eAAO,MAAM,YAAY,QAgBvB,CAAC;AAEH,eAAO,MAAM,kBAAkB,QAO7B,CAAC;AAEH,eAAO,MAAM,eAAe,QAK1B,CAAC;AAEH,eAAO,MAAM,QAAQ,QAQnB,CAAC;AAEH,eAAO,MAAM,aAAa,QAMxB,CAAC;AAEH,eAAO,MAAM,YAAY,QAMvB,CAAC;AAEH,eAAO,MAAM,WAAW,QAMtB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface ProductImage {
|
|
2
|
+
src: string;
|
|
3
|
+
alt: string;
|
|
4
|
+
}
|
|
5
|
+
export interface ProductCardProps {
|
|
6
|
+
id: string;
|
|
7
|
+
title: string;
|
|
8
|
+
subtitle?: string;
|
|
9
|
+
images: ProductImage[];
|
|
10
|
+
price: number;
|
|
11
|
+
originalPrice?: number;
|
|
12
|
+
discountPercent?: number;
|
|
13
|
+
badge?: string;
|
|
14
|
+
rating?: number;
|
|
15
|
+
reviewCount?: number;
|
|
16
|
+
installments?: {
|
|
17
|
+
count: number;
|
|
18
|
+
value: number;
|
|
19
|
+
};
|
|
20
|
+
unavailable?: boolean;
|
|
21
|
+
loading?: boolean;
|
|
22
|
+
onAddToCart?: (id: string) => void;
|
|
23
|
+
onWishlist?: (id: string) => void;
|
|
24
|
+
onQuickView?: (id: string) => void;
|
|
25
|
+
onClick?: (id: string) => void;
|
|
26
|
+
formatPrice?: (value: number) => string;
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare function ProductCard({ id, title, subtitle, images, price, originalPrice, discountPercent, badge, rating, reviewCount, installments: installmentsData, unavailable, loading, onAddToCart, onWishlist, onQuickView, onClick, formatPrice, className, }: ProductCardProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
//# sourceMappingURL=ProductCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductCard.d.ts","sourceRoot":"","sources":["../../../src/commerce/ProductCard/ProductCard.tsx"],"names":[],"mappings":"AA2BA,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE;QACb,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA8CD,wBAAgB,WAAW,CAAC,EAC1B,EAAE,EACF,KAAK,EACL,QAAQ,EACR,MAAM,EACN,KAAK,EACL,aAAa,EACb,eAAe,EACf,KAAK,EACL,MAAM,EACN,WAAW,EACX,YAAY,EAAE,gBAAgB,EAC9B,WAAmB,EACnB,OAAe,EACf,WAAW,EACX,UAAU,EACV,WAAW,EACX,OAAO,EACP,WAAW,EACX,SAAS,GACV,EAAE,gBAAgB,2CAiIlB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commerce/ProductCard/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductShelf.css.d.ts","sourceRoot":"","sources":["../../../src/commerce/ProductShelf/ProductShelf.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI,QAIf,CAAA;AAEF,eAAO,MAAM,OAAO,QAMlB,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ProductCardProps } from '../ProductCard';
|
|
2
|
+
type SlidesPerView = number | {
|
|
3
|
+
mobile: number;
|
|
4
|
+
tablet: number;
|
|
5
|
+
desktop: number;
|
|
6
|
+
};
|
|
7
|
+
export interface ProductShelfProps {
|
|
8
|
+
products: ProductCardProps[];
|
|
9
|
+
title?: string;
|
|
10
|
+
autoplay?: boolean;
|
|
11
|
+
autoplayMs?: number;
|
|
12
|
+
slidesPerView?: SlidesPerView;
|
|
13
|
+
onAddToCart?: (id: string) => void;
|
|
14
|
+
onWishlist?: (id: string) => void;
|
|
15
|
+
onProductClick?: (id: string) => void;
|
|
16
|
+
formatPrice?: (value: number) => string;
|
|
17
|
+
loading?: boolean;
|
|
18
|
+
skeletonCount?: number;
|
|
19
|
+
}
|
|
20
|
+
export declare function ProductShelf({ products, title, autoplay, autoplayMs, slidesPerView, onAddToCart, onWishlist, onProductClick, formatPrice, loading, skeletonCount, }: ProductShelfProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=ProductShelf.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductShelf.d.ts","sourceRoot":"","sources":["../../../src/commerce/ProductShelf/ProductShelf.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGpE,KAAK,aAAa,GAAG,MAAM,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAElF,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,cAAc,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,KAAK,EACL,QAAgB,EAChB,UAAiB,EACjB,aAAoD,EACpD,WAAW,EACX,UAAU,EACV,cAAc,EACd,WAAW,EACX,OAAe,EACf,aAAiB,GAClB,EAAE,iBAAiB,2CAoCnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commerce/ProductShelf/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const cardRecipe: import('@vanilla-extract/recipes').RuntimeFn<{
|
|
2
|
+
hoverable: {
|
|
3
|
+
true: {
|
|
4
|
+
cursor: "pointer";
|
|
5
|
+
':hover': {
|
|
6
|
+
boxShadow: `var(--${string})`;
|
|
7
|
+
transform: "translateY(-2px)";
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
padding: {
|
|
12
|
+
none: {
|
|
13
|
+
padding: number;
|
|
14
|
+
};
|
|
15
|
+
sm: {
|
|
16
|
+
padding: `var(--${string})`;
|
|
17
|
+
};
|
|
18
|
+
md: {
|
|
19
|
+
padding: `var(--${string})`;
|
|
20
|
+
};
|
|
21
|
+
lg: {
|
|
22
|
+
padding: `var(--${string})`;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
}>;
|
|
26
|
+
export declare const cardMedia: string;
|
|
27
|
+
export declare const cardHeader: string;
|
|
28
|
+
export declare const cardBody: string;
|
|
29
|
+
export declare const cardFooter: string;
|
|
30
|
+
//# sourceMappingURL=Card.css.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.css.d.ts","sourceRoot":"","sources":["../../../src/components/Card/Card.css.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;EAiCrB,CAAA;AAEF,eAAO,MAAM,SAAS,QAGpB,CAAA;AAEF,eAAO,MAAM,UAAU,QAErB,CAAA;AAEF,eAAO,MAAM,QAAQ,QAGnB,CAAA;AAEF,eAAO,MAAM,UAAU,QAIrB,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface CardProps {
|
|
3
|
+
media?: React.ReactNode;
|
|
4
|
+
header?: React.ReactNode;
|
|
5
|
+
body?: React.ReactNode;
|
|
6
|
+
footer?: React.ReactNode;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
hoverable?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
padding?: 'none' | 'sm' | 'md' | 'lg';
|
|
11
|
+
}
|
|
12
|
+
export declare function Card({ media, header, body, footer, onClick, hoverable, className, padding, }: CardProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/components/Card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CACvC;AAED,wBAAgB,IAAI,CAAC,EACnB,KAAK,EACL,MAAM,EACN,IAAI,EACJ,MAAM,EACN,OAAO,EACP,SAAiB,EACjB,SAAS,EACT,OAAgB,GACjB,EAAE,SAAS,2CA2BX"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const root: string;
|
|
2
|
+
export declare const arrowBtn: string;
|
|
3
|
+
export declare const arrowPrev: string;
|
|
4
|
+
export declare const arrowNext: string;
|
|
5
|
+
export declare const dots: string;
|
|
6
|
+
export declare const dot: string;
|
|
7
|
+
export declare const dotActive: string;
|
|
8
|
+
//# sourceMappingURL=Carousel.css.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Carousel.css.d.ts","sourceRoot":"","sources":["../../../src/components/Carousel/Carousel.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI,QAGf,CAAC;AAEH,eAAO,MAAM,QAAQ,QA4BnB,CAAC;AAEH,eAAO,MAAM,SAAS,QAEpB,CAAC;AAEH,eAAO,MAAM,SAAS,QAEpB,CAAC;AAEH,eAAO,MAAM,IAAI,QAKf,CAAC;AAEH,eAAO,MAAM,GAAG,QAad,CAAC;AAEH,eAAO,MAAM,SAAS,QAGpB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { vars } from '@danielcruzcode/design-tokens';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
import 'swiper/css';
|
|
4
|
+
type SlidesPerView = number | {
|
|
5
|
+
mobile: number;
|
|
6
|
+
tablet: number;
|
|
7
|
+
desktop: number;
|
|
8
|
+
};
|
|
9
|
+
export interface CarouselProps {
|
|
10
|
+
children: React.ReactNode[];
|
|
11
|
+
autoplay?: boolean;
|
|
12
|
+
autoplayMs?: number;
|
|
13
|
+
showArrows?: boolean;
|
|
14
|
+
showDots?: boolean;
|
|
15
|
+
loop?: boolean;
|
|
16
|
+
slidesPerView?: SlidesPerView;
|
|
17
|
+
slidesPerGroup?: number;
|
|
18
|
+
gap?: keyof typeof vars.space;
|
|
19
|
+
onSlideChange?: (index: number) => void;
|
|
20
|
+
}
|
|
21
|
+
export declare function Carousel({ children, autoplay, autoplayMs, showArrows, showDots, loop, slidesPerView, slidesPerGroup, gap, onSlideChange, }: CarouselProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=Carousel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Carousel.d.ts","sourceRoot":"","sources":["../../../src/components/Carousel/Carousel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAC1D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,YAAY,CAAC;AAEpB,KAAK,aAAa,GAAG,MAAM,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAElF,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,OAAO,IAAI,CAAC,KAAK,CAAC;IAC9B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAID,wBAAgB,QAAQ,CAAC,EACvB,QAAQ,EACR,QAAgB,EAChB,UAAiB,EACjB,UAAiB,EACjB,QAAe,EACf,IAAY,EACZ,aAAiB,EACjB,cAAc,EACd,GAAG,EACH,aAAa,GACd,EAAE,aAAa,2CA2Ff"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useRef } from 'react';
|
|
3
|
+
import { Autoplay, Navigation, Pagination } from 'swiper/modules';
|
|
4
|
+
import { Swiper, SwiperSlide } from 'swiper/react';
|
|
5
|
+
import { arrowBtn, arrowNext, arrowPrev, dot, dotActive, dots as dotsCls } from './Carousel.css';
|
|
6
|
+
import 'swiper/css';
|
|
7
|
+
const GAP_PX = { sm: 8, md: 16, lg: 24, xl: 32 };
|
|
8
|
+
export function Carousel({ children, autoplay = false, autoplayMs = 4000, showArrows = true, showDots = true, loop = false, slidesPerView = 1, slidesPerGroup, gap, onSlideChange, }) {
|
|
9
|
+
const swiperRef = useRef(null);
|
|
10
|
+
const spaceBetween = gap ? (GAP_PX[gap] ?? 16) : 0;
|
|
11
|
+
const breakpoints = typeof slidesPerView === 'object'
|
|
12
|
+
? {
|
|
13
|
+
0: { slidesPerView: slidesPerView.mobile },
|
|
14
|
+
640: { slidesPerView: slidesPerView.tablet },
|
|
15
|
+
1024: { slidesPerView: slidesPerView.desktop },
|
|
16
|
+
}
|
|
17
|
+
: undefined;
|
|
18
|
+
const spv = typeof slidesPerView === 'number' ? slidesPerView : undefined;
|
|
19
|
+
return (_jsxs("div", { children: [_jsx(Swiper, { modules: [
|
|
20
|
+
...(showArrows ? [Navigation] : []),
|
|
21
|
+
...(showDots ? [Pagination] : []),
|
|
22
|
+
...(autoplay ? [Autoplay] : []),
|
|
23
|
+
], slidesPerView: spv, breakpoints: breakpoints, spaceBetween: spaceBetween, slidesPerGroup: slidesPerGroup, loop: loop, autoplay: autoplay ? { delay: autoplayMs, disableOnInteraction: false } : false, pagination: showDots
|
|
24
|
+
? {
|
|
25
|
+
el: '.swiper-custom-dots',
|
|
26
|
+
clickable: true,
|
|
27
|
+
bulletClass: dot,
|
|
28
|
+
bulletActiveClass: dotActive,
|
|
29
|
+
renderBullet: (_i, cls) => `<button class="${cls}" />`,
|
|
30
|
+
}
|
|
31
|
+
: false, navigation: showArrows ? { prevEl: '.swiper-custom-prev', nextEl: '.swiper-custom-next' } : false, onSwiper: (swiper) => {
|
|
32
|
+
swiperRef.current = swiper;
|
|
33
|
+
}, onSlideChange: (swiper) => onSlideChange?.(swiper.realIndex), children: children.map((child, i) => (_jsx(SwiperSlide, { children: child }, i))) }), showArrows && (_jsxs(_Fragment, { children: [_jsx("button", { type: "button", className: `${arrowBtn} ${arrowPrev} swiper-custom-prev`, "aria-label": "Slide anterior", children: _jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: _jsx("path", { d: "M10 12L6 8l4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) }), _jsx("button", { type: "button", className: `${arrowBtn} ${arrowNext} swiper-custom-next`, "aria-label": "Slide siguiente", children: _jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: _jsx("path", { d: "M6 4l4 4-4 4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) })] })), showDots && _jsx("div", { className: `swiper-custom-dots ${dotsCls}` })] }));
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=Carousel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Carousel.js","sourceRoot":"","sources":["../../../src/components/Carousel/Carousel.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Carousel/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Carousel/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.cjs2.js"),r=require("./index.cjs3.js"),t=require("./index.cjs4.js"),o=require("./index.cjs5.js"),u=require("./index.cjs6.js"),c=require("./index.cjs7.js"),n=require("./index.cjs8.js"),a=require("./index.cjs9.js"),i=require("./index.cjs10.js"),d=require("./index.cjs11.js"),s=require("./index.cjs12.js"),C=require("./index.cjs13.js");exports.Badge=e.Badge;exports.Button=r.Button;exports.Card=t.Card;exports.Carousel=o.Carousel;exports.Checkbox=u.Checkbox;exports.Container=c.Container;exports.Input=n.Input;exports.ProductCard=a.ProductCard;exports.ProductShelf=i.ProductShelf;exports.Select=d.Select;exports.Stack=s.Stack;exports.Tag=C.Tag;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("./index.cjs27.js"),P=require("./index.cjs5.js"),j=require("./index.cjs9.js");function p({products:t,title:r,autoplay:a=!1,autoplayMs:l=4e3,slidesPerView:c={mobile:1,tablet:2,desktop:4},onAddToCart:i,onWishlist:u,onProductClick:n,formatPrice:d,loading:h=!1,skeletonCount:m=4}){const f=h?Array.from({length:m}).map((o,g)=>({id:`skeleton-${g}`,title:"",images:[],price:0,loading:!0})):t;return e.jsxs("section",{className:s.root,"aria-label":r??"Productos",children:[r&&e.jsx("h2",{className:s.heading,children:r}),e.jsx(P.Carousel,{autoplay:a,autoplayMs:l,slidesPerView:c,gap:4,showArrows:!0,showDots:!0,loop:!0,children:f.map(o=>e.jsx(j.ProductCard,{...o,onAddToCart:i,onWishlist:u,onClick:n,formatPrice:d},o.id))})]})}exports.ProductShelf=p;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("react"),s=require("./index.cjs20.js");function b({options:n,value:o,onChange:i,label:a,placeholder:c,error:r,disabled:u=!1,name:j,id:v}){const h=m.useId(),t=v??h,d=r?`${t}-error`:void 0,x=[s.select,r?s.selectError:""].filter(Boolean).join(" ");return e.jsxs("div",{className:s.wrapper,children:[a&&e.jsx("label",{className:s.label,htmlFor:t,children:a}),e.jsxs("div",{className:s.selectWrapper,children:[e.jsxs("select",{id:t,name:j,className:x,value:o,onChange:l=>i==null?void 0:i(l.target.value),disabled:u,"aria-invalid":r?!0:void 0,"aria-describedby":d,children:[c&&e.jsx("option",{value:"",disabled:!0,children:c}),n.map(l=>e.jsx("option",{value:l.value,disabled:l.disabled,children:l.label},l.value))]}),e.jsx("span",{className:s.chevron,"aria-hidden":"true",children:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:e.jsx("path",{d:"M4 6l4 4 4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),r&&e.jsx("span",{id:d,className:s.errorText,role:"alert",children:r})]})}exports.Select=b;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),n=require("@danielcruzcode/design-tokens"),a=require("./index.cjs30.js"),i={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch"};function o({gap:e,align:t="stretch",children:s,as:r="div"}){return c.jsx(r,{className:a.stackBase,style:{gap:e?n.vars.space[e]:void 0,alignItems:i[t]},children:s})}exports.Stack=o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("./index.cjs14.js");function s({label:t,onRemove:r,variant:n="default"}){return e.jsxs("span",{className:i.tagRecipe({variant:n}),children:[t,r&&e.jsx("button",{type:"button",className:i.removeButton,onClick:r,"aria-label":`Eliminar ${t}`,children:e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M9 3L3 9M3 3l6 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]})}exports.Tag=s;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});;/* empty css */;/* empty css */const e=require("./index.cjs34.js");var a=e.c({defaultClassName:"_13mmpdy0",variantClassNames:{variant:{default:"_13mmpdy1",brand:"_13mmpdy2"}},defaultVariants:{variant:"default"},compoundVariants:[]}),t="_13mmpdy3";exports.removeButton=t;exports.tagRecipe=a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});;/* empty css */;/* empty css */const r=require("./index.cjs34.js");var e=r.c({defaultClassName:"_12rozn90",variantClassNames:{variant:{primary:"_12rozn91",secondary:"_12rozn92",ghost:"_12rozn93",danger:"_12rozn94"},size:{sm:"_12rozn95",md:"_12rozn96",lg:"_12rozn97"},fullWidth:{true:"_12rozn98"}},defaultVariants:{variant:"primary",size:"md"},compoundVariants:[]});exports.buttonRecipe=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index.cjs31.js");;/* empty css */;/* empty css */const e=require("./index.cjs34.js");var r=e.c({defaultClassName:"rxfwcs0",variantClassNames:{variant:{brand:"rxfwcs1",success:"rxfwcs2",warning:"rxfwcs3",danger:"rxfwcs4",neutral:"rxfwcs5"},size:{sm:"rxfwcs6",md:"rxfwcs7"}},defaultVariants:{variant:"neutral",size:"md"},compoundVariants:[]});exports.badgeRecipe=r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});;/* empty css */;/* empty css */var e="_104k35i0",r="_104k35i1",a="_104k35i2",i="_104k35i3",t="_104k35i4",b="_104k35i5",d="_104k35i7";exports.box=i;exports.boxChecked=t;exports.boxIndeterminate=b;exports.hiddenInput=a;exports.labelText=d;exports.wrapper=e;exports.wrapperDisabled=r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});;/* empty css */;/* empty css */const e=require("./index.cjs34.js");var a=e.c({defaultClassName:"uk9byt0",variantClassNames:{hoverable:{true:"uk9byt1"},padding:{none:"uk9byt2",sm:"uk9byt3",md:"uk9byt4",lg:"uk9byt5"}},defaultVariants:{padding:"none"},compoundVariants:[]}),r="uk9byt6",t="uk9byt7",d="uk9byt8",u="uk9byt9";exports.cardBody=d;exports.cardFooter=u;exports.cardHeader=t;exports.cardMedia=r;exports.cardRecipe=a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});;/* empty css */;/* empty css */var r="wt8vlo0",e="wt8vlo1",t="wt8vlo2",a="wt8vlo3",p="wt8vlo4",o="wt8vlo5",i="wt8vlo6",l="wt8vlo7",v="wt8vlo8",u="wt8vlo9";exports.errorText=u;exports.hint=v;exports.iconSlot=l;exports.input=i;exports.inputWrapper=a;exports.inputWrapperDisabled=o;exports.inputWrapperError=p;exports.label=e;exports.requiredMark=t;exports.wrapper=r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),a=require("./index.cjs16.js");function n({variant:e="neutral",size:t="md",children:r}){return s.jsx("span",{className:a.badgeRecipe({variant:e,size:t}),children:r})}exports.Badge=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});;/* empty css */;/* empty css */var r="_7acib40",e="_7acib41",a="_7acib42",c="_7acib43",t="_7acib44",l="_7acib45",i="_7acib46";exports.chevron=l;exports.errorText=i;exports.label=e;exports.select=c;exports.selectError=t;exports.selectWrapper=a;exports.wrapper=r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const k=require("./index.cjs49.js"),s=require("./index.cjs50.js"),b='<svg class="swiper-navigation-icon" width="11" height="20" viewBox="0 0 11 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.38296 20.0762C0.111788 19.805 0.111788 19.3654 0.38296 19.0942L9.19758 10.2796L0.38296 1.46497C0.111788 1.19379 0.111788 0.754138 0.38296 0.482966C0.654131 0.211794 1.09379 0.211794 1.36496 0.482966L10.4341 9.55214C10.8359 9.9539 10.8359 10.6053 10.4341 11.007L1.36496 20.0762C1.09379 20.3474 0.654131 20.3474 0.38296 20.0762Z" fill="currentColor"/></svg>';function y({swiper:a,extendParams:x,on:r,emit:v}){x({navigation:{nextEl:null,prevEl:null,addIcons:!0,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),a.navigation={nextEl:null,prevEl:null,arrowSvg:b};function E(n){let t;return n&&typeof n=="string"&&a.isElement&&(t=a.el.querySelector(n)||a.hostEl.querySelector(n),t)?t:(n&&(typeof n=="string"&&(t=[...document.querySelectorAll(n)]),a.params.uniqueNavElements&&typeof n=="string"&&t&&t.length>1&&a.el.querySelectorAll(n).length===1?t=a.el.querySelector(n):t&&t.length===1&&(t=t[0])),n&&!t?n:t)}function f(n,t){const e=a.params.navigation;n=s.m(n),n.forEach(i=>{i&&(i.classList[t?"add":"remove"](...e.disabledClass.split(" ")),i.tagName==="BUTTON"&&(i.disabled=t),a.params.watchOverflow&&a.enabled&&i.classList[a.isLocked?"add":"remove"](e.lockClass))})}function d(){const{nextEl:n,prevEl:t}=a.navigation;if(a.params.loop){f(t,!1),f(n,!1);return}f(t,a.isBeginning&&!a.params.rewind),f(n,a.isEnd&&!a.params.rewind)}function h(n){n.preventDefault(),!(a.isBeginning&&!a.params.loop&&!a.params.rewind)&&(a.slidePrev(),v("navigationPrev"))}function C(n){n.preventDefault(),!(a.isEnd&&!a.params.loop&&!a.params.rewind)&&(a.slideNext(),v("navigationNext"))}function m(){const n=a.params.navigation;if(a.params.navigation=k.c(a,a.originalParams.navigation,a.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!(n.nextEl||n.prevEl))return;let t=E(n.nextEl),e=E(n.prevEl);Object.assign(a.navigation,{nextEl:t,prevEl:e}),t=s.m(t),e=s.m(e);const i=(l,g)=>{if(l){if(n.addIcons&&l.matches(".swiper-button-next,.swiper-button-prev")&&!l.querySelector("svg")){const o=document.createElement("div");s.s(o,b),l.appendChild(o.querySelector("svg")),o.remove()}l.addEventListener("click",g==="next"?C:h)}!a.enabled&&l&&l.classList.add(...n.lockClass.split(" "))};t.forEach(l=>i(l,"next")),e.forEach(l=>i(l,"prev"))}function u(){let{nextEl:n,prevEl:t}=a.navigation;n=s.m(n),t=s.m(t);const e=(i,l)=>{i.removeEventListener("click",l==="next"?C:h),i.classList.remove(...a.params.navigation.disabledClass.split(" "))};n.forEach(i=>e(i,"next")),t.forEach(i=>e(i,"prev"))}r("init",()=>{a.params.navigation.enabled===!1?p():(m(),d())}),r("toEdge fromEdge lock unlock",()=>{d()}),r("destroy",()=>{u()}),r("enable disable",()=>{let{nextEl:n,prevEl:t}=a.navigation;if(n=s.m(n),t=s.m(t),a.enabled){d();return}[...n,...t].filter(e=>!!e).forEach(e=>e.classList.add(a.params.navigation.lockClass))}),r("click",(n,t)=>{let{nextEl:e,prevEl:i}=a.navigation;e=s.m(e),i=s.m(i);const l=t.target;let g=i.includes(l)||e.includes(l);if(a.isElement&&!g){const o=t.path||t.composedPath&&t.composedPath();o&&(g=o.find(c=>e.includes(c)||i.includes(c)))}if(a.params.navigation.hideOnClick&&!g){if(a.pagination&&a.params.pagination&&a.params.pagination.clickable&&(a.pagination.el===l||a.pagination.el.contains(l)))return;let o;e.length?o=e[0].classList.contains(a.params.navigation.hiddenClass):i.length&&(o=i[0].classList.contains(a.params.navigation.hiddenClass)),v(o===!0?"navigationShow":"navigationHide"),[...e,...i].filter(c=>!!c).forEach(c=>c.classList.toggle(a.params.navigation.hiddenClass))}});const L=()=>{a.el.classList.remove(...a.params.navigation.navigationDisabledClass.split(" ")),m(),d()},p=()=>{a.el.classList.add(...a.params.navigation.navigationDisabledClass.split(" ")),u()};Object.assign(a.navigation,{enable:L,disable:p,update:d,init:m,destroy:u})}module.exports=y;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const $=require("./index.cjs51.js"),q=require("./index.cjs49.js"),c=require("./index.cjs50.js");function F({swiper:a,extendParams:I,on:m,emit:v}){const g="swiper-pagination";I({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:l=>l,formatFractionTotal:l=>l,bulletClass:`${g}-bullet`,bulletActiveClass:`${g}-bullet-active`,modifierClass:`${g}-`,currentClass:`${g}-current`,totalClass:`${g}-total`,hiddenClass:`${g}-hidden`,progressbarFillClass:`${g}-progressbar-fill`,progressbarOppositeClass:`${g}-progressbar-opposite`,clickableClass:`${g}-clickable`,lockClass:`${g}-lock`,horizontalClass:`${g}-horizontal`,verticalClass:`${g}-vertical`,paginationDisabledClass:`${g}-disabled`}}),a.pagination={el:null,bullets:[]};let b,p=0;function k(){return!a.params.pagination.el||!a.pagination.el||Array.isArray(a.pagination.el)&&a.pagination.el.length===0}function x(l,t){const{bulletActiveClass:e}=a.params.pagination;l&&(l=l[`${t==="prev"?"previous":"next"}ElementSibling`],l&&(l.classList.add(`${e}-${t}`),l=l[`${t==="prev"?"previous":"next"}ElementSibling`],l&&l.classList.add(`${e}-${t}-${t}`)))}function P(l,t,e){if(l=l%e,t=t%e,t===l+1)return"next";if(t===l-1)return"previous"}function D(l){const t=l.target.closest($.c(a.params.pagination.bulletClass));if(!t)return;l.preventDefault();const e=c.j(t)*a.params.slidesPerGroup;if(a.params.loop){if(a.realIndex===e)return;const n=P(a.realIndex,e,a.slides.length);n==="next"?a.slideNext():n==="previous"?a.slidePrev():a.slideToLoop(e)}else a.slideTo(e)}function h(){const l=a.rtl,t=a.params.pagination;if(k())return;let e=a.pagination.el;e=c.m(e);let n,d;const C=a.virtual&&a.params.virtual.enabled?a.virtual.slides.length:a.slides.length,z=a.params.loop?Math.ceil(C/a.params.slidesPerGroup):a.snapGrid.length;if(a.params.loop?(d=a.previousRealIndex||0,n=a.params.slidesPerGroup>1?Math.floor(a.realIndex/a.params.slidesPerGroup):a.realIndex):typeof a.snapIndex<"u"?(n=a.snapIndex,d=a.previousSnapIndex):(d=a.previousIndex||0,n=a.activeIndex||0),t.type==="bullets"&&a.pagination.bullets&&a.pagination.bullets.length>0){const s=a.pagination.bullets;let u,f,L;if(t.dynamicBullets&&(b=c.i(s[0],a.isHorizontal()?"width":"height"),e.forEach(i=>{i.style[a.isHorizontal()?"width":"height"]=`${b*(t.dynamicMainBullets+4)}px`}),t.dynamicMainBullets>1&&d!==void 0&&(p+=n-(d||0),p>t.dynamicMainBullets-1?p=t.dynamicMainBullets-1:p<0&&(p=0)),u=Math.max(n-p,0),f=u+(Math.min(s.length,t.dynamicMainBullets)-1),L=(f+u)/2),s.forEach(i=>{const o=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(r=>`${t.bulletActiveClass}${r}`)].map(r=>typeof r=="string"&&r.includes(" ")?r.split(" "):r).flat();i.classList.remove(...o)}),e.length>1)s.forEach(i=>{const o=c.j(i);o===n?i.classList.add(...t.bulletActiveClass.split(" ")):a.isElement&&i.setAttribute("part","bullet"),t.dynamicBullets&&(o>=u&&o<=f&&i.classList.add(...`${t.bulletActiveClass}-main`.split(" ")),o===u&&x(i,"prev"),o===f&&x(i,"next"))});else{const i=s[n];if(i&&i.classList.add(...t.bulletActiveClass.split(" ")),a.isElement&&s.forEach((o,r)=>{o.setAttribute("part",r===n?"bullet-active":"bullet")}),t.dynamicBullets){const o=s[u],r=s[f];for(let y=u;y<=f;y+=1)s[y]&&s[y].classList.add(...`${t.bulletActiveClass}-main`.split(" "));x(o,"prev"),x(r,"next")}}if(t.dynamicBullets){const i=Math.min(s.length,t.dynamicMainBullets+4),o=(b*i-b)/2-L*b,r=l?"right":"left";s.forEach(y=>{y.style[a.isHorizontal()?r:"top"]=`${o}px`})}}e.forEach((s,u)=>{if(t.type==="fraction"&&(s.querySelectorAll($.c(t.currentClass)).forEach(f=>{f.textContent=t.formatFractionCurrent(n+1)}),s.querySelectorAll($.c(t.totalClass)).forEach(f=>{f.textContent=t.formatFractionTotal(z)})),t.type==="progressbar"){let f;t.progressbarOpposite?f=a.isHorizontal()?"vertical":"horizontal":f=a.isHorizontal()?"horizontal":"vertical";const L=(n+1)/z;let i=1,o=1;f==="horizontal"?i=L:o=L,s.querySelectorAll($.c(t.progressbarFillClass)).forEach(r=>{r.style.transform=`translate3d(0,0,0) scaleX(${i}) scaleY(${o})`,r.style.transitionDuration=`${a.params.speed}ms`})}t.type==="custom"&&t.renderCustom?(c.s(s,t.renderCustom(a,n+1,z)),u===0&&v("paginationRender",s)):(u===0&&v("paginationRender",s),v("paginationUpdate",s)),a.params.watchOverflow&&a.enabled&&s.classList[a.isLocked?"add":"remove"](t.lockClass)})}function B(){const l=a.params.pagination;if(k())return;const t=a.virtual&&a.params.virtual.enabled?a.virtual.slides.length:a.grid&&a.params.grid.rows>1?a.slides.length/Math.ceil(a.params.grid.rows):a.slides.length;let e=a.pagination.el;e=c.m(e);let n="";if(l.type==="bullets"){let d=a.params.loop?Math.ceil(t/a.params.slidesPerGroup):a.snapGrid.length;a.params.freeMode&&a.params.freeMode.enabled&&d>t&&(d=t);for(let C=0;C<d;C+=1)l.renderBullet?n+=l.renderBullet.call(a,C,l.bulletClass):n+=`<${l.bulletElement} ${a.isElement?'part="bullet"':""} class="${l.bulletClass}"></${l.bulletElement}>`}l.type==="fraction"&&(l.renderFraction?n=l.renderFraction.call(a,l.currentClass,l.totalClass):n=`<span class="${l.currentClass}"></span> / <span class="${l.totalClass}"></span>`),l.type==="progressbar"&&(l.renderProgressbar?n=l.renderProgressbar.call(a,l.progressbarFillClass):n=`<span class="${l.progressbarFillClass}"></span>`),a.pagination.bullets=[],e.forEach(d=>{l.type!=="custom"&&c.s(d,n||""),l.type==="bullets"&&a.pagination.bullets.push(...d.querySelectorAll($.c(l.bulletClass)))}),l.type!=="custom"&&v("paginationRender",e[0])}function A(){a.params.pagination=q.c(a,a.originalParams.pagination,a.params.pagination,{el:"swiper-pagination"});const l=a.params.pagination;if(!l.el)return;let t;typeof l.el=="string"&&a.isElement&&(t=a.el.querySelector(l.el)),!t&&typeof l.el=="string"&&(t=[...document.querySelectorAll(l.el)]),t||(t=l.el),!(!t||t.length===0)&&(a.params.uniqueNavElements&&typeof l.el=="string"&&Array.isArray(t)&&t.length>1&&(t=[...a.el.querySelectorAll(l.el)],t.length>1&&(t=t.find(e=>c.d(e,".swiper")[0]===a.el))),Array.isArray(t)&&t.length===1&&(t=t[0]),Object.assign(a.pagination,{el:t}),t=c.m(t),t.forEach(e=>{l.type==="bullets"&&l.clickable&&e.classList.add(...(l.clickableClass||"").split(" ")),e.classList.add(l.modifierClass+l.type),e.classList.add(a.isHorizontal()?l.horizontalClass:l.verticalClass),l.type==="bullets"&&l.dynamicBullets&&(e.classList.add(`${l.modifierClass}${l.type}-dynamic`),p=0,l.dynamicMainBullets<1&&(l.dynamicMainBullets=1)),l.type==="progressbar"&&l.progressbarOpposite&&e.classList.add(l.progressbarOppositeClass),l.clickable&&e.addEventListener("click",D),a.enabled||e.classList.add(l.lockClass)}))}function M(){const l=a.params.pagination;if(k())return;let t=a.pagination.el;t&&(t=c.m(t),t.forEach(e=>{e.classList.remove(l.hiddenClass),e.classList.remove(l.modifierClass+l.type),e.classList.remove(a.isHorizontal()?l.horizontalClass:l.verticalClass),l.clickable&&(e.classList.remove(...(l.clickableClass||"").split(" ")),e.removeEventListener("click",D))})),a.pagination.bullets&&a.pagination.bullets.forEach(e=>e.classList.remove(...l.bulletActiveClass.split(" ")))}m("changeDirection",()=>{if(!a.pagination||!a.pagination.el)return;const l=a.params.pagination;let{el:t}=a.pagination;t=c.m(t),t.forEach(e=>{e.classList.remove(l.horizontalClass,l.verticalClass),e.classList.add(a.isHorizontal()?l.horizontalClass:l.verticalClass)})}),m("init",()=>{a.params.pagination.enabled===!1?S():(A(),B(),h())}),m("activeIndexChange",()=>{typeof a.snapIndex>"u"&&h()}),m("snapIndexChange",()=>{h()}),m("snapGridLengthChange",()=>{B(),h()}),m("destroy",()=>{M()}),m("enable disable",()=>{let{el:l}=a.pagination;l&&(l=c.m(l),l.forEach(t=>t.classList[a.enabled?"remove":"add"](a.params.pagination.lockClass)))}),m("lock unlock",()=>{h()}),m("click",(l,t)=>{const e=t.target,n=c.m(a.pagination.el);if(a.params.pagination.el&&a.params.pagination.hideOnClick&&n&&n.length>0&&!e.classList.contains(a.params.pagination.bulletClass)){if(a.navigation&&(a.navigation.nextEl&&e===a.navigation.nextEl||a.navigation.prevEl&&e===a.navigation.prevEl))return;const d=n[0].classList.contains(a.params.pagination.hiddenClass);v(d===!0?"paginationShow":"paginationHide"),n.forEach(C=>C.classList.toggle(a.params.pagination.hiddenClass))}});const O=()=>{a.el.classList.remove(a.params.pagination.paginationDisabledClass);let{el:l}=a.pagination;l&&(l=c.m(l),l.forEach(t=>t.classList.remove(a.params.pagination.paginationDisabledClass))),A(),B(),h()},S=()=>{a.el.classList.add(a.params.pagination.paginationDisabledClass);let{el:l}=a.pagination;l&&(l=c.m(l),l.forEach(t=>t.classList.add(a.params.pagination.paginationDisabledClass))),M()};Object.assign(a.pagination,{enable:O,disable:S,render:B,update:h,init:A,destroy:M})}module.exports=F;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const h=require("./index.cjs52.js");function j({swiper:e,extendParams:q,on:u,emit:l,params:s}){e.autoplay={running:!1,paused:!1,timeLeft:0},q({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let f,v,T=s&&s.autoplay?s.autoplay.delay:3e3,E=s&&s.autoplay?s.autoplay.delay:3e3,n,c=new Date().getTime(),b,p,d,M,r,L;function O(t){!e||e.destroyed||!e.wrapperEl||t.target===e.wrapperEl&&(e.wrapperEl.removeEventListener("transitionend",O),!(L||t.detail&&t.detail.bySwiperTouchMove)&&i())}const F=()=>{if(e.destroyed||!e.autoplay.running)return;e.autoplay.paused?b=!0:b&&(E=n,b=!1);const t=e.autoplay.paused?n:c+E-new Date().getTime();e.autoplay.timeLeft=t,l("autoplayTimeLeft",t,t/T),v=requestAnimationFrame(()=>{F()})},B=()=>{let t;return e.virtual&&e.params.virtual.enabled?t=e.slides.find(o=>o.classList.contains("swiper-slide-active")):t=e.slides[e.activeIndex],t?parseInt(t.getAttribute("data-swiper-autoplay"),10):void 0},D=()=>{let t=e.params.autoplay.delay;const a=B();return!Number.isNaN(a)&&a>0&&(t=a),t},g=t=>{if(e.destroyed||!e.autoplay.running)return;cancelAnimationFrame(v),F();let a=t;typeof a>"u"&&(a=D(),T=a,E=a),n=a;const o=e.params.speed,S=()=>{!e||e.destroyed||(e.params.autoplay.reverseDirection?!e.isBeginning||e.params.loop||e.params.rewind?(e.slidePrev(o,!0,!0),l("autoplay")):e.params.autoplay.stopOnLastSlide||(e.slideTo(e.slides.length-1,o,!0,!0),l("autoplay")):!e.isEnd||e.params.loop||e.params.rewind?(e.slideNext(o,!0,!0),l("autoplay")):e.params.autoplay.stopOnLastSlide||(e.slideTo(0,o,!0,!0),l("autoplay")),e.params.cssMode&&(c=new Date().getTime(),requestAnimationFrame(()=>{g()})))};return a>0?(clearTimeout(f),f=setTimeout(()=>{S()},a)):requestAnimationFrame(()=>{S()}),a},I=()=>{c=new Date().getTime(),e.autoplay.running=!0,g(),l("autoplayStart")},m=()=>{e.autoplay.running=!1,clearTimeout(f),cancelAnimationFrame(v),l("autoplayStop")},y=(t,a)=>{if(e.destroyed||!e.autoplay.running)return;clearTimeout(f),t||(r=!0);const o=()=>{l("autoplayPause"),e.params.autoplay.waitForTransition?e.wrapperEl.addEventListener("transitionend",O):i()};if(e.autoplay.paused=!0,a){o();return}n=(n||e.params.autoplay.delay)-(new Date().getTime()-c),!(e.isEnd&&n<0&&!e.params.loop)&&(n<0&&(n=0),o())},i=()=>{e.isEnd&&n<0&&!e.params.loop||e.destroyed||!e.autoplay.running||(c=new Date().getTime(),r?(r=!1,g(n)):g(),e.autoplay.paused=!1,l("autoplayResume"))},A=()=>{if(e.destroyed||!e.autoplay.running)return;const t=h.g();t.visibilityState==="hidden"&&(r=!0,y(!0)),t.visibilityState==="visible"&&i()},P=t=>{t.pointerType==="mouse"&&(r=!0,L=!0,!(e.animating||e.autoplay.paused)&&y(!0))},N=t=>{t.pointerType==="mouse"&&(L=!1,e.autoplay.paused&&i())},_=()=>{e.params.autoplay.pauseOnMouseEnter&&(e.el.addEventListener("pointerenter",P),e.el.addEventListener("pointerleave",N))},x=()=>{e.el&&typeof e.el!="string"&&(e.el.removeEventListener("pointerenter",P),e.el.removeEventListener("pointerleave",N))},C=()=>{h.g().addEventListener("visibilitychange",A)},R=()=>{h.g().removeEventListener("visibilitychange",A)};u("init",()=>{e.params.autoplay.enabled&&(_(),C(),I())}),u("destroy",()=>{x(),R(),e.autoplay.running&&m()}),u("_freeModeStaticRelease",()=>{(d||r)&&i()}),u("_freeModeNoMomentumRelease",()=>{e.params.autoplay.disableOnInteraction?m():y(!0,!0)}),u("beforeTransitionStart",(t,a,o)=>{e.destroyed||!e.autoplay.running||(o||!e.params.autoplay.disableOnInteraction?y(!0,!0):m())}),u("sliderFirstMove",()=>{if(!(e.destroyed||!e.autoplay.running)){if(e.params.autoplay.disableOnInteraction){m();return}p=!0,d=!1,r=!1,M=setTimeout(()=>{r=!0,d=!0,y(!0)},200)}}),u("touchEnd",()=>{if(!(e.destroyed||!e.autoplay.running||!p)){if(clearTimeout(M),clearTimeout(f),e.params.autoplay.disableOnInteraction){d=!1,p=!1;return}d&&e.params.cssMode&&i(),d=!1,p=!1}}),u("slideChange",()=>{e.destroyed||!e.autoplay.running||e.autoplay.paused&&(n=D(),T=D())}),Object.assign(e.autoplay,{start:I,stop:m,pause:y,resume:i})}module.exports=j;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),W=require("./index.cjs42.js"),k=require("./index.cjs43.js"),p=require("./index.cjs44.js");function L(){return L=Object.assign?Object.assign.bind():function(a){for(var n=1;n<arguments.length;n++){var s=arguments[n];for(var t in s)Object.prototype.hasOwnProperty.call(s,t)&&(a[t]=s[t])}return a},L.apply(this,arguments)}function q(a){return a.type&&a.type.displayName&&a.type.displayName.includes("SwiperSlide")}function A(a){const n=[];return e.Children.toArray(a).forEach(s=>{q(s)?n.push(s):s.props&&s.props.children&&A(s.props.children).forEach(t=>n.push(t))}),n}function G(a){const n=[],s={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return e.Children.toArray(a).forEach(t=>{if(q(t))n.push(t);else if(t.props&&t.props.slot&&s[t.props.slot])s[t.props.slot].push(t);else if(t.props&&t.props.children){const u=A(t.props.children);u.length>0?u.forEach(d=>n.push(d)):s["container-end"].push(t)}else s["container-end"].push(t)}),{slides:n,slots:s}}function J(a,n,s){if(!s)return null;const t=i=>{let o=i;return i<0?o=n.length+i:o>=n.length&&(o=o-n.length),o},u=a.isHorizontal()?{[a.rtlTranslate?"right":"left"]:`${s.offset}px`}:{top:`${s.offset}px`},{from:d,to:S}=s,w=a.params.loop?-n.length:0,C=a.params.loop?n.length*2:n.length,g=[];for(let i=w;i<C;i+=1)i>=d&&i<=S&&g.push(n[t(i)]);return g.map((i,o)=>e.cloneElement(i,{swiper:a,style:u,key:i.props.virtualIndex||i.key||`slide-${o}`}))}function P(a,n){return typeof window>"u"?e.useEffect(a,n):e.useLayoutEffect(a,n)}const T=e.createContext(null),K=e.createContext(null),V=e.forwardRef(({className:a,tag:n="div",wrapperTag:s="div",children:t,onSwiper:u,...d}={},S)=>{let w=!1;const[C,g]=e.useState("swiper"),[i,o]=e.useState(null),[b,O]=e.useState(!1),N=e.useRef(!1),m=e.useRef(null),r=e.useRef(null),h=e.useRef(null),$=e.useRef(null),c=e.useRef(null),x=e.useRef(null),R=e.useRef(null),_=e.useRef(null),{params:f,passedParams:z,rest:F,events:v}=k.g(d),{slides:y,slots:j}=G(t),B=()=>{O(!b)};Object.assign(f.on,{_containerClasses(l,E){g(E)}});const I=()=>{Object.assign(f.on,v),w=!0;const l={...f};if(delete l.wrapperClass,r.current=new W.S(l),r.current.virtual&&r.current.params.virtual.enabled){r.current.virtual.slides=y;const E={cache:!1,slides:y,renderExternal:o,renderExternalUpdate:!1};p.e(r.current.params.virtual,E),p.e(r.current.originalParams.virtual,E)}};m.current||I(),r.current&&r.current.on("_beforeBreakpoint",B);const D=()=>{w||!v||!r.current||Object.keys(v).forEach(l=>{r.current.on(l,v[l])})},H=()=>{!v||!r.current||Object.keys(v).forEach(l=>{r.current.off(l,v[l])})};e.useEffect(()=>()=>{r.current&&r.current.off("_beforeBreakpoint",B)}),e.useEffect(()=>{!N.current&&r.current&&(r.current.emitSlidesClasses(),N.current=!0)}),P(()=>{if(S&&(S.current=m.current),!!m.current)return r.current.destroyed&&I(),k.m({el:m.current,nextEl:c.current,prevEl:x.current,paginationEl:R.current,scrollbarEl:_.current,swiper:r.current},f),u&&!r.current.destroyed&&u(r.current),()=>{r.current&&!r.current.destroyed&&r.current.destroy(!0,!1)}},[]),P(()=>{D();const l=k.a(z,h.current,y,$.current,E=>E.key);return h.current=z,$.current=y,l.length&&r.current&&!r.current.destroyed&&p.u({swiper:r.current,slides:y,passedParams:z,changedParams:l,nextEl:c.current,prevEl:x.current,scrollbarEl:_.current,paginationEl:R.current}),()=>{H()}}),P(()=>{k.u(r.current)},[i]);function U(){return f.virtual?J(r.current,y,i):y.map((l,E)=>e.cloneElement(l,{swiper:r.current,swiperSlideIndex:E}))}return e.createElement(n,L({ref:m,className:p.d(`${C}${a?` ${a}`:""}`)},F),e.createElement(K.Provider,{value:r.current},j["container-start"],e.createElement(s,{className:p.w(f.wrapperClass)},j["wrapper-start"],U(),j["wrapper-end"]),p.n(f)&&e.createElement(e.Fragment,null,e.createElement("div",{ref:x,className:"swiper-button-prev"}),e.createElement("div",{ref:c,className:"swiper-button-next"})),p.b(f)&&e.createElement("div",{ref:_,className:"swiper-scrollbar"}),p.a(f)&&e.createElement("div",{ref:R,className:"swiper-pagination"}),j["container-end"]))});V.displayName="Swiper";const M=e.forwardRef(({tag:a="div",children:n,className:s="",swiper:t,zoom:u,lazy:d,virtualIndex:S,swiperSlideIndex:w,...C}={},g)=>{const i=e.useRef(null),[o,b]=e.useState("swiper-slide"),[O,N]=e.useState(!1);function m(c,x,R){x===i.current&&b(R)}P(()=>{if(typeof w<"u"&&(i.current.swiperSlideIndex=w),g&&(g.current=i.current),!(!i.current||!t)){if(t.destroyed){o!=="swiper-slide"&&b("swiper-slide");return}return t.on("_slideClass",m),()=>{t&&t.off("_slideClass",m)}}}),P(()=>{t&&i.current&&!t.destroyed&&b(t.getSlideClasses(i.current))},[t]);const r={isActive:o.indexOf("swiper-slide-active")>=0,isVisible:o.indexOf("swiper-slide-visible")>=0,isPrev:o.indexOf("swiper-slide-prev")>=0,isNext:o.indexOf("swiper-slide-next")>=0},h=()=>typeof n=="function"?n(r):n,$=()=>{N(!0)};return e.createElement(a,L({ref:i,className:p.d(`${o}${s?` ${s}`:""}`),"data-swiper-slide-index":S,onLoad:$},C),u&&e.createElement(T.Provider,{value:r},e.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof u=="number"?u:void 0},h(),d&&!O&&e.createElement("div",{className:"swiper-lazy-preloader",ref:c=>{c&&(c.lazyPreloaderManaged=!0)}}))),!u&&e.createElement(T.Provider,{value:r},h(),d&&!O&&e.createElement("div",{className:"swiper-lazy-preloader",ref:c=>{c&&(c.lazyPreloaderManaged=!0)}})))});M.displayName="SwiperSlide";exports.Swiper=V;exports.SwiperSlide=M;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});;/* empty css */;/* empty css */var r="_1tx42e51",t="_1tx42e52",e="_1tx42e53",o="_1tx42e54",a="_1tx42e55",v="_1tx42e56";exports.arrowBtn=r;exports.arrowNext=e;exports.arrowPrev=t;exports.dot=a;exports.dotActive=v;exports.dots=o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});;/* empty css */;/* empty css */var e="_1uy0wep0",r="_1uy0wep1";exports.heading=r;exports.root=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});;/* empty css */;/* empty css */var e="w40enx1",r="w40enx2",a="w40enx3",n="w40enx4",i="w40enx5",t="w40enx6",l="w40enx7",v="w40enx8",w="w40enx9",x="w40enxa",o="w40enxb",s="w40enxc",p="w40enxd",u="w40enxe",b="w40enxf",g="w40enxg",c="w40enxh",m="w40enxi",k="w40enxk w40enxj",y="w40enxl w40enxj",d="w40enxm w40enxj";exports.badgeOverlay=n;exports.body=t;exports.footer=b;exports.image=a;exports.imageWrapper=r;exports.installments=u;exports.originalPrice=p;exports.price=s;exports.priceWrapper=o;exports.quickViewBtn=g;exports.reviewCount=x;exports.root=e;exports.skeletonBtn=d;exports.skeletonImage=k;exports.skeletonLine=y;exports.starsWrapper=w;exports.subtitle=v;exports.title=l;exports.unavailableOverlay=c;exports.unavailableText=m;exports.wishlistBtn=i;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});;/* empty css */;/* empty css */const e=require("./index.cjs34.js");var a=e.c({defaultClassName:"_19yozed0",variantClassNames:{maxWidth:{sm:"_19yozed1",md:"_19yozed2",lg:"_19yozed3",xl:"_19yozed4",full:"_19yozed5"}},defaultVariants:{maxWidth:"xl"},compoundVariants:[]});exports.containerRecipe=a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),j=require("./index.cjs15.js");function p({variant:r="primary",size:s="md",fullWidth:l=!1,loading:t=!1,disabled:a=!1,leftIcon:i,rightIcon:n,onClick:o,children:d,type:u="button",className:c}){const h=j.buttonRecipe({variant:r,size:s,fullWidth:l||void 0});return e.jsx("button",{type:u,className:[h,c].filter(Boolean).join(" "),disabled:a||t,onClick:o,"aria-busy":t,children:t?e.jsx("output",{"aria-label":"Cargando",style:{display:"inline-flex",alignItems:"center"},children:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",style:{animation:"spin 0.75s linear infinite"},"aria-hidden":"true",children:e.jsx("path",{d:"M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83"})})}):e.jsxs(e.Fragment,{children:[i&&e.jsx("span",{"aria-hidden":"true",children:i}),d,n&&e.jsx("span",{"aria-hidden":"true",children:n})]})})}exports.Button=p;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});;/* empty css */var e="_15r2pp40";exports.stackBase=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|