@jonapin006/tiger 1.0.11 → 1.0.12

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 CHANGED
@@ -2,76 +2,84 @@
2
2
 
3
3
  Welcome to **Tiger Design System**, a high-fidelity, professional-grade UI library and framework built on **Clean Architecture** principles and **SOLID** engineering.
4
4
 
5
- This project is a showcase of advanced React engineering, featuring a robust multi-theme token architecture and a sophisticated "Geometry-by-Size" design system.
5
+ Tiger handles complex multi-theme token architectures and a sophisticated "Geometry-by-Size" system, optimized for the **Wallet** ecosystem.
6
6
 
7
7
  ---
8
8
 
9
- ## 🎨 Design Ecosystem: The Three Pillars
9
+ ## 🚀 Integración (Quick Start)
10
10
 
11
- Tiger features three distinct visual universes, each with its own light and dark mode implementation, driven by a centralized token configuration.
11
+ Sigue estos pasos para integrar Tiger en tu proyecto externo de React.
12
12
 
13
- ### 1. 💎 Glassmorphism (Modern/High-Context)
14
- Our flagship theme. It utilizes advanced backdrop blurs (up to `blur-3xl`), suttle card borders with varying opacities, and deep shadows to create a layered, "floating" UI experience.
15
- * **Key Features**: Translucent containers, premium glass elevation, and vibrant semantic indicators for Toasts and Status badges.
16
- * **Ideal for**: Modern administrative dashboards and high-fidelity consumer apps.
17
-
18
- ### 2. 🎡 Mandala (Organic/Soft)
19
- Inspired by balance and nature. This theme focuses on softer corner radii, nature-derived color palettes, and smooth, organic transitions.
20
- * **Key Features**: Earthy tones, pastel accents, and "squircle" geometry that avoids hard edges.
21
- * **Ideal for**: Wellness apps, lifestyle projects, and content-heavy interfaces.
22
-
23
- ### 3. 🎯 Mispuntos (Dynamic/Precision)
24
- Designed for density and readability. This theme prioritizes pixel-perfect alignment, higher contrast ratios, and a more structured, grid-based layout.
25
- * **Key Features**: Sharp focus on data presentation, compact components, and high-contrast tables.
26
- * **Ideal for**: E-commerce, loyalty platforms (Puntos), and data-intensive systems.
13
+ ### 1. Instalación
14
+ ```bash
15
+ npm install @jonapin006/tiger@1.0.11
16
+ ```
27
17
 
28
- ---
18
+ ### 2. Configuración Raíz (`src/main.tsx`)
19
+ Importa los estilos globales y envuelve tu aplicación con el `ThemeProvider`.
29
20
 
30
- ## 🏗️ Architectural Excellence
21
+ ```tsx
22
+ import { ThemeProvider } from '@jonapin006/tiger';
23
+ import '@jonapin006/tiger/styles'; // Estilos base de Tiger
24
+ import './index.css'; // Tu Tailwind local
31
25
 
32
- Tiger isn't just about looks. It's built on a rigorous engineering foundation:
26
+ ReactDOM.createRoot(document.getElementById('root')!).render(
27
+ <ThemeProvider>
28
+ <App />
29
+ </ThemeProvider>
30
+ );
31
+ ```
33
32
 
34
- - **Clean Architecture**: Separation of concerns between `Domain` (Theme types, Logic), `Application` (Contexts, Hooks), `Infrastructure` (Theme implementations, Libs), and `Presentation` (React Components).
35
- - **SOLID Principles**: Every component is designed following the Single Responsibility and Interface Segregation principles.
36
- - **Scaling System**: A strict 4-tier sizing system (**XS, SM, MD, LG, XL**) applied across all atomic elements (Buttons, Inputs, Thumbnails, Lists).
37
- - **Token Geometry**: Geometry (padding, height, width, corner) is decoupled from colors (Mode Config), allowing theme-specific shapes without logic changes.
33
+ ### 3. Layout Responsivo (Sidebar vs Desktop)
34
+ Usa los breakpoints de Tailwind (`md:`) para asegurar que el Sidebar se vea solo en Desktop y el menú hamburguesa solo en móvil:
35
+
36
+ ```tsx
37
+ // Ejemplo de Layout
38
+ <div className="flex flex-col md:flex-row min-h-screen">
39
+
40
+ {/* SIDEBAR PARA DESKTOP: Oculto en móvil, visible en md y superior */}
41
+ <aside className="hidden md:flex w-80 h-screen sticky top-0 bg-white/5 border-r border-white/5">
42
+ {/* Contenido de navegación */}
43
+ <nav> ... </nav>
44
+ </aside>
45
+
46
+ {/* CONTENIDO PRINCIPAL */}
47
+ <main className="flex-1 p-6 md:p-16">
48
+ {children}
49
+ </main>
50
+ </div>
51
+ ```
38
52
 
39
53
  ---
40
54
 
41
- ## 🚀 Getting Started
55
+ ## 🛠️ Uso del Hook de Temas (`useTheme`)
42
56
 
43
- ### Prerequisites
44
- - Node.js (Latest stable)
45
- - npm or yarn
57
+ Para evitar errores de tipo `ReferenceError: mode is not defined`, asegúrate siempre de extraer las variables del contexto:
46
58
 
47
- ### Installation
48
- ```bash
49
- # Clone the repository
50
- git clone https://github.com/jonapin006/tiger.git
59
+ ```tsx
60
+ import { useTheme } from '@jonapin006/tiger';
51
61
 
52
- # Install dependencies
53
- npm install
62
+ const MyComponent = () => {
63
+ const { mode, themeConfig, toggleMode } = useTheme();
54
64
 
55
- # Run the development server
56
- npm run dev
65
+ return (
66
+ <button onClick={toggleMode} className={themeConfig.buttonText}>
67
+ Modo: {mode}
68
+ </button>
69
+ );
70
+ };
57
71
  ```
58
72
 
59
- ### Extending the Design System
60
- To add new components or modify styles, focus on these files:
61
- - `src/domain/theme/Theme.ts`: Define the interfaces and token structure.
62
- - `src/infrastructure/theme/glassmorphism.ts`: Implement specific theme tokens and geometry.
63
- - `src/presentation/components/`: Build your components consuming the `useTheme` hook.
64
-
65
73
  ---
66
74
 
67
- ## 🛠️ Tech Stack
68
- - **React + TypeScript**
69
- - **Tailwind CSS** (for Utility-First styling & Token consumption)
70
- - **Lucide React** (Consistent iconography)
71
- - **Vitest** (Unit testing for critical components)
72
- - **Vite** (Next-gen bundling)
75
+ ## 🏗️ Excelencia Arquitectónica
76
+
77
+ - **Clean Architecture**: Separación estricta entre `Domain` (Tipos), `Application` (Hooks), `Infrastructure` (Temas) y `Presentation` (Componentes).
78
+ - **SOLID Principles**: Componentes desacoplados y con una única responsabilidad (SRP).
79
+ - **Scale System**: Sistema de 4 niveles de tamaño (**S, M, L, XL**) consistente en toda la librería.
80
+ - **Native Support**: Soporte nativo para atributos HTML y `forwardRef` para compatibilidad total con `react-hook-form`.
73
81
 
74
82
  ---
75
83
 
76
- ## 📄 License
77
- Tiger Design System is private and intellectual property of **jonapin006**.
84
+ ## 📄 Licencia
85
+ Tiger Design System es propiedad intelectual privada de **jonapin006**.
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { default as default_2 } from 'react';
2
2
  import { ForwardRefExoticComponent } from 'react';
3
3
  import { InputHTMLAttributes } from 'react';
4
+ import { ReactNode } from 'react';
4
5
  import { RefAttributes } from 'react';
5
6
 
6
7
  export declare interface BaseComponentProps {
@@ -301,6 +302,22 @@ export declare interface ThemeGeometryConfig {
301
302
  valueStyles: string;
302
303
  typographyMappings: Record<'small' | 'medium' | 'large' | 'xlarge', ComponentSize>;
303
304
  });
305
+ dropdown: (Record<Exclude<ComponentSize, ComponentSize.Xsmall>, {
306
+ size: string;
307
+ }> & {
308
+ trigger: string;
309
+ content: string;
310
+ contentPositioning: string;
311
+ item: string;
312
+ itemHover: string;
313
+ itemFocus: string;
314
+ typographyMappings: {
315
+ small: ComponentSize;
316
+ medium: ComponentSize;
317
+ large: ComponentSize;
318
+ xlarge: ComponentSize;
319
+ };
320
+ });
304
321
  stack: (Record<Exclude<ComponentSize, ComponentSize.Xsmall>, {
305
322
  gap: string;
306
323
  }> & {
@@ -357,6 +374,15 @@ export declare interface ThemeGeometryConfig {
357
374
  closeButton: string;
358
375
  corner: string;
359
376
  };
377
+ switch: (Record<ComponentSize.Small | ComponentSize.Medium | ComponentSize.Large, {
378
+ track: string;
379
+ thumb: string;
380
+ translateChecked: string;
381
+ translateUnchecked: string;
382
+ }> & {
383
+ baseStyles: string;
384
+ thumbStyles: string;
385
+ });
360
386
  }
361
387
 
362
388
  export declare enum ThemeMode {
@@ -514,6 +540,15 @@ export declare interface ThemeModeConfig {
514
540
  fillEffectColor: string;
515
541
  value: string;
516
542
  };
543
+ dropdown: {
544
+ trigger: string;
545
+ item: string;
546
+ };
547
+ switch: {
548
+ primary: string;
549
+ secondary: string;
550
+ disabled: string;
551
+ };
517
552
  }
518
553
 
519
554
  export declare const ThemeProvider: default_2.FC<{
@@ -525,6 +560,33 @@ export declare enum ThumbnailShape {
525
560
  Circle = "circle"
526
561
  }
527
562
 
563
+ export declare const TigerAccordion: default_2.FC<TigerAccordionProps>;
564
+
565
+ export declare const TigerAccordionItem: ({ id, title, content, disabled, icon, }: TigerAccordionItemConfig) => {
566
+ id: string;
567
+ title: default_2.ReactNode;
568
+ content: default_2.ReactNode;
569
+ disabled: boolean;
570
+ icon: default_2.ReactNode;
571
+ };
572
+
573
+ export declare interface TigerAccordionItemConfig {
574
+ id: string;
575
+ title: ReactNode;
576
+ content: ReactNode;
577
+ disabled?: boolean;
578
+ icon?: default_2.ReactNode;
579
+ }
580
+
581
+ export declare interface TigerAccordionProps {
582
+ items: TigerAccordionItemConfig[];
583
+ defaultExpandedId?: string;
584
+ onExpandedChange?: (id: string) => void;
585
+ allowMultiple?: boolean;
586
+ size?: ComponentSize;
587
+ className?: string;
588
+ }
589
+
528
590
  export declare const TigerBadge: default_2.FC<TigerBadgeProps>;
529
591
 
530
592
  declare interface TigerBadgeProps extends BaseComponentProps {
@@ -559,6 +621,31 @@ declare interface TigerCheckboxProps extends BaseComponentProps {
559
621
  disabled?: boolean;
560
622
  }
561
623
 
624
+ export declare const TigerDropdown: default_2.FC<TigerDropdownProps>;
625
+
626
+ export declare const TigerDropdownContent: default_2.FC<TigerDropdownContentProps>;
627
+
628
+ declare interface TigerDropdownContentProps extends default_2.HTMLAttributes<HTMLDivElement> {
629
+ size?: Exclude<ComponentSize, ComponentSize.Xsmall>;
630
+ }
631
+
632
+ export declare const TigerDropdownItem: default_2.FC<TigerDropdownItemProps>;
633
+
634
+ declare interface TigerDropdownItemProps extends default_2.ButtonHTMLAttributes<HTMLButtonElement> {
635
+ value?: string;
636
+ }
637
+
638
+ declare interface TigerDropdownProps extends SizedComponentProps {
639
+ defaultOpen?: boolean;
640
+ size?: Exclude<ComponentSize, ComponentSize.Xsmall>;
641
+ }
642
+
643
+ export declare const TigerDropdownTrigger: default_2.FC<TigerDropdownTriggerProps>;
644
+
645
+ declare interface TigerDropdownTriggerProps extends default_2.ButtonHTMLAttributes<HTMLButtonElement> {
646
+ label?: string;
647
+ }
648
+
562
649
  export declare const TigerGlassContainer: default_2.FC<TigerGlassContainerProps>;
563
650
 
564
651
  declare interface TigerGlassContainerProps extends BaseComponentProps, default_2.HTMLAttributes<HTMLDivElement> {
@@ -640,6 +727,24 @@ declare interface TigerStackProps {
640
727
  className?: string;
641
728
  }
642
729
 
730
+ export declare const TigerSwitch: default_2.FC<TigerSwitchProps>;
731
+
732
+ export declare enum TigerSwitchColor {
733
+ Primary = "primary",
734
+ Secondary = "secondary",
735
+ Disabled = "disabled"
736
+ }
737
+
738
+ export declare interface TigerSwitchProps extends BaseComponentProps {
739
+ checked: boolean;
740
+ onChange: (checked: boolean) => void;
741
+ disabled?: boolean;
742
+ size?: ComponentSize.Small | ComponentSize.Medium | ComponentSize.Large;
743
+ color?: TigerSwitchColor;
744
+ label?: string;
745
+ description?: string;
746
+ }
747
+
643
748
  export declare interface TigerTabItem {
644
749
  id: string;
645
750
  label: default_2.ReactNode;
@@ -733,6 +838,15 @@ declare interface TigerToastProps extends TigerToastItem {
733
838
 
734
839
  declare type TigerToastType = 'success' | 'error' | 'info' | 'warning' | 'neutral';
735
840
 
841
+ export declare const TigerTopBar: default_2.FC<TigerTopBarProps>;
842
+
843
+ export declare interface TigerTopBarProps {
844
+ title?: string;
845
+ subtitle?: string;
846
+ actions?: default_2.ReactNode;
847
+ className?: string;
848
+ }
849
+
736
850
  export declare const TigerTr: default_2.FC<TigerTrProps>;
737
851
 
738
852
  declare interface TigerTrProps extends BaseComponentProps {