pixelforge-ui 1.0.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.
@@ -0,0 +1,666 @@
1
+ import React from 'react';
2
+
3
+ declare const colors: {
4
+ primary: {
5
+ lime: string;
6
+ lavender: string;
7
+ sky: string;
8
+ peach: string;
9
+ mint: string;
10
+ };
11
+ dark: {
12
+ lime: string;
13
+ lavender: string;
14
+ sky: string;
15
+ peach: string;
16
+ mint: string;
17
+ };
18
+ neutral: {
19
+ black: string;
20
+ dark: string;
21
+ gray: string;
22
+ light: string;
23
+ white: string;
24
+ };
25
+ semantic: {
26
+ success: string;
27
+ warning: string;
28
+ error: string;
29
+ info: string;
30
+ };
31
+ accent: string;
32
+ };
33
+ declare const typography: {
34
+ font: {
35
+ pixel: string;
36
+ sans: string;
37
+ mono: string;
38
+ };
39
+ size: {
40
+ xs: string;
41
+ sm: string;
42
+ base: string;
43
+ lg: string;
44
+ xl: string;
45
+ '2xl': string;
46
+ };
47
+ weight: {
48
+ normal: number;
49
+ bold: number;
50
+ };
51
+ lineHeight: {
52
+ tight: number;
53
+ normal: number;
54
+ relaxed: number;
55
+ };
56
+ };
57
+ declare const spacing: {
58
+ 0: string;
59
+ 1: string;
60
+ 2: string;
61
+ 3: string;
62
+ 4: string;
63
+ 5: string;
64
+ 6: string;
65
+ 8: string;
66
+ 10: string;
67
+ 12: string;
68
+ 16: string;
69
+ 20: string;
70
+ };
71
+ declare const shadows: {
72
+ sm: string;
73
+ md: string;
74
+ lg: string;
75
+ glow: {
76
+ lime: string;
77
+ lavender: string;
78
+ sky: string;
79
+ peach: string;
80
+ };
81
+ press: string;
82
+ };
83
+ declare const borderRadius: {
84
+ sm: string;
85
+ base: string;
86
+ lg: string;
87
+ full: string;
88
+ };
89
+ declare const breakpoints: {
90
+ xs: string;
91
+ sm: string;
92
+ md: string;
93
+ lg: string;
94
+ xl: string;
95
+ '2xl': string;
96
+ };
97
+ declare const zIndex: {
98
+ hidden: number;
99
+ base: number;
100
+ dropdown: number;
101
+ sticky: number;
102
+ fixed: number;
103
+ modal: number;
104
+ popover: number;
105
+ tooltip: number;
106
+ };
107
+ declare const transitions: {
108
+ fast: string;
109
+ base: string;
110
+ slow: string;
111
+ };
112
+ declare const gamePalettes: {
113
+ nes: {
114
+ name: string;
115
+ colors: string[];
116
+ };
117
+ gameboy: {
118
+ name: string;
119
+ colors: string[];
120
+ };
121
+ atari: {
122
+ name: string;
123
+ colors: string[];
124
+ };
125
+ snes: {
126
+ name: string;
127
+ colors: string[];
128
+ };
129
+ };
130
+
131
+ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
132
+ /**
133
+ * Varianti di stile del bottone
134
+ */
135
+ variant?: 'primary' | 'secondary' | 'outline' | 'ghost';
136
+ /**
137
+ * Dimensione del bottone
138
+ */
139
+ size?: 'sm' | 'md' | 'lg';
140
+ /**
141
+ * Se il bottone è disabilitato
142
+ */
143
+ disabled?: boolean;
144
+ /**
145
+ * Se il bottone è in stato di loading
146
+ */
147
+ isLoading?: boolean;
148
+ /**
149
+ * Contenuto personalizzato durante il loading
150
+ */
151
+ loadingText?: string;
152
+ }
153
+ /**
154
+ * Button Component
155
+ *
156
+ * Un bottone retro-future con supporto a multiple varianti e dimensioni.
157
+ *
158
+ * @example
159
+ * ```tsx
160
+ * <Button>Press Start</Button>
161
+ * <Button variant="secondary" size="lg">Attack</Button>
162
+ * <Button variant="outline" disabled>Disabled</Button>
163
+ * ```
164
+ */
165
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
166
+
167
+ interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
168
+ /**
169
+ * Label del campo input
170
+ */
171
+ label?: string;
172
+ /**
173
+ * Messaggio di errore da mostrare
174
+ */
175
+ error?: string;
176
+ /**
177
+ * Testo di aiuto sotto l'input
178
+ */
179
+ helperText?: string;
180
+ /**
181
+ * Se il campo è obbligatorio
182
+ */
183
+ required?: boolean;
184
+ /**
185
+ * Icona o elemento da mostrare a sinistra dell'input
186
+ */
187
+ leftIcon?: React.ReactNode;
188
+ /**
189
+ * Icona o elemento da mostrare a destra dell'input
190
+ */
191
+ rightIcon?: React.ReactNode;
192
+ }
193
+ /**
194
+ * Input Component
195
+ *
196
+ * Campo di testo retro-future con supporto a label, errori e icone.
197
+ *
198
+ * @example
199
+ * ```tsx
200
+ * <Input placeholder="Enter name" />
201
+ * <Input label="Username" required />
202
+ * <Input error="Invalid email" type="email" />
203
+ * ```
204
+ */
205
+ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
206
+
207
+ interface CardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
208
+ /**
209
+ * Titolo della card
210
+ */
211
+ title?: string | React.ReactNode;
212
+ /**
213
+ * Sottotitolo della card
214
+ */
215
+ subtitle?: string | React.ReactNode;
216
+ /**
217
+ * Se la card ha uno sfondo interattivo
218
+ */
219
+ interactive?: boolean;
220
+ /**
221
+ * Variant di colore della card
222
+ */
223
+ variant?: 'default' | 'lime' | 'lavender' | 'sky' | 'peach' | 'mint';
224
+ /**
225
+ * Header personalizzato della card
226
+ */
227
+ header?: React.ReactNode;
228
+ /**
229
+ * Footer personalizzato della card
230
+ */
231
+ footer?: React.ReactNode;
232
+ }
233
+ /**
234
+ * Card Component
235
+ *
236
+ * Contenitore retro-future con supporto a titolo, sottotitolo e varianti colore.
237
+ *
238
+ * @example
239
+ * ```tsx
240
+ * <Card title="Player Stats" subtitle="Level 42">
241
+ * <p>HP: 100/100</p>
242
+ * </Card>
243
+ *
244
+ * <Card variant="lavender" interactive>
245
+ * <p>Click me!</p>
246
+ * </Card>
247
+ * ```
248
+ */
249
+ declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
250
+
251
+ interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
252
+ /**
253
+ * Variante di stile della badge
254
+ */
255
+ variant?: 'default' | 'success' | 'warning' | 'error' | 'info' | 'lime' | 'lavender' | 'sky' | 'peach' | 'mint';
256
+ /**
257
+ * Dimensione della badge
258
+ */
259
+ size?: 'sm' | 'md' | 'lg';
260
+ /**
261
+ * Se la badge è dismissible (ha una X)
262
+ */
263
+ dismissible?: boolean;
264
+ /**
265
+ * Callback quando la badge viene dismessa
266
+ */
267
+ onDismiss?: () => void;
268
+ }
269
+ /**
270
+ * Badge Component
271
+ *
272
+ * Piccola etichetta retro-future con supporto a varianti colore e dimensioni.
273
+ *
274
+ * @example
275
+ * ```tsx
276
+ * <Badge>Active</Badge>
277
+ * <Badge variant="success">Completed</Badge>
278
+ * <Badge variant="error" dismissible onDismiss={() => {}}>Alert</Badge>
279
+ * ```
280
+ */
281
+ declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLSpanElement>>;
282
+
283
+ interface ModalProps {
284
+ /**
285
+ * Se il modal è aperto
286
+ */
287
+ isOpen: boolean;
288
+ /**
289
+ * Callback quando il modal viene chiuso
290
+ */
291
+ onClose: () => void;
292
+ /**
293
+ * Titolo del modal
294
+ */
295
+ title?: string | React.ReactNode;
296
+ /**
297
+ * Se il modal può essere chiuso cliccando fuori
298
+ */
299
+ closeOnBackdropClick?: boolean;
300
+ /**
301
+ * Se mostrare il bottone di chiusura (X)
302
+ */
303
+ showCloseButton?: boolean;
304
+ /**
305
+ * Footer personalizzato del modal
306
+ */
307
+ footer?: React.ReactNode;
308
+ /**
309
+ * Size del modal
310
+ */
311
+ size?: 'sm' | 'md' | 'lg';
312
+ /**
313
+ * Contenuto del modal
314
+ */
315
+ children: React.ReactNode;
316
+ }
317
+ /**
318
+ * Modal Component
319
+ *
320
+ * Finestra modale retro-future con backdrop, chiusura, e supporto a size.
321
+ *
322
+ * @example
323
+ * ```tsx
324
+ * const [isOpen, setIsOpen] = useState(false)
325
+ *
326
+ * return (
327
+ * <>
328
+ * <Button onClick={() => setIsOpen(true)}>Open Modal</Button>
329
+ * <Modal
330
+ * isOpen={isOpen}
331
+ * onClose={() => setIsOpen(false)}
332
+ * title="Confirm Action"
333
+ * >
334
+ * <p>Are you sure?</p>
335
+ * </Modal>
336
+ * </>
337
+ * )
338
+ * ```
339
+ */
340
+ declare const Modal: React.FC<ModalProps>;
341
+
342
+ interface DropdownItem {
343
+ /**
344
+ * ID univoco dell'item
345
+ */
346
+ id: string;
347
+ /**
348
+ * Label visualizzato
349
+ */
350
+ label: string | React.ReactNode;
351
+ /**
352
+ * Se l'item è disabilitato
353
+ */
354
+ disabled?: boolean;
355
+ /**
356
+ * Se è un separatore
357
+ */
358
+ divider?: boolean;
359
+ /**
360
+ * Callback al click
361
+ */
362
+ onClick?: () => void;
363
+ }
364
+ interface DropdownProps {
365
+ /**
366
+ * Trigger element (il bottone che apre il dropdown)
367
+ */
368
+ trigger: React.ReactNode;
369
+ /**
370
+ * Array di items del dropdown
371
+ */
372
+ items: DropdownItem[];
373
+ /**
374
+ * Se il dropdown è aperto
375
+ */
376
+ isOpen?: boolean;
377
+ /**
378
+ * Callback quando l'apertura cambia
379
+ */
380
+ onOpenChange?: (isOpen: boolean) => void;
381
+ /**
382
+ * Posizionamento del dropdown
383
+ */
384
+ placement?: 'top' | 'bottom' | 'left' | 'right';
385
+ }
386
+ /**
387
+ * Dropdown Component
388
+ *
389
+ * Menu a tendina retro-future con supporto a items, divider, e disabilitazione.
390
+ *
391
+ * @example
392
+ * ```tsx
393
+ * <Dropdown
394
+ * trigger={<Button>Menu</Button>}
395
+ * items={[
396
+ * { id: '1', label: 'Edit', onClick: () => {} },
397
+ * { id: '2', label: 'Delete', onClick: () => {} },
398
+ * { id: '3', label: '', divider: true },
399
+ * { id: '4', label: 'Copy', onClick: () => {} },
400
+ * ]}
401
+ * />
402
+ * ```
403
+ */
404
+ declare const Dropdown: React.FC<DropdownProps>;
405
+
406
+ interface TooltipProps {
407
+ /**
408
+ * Contenuto del tooltip
409
+ */
410
+ content: string | React.ReactNode;
411
+ /**
412
+ * Elemento su cui mostrare il tooltip
413
+ */
414
+ children: React.ReactElement;
415
+ /**
416
+ * Posizionamento del tooltip
417
+ */
418
+ placement?: 'top' | 'bottom' | 'left' | 'right';
419
+ /**
420
+ * Delay prima di mostrare il tooltip (ms)
421
+ */
422
+ delay?: number;
423
+ /**
424
+ * Se il tooltip è disabilitato
425
+ */
426
+ disabled?: boolean;
427
+ /**
428
+ * Tema del tooltip
429
+ */
430
+ variant?: 'default' | 'dark';
431
+ }
432
+ /**
433
+ * Tooltip Component
434
+ *
435
+ * Suggerimento che appare al passaggio del mouse, con supporto a placement e delay.
436
+ *
437
+ * @example
438
+ * ```tsx
439
+ * <Tooltip content="This is helpful text" placement="top">
440
+ * <Button>Hover me</Button>
441
+ * </Tooltip>
442
+ * ```
443
+ */
444
+ declare const Tooltip: React.FC<TooltipProps>;
445
+
446
+ interface NavbarLink {
447
+ /**
448
+ * Label del link
449
+ */
450
+ label: string;
451
+ /**
452
+ * URL o action del link
453
+ */
454
+ href?: string;
455
+ /**
456
+ * Callback al click
457
+ */
458
+ onClick?: () => void;
459
+ /**
460
+ * Se il link è attivo
461
+ */
462
+ active?: boolean;
463
+ /**
464
+ * Se il link è disabilitato
465
+ */
466
+ disabled?: boolean;
467
+ }
468
+ interface NavbarProps extends React.HTMLAttributes<HTMLDivElement> {
469
+ /**
470
+ * Logo o brand della navbar
471
+ */
472
+ brand?: string | React.ReactNode;
473
+ /**
474
+ * Array di links della navbar
475
+ */
476
+ links?: NavbarLink[];
477
+ /**
478
+ * Elemento a destra della navbar (es. user menu)
479
+ */
480
+ rightElement?: React.ReactNode;
481
+ /**
482
+ * Callback quando il brand viene cliccato
483
+ */
484
+ onBrandClick?: () => void;
485
+ /**
486
+ * Se la navbar è sticky
487
+ */
488
+ sticky?: boolean;
489
+ }
490
+ /**
491
+ * Navbar Component
492
+ *
493
+ * Barra di navigazione retro-future con supporto a brand, links e elemento destro.
494
+ *
495
+ * @example
496
+ * ```tsx
497
+ * <Navbar
498
+ * brand="PixelForge"
499
+ * links={[
500
+ * { label: 'Home', href: '/', active: true },
501
+ * { label: 'Docs', href: '/docs' },
502
+ * { label: 'About', href: '/about' },
503
+ * ]}
504
+ * rightElement={<Button size="sm">Login</Button>}
505
+ * />
506
+ * ```
507
+ */
508
+ declare const Navbar: React.ForwardRefExoticComponent<NavbarProps & React.RefAttributes<HTMLDivElement>>;
509
+
510
+ interface SidebarItem {
511
+ /**
512
+ * ID univoco dell'item
513
+ */
514
+ id: string;
515
+ /**
516
+ * Label visualizzato
517
+ */
518
+ label: string;
519
+ /**
520
+ * Icona o elemento prima del label
521
+ */
522
+ icon?: React.ReactNode;
523
+ /**
524
+ * URL o action dell'item
525
+ */
526
+ href?: string;
527
+ /**
528
+ * Callback al click
529
+ */
530
+ onClick?: () => void;
531
+ /**
532
+ * Se l'item è attivo
533
+ */
534
+ active?: boolean;
535
+ /**
536
+ * Se l'item è disabilitato
537
+ */
538
+ disabled?: boolean;
539
+ /**
540
+ * Sottomenu (nesting supportato)
541
+ */
542
+ children?: SidebarItem[];
543
+ }
544
+ interface SidebarProps extends React.HTMLAttributes<HTMLDivElement> {
545
+ /**
546
+ * Logo o brand della sidebar
547
+ */
548
+ brand?: string | React.ReactNode;
549
+ /**
550
+ * Array di items della sidebar
551
+ */
552
+ items: SidebarItem[];
553
+ /**
554
+ * Se la sidebar è collassabile
555
+ */
556
+ collapsible?: boolean;
557
+ /**
558
+ * Se la sidebar è di default collassata
559
+ */
560
+ defaultCollapsed?: boolean;
561
+ /**
562
+ * Elemento nel footer della sidebar
563
+ */
564
+ footer?: React.ReactNode;
565
+ }
566
+ /**
567
+ * Sidebar Component
568
+ *
569
+ * Pannello laterale retro-future con supporto a nested items, collapsing, e icone.
570
+ *
571
+ * @example
572
+ * ```tsx
573
+ * <Sidebar
574
+ * brand="Menu"
575
+ * items={[
576
+ * { id: '1', label: 'Home', icon: '🏠' },
577
+ * { id: '2', label: 'Settings', icon: '⚙️', active: true },
578
+ * {
579
+ * id: '3',
580
+ * label: 'More',
581
+ * icon: '📁',
582
+ * children: [
583
+ * { id: '3a', label: 'Option A' },
584
+ * { id: '3b', label: 'Option B' },
585
+ * ],
586
+ * },
587
+ * ]}
588
+ * />
589
+ * ```
590
+ */
591
+ declare const Sidebar: React.ForwardRefExoticComponent<SidebarProps & React.RefAttributes<HTMLDivElement>>;
592
+
593
+ interface FooterLink {
594
+ /**
595
+ * Label del link
596
+ */
597
+ label: string;
598
+ /**
599
+ * URL del link
600
+ */
601
+ href?: string;
602
+ /**
603
+ * Callback al click
604
+ */
605
+ onClick?: () => void;
606
+ }
607
+ interface FooterSection {
608
+ /**
609
+ * Titolo della sezione
610
+ */
611
+ title: string;
612
+ /**
613
+ * Array di links della sezione
614
+ */
615
+ links: FooterLink[];
616
+ }
617
+ interface FooterProps extends React.HTMLAttributes<HTMLElement> {
618
+ /**
619
+ * Marchio o copyright text
620
+ */
621
+ brand?: string | React.ReactNode;
622
+ /**
623
+ * Sezioni del footer
624
+ */
625
+ sections?: FooterSection[];
626
+ /**
627
+ * Testo di copyright
628
+ */
629
+ copyright?: string;
630
+ /**
631
+ * Elemento personalizzato nel footer (es. social links)
632
+ */
633
+ socialLinks?: React.ReactNode;
634
+ }
635
+ /**
636
+ * Footer Component
637
+ *
638
+ * Piè di pagina retro-future con supporto a sezioni, copyright, e social links.
639
+ *
640
+ * @example
641
+ * ```tsx
642
+ * <Footer
643
+ * brand="PixelForge"
644
+ * copyright="© 2024 PixelForge. All rights reserved."
645
+ * sections={[
646
+ * {
647
+ * title: 'Product',
648
+ * links: [
649
+ * { label: 'Features', href: '#' },
650
+ * { label: 'Pricing', href: '#' },
651
+ * ],
652
+ * },
653
+ * {
654
+ * title: 'Company',
655
+ * links: [
656
+ * { label: 'About', href: '#' },
657
+ * { label: 'Contact', href: '#' },
658
+ * ],
659
+ * },
660
+ * ]}
661
+ * />
662
+ * ```
663
+ */
664
+ declare const Footer: React.ForwardRefExoticComponent<FooterProps & React.RefAttributes<HTMLElement>>;
665
+
666
+ export { Badge, type BadgeProps, Button, type ButtonProps, Card, type CardProps, Dropdown, type DropdownItem, type DropdownProps, Footer, type FooterLink, type FooterProps, type FooterSection, Input, type InputProps, Modal, type ModalProps, Navbar, type NavbarLink, type NavbarProps, Sidebar, type SidebarItem, type SidebarProps, Tooltip, type TooltipProps, borderRadius, breakpoints, colors, gamePalettes, shadows, spacing, transitions, typography, zIndex };