luna-components-library 1.1.23 → 1.1.25
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 +295 -10
- package/dist/luna-components-library.js +164 -2
- package/dist/luna-components-library.js.map +1 -1
- package/dist/src/components/Accordion.d.ts +0 -3
- package/dist/src/components/Anchor.d.ts +5 -2
- package/dist/src/components/Button.d.ts +4 -2
- package/dist/src/components/Card.d.ts +4 -2
- package/dist/src/components/Preloader.d.ts +1 -2
- package/dist/src/components/ProgressBar.d.ts +7 -6
- package/dist/src/components/ScrollTop.d.ts +31 -0
- package/dist/src/components/Spinner.d.ts +4 -2
- package/dist/src/components/Typed.d.ts +4 -4
- package/dist/src/components/WhatsApp.d.ts +27 -0
- package/dist/src/components/index.d.ts +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -41,10 +41,13 @@ module.exports = {
|
|
|
41
41
|
}
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
+
**💡 Tailwind CSS Best Practices with Luna Library:**
|
|
45
|
+
To ensure Tailwind CSS successfully generates and includes the necessary utility classes in your target project's build, it is highly recommended to explicitly provide all necessary styling and positioning classes via the `className` prop for each component you use. By manually specifying these classes (e.g., `className="bg-blue-600 text-white p-4"`), you guarantee that Tailwind's scanner in your main project detects them and includes them in your final CSS file without relying exclusively on the node_modules parser.
|
|
46
|
+
|
|
44
47
|
## 🚀 Quick Start
|
|
45
48
|
|
|
46
49
|
```jsx
|
|
47
|
-
import { Button, Card, Anchor, Accordion, Spinner, DropDown, ProgressBar } from 'luna-components-library';
|
|
50
|
+
import { Button, Card, Anchor, Accordion, Spinner, DropDown, ProgressBar, Preloader, ScrollTop } from 'luna-components-library';
|
|
48
51
|
|
|
49
52
|
function App() {
|
|
50
53
|
return (
|
|
@@ -100,6 +103,19 @@ function App() {
|
|
|
100
103
|
min={0}
|
|
101
104
|
aria-label="Upload progress"
|
|
102
105
|
/>
|
|
106
|
+
|
|
107
|
+
<Preloader
|
|
108
|
+
isLoading={isLoading}
|
|
109
|
+
duration={2000}
|
|
110
|
+
onComplete={() => setIsLoading(false)}
|
|
111
|
+
/>
|
|
112
|
+
|
|
113
|
+
<ScrollTop
|
|
114
|
+
threshold={200}
|
|
115
|
+
position="bottom-right"
|
|
116
|
+
size="md"
|
|
117
|
+
className="bg-blue-600 hover:bg-blue-700"
|
|
118
|
+
/>
|
|
103
119
|
</div>
|
|
104
120
|
);
|
|
105
121
|
}
|
|
@@ -107,6 +123,8 @@ function App() {
|
|
|
107
123
|
|
|
108
124
|
## 🧩 Components
|
|
109
125
|
|
|
126
|
+
All components use TypeScript with specific types for better type safety and IntelliSense. The library follows a minimal documentation approach with descriptive type names instead of extensive JSDoc comments.
|
|
127
|
+
|
|
110
128
|
### Button
|
|
111
129
|
A versatile button component with multiple variants and sizes.
|
|
112
130
|
|
|
@@ -124,12 +142,18 @@ A versatile button component with multiple variants and sizes.
|
|
|
124
142
|
|
|
125
143
|
**Props:**
|
|
126
144
|
- `children`: React.ReactNode - Button content
|
|
127
|
-
- `variant?:
|
|
128
|
-
- `size?:
|
|
145
|
+
- `variant?: ButtonVariant` - Button style (default: 'primary')
|
|
146
|
+
- `size?: ButtonSize` - Button size (default: 'md')
|
|
129
147
|
- `onClick?: () => void` - Click handler
|
|
130
148
|
- `disabled?: boolean` - Disable button (default: false)
|
|
131
149
|
- `className?: string` - Additional CSS classes
|
|
132
150
|
|
|
151
|
+
**Types:**
|
|
152
|
+
```typescript
|
|
153
|
+
type ButtonVariant = 'primary' | 'secondary' | 'outline';
|
|
154
|
+
type ButtonSize = 'sm' | 'md' | 'lg';
|
|
155
|
+
```
|
|
156
|
+
|
|
133
157
|
**Variants:**
|
|
134
158
|
- `primary` - Blue background button
|
|
135
159
|
- `secondary` - Gray background button
|
|
@@ -153,8 +177,14 @@ A flexible card component for displaying content with various padding and shadow
|
|
|
153
177
|
- `children`: React.ReactNode - Card content
|
|
154
178
|
- `title?: string` - Card title (optional)
|
|
155
179
|
- `className?: string` - Additional CSS classes
|
|
156
|
-
- `padding?:
|
|
157
|
-
- `shadow?:
|
|
180
|
+
- `padding?: CardPadding` - Internal padding (default: 'md')
|
|
181
|
+
- `shadow?: CardShadow` - Shadow depth (default: 'md')
|
|
182
|
+
|
|
183
|
+
**Types:**
|
|
184
|
+
```typescript
|
|
185
|
+
type CardPadding = 'none' | 'sm' | 'md' | 'lg';
|
|
186
|
+
type CardShadow = 'none' | 'sm' | 'md' | 'lg';
|
|
187
|
+
```
|
|
158
188
|
|
|
159
189
|
### Anchor
|
|
160
190
|
A styled link component that opens in a new tab with customizable variants and sizes.
|
|
@@ -172,11 +202,17 @@ A styled link component that opens in a new tab with customizable variants and s
|
|
|
172
202
|
|
|
173
203
|
**Props:**
|
|
174
204
|
- `children?: React.ReactNode` - Link content (default: "Pablo Andrey Chacon Luna")
|
|
175
|
-
- `variant?:
|
|
176
|
-
- `size?:
|
|
205
|
+
- `variant?: AnchorVariant` - Link style (default: 'primary')
|
|
206
|
+
- `size?: AnchorSize` - Link size (default: 'sm')
|
|
177
207
|
- `href?: string` - URL to link to (default: 'https://andreychaconresumereact.netlify.app/')
|
|
178
208
|
- `className?: string` - Additional CSS classes
|
|
179
209
|
|
|
210
|
+
**Types:**
|
|
211
|
+
```typescript
|
|
212
|
+
type AnchorVariant = 'none' | 'primary' | 'secondary' | 'outline';
|
|
213
|
+
type AnchorSize = 'sm' | 'md' | 'lg';
|
|
214
|
+
```
|
|
215
|
+
|
|
180
216
|
### Accordion
|
|
181
217
|
A collapsible content component with customizable header and content sections.
|
|
182
218
|
|
|
@@ -198,14 +234,25 @@ A collapsible content component with customizable header and content sections.
|
|
|
198
234
|
- `content: React.ReactNode` - Content to show when expanded
|
|
199
235
|
|
|
200
236
|
### Spinner
|
|
201
|
-
A loading spinner component with customizable
|
|
237
|
+
A loading spinner component with customizable types and animations.
|
|
202
238
|
|
|
203
239
|
```jsx
|
|
204
|
-
<Spinner className="custom-spinner" />
|
|
240
|
+
<Spinner size="md" type="circle" className="custom-spinner" />
|
|
205
241
|
```
|
|
206
242
|
|
|
207
243
|
**Props:**
|
|
208
|
-
- `className?: string` - Additional CSS classes
|
|
244
|
+
- `className?: string` - Additional CSS classes
|
|
245
|
+
- `containerClassName?: string` - CSS classes for the container element
|
|
246
|
+
- `dotClassName?: string` - CSS classes for dot elements
|
|
247
|
+
- `barClassName?: string` - CSS classes for bar elements
|
|
248
|
+
- `size?: SpinnerSize` - Spinner size (default: 'md')
|
|
249
|
+
- `type?: SpinnerType` - Spinner animation type (default: 'circle')
|
|
250
|
+
|
|
251
|
+
**Types:**
|
|
252
|
+
```typescript
|
|
253
|
+
type SpinnerSize = 'sm' | 'md' | 'lg';
|
|
254
|
+
type SpinnerType = 'circle' | 'dots' | 'pulse' | 'bars';
|
|
255
|
+
```
|
|
209
256
|
|
|
210
257
|
### DropDown
|
|
211
258
|
A dropdown menu component with customizable toggle and options.
|
|
@@ -254,6 +301,241 @@ A progress bar component with customizable progress values and accessibility.
|
|
|
254
301
|
- `max: number` - Maximum progress value
|
|
255
302
|
- `min: number` - Minimum progress value
|
|
256
303
|
- `aria-label: string` - Accessibility label
|
|
304
|
+
- `className?: React.CSSProperties` - Custom CSS properties for styling
|
|
305
|
+
- `style?: React.CSSProperties` - Additional inline styles
|
|
306
|
+
- `containerClassName?: string` - CSS classes for the container element
|
|
307
|
+
- `barClassName?: string` - CSS classes for the progress bar element
|
|
308
|
+
- `variant?: ProgressBarVariant` - Color variant (default: 'primary')
|
|
309
|
+
|
|
310
|
+
**Types:**
|
|
311
|
+
```typescript
|
|
312
|
+
type ProgressBarVariant = 'primary' | 'success' | 'warning' | 'danger' | 'dark' | 'light';
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
### Preloader
|
|
316
|
+
A fullscreen overlay preloader component with customizable spinner and auto-hide functionality.
|
|
317
|
+
|
|
318
|
+
```jsx
|
|
319
|
+
<Preloader
|
|
320
|
+
isLoading={isLoading}
|
|
321
|
+
duration={2000}
|
|
322
|
+
backgroundColor="#1a1a1a"
|
|
323
|
+
accentColor="#00ff88"
|
|
324
|
+
size={90}
|
|
325
|
+
borderWidth={6}
|
|
326
|
+
onComplete={() => setIsLoading(false)}
|
|
327
|
+
/>
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
**Props:**
|
|
331
|
+
- `isLoading?: boolean` - Whether the preloader should be visible (if not provided, uses internal state)
|
|
332
|
+
- `duration?: number` - Duration in milliseconds before auto-hide (default: 1000)
|
|
333
|
+
- `backgroundColor?: string` - Background color of the overlay (default: CSS variable)
|
|
334
|
+
- `accentColor?: string` - Color of the spinner (default: CSS variable)
|
|
335
|
+
- `size?: number` - Size of the spinner in pixels (default: 60)
|
|
336
|
+
- `borderWidth?: number` - Border width of the spinner (default: 6)
|
|
337
|
+
- `className?: string` - Additional CSS classes for the overlay
|
|
338
|
+
- `spinnerClassName?: string` - Additional CSS classes for the spinner
|
|
339
|
+
- `zIndex?: number` - Z-index of the overlay (default: 999999)
|
|
340
|
+
- `onComplete?: () => void` - Callback when preloader finishes
|
|
341
|
+
|
|
342
|
+
**Usage Modes:**
|
|
343
|
+
- **Controlled:** Use `isLoading` prop to control visibility externally
|
|
344
|
+
- **Auto-hide:** Omit `isLoading` prop to auto-hide after `duration`
|
|
345
|
+
|
|
346
|
+
**Examples:**
|
|
347
|
+
```jsx
|
|
348
|
+
// Controlled mode
|
|
349
|
+
const [loading, setLoading] = useState(false);
|
|
350
|
+
<Preloader isLoading={loading} onComplete={() => setLoading(false)} />
|
|
351
|
+
|
|
352
|
+
// Auto-hide mode
|
|
353
|
+
<Preloader duration={3000} />
|
|
354
|
+
|
|
355
|
+
// Custom styling
|
|
356
|
+
<Preloader
|
|
357
|
+
isLoading={true}
|
|
358
|
+
backgroundColor="rgba(0,0,0,0.8)"
|
|
359
|
+
accentColor="#ff6b6b"
|
|
360
|
+
size={120}
|
|
361
|
+
borderWidth={8}
|
|
362
|
+
/>
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
### ScrollTop
|
|
366
|
+
A floating scroll-to-top button that appears when the user scrolls down the page.
|
|
367
|
+
|
|
368
|
+
```jsx
|
|
369
|
+
<ScrollTop
|
|
370
|
+
threshold={200}
|
|
371
|
+
position="bottom-right"
|
|
372
|
+
size="md"
|
|
373
|
+
className="bg-blue-600 hover:bg-blue-700"
|
|
374
|
+
/>
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
**💡 Tip for Bootstrap / Existing CSS Frameworks:**
|
|
378
|
+
If you are using this library in a project that also uses Bootstrap (or another framework), you may need to explicitly declare all Tailwind positioning and styling classes and mark them with `!` (important) to ensure they have priority over Bootstrap's default styles (which can override border-radius or positioning). For example:
|
|
379
|
+
|
|
380
|
+
```jsx
|
|
381
|
+
<ScrollTop
|
|
382
|
+
size="sm"
|
|
383
|
+
scrollPercentage={5}
|
|
384
|
+
className="!bg-indigo-600 hover:!bg-indigo-700 !text-white !rounded-full !z-[9999] !w-10 !h-10 flex items-center justify-center !right-8 !bottom-8 !fixed"
|
|
385
|
+
position="bottom-right"
|
|
386
|
+
>
|
|
387
|
+
<i className="bi bi-arrow-up"></i>
|
|
388
|
+
</ScrollTop>
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
**Props:**
|
|
392
|
+
- `threshold?: number` - Scroll position threshold to show the button in pixels (default: 100)
|
|
393
|
+
- `className?: string` - Additional CSS classes for the button
|
|
394
|
+
- `children?: React.ReactNode` - Custom icon/content for the button (default: arrow up)
|
|
395
|
+
- `position?: 'bottom-right' | 'bottom-left' | 'bottom-center' | 'top-right' | 'top-left' | 'top-center'` - Button position (default: 'bottom-right')
|
|
396
|
+
- `size?: 'sm' | 'md' | 'lg'` - Button size (default: 'md')
|
|
397
|
+
- `shape?: 'circle' | 'square' | 'rounded'` - Button shape (default: 'circle')
|
|
398
|
+
- `showInitially?: boolean` - Whether to show the button initially (default: false)
|
|
399
|
+
- `scrollBehavior?: 'auto' | 'smooth'` - Scroll behavior (default: 'smooth')
|
|
400
|
+
- `style?: React.CSSProperties` - Custom styles
|
|
401
|
+
- `onClick?: () => void` - Callback when button is clicked
|
|
402
|
+
- `onVisibilityChange?: (isVisible: boolean) => void` - Callback when visibility changes
|
|
403
|
+
- `targetElement?: string` - Element ID or selector to check visibility for showing the button
|
|
404
|
+
- `scrollPercentage?: number` - Percentage of page scroll to show the button (0-100)
|
|
405
|
+
|
|
406
|
+
**Position Options:**
|
|
407
|
+
- `bottom-right` - Fixed bottom right
|
|
408
|
+
- `bottom-left` - Fixed bottom left
|
|
409
|
+
- `bottom-center` - Fixed bottom center
|
|
410
|
+
- `top-right` - Fixed top right
|
|
411
|
+
- `top-left` - Fixed top left
|
|
412
|
+
- `top-center` - Fixed top center
|
|
413
|
+
|
|
414
|
+
**Size Options:**
|
|
415
|
+
- `sm` - Small (32x32px)
|
|
416
|
+
- `md` - Medium (48x48px)
|
|
417
|
+
- `lg` - Large (64x64px)
|
|
418
|
+
|
|
419
|
+
**Shape Options:**
|
|
420
|
+
- `circle` - Fully rounded
|
|
421
|
+
- `square` - Square corners
|
|
422
|
+
- `rounded` - Slightly rounded
|
|
423
|
+
|
|
424
|
+
**Examples:**
|
|
425
|
+
```jsx
|
|
426
|
+
// Default usage with target element
|
|
427
|
+
<ScrollTop targetElement="#default-target" />
|
|
428
|
+
|
|
429
|
+
// Custom position and size
|
|
430
|
+
<ScrollTop
|
|
431
|
+
position="bottom-left"
|
|
432
|
+
size="lg"
|
|
433
|
+
targetElement="#custom-target"
|
|
434
|
+
className="bg-purple-600 hover:bg-purple-700"
|
|
435
|
+
/>
|
|
436
|
+
|
|
437
|
+
// Top position with small size
|
|
438
|
+
<ScrollTop
|
|
439
|
+
position="top-right"
|
|
440
|
+
size="sm"
|
|
441
|
+
targetElement="#top-target"
|
|
442
|
+
className="bg-green-600 hover:bg-green-700"
|
|
443
|
+
/>
|
|
444
|
+
|
|
445
|
+
// Center position with custom color
|
|
446
|
+
<ScrollTop
|
|
447
|
+
position="top-center"
|
|
448
|
+
size="sm"
|
|
449
|
+
targetElement="#center-target"
|
|
450
|
+
className="bg-blue-600 hover:bg-blue-700"
|
|
451
|
+
/>
|
|
452
|
+
|
|
453
|
+
// Percentage-based triggering
|
|
454
|
+
<ScrollTop
|
|
455
|
+
position="bottom-center"
|
|
456
|
+
size="lg"
|
|
457
|
+
scrollPercentage={99}
|
|
458
|
+
className="bg-indigo-600 hover:bg-indigo-700"
|
|
459
|
+
>
|
|
460
|
+
<span className="text-white font-bold">Top</span>
|
|
461
|
+
</ScrollTop>
|
|
462
|
+
|
|
463
|
+
// Custom icon with callbacks
|
|
464
|
+
<ScrollTop
|
|
465
|
+
targetElement="#footer"
|
|
466
|
+
onVisibilityChange={(visible) => console.log('Visible:', visible)}
|
|
467
|
+
onClick={() => console.log('Scrolled to top!')}
|
|
468
|
+
>
|
|
469
|
+
<span className="text-white font-bold">↑</span>
|
|
470
|
+
</ScrollTop>
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
### Typed
|
|
474
|
+
A typing animation component that types and deletes text in sequence.
|
|
475
|
+
|
|
476
|
+
```jsx
|
|
477
|
+
<Typed
|
|
478
|
+
strings={['Hello', 'World', 'React']}
|
|
479
|
+
typeSpeed={50}
|
|
480
|
+
backSpeed={30}
|
|
481
|
+
loop={true}
|
|
482
|
+
className="typed-text"
|
|
483
|
+
/>
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
**Props:**
|
|
487
|
+
- `strings: string[]` - Array of strings to type in sequence
|
|
488
|
+
- `typeSpeed?: number` - Speed of typing in milliseconds per character (default: 50)
|
|
489
|
+
- `backSpeed?: number` - Speed of backspacing in milliseconds per character (default: 30)
|
|
490
|
+
- `backDelay?: number` - Delay before backspacing starts in milliseconds (default: 500)
|
|
491
|
+
- `startDelay?: number` - Delay before typing starts in milliseconds (default: 0)
|
|
492
|
+
- `loop?: boolean` - Whether to loop through strings indefinitely (default: true)
|
|
493
|
+
- `showCursor?: boolean` - Whether to show a blinking cursor (default: true)
|
|
494
|
+
- `className?: string` - Additional CSS classes for the component
|
|
495
|
+
- `containerClassName?: string` - CSS classes for the container element
|
|
496
|
+
- `typedClassName?: string` - CSS classes for the typed text
|
|
497
|
+
- `cursorClassName?: string` - CSS classes for the cursor
|
|
498
|
+
- `style?: TypedStyle` - Custom CSS properties for styling
|
|
499
|
+
|
|
500
|
+
**Types:**
|
|
501
|
+
```typescript
|
|
502
|
+
type TypedStyle = CSSProperties & {
|
|
503
|
+
animation?: string;
|
|
504
|
+
animationDelay?: string;
|
|
505
|
+
};
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
### WhatsApp
|
|
509
|
+
A WhatsApp button component for quick contact integration.
|
|
510
|
+
|
|
511
|
+
```jsx
|
|
512
|
+
<WhatsApp
|
|
513
|
+
phone="1234567890"
|
|
514
|
+
message="Hello! I need help."
|
|
515
|
+
position="bottom-right"
|
|
516
|
+
size="md"
|
|
517
|
+
className="custom-whatsapp"
|
|
518
|
+
/>
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
**Props:**
|
|
522
|
+
- `phone?: string` - Phone number for WhatsApp (with country code, without + or spaces)
|
|
523
|
+
- `message?: string` - Default message to send (default: "¡Hola! Me gustaría obtener más información.")
|
|
524
|
+
- `position?: WhatsAppPosition` - Position of the button (default: 'bottom-right')
|
|
525
|
+
- `size?: WhatsAppSize` - Size of the button (default: 'md')
|
|
526
|
+
- `showTooltip?: boolean` - Show tooltip on hover (default: true)
|
|
527
|
+
- `tooltipText?: string` - Tooltip text
|
|
528
|
+
- `className?: string` - Additional CSS classes for the button
|
|
529
|
+
- `style?: React.CSSProperties` - Custom styles
|
|
530
|
+
- `onClick?: () => void` - Callback when button is clicked
|
|
531
|
+
- `zIndex?: number` - Z-index for the button
|
|
532
|
+
- `openInNewTab?: boolean` - Whether to open in new tab (default: true)
|
|
533
|
+
|
|
534
|
+
**Types:**
|
|
535
|
+
```typescript
|
|
536
|
+
type WhatsAppPosition = 'bottom-right' | 'bottom-left' | 'bottom-center' | 'top-right' | 'top-left' | 'top-center';
|
|
537
|
+
type WhatsAppSize = 'sm' | 'md' | 'lg';
|
|
538
|
+
```
|
|
257
539
|
|
|
258
540
|
## 🛠️ Development
|
|
259
541
|
|
|
@@ -294,6 +576,9 @@ luna-library/
|
|
|
294
576
|
│ │ ├── Spinner.tsx
|
|
295
577
|
│ │ ├── DropDown.tsx
|
|
296
578
|
│ │ ├── ProgressBar.tsx
|
|
579
|
+
│ │ ├── Preloader.tsx
|
|
580
|
+
│ │ ├── ScrollTop.tsx
|
|
581
|
+
│ │ ├── WhatsApp.tsx
|
|
297
582
|
│ │ └── index.ts
|
|
298
583
|
│ └── index.ts
|
|
299
584
|
├── dist/ # Build output
|
|
@@ -93,7 +93,7 @@ var Card = ({ children, title, className = "", containerClassName = "bg-white ro
|
|
|
93
93
|
};
|
|
94
94
|
//#endregion
|
|
95
95
|
//#region src/components/Anchor.tsx
|
|
96
|
-
var Anchor = ({ children = "Pablo Andrey Chacon Luna", variant = "
|
|
96
|
+
var Anchor = ({ children = "Pablo Andrey Chacon Luna", variant = "none", size = "sm", href = "https://andreychaconresumereact.netlify.app/", className, containerClassName = "font-medium rounded-lg transition-colors focus:outline-none focus:ring-2", variantClassName = "bg-blue-600 text-white hover:bg-blue-700", sizeClassName = "px-3 py-1.5 text-sm", target = "_blank", rel = "noopener noreferrer" }) => {
|
|
97
97
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", {
|
|
98
98
|
href,
|
|
99
99
|
target,
|
|
@@ -101,6 +101,7 @@ var Anchor = ({ children = "Pablo Andrey Chacon Luna", variant = "primary", size
|
|
|
101
101
|
className: `
|
|
102
102
|
${containerClassName}
|
|
103
103
|
${{
|
|
104
|
+
none: "",
|
|
104
105
|
primary: "bg-blue-600 text-white hover:bg-blue-700",
|
|
105
106
|
secondary: "bg-gray-600 text-white hover:bg-gray-700",
|
|
106
107
|
outline: "border border-gray-300 text-gray-700 hover:bg-gray-50"
|
|
@@ -455,6 +456,167 @@ var Preloader = ({ isLoading: externalLoading, duration = 1e3, backgroundColor,
|
|
|
455
456
|
` })] });
|
|
456
457
|
};
|
|
457
458
|
//#endregion
|
|
458
|
-
|
|
459
|
+
//#region src/components/ScrollTop.tsx
|
|
460
|
+
var ScrollTop = ({ threshold = 100, className = "", children, position = "bottom-right", size = "md", shape = "circle", showInitially = false, scrollBehavior = "smooth", style, onClick, onVisibilityChange, targetElement, scrollPercentage }) => {
|
|
461
|
+
const [isVisible, setIsVisible] = useState(showInitially);
|
|
462
|
+
useEffect(() => {
|
|
463
|
+
const toggleVisibility = () => {
|
|
464
|
+
let shouldBeVisible = false;
|
|
465
|
+
if (scrollPercentage !== void 0) {
|
|
466
|
+
const maxScroll = document.documentElement.scrollHeight - window.innerHeight;
|
|
467
|
+
shouldBeVisible = window.scrollY / maxScroll * 100 >= scrollPercentage;
|
|
468
|
+
} else if (targetElement) {
|
|
469
|
+
const element = document.querySelector(targetElement);
|
|
470
|
+
if (element) {
|
|
471
|
+
const rect = element.getBoundingClientRect();
|
|
472
|
+
shouldBeVisible = rect.top < window.innerHeight && rect.bottom > 0;
|
|
473
|
+
} else shouldBeVisible = window.scrollY > threshold;
|
|
474
|
+
} else shouldBeVisible = window.scrollY > threshold;
|
|
475
|
+
setIsVisible(shouldBeVisible);
|
|
476
|
+
onVisibilityChange?.(shouldBeVisible);
|
|
477
|
+
};
|
|
478
|
+
window.addEventListener("scroll", toggleVisibility, { passive: true });
|
|
479
|
+
toggleVisibility();
|
|
480
|
+
return () => {
|
|
481
|
+
window.removeEventListener("scroll", toggleVisibility);
|
|
482
|
+
};
|
|
483
|
+
}, [
|
|
484
|
+
threshold,
|
|
485
|
+
onVisibilityChange,
|
|
486
|
+
targetElement,
|
|
487
|
+
scrollPercentage
|
|
488
|
+
]);
|
|
489
|
+
const scrollToTop = () => {
|
|
490
|
+
window.scrollTo({
|
|
491
|
+
top: 0,
|
|
492
|
+
behavior: scrollBehavior
|
|
493
|
+
});
|
|
494
|
+
onClick?.();
|
|
495
|
+
};
|
|
496
|
+
const handleClick = (e) => {
|
|
497
|
+
e.preventDefault();
|
|
498
|
+
scrollToTop();
|
|
499
|
+
};
|
|
500
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
501
|
+
className: `
|
|
502
|
+
${{
|
|
503
|
+
"bottom-right": "fixed bottom-8 right-8",
|
|
504
|
+
"bottom-left": "fixed bottom-8 left-8",
|
|
505
|
+
"bottom-center": "fixed bottom-8 left-1/2 transform -translate-x-1/2",
|
|
506
|
+
"top-right": "fixed top-8 right-8",
|
|
507
|
+
"top-left": "fixed top-8 left-8",
|
|
508
|
+
"top-center": "fixed top-8 left-1/2 transform -translate-x-1/2"
|
|
509
|
+
}[position]}
|
|
510
|
+
${{
|
|
511
|
+
sm: "w-8 h-8 text-sm",
|
|
512
|
+
md: "w-12 h-12 text-base",
|
|
513
|
+
lg: "w-16 h-16 text-lg"
|
|
514
|
+
}[size]}
|
|
515
|
+
${{
|
|
516
|
+
circle: "rounded-full",
|
|
517
|
+
square: "rounded-none",
|
|
518
|
+
rounded: "rounded-lg"
|
|
519
|
+
}[shape]}
|
|
520
|
+
${className}
|
|
521
|
+
flex items-center justify-center
|
|
522
|
+
bg-blue-600 hover:bg-blue-700
|
|
523
|
+
text-white
|
|
524
|
+
shadow-lg hover:shadow-xl
|
|
525
|
+
transition-all duration-300 ease-in-out
|
|
526
|
+
cursor-pointer
|
|
527
|
+
z-50
|
|
528
|
+
${isVisible ? "opacity-100 translate-y-0" : "opacity-0 translate-y-4 pointer-events-none"}
|
|
529
|
+
`,
|
|
530
|
+
onClick: handleClick,
|
|
531
|
+
style,
|
|
532
|
+
"aria-label": "Scroll to top",
|
|
533
|
+
title: "Scroll to top",
|
|
534
|
+
children: children || /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
|
|
535
|
+
className: "w-4 h-4",
|
|
536
|
+
fill: "none",
|
|
537
|
+
stroke: "currentColor",
|
|
538
|
+
viewBox: "0 0 24 24",
|
|
539
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
|
540
|
+
strokeLinecap: "round",
|
|
541
|
+
strokeLinejoin: "round",
|
|
542
|
+
strokeWidth: 2,
|
|
543
|
+
d: "M5 10l7-7m0 0l7 7m-7-7v18"
|
|
544
|
+
})
|
|
545
|
+
})
|
|
546
|
+
});
|
|
547
|
+
};
|
|
548
|
+
//#endregion
|
|
549
|
+
//#region src/components/WhatsApp.tsx
|
|
550
|
+
var WhatsApp = ({ phone = "", message = "¡Hola! Me gustaría obtener más información.", position = "bottom-right", size = "md", showTooltip = true, tooltipText = "¿En qué podemos ayudarte?", className = "", style, onClick, zIndex = 50, openInNewTab = true }) => {
|
|
551
|
+
const [isHovered, setIsHovered] = useState(false);
|
|
552
|
+
if (!phone) return null;
|
|
553
|
+
const handleWhatsAppClick = () => {
|
|
554
|
+
const whatsappUrl = `https://wa.me/${phone.replace(/[^\d]/g, "")}?text=${encodeURIComponent(message)}`;
|
|
555
|
+
if (openInNewTab) window.open(whatsappUrl, "_blank");
|
|
556
|
+
else window.location.href = whatsappUrl;
|
|
557
|
+
onClick?.();
|
|
558
|
+
};
|
|
559
|
+
const positionClasses = {
|
|
560
|
+
"bottom-right": "bottom-6 right-6",
|
|
561
|
+
"bottom-left": "bottom-6 left-6",
|
|
562
|
+
"bottom-center": "bottom-6 left-1/2 transform -translate-x-1/2",
|
|
563
|
+
"top-right": "top-6 right-6",
|
|
564
|
+
"top-left": "top-6 left-6",
|
|
565
|
+
"top-center": "top-6 left-1/2 transform -translate-x-1/2"
|
|
566
|
+
};
|
|
567
|
+
const sizeClasses = {
|
|
568
|
+
sm: "w-10 h-10",
|
|
569
|
+
md: "w-14 h-14",
|
|
570
|
+
lg: "w-16 h-16"
|
|
571
|
+
};
|
|
572
|
+
const iconSizes = {
|
|
573
|
+
sm: 20,
|
|
574
|
+
md: 32,
|
|
575
|
+
lg: 40
|
|
576
|
+
};
|
|
577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
578
|
+
className: `
|
|
579
|
+
fixed ${positionClasses[position]}
|
|
580
|
+
${sizeClasses[size]}
|
|
581
|
+
bg-[#25D366] hover:bg-[#128C7E]
|
|
582
|
+
text-white rounded-full shadow-2xl
|
|
583
|
+
flex items-center justify-center
|
|
584
|
+
transition-all duration-300 hover:scale-110
|
|
585
|
+
z-${zIndex}
|
|
586
|
+
group
|
|
587
|
+
${className}
|
|
588
|
+
`,
|
|
589
|
+
onClick: handleWhatsAppClick,
|
|
590
|
+
onMouseEnter: () => setIsHovered(true),
|
|
591
|
+
onMouseLeave: () => setIsHovered(false),
|
|
592
|
+
style,
|
|
593
|
+
"aria-label": "Chatear por WhatsApp",
|
|
594
|
+
title: "Chatear por WhatsApp",
|
|
595
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
|
|
596
|
+
width: iconSizes[size],
|
|
597
|
+
height: iconSizes[size],
|
|
598
|
+
viewBox: "0 0 24 24",
|
|
599
|
+
fill: "none",
|
|
600
|
+
stroke: "currentColor",
|
|
601
|
+
strokeWidth: 2,
|
|
602
|
+
strokeLinecap: "round",
|
|
603
|
+
strokeLinejoin: "round",
|
|
604
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z" })
|
|
605
|
+
})
|
|
606
|
+
}), showTooltip && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
607
|
+
className: `
|
|
608
|
+
fixed ${positionClasses[position].replace("6", "20").replace("bottom-6", "bottom-20").replace("top-6", "top-20")}
|
|
609
|
+
bg-white text-gray-800 px-3 py-1 rounded-md text-sm font-semibold
|
|
610
|
+
shadow-md whitespace-nowrap pointer-events-none
|
|
611
|
+
transition-opacity duration-300
|
|
612
|
+
${isHovered ? "opacity-100" : "opacity-0"}
|
|
613
|
+
${position.includes("right") ? "right-20" : position.includes("left") ? "left-20" : "left-1/2 transform -translate-x-1/2"}
|
|
614
|
+
`,
|
|
615
|
+
style: { [position.includes("bottom") ? "bottom" : "top"]: position.includes("bottom") ? "5.5rem" : "5.5rem" },
|
|
616
|
+
children: tooltipText
|
|
617
|
+
})] });
|
|
618
|
+
};
|
|
619
|
+
//#endregion
|
|
620
|
+
export { Accordion, Anchor, Button, Card, DropDown, Preloader, ProgressBar, ScrollTop, Spinner, Typed, WhatsApp };
|
|
459
621
|
|
|
460
622
|
//# sourceMappingURL=luna-components-library.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"luna-components-library.js","names":[],"sources":["../node_modules/react/cjs/react-jsx-runtime.production.js","../node_modules/react/jsx-runtime.js","../src/components/Button.tsx","../src/components/Card.tsx","../src/components/Anchor.tsx","../src/components/Accordion.tsx","../src/components/Spinner.tsx","../src/components/DropDown.tsx","../src/components/ProgressBar.tsx","../src/components/Typed.tsx","../src/components/Preloader.tsx"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","import React from 'react';\n\nexport interface ButtonProps {\n children: React.ReactNode;\n variant?: 'primary' | 'secondary' | 'outline';\n size?: 'sm' | 'md' | 'lg';\n onClick?: () => void;\n disabled?: boolean;\n className?: string;\n containerClassName?: string;\n variantClassName?: string;\n sizeClassName?: string;\n}\n\n{/* onCLick default should open window.open('https://andreychaconresumereact.netlify.app/', '_blank') */ }\n\nconst Button = ({\n children,\n variant = 'primary',\n size = 'sm',\n onClick = () =>\n void 0,\n disabled = false,\n className = '',\n containerClassName = 'font-medium rounded-lg transition-colors focus:outline-none focus:ring-2',\n variantClassName = 'bg-blue-600 text-white hover:bg-blue-700 focus:ring-blue-500',\n sizeClassName = 'px-3 py-1.5 text-sm'\n}: ButtonProps) => {\n const baseClasses = containerClassName;\n\n const variantClasses = {\n primary: 'bg-blue-600 text-white hover:bg-blue-700 focus:ring-blue-500',\n secondary: 'bg-gray-600 text-white hover:bg-gray-700 focus:ring-gray-500',\n outline: 'border border-gray-300 text-gray-700 hover:bg-gray-50 focus:ring-gray-500',\n };\n\n const sizeClasses = {\n sm: 'px-3 py-1.5 text-sm',\n md: 'px-4 py-2 text-base',\n lg: 'px-6 py-3 text-lg',\n };\n\n const classes = `\n ${baseClasses}\n ${variantClasses[variant]}\n ${sizeClasses[size]}\n ${disabled ? 'opacity-50 cursor-not-allowed' : ''}\n ${className}\n `.trim();\n\n return (\n <button\n className={classes}\n onClick={onClick}\n disabled={disabled}\n >\n {children}\n </button>\n );\n};\n\nexport default Button;\n","import React from 'react';\n\nexport interface CardProps {\n children: React.ReactNode;\n title?: string;\n className?: string;\n containerClassName?: string;\n titleClassName?: string;\n padding?: 'none' | 'sm' | 'md' | 'lg';\n shadow?: 'none' | 'sm' | 'md' | 'lg';\n}\n\nconst Card = ({\n children,\n title,\n className = '',\n containerClassName = 'bg-white rounded-lg border border-gray-200',\n titleClassName = 'text-lg font-semibold text-gray-900',\n padding = 'md',\n shadow = 'md',\n}: CardProps) => {\n const paddingClasses = {\n none: '',\n sm: 'p-3',\n md: 'p-4',\n lg: 'p-6',\n };\n\n const shadowClasses = {\n none: '',\n sm: 'shadow-sm',\n md: 'shadow-md',\n lg: 'shadow-lg',\n };\n\n const classes = `\n ${containerClassName}\n ${paddingClasses[padding]}\n ${shadowClasses[shadow]}\n ${className}\n `.trim();\n\n return (\n <div className={classes}>\n {title && (\n <div className=\"mb-4\">\n <h3 className={titleClassName}>{title}</h3>\n </div>\n )}\n {children}\n </div>\n );\n};\n\nexport default Card;\n","export interface AnchorProps {\r\n children?: React.ReactNode;\r\n variant?: 'primary' | 'secondary' | 'outline';\r\n size?: 'sm' | 'md' | 'lg';\r\n href?: string;\r\n className?: string;\r\n containerClassName?: string;\r\n variantClassName?: string;\r\n sizeClassName?: string;\r\n target?: string;\r\n rel?: string;\r\n}\r\n\r\nconst Anchor = ({\r\n children = \"Pablo Andrey Chacon Luna\",\r\n variant = 'primary',\r\n size = 'sm',\r\n href = 'https://andreychaconresumereact.netlify.app/',\r\n className,\r\n containerClassName = 'font-medium rounded-lg transition-colors focus:outline-none focus:ring-2',\r\n variantClassName = 'bg-blue-600 text-white hover:bg-blue-700',\r\n sizeClassName = 'px-3 py-1.5 text-sm',\r\n target = '_blank',\r\n rel = 'noopener noreferrer'\r\n}: AnchorProps) => {\r\n\r\n const baseClasses = containerClassName;\r\n\r\n const variantClasses = {\r\n primary: 'bg-blue-600 text-white hover:bg-blue-700',\r\n secondary: 'bg-gray-600 text-white hover:bg-gray-700',\r\n outline: 'border border-gray-300 text-gray-700 hover:bg-gray-50',\r\n };\r\n\r\n const sizeClasses = {\r\n sm: 'px-3 py-1.5 text-sm',\r\n md: 'px-4 py-2 text-base',\r\n lg: 'px-6 py-3 text-lg',\r\n };\r\n\r\n const classes = `\r\n ${baseClasses}\r\n ${variantClasses[variant]}\r\n ${sizeClasses[size]}\r\n ${variantClassName}\r\n ${sizeClassName}\r\n ${className}\r\n `.trim();\r\n\r\n return (\r\n <a href={href} target={target} rel={rel} className={classes}>\r\n {children}\r\n </a>\r\n );\r\n};\r\n\r\nexport default Anchor;","\r\nimport React from 'react';\r\n\r\n/**\r\n * must have key, active, onClick, header, content body\r\n */\r\ninterface AccordionProps {\r\n active: boolean;\r\n onClick: () => void;\r\n header: React.ReactNode;\r\n content: React.ReactNode;\r\n className?: string;\r\n containerClassName?: string;\r\n headerClassName?: string;\r\n contentClassName?: string;\r\n}\r\n\r\nconst Accordion = ({ active, onClick, header, content, className = '', containerClassName = 'border border-gray-200 rounded-lg overflow-hidden', headerClassName = 'w-full px-4 py-3 text-left bg-gray-50 hover:bg-gray-100 focus:bg-gray-100 focus:outline-none transition-colors duration-200 flex justify-between items-center', contentClassName = 'transition-all duration-300 ease-in-out' }: AccordionProps) => {\r\n return (\r\n <div className={`${containerClassName} ${className}`}>\r\n <button\r\n onClick={onClick}\r\n className={headerClassName}\r\n aria-expanded={active}\r\n >\r\n {header}\r\n <svg\r\n className={`w-5 h-5 text-gray-500 transition-transform duration-200 ${active ? 'transform rotate-180' : ''\r\n }`}\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n viewBox=\"0 0 24 24\"\r\n >\r\n <path\r\n strokeLinecap=\"round\"\r\n strokeLinejoin=\"round\"\r\n strokeWidth={2}\r\n d=\"M19 9l-7 7-7-7\"\r\n />\r\n </svg>\r\n </button>\r\n\r\n <div\r\n className={`${contentClassName} ${active ? 'max-h-96 opacity-100' : 'max-h-0 opacity-0'\r\n } overflow-hidden`}\r\n >\r\n <div className={`p-4 bg-white border-t border-gray-200 ${contentClassName}`}>\r\n {content}\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nexport default Accordion;","import React from 'react';\n\nexport interface SpinnerProps {\n className?: string;\n containerClassName?: string;\n dotClassName?: string;\n barClassName?: string;\n size?: 'sm' | 'md' | 'lg';\n type?: 'circle' | 'dots' | 'pulse' | 'bars';\n};\n\nconst Spinner = ({ \n className, \n containerClassName = 'flex gap-1',\n dotClassName = 'bg-blue-600 rounded-full animate-bounce',\n barClassName = 'bg-blue-600 animate-pulse',\n size = 'md', \n type = 'circle' \n}: SpinnerProps) => {\n const sizeClasses = {\n sm: 'w-4 h-4',\n md: 'w-6 h-6',\n lg: 'w-8 h-8'\n };\n\n const dotSizeClasses = {\n sm: 'w-1 h-1',\n md: 'w-2 h-2',\n lg: 'w-3 h-3'\n };\n\n const barSizeClasses = {\n sm: 'w-1 h-4',\n md: 'w-1 h-6',\n lg: 'w-1 h-8'\n };\n\n if (type === 'dots') {\n return (\n <div role=\"status\" className={`${containerClassName} ${className || ''}`}>\n <span className=\"sr-only\">Loading...</span>\n <div className={`${dotSizeClasses[size]} ${dotClassName}`} style={{ animationDelay: '0ms' }}></div>\n <div className={`${dotSizeClasses[size]} ${dotClassName}`} style={{ animationDelay: '150ms' }}></div>\n <div className={`${dotSizeClasses[size]} ${dotClassName}`} style={{ animationDelay: '300ms' }}></div>\n </div>\n );\n }\n\n if (type === 'pulse') {\n return (\n <div role=\"status\" className={`${sizeClasses[size]} ${className || ''}`}>\n <span className=\"sr-only\">Loading...</span>\n <div className={`${sizeClasses[size]} ${dotClassName}`}></div>\n </div>\n );\n }\n\n if (type === 'bars') {\n return (\n <div role=\"status\" className={`flex gap-1 items-center ${containerClassName} ${className || ''}`}>\n <span className=\"sr-only\">Loading...</span>\n <div className={`${barSizeClasses[size]} ${barClassName}`} style={{ animationDelay: '0ms' }}></div>\n <div className={`${barSizeClasses[size]} ${barClassName}`} style={{ animationDelay: '200ms' }}></div>\n <div className={`${barSizeClasses[size]} ${barClassName}`} style={{ animationDelay: '400ms' }}></div>\n <div className={`${barSizeClasses[size]} ${barClassName}`} style={{ animationDelay: '600ms' }}></div>\n </div>\n );\n }\n\n // Default circle spinner\n return (\n <div\n role=\"status\"\n className={`inline-block animate-spin rounded-full border-2 border-gray-300 border-t-blue-600 ${sizeClasses[size]} ${className || ''}`}\n >\n <span className=\"sr-only\">Loading...</span>\n </div>\n );\n};\n\nexport default Spinner;\n","{/* must have toggle, options, selected, onChange */ }\r\nimport React, { useState } from 'react';\r\n\r\ntype DropDownOption = {\r\n value: string;\r\n label: React.ReactNode;\r\n};\r\n\r\ntype DropDownProps = {\r\n toggle: React.ReactNode;\r\n options: React.ReactNode[] | DropDownOption[];\r\n selected: React.ReactNode;\r\n onChange: (value: React.ReactNode) => void;\r\n className?: string;\r\n containerClassName?: string;\r\n dropdownClassName?: string;\r\n optionsContainerClassName?: string;\r\n optionClassName?: string;\r\n};\r\n\r\nconst DropDown = ({\r\n toggle,\r\n options,\r\n selected,\r\n onChange,\r\n className = '',\r\n containerClassName = 'relative inline-block text-left',\r\n dropdownClassName = 'absolute z-50 mt-2 w-48 rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none',\r\n optionsContainerClassName = 'py-1 flex flex-col',\r\n optionClassName = 'block w-full px-4 py-2 text-left text-sm text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:bg-gray-100 focus:text-gray-900'\r\n}: DropDownProps) => {\r\n const [isOpen, setIsOpen] = useState(false);\r\n\r\n const handleToggle = () => {\r\n setIsOpen(!isOpen);\r\n };\r\n\r\n const handleOptionClick = (option: React.ReactNode) => {\r\n onChange(option);\r\n setIsOpen(false);\r\n };\r\n\r\n return (\r\n <div className={`${containerClassName} ${className}`}>\r\n <div onClick={handleToggle} className=\"cursor-pointer\">\r\n {toggle}\r\n </div>\r\n\r\n {isOpen && (\r\n <div className={dropdownClassName}>\r\n <div className={optionsContainerClassName}>\r\n {options.map((option, index) => {\r\n const isOptionObject = typeof option === 'object' && option !== null && 'value' in option;\r\n const optionValue = isOptionObject ? (option as DropDownOption).value : option;\r\n const optionLabel = isOptionObject ? (option as DropDownOption).label : option;\r\n\r\n return (\r\n <button\r\n key={index}\r\n onClick={() => handleOptionClick(optionValue)}\r\n className={optionClassName}\r\n >\r\n {optionLabel}\r\n </button>\r\n );\r\n })}\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n );\r\n};\r\n\r\nexport default DropDown;","{/* must have progress, max, min, aria-label */ }\r\nimport React from 'react';\r\nimport { CSSProperties } from 'react';\r\n\r\ntype ProgressBarProps = {\r\n progress: number;\r\n max: number;\r\n min: number;\r\n 'aria-label': string;\r\n};\r\n\r\n{/* need a class for the progress bar class name: progress-bar */ }\r\ntype ProgressBarPropsWithClassName = ProgressBarProps & {\r\n className?: CSSProperties;\r\n style?: CSSProperties;\r\n containerClassName?: string;\r\n barClassName?: string;\r\n variant?: 'primary' | 'success' | 'warning' | 'danger' | 'dark' | 'light';\r\n};\r\n\r\nconst ProgressBar = ({ progress, max, min, 'aria-label': ariaLabel, className, style, containerClassName = 'w-full bg-gray-200 rounded-full h-4 overflow-hidden', barClassName = 'h-full rounded-full transition-all duration-300 flex items-center justify-center text-xs font-medium', variant = 'primary' }: ProgressBarPropsWithClassName) => {\r\n const variantClasses = {\r\n primary: {\r\n bg: 'bg-blue-600',\r\n text: 'text-white',\r\n containerBg: 'bg-gray-200'\r\n },\r\n success: {\r\n bg: 'bg-green-600',\r\n text: 'text-white',\r\n containerBg: 'bg-gray-200'\r\n },\r\n warning: {\r\n bg: 'bg-yellow-500',\r\n text: 'text-gray-900',\r\n containerBg: 'bg-gray-200'\r\n },\r\n danger: {\r\n bg: 'bg-red-600',\r\n text: 'text-white',\r\n containerBg: 'bg-gray-200'\r\n },\r\n dark: {\r\n bg: 'bg-gray-800',\r\n text: 'text-white',\r\n containerBg: 'bg-gray-300'\r\n },\r\n light: {\r\n bg: 'bg-gray-100',\r\n text: 'text-gray-900',\r\n containerBg: 'bg-gray-300'\r\n }\r\n };\r\n\r\n const currentVariant = variantClasses[variant];\r\n const barClasses = `${currentVariant.bg} ${barClassName} ${currentVariant.text}`;\r\n\r\n return (\r\n <div className={containerClassName}>\r\n <div\r\n role=\"progressbar\"\r\n className={barClasses}\r\n aria-valuenow={progress}\r\n aria-valuemin={min}\r\n aria-valuemax={max}\r\n style={{ width: `${progress}%`, ...className, ...style }}\r\n >\r\n {progress > 10 && `${progress}%`}\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nexport default ProgressBar;","import React, { useState, useEffect, CSSProperties } from 'react';\r\n\r\ntype TypedProps = {\r\n strings: string[];\r\n typeSpeed?: number;\r\n backSpeed?: number;\r\n backDelay?: number;\r\n startDelay?: number;\r\n loop?: boolean;\r\n showCursor?: boolean;\r\n className?: string;\r\n containerClassName?: string;\r\n typedClassName?: string;\r\n cursorClassName?: string;\r\n style?: TypedStyle;\r\n};\r\n\r\ntype TypedStyle = CSSProperties & {\r\n animation?: string;\r\n animationDelay?: string;\r\n};\r\n\r\nconst Typed = ({\r\n strings,\r\n typeSpeed = 50,\r\n backSpeed = 30,\r\n backDelay = 500,\r\n startDelay = 0,\r\n loop = true,\r\n showCursor = true,\r\n className = '',\r\n containerClassName = 'inline-block',\r\n typedClassName = 'typed',\r\n cursorClassName = 'typed-cursor ml-1 inline-block w-0.5 h-5 bg-current',\r\n style = {},\r\n}: TypedProps) => {\r\n const [currentStringIndex, setCurrentStringIndex] = useState(0);\r\n const [currentText, setCurrentText] = useState('');\r\n const [isDeleting, setIsDeleting] = useState(false);\r\n const [isPaused, setIsPaused] = useState(false);\r\n const [cursorOpacity, setCursorOpacity] = useState(1);\r\n\r\n useEffect(() => {\r\n const timer = setTimeout(() => {\r\n setIsPaused(false);\r\n }, startDelay);\r\n\r\n return () => clearTimeout(timer);\r\n }, [startDelay]);\r\n\r\n useEffect(() => {\r\n if (isPaused) return;\r\n\r\n const currentString = strings[currentStringIndex] || '';\r\n\r\n const timer = setTimeout(() => {\r\n if (!isDeleting) {\r\n // Typing\r\n if (currentText.length < currentString.length) {\r\n setCurrentText(currentText + currentString[currentText.length]);\r\n } else {\r\n // Finished typing, wait before deleting\r\n if (loop) {\r\n setIsPaused(true);\r\n setTimeout(() => {\r\n setIsPaused(false);\r\n setIsDeleting(true);\r\n }, backDelay);\r\n }\r\n }\r\n } else {\r\n // Deleting\r\n if (currentText.length > 0) {\r\n setCurrentText(currentText.slice(0, -1));\r\n } else {\r\n // Finished deleting, move to next string\r\n setIsDeleting(false);\r\n setCurrentStringIndex((prevIndex) =>\r\n prevIndex === strings.length - 1 ? 0 : prevIndex + 1\r\n );\r\n }\r\n }\r\n }, isDeleting ? backSpeed : typeSpeed);\r\n\r\n return () => clearTimeout(timer);\r\n }, [currentText, isDeleting, currentStringIndex, strings, typeSpeed, backSpeed, backDelay, loop, isPaused]);\r\n\r\n // Cursor fade effect\r\n useEffect(() => {\r\n const fadeTimer = setInterval(() => {\r\n setCursorOpacity(prev => {\r\n if (prev === 1) return 0;\r\n return 1;\r\n });\r\n }, 750);\r\n\r\n return () => clearInterval(fadeTimer);\r\n }, []);\r\n\r\n return (\r\n <span className={`${containerClassName} ${className}`} >\r\n <span className={typedClassName}>{currentText}</span>\r\n {showCursor && (\r\n <span\r\n className={cursorClassName}\r\n aria-hidden=\"true\"\r\n style={{\r\n ...style,\r\n opacity: cursorOpacity\r\n }}\r\n >\r\n\r\n </span>\r\n )}\r\n </span>\r\n );\r\n};\r\n\r\nexport default Typed;","import React, { useEffect, useState } from 'react';\n\nexport interface PreloaderProps {\n /** Loading state - if true, preloader is shown */\n isLoading?: boolean;\n /** Duration in milliseconds before auto-hide */\n duration?: number;\n /** Background color overlay */\n backgroundColor?: string;\n /** Accent color for the spinner */\n accentColor?: string;\n /** Size of the spinner in pixels */\n size?: number;\n /** Border width of the spinner */\n borderWidth?: number;\n /** Custom className for the preloader */\n className?: string;\n /** Custom className for the spinner */\n spinnerClassName?: string;\n /** Custom z-index */\n zIndex?: number;\n /** Callback when preloader finishes */\n onComplete?: () => void;\n}\n\nconst Preloader: React.FC<PreloaderProps> = ({\n isLoading: externalLoading,\n duration = 1000,\n backgroundColor,\n accentColor,\n size = 90,\n borderWidth = 6,\n className = '',\n spinnerClassName = '',\n zIndex = 999999,\n onComplete\n}) => {\n const [internalLoading, setInternalLoading] = useState(true);\n\n // Use external loading state if provided, otherwise use internal state\n const isLoading = externalLoading !== undefined ? externalLoading : internalLoading;\n\n useEffect(() => {\n // Only auto-hide if we're using internal loading state\n if (externalLoading === undefined) {\n const timer = setTimeout(() => {\n setInternalLoading(false);\n onComplete?.();\n }, duration);\n\n return () => clearTimeout(timer);\n }\n }, [duration, externalLoading, onComplete]);\n\n // Handle external loading state changes - auto-hide when externalLoading is true\n useEffect(() => {\n if (externalLoading === true) {\n const timer = setTimeout(() => {\n onComplete?.();\n }, duration);\n\n return () => clearTimeout(timer);\n }\n }, [externalLoading, duration, onComplete]);\n\n const preloaderStyle: React.CSSProperties = {\n position: 'fixed',\n inset: 0,\n zIndex,\n overflow: 'hidden',\n background: backgroundColor || 'var(--background-color, #00000018)',\n transition: 'all 0.6s ease-out',\n display: isLoading ? 'block' : 'none'\n };\n\n const spinnerStyle: React.CSSProperties = {\n position: 'fixed',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n border: `${borderWidth}px solid #ffffff`,\n borderColor: `${accentColor || 'var(--accent-color, #007bff)'} transparent transparent transparent`,\n borderRadius: '50%',\n width: `${size}px`,\n height: `${size}px`,\n animation: 'animate-preloader 1.5s linear infinite'\n };\n\n return (\n <>\n <div\n className={`preloader-overlay ${className}`}\n style={preloaderStyle}\n >\n <div\n className={`preloader-spinner ${spinnerClassName}`}\n style={spinnerStyle}\n />\n </div>\n\n {/* Global styles for animation */}\n <style>{`\n @keyframes animate-preloader {\n 0% {\n transform: translate(-50%, -50%) rotate(0deg);\n }\n 100% {\n transform: translate(-50%, -50%) rotate(360deg);\n }\n }\n `}</style>\n </>\n );\n};\n\nexport default Preloader;\n"],"x_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A,CACE,iBAAA,GAAA,mBAAA,KAAC,OAAD;EACE,WAAW,qBAAqB;EAChC,OAAO;YAEP,iBAAA,GAAA,mBAAA,KAAC,OAAD;GACE,WAAW,qBAAqB;GAChC,OAAO;GACP,CAAA;EACE,CAAA,EAGN,iBAAA,GAAA,mBAAA,KAAC,SAAD,EAAA,UAAQ;;;;;;;;;SASE,CAAA,CACT,EAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"luna-components-library.js","names":[],"sources":["../node_modules/react/cjs/react-jsx-runtime.production.js","../node_modules/react/jsx-runtime.js","../src/components/Button.tsx","../src/components/Card.tsx","../src/components/Anchor.tsx","../src/components/Accordion.tsx","../src/components/Spinner.tsx","../src/components/DropDown.tsx","../src/components/ProgressBar.tsx","../src/components/Typed.tsx","../src/components/Preloader.tsx","../src/components/ScrollTop.tsx","../src/components/WhatsApp.tsx"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","import React from 'react';\n\n// Button variants and sizes\ntype ButtonVariant = 'primary' | 'secondary' | 'outline';\ntype ButtonSize = 'sm' | 'md' | 'lg';\n\nexport interface ButtonProps {\n children: React.ReactNode;\n variant?: ButtonVariant;\n size?: ButtonSize;\n onClick?: () => void;\n disabled?: boolean;\n className?: string;\n containerClassName?: string;\n variantClassName?: string;\n sizeClassName?: string;\n}\n\n{/* onCLick default should open window.open('https://andreychaconresumereact.netlify.app/', '_blank') */ }\n\nconst Button = ({\n children,\n variant = 'primary',\n size = 'sm',\n onClick = () =>\n void 0,\n disabled = false,\n className = '',\n containerClassName = 'font-medium rounded-lg transition-colors focus:outline-none focus:ring-2',\n variantClassName = 'bg-blue-600 text-white hover:bg-blue-700 focus:ring-blue-500',\n sizeClassName = 'px-3 py-1.5 text-sm'\n}: ButtonProps) => {\n const baseClasses = containerClassName;\n\n const variantClasses = {\n primary: 'bg-blue-600 text-white hover:bg-blue-700 focus:ring-blue-500',\n secondary: 'bg-gray-600 text-white hover:bg-gray-700 focus:ring-gray-500',\n outline: 'border border-gray-300 text-gray-700 hover:bg-gray-50 focus:ring-gray-500',\n };\n\n const sizeClasses = {\n sm: 'px-3 py-1.5 text-sm',\n md: 'px-4 py-2 text-base',\n lg: 'px-6 py-3 text-lg',\n };\n\n const classes = `\n ${baseClasses}\n ${variantClasses[variant]}\n ${sizeClasses[size]}\n ${disabled ? 'opacity-50 cursor-not-allowed' : ''}\n ${className}\n `.trim();\n\n return (\n <button\n className={classes}\n onClick={onClick}\n disabled={disabled}\n >\n {children}\n </button>\n );\n};\n\nexport default Button;\n","import React from 'react';\n\n// Card padding and shadow variants\ntype CardPadding = 'none' | 'sm' | 'md' | 'lg';\ntype CardShadow = 'none' | 'sm' | 'md' | 'lg';\n\nexport interface CardProps {\n children: React.ReactNode;\n title?: string;\n className?: string;\n containerClassName?: string;\n titleClassName?: string;\n padding?: CardPadding;\n shadow?: CardShadow;\n}\n\nconst Card = ({\n children,\n title,\n className = '',\n containerClassName = 'bg-white rounded-lg border border-gray-200',\n titleClassName = 'text-lg font-semibold text-gray-900',\n padding = 'md',\n shadow = 'md',\n}: CardProps) => {\n const paddingClasses = {\n none: '',\n sm: 'p-3',\n md: 'p-4',\n lg: 'p-6',\n };\n\n const shadowClasses = {\n none: '',\n sm: 'shadow-sm',\n md: 'shadow-md',\n lg: 'shadow-lg',\n };\n\n const classes = `\n ${containerClassName}\n ${paddingClasses[padding]}\n ${shadowClasses[shadow]}\n ${className}\n `.trim();\n\n return (\n <div className={classes}>\n {title && (\n <div className=\"mb-4\">\n <h3 className={titleClassName}>{title}</h3>\n </div>\n )}\n {children}\n </div>\n );\n};\n\nexport default Card;\n","import React from 'react';\r\n\r\n// Anchor link variants and sizes\r\ntype AnchorVariant = 'none' | 'primary' | 'secondary' | 'outline';\r\ntype AnchorSize = 'sm' | 'md' | 'lg';\r\n\r\nexport interface AnchorProps {\r\n children?: React.ReactNode;\r\n variant?: AnchorVariant;\r\n size?: AnchorSize;\r\n href?: string;\r\n className?: string;\r\n containerClassName?: string;\r\n variantClassName?: string;\r\n sizeClassName?: string;\r\n target?: string;\r\n rel?: string;\r\n}\r\n\r\nconst Anchor = ({\r\n children = \"Pablo Andrey Chacon Luna\",\r\n variant = 'none',\r\n size = 'sm',\r\n href = 'https://andreychaconresumereact.netlify.app/',\r\n className,\r\n containerClassName = 'font-medium rounded-lg transition-colors focus:outline-none focus:ring-2',\r\n variantClassName = 'bg-blue-600 text-white hover:bg-blue-700',\r\n sizeClassName = 'px-3 py-1.5 text-sm',\r\n target = '_blank',\r\n rel = 'noopener noreferrer'\r\n}: AnchorProps) => {\r\n\r\n const baseClasses = containerClassName;\r\n\r\n const variantClasses = {\r\n none: '',\r\n primary: 'bg-blue-600 text-white hover:bg-blue-700',\r\n secondary: 'bg-gray-600 text-white hover:bg-gray-700',\r\n outline: 'border border-gray-300 text-gray-700 hover:bg-gray-50',\r\n };\r\n\r\n const sizeClasses = {\r\n sm: 'px-3 py-1.5 text-sm',\r\n md: 'px-4 py-2 text-base',\r\n lg: 'px-6 py-3 text-lg',\r\n };\r\n\r\n const classes = `\r\n ${baseClasses}\r\n ${variantClasses[variant]}\r\n ${sizeClasses[size]}\r\n ${variantClassName}\r\n ${sizeClassName}\r\n ${className}\r\n `.trim();\r\n\r\n return (\r\n <a href={href} target={target} rel={rel} className={classes}>\r\n {children}\r\n </a>\r\n );\r\n};\r\n\r\nexport default Anchor;","\r\nimport React from 'react';\r\n\r\n// Accordion component for collapsible content\r\ninterface AccordionProps {\r\n active: boolean;\r\n onClick: () => void;\r\n header: React.ReactNode;\r\n content: React.ReactNode;\r\n className?: string;\r\n containerClassName?: string;\r\n headerClassName?: string;\r\n contentClassName?: string;\r\n}\r\n\r\nconst Accordion = ({ active, onClick, header, content, className = '', containerClassName = 'border border-gray-200 rounded-lg overflow-hidden', headerClassName = 'w-full px-4 py-3 text-left bg-gray-50 hover:bg-gray-100 focus:bg-gray-100 focus:outline-none transition-colors duration-200 flex justify-between items-center', contentClassName = 'transition-all duration-300 ease-in-out' }: AccordionProps) => {\r\n return (\r\n <div className={`${containerClassName} ${className}`}>\r\n <button\r\n onClick={onClick}\r\n className={headerClassName}\r\n aria-expanded={active}\r\n >\r\n {header}\r\n <svg\r\n className={`w-5 h-5 text-gray-500 transition-transform duration-200 ${active ? 'transform rotate-180' : ''\r\n }`}\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n viewBox=\"0 0 24 24\"\r\n >\r\n <path\r\n strokeLinecap=\"round\"\r\n strokeLinejoin=\"round\"\r\n strokeWidth={2}\r\n d=\"M19 9l-7 7-7-7\"\r\n />\r\n </svg>\r\n </button>\r\n\r\n <div\r\n className={`${contentClassName} ${active ? 'max-h-96 opacity-100' : 'max-h-0 opacity-0'\r\n } overflow-hidden`}\r\n >\r\n <div className={`p-4 bg-white border-t border-gray-200 ${contentClassName}`}>\r\n {content}\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nexport default Accordion;","import React from 'react';\n\ntype SpinnerSize = 'sm' | 'md' | 'lg';\ntype SpinnerType = 'circle' | 'dots' | 'pulse' | 'bars';\n\nexport interface SpinnerProps {\n className?: string;\n containerClassName?: string;\n dotClassName?: string;\n barClassName?: string;\n size?: SpinnerSize;\n type?: SpinnerType;\n};\n\nconst Spinner = ({\n className,\n containerClassName = 'flex gap-1',\n dotClassName = 'bg-blue-600 rounded-full animate-bounce',\n barClassName = 'bg-blue-600 animate-pulse',\n size = 'md',\n type = 'circle'\n}: SpinnerProps) => {\n const sizeClasses = {\n sm: 'w-4 h-4',\n md: 'w-6 h-6',\n lg: 'w-8 h-8'\n };\n\n const dotSizeClasses = {\n sm: 'w-1 h-1',\n md: 'w-2 h-2',\n lg: 'w-3 h-3'\n };\n\n const barSizeClasses = {\n sm: 'w-1 h-4',\n md: 'w-1 h-6',\n lg: 'w-1 h-8'\n };\n\n if (type === 'dots') {\n return (\n <div role=\"status\" className={`${containerClassName} ${className || ''}`}>\n <span className=\"sr-only\">Loading...</span>\n <div className={`${dotSizeClasses[size]} ${dotClassName}`} style={{ animationDelay: '0ms' }}></div>\n <div className={`${dotSizeClasses[size]} ${dotClassName}`} style={{ animationDelay: '150ms' }}></div>\n <div className={`${dotSizeClasses[size]} ${dotClassName}`} style={{ animationDelay: '300ms' }}></div>\n </div>\n );\n }\n\n if (type === 'pulse') {\n return (\n <div role=\"status\" className={`${sizeClasses[size]} ${className || ''}`}>\n <span className=\"sr-only\">Loading...</span>\n <div className={`${sizeClasses[size]} ${dotClassName}`}></div>\n </div>\n );\n }\n\n if (type === 'bars') {\n return (\n <div role=\"status\" className={`flex gap-1 items-center ${containerClassName} ${className || ''}`}>\n <span className=\"sr-only\">Loading...</span>\n <div className={`${barSizeClasses[size]} ${barClassName}`} style={{ animationDelay: '0ms' }}></div>\n <div className={`${barSizeClasses[size]} ${barClassName}`} style={{ animationDelay: '200ms' }}></div>\n <div className={`${barSizeClasses[size]} ${barClassName}`} style={{ animationDelay: '400ms' }}></div>\n <div className={`${barSizeClasses[size]} ${barClassName}`} style={{ animationDelay: '600ms' }}></div>\n </div>\n );\n }\n\n // Default circle spinner\n return (\n <div\n role=\"status\"\n className={`inline-block animate-spin rounded-full border-2 border-gray-300 border-t-blue-600 ${sizeClasses[size]} ${className || ''}`}\n >\n <span className=\"sr-only\">Loading...</span>\n </div>\n );\n};\n\nexport default Spinner;\n","{/* Dropdown component for selecting options */ }\r\nimport React, { useState } from 'react';\r\n\r\ntype DropDownOption = {\r\n value: string;\r\n label: React.ReactNode;\r\n};\r\n\r\ntype DropDownProps = {\r\n toggle: React.ReactNode;\r\n options: React.ReactNode[] | DropDownOption[];\r\n selected: React.ReactNode;\r\n onChange: (value: React.ReactNode) => void;\r\n className?: string;\r\n containerClassName?: string;\r\n dropdownClassName?: string;\r\n optionsContainerClassName?: string;\r\n optionClassName?: string;\r\n};\r\n\r\nconst DropDown = ({\r\n toggle,\r\n options,\r\n selected,\r\n onChange,\r\n className = '',\r\n containerClassName = 'relative inline-block text-left',\r\n dropdownClassName = 'absolute z-50 mt-2 w-48 rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none',\r\n optionsContainerClassName = 'py-1 flex flex-col',\r\n optionClassName = 'block w-full px-4 py-2 text-left text-sm text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:bg-gray-100 focus:text-gray-900'\r\n}: DropDownProps) => {\r\n const [isOpen, setIsOpen] = useState(false);\r\n\r\n const handleToggle = () => {\r\n setIsOpen(!isOpen);\r\n };\r\n\r\n const handleOptionClick = (option: React.ReactNode) => {\r\n onChange(option);\r\n setIsOpen(false);\r\n };\r\n\r\n return (\r\n <div className={`${containerClassName} ${className}`}>\r\n <div onClick={handleToggle} className=\"cursor-pointer\">\r\n {toggle}\r\n </div>\r\n\r\n {isOpen && (\r\n <div className={dropdownClassName}>\r\n <div className={optionsContainerClassName}>\r\n {options.map((option, index) => {\r\n const isOptionObject = typeof option === 'object' && option !== null && 'value' in option;\r\n const optionValue = isOptionObject ? (option as DropDownOption).value : option;\r\n const optionLabel = isOptionObject ? (option as DropDownOption).label : option;\r\n\r\n return (\r\n <button\r\n key={index}\r\n onClick={() => handleOptionClick(optionValue)}\r\n className={optionClassName}\r\n >\r\n {optionLabel}\r\n </button>\r\n );\r\n })}\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n );\r\n};\r\n\r\nexport default DropDown;","import React from 'react';\r\n\r\n// Progress bar color variants\r\ntype ProgressBarVariant = 'primary' | 'success' | 'warning' | 'danger' | 'dark' | 'light';\r\n\r\n// Core progress bar props\r\ninterface ProgressBarProps {\r\n progress: number;\r\n max: number;\r\n min: number;\r\n 'aria-label': string;\r\n}\r\n\r\n// Extended props with styling options\r\ntype ProgressBarPropsWithClassName = ProgressBarProps & {\r\n className?: React.CSSProperties;\r\n style?: React.CSSProperties;\r\n containerClassName?: string;\r\n barClassName?: string;\r\n variant?: ProgressBarVariant;\r\n};\r\n\r\nconst ProgressBar = ({ progress, max, min, 'aria-label': ariaLabel, className, style, containerClassName = 'w-full bg-gray-200 rounded-full h-4 overflow-hidden', barClassName = 'h-full rounded-full transition-all duration-300 flex items-center justify-center text-xs font-medium', variant = 'primary' }: ProgressBarPropsWithClassName) => {\r\n const variantClasses = {\r\n primary: {\r\n bg: 'bg-blue-600',\r\n text: 'text-white',\r\n containerBg: 'bg-gray-200'\r\n },\r\n success: {\r\n bg: 'bg-green-600',\r\n text: 'text-white',\r\n containerBg: 'bg-gray-200'\r\n },\r\n warning: {\r\n bg: 'bg-yellow-500',\r\n text: 'text-gray-900',\r\n containerBg: 'bg-gray-200'\r\n },\r\n danger: {\r\n bg: 'bg-red-600',\r\n text: 'text-white',\r\n containerBg: 'bg-gray-200'\r\n },\r\n dark: {\r\n bg: 'bg-gray-800',\r\n text: 'text-white',\r\n containerBg: 'bg-gray-300'\r\n },\r\n light: {\r\n bg: 'bg-gray-100',\r\n text: 'text-gray-900',\r\n containerBg: 'bg-gray-300'\r\n }\r\n };\r\n\r\n const currentVariant = variantClasses[variant];\r\n const barClasses = `${currentVariant.bg} ${barClassName} ${currentVariant.text}`;\r\n\r\n return (\r\n <div className={containerClassName}>\r\n <div\r\n role=\"progressbar\"\r\n className={barClasses}\r\n aria-valuenow={progress}\r\n aria-valuemin={min}\r\n aria-valuemax={max}\r\n style={{ width: `${progress}%`, ...className, ...style }}\r\n >\r\n {progress > 10 && `${progress}%`}\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nexport default ProgressBar;","import React, { useState, useEffect, CSSProperties } from 'react';\r\n\r\n// Typing animation configuration\r\ntype TypedStyle = CSSProperties & {\r\n animation?: string;\r\n animationDelay?: string;\r\n};\r\n\r\ntype TypedProps = {\r\n strings: string[];\r\n typeSpeed?: number;\r\n backSpeed?: number;\r\n backDelay?: number;\r\n startDelay?: number;\r\n loop?: boolean;\r\n showCursor?: boolean;\r\n className?: string;\r\n containerClassName?: string;\r\n typedClassName?: string;\r\n cursorClassName?: string;\r\n style?: TypedStyle;\r\n};\r\n\r\nconst Typed = ({\r\n strings,\r\n typeSpeed = 50,\r\n backSpeed = 30,\r\n backDelay = 500,\r\n startDelay = 0,\r\n loop = true,\r\n showCursor = true,\r\n className = '',\r\n containerClassName = 'inline-block',\r\n typedClassName = 'typed',\r\n cursorClassName = 'typed-cursor ml-1 inline-block w-0.5 h-5 bg-current',\r\n style = {},\r\n}: TypedProps) => {\r\n const [currentStringIndex, setCurrentStringIndex] = useState(0);\r\n const [currentText, setCurrentText] = useState('');\r\n const [isDeleting, setIsDeleting] = useState(false);\r\n const [isPaused, setIsPaused] = useState(false);\r\n const [cursorOpacity, setCursorOpacity] = useState(1);\r\n\r\n useEffect(() => {\r\n const timer = setTimeout(() => {\r\n setIsPaused(false);\r\n }, startDelay);\r\n\r\n return () => clearTimeout(timer);\r\n }, [startDelay]);\r\n\r\n useEffect(() => {\r\n if (isPaused) return;\r\n\r\n const currentString = strings[currentStringIndex] || '';\r\n\r\n const timer = setTimeout(() => {\r\n if (!isDeleting) {\r\n // Typing\r\n if (currentText.length < currentString.length) {\r\n setCurrentText(currentText + currentString[currentText.length]);\r\n } else {\r\n // Finished typing, wait before deleting\r\n if (loop) {\r\n setIsPaused(true);\r\n setTimeout(() => {\r\n setIsPaused(false);\r\n setIsDeleting(true);\r\n }, backDelay);\r\n }\r\n }\r\n } else {\r\n // Deleting\r\n if (currentText.length > 0) {\r\n setCurrentText(currentText.slice(0, -1));\r\n } else {\r\n // Finished deleting, move to next string\r\n setIsDeleting(false);\r\n setCurrentStringIndex((prevIndex) =>\r\n prevIndex === strings.length - 1 ? 0 : prevIndex + 1\r\n );\r\n }\r\n }\r\n }, isDeleting ? backSpeed : typeSpeed);\r\n\r\n return () => clearTimeout(timer);\r\n }, [currentText, isDeleting, currentStringIndex, strings, typeSpeed, backSpeed, backDelay, loop, isPaused]);\r\n\r\n // Cursor fade effect\r\n useEffect(() => {\r\n const fadeTimer = setInterval(() => {\r\n setCursorOpacity(prev => {\r\n if (prev === 1) return 0;\r\n return 1;\r\n });\r\n }, 750);\r\n\r\n return () => clearInterval(fadeTimer);\r\n }, []);\r\n\r\n return (\r\n <span className={`${containerClassName} ${className}`} >\r\n <span className={typedClassName}>{currentText}</span>\r\n {showCursor && (\r\n <span\r\n className={cursorClassName}\r\n aria-hidden=\"true\"\r\n style={{\r\n ...style,\r\n opacity: cursorOpacity\r\n }}\r\n >\r\n\r\n </span>\r\n )}\r\n </span>\r\n );\r\n};\r\n\r\nexport default Typed;","import React, { useEffect, useState } from 'react';\n\nexport interface PreloaderProps {\n /** Loading state - if true, preloader is shown */\n isLoading?: boolean;\n /** Duration in milliseconds before auto-hide */\n duration?: number;\n /** Background color overlay */\n backgroundColor?: string;\n /** Accent color for the spinner */\n accentColor?: string;\n /** Size of the spinner in pixels */\n size?: number;\n /** Border width of the spinner */\n borderWidth?: number;\n /** Custom className for the preloader */\n className?: string;\n /** Custom className for the spinner */\n spinnerClassName?: string;\n /** Custom z-index */\n zIndex?: number;\n /** Callback when preloader finishes */\n onComplete?: () => void;\n}\n\nconst Preloader = ({\n isLoading: externalLoading,\n duration = 1000,\n backgroundColor,\n accentColor,\n size = 90,\n borderWidth = 6,\n className = '',\n spinnerClassName = '',\n zIndex = 999999,\n onComplete\n}: PreloaderProps) => {\n const [internalLoading, setInternalLoading] = useState(true);\n\n // Use external loading state if provided, otherwise use internal state\n const isLoading = externalLoading !== undefined ? externalLoading : internalLoading;\n\n useEffect(() => {\n // Only auto-hide if we're using internal loading state\n if (externalLoading === undefined) {\n const timer = setTimeout(() => {\n setInternalLoading(false);\n onComplete?.();\n }, duration);\n\n return () => clearTimeout(timer);\n }\n }, [duration, externalLoading, onComplete]);\n\n // Handle external loading state changes - auto-hide when externalLoading is true\n useEffect(() => {\n if (externalLoading === true) {\n const timer = setTimeout(() => {\n onComplete?.();\n }, duration);\n\n return () => clearTimeout(timer);\n }\n }, [externalLoading, duration, onComplete]);\n\n const preloaderStyle: React.CSSProperties = {\n position: 'fixed',\n inset: 0,\n zIndex,\n overflow: 'hidden',\n background: backgroundColor || 'var(--background-color, #00000018)',\n transition: 'all 0.6s ease-out',\n display: isLoading ? 'block' : 'none'\n };\n\n const spinnerStyle: React.CSSProperties = {\n position: 'fixed',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n border: `${borderWidth}px solid #ffffff`,\n borderColor: `${accentColor || 'var(--accent-color, #007bff)'} transparent transparent transparent`,\n borderRadius: '50%',\n width: `${size}px`,\n height: `${size}px`,\n animation: 'animate-preloader 1.5s linear infinite'\n };\n\n return (\n <>\n <div\n className={`preloader-overlay ${className}`}\n style={preloaderStyle}\n >\n <div\n className={`preloader-spinner ${spinnerClassName}`}\n style={spinnerStyle}\n />\n </div>\n\n {/* Global styles for animation */}\n <style>{`\n @keyframes animate-preloader {\n 0% {\n transform: translate(-50%, -50%) rotate(0deg);\n }\n 100% {\n transform: translate(-50%, -50%) rotate(360deg);\n }\n }\n `}</style>\n </>\n );\n};\n\nexport default Preloader;\n","import React, { useEffect, useState, useRef } from 'react';\r\n\r\nexport interface ScrollTopProps {\r\n /** Scroll position threshold to show the button (in pixels) */\r\n threshold?: number;\r\n /** Custom className for the button */\r\n className?: string;\r\n /** Custom icon/content for the button */\r\n children?: React.ReactNode;\r\n /** Position of the button */\r\n position?: 'bottom-right' | 'bottom-left' | 'bottom-center' | 'top-right' | 'top-left' | 'top-center';\r\n /** Size of the button */\r\n size?: 'sm' | 'md' | 'lg';\r\n /** Shape of the button */\r\n shape?: 'circle' | 'square' | 'rounded';\r\n /** Whether to show the button initially */\r\n showInitially?: boolean;\r\n /** Custom scroll behavior */\r\n scrollBehavior?: 'auto' | 'smooth';\r\n /** Custom styles */\r\n style?: React.CSSProperties;\r\n /** Callback when button is clicked */\r\n onClick?: () => void;\r\n /** Callback when visibility changes */\r\n onVisibilityChange?: (isVisible: boolean) => void;\r\n /** Element ID or selector to check visibility for showing the button */\r\n targetElement?: string;\r\n /** Percentage of page scroll to show the button (0-100) */\r\n scrollPercentage?: number;\r\n}\r\n\r\nconst ScrollTop = ({\r\n threshold = 100,\r\n className = '',\r\n children,\r\n position = 'bottom-right',\r\n size = 'md',\r\n shape = 'circle',\r\n showInitially = false,\r\n scrollBehavior = 'smooth',\r\n style,\r\n onClick,\r\n onVisibilityChange,\r\n targetElement,\r\n scrollPercentage\r\n}: ScrollTopProps) => {\r\n const [isVisible, setIsVisible] = useState(showInitially);\r\n\r\n useEffect(() => {\r\n // Show/hide scroll to top button based on scroll position\r\n const toggleVisibility = () => {\r\n let shouldBeVisible = false;\r\n\r\n // Check scroll percentage first\r\n if (scrollPercentage !== undefined) {\r\n const maxScroll = document.documentElement.scrollHeight - window.innerHeight;\r\n const currentScroll = window.scrollY;\r\n const percentage = (currentScroll / maxScroll) * 100;\r\n shouldBeVisible = percentage >= scrollPercentage;\r\n }\r\n // Check target element visibility\r\n else if (targetElement) {\r\n const element = document.querySelector(targetElement);\r\n if (element) {\r\n const rect = element.getBoundingClientRect();\r\n const isInViewport = rect.top < window.innerHeight && rect.bottom > 0;\r\n shouldBeVisible = isInViewport; // Show when element is visible\r\n } else {\r\n // If element doesn't exist, fall back to threshold behavior\r\n shouldBeVisible = window.scrollY > threshold;\r\n }\r\n }\r\n // Default threshold behavior\r\n else {\r\n shouldBeVisible = window.scrollY > threshold;\r\n }\r\n\r\n // Set visibility immediately\r\n setIsVisible(shouldBeVisible);\r\n onVisibilityChange?.(shouldBeVisible);\r\n };\r\n\r\n window.addEventListener('scroll', toggleVisibility, { passive: true });\r\n // Initial check\r\n toggleVisibility();\r\n\r\n return () => {\r\n window.removeEventListener('scroll', toggleVisibility);\r\n };\r\n }, [threshold, onVisibilityChange, targetElement, scrollPercentage]);\r\n\r\n const scrollToTop = () => {\r\n window.scrollTo({\r\n top: 0,\r\n behavior: scrollBehavior\r\n });\r\n onClick?.();\r\n };\r\n\r\n const handleClick = (e: React.MouseEvent) => {\r\n e.preventDefault();\r\n scrollToTop();\r\n };\r\n\r\n // Position classes\r\n const positionClasses = {\r\n 'bottom-right': 'fixed bottom-8 right-8',\r\n 'bottom-left': 'fixed bottom-8 left-8',\r\n 'bottom-center': 'fixed bottom-8 left-1/2 transform -translate-x-1/2',\r\n 'top-right': 'fixed top-8 right-8',\r\n 'top-left': 'fixed top-8 left-8',\r\n 'top-center': 'fixed top-8 left-1/2 transform -translate-x-1/2'\r\n };\r\n\r\n // Size classes\r\n const sizeClasses = {\r\n sm: 'w-8 h-8 text-sm',\r\n md: 'w-12 h-12 text-base',\r\n lg: 'w-16 h-16 text-lg'\r\n };\r\n\r\n // Shape classes\r\n const shapeClasses = {\r\n circle: 'rounded-full',\r\n square: 'rounded-none',\r\n rounded: 'rounded-lg'\r\n };\r\n\r\n const buttonClasses = `\r\n ${positionClasses[position]}\r\n ${sizeClasses[size]}\r\n ${shapeClasses[shape]}\r\n ${className}\r\n flex items-center justify-center\r\n bg-blue-600 hover:bg-blue-700\r\n text-white\r\n shadow-lg hover:shadow-xl\r\n transition-all duration-300 ease-in-out\r\n cursor-pointer\r\n z-50\r\n ${isVisible ? 'opacity-100 translate-y-0' : 'opacity-0 translate-y-4 pointer-events-none'}\r\n `;\r\n\r\n const defaultContent = (\r\n <svg\r\n className=\"w-4 h-4\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n viewBox=\"0 0 24 24\"\r\n >\r\n <path\r\n strokeLinecap=\"round\"\r\n strokeLinejoin=\"round\"\r\n strokeWidth={2}\r\n d=\"M5 10l7-7m0 0l7 7m-7-7v18\"\r\n />\r\n </svg>\r\n );\r\n\r\n return (\r\n <button\r\n className={buttonClasses}\r\n onClick={handleClick}\r\n style={style}\r\n aria-label=\"Scroll to top\"\r\n title=\"Scroll to top\"\r\n >\r\n {children || defaultContent}\r\n </button>\r\n );\r\n};\r\n\r\nexport default ScrollTop;\r\n","import React, { useState, useEffect } from 'react';\n\nexport interface WhatsAppProps {\n /** Phone number for WhatsApp (with country code, without + or spaces) */\n phone?: string;\n /** Default message to send */\n message?: string;\n /** Position of the button */\n position?: 'bottom-right' | 'bottom-left' | 'bottom-center' | 'top-right' | 'top-left' | 'top-center';\n /** Size of the button */\n size?: 'sm' | 'md' | 'lg';\n /** Show tooltip on hover */\n showTooltip?: boolean;\n /** Tooltip text */\n tooltipText?: string;\n /** Custom className for the button */\n className?: string;\n /** Custom styles */\n style?: React.CSSProperties;\n /** Callback when button is clicked */\n onClick?: () => void;\n /** Z-index for the button */\n zIndex?: number;\n /** Whether to open in new tab */\n openInNewTab?: boolean;\n}\n\nconst WhatsApp = ({\n phone = '',\n message = '¡Hola! Me gustaría obtener más información.',\n position = 'bottom-right',\n size = 'md',\n showTooltip = true,\n tooltipText = '¿En qué podemos ayudarte?',\n className = '',\n style,\n onClick,\n zIndex = 50,\n openInNewTab = true\n}: WhatsAppProps) => {\n const [isHovered, setIsHovered] = useState(false);\n\n // Don't render if no phone number provided\n if (!phone) return null;\n\n const handleWhatsAppClick = () => {\n const cleanPhone = phone.replace(/[^\\d]/g, '');\n const encodedMessage = encodeURIComponent(message);\n const whatsappUrl = `https://wa.me/${cleanPhone}?text=${encodedMessage}`;\n\n if (openInNewTab) {\n window.open(whatsappUrl, '_blank');\n } else {\n window.location.href = whatsappUrl;\n }\n\n onClick?.();\n };\n\n // Position classes\n const positionClasses = {\n 'bottom-right': 'bottom-6 right-6',\n 'bottom-left': 'bottom-6 left-6',\n 'bottom-center': 'bottom-6 left-1/2 transform -translate-x-1/2',\n 'top-right': 'top-6 right-6',\n 'top-left': 'top-6 left-6',\n 'top-center': 'top-6 left-1/2 transform -translate-x-1/2'\n };\n\n // Size classes\n const sizeClasses = {\n sm: 'w-10 h-10',\n md: 'w-14 h-14',\n lg: 'w-16 h-16'\n };\n\n // Icon size based on button size\n const iconSizes = {\n sm: 20,\n md: 32,\n lg: 40\n };\n\n const buttonClasses = `\n fixed ${positionClasses[position]}\n ${sizeClasses[size]}\n bg-[#25D366] hover:bg-[#128C7E]\n text-white rounded-full shadow-2xl\n flex items-center justify-center\n transition-all duration-300 hover:scale-110\n z-${zIndex}\n group\n ${className}\n `;\n\n return (\n <>\n <button\n className={buttonClasses}\n onClick={handleWhatsAppClick}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n style={style}\n aria-label=\"Chatear por WhatsApp\"\n title=\"Chatear por WhatsApp\"\n >\n <svg\n width={iconSizes[size]}\n height={iconSizes[size]}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z\" />\n </svg>\n </button>\n\n {showTooltip && (\n <div\n className={`\n fixed ${positionClasses[position].replace('6', '20').replace('bottom-6', 'bottom-20').replace('top-6', 'top-20')}\n bg-white text-gray-800 px-3 py-1 rounded-md text-sm font-semibold\n shadow-md whitespace-nowrap pointer-events-none\n transition-opacity duration-300\n ${isHovered ? 'opacity-100' : 'opacity-0'}\n ${position.includes('right') ? 'right-20' : position.includes('left') ? 'left-20' : 'left-1/2 transform -translate-x-1/2'}\n `}\n style={{\n [position.includes('bottom') ? 'bottom' : 'top']: position.includes('bottom') ? '5.5rem' : '5.5rem'\n }}\n >\n {tooltipText}\n </div>\n )}\n </>\n );\n};\n\nexport default WhatsApp;\n"],"x_google_ignoreList":[0,1],"mappings":";;;;;;;;;;;;;;;CAWA,IAAI,qBAAqB,OAAO,IAAI,6BAA6B,EAC/D,sBAAsB,OAAO,IAAI,iBAAiB;CACpD,SAAS,QAAQ,MAAM,QAAQ,UAAU;EACvC,IAAI,MAAM;EACV,KAAK,MAAM,aAAa,MAAM,KAAK;EACnC,KAAK,MAAM,OAAO,QAAQ,MAAM,KAAK,OAAO;EAC5C,IAAI,SAAS,QAAQ;GACnB,WAAW,EAAE;GACb,KAAK,IAAI,YAAY,QACnB,UAAU,aAAa,SAAS,YAAY,OAAO;SAChD,WAAW;EAClB,SAAS,SAAS;EAClB,OAAO;GACL,UAAU;GACJ;GACD;GACL,KAAK,KAAK,MAAM,SAAS,SAAS;GAClC,OAAO;GACR;;CAEH,QAAQ,WAAW;CACnB,QAAQ,MAAM;CACd,QAAQ,OAAO;;;;;CC9Bb,OAAO,UAAA,sCAAA;;ACiBT,IAAM,UAAU,EACd,UACA,UAAU,WACV,OAAO,MACP,gBACE,KAAK,GACP,WAAW,OACX,YAAY,IACZ,qBAAqB,4EACrB,mBAAmB,gEACnB,gBAAgB,4BACC;CAuBjB,OACE,iBAAA,GAAA,mBAAA,KAAC,UAAD;EACE,WAVY;MACZ,mBAAY;MACZ;GAbF,SAAS;GACT,WAAW;GACX,SAAS;GAWP,CAAe,SAAS;MACxB;GARF,IAAI;GACJ,IA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{ default as React } from 'react';
|
|
2
|
+
type AnchorVariant = 'none' | 'primary' | 'secondary' | 'outline';
|
|
3
|
+
type AnchorSize = 'sm' | 'md' | 'lg';
|
|
1
4
|
export interface AnchorProps {
|
|
2
5
|
children?: React.ReactNode;
|
|
3
|
-
variant?:
|
|
4
|
-
size?:
|
|
6
|
+
variant?: AnchorVariant;
|
|
7
|
+
size?: AnchorSize;
|
|
5
8
|
href?: string;
|
|
6
9
|
className?: string;
|
|
7
10
|
containerClassName?: string;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
type ButtonVariant = 'primary' | 'secondary' | 'outline';
|
|
3
|
+
type ButtonSize = 'sm' | 'md' | 'lg';
|
|
2
4
|
export interface ButtonProps {
|
|
3
5
|
children: React.ReactNode;
|
|
4
|
-
variant?:
|
|
5
|
-
size?:
|
|
6
|
+
variant?: ButtonVariant;
|
|
7
|
+
size?: ButtonSize;
|
|
6
8
|
onClick?: () => void;
|
|
7
9
|
disabled?: boolean;
|
|
8
10
|
className?: string;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
type CardPadding = 'none' | 'sm' | 'md' | 'lg';
|
|
3
|
+
type CardShadow = 'none' | 'sm' | 'md' | 'lg';
|
|
2
4
|
export interface CardProps {
|
|
3
5
|
children: React.ReactNode;
|
|
4
6
|
title?: string;
|
|
5
7
|
className?: string;
|
|
6
8
|
containerClassName?: string;
|
|
7
9
|
titleClassName?: string;
|
|
8
|
-
padding?:
|
|
9
|
-
shadow?:
|
|
10
|
+
padding?: CardPadding;
|
|
11
|
+
shadow?: CardShadow;
|
|
10
12
|
}
|
|
11
13
|
declare const Card: ({ children, title, className, containerClassName, titleClassName, padding, shadow, }: CardProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
14
|
export default Card;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
export interface PreloaderProps {
|
|
3
2
|
/** Loading state - if true, preloader is shown */
|
|
4
3
|
isLoading?: boolean;
|
|
@@ -21,5 +20,5 @@ export interface PreloaderProps {
|
|
|
21
20
|
/** Callback when preloader finishes */
|
|
22
21
|
onComplete?: () => void;
|
|
23
22
|
}
|
|
24
|
-
declare const Preloader:
|
|
23
|
+
declare const Preloader: ({ isLoading: externalLoading, duration, backgroundColor, accentColor, size, borderWidth, className, spinnerClassName, zIndex, onComplete }: PreloaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
24
|
export default Preloader;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type ProgressBarVariant = 'primary' | 'success' | 'warning' | 'danger' | 'dark' | 'light';
|
|
3
|
+
interface ProgressBarProps {
|
|
3
4
|
progress: number;
|
|
4
5
|
max: number;
|
|
5
6
|
min: number;
|
|
6
7
|
'aria-label': string;
|
|
7
|
-
}
|
|
8
|
+
}
|
|
8
9
|
type ProgressBarPropsWithClassName = ProgressBarProps & {
|
|
9
|
-
className?: CSSProperties;
|
|
10
|
-
style?: CSSProperties;
|
|
10
|
+
className?: React.CSSProperties;
|
|
11
|
+
style?: React.CSSProperties;
|
|
11
12
|
containerClassName?: string;
|
|
12
13
|
barClassName?: string;
|
|
13
|
-
variant?:
|
|
14
|
+
variant?: ProgressBarVariant;
|
|
14
15
|
};
|
|
15
16
|
declare const ProgressBar: ({ progress, max, min, "aria-label": ariaLabel, className, style, containerClassName, barClassName, variant }: ProgressBarPropsWithClassName) => import("react/jsx-runtime").JSX.Element;
|
|
16
17
|
export default ProgressBar;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ScrollTopProps {
|
|
3
|
+
/** Scroll position threshold to show the button (in pixels) */
|
|
4
|
+
threshold?: number;
|
|
5
|
+
/** Custom className for the button */
|
|
6
|
+
className?: string;
|
|
7
|
+
/** Custom icon/content for the button */
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
/** Position of the button */
|
|
10
|
+
position?: 'bottom-right' | 'bottom-left' | 'bottom-center' | 'top-right' | 'top-left' | 'top-center';
|
|
11
|
+
/** Size of the button */
|
|
12
|
+
size?: 'sm' | 'md' | 'lg';
|
|
13
|
+
/** Shape of the button */
|
|
14
|
+
shape?: 'circle' | 'square' | 'rounded';
|
|
15
|
+
/** Whether to show the button initially */
|
|
16
|
+
showInitially?: boolean;
|
|
17
|
+
/** Custom scroll behavior */
|
|
18
|
+
scrollBehavior?: 'auto' | 'smooth';
|
|
19
|
+
/** Custom styles */
|
|
20
|
+
style?: React.CSSProperties;
|
|
21
|
+
/** Callback when button is clicked */
|
|
22
|
+
onClick?: () => void;
|
|
23
|
+
/** Callback when visibility changes */
|
|
24
|
+
onVisibilityChange?: (isVisible: boolean) => void;
|
|
25
|
+
/** Element ID or selector to check visibility for showing the button */
|
|
26
|
+
targetElement?: string;
|
|
27
|
+
/** Percentage of page scroll to show the button (0-100) */
|
|
28
|
+
scrollPercentage?: number;
|
|
29
|
+
}
|
|
30
|
+
declare const ScrollTop: ({ threshold, className, children, position, size, shape, showInitially, scrollBehavior, style, onClick, onVisibilityChange, targetElement, scrollPercentage }: ScrollTopProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export default ScrollTop;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
type SpinnerSize = 'sm' | 'md' | 'lg';
|
|
2
|
+
type SpinnerType = 'circle' | 'dots' | 'pulse' | 'bars';
|
|
1
3
|
export interface SpinnerProps {
|
|
2
4
|
className?: string;
|
|
3
5
|
containerClassName?: string;
|
|
4
6
|
dotClassName?: string;
|
|
5
7
|
barClassName?: string;
|
|
6
|
-
size?:
|
|
7
|
-
type?:
|
|
8
|
+
size?: SpinnerSize;
|
|
9
|
+
type?: SpinnerType;
|
|
8
10
|
}
|
|
9
11
|
declare const Spinner: ({ className, containerClassName, dotClassName, barClassName, size, type }: SpinnerProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
12
|
export default Spinner;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
|
+
type TypedStyle = CSSProperties & {
|
|
3
|
+
animation?: string;
|
|
4
|
+
animationDelay?: string;
|
|
5
|
+
};
|
|
2
6
|
type TypedProps = {
|
|
3
7
|
strings: string[];
|
|
4
8
|
typeSpeed?: number;
|
|
@@ -13,9 +17,5 @@ type TypedProps = {
|
|
|
13
17
|
cursorClassName?: string;
|
|
14
18
|
style?: TypedStyle;
|
|
15
19
|
};
|
|
16
|
-
type TypedStyle = CSSProperties & {
|
|
17
|
-
animation?: string;
|
|
18
|
-
animationDelay?: string;
|
|
19
|
-
};
|
|
20
20
|
declare const Typed: ({ strings, typeSpeed, backSpeed, backDelay, startDelay, loop, showCursor, className, containerClassName, typedClassName, cursorClassName, style, }: TypedProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
21
|
export default Typed;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface WhatsAppProps {
|
|
3
|
+
/** Phone number for WhatsApp (with country code, without + or spaces) */
|
|
4
|
+
phone?: string;
|
|
5
|
+
/** Default message to send */
|
|
6
|
+
message?: string;
|
|
7
|
+
/** Position of the button */
|
|
8
|
+
position?: 'bottom-right' | 'bottom-left' | 'bottom-center' | 'top-right' | 'top-left' | 'top-center';
|
|
9
|
+
/** Size of the button */
|
|
10
|
+
size?: 'sm' | 'md' | 'lg';
|
|
11
|
+
/** Show tooltip on hover */
|
|
12
|
+
showTooltip?: boolean;
|
|
13
|
+
/** Tooltip text */
|
|
14
|
+
tooltipText?: string;
|
|
15
|
+
/** Custom className for the button */
|
|
16
|
+
className?: string;
|
|
17
|
+
/** Custom styles */
|
|
18
|
+
style?: React.CSSProperties;
|
|
19
|
+
/** Callback when button is clicked */
|
|
20
|
+
onClick?: () => void;
|
|
21
|
+
/** Z-index for the button */
|
|
22
|
+
zIndex?: number;
|
|
23
|
+
/** Whether to open in new tab */
|
|
24
|
+
openInNewTab?: boolean;
|
|
25
|
+
}
|
|
26
|
+
declare const WhatsApp: ({ phone, message, position, size, showTooltip, tooltipText, className, style, onClick, zIndex, openInNewTab }: WhatsAppProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
27
|
+
export default WhatsApp;
|
|
@@ -7,3 +7,5 @@ export { default as DropDown } from './DropDown';
|
|
|
7
7
|
export { default as ProgressBar } from './ProgressBar';
|
|
8
8
|
export { default as Typed } from './Typed';
|
|
9
9
|
export { default as Preloader } from './Preloader';
|
|
10
|
+
export { default as ScrollTop } from './ScrollTop';
|
|
11
|
+
export { default as WhatsApp } from './WhatsApp';
|
package/package.json
CHANGED